diff --git a/.vscode/launch.json b/.vscode/launch.json index 8ebe281d..8711f05a 100755 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -51,7 +51,7 @@ ], "args": [ "src/cli.ts", - "--project=../tests/bsconfig.json", + "--project=./test-project/bsconfig.json", "--host=${input:roku_host}", "--password=${input:roku_password}" ], diff --git a/.vscode/settings.json b/.vscode/settings.json index 5a28a070..203c21dd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -47,5 +47,6 @@ "ROIBOS", "rooibos", "Stubbable" - ] + ], + "js/ts.tsdk.path": "node_modules/typescript/lib" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ef81871..b44be6dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,123 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +## [6.0.0-alpha.52](https://github.com/rokucommunity/rooibos/compare/6.0.0-alpha.51...v6.0.0-alpha.52) - 2026-06-02 +### Changed + - Updated to Brighterscript-v1.0.0a-alpha.52 ([#401](https://github.com/rokucommunity/rooibos/pull/401)) + - upgrade to [brighterscript@1.0.0-alpha.52](https://github.com/rokucommunity/brighterscript/blob/master/CHANGELOG.md#100-alpha52---2026-06-01). Notable changes since 1.0.0-alpha.51: + - Guard transpileComments against undefined trivia tokens ([#1725](https://github.com/rokucommunity/brighterscript/pull/1725)) + - Merge master into v1 ([#1726](https://github.com/rokucommunity/brighterscript/pull/1726)) + - upgrade to [@rokucommunity/bslint@1.0.0-alpha.52](https://github.com/rokucommunity/bslint/blob/master/CHANGELOG.md#100-alpha52---2026-06-01). Notable changes since 1.0.0-alpha.51: + - Updated to Brighterscript-v1.0.0.alpha-52 ([#192](https://github.com/rokucommunity/bslint/pull/192)) + - upgrade to [ropm@0.11.8](https://github.com/rokucommunity/ropm/blob/master/CHANGELOG.md#0118---2026-05-30). Notable changes since 0.11.7: + - Add --rootDir flag support to copy/install/clean commands ([#143](https://github.com/rokucommunity/ropm/pull/143)) + - Update minimum audit threshold ([#142](https://github.com/rokucommunity/ropm/pull/142)) + - Accept GHSA-w5hq-g745-h8pq (uuid <11.1.1) advisory ([#141](https://github.com/rokucommunity/ropm/pull/141)) + - Add security-audit-required job to security-audit workflow ([#140](https://github.com/rokucommunity/ropm/pull/140)) + + + +## [6.0.0-alpha.51](https://github.com/rokucommunity/rooibos/compare/6.0.0-alpha.50...v6.0.0-alpha.51) - 2026-05-29 +### Changed + - Merge master v6 again ([#398](https://github.com/rokucommunity/rooibos/pull/398)) + - Merge Latest from Master into v6 Branch ([#394](https://github.com/rokucommunity/rooibos/pull/394)) + - upgrade to [brighterscript@1.0.0-alpha.51](https://github.com/rokucommunity/brighterscript/blob/master/CHANGELOG.md#100-alpha51---2026-05-20). Notable changes since 1.0.0-alpha.50: + - Merges latest v0.72.2 into v1 ([#1717](https://github.com/rokucommunity/brighterscript/pull/1717)) + - Token leadingTrivia handling and reduce memory retention in long-lived compiler/LSP caches ([#1705](https://github.com/rokucommunity/brighterscript/pull/1705)) + - Merge/master 0.72.0 ([#1702](https://github.com/rokucommunity/brighterscript/pull/1702)) + - Fix for each validation error ([#1646](https://github.com/rokucommunity/brighterscript/pull/1646)) + - Allow typed functions in type expressions ([#1620](https://github.com/rokucommunity/brighterscript/pull/1620)) + - Fixes issue with forEach iterating over a union of iterables ([#1629](https://github.com/rokucommunity/brighterscript/pull/1629)) + - Allow typecast statement on all variables ([#1622](https://github.com/rokucommunity/brighterscript/pull/1622)) + - Documentation updates ([#1616](https://github.com/rokucommunity/brighterscript/pull/1616)) + - upgrade to [roku-debug@0.23.10](https://github.com/rokucommunity/roku-debug/blob/master/CHANGELOG.md#02310---2026-05-28). + - upgrade to [@rokucommunity/bslint@1.0.0-alpha.51](https://github.com/rokucommunity/bslint/blob/master/CHANGELOG.md#100-alpha51---2026-05-20). Notable changes since 1.0.0-alpha.50: + - Make sure scope-based diagnostics are cleared when needed ([#183](https://github.com/rokucommunity/bslint/pull/183)) + - upgrade to [ropm@0.11.7](https://github.com/rokucommunity/ropm/blob/master/CHANGELOG.md#0117---2026-05-20). + + + +## [6.0.0-alpha.50](https://github.com/rokucommunity/rooibos/compare/6.0.0-alpha.49...v6.0.0-alpha.50) - 2026-01-29 +### Changed + - upgrade to brighterscript v1.0.0-alpha.50 ([#365](https://github.com/rokucommunity/rooibos/pull/365)) + - upgrade to [brighterscript@1.0.0-alpha.50](https://github.com/rokucommunity/brighterscript/blob/master/CHANGELOG.md#100-alpha50---2026-01-28). Notable changes since 1.0.0-alpha.49: + - Adds ability to declare type on "For Each" loop item ([#1614](https://github.com/rokucommunity/brighterscript/pull/1614)) + - Intersection Type ([#1603](https://github.com/rokucommunity/brighterscript/pull/1603)) + - Align event names ([#1557](https://github.com/rokucommunity/brighterscript/pull/1557)) + - Fix bug with `stagingDir` fallback not working ([#1606](https://github.com/rokucommunity/brighterscript/pull/1606)) + - Fix bug with normalizing `virtual:/` path scheme ([#1607](https://github.com/rokucommunity/brighterscript/pull/1607)) + - Fixes getting types from pocket tables in Try/Catch ([#1602](https://github.com/rokucommunity/brighterscript/pull/1602)) + - upgrade to [@rokucommunity/bslint@1.0.0-alpha.50](https://github.com/rokucommunity/bslint/blob/master/CHANGELOG.md#100-alpha50---2026-01-28). Notable changes since 1.0.0-alpha.49: + - upgrade to [ropm@0.11.4](https://github.com/rokucommunity/ropm/blob/master/CHANGELOG.md#0114---2026-01-26). Notable changes since 0.11.2: + + + +## [6.0.0-alpha.49](https://github.com/rokucommunity/rooibos/compare/6.0.0-alpha.48...v6.0.0-alpha.49) - 2025-12-11 +### Changed + - upgrade to [brighterscript@1.0.0-alpha.49](https://github.com/rokucommunity/brighterscript/blob/master/CHANGELOG.md#100-alpha49---2025-12-10). Notable changes since 1.0.0-alpha.48: + - Adds TypeStatement for declaring new types ([#1597](https://github.com/rokucommunity/brighterscript/pull/1597)) + - Adds Inline interfaces ([#1591](https://github.com/rokucommunity/brighterscript/pull/1591)) + - Make Invalid compatible with typed arrays ([#1596](https://github.com/rokucommunity/brighterscript/pull/1596)) + - Merge branch 'master' into 'v1' ([#1590](https://github.com/rokucommunity/brighterscript/pull/1590)) + - Limit scope Validation ([#1586](https://github.com/rokucommunity/brighterscript/pull/1586)) + - Interface extending node includes callfuncs ([#1585](https://github.com/rokucommunity/brighterscript/pull/1585)) + - Fix validation exception when calling roFunction ([#1588](https://github.com/rokucommunity/brighterscript/pull/1588)) + - Remove unused util functions ([#1565](https://github.com/rokucommunity/brighterscript/pull/1565)) + - #1555 Remove zip and sideload ([#1562](https://github.com/rokucommunity/brighterscript/pull/1562)) + - Fix `MaskGroup.maskUri` type ([#1559](https://github.com/rokucommunity/brighterscript/pull/1559)) + - upgrade to [roku-debug@0.22.5](https://github.com/rokucommunity/roku-debug/blob/master/CHANGELOG.md#0225---2025-12-01). Notable changes since 0.21.37: + - Support packageTask, packagePath, packageUploadOverrides for complibs ([#282](https://github.com/rokucommunity/roku-debug/pull/282)) + - Add ability to install component libraries on device ([#279](https://github.com/rokucommunity/roku-debug/pull/279)) + - chore: suppport OIDC for publishing ([#277](https://github.com/rokucommunity/roku-debug/pull/277)) + - Change ecp logging to `trace` to make lower level logs more useful ([#276](https://github.com/rokucommunity/roku-debug/pull/276)) + - Bump brace-expansion from 1.1.11 to 1.1.12 ([#272](https://github.com/rokucommunity/roku-debug/pull/272)) + - Better handling when the telnet debugger freezes ([#268](https://github.com/rokucommunity/roku-debug/pull/268)) + - Add more logs to track how long each step takes while sideloading ([#270](https://github.com/rokucommunity/roku-debug/pull/270)) + - chore: Support dispatch workflows ([#266](https://github.com/rokucommunity/roku-debug/pull/266)) + - upgrade to [@rokucommunity/bslint@1.0.0-alpha.49](https://github.com/rokucommunity/bslint/blob/master/CHANGELOG.md#100-alpha49---2025-12-11). Notable changes since 1.0.0-alpha.48: + - Update for v49 ([#169](https://github.com/rokucommunity/bslint/pull/169)) + - upgrade to [ropm@0.11.2](https://github.com/rokucommunity/ropm/blob/master/CHANGELOG.md#0112---2025-10-31). Notable changes since 0.10.35: + - chore: use OIDC for publishing ([#123](https://github.com/rokucommunity/ropm/pull/123)) + - Bump brace-expansion from 1.1.11 to 1.1.12 ([#120](https://github.com/rokucommunity/ropm/pull/120)) + - Fix Issues with npm-ls ([#118](https://github.com/rokucommunity/ropm/pull/118)) + - Fix packageRootDir crash when directory doesn't exist ([#110](https://github.com/rokucommunity/ropm/pull/110)) + - Add support for the `create-package` label ([#111](https://github.com/rokucommunity/ropm/pull/111)) + - chore: Support dispatch workflows ([#107](https://github.com/rokucommunity/ropm/pull/107)) + + + +## [6.0.0-alpha.48](https://github.com/rokucommunity/rooibos/compare/6.0.0-alpha.47...v6.0.0-alpha.48) - 2025-07-17 +### Changed + - upgrade to [brighterscript@1.0.0-alpha.48](https://github.com/rokucommunity/brighterscript/blob/master/CHANGELOG.md#100-alpha48---2025-07-16). Notable changes since 1.0.0-alpha.47: + - Union Return type consistency ([#1508](https://github.com/rokucommunity/rooibos/pull/1508)) + - Fix issues with undefined/null trivia items ([#1531](https://github.com/rokucommunity/rooibos/pull/1531)) + - Fix ForEach variable typing issues ([#1498](https://github.com/rokucommunity/rooibos/pull/1498)) + - `Dynamic` and `Function` do not need semantic tokens in Type expressions ([#1500](https://github.com/rokucommunity/rooibos/pull/1500)) + - upgrade to [roku-debug@0.21.37](https://github.com/rokucommunity/roku-debug/blob/master/CHANGELOG.md#02137---2025-07-03). Notable changes since 0.21.36: + - upgrade to [@rokucommunity/bslint@1.0.0-alpha.48](https://github.com/rokucommunity/bslint/blob/master/CHANGELOG.md#100-alpha48---2025-07-16). Notable changes since 1.0.0-alpha.47: + - upgrade to [ropm@0.10.35](https://github.com/rokucommunity/ropm/blob/master/CHANGELOG.md#01035---2025-07-03). Notable changes since 0.10.34: + + + +## [6.0.0-alpha.47](https://github.com/rokucommunity/rooibos/compare/6.0.0-alpha.46...v6.0.0-alpha.47) - 2025-06-04 +### Added + - added [@rokucommunity/bslint@1.0.0-alpha.46](https://github.com/rokucommunity/bslint) + - added [ropm@0.10.30](https://github.com/rokucommunity/ropm) +### Changed + - Task/update with master ([#346](https://github.com/rokucommunity/rooibos/pull/346)) + - Update v6 with master ([#344](https://github.com/rokucommunity/rooibos/pull/344)) + + + +## [6.0.0-alpha.46](https://github.com/rokucommunity/rooibos/compare/6.0.0-alpha.45...v6.0.0-alpha.46) - 2025-04-24 +### Changed + - Upgrade to brighterscript and bslint v1.0.0-alpha.46 ([3b75efa](https://github.com/rokucommunity/rooibos/commit/3b75efa)) + - Merge branch 'master' of https://github.com/rokucommunity/rooibos into release-6.0.0 ([7177ebb](https://github.com/rokucommunity/rooibos/commit/7177ebb)) + - Fix package-lock for #330 ([10d445d](https://github.com/rokucommunity/rooibos/commit/10d445d)) + - Make sure the correct version of roku-debug is included for the CLI ([#330](https://github.com/rokucommunity/rooibos/pull/330)) + + + ## [5.16.3](https://github.com/rokucommunity/rooibos/compare/5.16.2...v5.16.3) - 2026-05-20 ### Changed - Update ropm to 0.11.7 and remove lodash override ([#391](https://github.com/rokucommunity/rooibos/pull/391)) @@ -50,7 +167,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - chore: add and implement linting rules ([#338](https://github.com/rokucommunity/rooibos/pull/338)) - chore: stricter linting for TypeScript ([#343](https://github.com/rokucommunity/rooibos/pull/343)) - chore: shared CI Support Prerelease ([#341](https://github.com/rokucommunity/rooibos/pull/341), [#339](https://github.com/rokucommunity/rooibos/pull/339)) - - upgrade to [roku-debug@0.23.6](https://github.com/rokucommunity/roku-debug/blob/master/CHANGELOG.md#0236---2026-04-30). + - upgrade to [roku-debug@0.23.6](https://github.com/rokucommunity/roku-debug/blob/master/CHANGELOG.md#0236---2026-04-30). - upgrade to [roku-deploy@3.17.1](https://github.com/rokucommunity/roku-deploy/blob/master/CHANGELOG.md#3171---2026-04-27) - upgrade to [@rokucommunity/bslint@0.8.41](https://github.com/rokucommunity/bslint/blob/master/CHANGELOG.md#0841---2026-03-25) - upgrade to [ropm@0.11.5](https://github.com/rokucommunity/ropm/blob/master/CHANGELOG.md#0115---2026-03-24) diff --git a/README.md b/README.md index 5e7770da..48940d67 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,27 @@ Rooibos is an independent open-source project maintained exclusively by voluntee You might want to help! Get in touch via the [slack group](https://join.slack.com/t/rokudevelopers/shared_invite/zt-4vw7rg6v-NH46oY7hTktpRIBM_zGvwA) or [raise issues](https://github.com/rokucommunity/rooibos/issues/new). +### Project Setup + +1. Clone the project +2. Run `npm install` +3. Open the workspace file in VSCode: `roobois.code-workspace` + +### Running Tests + +Rooibos Brighterscript plugin tests can be run either through VSCode's debug configuration `Run Tests (bsc-plugin)` or by running `npm run test` in the directory `rooibos/bsc-plugin`. + +Example Rooibos framework tests will wrun on a Roku device. + +Create a `.env` in `rooibos/tests` with the following details: + +``` +ROKU_HOST= +ROKU_PASSWORD= +``` + +Run tests either from a VSCode debugger, or through `npm run test`. + ## Sample project https://github.com/rokucommunity/rooibos-roku-sample diff --git a/framework/.vscode/settings.json b/framework/.vscode/settings.json new file mode 100644 index 00000000..687b6ae0 --- /dev/null +++ b/framework/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "brightscript.bsdk": "node_modules/brighterscript" +} diff --git a/framework/bsconfig.json b/framework/bsconfig.json index 58a3ccd1..30704be2 100644 --- a/framework/bsconfig.json +++ b/framework/bsconfig.json @@ -8,6 +8,7 @@ "autoImportComponentScript": false, "createPackage": false, "stagingDir": "dist", + "outDir": "dist", // "diagnosticFilters": [ // { // "src": "**/roku_modules/**/*.*", diff --git a/framework/bslint.json b/framework/bslint.json index f3604505..8aea5315 100644 --- a/framework/bslint.json +++ b/framework/bslint.json @@ -23,4 +23,4 @@ "ignores": [ "**/roku_modules/**/*" ] -} \ No newline at end of file +} diff --git a/framework/src/components/rooibos/RooibosScene.xml b/framework/src/components/rooibos/RooibosScene.xml index ca8fce2b..fd5819f9 100644 --- a/framework/src/components/rooibos/RooibosScene.xml +++ b/framework/src/components/rooibos/RooibosScene.xml @@ -1,5 +1,9 @@ + + + + @@ -7,8 +11,10 @@ - - diff --git a/framework/src/source/rooibos/BaseTestReporter.bs b/framework/src/source/rooibos/BaseTestReporter.bs index 48ed9c43..6968b1a0 100644 --- a/framework/src/source/rooibos/BaseTestReporter.bs +++ b/framework/src/source/rooibos/BaseTestReporter.bs @@ -1,3 +1,5 @@ +'bs:disable: LINT1006 + namespace rooibos ' @ignore diff --git a/framework/src/source/rooibos/BaseTestSuite.bs b/framework/src/source/rooibos/BaseTestSuite.bs index c0ae2560..ad12cb6c 100644 --- a/framework/src/source/rooibos/BaseTestSuite.bs +++ b/framework/src/source/rooibos/BaseTestSuite.bs @@ -7,32 +7,35 @@ namespace rooibos class BaseTestSuite 'test state - protected name = "BaseTestSuite" 'set the name to the name of your test - protected filePath = invalid + public name = "BaseTestSuite" 'set the name to the name of your test + public filePath = invalid protected pkgPath = invalid protected isValid = false protected hasSoloTests = false protected hasIgnoredTests = false protected isSolo = false - protected isIgnored = false - protected noCatch = false - protected isNodeTest = false + public context as rooibos.NodeContext = invalid + public isIgnored = false + public noCatch = false + public isNodeTest = false protected nodeName = invalid - protected lineNumber = 1 - protected groups = [] - protected groupsData = [] - protected stats = invalid + public lineNumber = 1 + public groups as rooibos.TestGroup[] = [] + public groupsData as rooibos.TestGroupData[] = [] + public testsData as rooibos.TestCaseData[] = [] + public stats as rooibos.Stats = invalid protected currentAssertLineNumber = -1 + public failedCount = 0 protected valid = false - protected hasFailures = false + public hasFailures = false protected hasSoloGroups = false - protected isFailingFast = false + public isFailingFast = false protected stubs = invalid protected mocks = invalid protected __stubId = -1 protected __mockId = -1 protected __mockTargetId = -1 - protected currentExecutionTime = 0 + public currentExecutionTime = 0 protected timedOut = false public deferred = invalid @@ -48,13 +51,42 @@ namespace rooibos protected anyArrayMatcher = { "matcher": rooibos.Matcher.anyArray } protected anyNodeMatcher = { "matcher": rooibos.Matcher.anyNode } protected allowNonExistingMethodsOnMocks = true - protected isAutoAssertingMocks = true + public isAutoAssertingMocks = true - protected currentResult = invalid + protected currentResult as rooibos.TestResult = invalid - protected global = invalid - protected catchCrashes = false - protected throwOnFailedAssertion = false + public global = invalid + public scene as rooibos.RooibosScene = invalid + public catchCrashes = false + public throwOnFailedAssertion = false + + public isAsync = false + protected asyncTimeout = 0 + + public generatedNodeName = "" + + public testRunner as rooibos.TestRunner = invalid + + protected testTimer as roSGNodeTimer = invalid + protected currentTimeout as integer = 0 + + protected currentGroup as rooibos.TestGroup = invalid + protected currentGroupIndex = -1 + + public isDoneCalled = false + + ' Reference to the tested node in Node tests + ' Defined as object so it can be easily typed in tests + public top as object = invalid + ' Reference to the 'm' of the tested node in node tests + ' Defined as object so it can be easily typed in tests + public node as object = invalid + + public tests as Test[] = [] + + protected isTestFailedDueToEarlyExit = false + + public testReporters as BaseTestReporter[] = [] '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ '++ base methods to override @@ -177,7 +209,7 @@ namespace rooibos group.run() if rooibos.promises.isPromise(group.deferred) then rooibos.promises.onFinally(group.deferred, function(context as roAssociativeArray) - context.self.onAsyncGroupComplete(context.group) + (context.self as rooibos.BaseTestSuite).onAsyncGroupComplete((context.group as rooibos.TestGroup)) end function, { group: group, self: m }) else m.onAsyncGroupComplete(group) @@ -1748,7 +1780,7 @@ namespace rooibos '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ' NOTE: Legacy check for children via array support. '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - for each value in subset + for each value in subset as roArray if rooibos.common.nodeContains(node, value) then if msg = "" then msg = `expected "${rooibos.common.truncateString(rooibos.common.getTypeWithComponentWrapper(node, true))}" to not contain child "${rooibos.common.truncateString(rooibos.common.getTypeWithComponentWrapper(value, true))}" by reference` @@ -1759,7 +1791,7 @@ namespace rooibos end for else if rooibos.common.isAssociativeArray(subset) then foundValues = {} - for each key in subset + for each key in subset as roAssociativeArray subsetValue = subset[key] nodeValue = node[key] if rooibos.common.eqValues(nodeValue, subsetValue) then @@ -1923,11 +1955,11 @@ namespace rooibos mock = m.mocks[m.__mockId.toStr()] mock.toThrow(error) catch error - m.log.error("could not add throw to last call", error) + (m as roAssociativeArray).log.error("could not add throw to last call", error) end try end function - function expectCalled(invocation as dynamic, returnValue = invalid as dynamic) as object + function expectCalled(invocation as dynamic, returnValue = invalid as dynamic) as object 'bs:disable-line: LINT1006 'mock function body - the plugin replaces this return invalid end function @@ -1980,7 +2012,7 @@ namespace rooibos return false end function - function expectNotCalled(invocation as dynamic) as object + function expectNotCalled(invocation as dynamic) as object 'bs:disable-line: LINT1006 'mock function body - the plugin replaces this return invalid end function @@ -2087,7 +2119,7 @@ namespace rooibos if target <> invalid and not rooibos.common.isFunction(target) and not rooibos.common.isAssociativeArray(target) then methodName = "" - m.mockFail(lineNumber, "", "mock args: target should be an AA or in-scope Global function", methodName) + m.mockFail(lineNumber, "", "mock args: target should be an AA or in-scope Global function") else if not rooibos.common.isString(methodName) then methodName = "" m.mockFail(lineNumber, "", "mock args: methodName was not a string") @@ -2383,7 +2415,7 @@ namespace rooibos end function - function mockFail(lineNumber as integer, methodName as dynamic, message as string) as dynamic + function mockFail(lineNumber as integer, methodName as dynamic, message as string) as dynamic 'bs:disable-line: LINT1006 if m.currentResult.isFail then return false end if @@ -2396,6 +2428,9 @@ namespace rooibos '++ Fake Stub callback functions - this is required to get scope '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + ' @ignore + private __Stubs as dynamic + ' @ignore private function stubCallback0(arg1 = invalid as dynamic, arg2 = invalid as dynamic, arg3 = invalid as dynamic, arg4 = invalid as dynamic, arg5 = invalid as dynamic, arg6 = invalid as dynamic, arg7 = invalid as dynamic, arg8 = invalid as dynamic, arg9 = invalid as dynamic, arg10 = invalid as dynamic, arg11 = invalid as dynamic, arg12 = invalid as dynamic, arg13 = invalid as dynamic, arg14 = invalid as dynamic, arg15 = invalid as dynamic) as dynamic fake = m.__Stubs["0"] @@ -2557,6 +2592,9 @@ namespace rooibos '++ Fake Mock callback functions - this is required to get scope '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + ' @ignore + private __mocks as dynamic + ' @ignore private function mockCallback0(arg1 = invalid as dynamic, arg2 = invalid as dynamic, arg3 = invalid as dynamic, arg4 = invalid as dynamic, arg5 = invalid as dynamic, arg6 = invalid as dynamic, arg7 = invalid as dynamic, arg8 = invalid as dynamic, arg9 = invalid as dynamic, arg10 = invalid as dynamic, arg11 = invalid as dynamic, arg12 = invalid as dynamic, arg13 = invalid as dynamic, arg14 = invalid as dynamic, arg15 = invalid as dynamic) as dynamic fake = m.__mocks["0"] @@ -2711,10 +2749,10 @@ namespace rooibos '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ' observeField doesn't work in regular unit tests, so we have to wait for the result. We can use this to wait for a network task, foe example, and pass the result directly to a handler. Note - we wait for the value TO CHANGE - so make sure that will be the case, or you'll get stuck forever :) - ' @param {any} target to observe + ' @param {dynamic} target to observe ' @param {String} field to observe - ' @param {int} delay for each wait - ' @param {int} max attempts + ' @param {integer} delay for each wait + ' @param {integer} max attempts function waitForField(target as dynamic, fieldName as string, delay = 500 as integer, maxAttempts = 10 as integer) as boolean attempts = 0 if target = invalid then @@ -2801,7 +2839,7 @@ namespace rooibos ' @ignore protected function createMockViews(instance as dynamic, bundlePath as string, viewsPath = "views" as string) bundle = m.global.testStyleManager@.loadBundle(bundlePath) - ids = mv_getIdsFromStyleJson(mc_getArray(bundle, viewsPath)) 'bs:disable-line 1140 LINT1001 + ids = mv_getIdsFromStyleJson(mc_getArray(bundle, viewsPath)) as string[] 'bs:disable-line 1140 LINT1001 for each id in ids instance[id] = { id: id } end for @@ -2848,4 +2886,62 @@ namespace rooibos function isFunctionMocked(functionName as string) as boolean return rooibos.getMockForFunction(functionName) <> invalid end function + + interface NodeContext + global as rooibos.GlobalNode + top as rooibos.NodeWithRooibosFields + scene as rooibos.RooibosScene + testRunner as rooibos.TestRunner + testSuite as rooibos.BaseTestSuite + end interface + + interface GlobalNode + testsScene as rooibos.RooibosScene + _rbs_ccn as roSGNodeCodeCoverage + end interface end namespace + + + +function testPocket1(msg as string) + try + ' if msg = "" then + msg = "hello!" + ' end if + print msg + + + print msg + + catch e + end try + + print msg +end function + + +function testPocket2(msg as string) + + + + print msg + try + + + if msg = "" then + msg = "hello!" + + print msg + end if + + msg = 123 + + print msg + catch e + end try + + + + print msg.toStr() +end function + diff --git a/framework/src/source/rooibos/CommonUtils.bs b/framework/src/source/rooibos/CommonUtils.bs index c3075805..b733107b 100755 --- a/framework/src/source/rooibos/CommonUtils.bs +++ b/framework/src/source/rooibos/CommonUtils.bs @@ -32,7 +32,7 @@ namespace rooibos.common if not rooibos.common.isNotEmptyString(functionName) or not rooibos.common.isNotEmptyString(filename) then return invalid end if - mapFunction = RBSFM_getFunctionsForFile(filename) 'bs:disable-line 1140 LINT1001 + mapFunction as function = RBSFM_getFunctionsForFile(filename) 'bs:disable-line 1140 LINT1001 if mapFunction <> invalid then map = mapFunction() if type(map) = "roAssociativeArray" then @@ -56,7 +56,7 @@ namespace rooibos.common filenames = RBSFM_getFilenames() 'bs:disable-line 1140 LINT1001 for i = 0 to filenames.count() - 1 filename = filenames[i] - mapFunction = RBSFM_getFunctionsForFile(filename) 'bs:disable-line 1140 LINT1001 + mapFunction as function = RBSFM_getFunctionsForFile(filename) 'bs:disable-line 1140 LINT1001 if mapFunction <> invalid then map = mapFunction() if type(map) = "roAssociativeArray" then @@ -467,7 +467,7 @@ namespace rooibos.common ' @param {Dynamic} compareAttribute - attribute to use for comparisons ' @param {Boolean} caseSensitive - indicates if comparisons are case sensitive ' @returns {Integer} element index if array contains a value, else return -1 - function findElementIndexInArray(array as dynamic, value as dynamic, compareAttribute = invalid as dynamic, caseSensitive = false as boolean, callCount = 0 as integer) as integer + function findElementIndexInArray(array as dynamic, value as dynamic, compareAttribute = invalid as dynamic, caseSensitive = false as boolean, callCount = 0 as integer) as integer 'bs:disable-line: LINT1006 if callCount = 0 and not rooibos.common.isArray(array) then array = rooibos.common.asArray(array) end if @@ -483,7 +483,7 @@ namespace rooibos.common if rooibos.common.eqValues(compareValue, value, callCount + 1) then return i end if - next + end for end if return -1 end function @@ -638,7 +638,7 @@ namespace rooibos.common if val2Type <> "roSGNode" then return false else - return Value1.isSameNode(Value2) + return (Value1 as roSGNode).isSameNode(Value2) end if else if valType = "" and val2Type = "" then ' Both values are uninitialized, so they are equal diff --git a/framework/src/source/rooibos/ConsoleTestReporter.bs b/framework/src/source/rooibos/ConsoleTestReporter.bs index edf0a387..77053bc6 100644 --- a/framework/src/source/rooibos/ConsoleTestReporter.bs +++ b/framework/src/source/rooibos/ConsoleTestReporter.bs @@ -99,6 +99,7 @@ namespace rooibos if testGroup.isIgnored then return isGroupPrinted = false + test as rooibos.Test = invalid for each test in testGroup.tests if not test.result.isSkipped then if not m.allStats.hasFailures or ((not m.config.showOnlyFailures) or test.result.isFail) then @@ -224,7 +225,7 @@ namespace rooibos '++ printing '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - function printLine(depth = 0 as integer, text = "" as string) + function printLine(depth = 0 as integer, text = "" as string) 'bs:disable-line: LINT1006 ? " " ; text end function diff --git a/framework/src/source/rooibos/JUnitTestReporter.bs b/framework/src/source/rooibos/JUnitTestReporter.bs index 8a668457..cf7efac2 100644 --- a/framework/src/source/rooibos/JUnitTestReporter.bs +++ b/framework/src/source/rooibos/JUnitTestReporter.bs @@ -2,7 +2,7 @@ namespace rooibos ' @ignore class JUnitTestReporter extends rooibos.BaseTestReporter - override function onEnd(event as rooibos.TestReporterOnEndEvent) + override function onEnd(event as rooibos.TestReporterOnEndEvent) 'bs:disable-line: LINT1006 root = createObject("roXMLElement") root.SetName("testsuites") properties = root.addElement("properties") @@ -37,7 +37,8 @@ namespace rooibos ? `` + root.GenXML(false) end function - function generateGroupXML(testGroup as rooibos.testGroup, suite as rooibos.BaseTestSuite) + function generateGroupXML(testGroup as rooibos.testGroup, suite as roXMLElement) + test as rooibos.Test = invalid for each test in testGroup.tests testCase = suite.AddElement("testcase") testCase.AddAttribute("name", test.name) diff --git a/framework/src/source/rooibos/MochaTestReporter.bs b/framework/src/source/rooibos/MochaTestReporter.bs index 84068a32..785486ab 100644 --- a/framework/src/source/rooibos/MochaTestReporter.bs +++ b/framework/src/source/rooibos/MochaTestReporter.bs @@ -244,7 +244,7 @@ namespace rooibos ' -0 (Integer) ' +true (Boolean) function unifiedDiff(actual as string, expected as string) as string - cleanUp = function(line as string, m as rooibos.MochaTestReporter) as string or dynamic + cleanUp = function(line as string, m as rooibos.MochaTestReporter) as string or dynamic 'bs:disable-line: LINT1006 indent = " " if line.left(1) = "+" then return indent + m.colorLines(rooibos.reporters.mocha.colors.diffAdded, line) @@ -325,7 +325,7 @@ namespace rooibos end function ' Creates a patch file string based on the the differences of the two supplied strings - function createPatch(fileName as string, oldStr as string, newStr as string) as string + function createPatch(fileName as string, oldStr as string, newStr as string) as string or dynamic result = m.structuredPatch(fileName, fileName, oldStr, newStr, invalid, invalid, { context: 4 newlineIsToken: false @@ -352,7 +352,7 @@ namespace rooibos end function ' Diff two sets of strings, comparing them line by line - function diffLines(oldStr as string, newStr as string, callback as dynamic) as roAssociativeArray + function diffLines(oldStr as string, newStr as string, callback as dynamic) as roArray 'bs:disable-line: LINT1006 lineDiff = rooibos.reporters.mocha.new_lineDiff() return lineDiff.diff(oldStr, newStr, { @@ -378,7 +378,7 @@ namespace rooibos hunks = [] oldRangeStart = 0 newRangeStart = 0 - curRange = [] + curRange as string[] = [] oldLine = 1 newLine = 1 for i = 0 to diff.count() - 1 @@ -389,20 +389,20 @@ namespace rooibos lines = m.splitLines(current.value) end if current.lines = lines - + print curRange if current.added = true or current.removed = true then ' If we have previous context, start with that if not (oldRangeStart) = true then prev = diff[i - 1] oldRangeStart = oldLine newRangeStart = newLine - if prev <> invalid then if options.context > 0 then curRange = m.contextLines(prev.lines.slice(-options.context)) else - curRange = [] + curRange as string[] = [] end if + print curRange oldRangeStart -= curRange.count() newRangeStart -= curRange.count() end if @@ -411,9 +411,9 @@ namespace rooibos ' Output our changes for each entry in lines if current.added then - curRange.push("+" + entry) + (curRange as string[]).push("+" + entry) else - curRange.push("-" + entry) + (curRange as string[]).push("-" + entry) end if end for @@ -808,7 +808,7 @@ namespace rooibos end if end function - removeEmpty: function(array as string[]) as roArray + removeEmpty: function(array as string[]) as string[] ret = [] for i = 0 to array.count() - 1 if array[i] <> "" then @@ -818,7 +818,7 @@ namespace rooibos return ret end function - tokenize: function(value as string, options as roAssociativeArray) as string[] + tokenize: function(value as string, options as roAssociativeArray) as string[] 'bs:disable-line: LINT1006 return value.split("") end function @@ -826,7 +826,7 @@ namespace rooibos return chars.join("") end function - postProcess: function(changeObjects as dynamic, options as roAssociativeArray) as dynamic + postProcess: function(changeObjects as dynamic, options as roAssociativeArray) as dynamic 'bs:disable-line: LINT1006 return changeObjects end function diff --git a/framework/src/source/rooibos/Rooibos.bs b/framework/src/source/rooibos/Rooibos.bs index 114c8258..7ec3dd87 100644 --- a/framework/src/source/rooibos/Rooibos.bs +++ b/framework/src/source/rooibos/Rooibos.bs @@ -31,7 +31,7 @@ namespace rooibos else rooibos.common.logInfo("scene is ready; running tests now") print "" - runner = new rooibos.TestRunner(scene, m) + runner = new rooibos.TestRunner(scene, m as rooibos.NodeContext) runner.Run() if runner.config.keepAppOpen = false then @@ -57,7 +57,7 @@ namespace rooibos if msg.getField() = "isReadyToStartTests" and msg.getData() = true then rooibos.common.logInfo("scene is ready; running tests now") print "" - runner = new rooibos.TestRunner(scene, m) + runner = new rooibos.TestRunner(scene, m as rooibos.NodeContext) runner.Run() end if end if diff --git a/framework/src/source/rooibos/RuntimeConfig.bs b/framework/src/source/rooibos/RuntimeConfig.bs index 0ec6b9e8..a485d8f9 100644 --- a/framework/src/source/rooibos/RuntimeConfig.bs +++ b/framework/src/source/rooibos/RuntimeConfig.bs @@ -6,20 +6,28 @@ namespace rooibos ' @ignore class RuntimeConfig + private testSuites as roAssociativeArray = {} + function new() m.testSuites = m.getTestSuiteClassMap() end function - function getVersionText() + function getVersionText() as string + ' filled in by plugin + return "" end function - function getRuntimeConfig() + function getRuntimeConfig() as RuntimeConfigData + ' filled in by plugin + return {} as RuntimeConfigData end function - function getTestSuiteClassMap() + function getTestSuiteClassMap() as roAssociativeArray + ' filled in by plugin + return {} end function - function getTestSuiteClassWithName(name as string) as rooibos.BaseTestSuite + function getTestSuiteClassWithName(name as string) as function return m.testSuites[name] end function @@ -27,7 +35,9 @@ namespace rooibos return m.testSuites.keys() end function - function getIgnoredTestInfo() + function getIgnoredTestInfo() as roAssociativeArray + ' filled in by plugin + return {} end function end class diff --git a/framework/src/source/rooibos/Test.bs b/framework/src/source/rooibos/Test.bs index dde2adca..e41cd333 100644 --- a/framework/src/source/rooibos/Test.bs +++ b/framework/src/source/rooibos/Test.bs @@ -1,30 +1,36 @@ import "pkg:/source/rooibos/TestResult.bs" import "pkg:/source/rooibos/TestGroup.bs" +import "pkg:/source/rooibos/TestConstructorData.bs" namespace rooibos ' @ignore class Test - public name - public isSolo + public name as string + public isSolo as boolean + public isAsync as boolean + public asyncTimeout as integer + public slow as integer public noCatch = false - public funcName - public isIgnored - public lineNumber - public paramLineNumber - public testSuite = invalid - public testGroup = invalid - public deferred = invalid - - public rawParams - public paramTestIndex + public funcName as string + public isIgnored as boolean + public lineNumber as integer + public paramLineNumber as integer + public testSuite as BaseTestSuite = invalid + public testGroup as TestGroup = invalid + public deferred as roSGNode = invalid + + public rawParams as roAssociativeArray + public paramTestIndex as integer = 0 public isParamTest = false public isParamsValid = false public expectedNumberOfParams = 0 - public result = invalid + public result as TestResult = invalid - function new(testGroup as rooibos.TestGroup, data as roAssociativeArray, testSuite = invalid as rooibos.BaseTestSuite) + protected rooibosTimer as roTimespan = invalid + + function new(testGroup as rooibos.TestGroup, data as rooibos.TestCaseData, testSuite = invalid as rooibos.BaseTestSuite) m.testGroup = testGroup if testSuite <> invalid then m.testSuite = testSuite @@ -94,11 +100,11 @@ namespace rooibos ' and resolves or rejects the deferred based on the result of the test promise. ' Also records the execution time of the test if not already recorded. function markDoneWhenTestCompletes(testPromise as roSGNoderooibos_promises_Promise) - rooibos.promises.chain(testPromise, m).then(function(result as dynamic, m as roAssociativeArray) + rooibos.promises.chain(testPromise, m).then(function(result as dynamic, m as rooibos.Test) 'bs:disable-line: LINT1006 m.recordExecutionTime() rooibos.common.logDebug("Test promise resolved") rooibos.promises.resolve(result, m.deferred) - end function).catch(function(error as dynamic, m as roAssociativeArray) + end function).catch(function(error as dynamic, m as rooibos.Test) 'bs:disable-line: LINT1006 m.recordExecutionTime() rooibos.common.logDebug("Test promise rejected") rooibos.promises.reject(error, m.deferred) @@ -106,7 +112,7 @@ namespace rooibos end function function registerTimeout() - rooibos.promises.internal.delay(function(m as roAssociativeArray) + rooibos.promises.internal.delay(function(m as rooibos.Test) 'bs:disable-line: LINT1006 if not rooibos.promises.isComplete(m.deferred) then m.recordExecutionTime(m.asyncTimeout) m.testSuite.fail(`Test execution exceeded ${m.asyncTimeout}ms`) @@ -116,10 +122,10 @@ namespace rooibos end function function recordExecutionTimeWhenDone() - rooibos.promises.chain(m.deferred, m).then(function(result as dynamic, m as roAssociativeArray) + rooibos.promises.chain(m.deferred, m).then(function(result as dynamic, m as rooibos.Test) 'bs:disable-line: LINT1006 m.recordExecutionTime() rooibos.promises.resolve(result, m.deferred) - end function).catch(function(error as dynamic, m as roAssociativeArray) + end function).catch(function(error as dynamic, m as rooibos.Test) 'bs:disable-line: LINT1006 m.recordExecutionTime() rooibos.promises.reject(error, m.deferred) end function) diff --git a/framework/src/source/rooibos/TestConstructorData.bs b/framework/src/source/rooibos/TestConstructorData.bs new file mode 100644 index 00000000..8fbeb798 --- /dev/null +++ b/framework/src/source/rooibos/TestConstructorData.bs @@ -0,0 +1,82 @@ +namespace rooibos + + interface TestSuiteData + name as string + isSolo as boolean + noCatch as boolean + isIgnored as boolean + pkgPath as string + destPath as string + filePath as string + lineNumber as integer + valid as boolean + hasFailures as boolean + hasSoloTests as boolean + hasIgnoredTests as boolean + hasSoloGroups as boolean + setupFunctionName as string + tearDownFunctionName as string + beforeEachFunctionName as string + afterEachFunctionName as string + isNodeTest as boolean + isAsync as boolean + asyncTimeout as integer + nodeName as string + generatedNodeName as string + testGroups as TestGroupData[] + end interface + + interface TestGroupData + name as string + isSolo as boolean + isIgnored as boolean + isAsync as boolean + asyncTimeout as integer + valid as boolean + fileName as string + lineNumber as integer + setupFunctionName as string + tearDownFunctionName as string + beforeEachFunctionName as string + afterEachFunctionName as string + testCases as TestCaseData[] + end interface + + interface TestCaseData + isSolo as boolean + noCatch as boolean + funcName as string + isIgnored as boolean + isAsync as boolean + asyncTimeout as integer + slow as integer + isParamTest as boolean + name as string + lineNumber as integer + paramLineNumber as integer + assertIndex as integer + assertLineNumberMap as roAssociativeArray + rawParams as roAssociativeArray + paramTestIndex as integer + expectedNumberOfParams as integer + isParamsValid as boolean + end interface + + + interface RuntimeConfigData + reporters as string[] + failFast as boolean + sendHomeOnFinish as boolean + logLevel as integer + showOnlyFailures as boolean + printTestTimes as boolean + lineWidth as integer + printLcov as boolean + port as dynamic + catchCrashes as boolean + throwOnFailedAssertion as boolean + keepAppOpen as boolean + isRecordingCodeCoverage as boolean + end interface + +end namespace diff --git a/framework/src/source/rooibos/TestGroup.bs b/framework/src/source/rooibos/TestGroup.bs index 6b5db433..d740c660 100644 --- a/framework/src/source/rooibos/TestGroup.bs +++ b/framework/src/source/rooibos/TestGroup.bs @@ -3,7 +3,7 @@ namespace rooibos 'test state name = "Unnamed Suite" - testSuite = invalid + testSuite as BaseTestSuite = invalid setupFunctionName = invalid tearDownFunctionName = invalid beforeEachFunctionName = invalid @@ -11,19 +11,30 @@ namespace rooibos isSolo = false isLegacy = false isIgnored = false + isAsync = false + asyncTimeout = 0 stats = invalid scene = invalid lineNumber = 00 - top = invalid + top as NodeWithRooibosFields = invalid + global as NodeWithRooibosFields = invalid valid = false hasFailures = false isNodeTest = false nodeName = invalid - testsData = invalid - tests = [] - public deferred = invalid + testsData as TestCaseData[] = invalid + tests as Test[] = [] + public deferred as roSGNode = invalid - function new(testSuite as rooibos.BaseTestSuite, data as roAssociativeArray) + private isTestFailedDueToEarlyExit = false + + currentTest as Test = invalid + protected testTimer as roTimespan = invalid + + + testRunner as TestRunner + + function new(testSuite as rooibos.BaseTestSuite, data as rooibos.TestGroupData) m.testSuite = testSuite m.name = data.name m.valid = data.valid @@ -161,17 +172,17 @@ namespace rooibos rooibos.promises.chain(test.deferred, { self: m, test: test }).then(function(_ as dynamic, context as roAssociativeArray) rooibos.common.logDebug("Promise resolved") - context.self.testSuite.done() + (context.self as rooibos.TestGroup).testSuite.done() end function).catch(function(error as dynamic, context as roAssociativeArray) rooibos.common.logDebug("Promise rejected") if rooibos.common.isAssociativeArray(error) and not error.isEmpty() and rooibos.common.isArray(error.backtrace) and not error.backtrace.isEmpty() and rooibos.common.isBoolean(error.rethrown) then - context.self.testSuite.failCrash(error) + (context.self as rooibos.TestGroup).testSuite.failCrash(error) else - context.self.testSuite.fail("Test failed due to promise rejection") + (context.self as rooibos.TestGroup).testSuite.fail("Test failed due to promise rejection") end if - context.self.testSuite.done() + (context.self as rooibos.TestGroup).testSuite.done() end function).finally(function(context as roAssociativeArray) - context.self.onAsyncTestComplete() + (context.self as rooibos.TestGroup).onAsyncTestComplete() end function) else rooibos.common.logTrace("Error running test before each function") @@ -259,6 +270,7 @@ namespace rooibos m.testSuite.currentExecutionTime += test.result.time end if + reporter as rooibos.BaseTestReporter = invalid for each reporter in m.testSuite.testReporters if rooibos.common.isFunction(reporter.onTestComplete) then reporter.onTestComplete({ test: test }) @@ -267,6 +279,7 @@ namespace rooibos end function private function notifyReportersOnTestGroupComplete() + reporter as rooibos.BaseTestReporter = invalid for each reporter in m.testSuite.testReporters if rooibos.common.isFunction(reporter.onTestGroupComplete) then reporter.onTestGroupComplete({ group: m }) diff --git a/framework/src/source/rooibos/TestResult.bs b/framework/src/source/rooibos/TestResult.bs index 06a53ac5..1c793ed3 100644 --- a/framework/src/source/rooibos/TestResult.bs +++ b/framework/src/source/rooibos/TestResult.bs @@ -9,7 +9,7 @@ namespace rooibos public expected = invalid public message = "" public lineNumber = -1 - public test = invalid + public test as rooibos.Test = invalid public time = -1 public error = invalid public throwOnFailedAssertion = false @@ -18,7 +18,7 @@ namespace rooibos m.test = test end function - function merge(other as rooibos.Test) + function merge(other as rooibos.TestResult) m.isFail = other.isFail m.isCrash = other.isCrash m.actual = other.actual diff --git a/framework/src/source/rooibos/TestRunner.bs b/framework/src/source/rooibos/TestRunner.bs index 747445aa..9fc74b38 100644 --- a/framework/src/source/rooibos/TestRunner.bs +++ b/framework/src/source/rooibos/TestRunner.bs @@ -7,18 +7,23 @@ import "pkg:/source/rooibos/Stats.bs" import "pkg:/source/rooibos/Test.bs" namespace rooibos + ' @ignore class TestRunner - public testScene = invalid - public testReporters = [] - public nodeContext = invalid - public config = invalid - public testSuites = [] - private runtimeConfig = invalid - private stats = invalid - private top = invalid - - public function new(testScene as roSGNodeRooibosScene, nodeContext as roAssociativeArray) + public testScene as rooibos.RooibosScene = invalid + public testReporters as rooibos.BaseTestReporter[] = [] + public nodeContext as rooibos.NodeContext = invalid + public config as rooibos.RuntimeConfigData = invalid + public testSuites as rooibos.BaseTestSuite[] = [] + private runtimeConfig as rooibos.RuntimeConfig = invalid + private stats as rooibos.Stats = invalid + public top as NodeWithRooibosFields = invalid + private nodeTestName = "" + private testRunner = rooibos.TestRunner + private currentTestSuite as rooibos.BaseTestSuite = invalid + public currentGroup as rooibos.TestGroup = invalid + + public function new(testScene as rooibos.RooibosScene, nodeContext as rooibos.NodeContext) m.testScene = testScene if nodeContext.top = invalid then nodeContext.top = testScene @@ -51,13 +56,13 @@ namespace rooibos failedText = "" i = 0 numSuites = suiteNames.count() - testSuite = invalid + testSuite as rooibos.BaseTestSuite = invalid for each name in suiteNames i++ suiteClass = m.runtimeConfig.getTestSuiteClassWithName(name) - testSuite = invalid + testSuite as rooibos.BaseTestSuite = invalid if suiteClass <> invalid then - testSuite = suiteClass() + testSuite = suiteClass() as rooibos.BaseTestSuite testSuite.testRunner = m testSuite.testReporters = m.testReporters testSuite.global = m.nodeContext.global @@ -105,7 +110,7 @@ namespace rooibos end if end for - rooibosResult = { + rooibosResult as rooibos.RooibosTestResultData = { stats: m.stats testSuites: m.testSuites } @@ -242,7 +247,7 @@ namespace rooibos end while nodeResults = event.getData() - m.groups = [] + groupData as rooibos.TestGroupData = invalid for each groupData in testSuite.groupsData group = new TestGroup(testSuite, groupData) testSuite.groups.push(group) @@ -278,7 +283,7 @@ namespace rooibos realGroup.tests = [] for testDataIndex = 0 to group.testsData.count() - 1 testData = group.testsData[testDataIndex] - realTest = new rooibos.Test(m, testData, testSuite) + realTest = new rooibos.Test(m as rooibos.TestGroup, testData, testSuite) realGroup.tests.push(realTest) test = group.tests[testDataIndex] realTest.result.merge(test.result) @@ -296,7 +301,7 @@ namespace rooibos testReporters = [] for each factory in m.config.reporters if rooibos.common.isFunction(factory) then - testReporters.push(factory(m)) + testReporters.push(factory(m)) 'bs:disable-line not-callable end if end for if testReporters.isEmpty() then @@ -326,7 +331,7 @@ namespace rooibos ' @ignore function runNodeTestSuite(name as string) - nodeRunner = new TestRunner(m.top.getScene(), m) + nodeRunner = new TestRunner(m.top.getScene(), m as rooibos.NodeContext) nodeRunner.runInNodeMode(name) end function @@ -334,4 +339,19 @@ namespace rooibos function onTestSuiteComplete() m.testRunner.onTestSuiteComplete() end function + + interface RooibosScene extends roSGNodeRooibosScene + rooibosTestResult as RooibosTestResultData + end interface + + interface NodeWithRooibosFields extends RooibosScene + rooibosTestResult as RooibosTestResultData + end interface + + interface RooibosTestResultData + stats as rooibos.Stats + optional testSuites as BaseTestSuite[] + optional tests as rooibos.Test[] + optional groups as rooibos.TestGroup[] + end interface end namespace diff --git a/framework/src/source/rooibos/Utils.bs b/framework/src/source/rooibos/Utils.bs index 1a42ad4d..8c471a30 100644 --- a/framework/src/source/rooibos/Utils.bs +++ b/framework/src/source/rooibos/Utils.bs @@ -1,3 +1,4 @@ +'bs:disable: LINT1006 namespace rooibos namespace utils class MockNode @@ -47,7 +48,7 @@ namespace rooibos end function function addFields(fields as object) - m.append(fields) + (m as roAssociativeArray).append(fields) end function function setField(field as string, value as dynamic) @@ -55,7 +56,7 @@ namespace rooibos end function function setFields(fields as object) - m.append(fields) + (m as roAssociativeArray).append(fields) end function function observeField(field as string, callback as string) diff --git a/package-lock.json b/package-lock.json index 05f8a02a..cb9f3f94 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,21 +1,21 @@ { "name": "rooibos-roku", - "version": "5.16.3", + "version": "6.0.0-alpha.52", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "rooibos-roku", - "version": "5.16.3", + "version": "6.0.0-alpha.52", "license": "MIT", "dependencies": { - "brighterscript": "^0.72.2", + "brighterscript": "^1.0.0-alpha.52", "fast-glob": "^3.2.12", "fs-extra": "^10.1.0", "minimatch": "^3.0.4", - "roku-debug": "^0.23.8", - "roku-deploy": "^3.17.4", - "rooibos_promises": "npm:@rokucommunity/promises@^0.5.0", + "roku-debug": "^0.23.10", + "roku-deploy": "^4.0.0-alpha.2", + "rooibos_promises": "npm:@rokucommunity/promises@^0.7.0", "source-map": "^0.7.3", "undent": "^1.0.1", "vscode-languageserver": "~6.1.1", @@ -26,7 +26,7 @@ "rooibos": "dist/cli.js" }, "devDependencies": { - "@rokucommunity/bslint": "^0.8.43", + "@rokucommunity/bslint": "^1.0.0-alpha.52", "@types/chai": "^4.1.2", "@types/events": "^3.0.0", "@types/fs-extra": "^5.0.1", @@ -48,7 +48,7 @@ "jsdoc": "^4.0.5", "mocha": "^10.8.2", "nyc": "^15.1.0", - "ropm": "^0.11.7", + "ropm": "^0.11.8", "source-map-support": "^0.5.13", "ts-node": "^10.7.0", "typescript": "^4.7.2" @@ -721,21 +721,21 @@ "integrity": "sha512-2ox6EUL+UTtccTbD4dbVjZK3QHa0PHCqpoKMF8lZz9ayzzEP3iVPF8KZR6hOi6bxsIcbGXVjqmtCVkpC4P9SrA==" }, "node_modules/@rokucommunity/bslint": { - "version": "0.8.43", - "resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.8.43.tgz", - "integrity": "sha512-B0XB+IPHr26Lci6Wn5iHSdOLTxnSNQKpWvGAM8NovMOPIVXoy/1UPicPu2Lvy6qkbtZQS0ZWZdGicCMubR+pjg==", + "version": "1.0.0-alpha.52", + "resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-1.0.0-alpha.52.tgz", + "integrity": "sha512-rC5RaflZjhoiIIUczMebT853oPc1BsYQp6jv65miuOmEvPmYNDSzDGqiK+b5u7Xkyzxlh87UnxepyLUI0ZCKCA==", "dev": true, "dependencies": { + "brighterscript": "^1.0.0-alpha.52", + "coveralls-next": "^6.0.1", "fs-extra": "^10.0.0", "jsonc-parser": "^2.3.0", "minimatch": "^3.0.4", + "vscode-languageserver-types": "^3.17.3", "yargs": "^15.4.1" }, "bin": { "bslint": "dist/cli.js" - }, - "peerDependencies": { - "brighterscript": ">= 0.59.0 < 1" } }, "node_modules/@rokucommunity/bslint/node_modules/ansi-styles": { @@ -1687,6 +1687,7 @@ "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "license": "MIT", "dependencies": { "safer-buffer": "~2.1.0" } @@ -1695,6 +1696,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "license": "MIT", "engines": { "node": ">=0.8" } @@ -1852,6 +1854,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "license": "BSD-3-Clause", "dependencies": { "tweetnacl": "^0.14.3" } @@ -1890,9 +1893,9 @@ } }, "node_modules/brighterscript": { - "version": "0.72.2", - "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.72.2.tgz", - "integrity": "sha512-hCAVU+VHjYrbR+zO+vVutBpkSRujjkYr4ra82GYmFKRArGiJfKdMgOh/gJGF3R1vUDUHUmLoEzuKI08w+hqBnQ==", + "version": "1.0.0-alpha.52", + "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-1.0.0-alpha.52.tgz", + "integrity": "sha512-LpO9G6xpu8++8199doYTkOIZQ0EnGEjMx+RS7bcKGJ2IfNa0O1QXIWCK8S0GH0lxg38jFLf9dNIRlFJCafNucA==", "dependencies": { "@rokucommunity/bslib": "^0.1.1", "@rokucommunity/logger": "^0.3.12", @@ -1902,6 +1905,7 @@ "chevrotain": "^7.0.1", "chokidar": "^3.6.0", "clear": "^0.1.0", + "coveralls-next": "^6.0.1", "cross-platform-clear-console": "^2.3.0", "debounce-promise": "^3.1.0", "eventemitter3": "^4.0.0", @@ -1920,12 +1924,13 @@ "parse-ms": "^2.1.0", "readline": "^1.3.0", "require-relative": "^0.8.7", - "roku-deploy": "^3.17.4", + "roku-deploy": "^3.17.5", "safe-json-stringify": "^1.2.0", "semver": "^7.7.3", "serialize-error": "^7.0.1", "source-map": "^0.7.4", "thenby": "^1.3.4", + "uuid": "^9.0.0", "vscode-languageserver": "^9.0.1", "vscode-languageserver-protocol": "^3.17.5", "vscode-languageserver-textdocument": "^1.0.11", @@ -1936,7 +1941,7 @@ }, "bin": { "bsc": "dist/cli.js", - "bsc0": "dist/cli.js" + "bsc1": "dist/cli.js" } }, "node_modules/brighterscript-jsdocs-plugin": { @@ -1994,6 +1999,16 @@ "bsc": "dist/cli.js" } }, + "node_modules/brighterscript-jsdocs-plugin/node_modules/dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/brighterscript-jsdocs-plugin/node_modules/fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -2019,6 +2034,50 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/brighterscript-jsdocs-plugin/node_modules/roku-deploy": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.17.4.tgz", + "integrity": "sha512-tsy2TtibcFck/tnTgu2fMci/TAGYN1x6SJ0ACF+tWEB6jOIfkDQ2KGSZkXEHknmHhUQr1tQyVzhGlsCIK0WbuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/request": "^2.48.13", + "chalk": "^2.4.2", + "dateformat": "^3.0.3", + "dayjs": "^1.11.0", + "fast-glob": "^3.2.12", + "fs-extra": "^7.0.1", + "is-glob": "^4.0.3", + "jsonc-parser": "^2.3.0", + "jszip": "^3.6.0", + "lodash": "^4.17.21", + "micromatch": "^4.0.4", + "moment": "^2.29.1", + "parse-ms": "^2.1.0", + "postman-request": "^2.88.1-postman.48", + "semver": "^7.7.3", + "temp-dir": "^2.0.0", + "xml2js": "^0.5.0" + }, + "bin": { + "roku-deploy": "dist/cli.js" + } + }, + "node_modules/brighterscript-jsdocs-plugin/node_modules/roku-deploy/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, "node_modules/brighterscript-jsdocs-plugin/node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -2042,10 +2101,20 @@ "installServerIntoExtension": "bin/installServerIntoExtension" } }, + "node_modules/brighterscript/node_modules/dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/brighterscript/node_modules/fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^4.0.0", @@ -2059,25 +2128,58 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "license": "MIT", "optionalDependencies": { "graceful-fs": "^4.1.6" } }, - "node_modules/brighterscript/node_modules/semver": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", - "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "node_modules/brighterscript/node_modules/roku-deploy": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.17.5.tgz", + "integrity": "sha512-cJo2Mf09My00aSUkYxaYCWajeWowcKfv49Rp1HBjdXJY1Xq385+Q3Txcr1H9bF2a9GnzSQI042JjmFdlRuiuQA==", + "license": "MIT", + "dependencies": { + "@types/request": "^2.48.13", + "chalk": "^2.4.2", + "dateformat": "^3.0.3", + "dayjs": "^1.11.0", + "fast-glob": "^3.2.12", + "fs-extra": "^7.0.1", + "is-glob": "^4.0.3", + "jsonc-parser": "^2.3.0", + "jszip": "^3.6.0", + "lodash": "^4.17.21", + "micromatch": "^4.0.4", + "moment": "^2.29.1", + "parse-ms": "^2.1.0", + "postman-request": "^2.88.1-postman.48", + "semver": "^7.7.3", + "temp-dir": "^2.0.0", + "xml2js": "^0.5.0" + }, "bin": { - "semver": "bin/semver.js" + "roku-deploy": "dist/cli.js" + } + }, + "node_modules/brighterscript/node_modules/roku-deploy/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" }, "engines": { - "node": ">=10" + "node": ">=6 <7 || >=8" } }, "node_modules/brighterscript/node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "license": "MIT", "engines": { "node": ">= 4.0.0" } @@ -2086,6 +2188,7 @@ "version": "9.0.1", "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", + "license": "MIT", "dependencies": { "vscode-languageserver-protocol": "3.17.5" }, @@ -2406,6 +2509,40 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "node_modules/coveralls-next": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/coveralls-next/-/coveralls-next-6.0.1.tgz", + "integrity": "sha512-G0xhUJE9M3OCKf8Xn/cGWrIh4xJI1w7MgJx30HpUfJf6yxyFS1SVGgXtFKmPGb5qEEh4H6oTUk0JQRVjq0ZgDQ==", + "license": "BSD-2-Clause", + "dependencies": { + "js-yaml": "4.1.1", + "lcov-parse": "1.0.0" + }, + "bin": { + "coveralls": "bin/coveralls.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/coveralls-next/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" + }, + "node_modules/coveralls-next/node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -2435,6 +2572,7 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" }, @@ -2733,6 +2871,7 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "license": "MIT", "dependencies": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -3464,7 +3603,8 @@ "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "engines": [ "node >=0.6.0" - ] + ], + "license": "MIT" }, "node_modules/fast-deep-equal": { "version": "3.1.3", @@ -3880,6 +4020,7 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" } @@ -4223,6 +4364,20 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "node_modules/http-signature": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.4.0.tgz", + "integrity": "sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg==", + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^2.0.2", + "sshpk": "^1.18.0" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/ignore": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", @@ -4826,6 +4981,12 @@ "xmlcreate": "^2.0.4" } }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "license": "MIT" + }, "node_modules/jsdoc": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.5.tgz", @@ -4889,7 +5050,8 @@ "node_modules/json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "license": "(AFL-2.1 OR BSD-3-Clause)" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -4957,6 +5119,21 @@ "node": ">=10" } }, + "node_modules/jsprim": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", + "engines": [ + "node >=0.6.0" + ], + "license": "MIT", + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, "node_modules/jszip": { "version": "3.10.1", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", @@ -4997,6 +5174,15 @@ "integrity": "sha512-SHzxgdcFP/64lUEfX3183QALY2KdSQxad3gmhCc/b03QN1mbx0AnJWvsQjqoJLbucY9pJuK+NMbnasUIocDmnQ==", "dev": true }, + "node_modules/lcov-parse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", + "integrity": "sha512-aprLII/vPzuQvYZnDRU78Fns9I2Ag3gi4Ipga/hxnVMCZC8DnR2nI7XBqrPoywGfxqIx/DgarGvDJZAD3YBTgQ==", + "license": "BSD-3-Clause", + "bin": { + "lcov-parse": "bin/cli.js" + } + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -6131,6 +6317,47 @@ "node": ">= 0.4" } }, + "node_modules/postman-request": { + "version": "2.88.1-postman.48", + "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.48.tgz", + "integrity": "sha512-E32FGh8ig2KDvzo4Byi7Ibr+wK2gNKPSqXoNsvjdCHgDBxSK4sCUwv+aa3zOBUwfiibPImHMy0WdlDSSCTqTuw==", + "license": "Apache-2.0", + "dependencies": { + "@postman/form-data": "~3.1.1", + "@postman/tough-cookie": "~4.1.3-postman.1", + "@postman/tunnel-agent": "^0.6.8", + "aws-sign2": "~0.7.0", + "aws4": "^1.12.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "http-signature": "~1.4.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "^2.1.35", + "oauth-sign": "~0.9.0", + "qs": "~6.14.1", + "safe-buffer": "^5.1.2", + "socks-proxy-agent": "^8.0.5", + "stream-length": "^1.0.2", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">= 16" + } + }, + "node_modules/postman-request/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "deprecated": "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -6197,6 +6424,21 @@ "teleport": ">=0.2.0" } }, + "node_modules/qs": { + "version": "6.14.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz", + "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", @@ -6517,15 +6759,15 @@ } }, "node_modules/roku-debug": { - "version": "0.23.8", - "resolved": "https://registry.npmjs.org/roku-debug/-/roku-debug-0.23.8.tgz", - "integrity": "sha512-XiTT6a8yCbU+aTMuuVMdhbj+OTQLJ/dxfyxavLQTrFfiDTU75KwQRJ9DA6juf7VS1PARdPFljhEhzGfBDFhJ+g==", + "version": "0.23.10", + "resolved": "https://registry.npmjs.org/roku-debug/-/roku-debug-0.23.10.tgz", + "integrity": "sha512-Sb4uc4KpW3GX5c1jQtKoJj8U9MMoxiadndHr2nq/h8vAl32ABrfvz4jO41xQmWJ6vyMyXp/v3VQckaRb8QYkEg==", "dependencies": { "@rokucommunity/logger": "^0.3.12", "@types/request": "^2.48.8", "@vscode/debugadapter": "^1.68.0", "@vscode/debugprotocol": "^1.68.0", - "brighterscript": "^0.72.2", + "brighterscript": "^0.72.3", "dateformat": "^4.6.3", "debounce": "^1.2.1", "eol": "^0.9.1", @@ -6553,79 +6795,137 @@ "roku-debug": "dist/cli.js" } }, - "node_modules/roku-debug/node_modules/http-signature": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.4.0.tgz", - "integrity": "sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg==", - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^2.0.2", - "sshpk": "^1.18.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/roku-debug/node_modules/jsprim": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", - "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", - "engines": [ - "node >=0.6.0" - ], - "license": "MIT", + "node_modules/roku-debug/node_modules/brighterscript": { + "version": "0.72.3", + "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.72.3.tgz", + "integrity": "sha512-G68vTH78+fcijh9wgWPZXdkGNgP4vX+vZtnCj1zUk4GEPS8AMZQGlWEEYRo0bCSWp1W2k/o/+nPWIoc1HlxuNA==", "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - } - }, - "node_modules/roku-debug/node_modules/postman-request": { - "version": "2.88.1-postman.48", - "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.48.tgz", - "integrity": "sha512-E32FGh8ig2KDvzo4Byi7Ibr+wK2gNKPSqXoNsvjdCHgDBxSK4sCUwv+aa3zOBUwfiibPImHMy0WdlDSSCTqTuw==", - "license": "Apache-2.0", + "@rokucommunity/bslib": "^0.1.1", + "@rokucommunity/logger": "^0.3.12", + "@xml-tools/parser": "^1.0.7", + "array-flat-polyfill": "^1.0.1", + "chalk": "^2.4.2", + "chevrotain": "^7.0.1", + "chokidar": "^3.6.0", + "clear": "^0.1.0", + "cross-platform-clear-console": "^2.3.0", + "debounce-promise": "^3.1.0", + "eventemitter3": "^4.0.0", + "fast-glob": "^3.2.12", + "file-url": "^3.0.0", + "fs-extra": "^8.1.0", + "ignore": "^5.3.1", + "jsonc-parser": "^2.3.0", + "lodash.isequal": "^4.5.0", + "long": "^3.2.0", + "luxon": "^2.5.2", + "micromatch": "^4.0.4", + "minimatch": "^3.0.4", + "moment": "^2.23.0", + "p-settle": "^2.1.0", + "parse-ms": "^2.1.0", + "readline": "^1.3.0", + "require-relative": "^0.8.7", + "roku-deploy": "^3.17.4", + "safe-json-stringify": "^1.2.0", + "semver": "^7.7.3", + "serialize-error": "^7.0.1", + "source-map": "^0.7.4", + "thenby": "^1.3.4", + "vscode-languageserver": "^9.0.1", + "vscode-languageserver-protocol": "^3.17.5", + "vscode-languageserver-textdocument": "^1.0.11", + "vscode-languageserver-types": "^3.17.5", + "vscode-uri": "^3.0.8", + "xml2js": "^0.5.0", + "yargs": "^16.2.0" + }, + "bin": { + "bsc": "dist/cli.js", + "bsc0": "dist/cli.js" + } + }, + "node_modules/roku-debug/node_modules/brighterscript/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "dependencies": { - "@postman/form-data": "~3.1.1", - "@postman/tough-cookie": "~4.1.3-postman.1", - "@postman/tunnel-agent": "^0.6.8", - "aws-sign2": "~0.7.0", - "aws4": "^1.12.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "http-signature": "~1.4.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "^2.1.35", - "oauth-sign": "~0.9.0", - "qs": "~6.14.1", - "safe-buffer": "^5.1.2", - "socks-proxy-agent": "^8.0.5", - "stream-length": "^1.0.2", - "uuid": "^8.3.2" + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" }, "engines": { - "node": ">= 16" + "node": ">=6 <7 || >=8" } }, - "node_modules/roku-debug/node_modules/qs": { - "version": "6.14.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz", - "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==", - "license": "BSD-3-Clause", + "node_modules/roku-debug/node_modules/brighterscript/node_modules/serialize-error": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz", + "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==", "dependencies": { - "side-channel": "^1.1.0" + "type-fest": "^0.13.1" }, "engines": { - "node": ">=0.6" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/roku-debug/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/roku-debug/node_modules/roku-deploy": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.17.4.tgz", + "integrity": "sha512-tsy2TtibcFck/tnTgu2fMci/TAGYN1x6SJ0ACF+tWEB6jOIfkDQ2KGSZkXEHknmHhUQr1tQyVzhGlsCIK0WbuQ==", + "dependencies": { + "@types/request": "^2.48.13", + "chalk": "^2.4.2", + "dateformat": "^3.0.3", + "dayjs": "^1.11.0", + "fast-glob": "^3.2.12", + "fs-extra": "^7.0.1", + "is-glob": "^4.0.3", + "jsonc-parser": "^2.3.0", + "jszip": "^3.6.0", + "lodash": "^4.17.21", + "micromatch": "^4.0.4", + "moment": "^2.29.1", + "parse-ms": "^2.1.0", + "postman-request": "^2.88.1-postman.48", + "semver": "^7.7.3", + "temp-dir": "^2.0.0", + "xml2js": "^0.5.0" + }, + "bin": { + "roku-deploy": "dist/cli.js" + } + }, + "node_modules/roku-debug/node_modules/roku-deploy/node_modules/dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "engines": { + "node": "*" + } + }, + "node_modules/roku-debug/node_modules/roku-deploy/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" } }, "node_modules/roku-debug/node_modules/serialize-error": { @@ -6653,22 +6953,33 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/roku-debug/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "deprecated": "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).", - "license": "MIT", + "node_modules/roku-debug/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/roku-debug/node_modules/vscode-languageserver": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", + "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", + "dependencies": { + "vscode-languageserver-protocol": "3.17.5" + }, "bin": { - "uuid": "dist/bin/uuid" + "installServerIntoExtension": "bin/installServerIntoExtension" } }, "node_modules/roku-deploy": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.17.4.tgz", - "integrity": "sha512-tsy2TtibcFck/tnTgu2fMci/TAGYN1x6SJ0ACF+tWEB6jOIfkDQ2KGSZkXEHknmHhUQr1tQyVzhGlsCIK0WbuQ==", + "version": "4.0.0-alpha.2", + "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-4.0.0-alpha.2.tgz", + "integrity": "sha512-dJ+iBUyUJcWnXHikb5NaDmQ4mqbW8SrD0HXG+li595EKEVJtGfteAevZDXgFg/ES+cv8ao3Y4pIDgokjmMcCHg==", + "license": "MIT", "dependencies": { - "@types/request": "^2.48.13", + "@rokucommunity/logger": "^0.3.10", + "@types/request": "^2.47.0", "chalk": "^2.4.2", "dateformat": "^3.0.3", "dayjs": "^1.11.0", @@ -6676,7 +6987,7 @@ "fs-extra": "^7.0.1", "is-glob": "^4.0.3", "jsonc-parser": "^2.3.0", - "jszip": "^3.6.0", + "jszip": "^3.10.1", "lodash": "^4.17.21", "micromatch": "^4.0.4", "moment": "^2.29.1", @@ -6684,12 +6995,27 @@ "postman-request": "^2.88.1-postman.48", "semver": "^7.7.3", "temp-dir": "^2.0.0", - "xml2js": "^0.5.0" + "xml2js": "^0.5.0", + "yargs": "^17.7.2" }, "bin": { "roku-deploy": "dist/cli.js" } }, + "node_modules/roku-deploy/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/roku-deploy/node_modules/dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", @@ -6711,20 +7037,6 @@ "node": ">=6 <7 || >=8" } }, - "node_modules/roku-deploy/node_modules/http-signature": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.4.0.tgz", - "integrity": "sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg==", - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^2.0.2", - "sshpk": "^1.18.0" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/roku-deploy/node_modules/jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -6733,78 +7045,6 @@ "graceful-fs": "^4.1.6" } }, - "node_modules/roku-deploy/node_modules/jsprim": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", - "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", - "engines": [ - "node >=0.6.0" - ], - "license": "MIT", - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - } - }, - "node_modules/roku-deploy/node_modules/postman-request": { - "version": "2.88.1-postman.48", - "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.48.tgz", - "integrity": "sha512-E32FGh8ig2KDvzo4Byi7Ibr+wK2gNKPSqXoNsvjdCHgDBxSK4sCUwv+aa3zOBUwfiibPImHMy0WdlDSSCTqTuw==", - "license": "Apache-2.0", - "dependencies": { - "@postman/form-data": "~3.1.1", - "@postman/tough-cookie": "~4.1.3-postman.1", - "@postman/tunnel-agent": "^0.6.8", - "aws-sign2": "~0.7.0", - "aws4": "^1.12.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "http-signature": "~1.4.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "^2.1.35", - "oauth-sign": "~0.9.0", - "qs": "~6.14.1", - "safe-buffer": "^5.1.2", - "socks-proxy-agent": "^8.0.5", - "stream-length": "^1.0.2", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">= 16" - } - }, - "node_modules/roku-deploy/node_modules/qs": { - "version": "6.14.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz", - "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/roku-deploy/node_modules/semver": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", - "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/roku-deploy/node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -6813,37 +7053,55 @@ "node": ">= 4.0.0" } }, - "node_modules/roku-deploy/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "deprecated": "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).", + "node_modules/roku-deploy/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/roku-deploy/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", + "engines": { + "node": ">=12" } }, "node_modules/rooibos_promises": { "name": "@rokucommunity/promises", - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@rokucommunity/promises/-/promises-0.5.0.tgz", - "integrity": "sha512-Xl/8z4+WMeSHCG418Y9O49r/PQphwJ7efVmqlLoOvEg3EQ3ET//VHDQJa0YucuuTQurHfrLjXDj4foluhdHRSg==" + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@rokucommunity/promises/-/promises-0.7.0.tgz", + "integrity": "sha512-WhSHwqD/1H5e6abhcZMRw5FQcivI5mEqvEB6PPyWukIeCeuxUSu0LS1yR6XvNRwYRTaTbgh8DcEjlBmMsilD4Q==", + "license": "MIT" }, "node_modules/ropm": { - "version": "0.11.7", - "resolved": "https://registry.npmjs.org/ropm/-/ropm-0.11.7.tgz", - "integrity": "sha512-J+gazn70Dj87Jr4sqwmclwCA+baQSr7VstZL+ypDBl6IIOcpZEF8Ejtdc2XmuyUsDXbbQnlWUUl8rnqEkgmWow==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/ropm/-/ropm-0.11.8.tgz", + "integrity": "sha512-nv5ut+oG4ZweBHLtJJ8r7K9FtgqTVwlpHBXffq7SvTgKxrtgO13f2zGVCpll2bROsV4hJLCGLtNGdtFmlMa8Nw==", "dev": true, "dependencies": { "@rokucommunity/logger": "^0.3.12", "@xml-tools/parser": "1.0.10", - "brighterscript": "^0.72.2", + "brighterscript": "^0.72.4", "del": "6.0.0", "fs-extra": "9.1.0", "glob-all": "3.2.1", "latinize": "0.5.0", "npm-packlist": "2.1.4", - "roku-deploy": "^3.17.4", + "roku-deploy": "^3.17.5", "semver": "^7.6.3", "yargs": "16.2.0" }, @@ -6859,11 +7117,102 @@ "resolved": "https://registry.npmjs.org/@xml-tools/parser/-/parser-1.0.10.tgz", "integrity": "sha512-9oRb68wEKT+MRB7e2GwTiKicRKVXKzquBDGgH6YcGafvnSYXorWi2oaTVtbv2109RlGiQSnoXaQFUXCnHwFS7Q==", "dev": true, - "license": "Apache-2.0", "dependencies": { "chevrotain": "7.1.1" } }, + "node_modules/ropm/node_modules/brighterscript": { + "version": "0.72.4", + "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.72.4.tgz", + "integrity": "sha512-WFim0n9pUgFZorZ81eIy2jF09XsFNxlLtllXYkH7d36Pq/3AH6M31YfIHkKSDltnXwrnCCjGXa+m0Jw3NnQIeQ==", + "dev": true, + "dependencies": { + "@rokucommunity/bslib": "^0.1.1", + "@rokucommunity/logger": "^0.3.12", + "@xml-tools/parser": "^1.0.7", + "array-flat-polyfill": "^1.0.1", + "chalk": "^2.4.2", + "chevrotain": "^7.0.1", + "chokidar": "^3.6.0", + "clear": "^0.1.0", + "cross-platform-clear-console": "^2.3.0", + "debounce-promise": "^3.1.0", + "eventemitter3": "^4.0.0", + "fast-glob": "^3.2.12", + "file-url": "^3.0.0", + "fs-extra": "^8.1.0", + "ignore": "^5.3.1", + "jsonc-parser": "^2.3.0", + "lodash.isequal": "^4.5.0", + "long": "^3.2.0", + "luxon": "^2.5.2", + "micromatch": "^4.0.4", + "minimatch": "^3.0.4", + "moment": "^2.23.0", + "p-settle": "^2.1.0", + "parse-ms": "^2.1.0", + "readline": "^1.3.0", + "require-relative": "^0.8.7", + "roku-deploy": "^3.17.5", + "safe-json-stringify": "^1.2.0", + "semver": "^7.7.3", + "serialize-error": "^7.0.1", + "source-map": "^0.7.4", + "thenby": "^1.3.4", + "vscode-languageserver": "^9.0.1", + "vscode-languageserver-protocol": "^3.17.5", + "vscode-languageserver-textdocument": "^1.0.11", + "vscode-languageserver-types": "^3.17.5", + "vscode-uri": "^3.0.8", + "xml2js": "^0.5.0", + "yargs": "^16.2.0" + }, + "bin": { + "bsc": "dist/cli.js", + "bsc0": "dist/cli.js" + } + }, + "node_modules/ropm/node_modules/brighterscript/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/ropm/node_modules/brighterscript/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/ropm/node_modules/brighterscript/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/ropm/node_modules/dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/ropm/node_modules/fs-extra": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", @@ -6879,6 +7228,78 @@ "node": ">=10" } }, + "node_modules/ropm/node_modules/roku-deploy": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.17.5.tgz", + "integrity": "sha512-cJo2Mf09My00aSUkYxaYCWajeWowcKfv49Rp1HBjdXJY1Xq385+Q3Txcr1H9bF2a9GnzSQI042JjmFdlRuiuQA==", + "dev": true, + "dependencies": { + "@types/request": "^2.48.13", + "chalk": "^2.4.2", + "dateformat": "^3.0.3", + "dayjs": "^1.11.0", + "fast-glob": "^3.2.12", + "fs-extra": "^7.0.1", + "is-glob": "^4.0.3", + "jsonc-parser": "^2.3.0", + "jszip": "^3.6.0", + "lodash": "^4.17.21", + "micromatch": "^4.0.4", + "moment": "^2.29.1", + "parse-ms": "^2.1.0", + "postman-request": "^2.88.1-postman.48", + "semver": "^7.7.3", + "temp-dir": "^2.0.0", + "xml2js": "^0.5.0" + }, + "bin": { + "roku-deploy": "dist/cli.js" + } + }, + "node_modules/ropm/node_modules/roku-deploy/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/ropm/node_modules/roku-deploy/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/ropm/node_modules/roku-deploy/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/ropm/node_modules/vscode-languageserver": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", + "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", + "dev": true, + "dependencies": { + "vscode-languageserver-protocol": "3.17.5" + }, + "bin": { + "installServerIntoExtension": "bin/installServerIntoExtension" + } + }, "node_modules/run-parallel": { "version": "1.1.9", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", @@ -6938,7 +7359,8 @@ "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" }, "node_modules/sax": { "version": "1.2.4", @@ -6946,9 +7368,10 @@ "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz", + "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==", + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -7257,6 +7680,7 @@ "version": "1.18.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", + "license": "MIT", "dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -7277,11 +7701,6 @@ "node": ">=0.10.0" } }, - "node_modules/sshpk/node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" - }, "node_modules/stream": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/stream/-/stream-0.0.2.tgz", @@ -7637,7 +8056,8 @@ "node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "license": "Unlicense" }, "node_modules/type-check": { "version": "0.4.0", @@ -7832,6 +8252,20 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "deprecated": "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", @@ -7851,6 +8285,7 @@ "engines": [ "node >=0.6.0" ], + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -8732,14 +9167,17 @@ "integrity": "sha512-2ox6EUL+UTtccTbD4dbVjZK3QHa0PHCqpoKMF8lZz9ayzzEP3iVPF8KZR6hOi6bxsIcbGXVjqmtCVkpC4P9SrA==" }, "@rokucommunity/bslint": { - "version": "0.8.43", - "resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.8.43.tgz", - "integrity": "sha512-B0XB+IPHr26Lci6Wn5iHSdOLTxnSNQKpWvGAM8NovMOPIVXoy/1UPicPu2Lvy6qkbtZQS0ZWZdGicCMubR+pjg==", + "version": "1.0.0-alpha.52", + "resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-1.0.0-alpha.52.tgz", + "integrity": "sha512-rC5RaflZjhoiIIUczMebT853oPc1BsYQp6jv65miuOmEvPmYNDSzDGqiK+b5u7Xkyzxlh87UnxepyLUI0ZCKCA==", "dev": true, "requires": { + "brighterscript": "^1.0.0-alpha.52", + "coveralls-next": "^6.0.1", "fs-extra": "^10.0.0", "jsonc-parser": "^2.3.0", "minimatch": "^3.0.4", + "vscode-languageserver-types": "^3.17.3", "yargs": "^15.4.1" }, "dependencies": { @@ -9577,9 +10015,9 @@ } }, "brighterscript": { - "version": "0.72.2", - "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.72.2.tgz", - "integrity": "sha512-hCAVU+VHjYrbR+zO+vVutBpkSRujjkYr4ra82GYmFKRArGiJfKdMgOh/gJGF3R1vUDUHUmLoEzuKI08w+hqBnQ==", + "version": "1.0.0-alpha.52", + "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-1.0.0-alpha.52.tgz", + "integrity": "sha512-LpO9G6xpu8++8199doYTkOIZQ0EnGEjMx+RS7bcKGJ2IfNa0O1QXIWCK8S0GH0lxg38jFLf9dNIRlFJCafNucA==", "requires": { "@rokucommunity/bslib": "^0.1.1", "@rokucommunity/logger": "^0.3.12", @@ -9589,6 +10027,7 @@ "chevrotain": "^7.0.1", "chokidar": "^3.6.0", "clear": "^0.1.0", + "coveralls-next": "^6.0.1", "cross-platform-clear-console": "^2.3.0", "debounce-promise": "^3.1.0", "eventemitter3": "^4.0.0", @@ -9607,12 +10046,13 @@ "parse-ms": "^2.1.0", "readline": "^1.3.0", "require-relative": "^0.8.7", - "roku-deploy": "^3.17.4", + "roku-deploy": "^3.17.5", "safe-json-stringify": "^1.2.0", "semver": "^7.7.3", "serialize-error": "^7.0.1", "source-map": "^0.7.4", "thenby": "^1.3.4", + "uuid": "^9.0.0", "vscode-languageserver": "^9.0.1", "vscode-languageserver-protocol": "^3.17.5", "vscode-languageserver-textdocument": "^1.0.11", @@ -9622,6 +10062,11 @@ "yargs": "^16.2.0" }, "dependencies": { + "dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==" + }, "fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -9640,10 +10085,41 @@ "graceful-fs": "^4.1.6" } }, - "semver": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", - "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==" + "roku-deploy": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.17.5.tgz", + "integrity": "sha512-cJo2Mf09My00aSUkYxaYCWajeWowcKfv49Rp1HBjdXJY1Xq385+Q3Txcr1H9bF2a9GnzSQI042JjmFdlRuiuQA==", + "requires": { + "@types/request": "^2.48.13", + "chalk": "^2.4.2", + "dateformat": "^3.0.3", + "dayjs": "^1.11.0", + "fast-glob": "^3.2.12", + "fs-extra": "^7.0.1", + "is-glob": "^4.0.3", + "jsonc-parser": "^2.3.0", + "jszip": "^3.6.0", + "lodash": "^4.17.21", + "micromatch": "^4.0.4", + "moment": "^2.29.1", + "parse-ms": "^2.1.0", + "postman-request": "^2.88.1-postman.48", + "semver": "^7.7.3", + "temp-dir": "^2.0.0", + "xml2js": "^0.5.0" + }, + "dependencies": { + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + } + } }, "universalify": { "version": "0.1.2", @@ -9711,6 +10187,12 @@ "yargs": "^16.2.0" } }, + "dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "dev": true + }, "fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -9731,6 +10213,44 @@ "graceful-fs": "^4.1.6" } }, + "roku-deploy": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.17.4.tgz", + "integrity": "sha512-tsy2TtibcFck/tnTgu2fMci/TAGYN1x6SJ0ACF+tWEB6jOIfkDQ2KGSZkXEHknmHhUQr1tQyVzhGlsCIK0WbuQ==", + "dev": true, + "requires": { + "@types/request": "^2.48.13", + "chalk": "^2.4.2", + "dateformat": "^3.0.3", + "dayjs": "^1.11.0", + "fast-glob": "^3.2.12", + "fs-extra": "^7.0.1", + "is-glob": "^4.0.3", + "jsonc-parser": "^2.3.0", + "jszip": "^3.6.0", + "lodash": "^4.17.21", + "micromatch": "^4.0.4", + "moment": "^2.29.1", + "parse-ms": "^2.1.0", + "postman-request": "^2.88.1-postman.48", + "semver": "^7.7.3", + "temp-dir": "^2.0.0", + "xml2js": "^0.5.0" + }, + "dependencies": { + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + } + } + }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -9980,6 +10500,30 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "coveralls-next": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/coveralls-next/-/coveralls-next-6.0.1.tgz", + "integrity": "sha512-G0xhUJE9M3OCKf8Xn/cGWrIh4xJI1w7MgJx30HpUfJf6yxyFS1SVGgXtFKmPGb5qEEh4H6oTUk0JQRVjq0ZgDQ==", + "requires": { + "js-yaml": "4.1.1", + "lcov-parse": "1.0.0" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "requires": { + "argparse": "^2.0.1" + } + } + } + }, "create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -11326,6 +11870,16 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "http-signature": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.4.0.tgz", + "integrity": "sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg==", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^2.0.2", + "sshpk": "^1.18.0" + } + }, "ignore": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", @@ -11756,6 +12310,11 @@ "xmlcreate": "^2.0.4" } }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" + }, "jsdoc": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.5.tgz", @@ -11851,6 +12410,17 @@ "through2": "^4.0.2" } }, + "jsprim": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, "jszip": { "version": "3.10.1", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", @@ -11893,6 +12463,11 @@ "integrity": "sha512-SHzxgdcFP/64lUEfX3183QALY2KdSQxad3gmhCc/b03QN1mbx0AnJWvsQjqoJLbucY9pJuK+NMbnasUIocDmnQ==", "dev": true }, + "lcov-parse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", + "integrity": "sha512-aprLII/vPzuQvYZnDRU78Fns9I2Ag3gi4Ipga/hxnVMCZC8DnR2nI7XBqrPoywGfxqIx/DgarGvDJZAD3YBTgQ==" + }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -12731,6 +13306,40 @@ "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", "dev": true }, + "postman-request": { + "version": "2.88.1-postman.48", + "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.48.tgz", + "integrity": "sha512-E32FGh8ig2KDvzo4Byi7Ibr+wK2gNKPSqXoNsvjdCHgDBxSK4sCUwv+aa3zOBUwfiibPImHMy0WdlDSSCTqTuw==", + "requires": { + "@postman/form-data": "~3.1.1", + "@postman/tough-cookie": "~4.1.3-postman.1", + "@postman/tunnel-agent": "^0.6.8", + "aws-sign2": "~0.7.0", + "aws4": "^1.12.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "http-signature": "~1.4.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "^2.1.35", + "oauth-sign": "~0.9.0", + "qs": "~6.14.1", + "safe-buffer": "^5.1.2", + "socks-proxy-agent": "^8.0.5", + "stream-length": "^1.0.2", + "uuid": "^8.3.2" + }, + "dependencies": { + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + } + } + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -12775,6 +13384,14 @@ "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==" }, + "qs": { + "version": "6.14.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz", + "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==", + "requires": { + "side-channel": "^1.1.0" + } + }, "querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", @@ -13004,15 +13621,15 @@ } }, "roku-debug": { - "version": "0.23.8", - "resolved": "https://registry.npmjs.org/roku-debug/-/roku-debug-0.23.8.tgz", - "integrity": "sha512-XiTT6a8yCbU+aTMuuVMdhbj+OTQLJ/dxfyxavLQTrFfiDTU75KwQRJ9DA6juf7VS1PARdPFljhEhzGfBDFhJ+g==", + "version": "0.23.10", + "resolved": "https://registry.npmjs.org/roku-debug/-/roku-debug-0.23.10.tgz", + "integrity": "sha512-Sb4uc4KpW3GX5c1jQtKoJj8U9MMoxiadndHr2nq/h8vAl32ABrfvz4jO41xQmWJ6vyMyXp/v3VQckaRb8QYkEg==", "requires": { "@rokucommunity/logger": "^0.3.12", "@types/request": "^2.48.8", "@vscode/debugadapter": "^1.68.0", "@vscode/debugprotocol": "^1.68.0", - "brighterscript": "^0.72.2", + "brighterscript": "^0.72.3", "dateformat": "^4.6.3", "debounce": "^1.2.1", "eol": "^0.9.1", @@ -13037,60 +13654,119 @@ "yargs": "^16.2.0" }, "dependencies": { - "http-signature": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.4.0.tgz", - "integrity": "sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg==", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^2.0.2", - "sshpk": "^1.18.0" - } - }, - "jsprim": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", - "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", + "brighterscript": { + "version": "0.72.3", + "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.72.3.tgz", + "integrity": "sha512-G68vTH78+fcijh9wgWPZXdkGNgP4vX+vZtnCj1zUk4GEPS8AMZQGlWEEYRo0bCSWp1W2k/o/+nPWIoc1HlxuNA==", "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" + "@rokucommunity/bslib": "^0.1.1", + "@rokucommunity/logger": "^0.3.12", + "@xml-tools/parser": "^1.0.7", + "array-flat-polyfill": "^1.0.1", + "chalk": "^2.4.2", + "chevrotain": "^7.0.1", + "chokidar": "^3.6.0", + "clear": "^0.1.0", + "cross-platform-clear-console": "^2.3.0", + "debounce-promise": "^3.1.0", + "eventemitter3": "^4.0.0", + "fast-glob": "^3.2.12", + "file-url": "^3.0.0", + "fs-extra": "^8.1.0", + "ignore": "^5.3.1", + "jsonc-parser": "^2.3.0", + "lodash.isequal": "^4.5.0", + "long": "^3.2.0", + "luxon": "^2.5.2", + "micromatch": "^4.0.4", + "minimatch": "^3.0.4", + "moment": "^2.23.0", + "p-settle": "^2.1.0", + "parse-ms": "^2.1.0", + "readline": "^1.3.0", + "require-relative": "^0.8.7", + "roku-deploy": "^3.17.4", + "safe-json-stringify": "^1.2.0", + "semver": "^7.7.3", + "serialize-error": "^7.0.1", + "source-map": "^0.7.4", + "thenby": "^1.3.4", + "vscode-languageserver": "^9.0.1", + "vscode-languageserver-protocol": "^3.17.5", + "vscode-languageserver-textdocument": "^1.0.11", + "vscode-languageserver-types": "^3.17.5", + "vscode-uri": "^3.0.8", + "xml2js": "^0.5.0", + "yargs": "^16.2.0" + }, + "dependencies": { + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "serialize-error": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz", + "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==", + "requires": { + "type-fest": "^0.13.1" + } + } } }, - "postman-request": { - "version": "2.88.1-postman.48", - "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.48.tgz", - "integrity": "sha512-E32FGh8ig2KDvzo4Byi7Ibr+wK2gNKPSqXoNsvjdCHgDBxSK4sCUwv+aa3zOBUwfiibPImHMy0WdlDSSCTqTuw==", + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", "requires": { - "@postman/form-data": "~3.1.1", - "@postman/tough-cookie": "~4.1.3-postman.1", - "@postman/tunnel-agent": "^0.6.8", - "aws-sign2": "~0.7.0", - "aws4": "^1.12.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "http-signature": "~1.4.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "^2.1.35", - "oauth-sign": "~0.9.0", - "qs": "~6.14.1", - "safe-buffer": "^5.1.2", - "socks-proxy-agent": "^8.0.5", - "stream-length": "^1.0.2", - "uuid": "^8.3.2" + "graceful-fs": "^4.1.6" } }, - "qs": { - "version": "6.14.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz", - "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==", + "roku-deploy": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.17.4.tgz", + "integrity": "sha512-tsy2TtibcFck/tnTgu2fMci/TAGYN1x6SJ0ACF+tWEB6jOIfkDQ2KGSZkXEHknmHhUQr1tQyVzhGlsCIK0WbuQ==", "requires": { - "side-channel": "^1.1.0" + "@types/request": "^2.48.13", + "chalk": "^2.4.2", + "dateformat": "^3.0.3", + "dayjs": "^1.11.0", + "fast-glob": "^3.2.12", + "fs-extra": "^7.0.1", + "is-glob": "^4.0.3", + "jsonc-parser": "^2.3.0", + "jszip": "^3.6.0", + "lodash": "^4.17.21", + "micromatch": "^4.0.4", + "moment": "^2.29.1", + "parse-ms": "^2.1.0", + "postman-request": "^2.88.1-postman.48", + "semver": "^7.7.3", + "temp-dir": "^2.0.0", + "xml2js": "^0.5.0" + }, + "dependencies": { + "dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==" + }, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + } } }, "serialize-error": { @@ -13108,19 +13784,28 @@ } } }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "vscode-languageserver": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", + "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", + "requires": { + "vscode-languageserver-protocol": "3.17.5" + } } } }, "roku-deploy": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.17.4.tgz", - "integrity": "sha512-tsy2TtibcFck/tnTgu2fMci/TAGYN1x6SJ0ACF+tWEB6jOIfkDQ2KGSZkXEHknmHhUQr1tQyVzhGlsCIK0WbuQ==", + "version": "4.0.0-alpha.2", + "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-4.0.0-alpha.2.tgz", + "integrity": "sha512-dJ+iBUyUJcWnXHikb5NaDmQ4mqbW8SrD0HXG+li595EKEVJtGfteAevZDXgFg/ES+cv8ao3Y4pIDgokjmMcCHg==", "requires": { - "@types/request": "^2.48.13", + "@rokucommunity/logger": "^0.3.10", + "@types/request": "^2.47.0", "chalk": "^2.4.2", "dateformat": "^3.0.3", "dayjs": "^1.11.0", @@ -13128,7 +13813,7 @@ "fs-extra": "^7.0.1", "is-glob": "^4.0.3", "jsonc-parser": "^2.3.0", - "jszip": "^3.6.0", + "jszip": "^3.10.1", "lodash": "^4.17.21", "micromatch": "^4.0.4", "moment": "^2.29.1", @@ -13136,9 +13821,20 @@ "postman-request": "^2.88.1-postman.48", "semver": "^7.7.3", "temp-dir": "^2.0.0", - "xml2js": "^0.5.0" + "xml2js": "^0.5.0", + "yargs": "^17.7.2" }, "dependencies": { + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, "dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", @@ -13154,16 +13850,6 @@ "universalify": "^0.1.0" } }, - "http-signature": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.4.0.tgz", - "integrity": "sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg==", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^2.0.2", - "sshpk": "^1.18.0" - } - }, "jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -13172,89 +13858,52 @@ "graceful-fs": "^4.1.6" } }, - "jsprim": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", - "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - } - }, - "postman-request": { - "version": "2.88.1-postman.48", - "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.48.tgz", - "integrity": "sha512-E32FGh8ig2KDvzo4Byi7Ibr+wK2gNKPSqXoNsvjdCHgDBxSK4sCUwv+aa3zOBUwfiibPImHMy0WdlDSSCTqTuw==", - "requires": { - "@postman/form-data": "~3.1.1", - "@postman/tough-cookie": "~4.1.3-postman.1", - "@postman/tunnel-agent": "^0.6.8", - "aws-sign2": "~0.7.0", - "aws4": "^1.12.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "http-signature": "~1.4.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "^2.1.35", - "oauth-sign": "~0.9.0", - "qs": "~6.14.1", - "safe-buffer": "^5.1.2", - "socks-proxy-agent": "^8.0.5", - "stream-length": "^1.0.2", - "uuid": "^8.3.2" - } - }, - "qs": { - "version": "6.14.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz", - "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==", - "requires": { - "side-channel": "^1.1.0" - } - }, - "semver": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", - "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==" - }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==" } } }, "rooibos_promises": { - "version": "npm:@rokucommunity/promises@0.5.0", - "resolved": "https://registry.npmjs.org/@rokucommunity/promises/-/promises-0.5.0.tgz", - "integrity": "sha512-Xl/8z4+WMeSHCG418Y9O49r/PQphwJ7efVmqlLoOvEg3EQ3ET//VHDQJa0YucuuTQurHfrLjXDj4foluhdHRSg==" + "version": "npm:@rokucommunity/promises@0.7.0", + "resolved": "https://registry.npmjs.org/@rokucommunity/promises/-/promises-0.7.0.tgz", + "integrity": "sha512-WhSHwqD/1H5e6abhcZMRw5FQcivI5mEqvEB6PPyWukIeCeuxUSu0LS1yR6XvNRwYRTaTbgh8DcEjlBmMsilD4Q==" }, "ropm": { - "version": "0.11.7", - "resolved": "https://registry.npmjs.org/ropm/-/ropm-0.11.7.tgz", - "integrity": "sha512-J+gazn70Dj87Jr4sqwmclwCA+baQSr7VstZL+ypDBl6IIOcpZEF8Ejtdc2XmuyUsDXbbQnlWUUl8rnqEkgmWow==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/ropm/-/ropm-0.11.8.tgz", + "integrity": "sha512-nv5ut+oG4ZweBHLtJJ8r7K9FtgqTVwlpHBXffq7SvTgKxrtgO13f2zGVCpll2bROsV4hJLCGLtNGdtFmlMa8Nw==", "dev": true, "requires": { "@rokucommunity/logger": "^0.3.12", "@xml-tools/parser": "1.0.10", - "brighterscript": "^0.72.2", + "brighterscript": "^0.72.4", "del": "6.0.0", "fs-extra": "9.1.0", "glob-all": "3.2.1", "latinize": "0.5.0", "npm-packlist": "2.1.4", - "roku-deploy": "^3.17.4", + "roku-deploy": "^3.17.5", "semver": "^7.6.3", "yargs": "16.2.0" }, @@ -13268,6 +13917,87 @@ "chevrotain": "7.1.1" } }, + "brighterscript": { + "version": "0.72.4", + "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.72.4.tgz", + "integrity": "sha512-WFim0n9pUgFZorZ81eIy2jF09XsFNxlLtllXYkH7d36Pq/3AH6M31YfIHkKSDltnXwrnCCjGXa+m0Jw3NnQIeQ==", + "dev": true, + "requires": { + "@rokucommunity/bslib": "^0.1.1", + "@rokucommunity/logger": "^0.3.12", + "@xml-tools/parser": "^1.0.7", + "array-flat-polyfill": "^1.0.1", + "chalk": "^2.4.2", + "chevrotain": "^7.0.1", + "chokidar": "^3.6.0", + "clear": "^0.1.0", + "cross-platform-clear-console": "^2.3.0", + "debounce-promise": "^3.1.0", + "eventemitter3": "^4.0.0", + "fast-glob": "^3.2.12", + "file-url": "^3.0.0", + "fs-extra": "^8.1.0", + "ignore": "^5.3.1", + "jsonc-parser": "^2.3.0", + "lodash.isequal": "^4.5.0", + "long": "^3.2.0", + "luxon": "^2.5.2", + "micromatch": "^4.0.4", + "minimatch": "^3.0.4", + "moment": "^2.23.0", + "p-settle": "^2.1.0", + "parse-ms": "^2.1.0", + "readline": "^1.3.0", + "require-relative": "^0.8.7", + "roku-deploy": "^3.17.5", + "safe-json-stringify": "^1.2.0", + "semver": "^7.7.3", + "serialize-error": "^7.0.1", + "source-map": "^0.7.4", + "thenby": "^1.3.4", + "vscode-languageserver": "^9.0.1", + "vscode-languageserver-protocol": "^3.17.5", + "vscode-languageserver-textdocument": "^1.0.11", + "vscode-languageserver-types": "^3.17.5", + "vscode-uri": "^3.0.8", + "xml2js": "^0.5.0", + "yargs": "^16.2.0" + }, + "dependencies": { + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + } + } + }, + "dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "dev": true + }, "fs-extra": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", @@ -13279,6 +14009,68 @@ "jsonfile": "^6.0.1", "universalify": "^2.0.0" } + }, + "roku-deploy": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.17.5.tgz", + "integrity": "sha512-cJo2Mf09My00aSUkYxaYCWajeWowcKfv49Rp1HBjdXJY1Xq385+Q3Txcr1H9bF2a9GnzSQI042JjmFdlRuiuQA==", + "dev": true, + "requires": { + "@types/request": "^2.48.13", + "chalk": "^2.4.2", + "dateformat": "^3.0.3", + "dayjs": "^1.11.0", + "fast-glob": "^3.2.12", + "fs-extra": "^7.0.1", + "is-glob": "^4.0.3", + "jsonc-parser": "^2.3.0", + "jszip": "^3.6.0", + "lodash": "^4.17.21", + "micromatch": "^4.0.4", + "moment": "^2.29.1", + "parse-ms": "^2.1.0", + "postman-request": "^2.88.1-postman.48", + "semver": "^7.7.3", + "temp-dir": "^2.0.0", + "xml2js": "^0.5.0" + }, + "dependencies": { + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + } + } + }, + "vscode-languageserver": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", + "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", + "dev": true, + "requires": { + "vscode-languageserver-protocol": "3.17.5" + } } } }, @@ -13339,9 +14131,9 @@ "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, "semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==" + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz", + "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==" }, "serialize-error": { "version": "7.0.1", @@ -13577,13 +14369,6 @@ "jsbn": "~0.1.0", "safer-buffer": "^2.0.2", "tweetnacl": "~0.14.0" - }, - "dependencies": { - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" - } } }, "stream": { @@ -13998,6 +14783,11 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, + "uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" + }, "v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", diff --git a/package.json b/package.json index d4f002f3..78ab2da4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rooibos-roku", - "version": "5.16.3", + "version": "6.0.0-alpha.52", "description": "simple, flexible, fun brightscript test framework for roku scenegraph apps - roku brighterscript plugin", "scripts": { "preversion": "npm run build && npm run lint && npm run test", @@ -19,13 +19,13 @@ "package": "npm run build && npm pack" }, "dependencies": { - "brighterscript": "^0.72.2", + "brighterscript": "^1.0.0-alpha.52", "fast-glob": "^3.2.12", "fs-extra": "^10.1.0", "minimatch": "^3.0.4", - "roku-debug": "^0.23.8", - "roku-deploy": "^3.17.4", - "rooibos_promises": "npm:@rokucommunity/promises@^0.5.0", + "roku-debug": "^0.23.10", + "roku-deploy": "^4.0.0-alpha.2", + "rooibos_promises": "npm:@rokucommunity/promises@^0.7.0", "source-map": "^0.7.3", "undent": "^1.0.1", "vscode-languageserver": "~6.1.1", @@ -33,7 +33,7 @@ "yargs": "^16.2.0" }, "devDependencies": { - "@rokucommunity/bslint": "^0.8.43", + "@rokucommunity/bslint": "^1.0.0-alpha.52", "@types/chai": "^4.1.2", "@types/events": "^3.0.0", "@types/fs-extra": "^5.0.1", @@ -55,7 +55,7 @@ "jsdoc": "^4.0.5", "mocha": "^10.8.2", "nyc": "^15.1.0", - "ropm": "^0.11.7", + "ropm": "^0.11.8", "source-map-support": "^0.5.13", "ts-node": "^10.7.0", "typescript": "^4.7.2" @@ -116,6 +116,7 @@ "source-map-support/register", "ts-node/register" ], + "timeout": "4000", "watchExtensions": [ "ts" ] diff --git a/src/cli.ts b/src/cli.ts index e99f89cd..79371488 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -42,9 +42,10 @@ async function main() { const rawConfig: BsConfig = util.loadConfigFile(bsconfigPath); const bsConfig = util.normalizeConfig(rawConfig); + bsConfig.outDir ??= (bsConfig as any).stagingDir ?? (bsConfig as any).stagingFolderPath; - const host = options.host ?? bsConfig.host; - const password = options.password ?? bsConfig.password; + const host = options.host ?? (bsConfig as any).host; + const password = options.password ?? (bsConfig as any).password; const logLevel = LogLevel[options['log-level']] ?? bsConfig.logLevel; const builder = new ProgramBuilder(); @@ -52,7 +53,7 @@ async function main() { builder.logger.logLevel = logLevel; - await builder.run({ ...options, retainStagingDir: true, createPackage: true }); + await builder.run({ ...options, retainStagingDir: true }); const rokuDeploy = new RokuDeploy(); const deviceInfo = await rokuDeploy.getDeviceInfo({ host: host }); @@ -70,7 +71,7 @@ async function main() { if (emitAppExit) { (telnet as any).beginAppExit(); } - await rokuDeploy.pressHomeButton(host); // roku-deploy v4: keyPress({ host: options.host, key: 'home' }); + await rokuDeploy.keyPress({ host: options.host, key: 'home' }); process.exit(currentErrorCode); } @@ -114,13 +115,17 @@ async function main() { //deploy a .zip package of your project to a roku device async function deployBuiltFiles() { - const outFile = bsConfig.outFile; - console.log(`Deploying ${outFile} to ${host}`); - await rokuDeploy.publish({ // roku-deploy v4: .sideload({...}) + const outDir = bsConfig.outDir; + + await rokuDeploy.zip({ + outDir: outDir, + stagingDir: bsConfig.outDir + }); + + await rokuDeploy.sideload({ password: password, host: host, - outFile: outFile, - outDir: process.cwd() + outDir: outDir }); } diff --git a/src/lib/rooibos/Annotation.ts b/src/lib/rooibos/Annotation.ts index 50b3f963..ce9c039d 100644 --- a/src/lib/rooibos/Annotation.ts +++ b/src/lib/rooibos/Annotation.ts @@ -226,7 +226,7 @@ export class RooibosAnnotation { } try { if (rawParams) { - this.params.push(new AnnotationParams(annotation, rawParams, annotation.range.start.line, annotation.getArguments() as any, isIgnore, isSolo, noCatch)); + this.params.push(new AnnotationParams(annotation, rawParams, annotation.location.range.start.line, annotation.getArguments() as any, isIgnore, isSolo, noCatch)); } else { diagnosticIllegalParams(file, annotation); } diff --git a/src/lib/rooibos/CodeCoverageProcessor.spec.ts b/src/lib/rooibos/CodeCoverageProcessor.spec.ts index b577ef3f..d79e4095 100644 --- a/src/lib/rooibos/CodeCoverageProcessor.spec.ts +++ b/src/lib/rooibos/CodeCoverageProcessor.spec.ts @@ -1,7 +1,6 @@ import { Program, ProgramBuilder, util, standardizePath as s, isExpressionStatement, isCallExpression, isIfStatement } from 'brighterscript'; import type { BinaryExpression, Expression, ExpressionStatement, LiteralExpression, Statement, VariableExpression } from 'brighterscript'; import { expect } from 'chai'; -import PluginInterface from 'brighterscript/dist/PluginInterface'; import * as fsExtra from 'fs-extra'; import { RooibosPlugin } from '../../plugin'; import undent from 'undent'; @@ -10,7 +9,7 @@ import { CodeCoverageLineType } from './CodeCoverageType'; let tmpPath = s`${process.cwd()}/.tmp`; let _rootDir = s`${tmpPath}/rootDir`; -let _stagingFolderPath = s`${tmpPath}/staging`; +let outDir = s`${tmpPath}/staging`; describe('CodeCoverageProcessor', () => { let program: Program; @@ -22,7 +21,9 @@ describe('CodeCoverageProcessor', () => { plugin = new RooibosPlugin(); options = { rootDir: _rootDir, - stagingFolderPath: _stagingFolderPath, + stagingDir: outDir, + //workaround for bsc bug where outDir does not fall back to stagingDir + outDir: outDir, rooibos: { isRecordingCodeCoverage: true, coverageExcludedFiles: [ @@ -31,7 +32,7 @@ describe('CodeCoverageProcessor', () => { }, allowBrighterScriptInBrightScript: true }; - fsExtra.ensureDirSync(_stagingFolderPath); + fsExtra.ensureDirSync(outDir); fsExtra.ensureDirSync(_rootDir); builder = new ProgramBuilder(); @@ -39,14 +40,13 @@ describe('CodeCoverageProcessor', () => { builder.program = new Program(builder.options); program = builder.program; program.logger = builder.logger; - builder.plugins = new PluginInterface([plugin], { logger: builder.logger }); - program.plugins = new PluginInterface([plugin], { logger: builder.logger }); + program.plugins.add(plugin); program.createSourceScope(); //ensure source scope is created - plugin.beforeProgramCreate(builder); - + plugin.beforeProvideProgram({ builder: builder }); + plugin.afterProvideProgram({ program: program, builder: builder }); }); afterEach(() => { - plugin.afterProgramCreate(program); + plugin.afterProvideProgram({ builder: builder, program: program }); builder.dispose(); program.dispose(); fsExtra.removeSync(tmpPath); @@ -128,7 +128,7 @@ describe('CodeCoverageProcessor', () => { const transpiledSource = getContents('source/code.brs'); const funcAst = getFunctionAstNode(transpiledSource, 'RBS_CC_1_reportLine'); expect(funcAst).to.exist; - expect(funcAst.func.parameters.map(p => p.name.text)).to.deep.equal(['lineNumber', 'reportType']); + expect(funcAst.func.parameters.map(p => p.tokens.name.text)).to.deep.equal(['lineNumber', 'reportType']); expectFunctionContents(transpiledSource, 'RBS_CC_1_reportLine', ` _rbs_ccn = m._rbs_ccn if _rbs_ccn <> invalid @@ -417,6 +417,36 @@ describe('CodeCoverageProcessor', () => { }); }); + it('adds code coverage in conditional compile statements', async () => { + program.setFile('source/code.bs', ` + #const DEBUG = true + sub test() + #if DEBUG + print "debug" + #else + print "not debug" + #end if + end sub + `); + program.validate(); + expect(program.getDiagnostics()).to.be.empty; + await builder.transpile(); + const transpiledSource = getContents('source/code.brs'); + expectFunctionContents(transpiledSource, 'test', ` + #if DEBUG + RBS_CC_1_reportLine("3", 4) + RBS_CC_1_reportLine("4", 1) + print "debug" + #else + RBS_CC_1_reportLine("5", 4) + RBS_CC_1_reportLine("6", 1) + print "not debug" + #end if + `); + const reportLineFunction = getFunctionAstNode(transpiledSource, 'RBS_CC_1_reportLine'); + expect(reportLineFunction).to.exist; + }).timeout(10000); + it('excludes files from coverage', async () => { const source = `sub foo() x = function(y) @@ -456,13 +486,13 @@ function expectReportLineFunctionCalls(ast: { statements: Statement[] }, reportL expect(isCallExpression(expr), `Expected statement ${opts.currentLine} to be an call expression`).to.be.true; if (isCallExpression(expr)) { const callExpr = expr; - let callee = (callExpr.callee as VariableExpression).name; + let callee = (callExpr.callee as VariableExpression).tokens.name; expect(callee.text, `Expected callee to be "${reportLineFuncName}"`).to.equal(reportLineFuncName); expect(callExpr.args.length).to.be.equal(2); let lineArg = callExpr.args[0]; let reportTypeArg = callExpr.args[1]; - expect((lineArg as LiteralExpression).token.text, `Expected line argument to be "${opts.currentLine.toString()}"`).to.equal(`"${opts.currentLine.toString()}"`); - expect((reportTypeArg as LiteralExpression).token.text, `Expected report type argument to be "${coverageType}"`).to.equal(`${coverageType}`); + expect((lineArg as LiteralExpression).tokens.value.text, `Expected line argument to be "${opts.currentLine.toString()}"`).to.equal(`"${opts.currentLine.toString()}"`); + expect((reportTypeArg as LiteralExpression).tokens.value.text, `Expected report type argument to be "${coverageType}"`).to.equal(`${coverageType}`); } } diff --git a/src/lib/rooibos/CodeCoverageProcessor.ts b/src/lib/rooibos/CodeCoverageProcessor.ts index 2718b9fa..da4dc6e4 100644 --- a/src/lib/rooibos/CodeCoverageProcessor.ts +++ b/src/lib/rooibos/CodeCoverageProcessor.ts @@ -1,15 +1,17 @@ import type { BrsFile, Editor, ExpressionStatement, Program, ProgramBuilder, Statement } from 'brighterscript'; -import { Parser, WalkMode, createVisitor, BinaryExpression, createToken, TokenKind, GroupingExpression, isForStatement, isBlock } from 'brighterscript'; +import { Parser, WalkMode, createVisitor, BinaryExpression, createToken, TokenKind, GroupingExpression, isForStatement, isBlock, InternalWalkMode } from 'brighterscript'; import type { RooibosConfig } from './RooibosConfig'; import { RawCodeStatement } from './RawCodeStatement'; import { RawCodeExpression } from './RawCodeExpression'; import type { FileFactory } from './FileFactory'; +import { RooibosLogPrefix } from '../utils/Diagnostics'; export enum CodeCoverageLineType { noCode = 0, code = 1, condition = 2, - branch = 3 + branch = 3, + conditionalCompile = 4 } export class CodeCoverageProcessor { @@ -40,7 +42,7 @@ export class CodeCoverageProcessor { this.fileFactory = fileFactory; try { } catch (e) { - console.log('Error:', (e as Error).stack); + builder.logger.error(RooibosLogPrefix, 'Error:', (e as Error).stack); } } @@ -72,33 +74,40 @@ export class CodeCoverageProcessor { this.processedStatements = new Set(); this.addedStatements = new Set(); this.astEditor = astEditor; + file.program.logger.info(RooibosLogPrefix, 'Processing file for code coverage:', this.fileId, file.pkgPath); file.ast.walk(createVisitor({ ForStatement: (ds, parent, owner, key) => { this.addStatement(ds); - ds.forToken.text = `${this.getFuncCallText(ds.range.start.line, CodeCoverageLineType.code)}: for`; + ds.tokens.for.text = `${this.getFuncCallText(ds.location.range.start.line, CodeCoverageLineType.code)}: for`; }, IfStatement: (ifStatement, parent, owner, key) => { this.addStatement(ifStatement); - (ifStatement as any).condition = new BinaryExpression( - new RawCodeExpression(this.getFuncCallText(ifStatement.condition.range.start.line, CodeCoverageLineType.condition)), - createToken(TokenKind.And), - new GroupingExpression({ - left: createToken(TokenKind.LeftParen), - right: createToken(TokenKind.RightParen) - }, ifStatement.condition) - ); + (ifStatement as any).condition = new BinaryExpression({ + left: new RawCodeExpression(this.getFuncCallText(ifStatement.condition.location.range.start.line, CodeCoverageLineType.condition)), + operator: createToken(TokenKind.And), + right: new GroupingExpression({ + leftParen: createToken(TokenKind.LeftParen), + rightParen: createToken(TokenKind.RightParen), + expression: ifStatement.condition + }) + }); let blockStatements = ifStatement?.thenBranch?.statements; if (blockStatements) { - let coverageStatement = new RawCodeStatement(this.getFuncCallText(ifStatement.range.start.line, CodeCoverageLineType.branch)); + let coverageStatement = new RawCodeStatement(this.getFuncCallText(ifStatement.location.range.start.line, CodeCoverageLineType.branch)); blockStatements.splice(0, 0, coverageStatement); } // Handle the else blocks let elseBlock = ifStatement.elseBranch; if (isBlock(elseBlock) && elseBlock.statements) { - let coverageStatement = new RawCodeStatement(this.getFuncCallText(elseBlock.range.start.line - 1, CodeCoverageLineType.branch)); + let startRangeLine = elseBlock.location.range.start.line; + if (elseBlock.statements.length > 0) { + // if the else block has statements, then the coverage statement should be inserted before the first statement + startRangeLine -= 1; + } + let coverageStatement = new RawCodeStatement(this.getFuncCallText(startRangeLine, CodeCoverageLineType.branch)); elseBlock.statements.splice(0, 0, coverageStatement); } @@ -109,7 +118,7 @@ export class CodeCoverageProcessor { }, WhileStatement: (ds, parent, owner, key) => { - ds.tokens.while.text = `${this.getFuncCallText(ds.range.start.line, CodeCoverageLineType.code)}: while`; + ds.tokens.while.text = `${this.getFuncCallText(ds.location.range.start.line, CodeCoverageLineType.code)}: while`; }, ReturnStatement: (ds, parent, owner, key) => { this.addStatement(ds); @@ -117,10 +126,7 @@ export class CodeCoverageProcessor { }, ForEachStatement: (ds, parent, owner, key) => { this.addStatement(ds); - ds.tokens.forEach.text = `${this.getFuncCallText(ds.range.start.line, CodeCoverageLineType.code)}: for each`; - }, - ExitWhileStatement: (ds, parent, owner, key) => { - + ds.tokens.forEach.text = `${this.getFuncCallText(ds.location.range.start.line, CodeCoverageLineType.code)}: for each`; }, PrintStatement: (ds, parent, owner, key) => { this.addStatement(ds); @@ -146,13 +152,38 @@ export class CodeCoverageProcessor { this.addStatement(ds); this.convertStatementToCoverageStatement(ds, CodeCoverageLineType.code, owner, key); } - + }, + AugmentedAssignmentStatement: (ds, parent, owner, key) => { + this.addStatement(ds); + this.convertStatementToCoverageStatement(ds, CodeCoverageLineType.code, owner, key); }, ExpressionStatement: (ds, parent, owner, key) => { this.addStatement(ds); this.convertStatementToCoverageStatement(ds, CodeCoverageLineType.code, owner, key); + }, + ConditionalCompileStatement: (ccStmt, parent, owner, key) => { + this.addStatement(ccStmt); + + let blockStatements = ccStmt.thenBranch?.statements; + if (blockStatements) { + let coverageStatement = new RawCodeStatement(this.getFuncCallText(ccStmt.location.range.start.line, CodeCoverageLineType.conditionalCompile)); + blockStatements.splice(0, 0, coverageStatement); + } + + // Handle the else blocks + let elseBlock = ccStmt.elseBranch; + if (isBlock(elseBlock) && elseBlock.statements) { + let startRangeLine = elseBlock.location.range.start.line; + if (elseBlock.statements.length > 0) { + // if the else block has statements, then the coverage statement should be inserted before the first statement + startRangeLine -= 1; + } + let coverageStatement = new RawCodeStatement(this.getFuncCallText(startRangeLine, CodeCoverageLineType.conditionalCompile)); + elseBlock.statements.splice(0, 0, coverageStatement); + } } - }), { walkMode: WalkMode.visitAllRecursive }); + // eslint-disable-next-line no-bitwise + }), { walkMode: WalkMode.visitAllRecursive | InternalWalkMode.visitFalseConditionalCompilationBlocks }); const coverageMapObject = {}; for (let key of this.coverageMap.keys()) { @@ -168,9 +199,10 @@ export class CodeCoverageProcessor { return; } - const lineNumber = statement.range.start.line; + const lineNumber = statement.location.range.start.line; this.coverageMap.set(lineNumber, coverageType); const parsed = Parser.parse(this.getFuncCallText(lineNumber, coverageType)).ast.statements[0] as ExpressionStatement; + this.addedStatements.add(parsed); this.astEditor.arraySplice(owner, key, 0, parsed); this.addedStatements.add(parsed); // store the statement in a set to avoid handling again after inserting statement above diff --git a/src/lib/rooibos/FileFactory.ts b/src/lib/rooibos/FileFactory.ts index cb585146..e47edcb3 100644 --- a/src/lib/rooibos/FileFactory.ts +++ b/src/lib/rooibos/FileFactory.ts @@ -5,10 +5,11 @@ import * as fs from 'fs'; import * as fse from 'fs-extra'; import * as fastGlob from 'fast-glob'; import type { TestSuite } from './TestSuite'; +import { RooibosLogPrefix } from '../utils/Diagnostics'; export class FileFactory { - private coverageComponentXmlTemplate; - private coverageComponentBrsTemplate; + private coverageComponentXmlTemplate: string; + private coverageComponentBrsTemplate: string; private frameworkSourcePath: string; constructor() { @@ -34,7 +35,7 @@ export class FileFactory { '!**/bslib.brs', '!**/manifest', '**/CodeCoverage.{brs,xml}', - '!**/RooibosScene.xml' + '**/RooibosScene.xml' ], { cwd: this.frameworkSourcePath, absolute: false, @@ -56,13 +57,7 @@ export class FileFactory { ); } - let entry = { - src: s`${this.frameworkSourcePath}/components/RooibosScene.xml`, - dest: s`components/rooibos/RooibosScene.xml` - }; - this.addedFrameworkFiles.push( - program.setFile(entry, this.createTestXML('RooibosScene', 'Scene')) - ); + return this.addedFrameworkFiles; } public createTestXML(name: string, baseName: string, suite?: TestSuite): string { @@ -73,7 +68,7 @@ export class FileFactory { // Add the test spec file rather then relying on auto imports if (suite) { - scriptImports.push(`