From 43166fb43bb17c9c6a3b1fe547504533347c490a Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Thu, 7 Sep 2023 17:18:25 -0400 Subject: [PATCH] Fresh start (#110) * Fresh start * Create an xml include plugin (#111) * Restructure and add testing (#114) * rooibos setup * Restructure and add testing * docs * Restore manifestpipi * Description in tools * A bit of docs * Auto bind feature (#115) * Auto bind feature * Fix children merge * bs plugin fix * Feature/app controller (#120) * Initial layout * Restructuring and plugin work * A couple of tweaks in binding stuff * tweaks * basic stack * Add basic app controller * Support json5/yaml in playlet config files (#123) * Support json5 in playlet config files * Add yaml to the mix * Delete old lib project * plugin fix * plugin tweak * verbose logging * Revert "verbose logging" This reverts commit 25867f4226703d83102519a0d48d1cc46a9876de. * One idea to fix the include plugin * Fix instability in plugins * Feature/navbar (#126) * Navbar * typo * comment * Single content node, and tests * Remove unused field * tweaks * update dependencies command * tweak formatting * Add web app screen * Set id in created screens * Search screen * Tests * Show playlists and channels in search results * Move screen stuff to app controller * Home screen (wip) * Add preferences node * README.md copyedits (#130) * README.md: Fix typos * README.md: Standardize capitalization and punctuation * Update docs/README.md --------- Co-authored-by: Brahim Hadriche * Web server: round 1 (#131) * web server object * Logging * Web server round 1 * Lint fix * Small tweaks --------- Co-authored-by: github-action linter * Logging to file * Leftover * Add logs file to web server * Fix for timeout * Disable keepalive connection * add openapi spec file * Lint fix * add prefs version in api * Add ecp api definition * Lint fix * Settings rework (#135) * Settings rework * Standard OnFocusChange event * Video player stuff (#136) * Video player stuff * Restructure things so that focus is better handled * Lint fix --------- Co-authored-by: github-action linter * Exit dialog * A bunch of changes * New http client * Set TODO priorities * picture in picture * mark video watched * Video player stuff mostly there * update spec file * Sponsorblock * FuncName * SponsorBlock notifications * Lint fix * misc * remove basic auth feature flag (until we start using it) * Play queue part 1 * type fix * handle unicode in request body * SponsorBlock chapter label * modal base * remove a hack * Invidious settings * web server reduce timeout * Test for captions * Lint fix * remove rpc stuff * small change * Solve focus management * a couple of fixes * Remove a bunch of todos * feed error handling wip * Lint fix * navigation in instance settings * home screen pagination support * Refactor feed to support pagination on search page * cell loading animation * Tweak caching * delete test screen * playlist support part 1 * Basic playlist view * Restore playlist/channel handler * Refactor some content node stuff, and add an auth popup dialog * A bad implementation of a playqueue * Lint fix * playlist cast fix * Feature/web app catch up (#139) * playlist cast fix * Move things around * support playlists in web app * update api * Bump deps * Downgrade todo --------- Co-authored-by: Bryce Harrington Co-authored-by: github-action linter --- .github/workflows/lint.yml | 3 + .github/workflows/release.yml | 5 +- .gitignore | 6 +- .vscode/brighterscript.code-snippets | 439 ++++ .vscode/extensions.json | 1 + .vscode/launch.json | 39 +- .vscode/settings.json | 4 +- config/bsconfig.base.json | 38 +- config/bsconfig.tests.base.json | 39 + config/bsfmt.jsonc | 2 +- config/bslint.jsonc | 2 +- docs/README.md | 2 +- docs/playlet-web-api.yml | 532 +++++ package-lock.json | 705 +++++- package.json | 71 +- playlet-app/bsconfig.json | 6 + {playlet => playlet-app}/bsconfig.lint.json | 2 +- playlet-app/bsconfig.tests.json | 6 + playlet-app/package-lock.json | 29 + playlet-app/package.json | 28 + .../BootstrapScene/BootstrapScene.bs | 3 + .../BootstrapScene/BootstrapScene.xml | 0 .../LoadingIndicator/LoadingIndicator.bs | 0 .../LoadingIndicator/LoadingIndicator.xml | 0 .../src/images/channel-poster_fhd.png | Bin .../src/images/channel-poster_hd.png | Bin .../src/images/channel-poster_sd.png | Bin .../src/images/spinner.png | Bin .../src/images/splash-screen_fhd.jpg | Bin .../src/images/splash-screen_hd.jpg | Bin .../src/images/splash-screen_sd.jpg | Bin .../src/images/vector/icons/home.svg | 0 .../src/images/vector/icons/info.svg | 0 .../src/images/vector/icons/phone.svg | 0 .../src/images/vector/icons/search.svg | 0 .../src/images/vector/icons/settings.svg | 0 .../src/images/vector/logo-dark.svg | 0 .../src/images/vector/logo-fav.svg | 0 .../src/images/vector/logo-light.svg | 0 {playlet => playlet-app}/src/manifest | 2 + {playlet => playlet-app}/src/source/Dialog.bs | 0 {playlet => playlet-app}/src/source/Main.bs | 4 +- .../src/source/Manifest.bs | 0 playlet-app/src/source/Manifest.spec.bs | 19 + .../src/source/Registry.bs | 0 playlet-lib/bsconfig.json | 4 +- playlet-lib/bsconfig.lint.json | 2 +- playlet-lib/bsconfig.tests.json | 6 + playlet-lib/package-lock.json | 47 + playlet-lib/package.json | 31 + .../components/AppController/AppController.bs | 103 + .../AppController/AppController.xml | 14 + .../src/components/AppController/AppRoot.bs | 30 + .../src/components/AppController/AppRoot.xml | 4 + .../AppInfoScreen/AppVersionTask.bs | 11 - .../ContentNode/ActionContentNode.xml | 6 + .../ContentNode/ChannelContentNode.xml | 7 + .../ContentNode/FeedContentNode.xml | 8 + .../ContentNode/LoadingContentNode.xml | 5 + .../ContentNode/PlaylistContentNode.xml | 33 + .../ContentNode/VideoContentNode.xml | 21 + .../src/components/Dialog/DialogUtils.bs | 40 +- .../src/components/Dialog/LoginDialog.bs | 39 + .../src/components/Dialog/LoginDialog.xml | 43 + .../src/components/Dialog/SimpleDialog.bs | 4 +- playlet-lib/src/components/EcpArgs.bs | 50 + .../HomeGridScreen/HomeGridScreen.bs | 134 -- .../HomeGridScreen/HomeGridScreen.xml | 30 - .../HomeGridScreen/HomeGridScreenTask.bs | 51 - .../Invidious/InvidiousPublicInstancesTask.bs | 13 - .../src/components/Logging/FileTransport.bs | 19 + .../src/components/Logging/FileTransport.xml | 10 + playlet-lib/src/components/MainScene.bs | 166 +- .../src/components/MainScene.transpiled.brs | 29 + .../src/components/MainScene.transpiled.xml | 47 + playlet-lib/src/components/MainScene.xml | 72 +- .../MainScene_bindings.transpiled.brs | 31 + .../src/components/NavBar/IconButton.brs | 20 +- .../src/components/NavBar/IconButton.xml | 5 +- playlet-lib/src/components/NavBar/NavBar.bs | 110 +- playlet-lib/src/components/NavBar/NavBar.xml | 59 +- .../src/components/NavBar/NavBarItem.xml | 10 + .../src/components/Navigation/Navigation.bs | 53 + .../src/components/Navigation/ScrollTo.bs | 42 + .../Navigation/tests/NavigationTestNode.xml | 9 + .../src/components/PlayQueue/PlayQueue.bs | 175 ++ .../src/components/PlayQueue/PlayQueue.xml | 15 + .../PlaylistView/PlaylistContentTask.bs | 48 + .../components/PlaylistView/PlaylistUtils.bs | 8 + .../components/PlaylistView/PlaylistView.bs | 155 ++ .../components/PlaylistView/PlaylistView.xml | 58 + .../PlaylistView/PlaylistViewCell.bs | 44 + .../PlaylistView/PlaylistViewCell.xml | 46 + .../AppInfoScreen/AppInfoScreen.bs | 33 +- .../AppInfoScreen/AppInfoScreen.xml | 6 +- .../Screens/HomeScreen/HomeScreen.bs | 29 + .../Screens/HomeScreen/HomeScreen.xml | 26 + .../Screens/SearchScreen/SearchScreen.bs | 232 ++ .../SearchScreen/SearchScreen.xml | 23 +- .../SearchScreen/SearchSuggestionsTask.bs | 15 +- .../Screens/SettingsScreen/BooleanControl.bs | 42 + .../Screens/SettingsScreen/BooleanControl.xml | 19 + .../Screens/SettingsScreen/Checkbox.bs | 17 + .../Screens/SettingsScreen/Checkbox.xml | 13 + .../ClearSearchHistoryControl.bs | 26 + .../ClearSearchHistoryControl.xml | 20 + .../InvidiousInstanceControl.bs | 77 + .../InvidiousInstanceControl.xml | 25 + .../InvidiousInstanceSettings.bs | 105 + .../InvidiousInstanceSettings.xml | 78 + .../InvidiousInstanceTesting.bs | 75 + .../InvidiousInstanceTesting.xml | 45 + .../InvidiousInstanceTestingItem.bs | 48 + .../InvidiousInstanceTestingItem.xml | 27 + .../InvidiousInstanceTestingTask.bs | 238 ++ .../InvidiousPublicInstances.bs | 99 + .../InvidiousPublicInstances.xml | 43 + .../InvidiousPublicInstancesListItem.bs | 22 + .../InvidiousPublicInstancesListItem.xml | 43 + ...nvidiousPublicInstancesListItemContent.xml | 14 + .../InvidiousPublicInstancesTask.bs | 79 + .../SettingsScreen/RadioControl.bs | 75 +- .../Screens/SettingsScreen/RadioControl.xml | 23 + .../Screens/SettingsScreen/SettingCategory.bs | 36 + .../SettingsScreen/SettingCategory.xml | 24 + .../Screens/SettingsScreen/SettingsScreen.bs | 202 ++ .../Screens/SettingsScreen/SettingsScreen.xml | 22 + .../Screens/SettingsScreen/StringControl.bs | 84 + .../Screens/SettingsScreen/StringControl.xml | 24 + .../WebAppScreen/GenerateQrCodeTask.bs | 8 + .../Screens/WebAppScreen/WebAppScreen.bs | 26 + .../Screens/WebAppScreen/WebAppScreen.xml | 46 + .../components/SearchScreen/SearchScreen.bs | 233 -- .../src/components/SearchScreen/SearchTask.bs | 45 - .../ApplicationInfo/ApplicationInfo.bs | 43 + .../ApplicationInfo/ApplicationInfo.xml | 12 + .../ApplicationInfo/LatestLibVersionTask.bs | 25 + .../Services/Invidious/Invidious.bs | 23 + .../Services/Invidious/Invidious.xml | 17 + .../Services/Invidious/InvidiousService.bs | 358 +++ .../Invidious/InvidiousToContentNode.bs | 211 ++ .../Services/Preferences/Preferences.bs | 169 ++ .../Services/Preferences/Preferences.xml | 12 + .../SponsorBlockNotification.bs | 8 +- .../SponsorBlockNotification.xml | 11 +- .../SponsorBlockNotificationUtils.bs | 32 + .../SponsorBlockSegmentViewedTask.bs | 9 + .../SponsorBlock/SponsorBlockService.bs | 122 ++ .../SponsorBlock}/SponsorBlockTask.bs | 9 +- .../SettingsScreen/BooleanControl.bs | 42 - .../SettingsScreen/BooleanControl.xml | 18 - .../ClearSearchHistoryControl.bs | 38 - .../ClearSearchHistoryControl.xml | 14 - .../SettingsScreen/RadioControl.xml | 17 - .../src/components/SettingsScreen/Settings.bs | 14 - .../SettingsScreen/SettingsScreen.bs | 363 ---- .../SettingsScreen/SettingsScreen.xml | 32 - .../SettingsScreen/StringControl.bs | 52 - .../SettingsScreen/StringControl.xml | 17 - .../SponsorBlockNotificationManager.bs | 28 - .../src/components/VideoFeed/FeedLoadState.bs | 7 + .../VideoFeed/VideoRowCell/ActionRowCell.bs | 13 + .../VideoFeed/VideoRowCell/ActionRowCell.xml | 19 + .../VideoFeed/VideoRowCell/ChannelRowCell.bs | 56 + .../VideoFeed/VideoRowCell/ChannelRowCell.xml | 36 + .../VideoFeed/VideoRowCell/LoadingRowCell.bs | 20 + .../VideoFeed/VideoRowCell/LoadingRowCell.xml | 30 + .../VideoFeed/VideoRowCell/PlaylistRowCell.bs | 39 + .../VideoRowCell/PlaylistRowCell.xml | 52 + .../VideoFeed/VideoRowCell/RowCell.bs | 40 + .../VideoFeed/VideoRowCell/RowCell.xml | 16 + .../VideoFeed/VideoRowCell/VideoRowCell.bs | 72 + .../VideoRowCell/VideoRowCell.xml | 45 +- .../src/components/VideoFeed/VideoRowList.bs | 205 ++ .../src/components/VideoFeed/VideoRowList.xml | 12 + .../VideoFeed/VideoRowListContentTask.bs | 24 + .../VideoFeed/VideoRowListRowContentTask.bs | 79 + .../VideoPlayer/MarkVideoWatchedTask.bs | 11 +- .../components/VideoPlayer/SponsorBlock.bs | 165 ++ .../VideoPlayer/SponsorBlockTrackingTask.bs | 9 - .../src/components/VideoPlayer/Video.bs | 97 - .../components/VideoPlayer/VideoContainer.bs | 4 +- .../components/VideoPlayer/VideoContainer.xml | 2 - .../VideoPlayer/VideoContentTask.bs | 164 ++ .../VideoPlayer/VideoDetailsTask.bs | 13 - .../src/components/VideoPlayer/VideoPlayer.bs | 496 ++--- .../components/VideoPlayer/VideoPlayer.xml | 40 +- .../VideoPlayer/VideoPlayerCaptions.bs | 54 - .../VideoPlayer/VideoPlayerCaptionsTask.bs | 62 - .../VideoPlayer/VideoPlayerSponsorBlock.bs | 178 -- .../VideoPlayer/VideoPlayerStyle.bs | 28 + .../src/components/VideoPlayer/VideoUtils.bs | 86 + .../components/VideoRowCell/VideoRowCell.bs | 116 - .../Middleware/InvidiousRouter.bs | 85 + .../Middleware/PlayQueueRouter.bs | 107 + .../Middleware/PlayletLibUrlsRouter.bs | 68 + .../Middleware/PreferencesRouter.bs | 31 +- .../Middleware/SearchHistoryRouter.bs | 0 .../Middleware/StateApiRouter.bs | 73 + .../Web/PlayletWebServer/PlayletWebServer.bs | 50 + .../Web/PlayletWebServer/PlayletWebServer.xml | 11 + .../WebServer/Http}/HttpConnection.bs | 28 +- .../WebServer/Http}/HttpConnectionState.bs | 0 .../WebServer/Http}/HttpRequest.bs | 59 +- .../WebServer/Http}/HttpRequestState.bs | 0 .../WebServer/Http}/HttpResponse.bs | 44 +- .../WebServer/Http}/HttpResponseSource.bs | 0 .../WebServer/Http}/HttpRouter.bs | 0 .../WebServer/Http}/HttpServer.bs | 43 +- .../Web/WebServer/Http/HttpSettings.bs | 20 + .../Web/WebServer/Http/HttpUtils.bs | 73 + .../WebServer/Middleware/CorsMiddleware.bs | 0 .../WebServer/Middleware/HttpDefaultRouter.bs | 0 .../Middleware/HttpStaticFilesRouter.bs | 38 +- .../src/components/Web/WebServer/WebServer.bs | 84 + .../components/Web/WebServer/WebServer.xml | 21 + .../components/WebAppScreen/WebAppScreen.bs | 21 - .../components/WebAppScreen/WebAppScreen.xml | 32 - .../src/components/WebServer/HttpSettings.bs | 22 - .../Middleware/BasicAuthMiddleware.bs | 50 - .../WebServer/Middleware/CommandsApiRouter.bs | 47 - .../WebServer/Middleware/DashRouter.bs | 148 -- .../WebServer/Middleware/InvidiousRouter.bs | 87 - .../WebServer/Middleware/RegistryApiRouter.bs | 19 - .../WebServer/Middleware/StateApiRouter.bs | 72 - .../WebServer/Task/WebServerTask.bs | 108 - .../WebServer/Task/WebServerTask.xml | 8 - .../Middleware/WebSocketMiddleware.bs | 50 - .../WebSocket/WebSocketConnection.bs | 79 - .../WebSocket/WebSocketConnectionState.bs | 10 - .../WebServer/WebSocket/WebSocketFrame.bs | 131 -- .../WebServer/WebSocket/WebSocketOpCode.bs | 12 - .../WebServer/WebSocket/WebSocketServer.bs | 100 - .../parts/AutoBind/AutoBind.part.bs | 147 ++ .../parts/AutoBind/AutoBind.part.xml | 11 + .../tests.transpiled/AutoBindNode1.brs | 3 + .../tests.transpiled/AutoBindNode1.xml | 20 + .../AutoBindNode1Container.brs | 3 + .../AutoBindNode1Container.xml | 18 + .../AutoBindNode1Container_bindings.brs | 11 + .../AutoBindNode1_bindings.brs | 11 + .../tests.transpiled/AutoBindNode2.brs | 3 + .../tests.transpiled/AutoBindNode2.xml | 17 + .../AutoBindNode2_bindings.brs | 12 + .../parts/AutoBind/tests/AutoBindNode1.bs | 3 + .../parts/AutoBind/tests/AutoBindNode1.xml | 11 + .../AutoBind/tests/AutoBindNode1Container.bs | 3 + .../AutoBind/tests/AutoBindNode1Container.xml | 7 + .../parts/AutoBind/tests/AutoBindNode2.bs | 3 + .../parts/AutoBind/tests/AutoBindNode2.xml | 8 + .../src/components/parts/Focus/Focus.part.xml | 7 + .../src/config/ISO-639-1-to-ISO-639-2T.json | 186 -- .../src/config/ISO-639-1-to-ISO-639-2T.json5 | 186 ++ .../src/config/default_home_layout.json | 64 - .../src/config/default_home_layout.json5 | 64 + playlet-lib/src/config/http-codes.json5 | 58 + .../src/config/invidious_video_api.json | 158 -- .../src/config/invidious_video_api.json5 | 153 ++ playlet-lib/src/config/mime-types.json5 | 34 + playlet-lib/src/config/preferences.json | 109 - playlet-lib/src/config/preferences.json5 | 117 + .../src/config/sponsorblock_config.json | 115 - .../src/config/sponsorblock_config.json5 | 115 + .../src/images/icons/edit-48-black.png | Bin 0 -> 1156 bytes .../src/images/icons/edit-48-white.png | Bin 0 -> 1439 bytes playlet-lib/src/images/icons/test-failed.png | Bin 0 -> 1511 bytes playlet-lib/src/images/icons/test-passed.png | Bin 0 -> 1377 bytes playlet-lib/src/manifest | 4 +- playlet-lib/src/source/asyncTask/asyncTask.bs | 13 +- .../components/tests/ApplicationInfo.spec.bs | 37 + .../source/components/tests/NavBar.spec.bs | 68 + .../components/tests/Navigation.spec.bs | 55 + playlet-lib/src/source/models/SearchFilter.bs | 43 - .../source/models/SearchSuggestionResult.bs | 10 - .../src/source/services/ApplicationInfo.bs | 127 ++ playlet-lib/src/source/services/HttpClient.bs | 690 ++++++ playlet-lib/src/source/services/Invidious.bs | 268 --- .../src/source/services/InvidiousService.bs | 170 -- .../src/source/services/InvidiousSettings.bs | 107 - .../src/source/services/PreferencesService.bs | 122 -- .../src/source/services/SearchHistory.bs | 7 +- .../src/source/services/SponsorBlock.bs | 115 - playlet-lib/src/source/utils/ArrayUtils.bs | 30 + .../src/source/utils/ArrayUtils.spec.bs | 21 + playlet-lib/src/source/utils/ColorUtils.bs | 13 + .../src/source/utils/ColorUtils.spec.bs | 28 + playlet-lib/src/source/utils/Crypto.bs | 20 - playlet-lib/src/source/utils/CryptoUtils.bs | 22 + playlet-lib/src/source/utils/DebugUtils.bs | 37 + playlet-lib/src/source/utils/ErrorUtils.bs | 24 + .../src/source/utils/FocusManagement.bs | 24 + .../src/source/utils/FocusManagement.spec.bs | 35 + playlet-lib/src/source/utils/General.bs | 130 -- playlet-lib/src/source/utils/LoadingScreen.bs | 7 + .../src/source/utils/LoadingScreen.spec.bs | 43 + playlet-lib/src/source/utils/Logging.bs | 17 + playlet-lib/src/source/utils/RingBuffer.bs | 13 +- playlet-lib/src/source/utils/StringUtils.bs | 167 +- .../src/source/utils/StringUtils.spec.bs | 19 + playlet-lib/src/source/utils/TimeUtils.bs | 43 +- .../src/source/utils/TimeUtils.spec.bs | 38 + playlet-lib/src/source/utils/Types.bs | 139 +- playlet-lib/src/source/utils/Types.spec.bs | 28 + playlet-lib/src/source/utils/WebUtils.bs | 119 - playlet-web/package-lock.json | 1918 +++-------------- playlet-web/package.json | 25 +- playlet-web/src/App.svelte | 38 +- playlet-web/src/lib/{ => Api}/Host.ts | 0 playlet-web/src/lib/{ => Api}/InvidiousApi.ts | 30 +- playlet-web/src/lib/{ => Api}/PlayletApi.ts | 89 +- playlet-web/src/lib/BottomNavigation.svelte | 4 +- playlet-web/src/lib/LinkDragDrop.svelte | 26 +- playlet-web/src/lib/NavBar.svelte | 12 +- playlet-web/src/lib/ScreenHomeRow.svelte | 82 - playlet-web/src/lib/ScreenSettings.svelte | 30 - .../src/lib/Screens/Home/PlaylistCell.svelte | 107 + .../src/lib/Screens/Home/ScreenHomeRow.svelte | 84 + .../lib/{ => Screens/Home}/VideoCell.svelte | 23 +- .../HomeScreen.svelte} | 4 +- .../InfoScreen.svelte} | 2 +- .../SearchScreen.svelte} | 13 +- .../{ => Screens/Settings}/DevSettings.svelte | 4 +- .../SettingControls/BooleanControl.svelte | 6 +- .../ClearSearchHistoryControl.svelte | 6 +- .../SettingControls/RadioControl.svelte | 6 +- .../SettingControls/StringControl.svelte | 6 +- .../Settings}/SettingsNode.svelte | 22 +- .../src/lib/Screens/SettingsScreen.svelte | 21 + playlet-web/src/lib/ThemeToggle.svelte | 38 +- playlet-web/tsconfig.json | 24 +- playlet-web/vite.config.ts | 7 +- playlet/bsconfig.json | 6 - tools/RALE/TrackerTask.xml | 2 +- tools/bs-plugins/Classes/RawCodeStatement.ts | 41 + tools/bs-plugins/asynctask-plugin.ts | 20 +- tools/bs-plugins/bindings-plugin.ts | 202 ++ tools/bs-plugins/component-includes-plugin.ts | 164 ++ tools/bs-plugins/json-yaml-plugin.ts | 44 + .../manifest-bsconst-debug-plugin.ts | 39 - tools/bs-plugins/manifest-edit-plugin.ts | 83 + tools/bs-plugins/oninit-plugin.ts | 216 ++ tools/bs-plugins/track-transpiled-plugin.ts | 68 + tools/bs-plugins/validation-plugin.ts | 58 + tools/generate-images.js | 8 +- tools/generate-sponsorblock-config.js | 5 +- tools/run-test-app.js | 196 ++ tools/sign-package.js | 4 +- tools/update-manifest-git-hash.js | 2 +- ...te-manifest-version.js => version-sync.js} | 11 +- 349 files changed, 12784 insertions(+), 7660 deletions(-) create mode 100644 .vscode/brighterscript.code-snippets create mode 100644 config/bsconfig.tests.base.json create mode 100644 docs/playlet-web-api.yml create mode 100644 playlet-app/bsconfig.json rename {playlet => playlet-app}/bsconfig.lint.json (100%) create mode 100644 playlet-app/bsconfig.tests.json create mode 100644 playlet-app/package-lock.json create mode 100644 playlet-app/package.json rename {playlet => playlet-app}/src/components/BootstrapScene/BootstrapScene.bs (96%) rename {playlet => playlet-app}/src/components/BootstrapScene/BootstrapScene.xml (100%) rename {playlet => playlet-app}/src/components/LoadingIndicator/LoadingIndicator.bs (100%) rename {playlet => playlet-app}/src/components/LoadingIndicator/LoadingIndicator.xml (100%) rename {playlet => playlet-app}/src/images/channel-poster_fhd.png (100%) rename {playlet => playlet-app}/src/images/channel-poster_hd.png (100%) rename {playlet => playlet-app}/src/images/channel-poster_sd.png (100%) rename {playlet => playlet-app}/src/images/spinner.png (100%) rename {playlet => playlet-app}/src/images/splash-screen_fhd.jpg (100%) rename {playlet => playlet-app}/src/images/splash-screen_hd.jpg (100%) rename {playlet => playlet-app}/src/images/splash-screen_sd.jpg (100%) rename {playlet => playlet-app}/src/images/vector/icons/home.svg (100%) rename {playlet => playlet-app}/src/images/vector/icons/info.svg (100%) rename {playlet => playlet-app}/src/images/vector/icons/phone.svg (100%) rename {playlet => playlet-app}/src/images/vector/icons/search.svg (100%) rename {playlet => playlet-app}/src/images/vector/icons/settings.svg (100%) rename {playlet => playlet-app}/src/images/vector/logo-dark.svg (100%) rename {playlet => playlet-app}/src/images/vector/logo-fav.svg (100%) rename {playlet => playlet-app}/src/images/vector/logo-light.svg (100%) rename {playlet => playlet-app}/src/manifest (98%) rename {playlet => playlet-app}/src/source/Dialog.bs (100%) rename {playlet => playlet-app}/src/source/Main.bs (97%) rename {playlet => playlet-app}/src/source/Manifest.bs (100%) create mode 100644 playlet-app/src/source/Manifest.spec.bs rename {playlet => playlet-app}/src/source/Registry.bs (100%) create mode 100644 playlet-lib/bsconfig.tests.json create mode 100644 playlet-lib/package-lock.json create mode 100644 playlet-lib/package.json create mode 100644 playlet-lib/src/components/AppController/AppController.bs create mode 100644 playlet-lib/src/components/AppController/AppController.xml create mode 100644 playlet-lib/src/components/AppController/AppRoot.bs create mode 100644 playlet-lib/src/components/AppController/AppRoot.xml delete mode 100644 playlet-lib/src/components/AppInfoScreen/AppVersionTask.bs create mode 100644 playlet-lib/src/components/ContentNode/ActionContentNode.xml create mode 100644 playlet-lib/src/components/ContentNode/ChannelContentNode.xml create mode 100644 playlet-lib/src/components/ContentNode/FeedContentNode.xml create mode 100644 playlet-lib/src/components/ContentNode/LoadingContentNode.xml create mode 100644 playlet-lib/src/components/ContentNode/PlaylistContentNode.xml create mode 100644 playlet-lib/src/components/ContentNode/VideoContentNode.xml create mode 100644 playlet-lib/src/components/Dialog/LoginDialog.bs create mode 100644 playlet-lib/src/components/Dialog/LoginDialog.xml create mode 100644 playlet-lib/src/components/EcpArgs.bs delete mode 100644 playlet-lib/src/components/HomeGridScreen/HomeGridScreen.bs delete mode 100644 playlet-lib/src/components/HomeGridScreen/HomeGridScreen.xml delete mode 100644 playlet-lib/src/components/HomeGridScreen/HomeGridScreenTask.bs delete mode 100644 playlet-lib/src/components/Invidious/InvidiousPublicInstancesTask.bs create mode 100644 playlet-lib/src/components/Logging/FileTransport.bs create mode 100644 playlet-lib/src/components/Logging/FileTransport.xml create mode 100644 playlet-lib/src/components/MainScene.transpiled.brs create mode 100644 playlet-lib/src/components/MainScene.transpiled.xml create mode 100644 playlet-lib/src/components/MainScene_bindings.transpiled.brs create mode 100644 playlet-lib/src/components/NavBar/NavBarItem.xml create mode 100644 playlet-lib/src/components/Navigation/Navigation.bs create mode 100644 playlet-lib/src/components/Navigation/ScrollTo.bs create mode 100644 playlet-lib/src/components/Navigation/tests/NavigationTestNode.xml create mode 100644 playlet-lib/src/components/PlayQueue/PlayQueue.bs create mode 100644 playlet-lib/src/components/PlayQueue/PlayQueue.xml create mode 100644 playlet-lib/src/components/PlaylistView/PlaylistContentTask.bs create mode 100644 playlet-lib/src/components/PlaylistView/PlaylistUtils.bs create mode 100644 playlet-lib/src/components/PlaylistView/PlaylistView.bs create mode 100644 playlet-lib/src/components/PlaylistView/PlaylistView.xml create mode 100644 playlet-lib/src/components/PlaylistView/PlaylistViewCell.bs create mode 100644 playlet-lib/src/components/PlaylistView/PlaylistViewCell.xml rename playlet-lib/src/components/{ => Screens}/AppInfoScreen/AppInfoScreen.bs (56%) rename playlet-lib/src/components/{ => Screens}/AppInfoScreen/AppInfoScreen.xml (57%) create mode 100644 playlet-lib/src/components/Screens/HomeScreen/HomeScreen.bs create mode 100644 playlet-lib/src/components/Screens/HomeScreen/HomeScreen.xml create mode 100644 playlet-lib/src/components/Screens/SearchScreen/SearchScreen.bs rename playlet-lib/src/components/{ => Screens}/SearchScreen/SearchScreen.xml (68%) rename playlet-lib/src/components/{ => Screens}/SearchScreen/SearchSuggestionsTask.bs (64%) create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/BooleanControl.bs create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/BooleanControl.xml create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/Checkbox.bs create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/Checkbox.xml create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/ClearSearchHistoryControl.bs create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/ClearSearchHistoryControl.xml create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceControl.bs create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceControl.xml create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceSettings.bs create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceSettings.xml create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTesting.bs create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTesting.xml create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTestingItem.bs create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTestingItem.xml create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTestingTask.bs create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousPublicInstances/InvidiousPublicInstances.bs create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousPublicInstances/InvidiousPublicInstances.xml create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousPublicInstances/InvidiousPublicInstancesListItem.bs create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousPublicInstances/InvidiousPublicInstancesListItem.xml create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousPublicInstances/InvidiousPublicInstancesListItemContent.xml create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousPublicInstances/InvidiousPublicInstancesTask.bs rename playlet-lib/src/components/{ => Screens}/SettingsScreen/RadioControl.bs (51%) create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/RadioControl.xml create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/SettingCategory.bs create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/SettingCategory.xml create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/SettingsScreen.bs create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/SettingsScreen.xml create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/StringControl.bs create mode 100644 playlet-lib/src/components/Screens/SettingsScreen/StringControl.xml create mode 100644 playlet-lib/src/components/Screens/WebAppScreen/GenerateQrCodeTask.bs create mode 100644 playlet-lib/src/components/Screens/WebAppScreen/WebAppScreen.bs create mode 100644 playlet-lib/src/components/Screens/WebAppScreen/WebAppScreen.xml delete mode 100644 playlet-lib/src/components/SearchScreen/SearchScreen.bs delete mode 100644 playlet-lib/src/components/SearchScreen/SearchTask.bs create mode 100644 playlet-lib/src/components/Services/ApplicationInfo/ApplicationInfo.bs create mode 100644 playlet-lib/src/components/Services/ApplicationInfo/ApplicationInfo.xml create mode 100644 playlet-lib/src/components/Services/ApplicationInfo/LatestLibVersionTask.bs create mode 100644 playlet-lib/src/components/Services/Invidious/Invidious.bs create mode 100644 playlet-lib/src/components/Services/Invidious/Invidious.xml create mode 100644 playlet-lib/src/components/Services/Invidious/InvidiousService.bs create mode 100644 playlet-lib/src/components/Services/Invidious/InvidiousToContentNode.bs create mode 100644 playlet-lib/src/components/Services/Preferences/Preferences.bs create mode 100644 playlet-lib/src/components/Services/Preferences/Preferences.xml rename playlet-lib/src/components/{SponsorBlockNotification => Services/SponsorBlock/Notifications}/SponsorBlockNotification.bs (86%) rename playlet-lib/src/components/{SponsorBlockNotification => Services/SponsorBlock/Notifications}/SponsorBlockNotification.xml (90%) create mode 100644 playlet-lib/src/components/Services/SponsorBlock/Notifications/SponsorBlockNotificationUtils.bs create mode 100644 playlet-lib/src/components/Services/SponsorBlock/SponsorBlockSegmentViewedTask.bs create mode 100644 playlet-lib/src/components/Services/SponsorBlock/SponsorBlockService.bs rename playlet-lib/src/components/{VideoPlayer => Services/SponsorBlock}/SponsorBlockTask.bs (54%) delete mode 100644 playlet-lib/src/components/SettingsScreen/BooleanControl.bs delete mode 100644 playlet-lib/src/components/SettingsScreen/BooleanControl.xml delete mode 100644 playlet-lib/src/components/SettingsScreen/ClearSearchHistoryControl.bs delete mode 100644 playlet-lib/src/components/SettingsScreen/ClearSearchHistoryControl.xml delete mode 100644 playlet-lib/src/components/SettingsScreen/RadioControl.xml delete mode 100644 playlet-lib/src/components/SettingsScreen/Settings.bs delete mode 100644 playlet-lib/src/components/SettingsScreen/SettingsScreen.bs delete mode 100644 playlet-lib/src/components/SettingsScreen/SettingsScreen.xml delete mode 100644 playlet-lib/src/components/SettingsScreen/StringControl.bs delete mode 100644 playlet-lib/src/components/SettingsScreen/StringControl.xml delete mode 100644 playlet-lib/src/components/SponsorBlockNotification/SponsorBlockNotificationManager.bs create mode 100644 playlet-lib/src/components/VideoFeed/FeedLoadState.bs create mode 100644 playlet-lib/src/components/VideoFeed/VideoRowCell/ActionRowCell.bs create mode 100644 playlet-lib/src/components/VideoFeed/VideoRowCell/ActionRowCell.xml create mode 100644 playlet-lib/src/components/VideoFeed/VideoRowCell/ChannelRowCell.bs create mode 100644 playlet-lib/src/components/VideoFeed/VideoRowCell/ChannelRowCell.xml create mode 100644 playlet-lib/src/components/VideoFeed/VideoRowCell/LoadingRowCell.bs create mode 100644 playlet-lib/src/components/VideoFeed/VideoRowCell/LoadingRowCell.xml create mode 100644 playlet-lib/src/components/VideoFeed/VideoRowCell/PlaylistRowCell.bs create mode 100644 playlet-lib/src/components/VideoFeed/VideoRowCell/PlaylistRowCell.xml create mode 100644 playlet-lib/src/components/VideoFeed/VideoRowCell/RowCell.bs create mode 100644 playlet-lib/src/components/VideoFeed/VideoRowCell/RowCell.xml create mode 100644 playlet-lib/src/components/VideoFeed/VideoRowCell/VideoRowCell.bs rename playlet-lib/src/components/{ => VideoFeed}/VideoRowCell/VideoRowCell.xml (63%) create mode 100644 playlet-lib/src/components/VideoFeed/VideoRowList.bs create mode 100644 playlet-lib/src/components/VideoFeed/VideoRowList.xml create mode 100644 playlet-lib/src/components/VideoFeed/VideoRowListContentTask.bs create mode 100644 playlet-lib/src/components/VideoFeed/VideoRowListRowContentTask.bs create mode 100644 playlet-lib/src/components/VideoPlayer/SponsorBlock.bs delete mode 100644 playlet-lib/src/components/VideoPlayer/SponsorBlockTrackingTask.bs delete mode 100644 playlet-lib/src/components/VideoPlayer/Video.bs create mode 100644 playlet-lib/src/components/VideoPlayer/VideoContentTask.bs delete mode 100644 playlet-lib/src/components/VideoPlayer/VideoDetailsTask.bs delete mode 100644 playlet-lib/src/components/VideoPlayer/VideoPlayerCaptions.bs delete mode 100644 playlet-lib/src/components/VideoPlayer/VideoPlayerCaptionsTask.bs delete mode 100644 playlet-lib/src/components/VideoPlayer/VideoPlayerSponsorBlock.bs create mode 100644 playlet-lib/src/components/VideoPlayer/VideoPlayerStyle.bs create mode 100644 playlet-lib/src/components/VideoPlayer/VideoUtils.bs delete mode 100644 playlet-lib/src/components/VideoRowCell/VideoRowCell.bs create mode 100644 playlet-lib/src/components/Web/PlayletWebServer/Middleware/InvidiousRouter.bs create mode 100644 playlet-lib/src/components/Web/PlayletWebServer/Middleware/PlayQueueRouter.bs create mode 100644 playlet-lib/src/components/Web/PlayletWebServer/Middleware/PlayletLibUrlsRouter.bs rename playlet-lib/src/components/{WebServer => Web/PlayletWebServer}/Middleware/PreferencesRouter.bs (56%) rename playlet-lib/src/components/{WebServer => Web/PlayletWebServer}/Middleware/SearchHistoryRouter.bs (100%) create mode 100644 playlet-lib/src/components/Web/PlayletWebServer/Middleware/StateApiRouter.bs create mode 100644 playlet-lib/src/components/Web/PlayletWebServer/PlayletWebServer.bs create mode 100644 playlet-lib/src/components/Web/PlayletWebServer/PlayletWebServer.xml rename playlet-lib/src/components/{WebServer => Web/WebServer/Http}/HttpConnection.bs (89%) rename playlet-lib/src/components/{WebServer => Web/WebServer/Http}/HttpConnectionState.bs (100%) rename playlet-lib/src/components/{WebServer => Web/WebServer/Http}/HttpRequest.bs (72%) rename playlet-lib/src/components/{WebServer => Web/WebServer/Http}/HttpRequestState.bs (100%) rename playlet-lib/src/components/{WebServer => Web/WebServer/Http}/HttpResponse.bs (78%) rename playlet-lib/src/components/{WebServer => Web/WebServer/Http}/HttpResponseSource.bs (100%) rename playlet-lib/src/components/{WebServer => Web/WebServer/Http}/HttpRouter.bs (100%) rename playlet-lib/src/components/{WebServer => Web/WebServer/Http}/HttpServer.bs (88%) create mode 100644 playlet-lib/src/components/Web/WebServer/Http/HttpSettings.bs create mode 100644 playlet-lib/src/components/Web/WebServer/Http/HttpUtils.bs rename playlet-lib/src/components/{ => Web}/WebServer/Middleware/CorsMiddleware.bs (100%) rename playlet-lib/src/components/{ => Web}/WebServer/Middleware/HttpDefaultRouter.bs (100%) rename playlet-lib/src/components/{ => Web}/WebServer/Middleware/HttpStaticFilesRouter.bs (84%) create mode 100644 playlet-lib/src/components/Web/WebServer/WebServer.bs create mode 100644 playlet-lib/src/components/Web/WebServer/WebServer.xml delete mode 100644 playlet-lib/src/components/WebAppScreen/WebAppScreen.bs delete mode 100644 playlet-lib/src/components/WebAppScreen/WebAppScreen.xml delete mode 100644 playlet-lib/src/components/WebServer/HttpSettings.bs delete mode 100644 playlet-lib/src/components/WebServer/Middleware/BasicAuthMiddleware.bs delete mode 100644 playlet-lib/src/components/WebServer/Middleware/CommandsApiRouter.bs delete mode 100644 playlet-lib/src/components/WebServer/Middleware/DashRouter.bs delete mode 100644 playlet-lib/src/components/WebServer/Middleware/InvidiousRouter.bs delete mode 100644 playlet-lib/src/components/WebServer/Middleware/RegistryApiRouter.bs delete mode 100644 playlet-lib/src/components/WebServer/Middleware/StateApiRouter.bs delete mode 100644 playlet-lib/src/components/WebServer/Task/WebServerTask.bs delete mode 100644 playlet-lib/src/components/WebServer/Task/WebServerTask.xml delete mode 100644 playlet-lib/src/components/WebServer/WebSocket/Middleware/WebSocketMiddleware.bs delete mode 100644 playlet-lib/src/components/WebServer/WebSocket/WebSocketConnection.bs delete mode 100644 playlet-lib/src/components/WebServer/WebSocket/WebSocketConnectionState.bs delete mode 100644 playlet-lib/src/components/WebServer/WebSocket/WebSocketFrame.bs delete mode 100644 playlet-lib/src/components/WebServer/WebSocket/WebSocketOpCode.bs delete mode 100644 playlet-lib/src/components/WebServer/WebSocket/WebSocketServer.bs create mode 100644 playlet-lib/src/components/parts/AutoBind/AutoBind.part.bs create mode 100644 playlet-lib/src/components/parts/AutoBind/AutoBind.part.xml create mode 100644 playlet-lib/src/components/parts/AutoBind/tests.transpiled/AutoBindNode1.brs create mode 100644 playlet-lib/src/components/parts/AutoBind/tests.transpiled/AutoBindNode1.xml create mode 100644 playlet-lib/src/components/parts/AutoBind/tests.transpiled/AutoBindNode1Container.brs create mode 100644 playlet-lib/src/components/parts/AutoBind/tests.transpiled/AutoBindNode1Container.xml create mode 100644 playlet-lib/src/components/parts/AutoBind/tests.transpiled/AutoBindNode1Container_bindings.brs create mode 100644 playlet-lib/src/components/parts/AutoBind/tests.transpiled/AutoBindNode1_bindings.brs create mode 100644 playlet-lib/src/components/parts/AutoBind/tests.transpiled/AutoBindNode2.brs create mode 100644 playlet-lib/src/components/parts/AutoBind/tests.transpiled/AutoBindNode2.xml create mode 100644 playlet-lib/src/components/parts/AutoBind/tests.transpiled/AutoBindNode2_bindings.brs create mode 100644 playlet-lib/src/components/parts/AutoBind/tests/AutoBindNode1.bs create mode 100644 playlet-lib/src/components/parts/AutoBind/tests/AutoBindNode1.xml create mode 100644 playlet-lib/src/components/parts/AutoBind/tests/AutoBindNode1Container.bs create mode 100644 playlet-lib/src/components/parts/AutoBind/tests/AutoBindNode1Container.xml create mode 100644 playlet-lib/src/components/parts/AutoBind/tests/AutoBindNode2.bs create mode 100644 playlet-lib/src/components/parts/AutoBind/tests/AutoBindNode2.xml create mode 100644 playlet-lib/src/components/parts/Focus/Focus.part.xml delete mode 100644 playlet-lib/src/config/ISO-639-1-to-ISO-639-2T.json create mode 100644 playlet-lib/src/config/ISO-639-1-to-ISO-639-2T.json5 delete mode 100644 playlet-lib/src/config/default_home_layout.json create mode 100644 playlet-lib/src/config/default_home_layout.json5 create mode 100644 playlet-lib/src/config/http-codes.json5 delete mode 100644 playlet-lib/src/config/invidious_video_api.json create mode 100644 playlet-lib/src/config/invidious_video_api.json5 create mode 100644 playlet-lib/src/config/mime-types.json5 delete mode 100644 playlet-lib/src/config/preferences.json create mode 100644 playlet-lib/src/config/preferences.json5 delete mode 100644 playlet-lib/src/config/sponsorblock_config.json create mode 100644 playlet-lib/src/config/sponsorblock_config.json5 create mode 100644 playlet-lib/src/images/icons/edit-48-black.png create mode 100644 playlet-lib/src/images/icons/edit-48-white.png create mode 100644 playlet-lib/src/images/icons/test-failed.png create mode 100644 playlet-lib/src/images/icons/test-passed.png create mode 100644 playlet-lib/src/source/components/tests/ApplicationInfo.spec.bs create mode 100644 playlet-lib/src/source/components/tests/NavBar.spec.bs create mode 100644 playlet-lib/src/source/components/tests/Navigation.spec.bs delete mode 100644 playlet-lib/src/source/models/SearchFilter.bs delete mode 100644 playlet-lib/src/source/models/SearchSuggestionResult.bs create mode 100644 playlet-lib/src/source/services/ApplicationInfo.bs create mode 100644 playlet-lib/src/source/services/HttpClient.bs delete mode 100644 playlet-lib/src/source/services/Invidious.bs delete mode 100644 playlet-lib/src/source/services/InvidiousService.bs delete mode 100644 playlet-lib/src/source/services/InvidiousSettings.bs delete mode 100644 playlet-lib/src/source/services/PreferencesService.bs delete mode 100644 playlet-lib/src/source/services/SponsorBlock.bs create mode 100644 playlet-lib/src/source/utils/ArrayUtils.bs create mode 100644 playlet-lib/src/source/utils/ArrayUtils.spec.bs create mode 100644 playlet-lib/src/source/utils/ColorUtils.spec.bs delete mode 100644 playlet-lib/src/source/utils/Crypto.bs create mode 100644 playlet-lib/src/source/utils/CryptoUtils.bs create mode 100644 playlet-lib/src/source/utils/DebugUtils.bs create mode 100644 playlet-lib/src/source/utils/ErrorUtils.bs create mode 100644 playlet-lib/src/source/utils/FocusManagement.bs create mode 100644 playlet-lib/src/source/utils/FocusManagement.spec.bs delete mode 100644 playlet-lib/src/source/utils/General.bs create mode 100644 playlet-lib/src/source/utils/LoadingScreen.bs create mode 100644 playlet-lib/src/source/utils/LoadingScreen.spec.bs create mode 100644 playlet-lib/src/source/utils/Logging.bs create mode 100644 playlet-lib/src/source/utils/StringUtils.spec.bs create mode 100644 playlet-lib/src/source/utils/TimeUtils.spec.bs create mode 100644 playlet-lib/src/source/utils/Types.spec.bs delete mode 100644 playlet-lib/src/source/utils/WebUtils.bs rename playlet-web/src/lib/{ => Api}/Host.ts (100%) rename playlet-web/src/lib/{ => Api}/InvidiousApi.ts (80%) rename playlet-web/src/lib/{ => Api}/PlayletApi.ts (53%) delete mode 100644 playlet-web/src/lib/ScreenHomeRow.svelte delete mode 100644 playlet-web/src/lib/ScreenSettings.svelte create mode 100644 playlet-web/src/lib/Screens/Home/PlaylistCell.svelte create mode 100644 playlet-web/src/lib/Screens/Home/ScreenHomeRow.svelte rename playlet-web/src/lib/{ => Screens/Home}/VideoCell.svelte (90%) rename playlet-web/src/lib/{ScreenHome.svelte => Screens/HomeScreen.svelte} (64%) rename playlet-web/src/lib/{ScreenInfo.svelte => Screens/InfoScreen.svelte} (98%) rename playlet-web/src/lib/{ScreenSearch.svelte => Screens/SearchScreen.svelte} (90%) rename playlet-web/src/lib/{ => Screens/Settings}/DevSettings.svelte (96%) rename playlet-web/src/lib/{ => Screens/Settings}/SettingControls/BooleanControl.svelte (82%) rename playlet-web/src/lib/{ => Screens/Settings}/SettingControls/ClearSearchHistoryControl.svelte (78%) rename playlet-web/src/lib/{ => Screens/Settings}/SettingControls/RadioControl.svelte (86%) rename playlet-web/src/lib/{ => Screens/Settings}/SettingControls/StringControl.svelte (85%) rename playlet-web/src/lib/{ => Screens/Settings}/SettingsNode.svelte (71%) create mode 100644 playlet-web/src/lib/Screens/SettingsScreen.svelte delete mode 100644 playlet/bsconfig.json create mode 100644 tools/bs-plugins/Classes/RawCodeStatement.ts create mode 100644 tools/bs-plugins/bindings-plugin.ts create mode 100644 tools/bs-plugins/component-includes-plugin.ts create mode 100644 tools/bs-plugins/json-yaml-plugin.ts delete mode 100644 tools/bs-plugins/manifest-bsconst-debug-plugin.ts create mode 100644 tools/bs-plugins/manifest-edit-plugin.ts create mode 100644 tools/bs-plugins/oninit-plugin.ts create mode 100644 tools/bs-plugins/track-transpiled-plugin.ts create mode 100644 tools/bs-plugins/validation-plugin.ts create mode 100644 tools/run-test-app.js rename tools/{update-manifest-version.js => version-sync.js} (75%) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0b665187..4c200cb1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -38,6 +38,9 @@ jobs: - name: Run formatter run: npm run format:fix + - name: Build tests + run: npm run test:build + - name: Commit & Push Changes run: | git add "." && git commit -m "Lint fix" --no-verify && git push || true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd814aa1..59d64f65 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,9 @@ jobs: - name: Install dependencies run: npm ci + - name: Build tests + run: npm run test:build + - name: Build Playlet run: npm run build:release:ci @@ -61,6 +64,6 @@ jobs: echo -e "\n$latest_release" >> docs/unstable-changelog.md - name: Create unstable release - run: gh release create unstable ./release/playlet.zip ./playlet/src/lib/playlet-lib.zip --notes-file docs/unstable-changelog.md --prerelease --title unstable + run: gh release create unstable ./release/playlet.zip ./release/playlet-lib.zip --notes-file docs/unstable-changelog.md --prerelease --title unstable env: GH_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.gitignore b/.gitignore index 3cd91e1a..560f3053 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,9 @@ +build/ dist/ out/ node_modules .env **/roku_modules/** playlet-lib/src/www -playlet/src/lib/playlet-lib.zip -release/playlet.zip -release/playlet.pkg +playlet-app/src/lib/playlet-lib.zip +release/ diff --git a/.vscode/brighterscript.code-snippets b/.vscode/brighterscript.code-snippets new file mode 100644 index 00000000..f5c2f688 --- /dev/null +++ b/.vscode/brighterscript.code-snippets @@ -0,0 +1,439 @@ +{ + "rooibos testClass": { + "prefix": "testClass", + "body": [ + "namespace Tests", + "", + "\t@suite", + "\tclass ${1:className}Tests extends Rooibos.BaseTestSuite", + "", + "\t\t@describe(\"${1:className}\")", + "", + "\t\t@it(\"${2}\")", + "\t\tfunction _()", + "\t\t\t${0}", + "\t\tend function", + "", + "\tend class", + "", + "end namespace", + "" + ] + }, + "rooibos beforeEach": { + "prefix": "beforeEach", + "body": [ + "@beforeEach", + "function ${2:namespace}_${3:itGroup}_beforeEach()", + "\t$0", + "end function" + ] + }, + "rooibos afterEach": { + "prefix": "afterEach", + "body": [ + "@afterEach", + "function ${2:namespace}_${3:itGroup}_afterEach()", + "\t$0", + "end function" + ] + }, + "rooibos setup": { + "prefix": "setup", + "body": [ + "@setup", + "function ${2:namespace}_setup()", + "\t$0", + "end function" + ] + }, + "rooibos tearDown": { + "prefix": "tearDown", + "body": [ + "@tearDown", + "function ${2:namespace}_tearDown()", + "\t$0", + "end function" + ] + }, + "rooibos ignore": { + "prefix": "ignore", + "body": [ + "@ignore ${1:reason}", + "$0" + ] + }, + "rooibos only": { + "prefix": "only", + "body": [ + "@only", + "$0" + ] + }, + "rooibos testSuite": { + "prefix": "suite", + "body": [ + "@suite(\"$1\")", + "$0" + ] + }, + "rooibos testcase": { + "prefix": "it", + "body": [ + "@it(\"$1\")", + "function _()", + "\t$0", + "end function" + ] + }, + "rooibos params": { + "prefix": "params", + "body": [ + "@params(${1:values})$0" + ] + }, + "rooibos it": { + "prefix": "describe", + "body": [ + "'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", + "@describe(\"${1:groupName}\")", + "'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", + "", + "$0" + ] + }, + "rooibos stub": { + "prefix": "stub", + "body": [ + "m.stub(${1:target}, \"${2:methodName}\", [${3:methodArgs}], ${4:result})", + "$0" + ] + }, + "rooibos mock": { + "prefix": "expect", + "body": [ + "${1:mockName} = m.mock(${2:target}, \"${3:methodName}\", ${4:expectedNumberOfcalls}, [${5:methodArgs}], ${6:result})", + "$0" + ] + }, + "rooibos expect": { + "prefix": "expect", + "body": [ + "m.expectOnce(${1:target}, \"${2:methodName}\", ${3:expectedNumberOfcalls}, [${4:methodArgs}], ${5:result})", + "$0" + ] + }, + "rooibos expectOnce": { + "prefix": "expectOnce", + "body": [ + "m.expectOnce(${1:target}, \"${2:methodName}\", [${3:methodArgs}], ${4:result})", + "$0" + ] + }, + "rooibos expectCallfunc": { + "prefix": "expectCallfunc", + "body": [ + "m.expectOnce(${1:target}, \"callFunc\", [\"${2:methodName}\", ${3:methodArgs}], ${4:result})", + "$0" + ] + }, + "rooibos expectObserveNodeField": { + "prefix": "eonf", + "body": [ + "m.expectOnce(${1:target}, \"observeNodeField\", [${2:node},\"${3:fieldName}\", m.${4:callback}])", + "$0" + ] + }, + "rooibos expectUnObserveNodeField": { + "prefix": "eunf", + "body": [ + "m.expectOnce(${1:target}, \"unobserveNodeField\", [${2:node},\"${:fieldName}\", m.${4:callback}])", + "$0" + ] + }, + "rooibos expectObjectOnce": { + "prefix": "expectObjectOnce", + "body": [ + "${1:name} = { \"id\" : \"${1:name}\" }", + "m.expectOnce(${2:target}, \"${3:methodName}\", [${4:methodArgs}], ${1:name})", + "$0" + ] + }, + "rooibos expectGetInstance": { + "prefix": "expectGetInstance", + "body": [ + "${1:name} = { \"id\" : \"${1:name}\" }", + "m.expectOnce(${2:target}, \"getInstance\", [\"${3:instanceName}\"], ${1:name})", + "$0" + ] + }, + "rooibos expectCreateSGNode": { + "prefix": "expectCreateSGNode", + "body": [ + "${1:name} = { \"id\" : \"${1:name}\" }", + "m.expectOnce(${2:target}, \"createSGNode\", [\"${3:nodeType}\"$0], ${1:name})" + ] + }, + "rooibos expectGetClassInstance": { + "prefix": "expectGetClassInstance", + "body": [ + "${1:name} = { \"id\" : \"${1:name}\" }", + "m.expectOnce(${2:target}, \"getClassInstance\", [\"${3:instanceName}\"], ${1:name})", + "$0" + ] + }, + "rooibos expectExpectOnce": { + "prefix": "expectExpect", + "body": [ + "${1:name} = { \"id\" : \"${1:name}\" }", + "m.expectOnce(${2:target}, \"${3:methodName}\", [${4:methodArgs}], ${1:name})", + "m.expectOnce(${1:name}, \"${5:methodName}\", [${6:methodArgs}], ${7:name})", + "$0" + ] + }, + "rooibos expectNone": { + "prefix": "expectNone", + "body": [ + "m.expectNone(${1:target}, \"${2:methodName}\")", + "$0" + ] + }, + "rooibos assertFalse": { + "prefix": "assertFalse", + "body": [ + "m.assertFalse(${1:value})", + "$0" + ] + }, + "rooibos assertAsync": { + "prefix": "assertAsync", + "body": [ + "m.AssertAsyncField(${1:value}, $2{:fieldName})", + "$0" + ] + }, + "rooibos assertTrue": { + "prefix": "assertTrue", + "body": [ + "m.assertTrue(${1:value})", + "$0" + ] + }, + "rooibos assertEqual": { + "prefix": "assertEqual", + "body": [ + "m.assertEqual(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertLike": { + "prefix": "assertLike", + "body": [ + "m.assertLike(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertNotEqual": { + "prefix": "assertNotEqual", + "body": [ + "m.assertNotEqual(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertInvalid": { + "prefix": "assertInvalid", + "body": [ + "m.assertInvalid(${1:value})", + "$0" + ] + }, + "rooibos assertNotInvalid": { + "prefix": "assertNotInvalid", + "body": [ + "m.assertNotInvalid(${1:value})", + "$0" + ] + }, + "rooibos assertAAHasKey": { + "prefix": "assertAAHasKey", + "body": [ + "m.assertAAHasKey(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertAANotHasKey": { + "prefix": "assertAANotHasKey", + "body": [ + "m.assertAANotHasKey(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertAAHasKeys": { + "prefix": "assertAAHasKeys", + "body": [ + "m.assertAAHasKeys(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertAANotHasKeys": { + "prefix": "assertAANotHasKeys", + "body": [ + "m.assertAANotHasKeys(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertArrayContains": { + "prefix": "assertArrayContains", + "body": [ + "m.assertArrayContains(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertArrayNotContains": { + "prefix": "assertArrayNotContains", + "body": [ + "m.assertArrayNotContains(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertArrayContainsSubset": { + "prefix": "assertArrayContainsSubset", + "body": [ + "m.assertArrayContainsSubset(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertArrayContainsAAs": { + "prefix": "assertArrayContainsAAs", + "body": [ + "m.assertArrayContainsAAs(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertArrayNotContainsSubset": { + "prefix": "assertArrayNotContainsSubset", + "body": [ + "m.assertArrayNotContainsSubset(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertArrayCount": { + "prefix": "assertArrayCount", + "body": [ + "m.assertArrayCount(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertArrayNotCount": { + "prefix": "assertArrayNotCount", + "body": [ + "m.assertArrayNotCount(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertEmpty": { + "prefix": "assertEmpty", + "body": [ + "m.assertEmpty(${1:value})", + "$0" + ] + }, + "rooibos assertNotEmpty": { + "prefix": "assertNotEmpty", + "body": [ + "m.assertNotEmpty(${1:value})", + "$0" + ] + }, + "rooibos assertArrayContainsOnlyValuesOfType": { + "prefix": "assertArrayContainsOnlyValuesOfType", + "body": [ + "m.assertArrayContainsOnlyValuesOfType(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertType": { + "prefix": "assertType", + "body": [ + "m.assertType(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertSubType": { + "prefix": "assertSubType", + "body": [ + "m.assertSubType(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertNodeCount": { + "prefix": "assertNodeCount", + "body": [ + "m.assertNodeCount(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertNodeNotCount": { + "prefix": "assertNodeNotCount", + "body": [ + "m.assertNodeNotCount(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertNodeEmpty": { + "prefix": "assertNodeEmpty", + "body": [ + "m.assertNodeEmpty(${1:value})", + "$0" + ] + }, + "rooibos assertNodeNotEmpty": { + "prefix": "assertNodeNotEmpty", + "body": [ + "m.assertNodeNotEmpty(${1:value})", + "$0" + ] + }, + "rooibos assertNodeContains": { + "prefix": "assertNodeContains", + "body": [ + "m.assertNodeContains(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertNodeNotContains": { + "prefix": "assertNodeNotContains", + "body": [ + "m.assertNodeNotContains(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertNodeContainsFields": { + "prefix": "assertNodeContainsFields", + "body": [ + "m.assertNodeContainsFields(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertNodeNotContainsFields": { + "prefix": "assertNodeNotContainsFields", + "body": [ + "m.assertNodeNotContainsFields(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertAAContainsSubset": { + "prefix": "assertAAContainsSubset", + "body": [ + "m.assertAAContainsSubset(${1:value}, ${2:expected})", + "$0" + ] + }, + "rooibos assertMocks": { + "prefix": "assertMocks", + "body": [ + "m.assertMocks(${1:value}, ${2:expected})", + "$0" + ] + } +} \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 3d18fba4..1e439137 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,5 +2,6 @@ "recommendations": [ "RokuCommunity.brightscript", "svelte.svelte-vscode", + "mrmlnc.vscode-json5", ] } \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 4746ee15..d834496e 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,6 +2,7 @@ "version": "0.2.0", "configurations": [ { + "name": "Playlet (dev)", "type": "brightscript", "request": "launch", "envFile": "${workspaceFolder}/.env", @@ -10,29 +11,32 @@ "stopOnEntry": false, "enableDebuggerAutoRecovery": false, "stopDebuggerOnAppExit": false, - "rootDir": "${workspaceFolder}/dist/build/playlet", + "rootDir": "${workspaceFolder}/build/playlet-app", "sourceDirs": [ - "${workspaceFolder}/playlet/src" + "${workspaceFolder}/playlet-app/src" ], "files": [ - "**/*" + "**" ], "componentLibraries": [ { - "rootDir": "${workspaceFolder}/dist/build/playlet-lib", + "rootDir": "${workspaceFolder}/build/playlet-lib", + "sourceDirs": [ + "${workspaceFolder}/playlet-lib/src" + ], "outFile": "playlet-lib.zip", "files": [ - "**/*" + "**" ] } ], "preLaunchTask": "build-dev", - "name": "Playlet (dev)", "injectRdbOnDeviceComponent": true, "injectRaleTrackerTask": true, "raleTrackerTaskFileLocation": "${workspaceFolder}/tools/RALE/TrackerTask.xml" }, { + "name": "Playlet (prod)", "type": "brightscript", "request": "launch", "envFile": "${workspaceFolder}/.env", @@ -41,28 +45,35 @@ "stopOnEntry": false, "enableDebuggerAutoRecovery": false, "stopDebuggerOnAppExit": false, - "rootDir": "${workspaceFolder}/dist/build/playlet", + "rootDir": "${workspaceFolder}/build/playlet-app", "sourceDirs": [ - "${workspaceFolder}/playlet/src", - "${workspaceFolder}/playlet-lib/src" + "${workspaceFolder}/playlet-app/src", ], "files": [ - "**/*", + "**", ], - "preLaunchTask": "build-prod", - "name": "Playlet (prod)" + "preLaunchTask": "build-prod" }, { - "command": "npm run dev:web", "name": "Playlet Web (Dev)", + "command": "npm run dev:web", "request": "launch", "type": "node-terminal" }, { + "name": "Playlet Web (Chrome)", "type": "chrome", "request": "launch", - "name": "Playlet Web (Chrome)", "webRoot": "${workspaceFolder}/playlet-web/src" + }, + { + "name": "Bs Plugins (lib-debug)", + "program": "${workspaceFolder}/node_modules/.bin/bsc", + "request": "launch", + "type": "node", + "args": "--log-level info --project bsconfig.tests.json --create-package --sourceMap=true --debug --test-mode --lintConfig ../config/bslint.jsonc", + "cwd": "${workspaceFolder}/playlet-lib", + "console": "integratedTerminal" } ], "compounds": [ diff --git a/.vscode/settings.json b/.vscode/settings.json index aa18bf82..474d28ad 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,7 @@ { "brightscript.output.clearConsoleOnChannelStart": false, "brightscript.bsdk": "node_modules/brighterscript", - "editor.formatOnSave": true + "editor.formatOnSave": true, + "xml.format.maxLineWidth": 0, + "svelte.enable-ts-plugin": true, } \ No newline at end of file diff --git a/config/bsconfig.base.json b/config/bsconfig.base.json index c651f0c2..22bf5b32 100644 --- a/config/bsconfig.base.json +++ b/config/bsconfig.base.json @@ -8,23 +8,41 @@ 1090 ], "diagnosticLevel": "error", + "validation": [ + { + "code": "NO_SET_FOCUS", + "regex": "\\.SetFocus\\(.+\\)", + "regexFlags": "ig", + "message": "SetFocus() is not allowed. Use NodeSetFocus() instead." + } + ], "files": [ - "source/**/*", - "components/**/*", - "images/**/*", - "!images/vector/**/*", - "fonts/**/*", - "config/**/*", - "lib/**/*", - "www/**/*.*", - "manifest" + "source/**", + "components/**", + "images/**", + "!images/vector/**", + "fonts/**", + "config/**", + "lib/**", + "www/**", + "manifest", + "!**/*.transpiled/**", + "!**/*.transpiled.*", + "!**/*.spec.bs", + "!**/tests/**" ], "lintConfig": "./config/bslint.jsonc", "plugins": [ "roku-log-bsc-plugin", "@rokucommunity/bslint", "../tools/bs-plugins/asynctask-plugin.ts", - "../tools/bs-plugins/manifest-bsconst-debug-plugin.ts" + "../tools/bs-plugins/manifest-edit-plugin.ts", + "../tools/bs-plugins/component-includes-plugin.ts", + "../tools/bs-plugins/bindings-plugin.ts", + "../tools/bs-plugins/oninit-plugin.ts", + "../tools/bs-plugins/track-transpiled-plugin.ts", + "../tools/bs-plugins/json-yaml-plugin.ts", + "../tools/bs-plugins/validation-plugin.ts" ], "retainStagingDir": true, "require": [ diff --git a/config/bsconfig.tests.base.json b/config/bsconfig.tests.base.json new file mode 100644 index 00000000..29d25ddb --- /dev/null +++ b/config/bsconfig.tests.base.json @@ -0,0 +1,39 @@ +{ + "extends": "bsconfig.base.json", + "files": [ + "source/**", + "components/**", + "images/**", + "!images/vector/**", + "fonts/**", + "config/**", + "lib/**", + "www/**", + "manifest", + "!**/*.transpiled/**", + "!**/*.transpiled.*" + ], + "plugins": [ + "roku-log-bsc-plugin", + "@rokucommunity/bslint", + "rooibos-roku", + "../tools/bs-plugins/asynctask-plugin.ts", + "../tools/bs-plugins/manifest-edit-plugin.ts", + "../tools/bs-plugins/component-includes-plugin.ts", + "../tools/bs-plugins/bindings-plugin.ts", + "../tools/bs-plugins/oninit-plugin.ts", + "../tools/bs-plugins/track-transpiled-plugin.ts", + "../tools/bs-plugins/json-yaml-plugin.ts", + "../tools/bs-plugins/validation-plugin.ts" + ], + "rooibos": { + "logLevel": 2, + "isRecordingCodeCoverage": false, + "printTestTimes": true, + "showOnlyFailures": true, + "catchCrashes": true, + "keepAppOpen": false, + "sendHomeOnFinish": true, + "lineWidth": 120 + } +} \ No newline at end of file diff --git a/config/bsfmt.jsonc b/config/bsfmt.jsonc index 4afba94c..689c204f 100644 --- a/config/bsfmt.jsonc +++ b/config/bsfmt.jsonc @@ -5,7 +5,7 @@ // For multi-line objects and arrays, move everything after // the `{` or `[` and everything before the `}` or `]` onto a new line. "formatMultiLineObjectsAndArrays": true, - "formatSingleLineCommentType": "original", + "formatSingleLineCommentType": "singlequote", // The number of spaces to use when `indentStyle` is "spaces". "indentSpaceCount": 4, // The type of whitespace to use when indenting the beginning of lines. diff --git a/config/bslint.jsonc b/config/bslint.jsonc index edfa7b79..7cc2b3e0 100644 --- a/config/bslint.jsonc +++ b/config/bslint.jsonc @@ -17,7 +17,7 @@ "eol-last": "always", "inline-if-style": "never", "named-function-style": "no-sub", - "no-print": "off", + "no-print": "warn", "no-stop": "error", "no-todo": "off", "type-annotations": "all", diff --git a/docs/README.md b/docs/README.md index ffa45795..c44aa5fb 100644 --- a/docs/README.md +++ b/docs/README.md @@ -254,7 +254,7 @@ It's important to note that if Playlet is not ON (on your Roku device) or the TV When Playlet gets built, several steps happen: 1. The web app gets kicked off first. The web app artifacts gets written to `playlet-lib/src/www` -1. Playlet lib gets built second. As part of the build pipeline, a copy of `playlet-lib.zip` is made under `playlet/src/lib/playlet-lib.zip` +1. Playlet lib gets built second. As part of the build pipeline, a copy of `playlet-lib.zip` is made under `playlet-app/src/lib/playlet-lib.zip` 1. Finally, Playlet app is built. ### Svelte development diff --git a/docs/playlet-web-api.yml b/docs/playlet-web-api.yml new file mode 100644 index 00000000..4a209047 --- /dev/null +++ b/docs/playlet-web-api.yml @@ -0,0 +1,532 @@ +openapi: 3.0.0 + +info: + title: Playlet Web API + version: 1.0.0 + description: + Playlet Web API is a RESTful API for controlling the Playlet app on + Roku devices. The API is intended to be used by the Playlet web app, but can + also be used by other apps. + contact: + name: Brahim Hadriche + url: https://github.com/iBicha + email: brahim.hadriche@gmail.com + +servers: + - url: http://{ROKU_DEV_TARGET}:{PORT} + description: Playlet server + variables: + ROKU_DEV_TARGET: + description: The IP address of the Roku device + default: 192.168.1.x + PORT: + description: The port number of the Playlet server + default: "8888" + +paths: + /api/state: + get: + summary: Get Playlet app state + description: > + Get the current state of the Playlet app. The `key` parameter is + optional and can be omitted to get the entire state. If the `key` + parameter is specified, only the specified key(s) will be returned. + operationId: getPlayletState + parameters: + - name: key + in: query + description: specific key(s) to get + required: false + schema: + type: array + items: + type: string + enum: + - app + - device + - invidious + - preferences + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/PlayletAppState" + /api/preferences: + get: + summary: Get preferences + description: | + Get the current user preferences. + operationId: getPreferences + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/PreferencesObject" + put: + summary: Set preferences + description: > + Set the current user preferences. The request body can contain some or + all of the preferences. Any preferences not specified in the request + body will be left unchanged. + operationId: setPreferences + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PreferencesObject" + responses: + "204": + description: No Content + "400": + description: Bad Request + delete: + summary: Reset preferences + description: | + Reset the current user preferences to their default values. + operationId: resetPreferences + responses: + "204": + description: No Content + /api/search-history: + get: + summary: Get search history + description: | + Get the current search history. + operationId: getSearchHistory + responses: + "200": + description: OK + content: + application/json: + schema: + type: array + items: + type: string + put: + summary: Add to search history + description: | + Add a query to the search history. + operationId: addToSearchHistory + requestBody: + content: + application/json: + schema: + type: object + properties: + query: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + type: array + items: + type: string + "400": + description: Bad Request + delete: + summary: Clear search history + description: | + Clear the search history. + operationId: clearSearchHistory + responses: + "204": + description: No Content + /api/queue: + get: + summary: Get play queue + description: Get the current videos in the queue. + operationId: getPlayQueue + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + properties: + index: + type: integer + playlistIndex + type: integer + items: + type: array + items: + $ref: "#/components/schemas/PlayQueueObject" + post: + summary: Add to play queue + description: Add a video or a playlist to the queue. + operationId: addToPlayQueue + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PlayQueueObject" + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + properties: + index: + type: integer + playlistIndex + type: integer + items: + type: array + items: + $ref: "#/components/schemas/PlayQueueObject" + delete: + summary: Clear play queue + description: Clear the play queue. + operationId: clearPlayQueue + responses: + "204": + description: No Content + /api/queue/play: + post: + summary: Play video or playlist + description: Play a video or playlist. This adds the video or playlist to the current position in the queue and plays it. + operationId: playPlayQueue + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PlayQueueObject" + responses: + "204": + description: No Content + /api/playlet-lib-urls: + get: + summary: Get Playlet lib URLs + description: Get the currently loaded Playlet lib url, and the saved ones to be loaded on next start. + operationId: getPlayletLibUrls + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + properties: + loaded: + type: object + properties: + link: + type: string + type: + type: string + saved: + type: array + items: + type: object + properties: + link: + type: string + type: + type: string + post: + summary: Set Playlet lib URLs + description: > + Set a list of Playlet lib URLs to be loaded on next start. Playlet will try to load them one after the other + until one succeeds. + operationId: setPlayletLibUrls + requestBody: + content: + application/json: + schema: + type: array + items: + type: object + properties: + link: + type: string + type: + type: string + responses: + "204": + description: No Content + "400": + description: Bad Request + delete: + summary: Clear Playlet lib URLs + description: Clear the Playlet lib URLs. This affects the saved links in the registry, and will take effect on next start. + operationId: clearPlayletLibUrls + responses: + "204": + description: No Content + + /invidious/login: + get: + summary: Redirect to the Invidious auth URL + description: Redirect to the Invidious auth URL, to allow authorizing an access token. Redirects to the Invidious auth URL. + operationId: invidiousLoginUrl + responses: + "302": + description: Found + headers: + Location: + schema: + type: string + format: uri + /invidious/logout: + get: + summary: Logout from Invidious + description: Logout from Invidious, and invalidate the token if any. + operationId: invidiousLogout + responses: + "204": + description: No Content + + # Roku External Control Protocol (ECP) + /input/{appId}: + servers: + - url: http://{ROKU_DEV_TARGET}:8060 + description: Roku ECP endpoint + variables: + ROKU_DEV_TARGET: + description: The IP address of the Roku device + default: 192.168.1.x + parameters: + - $ref: "#/components/parameters/ecpAppId" + post: + summary: Send input to Playlet through ECP + description: Send input to Playlet through Roku External Control Protocol (ECP). This enables the deep-linking functionality. + operationId: ecpInput + parameters: + - $ref: "#/components/parameters/ecpContentId" + - $ref: "#/components/parameters/ecpMediaType" + - $ref: "#/components/parameters/ecpVideoId" + - $ref: "#/components/parameters/ecpTimestamp" + - $ref: "#/components/parameters/ecpTitle" + - $ref: "#/components/parameters/ecpAuthor" + responses: + "200": + description: OK + /launch/{appId}: + servers: + - url: http://{ROKU_DEV_TARGET}:8060 + description: Roku ECP endpoint + variables: + ROKU_DEV_TARGET: + description: The IP address of the Roku device + default: 192.168.1.x + parameters: + - $ref: "#/components/parameters/ecpAppId" + post: + summary: Launch Playlet using ECP with arguments + description: Launch Playlet through Roku External Control Protocol (ECP) with arguments. This enables the deep-linking functionality. + operationId: ecpLaunch + parameters: + - $ref: "#/components/parameters/ecpClearPlayletLibUrls" + - $ref: "#/components/parameters/ecpContentId" + - $ref: "#/components/parameters/ecpMediaType" + - $ref: "#/components/parameters/ecpVideoId" + - $ref: "#/components/parameters/ecpTimestamp" + - $ref: "#/components/parameters/ecpTitle" + - $ref: "#/components/parameters/ecpAuthor" + responses: + "200": + description: OK + +components: + parameters: + ecpAppId: + name: appId + in: path + description: The app ID of the Playlet app + required: true + schema: + type: string + enum: + - "693751" # Playlet app id + - dev + default: "693751" + ecpContentId: + name: contentId + in: query + description: The ID of the content to play. If specified with mediaType=video, this is the videoId. + required: false + schema: + type: string + ecpMediaType: + name: mediaType + in: query + description: The type of the content of ContentId. To be used with the contentId argument. + required: false + schema: + type: string + enum: + - video + ecpVideoId: + name: videoId + in: query + description: The video ID of the video to play. If specified, the video will be played. + required: false + schema: + type: string + ecpTimestamp: + name: timestamp + in: query + description: The timestamp of the video to play. To be used with the contentId argument. + required: false + schema: + type: integer + ecpTitle: + name: title + in: query + description: The title of the video. This is optionally added so we can display the title while loading, or when displaying the "Added to queue" notification. + required: false + schema: + type: string + ecpAuthor: + name: author + in: query + description: The author of the video. This is optionally added so we can display the author while loading, or when displaying the "Added to queue" notification. + required: false + schema: + type: string + ecpClearPlayletLibUrls: + name: clearPlayletLibUrls + in: query + description: If specified, the Playlet lib URLs will be cleared. + required: false + schema: + type: string + + schemas: + PlayletAppState: + type: object + properties: + app: + type: object + properties: + id: + type: string + version: + type: string + git_commit_hash: + type: string + lib_version: + type: string + lib_git_commit_hash: + type: string + lib_version_latest: + type: string + lib_url_type: + type: string + device: + type: object + properties: + model: + type: string + model_display_name: + type: string + model_type: + type: string + model_details: + type: object + additionalProperties: true + os_version: + type: object + properties: + build: + type: string + major: + type: string + minor: + type: string + revision: + type: string + display_type: + type: string + display_mode: + type: string + display_aspect_ratio: + type: string + display_size: + type: object + properties: + w: + type: integer + h: + type: integer + video_mode: + type: string + ui_resolution: + type: object + properties: + height: + type: integer + name: + type: string + width: + type: integer + graphics_platform: + type: string + internet_status: + type: boolean + user_country_code: + type: string + friendly_name: + type: string + invidious: + type: object + properties: + current_instance: + type: string + auth_url: + type: string + logged_in: + type: boolean + logged_in_instance: + type: string + logged_in_username: + type: string + preferences: + $ref: "#/components/schemas/PreferencesObject" + PreferencesObject: + type: object + properties: + invidious.instance: + type: string + invidious.proxy_videos: + type: string + enum: + - always + - if_needed + - never + playback.autoplay: + type: string + enum: + - auto + - 720p + playback.preferred_quality: + type: string + sponsorblock.enabled: + type: boolean + sponsorblock.show_notifications: + type: boolean + PlayQueueObject: + type: object + properties: + videoId: + type: string + playlistId: + type: string + playlistIndex: + type: integer + timestamp: + type: integer + title: + type: string + author: + type: string diff --git a/package-lock.json b/package-lock.json index cf8c9eea..9a6aa6b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,28 +8,35 @@ "name": "playlet", "version": "0.10.3", "hasInstallScript": true, - "dependencies": { - "bslib": "npm:@rokucommunity/bslib@^0.1.1", - "log": "npm:roku-log@^0.9.3", - "roku-requests": "^1.2.0" - }, "devDependencies": { - "@rokucommunity/bslint": "^0.8.7", - "@types/node": "^20.3.1", + "@rokucommunity/bslint": "^0.8.9", + "@types/fs-extra": "^11.0.1", + "@types/node": "^20.5.9", + "@types/xml2js": "^0.4.12", "argparse": "^2.0.1", - "brighterscript": "^0.65.1", - "brighterscript-formatter": "^1.6.29", + "brighterscript": "^0.65.5", + "brighterscript-formatter": "^1.6.31", "convert-svg-to-png": "^0.6.4", "cross-fetch": "^4.0.0", "dotenv": "^16.3.1", "express": "^4.18.2", + "fs-extra": "^11.1.1", + "glob": "^10.3.4", "ip": "^1.1.8", + "json5": "^2.2.3", + "roku-deploy": "^3.10.3", "roku-log-bsc-plugin": "^0.8.1", - "ropm": "^0.10.15", - "semver": "^7.5.3", + "rooibos-roku": "^5.7.0", + "ropm": "^0.10.16", + "semver": "^7.5.4", "shelljs": "^0.8.5", "ts-node": "^10.9.1", - "typescript": "^5.1.3" + "typescript": "^5.2.2", + "xml2js": "^0.6.2", + "yaml": "^2.3.2" + }, + "engines": { + "node": "18" } }, "node_modules/@cspotcode/source-map-support": { @@ -44,6 +51,102 @@ "node": ">=12" } }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", @@ -104,6 +207,16 @@ "node": ">= 8" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@postman/form-data": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@postman/form-data/-/form-data-3.1.1.tgz", @@ -161,9 +274,9 @@ "dev": true }, "node_modules/@rokucommunity/bslint": { - "version": "0.8.7", - "resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.8.7.tgz", - "integrity": "sha512-GitkBck0mSSyksR/YQ9NUn+fZTWmk7+6hq2oyFM7F9zyx72zG1gNo/dM2WzrLf2UzVG5uSF2fMqizcYNI6IZRA==", + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.8.9.tgz", + "integrity": "sha512-7rXHcGL8XVguqzjKtsUoRvnm/g6ySJwV+xGO9n8Mc1r1zNIvjMi9Spfz1Kh8zJTXwfxOkG1X68lMAtp9bk/gxA==", "dev": true, "dependencies": { "fs-extra": "^10.0.0", @@ -178,6 +291,20 @@ "brighterscript": ">= 0.59.0 < 1" } }, + "node_modules/@rokucommunity/bslint/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", @@ -202,12 +329,40 @@ "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", "dev": true }, + "node_modules/@types/fs-extra": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.1.tgz", + "integrity": "sha512-MxObHvNl4A69ofaTRU8DFqvgzzv8s9yRtaPPm5gud9HDNvpB3GPQFvNuTWAI59B9huVGV5jXYJwbCsmBsOGYWA==", + "dev": true, + "dependencies": { + "@types/jsonfile": "*", + "@types/node": "*" + } + }, + "node_modules/@types/jsonfile": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.1.tgz", + "integrity": "sha512-GSgiRCVeapDN+3pqA35IkQwasaCh/0YFH5dEF6S88iDvEn901DjOeH3/QPY+XYP1DFzDZPvIvfeEgk+7br5png==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/node": { - "version": "20.3.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz", - "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==", + "version": "20.5.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.9.tgz", + "integrity": "sha512-PcGNd//40kHAS3sTlzKB9C9XL4K0sTup8nbG5lC14kzEteTNuAFh9u5nA0o5TWnSG2r/JNPRXFVcHJIIeRlmqQ==", "dev": true }, + "node_modules/@types/xml2js": { + "version": "0.4.12", + "resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.4.12.tgz", + "integrity": "sha512-CZPpQKBZ8db66EP5hCjwvYrLThgZvnyZrPXK2W+UI1oOaWezGt34iOaUCX4Jah2X8+rQqjvl9VKEIT8TR1I0rA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", @@ -600,9 +755,9 @@ } }, "node_modules/brighterscript": { - "version": "0.65.1", - "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.65.1.tgz", - "integrity": "sha512-OmNQd5Sckrx2K63y6cLbK8EIPqVi4yoc6bmz4k2J47NdnGib//JcMngJWG9JxJnCQCOuz1EheyPHW3jXryI7yg==", + "version": "0.65.5", + "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.65.5.tgz", + "integrity": "sha512-xDkWIZhjTLhp6dVZ6lX7zWRyNvjdiAwZncJRnErSbqRhteNJFL7ic2UDJew9zCOYTQDrG7B85lpPpXc/1JlV+Q==", "dev": true, "dependencies": { "@rokucommunity/bslib": "^0.1.1", @@ -628,7 +783,7 @@ "parse-ms": "^2.1.0", "readline": "^1.3.0", "require-relative": "^0.8.7", - "roku-deploy": "^3.10.2", + "roku-deploy": "^3.10.3", "serialize-error": "^7.0.1", "source-map": "^0.7.4", "vscode-languageserver": "7.0.0", @@ -643,12 +798,12 @@ } }, "node_modules/brighterscript-formatter": { - "version": "1.6.29", - "resolved": "https://registry.npmjs.org/brighterscript-formatter/-/brighterscript-formatter-1.6.29.tgz", - "integrity": "sha512-NfFscJM+9lEyaWrY5J9pliLOhNxiBkfsBKD8XmbigrbWpY4Ff6sqojw0Op2SFhySWy7N2e4J4inshx9FgKTI1A==", + "version": "1.6.31", + "resolved": "https://registry.npmjs.org/brighterscript-formatter/-/brighterscript-formatter-1.6.31.tgz", + "integrity": "sha512-XOc1LVAUXrWtCwAZeOUS/7gH5TbiEqZ0IwyAJcM7J5CxrFpMrw6NKg/Yox1oKaH1m11kcLR7KgckK5CTha0eYQ==", "dev": true, "dependencies": { - "brighterscript": "^0.65.0", + "brighterscript": "^0.65.4", "glob-all": "^3.3.0", "jsonc-parser": "^3.0.0", "source-map": "^0.7.3", @@ -858,6 +1013,19 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/brighterscript/node_modules/xml2js": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", + "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", + "dev": true, + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/brighterscript/node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -903,12 +1071,6 @@ "base64-js": "^1.1.2" } }, - "node_modules/bslib": { - "name": "@rokucommunity/bslib", - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@rokucommunity/bslib/-/bslib-0.1.1.tgz", - "integrity": "sha512-2ox6EUL+UTtccTbD4dbVjZK3QHa0PHCqpoKMF8lZz9ayzzEP3iVPF8KZR6hOi6bxsIcbGXVjqmtCVkpC4P9SrA==" - }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -1212,6 +1374,15 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/convert-svg-core/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, "node_modules/convert-svg-core/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -1246,6 +1417,25 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/convert-svg-core/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/convert-svg-core/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -1255,6 +1445,18 @@ "node": ">=8" } }, + "node_modules/convert-svg-core/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/convert-svg-core/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -1353,6 +1555,20 @@ "integrity": "sha512-To+sJ6plHHC6k5DfdvSVn6F1GRGJh/R6p76bCpLbyMyHEmbqFyuMAeGwDcz/nGDWH3HUcjFTTX9iUSCzCg9Eiw==", "dev": true }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/css-select": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", @@ -1576,6 +1792,12 @@ "url": "https://github.com/motdotla/dotenv?sponsor=1" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -1607,6 +1829,31 @@ "node": ">= 0.8" } }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -1865,6 +2112,34 @@ "node": ">=8" } }, + "node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.0.2.tgz", + "integrity": "sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -1913,9 +2188,9 @@ "dev": true }, "node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", + "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", "dev": true, "dependencies": { "graceful-fs": "^4.2.0", @@ -1923,7 +2198,7 @@ "universalify": "^2.0.0" }, "engines": { - "node": ">=12" + "node": ">=14.14" } }, "node_modules/fs.realpath": { @@ -2019,19 +2294,22 @@ } }, "node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "version": "10.3.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.4.tgz", + "integrity": "sha512-6LFElP3A+i/Q8XQKEvZjkEWEOTgAIALR9AO2rwT8bgPhDd1anmqDJDZ6lLddI4ehxxxR1S5RIqKe1uapMQfYaQ==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "foreground-child": "^3.1.0", + "jackspeak": "^2.0.3", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/cjs/src/bin.js" }, "engines": { - "node": ">=12" + "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -2092,15 +2370,27 @@ } }, "node_modules/glob/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob/node_modules/minipass": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.2.tgz", + "integrity": "sha512-eL79dXrE1q9dBbDCLg7xfn/vl7MS4F1gvJAgjJrQli/jbQWdUttuVawphqpffoIYfRdq78LHx6GP4bU/EQ2ATA==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" } }, "node_modules/globby": { @@ -2498,12 +2788,36 @@ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", "dev": true }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, "node_modules/isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", "dev": true }, + "node_modules/jackspeak": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.2.1.tgz", + "integrity": "sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -2540,6 +2854,18 @@ "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/jsonc-parser": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.3.1.tgz", @@ -2639,15 +2965,6 @@ "integrity": "sha512-hXt6Ul/5yWjfklSGvLQl8vM//l3FtyHZeuelpzK6mm99pNvN9yTDruNZPEJZD1oWrqo+izBmB7oUfWgcCX7s4Q==", "dev": true }, - "node_modules/log": { - "name": "roku-log", - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/roku-log/-/roku-log-0.9.3.tgz", - "integrity": "sha512-YzvtSCdmZJeimyZZ/C5Y7tdw6vpNMrZV90pg8EPn3vLAtRjtxN3dOt73s48BVOx2W00M0BEGmeaECObS2RdIqg==", - "dependencies": { - "bslib": "npm:@rokucommunity/bslib@^0.1.1" - } - }, "node_modules/log-driver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", @@ -3117,12 +3434,55 @@ "node": ">=0.10.0" } }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-scurry": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "dev": true, + "dependencies": { + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.0.tgz", + "integrity": "sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/path-scurry/node_modules/minipass": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.2.tgz", + "integrity": "sha512-eL79dXrE1q9dBbDCLg7xfn/vl7MS4F1gvJAgjJrQli/jbQWdUttuVawphqpffoIYfRdq78LHx6GP4bU/EQ2ATA==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -3570,9 +3930,9 @@ } }, "node_modules/roku-deploy": { - "version": "3.10.2", - "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.10.2.tgz", - "integrity": "sha512-oKMw8+CpbvFrNjf3g7PmhSRInTXitaFmtFhxb0ANiE+sC2p+/8wn/1/KqnYsTWPdEKUOLh0xIz2FHK9Nd5o9UA==", + "version": "3.10.3", + "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.10.3.tgz", + "integrity": "sha512-COJSQ638QklcM+8AN1nujFuzT04rTZLFuLSww35edm8w/y0l60oF/Iu7TQ46m75DwoGFzGFfomLEmA1ltQk9mA==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -3626,6 +3986,19 @@ "node": ">= 4.0.0" } }, + "node_modules/roku-deploy/node_modules/xml2js": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", + "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", + "dev": true, + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/roku-log-bsc-plugin": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/roku-log-bsc-plugin/-/roku-log-bsc-plugin-0.8.1.tgz", @@ -3682,26 +4055,70 @@ "integrity": "sha512-+a9MPUQrNGRrGU630OGbYVQ+11iOIovjCkqxajPa9w57Sd5ruK8WQNsslzpa0x/QJqC8kRc2DUxWjIFwoNm4ZQ==", "dev": true }, - "node_modules/roku-requests": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/roku-requests/-/roku-requests-1.2.0.tgz", - "integrity": "sha512-X6XakmJwxT8H+YNvjZOwH+k8rmYpD5o47k37WyZJ/brrSD6cw9xbNdxO203nz6jpso4maQJGwSJvLGZpzSQ0AA==" + "node_modules/rooibos-roku": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/rooibos-roku/-/rooibos-roku-5.7.0.tgz", + "integrity": "sha512-rkEAaowZeuLbwvtBcRZ1r5ber2yeBRqjxcwya9kfYQmDJ+m2XP8pGO9j10C0eW9hx6H7ZZl+5z1oHjnjwQsmBQ==", + "dev": true, + "dependencies": { + "source-map": "^0.7.3", + "undent": "^0.1.0", + "vscode-languageserver": "~6.1.1", + "vscode-languageserver-protocol": "~3.15.3" + } + }, + "node_modules/rooibos-roku/node_modules/vscode-jsonrpc": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-5.0.1.tgz", + "integrity": "sha512-JvONPptw3GAQGXlVV2utDcHx0BiY34FupW/kI6mZ5x06ER5DdPG/tXWMVHjTNULF5uKPOUUD0SaXg5QaubJL0A==", + "dev": true, + "engines": { + "node": ">=8.0.0 || >=10.0.0" + } + }, + "node_modules/rooibos-roku/node_modules/vscode-languageserver": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-6.1.1.tgz", + "integrity": "sha512-DueEpkUAkD5XTR4MLYNr6bQIp/UFR0/IPApgXU3YfCBCB08u2sm9hRCs6DxYZELkk++STPjpcjksR2H8qI3cDQ==", + "dev": true, + "dependencies": { + "vscode-languageserver-protocol": "^3.15.3" + }, + "bin": { + "installServerIntoExtension": "bin/installServerIntoExtension" + } + }, + "node_modules/rooibos-roku/node_modules/vscode-languageserver-protocol": { + "version": "3.15.3", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.15.3.tgz", + "integrity": "sha512-zrMuwHOAQRhjDSnflWdJG+O2ztMWss8GqUUB8dXLR/FPenwkiBNkMIJJYfSN6sgskvsF0rHAoBowNQfbyZnnvw==", + "dev": true, + "dependencies": { + "vscode-jsonrpc": "^5.0.1", + "vscode-languageserver-types": "3.15.1" + } + }, + "node_modules/rooibos-roku/node_modules/vscode-languageserver-types": { + "version": "3.15.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.15.1.tgz", + "integrity": "sha512-+a9MPUQrNGRrGU630OGbYVQ+11iOIovjCkqxajPa9w57Sd5ruK8WQNsslzpa0x/QJqC8kRc2DUxWjIFwoNm4ZQ==", + "dev": true }, "node_modules/ropm": { - "version": "0.10.15", - "resolved": "https://registry.npmjs.org/ropm/-/ropm-0.10.15.tgz", - "integrity": "sha512-uQlWIgDLNlUzHVqm9WHJ9Gtm1uomX8OMhdZq5My9xAyjdtF2vk9vtIIT/hKeaVCRWWXr/RAAcU0uiMVEiNi6ww==", + "version": "0.10.16", + "resolved": "https://registry.npmjs.org/ropm/-/ropm-0.10.16.tgz", + "integrity": "sha512-YZ49ie+dSRkyOz7RbXpku+neujhk6WfrFKUpda844W2kB0Xk/p4XtwirIdorVNtefBqEeQMXswwrVaWLNaL+vQ==", "dev": true, "dependencies": { "@xml-tools/ast": "^5.0.5", "@xml-tools/parser": "1.0.10", - "brighterscript": "^0.65.0", + "brighterscript": "^0.65.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.10.2", + "roku-deploy": "^3.10.3", "semver": "7.3.4", "yargs": "16.2.0" }, @@ -3968,9 +4385,9 @@ "dev": true }, "node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -4060,6 +4477,27 @@ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", "dev": true }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/shelljs": { "version": "0.8.5", "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", @@ -4201,6 +4639,21 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/stringify-object": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", @@ -4227,6 +4680,19 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -4422,9 +4888,9 @@ } }, "node_modules/typescript": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz", - "integrity": "sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -4444,6 +4910,12 @@ "through": "^2.3.8" } }, + "node_modules/undent": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/undent/-/undent-0.1.0.tgz", + "integrity": "sha512-vohX7ywgBjRxDNw+f3wHclSXmO0z9HsEfmGObOuG7G0yi7kZ6OtCG8kAxtDSNklmua5KR6ev2drTFqMGqpYEbg==", + "dev": true + }, "node_modules/universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -4605,6 +5077,21 @@ "webidl-conversions": "^3.0.0" } }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/which-module": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", @@ -4625,6 +5112,57 @@ "node": ">=8" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -4686,9 +5224,9 @@ } }, "node_modules/xml2js": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", - "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", + "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==", "dev": true, "dependencies": { "sax": ">=0.6.0", @@ -4719,6 +5257,15 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/yaml": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.2.tgz", + "integrity": "sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==", + "dev": true, + "engines": { + "node": ">= 14" + } + }, "node_modules/yargs": { "version": "15.4.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", diff --git a/package.json b/package.json index b65ece59..9f066a48 100644 --- a/package.json +++ b/package.json @@ -2,34 +2,35 @@ "name": "playlet", "version": "0.10.3", "description": "Unofficial Youtube client for Roku", - "dependencies": { - "bslib": "npm:@rokucommunity/bslib@^0.1.1", - "log": "npm:roku-log@^0.9.3", - "roku-requests": "^1.2.0" - }, "devDependencies": { - "@rokucommunity/bslint": "^0.8.6", - "@types/node": "^20.3.1", + "@rokucommunity/bslint": "^0.8.9", + "@types/fs-extra": "^11.0.1", + "@types/node": "^20.5.9", + "@types/xml2js": "^0.4.12", "argparse": "^2.0.1", - "brighterscript": "^0.65.1", - "brighterscript-formatter": "^1.6.29", + "brighterscript": "^0.65.5", + "brighterscript-formatter": "^1.6.31", "convert-svg-to-png": "^0.6.4", "cross-fetch": "^4.0.0", "dotenv": "^16.3.1", "express": "^4.18.2", + "fs-extra": "^11.1.1", + "glob": "^10.3.4", "ip": "^1.1.8", + "json5": "^2.2.3", + "roku-deploy": "^3.10.3", "roku-log-bsc-plugin": "^0.8.1", - "ropm": "^0.10.15", - "semver": "^7.5.3", + "rooibos-roku": "^5.7.0", + "ropm": "^0.10.16", + "semver": "^7.5.4", "shelljs": "^0.8.5", "ts-node": "^10.9.1", - "typescript": "^5.1.3" + "typescript": "^5.2.2", + "xml2js": "^0.6.2", + "yaml": "^2.3.2" }, - "ropm": { - "rootDir": "playlet-lib/src", - "noprefix": [ - "roku-requests" - ] + "engines": { + "node": "18" }, "scripts": { "dev:web": "cd playlet-web && npm run dev", @@ -37,29 +38,31 @@ "build:dev": "npm run build:web && npm run build:lib:dev && npm run build:app:dev", "build:prod": "npm run build:web && npm run build:lib:prod && npm run build:app:prod", "build:release": "npm run build:release:ci && npm run sign-package", - "build:release:ci": "npm run format:fix && npm run lint:fix && npm run manifest-version && npm run manifest-git-hash && npm run build:prod", - "build:app": "cd playlet && bsc --create-package --lintConfig ../config/bslint.jsonc", - "build:app:dev": "npm run build:app -- --debug=true", - "build:app:prod": "npm run build:app -- --debug=false --sourceMap=false", - "build:lib": "cd playlet-lib && bsc --create-package --lintConfig ../config/bslint.jsonc", - "build:lib:dev": "npm run build:lib -- --debug=true", - "build:lib:prod": "npm run build:lib -- --debug=false --sourceMap=false", + "build:release:ci": "npm run format:fix && npm run lint:fix && npm run version-sync && npm run manifest-git-hash && npm run build:prod", + "build:app:dev": "cd playlet-app && npm run build:dev", + "build:app:prod": "cd playlet-app && npm run build:prod", + "build:lib:dev": "cd playlet-lib && npm run build:dev", + "build:lib:prod": "cd playlet-lib && npm run build:prod", "build:web": "cd playlet-web && npm run build", - "lint:app": "bslint --project playlet/bsconfig.lint.json --lintConfig config/bslint.jsonc", - "lint:lib": "bslint --project playlet-lib/bsconfig.lint.json --lintConfig config/bslint.jsonc", - "lint": "npm run lint:lib && npm run lint:app", - "lint:fix": "npm run lint:lib -- --fix && npm run lint:app -- --fix", - "format:base": "bsfmt \"playlet/src/**/*.brs\" \"playlet/src/**/*.bs\" \"!playlet/src/components/lib/**/*\" \"!playlet/src/source/lib/**/*\" \"!**/bslib.brs\" \"!**/roku_modules/**/*\" \"playlet-lib/src/**/*.brs\" \"playlet-lib/src/**/*.bs\" \"!playlet-lib/src/components/lib/**/*\" \"!playlet-lib/src/source/lib/**/*\" \"!**/bslib.brs\" \"!**/roku_modules/**/*\" --bsfmt-path \"config/bsfmt.jsonc\"", - "format": "npm run format:base -- --check", - "format:fix": "npm run format:base -- --write", + "lint": "cd playlet-lib && npm run lint && cd ../playlet-app && npm run lint", + "lint:fix": "cd playlet-lib && npm run lint:fix && cd ../playlet-app && npm run lint:fix", + "format": "cd playlet-lib && npm run format && cd ../playlet-app && npm run format", + "format:fix": "cd playlet-lib && npm run format:fix && cd ../playlet-app && npm run format:fix", + "test": "npm run test:lib && npm run test:app", + "test:build": "npm run test:build:lib && npm run test:build:app", + "test:app": "cd playlet-app && npm run test", + "test:build:app": "cd playlet-app && npm run test:build", + "test:lib": "cd playlet-lib && npm run test", + "test:build:lib": "cd playlet-lib && npm run test:build", "generate-images": "node tools/generate-images.js", - "manifest-version": "node tools/update-manifest-version.js", + "version-sync": "node tools/version-sync.js", "manifest-git-hash": "node tools/update-manifest-git-hash.js", "sign-package": "node tools/sign-package.js", "screenshot": "node tools/screenshot.js", "profile-sync": "node tools/profile-sync.js", "generate-sponsorblock-config": "node tools/generate-sponsorblock-config.js", "update-rale-component": "cd tools/RALE && rm TrackerTask.xml && curl -o TrackerTask.zip https://devtools.web.roku.com/roku-advanced-layout-editor/app/TrackerTask.zip && unzip TrackerTask.zip && rm TrackerTask.zip", - "postinstall": "npx ropm copy && cd playlet-web && npm install" + "postinstall": "cd playlet-lib && npm install && cd ../playlet-app && npm install && cd ../playlet-web && npm install", + "update-deps": "npx npm-check-updates -u && cd playlet-app && npx npm-check-updates -u && cd ../playlet-lib && npx npm-check-updates -u && cd ../playlet-web && npx npm-check-updates -u" } -} +} \ No newline at end of file diff --git a/playlet-app/bsconfig.json b/playlet-app/bsconfig.json new file mode 100644 index 00000000..273d06aa --- /dev/null +++ b/playlet-app/bsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../config/bsconfig.base.json", + "rootDir": "src/", + "stagingDir": "../build/playlet-app", + "outFile": "../dist/playlet-app.zip" +} \ No newline at end of file diff --git a/playlet/bsconfig.lint.json b/playlet-app/bsconfig.lint.json similarity index 100% rename from playlet/bsconfig.lint.json rename to playlet-app/bsconfig.lint.json index 920ff760..df682fae 100644 --- a/playlet/bsconfig.lint.json +++ b/playlet-app/bsconfig.lint.json @@ -1,7 +1,7 @@ { + "extends": "bsconfig.json", "createPackage": false, "deploy": false, - "extends": "bsconfig.json", "retainStagingDir": false, "sourceMap": false } \ No newline at end of file diff --git a/playlet-app/bsconfig.tests.json b/playlet-app/bsconfig.tests.json new file mode 100644 index 00000000..d081597a --- /dev/null +++ b/playlet-app/bsconfig.tests.json @@ -0,0 +1,6 @@ +{ + "extends": "../config/bsconfig.tests.base.json", + "rootDir": "src/", + "stagingDir": "../build/playlet-app-tests", + "outFile": "../build/playlet-app-tests.zip" +} \ No newline at end of file diff --git a/playlet-app/package-lock.json b/playlet-app/package-lock.json new file mode 100644 index 00000000..acd79f21 --- /dev/null +++ b/playlet-app/package-lock.json @@ -0,0 +1,29 @@ +{ + "name": "playlet-app", + "version": "0.10.2", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "playlet-app", + "version": "0.10.2", + "hasInstallScript": true, + "dependencies": { + "bslib": "npm:@rokucommunity/bslib@^0.1.1" + } + }, + "node_modules/bslib": { + "name": "@rokucommunity/bslib", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@rokucommunity/bslib/-/bslib-0.1.1.tgz", + "integrity": "sha512-2ox6EUL+UTtccTbD4dbVjZK3QHa0PHCqpoKMF8lZz9ayzzEP3iVPF8KZR6hOi6bxsIcbGXVjqmtCVkpC4P9SrA==" + } + }, + "dependencies": { + "bslib": { + "version": "npm:@rokucommunity/bslib@0.1.1", + "resolved": "https://registry.npmjs.org/@rokucommunity/bslib/-/bslib-0.1.1.tgz", + "integrity": "sha512-2ox6EUL+UTtccTbD4dbVjZK3QHa0PHCqpoKMF8lZz9ayzzEP3iVPF8KZR6hOi6bxsIcbGXVjqmtCVkpC4P9SrA==" + } + } +} diff --git a/playlet-app/package.json b/playlet-app/package.json new file mode 100644 index 00000000..84159bd4 --- /dev/null +++ b/playlet-app/package.json @@ -0,0 +1,28 @@ +{ + "name": "playlet-app", + "version": "0.10.2", + "description": "Unofficial Youtube client for Roku", + "dependencies": { + "bslib": "npm:@rokucommunity/bslib@^0.1.1" + }, + "ropm": { + "rootDir": "./src" + }, + "scripts": { + "prebuild": "rm -rf build/playlet-app", + "prebuild:dev": "npm run prebuild", + "prebuild:prod": "npm run prebuild", + "build:dev": "bsc --create-package --debug --sourceMap=true --lintConfig ../config/bslint.jsonc", + "build:prod": "bsc --create-package --sourceMap=false --lintConfig ../config/bslint.jsonc", + "postbuild:prod": "mkdir -p ../release && cp ../dist/playlet-app.zip ../release/playlet.zip", + "lint": "bslint --project bsconfig.lint.json --lintConfig ../config/bslint.jsonc", + "lint:fix": "npm run lint -- --fix", + "format:base": "bsfmt \"src/**/*.brs\" \"src/**/*.bs\" \"!src/components/lib/**/*\" \"!src/source/lib/**/*\" \"!**/bslib.brs\" \"!**/roku_modules/**/*\" \"!**/*.transpiled/**\" \"!**/*.transpiled.*\" --bsfmt-path ../config/bsfmt.jsonc", + "format": "npm run format:base -- --check", + "format:fix": "npm run format:base -- --write", + "test": "npm run test:build && npm run test:run", + "test:build": "bsc --project bsconfig.tests.json --create-package --sourceMap=true --debug --test-mode --lintConfig ../config/bslint.jsonc", + "test:run": "node ../tools/run-test-app.js --package ../build/playlet-app-tests.zip", + "postinstall": "npx ropm copy" + } +} \ No newline at end of file diff --git a/playlet/src/components/BootstrapScene/BootstrapScene.bs b/playlet-app/src/components/BootstrapScene/BootstrapScene.bs similarity index 96% rename from playlet/src/components/BootstrapScene/BootstrapScene.bs rename to playlet-app/src/components/BootstrapScene/BootstrapScene.bs index 3d52240d..6fcf051f 100644 --- a/playlet/src/components/BootstrapScene/BootstrapScene.bs +++ b/playlet-app/src/components/BootstrapScene/BootstrapScene.bs @@ -46,6 +46,7 @@ function LoadPlayletLib() as void m.lib.observeField("loadStatus", "OnLoadStatusChanged") uri = m.playletLibUrls[m.playletLibUrlIndex].link + ' bs:disable-next-line LINT3012 ?"Loading Playlet lib from " uri m.lib.uri = uri end function @@ -54,6 +55,7 @@ function OnLoadStatusChanged() as void libUrl = m.playletLibUrls[m.playletLibUrlIndex] if m.lib.loadStatus = "ready" RemoveComponentLibrary() + ' bs:disable-next-line LINT3012 ?"Playlet lib loaded from " libUrl.link scene = m.top.getScene() scene.playletLibLoadedUrl = libUrl @@ -63,6 +65,7 @@ function OnLoadStatusChanged() as void end if if m.lib.loadStatus = "failed" + ' bs:disable-next-line LINT3012 ?"Playlet lib failed to load from " libUrl.link ' Try next url m.playletLibUrlIndex += 1 diff --git a/playlet/src/components/BootstrapScene/BootstrapScene.xml b/playlet-app/src/components/BootstrapScene/BootstrapScene.xml similarity index 100% rename from playlet/src/components/BootstrapScene/BootstrapScene.xml rename to playlet-app/src/components/BootstrapScene/BootstrapScene.xml diff --git a/playlet/src/components/LoadingIndicator/LoadingIndicator.bs b/playlet-app/src/components/LoadingIndicator/LoadingIndicator.bs similarity index 100% rename from playlet/src/components/LoadingIndicator/LoadingIndicator.bs rename to playlet-app/src/components/LoadingIndicator/LoadingIndicator.bs diff --git a/playlet/src/components/LoadingIndicator/LoadingIndicator.xml b/playlet-app/src/components/LoadingIndicator/LoadingIndicator.xml similarity index 100% rename from playlet/src/components/LoadingIndicator/LoadingIndicator.xml rename to playlet-app/src/components/LoadingIndicator/LoadingIndicator.xml diff --git a/playlet/src/images/channel-poster_fhd.png b/playlet-app/src/images/channel-poster_fhd.png similarity index 100% rename from playlet/src/images/channel-poster_fhd.png rename to playlet-app/src/images/channel-poster_fhd.png diff --git a/playlet/src/images/channel-poster_hd.png b/playlet-app/src/images/channel-poster_hd.png similarity index 100% rename from playlet/src/images/channel-poster_hd.png rename to playlet-app/src/images/channel-poster_hd.png diff --git a/playlet/src/images/channel-poster_sd.png b/playlet-app/src/images/channel-poster_sd.png similarity index 100% rename from playlet/src/images/channel-poster_sd.png rename to playlet-app/src/images/channel-poster_sd.png diff --git a/playlet/src/images/spinner.png b/playlet-app/src/images/spinner.png similarity index 100% rename from playlet/src/images/spinner.png rename to playlet-app/src/images/spinner.png diff --git a/playlet/src/images/splash-screen_fhd.jpg b/playlet-app/src/images/splash-screen_fhd.jpg similarity index 100% rename from playlet/src/images/splash-screen_fhd.jpg rename to playlet-app/src/images/splash-screen_fhd.jpg diff --git a/playlet/src/images/splash-screen_hd.jpg b/playlet-app/src/images/splash-screen_hd.jpg similarity index 100% rename from playlet/src/images/splash-screen_hd.jpg rename to playlet-app/src/images/splash-screen_hd.jpg diff --git a/playlet/src/images/splash-screen_sd.jpg b/playlet-app/src/images/splash-screen_sd.jpg similarity index 100% rename from playlet/src/images/splash-screen_sd.jpg rename to playlet-app/src/images/splash-screen_sd.jpg diff --git a/playlet/src/images/vector/icons/home.svg b/playlet-app/src/images/vector/icons/home.svg similarity index 100% rename from playlet/src/images/vector/icons/home.svg rename to playlet-app/src/images/vector/icons/home.svg diff --git a/playlet/src/images/vector/icons/info.svg b/playlet-app/src/images/vector/icons/info.svg similarity index 100% rename from playlet/src/images/vector/icons/info.svg rename to playlet-app/src/images/vector/icons/info.svg diff --git a/playlet/src/images/vector/icons/phone.svg b/playlet-app/src/images/vector/icons/phone.svg similarity index 100% rename from playlet/src/images/vector/icons/phone.svg rename to playlet-app/src/images/vector/icons/phone.svg diff --git a/playlet/src/images/vector/icons/search.svg b/playlet-app/src/images/vector/icons/search.svg similarity index 100% rename from playlet/src/images/vector/icons/search.svg rename to playlet-app/src/images/vector/icons/search.svg diff --git a/playlet/src/images/vector/icons/settings.svg b/playlet-app/src/images/vector/icons/settings.svg similarity index 100% rename from playlet/src/images/vector/icons/settings.svg rename to playlet-app/src/images/vector/icons/settings.svg diff --git a/playlet/src/images/vector/logo-dark.svg b/playlet-app/src/images/vector/logo-dark.svg similarity index 100% rename from playlet/src/images/vector/logo-dark.svg rename to playlet-app/src/images/vector/logo-dark.svg diff --git a/playlet/src/images/vector/logo-fav.svg b/playlet-app/src/images/vector/logo-fav.svg similarity index 100% rename from playlet/src/images/vector/logo-fav.svg rename to playlet-app/src/images/vector/logo-fav.svg diff --git a/playlet/src/images/vector/logo-light.svg b/playlet-app/src/images/vector/logo-light.svg similarity index 100% rename from playlet/src/images/vector/logo-light.svg rename to playlet-app/src/images/vector/logo-light.svg diff --git a/playlet/src/manifest b/playlet-app/src/manifest similarity index 98% rename from playlet/src/manifest rename to playlet-app/src/manifest index 8b8f35e0..6467e5ff 100644 --- a/playlet/src/manifest +++ b/playlet-app/src/manifest @@ -5,6 +5,8 @@ major_version=0 minor_version=10 build_version=00003 +ui_resolutions=hd + ## Channel Assets ### Main Menu Icons / Channel Poster Artwork #### Image sizes are FHD: 540x405px | HD: 290x218px | SD: 214x144px diff --git a/playlet/src/source/Dialog.bs b/playlet-app/src/source/Dialog.bs similarity index 100% rename from playlet/src/source/Dialog.bs rename to playlet-app/src/source/Dialog.bs diff --git a/playlet/src/source/Main.bs b/playlet-app/src/source/Main.bs similarity index 97% rename from playlet/src/source/Main.bs rename to playlet-app/src/source/Main.bs index dd849247..fca87901 100644 --- a/playlet/src/source/Main.bs +++ b/playlet-app/src/source/Main.bs @@ -30,9 +30,9 @@ function Main(args as object) as void ' These vars are needed to pass certification. ' The actual work is done in Playlet Lib - ' bs:disable-next-line + ' bs:disable-next-line LINT1005 contentId = args.contentId - ' bs:disable-next-line + ' bs:disable-next-line LINT1005 mediaType = args.mediaType ' Do not signal app launch complete here, we're doing it over at Playlet Lib diff --git a/playlet/src/source/Manifest.bs b/playlet-app/src/source/Manifest.bs similarity index 100% rename from playlet/src/source/Manifest.bs rename to playlet-app/src/source/Manifest.bs diff --git a/playlet-app/src/source/Manifest.spec.bs b/playlet-app/src/source/Manifest.spec.bs new file mode 100644 index 00000000..84e9d576 --- /dev/null +++ b/playlet-app/src/source/Manifest.spec.bs @@ -0,0 +1,19 @@ +namespace Tests + + @suite + class ManifestTests extends Rooibos.BaseTestSuite + + @describe("Manifest") + + @it("Reads values from manifest") + @params("title", "Playlet") + @params("supports_input_launch", "1") + @params("playlet_lib_remote_url", "https://github.com/iBicha/playlet/releases/latest/download/playlet-lib.zip") + @params("playlet_lib_embedded_url", "pkg:/lib/playlet-lib.zip") + function _(key as string, expectedValue as string) + m.assertEqual(ReadManifestValue(key), expectedValue) + end function + + end class + +end namespace diff --git a/playlet/src/source/Registry.bs b/playlet-app/src/source/Registry.bs similarity index 100% rename from playlet/src/source/Registry.bs rename to playlet-app/src/source/Registry.bs diff --git a/playlet-lib/bsconfig.json b/playlet-lib/bsconfig.json index 4e063602..a3361579 100644 --- a/playlet-lib/bsconfig.json +++ b/playlet-lib/bsconfig.json @@ -1,6 +1,6 @@ { "extends": "../config/bsconfig.base.json", "rootDir": "src/", - "stagingDir": "../dist/build/playlet-lib", - "outFile": "../playlet/src/lib/playlet-lib.zip" + "stagingDir": "../build/playlet-lib", + "outFile": "../dist/playlet-lib.zip" } \ No newline at end of file diff --git a/playlet-lib/bsconfig.lint.json b/playlet-lib/bsconfig.lint.json index 920ff760..df682fae 100644 --- a/playlet-lib/bsconfig.lint.json +++ b/playlet-lib/bsconfig.lint.json @@ -1,7 +1,7 @@ { + "extends": "bsconfig.json", "createPackage": false, "deploy": false, - "extends": "bsconfig.json", "retainStagingDir": false, "sourceMap": false } \ No newline at end of file diff --git a/playlet-lib/bsconfig.tests.json b/playlet-lib/bsconfig.tests.json new file mode 100644 index 00000000..55580457 --- /dev/null +++ b/playlet-lib/bsconfig.tests.json @@ -0,0 +1,6 @@ +{ + "extends": "../config/bsconfig.tests.base.json", + "rootDir": "src/", + "stagingDir": "../build/playlet-lib-tests", + "outFile": "../build/playlet-lib-tests.zip" +} \ No newline at end of file diff --git a/playlet-lib/package-lock.json b/playlet-lib/package-lock.json new file mode 100644 index 00000000..cdd942b8 --- /dev/null +++ b/playlet-lib/package-lock.json @@ -0,0 +1,47 @@ +{ + "name": "playlet-lib", + "version": "0.10.2", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "playlet-lib", + "version": "0.10.2", + "hasInstallScript": true, + "dependencies": { + "bslib": "npm:@rokucommunity/bslib@^0.1.1", + "log": "npm:roku-log@^0.9.3" + } + }, + "node_modules/bslib": { + "name": "@rokucommunity/bslib", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@rokucommunity/bslib/-/bslib-0.1.1.tgz", + "integrity": "sha512-2ox6EUL+UTtccTbD4dbVjZK3QHa0PHCqpoKMF8lZz9ayzzEP3iVPF8KZR6hOi6bxsIcbGXVjqmtCVkpC4P9SrA==" + }, + "node_modules/log": { + "name": "roku-log", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/roku-log/-/roku-log-0.9.3.tgz", + "integrity": "sha512-YzvtSCdmZJeimyZZ/C5Y7tdw6vpNMrZV90pg8EPn3vLAtRjtxN3dOt73s48BVOx2W00M0BEGmeaECObS2RdIqg==", + "dependencies": { + "bslib": "npm:@rokucommunity/bslib@^0.1.1" + } + } + }, + "dependencies": { + "bslib": { + "version": "npm:@rokucommunity/bslib@0.1.1", + "resolved": "https://registry.npmjs.org/@rokucommunity/bslib/-/bslib-0.1.1.tgz", + "integrity": "sha512-2ox6EUL+UTtccTbD4dbVjZK3QHa0PHCqpoKMF8lZz9ayzzEP3iVPF8KZR6hOi6bxsIcbGXVjqmtCVkpC4P9SrA==" + }, + "log": { + "version": "npm:roku-log@0.9.3", + "resolved": "https://registry.npmjs.org/roku-log/-/roku-log-0.9.3.tgz", + "integrity": "sha512-YzvtSCdmZJeimyZZ/C5Y7tdw6vpNMrZV90pg8EPn3vLAtRjtxN3dOt73s48BVOx2W00M0BEGmeaECObS2RdIqg==", + "requires": { + "bslib": "npm:@rokucommunity/bslib@^0.1.1" + } + } + } +} diff --git a/playlet-lib/package.json b/playlet-lib/package.json new file mode 100644 index 00000000..00e8f0b5 --- /dev/null +++ b/playlet-lib/package.json @@ -0,0 +1,31 @@ +{ + "name": "playlet-lib", + "version": "0.10.2", + "description": "Unofficial Youtube client for Roku", + "dependencies": { + "bslib": "npm:@rokucommunity/bslib@^0.1.1", + "log": "npm:roku-log@^0.9.3" + }, + "ropm": { + "rootDir": "./src" + }, + "scripts": { + "prebuild": "rm -rf build/playlet-lib", + "prebuild:dev": "npm run prebuild", + "prebuild:prod": "npm run prebuild", + "build:dev": "bsc --create-package --debug --sourceMap=true --lintConfig ../config/bslint.jsonc", + "build:prod": "bsc --create-package --sourceMap=false --lintConfig ../config/bslint.jsonc", + "postbuild": "mkdir -p ../release && cp ../dist/playlet-lib.zip ../playlet-app/src/lib/playlet-lib.zip", + "postbuild:dev": "npm run postbuild", + "postbuild:prod": "npm run postbuild && cp ../dist/playlet-lib.zip ../release/playlet-lib.zip", + "lint": "bslint --project bsconfig.lint.json --lintConfig ../config/bslint.jsonc", + "lint:fix": "npm run lint -- --fix", + "format:base": "bsfmt \"src/**/*.brs\" \"src/**/*.bs\" \"!src/components/lib/**/*\" \"!src/source/lib/**/*\" \"!**/bslib.brs\" \"!**/roku_modules/**/*\" \"!**/*.transpiled/**\" \"!**/*.transpiled.*\" --bsfmt-path ../config/bsfmt.jsonc", + "format": "npm run format:base -- --check", + "format:fix": "npm run format:base -- --write", + "test": "npm run test:build && npm run test:run", + "test:build": "bsc --project bsconfig.tests.json --create-package --sourceMap=true --debug --test-mode --lintConfig ../config/bslint.jsonc", + "test:run": "node ../tools/run-test-app.js --package ../build/playlet-lib-tests.zip", + "postinstall": "npx ropm copy" + } +} \ No newline at end of file diff --git a/playlet-lib/src/components/AppController/AppController.bs b/playlet-lib/src/components/AppController/AppController.bs new file mode 100644 index 00000000..aee832f5 --- /dev/null +++ b/playlet-lib/src/components/AppController/AppController.bs @@ -0,0 +1,103 @@ +import "pkg:/source/utils/Types.bs" +import "pkg:/source/utils/StringUtils.bs" +import "pkg:/source/utils/FocusManagement.bs" +import "pkg:/components/Dialog/DialogUtils.bs" +import "pkg:/source/roku_modules/log/LogMixin.brs" +import "pkg:/components/VideoPlayer/VideoUtils.bs" + +function Init() + m.screens = {} +end function + +function OnNodeReady() + m.log = new log.Logger("AppController") + + NodeSetFocus(m.top.root, true) +end function + +function PushScreen(node as object) + m.stack.appendChild(node) + FocusTopScreen(invalid) +end function + +function PopScreen(unused as dynamic) + childCount = m.stack.getChildCount() + if childCount > 1 + m.stack.removeChildIndex(childCount - 1) + FocusTopScreen(invalid) + end if +end function + +function FocusTopScreen(unused as dynamic) + childCount = m.stack.getChildCount() + topScreen = m.stack.getChild(childCount - 1) + NodeSetFocus(topScreen, true) +end function + +function HideRootScreen(screenName as string) as void + if StringUtils.IsNullOrEmpty(screenName) + return + end if + if not m.screens.DoesExist(screenName) + return + end if + screen = m.screens[screenName] + if screen = invalid + return + end if + screen.visible = false +end function + +function ShowRootScreen(screenName as string) as void + if StringUtils.IsNullOrEmpty(screenName) + return + end if + if not m.screens.DoesExist(screenName) + screen = CreateObject("roSGNode", screenName) + screen.id = screenName + m.screens[screenName] = screen + ' insert child at 0 to make sure it is behind the navbar + m.root.insertChild(screen, 0) + if screen.hasField("binding_done") + screen@.BindNode(invalid) + end if + end if + screen = m.screens[screenName] + if screen = invalid + return + end if + screen.visible = true +end function + +function GetRootScreen(screenName as string) as object + if StringUtils.IsNullOrEmpty(screenName) + return invalid + end if + if not m.screens.DoesExist(screenName) + return invalid + end if + return m.screens[screenName] +end function + +function onKeyEvent(key as string, press as boolean) as boolean + if not press + return false + end if + if key = "options" + VideoUtils.ToggleVideoPictureInPicture() + else if key = "back" + dialog = DialogUtils.ShowDialogButtons("Do you want to exit Playlet?", "Exit", ["Exit", "Cancel"]) + dialog.observeField("buttonSelected", FuncName(OnExitDialog), ["buttonSelected"]) + return true + end if + + return false +end function + +function OnExitDialog(event as object) + buttonIndex = event.GetData() + if buttonIndex = 0 ' Exit + m.log.info("Exiting app") + m.top.getScene().exitChannel = true + end if +end function diff --git a/playlet-lib/src/components/AppController/AppController.xml b/playlet-lib/src/components/AppController/AppController.xml new file mode 100644 index 00000000..54e3a370 --- /dev/null +++ b/playlet-lib/src/components/AppController/AppController.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/playlet-lib/src/components/AppController/AppRoot.bs b/playlet-lib/src/components/AppController/AppRoot.bs new file mode 100644 index 00000000..9c4abe6c --- /dev/null +++ b/playlet-lib/src/components/AppController/AppRoot.bs @@ -0,0 +1,30 @@ +import "pkg:/source/utils/FocusManagement.bs" +import "pkg:/source/utils/Types.bs" + +function Init() + m.lastFocusedChild = invalid + m.top.observeField("focusedChild", FuncName(OnFocusedChildChange)) +end function + +function OnFocusChange() as void + if not m.top.focus + return + end if + + focusNode = invalid + if m.lastFocusedChild <> invalid + focusNode = m.lastFocusedChild + else if m.top.getChildCount() > 0 + focusNode = m.top.getChild(0) + end if + + if focusNode <> invalid + NodeSetFocus(focusNode, true) + end if +end function + +function OnFocusedChildChange() as void + if m.top.focusedChild <> invalid + m.lastFocusedChild = m.top.focusedChild + end if +end function diff --git a/playlet-lib/src/components/AppController/AppRoot.xml b/playlet-lib/src/components/AppController/AppRoot.xml new file mode 100644 index 00000000..67bdb019 --- /dev/null +++ b/playlet-lib/src/components/AppController/AppRoot.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/playlet-lib/src/components/AppInfoScreen/AppVersionTask.bs b/playlet-lib/src/components/AppInfoScreen/AppVersionTask.bs deleted file mode 100644 index 809eb91a..00000000 --- a/playlet-lib/src/components/AppInfoScreen/AppVersionTask.bs +++ /dev/null @@ -1,11 +0,0 @@ -import "pkg:/source/utils/General.bs" -import "pkg:/source/roku_modules/rokurequests/Requests.brs" - -@asynctask -function AppVersionTask() as object - latest = GetLatestPlayletLibVersion() - - return { - latest: latest - } -end function diff --git a/playlet-lib/src/components/ContentNode/ActionContentNode.xml b/playlet-lib/src/components/ContentNode/ActionContentNode.xml new file mode 100644 index 00000000..9643fc02 --- /dev/null +++ b/playlet-lib/src/components/ContentNode/ActionContentNode.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/playlet-lib/src/components/ContentNode/ChannelContentNode.xml b/playlet-lib/src/components/ContentNode/ChannelContentNode.xml new file mode 100644 index 00000000..72a8eeea --- /dev/null +++ b/playlet-lib/src/components/ContentNode/ChannelContentNode.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/playlet-lib/src/components/ContentNode/FeedContentNode.xml b/playlet-lib/src/components/ContentNode/FeedContentNode.xml new file mode 100644 index 00000000..e0c9eb70 --- /dev/null +++ b/playlet-lib/src/components/ContentNode/FeedContentNode.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/playlet-lib/src/components/ContentNode/LoadingContentNode.xml b/playlet-lib/src/components/ContentNode/LoadingContentNode.xml new file mode 100644 index 00000000..dba4624f --- /dev/null +++ b/playlet-lib/src/components/ContentNode/LoadingContentNode.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/playlet-lib/src/components/ContentNode/PlaylistContentNode.xml b/playlet-lib/src/components/ContentNode/PlaylistContentNode.xml new file mode 100644 index 00000000..c1c7c0b5 --- /dev/null +++ b/playlet-lib/src/components/ContentNode/PlaylistContentNode.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/playlet-lib/src/components/ContentNode/VideoContentNode.xml b/playlet-lib/src/components/ContentNode/VideoContentNode.xml new file mode 100644 index 00000000..3607fea9 --- /dev/null +++ b/playlet-lib/src/components/ContentNode/VideoContentNode.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/playlet-lib/src/components/Dialog/DialogUtils.bs b/playlet-lib/src/components/Dialog/DialogUtils.bs index 18661e73..a3ff7497 100644 --- a/playlet-lib/src/components/Dialog/DialogUtils.bs +++ b/playlet-lib/src/components/Dialog/DialogUtils.bs @@ -1,20 +1,22 @@ -function ShowDialog(message as dynamic, title as string, large = false as boolean) as object - return ShowDialogButtons(message, title, ["Ok"], large) -end function +namespace DialogUtils + function ShowDialog(message as dynamic, title as string, large = false as boolean) as object + return ShowDialogButtons(message, title, ["Ok"], large) + end function -function ShowDialogButtons(message as dynamic, title as string, buttons as object, large = false as boolean) as object - dialog = CreateObject("roSGNode", "SimpleDialog") - if GetInterface(message, "ifArray") = invalid - message = message.Tokenize(UnixNL()).ToArray() - end if - dialog.message = message - dialog.title = title - dialog.buttons = buttons - if large - deviceInfo = CreateObject("roDeviceInfo") - displaySize = deviceInfo.GetDisplaySize() - dialog.width = displaySize.w - 100 - end if - m.top.getScene().dialog = dialog - return dialog -end function + function ShowDialogButtons(message as dynamic, title as string, buttons as object, large = false as boolean) as object + dialog = CreateObject("roSGNode", "SimpleDialog") + if GetInterface(message, "ifArray") = invalid + message = message.Tokenize(`\n`).ToArray() + end if + dialog.message = message + dialog.title = title + dialog.buttons = buttons + if large + deviceInfo = CreateObject("roDeviceInfo") + displaySize = deviceInfo.GetDisplaySize() + dialog.width = displaySize.w - 100 + end if + m.top.getScene().dialog = dialog + return dialog + end function +end namespace diff --git a/playlet-lib/src/components/Dialog/LoginDialog.bs b/playlet-lib/src/components/Dialog/LoginDialog.bs new file mode 100644 index 00000000..3c8993d4 --- /dev/null +++ b/playlet-lib/src/components/Dialog/LoginDialog.bs @@ -0,0 +1,39 @@ +import "pkg:/source/utils/Types.bs" +import "pkg:/source/asyncTask/asyncTask.bs" +import "pkg:/components/Screens/WebAppScreen/GenerateQrCodeTask.bs" +import "pkg:/source/utils/StringUtils.bs" + +function Init() + m.urlLabel = m.top.findNode("urlLabel") + m.qrCode = m.top.findNode("QrCodePoster") + + m.top.width = "920" + m.top.observeFieldScoped("buttonSelected", FuncName(Close)) +end function + +function OnNodeReady() + address = m.webserver@.GetServerAddress(invalid) + isValidIp = not StringUtils.IsNullOrEmpty(address) + if isValidIp + m.top.url = `${address}/invidious/login` + else + m.urlLabel.text = "No IP address found" + end if + + m.invidious.observeFieldScoped("authToken", FuncName(OnAuthTokenChange)) +end function + +function Close() + m.top.close = true +end function + +function OnUrlSet() + url = m.top.url + + m.urlLabel.text = url + StartAsyncTask(GenerateQrCodeTask, { qrPoster: m.qrCode, text: url }) +end function + +function OnAuthTokenChange() + Close() +end function diff --git a/playlet-lib/src/components/Dialog/LoginDialog.xml b/playlet-lib/src/components/Dialog/LoginDialog.xml new file mode 100644 index 00000000..2d751623 --- /dev/null +++ b/playlet-lib/src/components/Dialog/LoginDialog.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/playlet-lib/src/components/Dialog/SimpleDialog.bs b/playlet-lib/src/components/Dialog/SimpleDialog.bs index 77ce09a5..793a87b2 100644 --- a/playlet-lib/src/components/Dialog/SimpleDialog.bs +++ b/playlet-lib/src/components/Dialog/SimpleDialog.bs @@ -1,5 +1,7 @@ +import "pkg:/source/utils/Types.bs" + function Init() - m.top.observeField("buttonSelected", "CloseDialog") + m.top.observeField("buttonSelected", FuncName(CloseDialog)) end function function CloseDialog() diff --git a/playlet-lib/src/components/EcpArgs.bs b/playlet-lib/src/components/EcpArgs.bs new file mode 100644 index 00000000..d8532a42 --- /dev/null +++ b/playlet-lib/src/components/EcpArgs.bs @@ -0,0 +1,50 @@ +import "pkg:/source/utils/StringUtils.bs" +import "pkg:/components/VideoPlayer/VideoUtils.bs" +import "pkg:/source/utils/Types.bs" + +function InitEcpArgs() + m.playQueue = m.top.findNode("PlayQueue") + LaunchArgumentsReceived() + + m.scene.ObserveField("inputArgs", FuncName(InputArgumentsReceived)) + if m.scene.inputArgs <> invalid + InputArgumentsReceived() + end if +end function + +function LaunchArgumentsReceived() as void + launchArgs = m.scene.launchArgs + m.log.info("LaunchArgumentsReceived", launchArgs) + ProcessArguments(launchArgs) +end function + +function InputArgumentsReceived() as void + inputArgs = m.scene.inputArgs + m.log.info("InputArgumentsReceived", inputArgs) + ProcessArguments(inputArgs) +end function + +function ProcessArguments(args as object) as void + if args = invalid + return + end if + + if not StringUtils.IsNullOrEmpty(args.contentId) and args.mediaType = "video" + if StringUtils.IsNullOrEmpty(args.videoId) + args.videoId = args.contentId + end if + end if + + if args.timestamp <> invalid + args.timestamp = args.timestamp.ToInt() + end if + + if not StringUtils.IsNullOrEmpty(args.videoId) + node = CreateObject("roSGNode", "VideoContentNode") + node.videoId = args.videoId + if args.timestamp <> invalid + node.timestamp = args.timestamp + end if + m.playQueue@.Play(node, -1) + end if +end function diff --git a/playlet-lib/src/components/HomeGridScreen/HomeGridScreen.bs b/playlet-lib/src/components/HomeGridScreen/HomeGridScreen.bs deleted file mode 100644 index 7e47a503..00000000 --- a/playlet-lib/src/components/HomeGridScreen/HomeGridScreen.bs +++ /dev/null @@ -1,134 +0,0 @@ -import "pkg:/source/asyncTask/asyncTask.bs" -import "pkg:/components/VideoPlayer/Video.bs" -import "pkg:/components/HomeGridScreen/HomeGridScreenTask.bs" - -function Init() - m.rowList = m.top.FindNode("rowList") - m.top.ObserveField("rowItemSelected", "OnHomeGridScreenVideoSelected") - m.top.ObserveField("focus", "OnFocusChange") - m.top.ObserveField("refresh", "OnRefresh") -end function - -function OnFocusChange() - if m.top.focus = true - m.rowList.SetFocus(true) - end if -end function - -function OnRefresh() - InitContent() -end function - -function InitContent() - ' TODO: stop any currently running tasks before starting a new batch of tasks - m.sortedContent = [] - contentNode = CreateObject("roSGNode", "ContentNode") - contentNode.Update({ - children: [] - }, true) - m.top.content = contentNode - - m.defaultLayout = ParseJson(ReadAsciiFile("libpkg:/config/default_home_layout.json")) - - if m.defaultLayout.Count() > 0 - m.currentLoadingIndex = 0 - - ' 3 parallel tasks - for x = 1 to 3 - StartFetchTask() - end for - end if -end function - -function StartFetchTask() as void - currentLoadingIndex = m.currentLoadingIndex - m.currentLoadingIndex++ - - if currentLoadingIndex >= m.defaultLayout.Count() - if m.sortedContent.Count() = m.defaultLayout.Count() - ' All tasks are done - m.Delete("sortedContent") - end if - return - end if - - StartAsyncTask(GetHomeScreenContent, { - index: currentLoadingIndex, - requestData: m.defaultLayout[currentLoadingIndex] - }, function(output as object) as void - ' TODO: this whole logic is not good. - ' The view should have placeholder, and child nodes get replaced as - ' They get ready. - if output = invalid or not output.success - StartFetchTask() - return - end if - - m.sortedContent.Push(output.result) - - if output.result.rootChildren.Count() > 0 - m.sortedContent.SortBy("index") - - newChildren = [] - for each item in m.sortedContent - if item.rootChildren.Count() > 0 - newChildren.append(item.rootChildren) - end if - end for - - currentChildrenCount = m.top.content.children.Count() - - while m.top.content.getChildCount() > 0 - m.top.content.removeChildIndex(0) - end while - - m.top.content.Update({ - children: newChildren - }, true) - - if currentChildrenCount = 0 and newChildren.Count() > 0 - OnHomeGridScreenContentLoaded() - end if - end if - - StartFetchTask() - end function) -end function - -function OnHomeGridScreenContentLoaded() - m.global.loadingIndicator.visible = false -end function - -function OnHomeGridScreenVideoSelected(event as object) as void - grid = event.GetRoSGNode() - - selectedPair = event.GetData() - selectedRow = selectedPair[0] - selectedRowItem = selectedPair[1] - - rowContent = grid.content.GetChild(selectedRow) - itemContent = rowContent.GetChild(selectedRowItem) - - videoId = itemContent.videoId - - PlayVideo(videoId, { - metadata: itemContent, - sender: m.top - }) -end function - -function OnkeyEvent(key as string, press as boolean) as boolean - if press = false - return false - end if - if key = "options" - if ToggleVideoPictureInPicture(m.top) - return true - end if - end if - if key = "left" or key = "back" - m.top.escape = key - return true - end if - return false -end function diff --git a/playlet-lib/src/components/HomeGridScreen/HomeGridScreen.xml b/playlet-lib/src/components/HomeGridScreen/HomeGridScreen.xml deleted file mode 100644 index 0010a5bd..00000000 --- a/playlet-lib/src/components/HomeGridScreen/HomeGridScreen.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/playlet-lib/src/components/HomeGridScreen/HomeGridScreenTask.bs b/playlet-lib/src/components/HomeGridScreen/HomeGridScreenTask.bs deleted file mode 100644 index 1baf88f6..00000000 --- a/playlet-lib/src/components/HomeGridScreen/HomeGridScreenTask.bs +++ /dev/null @@ -1,51 +0,0 @@ -import "pkg:/source/services/InvidiousService.bs" - -@asynctask -function GetHomeScreenContent(input as object) as object - rootChildren = [] - - service = new InvidiousService() - - requestData = input.requestData - - response = service.MakeRequest(requestData) - if response <> invalid - for each item in response - rowContent = GetCategoryContent(item.title, item.videos) - if rowContent <> invalid - rootChildren.Push(rowContent) - end if - end for - end if - - return { - index: input.index, - rootChildren: rootChildren - } -end function - -function GetCategoryContent(category as string, json as object) as object - if json <> invalid and json.Count() > 0 - row = {} - row.title = category - row.children = [] - for each item in json ' parse items and push them to row - itemData = GetItemData(item) - if itemData <> invalid - row.children.Push(itemData) - end if - end for - return row - end if - return invalid -end function - -function GetItemData(video as object) as object - ' TODO: handle playlists and channels - if video.videoId = invalid - return invalid - end if - - return video -end function - diff --git a/playlet-lib/src/components/Invidious/InvidiousPublicInstancesTask.bs b/playlet-lib/src/components/Invidious/InvidiousPublicInstancesTask.bs deleted file mode 100644 index fd96d97c..00000000 --- a/playlet-lib/src/components/Invidious/InvidiousPublicInstancesTask.bs +++ /dev/null @@ -1,13 +0,0 @@ -import "pkg:/source/services/InvidiousSettings.bs" - -@asynctask -function InvidiousPublicInstancesTask(input as object) as object - ' TODO: Move this to a better place - ' Caching backup instances in this task to avoid having to do it in the UI thread - ' Should be moved to a better place - backupInstances = InvidiousSettings.FetchBackupInstances() - - return { - backupInstances: backupInstances - } -end function diff --git a/playlet-lib/src/components/Logging/FileTransport.bs b/playlet-lib/src/components/Logging/FileTransport.bs new file mode 100644 index 00000000..4c281cae --- /dev/null +++ b/playlet-lib/src/components/Logging/FileTransport.bs @@ -0,0 +1,19 @@ +import "pkg:/source/asyncTask/asyncTask.bs" + +function Init() + m.buffer = CreateObject("roByteArray") + + previousLogs = m.top.folder + "/" + m.top.filenamePrevious + newLogs = m.top.folder + "/" + m.top.filename + + CreateDirectory(m.top.folder) + DeleteFile(previousLogs) + MoveFile(newLogs, previousLogs) + + m.logsPath = newLogs +end function + +function logItem(name as string, levelNum as integer, text as string) as void + m.buffer.FromAsciiString(`[${name}] ${text}\n`) + m.buffer.AppendFile(m.logsPath) +end function diff --git a/playlet-lib/src/components/Logging/FileTransport.xml b/playlet-lib/src/components/Logging/FileTransport.xml new file mode 100644 index 00000000..68d580b1 --- /dev/null +++ b/playlet-lib/src/components/Logging/FileTransport.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/playlet-lib/src/components/MainScene.bs b/playlet-lib/src/components/MainScene.bs index 01aed83c..62ff134f 100644 --- a/playlet-lib/src/components/MainScene.bs +++ b/playlet-lib/src/components/MainScene.bs @@ -1,153 +1,27 @@ -import "pkg:/source/roku_modules/log/LogMixin.brs" -import "pkg:/components/VideoPlayer/Video.bs" -import "pkg:/components/Invidious/InvidiousPublicInstancesTask.bs" +import "pkg:/components/parts/AutoBind/AutoBind.part.bs" +import "pkg:/source/utils/LoadingScreen.bs" +import "pkg:/source/utils/Logging.bs" +import "pkg:/components/EcpArgs.bs" function Init() - log.initializeLogManager(["log_PrintTransport"], 2) - - m.videoContainer = m.top.findNode("VideoContainer") - m.global.addFields({ - videoContainer: m.videoContainer - }) - - m.homeGridScreen = m.top.findNode("HomeGridScreen") - m.homeGridScreen.ObserveField("escape", "OnHomeGridScreenEscape") - m.homeGridScreen.SetFocus(true) - m.currentFocued = m.homeGridScreen - - m.settingsScreen = m.top.findNode("SettingsScreen") - m.settingsScreen.ObserveField("escape", "OnSettingsScreenEscape") - - m.appInfoScreen = m.top.findNode("AppInfoScreen") - - m.webAppScreen = m.top.findNode("WebAppScreen") - - m.searchScreen = m.top.findNode("SearchScreen") - m.searchScreen.ObserveField("escape", "OnSearchScreenEscape") - - m.navBar = m.top.findNode("NavBar") - m.navBarScreens = [{ - node: m.searchScreen, - canEscape: true - }, { - node: m.homeGridScreen, - canEscape: true - }, { - node: m.settingsScreen, - canEscape: true - }, { - node: m.webAppScreen, - canEscape: false - }, { - node: m.appInfoScreen, - canEscape: false - }] - m.navBar.ObserveField("escapeIndex", "OnNavBarEscape") - m.navBar.ObserveField("focusIndex", "OnNavIndexChange") - - InitWebServer() - - StartAsyncTask(InvidiousPublicInstancesTask, {}, OnInvidiousPublicInstancesTaskResults) + InitializeLogging() + m.log = new log.Logger("MainScene") + m.scene = m.top.getScene() + ' At this point, the "MainScene" node is not yet added to the scene, and does not have a parent yet. + ' Let's wait until it has one. + m.MainSceneContainer = m.scene.findNode("MainSceneContainer") + m.MainSceneContainer.ObserveField("change", FuncName(MainSceneContainerChanged)) end function -function OnInvidiousPublicInstancesTaskResults(output as object) - backupInstances = output.result.backupInstances - m.global.addFields({ - invidiousBackupInstances: backupInstances - }) - - m.homeGridScreen.refresh = true - - LaunchArgumentsReceived() - - scene = m.top.getScene() - scene.ObserveField("inputArgs", "InputArgumentsReceived") - scene.signalBeacon("AppLaunchComplete") +function MainSceneContainerChanged() + AutoBindSceneGraph() + StartWebServer() + HideLoadingScreen() + InitEcpArgs() + m.scene.signalBeacon("AppLaunchComplete") end function -function InitWebServer() - m.serverTask = createObject("roSGNode", "WebServerTask") - m.serverTask.id = "WebServerTask" - m.serverTask.ObserveField("login", "OnWebServerLogin") - m.serverTask.ObserveField("command", "OnWebServerCommand") - m.serverTask.control = "RUN" -end function - -function OnSearchScreenEscape() - m.navBar.SetFocus(true) - m.navBar.focusIndex = 0 - m.currentFocued = m.navBar -end function - -function OnSettingsScreenEscape() - m.navBar.SetFocus(true) - m.navBar.focusIndex = 2 - m.currentFocued = m.navBar -end function - -function OnHomeGridScreenEscape() - m.navBar.SetFocus(true) - m.navBar.focusIndex = 1 - m.currentFocued = m.navBar -end function - -function OnNavBarEscape() - index = m.navBar.escapeIndex - m.navBarScreens[index].node.focus = true - if m.navBarScreens[index].canEscape - m.currentFocued = m.navBarScreens[index].node - end if -end function - -function OnNavIndexChange() as void - index = m.navBar.focusIndex - if index = -1 - return - end if - for i = 0 to m.navBarScreens.count() - 1 - m.navBarScreens[i].node.visible = i = index - end for -end function - -function OnWebServerLogin() - m.homeGridScreen.refresh = true -end function - -function OnWebServerCommand() as void - if m.serverTask.command = invalid or m.serverTask.command.command = invalid - return - end if - if m.serverTask.command.command = "play" - sender = m.videoContainer.sender ?? m.currentFocued - if m.videoContainer.fullscreen - dialog = m.top.getScene().dialog - if dialog <> invalid - dialog.close = true - end if - end if - PlayVideo(m.serverTask.command.videoId, { sender: sender, timestamp: m.serverTask.command.timestamp }) - end if -end function - -function LaunchArgumentsReceived() as void - scene = m.top.getScene() - launchArgs = scene.launchArgs - ? "LaunchArgumentsReceived " launchArgs - PlayVideoFromArgs(launchArgs) -end function - -function InputArgumentsReceived() as void - scene = m.top.getScene() - inputArgs = scene.inputArgs - ? "InputArgumentsReceived " inputArgs - PlayVideoFromArgs(inputArgs) -end function - -function PlayVideoFromArgs(args as object) as void - if args = invalid or args.contentId = invalid - return - end if - - sender = m.videoContainer.sender ?? m.currentFocued - PlayVideo(args.contentId, { sender: sender, timestamp: args.timestamp }) +function StartWebServer() + m.webServer = m.top.findNode("WebServer") + m.webServer@.StartServer(invalid) end function diff --git a/playlet-lib/src/components/MainScene.transpiled.brs b/playlet-lib/src/components/MainScene.transpiled.brs new file mode 100644 index 00000000..d8778c44 --- /dev/null +++ b/playlet-lib/src/components/MainScene.transpiled.brs @@ -0,0 +1,29 @@ +'import "pkg:/components/parts/AutoBind/AutoBind.part.bs" +'import "pkg:/source/utils/LoadingScreen.bs" +'import "pkg:/source/utils/Logging.bs" +'import "pkg:/components/EcpArgs.bs" + +function Init() + InitializeBindings() ' auto-generated! + InitializeLogging() + m.log = log_Logger("MainScene") + m.__le = m.log.enabled + m.scene = m.top.getScene() + ' At this point, the "MainScene" node is not yet added to the scene, and does not have a parent yet. + ' Let's wait until it has one. + m.MainSceneContainer = m.scene.findNode("MainSceneContainer") + m.MainSceneContainer.ObserveField("change", FuncName(MainSceneContainerChanged)) +end function + +function MainSceneContainerChanged() + AutoBindSceneGraph() + StartWebServer() + HideLoadingScreen() + InitEcpArgs() + m.scene.signalBeacon("AppLaunchComplete") +end function + +function StartWebServer() + m.webServer = m.top.findNode("WebServer") + m.webServer.callfunc("StartServer", invalid) +end function'//# sourceMappingURL=./MainScene.bs.map \ No newline at end of file diff --git a/playlet-lib/src/components/MainScene.transpiled.xml b/playlet-lib/src/components/MainScene.transpiled.xml new file mode 100644 index 00000000..081cc027 --- /dev/null +++ b/playlet-lib/src/components/MainScene.transpiled.xml @@ -0,0 +1,47 @@ + + + + + + + + + + - -{#if videoRowData} - {#if Array.isArray(videoRowData)} - {#each videoRowData as child} - - {/each} - {:else if videoRowData.title && videoRowData.videos} -
- {videoRowData.title} -
- - {/if} -{/if} diff --git a/playlet-web/src/lib/ScreenSettings.svelte b/playlet-web/src/lib/ScreenSettings.svelte deleted file mode 100644 index 48bc76b3..00000000 --- a/playlet-web/src/lib/ScreenSettings.svelte +++ /dev/null @@ -1,30 +0,0 @@ - - -
- {#each $preferencesModelStore as pref, i} - {#if pref.visibility !== "tv"} - - {#if i !== $preferencesModelStore.length - 1} -
- {/if} - {/if} - {/each} - {#if developerOptionsEnabled} -
- - {/if} -
diff --git a/playlet-web/src/lib/Screens/Home/PlaylistCell.svelte b/playlet-web/src/lib/Screens/Home/PlaylistCell.svelte new file mode 100644 index 00000000..2827b8c0 --- /dev/null +++ b/playlet-web/src/lib/Screens/Home/PlaylistCell.svelte @@ -0,0 +1,107 @@ + + + + + + + + diff --git a/playlet-web/src/lib/Screens/Home/ScreenHomeRow.svelte b/playlet-web/src/lib/Screens/Home/ScreenHomeRow.svelte new file mode 100644 index 00000000..41182066 --- /dev/null +++ b/playlet-web/src/lib/Screens/Home/ScreenHomeRow.svelte @@ -0,0 +1,84 @@ + + +{#if videos} +
+ {requestData.title} +
+ +{/if} diff --git a/playlet-web/src/lib/VideoCell.svelte b/playlet-web/src/lib/Screens/Home/VideoCell.svelte similarity index 90% rename from playlet-web/src/lib/VideoCell.svelte rename to playlet-web/src/lib/Screens/Home/VideoCell.svelte index ee67a685..0143d6e9 100644 --- a/playlet-web/src/lib/VideoCell.svelte +++ b/playlet-web/src/lib/Screens/Home/VideoCell.svelte @@ -1,7 +1,7 @@ diff --git a/playlet-web/src/lib/ScreenInfo.svelte b/playlet-web/src/lib/Screens/InfoScreen.svelte similarity index 98% rename from playlet-web/src/lib/ScreenInfo.svelte rename to playlet-web/src/lib/Screens/InfoScreen.svelte index 43e94ca2..5aca6402 100644 --- a/playlet-web/src/lib/ScreenInfo.svelte +++ b/playlet-web/src/lib/Screens/InfoScreen.svelte @@ -1,5 +1,5 @@ {#if visibility !== "tv"} @@ -34,7 +34,13 @@ {:else if type === "string"} {:else if svelteComponent} - + {:else}
{displayText}
diff --git a/playlet-web/src/lib/Screens/SettingsScreen.svelte b/playlet-web/src/lib/Screens/SettingsScreen.svelte new file mode 100644 index 00000000..9da51ed3 --- /dev/null +++ b/playlet-web/src/lib/Screens/SettingsScreen.svelte @@ -0,0 +1,21 @@ + + +
+ {#each $preferencesModelStore as pref, i} + {#if pref.visibility !== "tv"} + + {#if i !== $preferencesModelStore.length - 1} +
+ {/if} + {/if} + {/each} +
+ +
diff --git a/playlet-web/src/lib/ThemeToggle.svelte b/playlet-web/src/lib/ThemeToggle.svelte index a67a0d60..1a9b15c8 100644 --- a/playlet-web/src/lib/ThemeToggle.svelte +++ b/playlet-web/src/lib/ThemeToggle.svelte @@ -1,31 +1,39 @@
-
☀️
- -
🌙
+
☀️
+ +
🌙
diff --git a/playlet-web/tsconfig.json b/playlet-web/tsconfig.json index c4e1c5fe..8fdba151 100644 --- a/playlet-web/tsconfig.json +++ b/playlet-web/tsconfig.json @@ -5,6 +5,15 @@ "useDefineForClassFields": true, "module": "ESNext", "resolveJsonModule": true, + "baseUrl": ".", + "paths": { + "lib/*": [ + "src/lib/*" + ], + "assets/*": [ + "src/assets/*" + ], + }, /** * Typecheck JS in `.svelte` and `.js` files by default. * Disable checkJs if you'd like to use dynamic types in JS. @@ -15,6 +24,15 @@ "checkJs": true, "isolatedModules": true }, - "include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"], - "references": [{ "path": "./tsconfig.node.json" }] -} + "include": [ + "src/**/*.d.ts", + "src/**/*.ts", + "src/**/*.js", + "src/**/*.svelte" + ], + "references": [ + { + "path": "./tsconfig.node.json" + } + ] +} \ No newline at end of file diff --git a/playlet-web/vite.config.ts b/playlet-web/vite.config.ts index 1db504ef..2da577b9 100644 --- a/playlet-web/vite.config.ts +++ b/playlet-web/vite.config.ts @@ -1,21 +1,22 @@ import { defineConfig, UserConfig } from 'vite' import { svelte } from '@sveltejs/vite-plugin-svelte' +import tsconfigPaths from 'vite-tsconfig-paths' import ip from 'ip'; import { existsSync, readFileSync } from 'fs' -import { join as joinPath } from 'path' +import { join as joinPath, resolve as resolvePath } from 'path' import { parse as dotEnvParse } from 'dotenv' const PORT = 5173 const config: UserConfig = { - plugins: [svelte()], + plugins: [tsconfigPaths(), svelte()], build: { outDir: "../playlet-lib/src/www", emptyOutDir: true } } -// TODO: refactor this with the same code in tools/get-env-vars.js +// TODO:P2 refactor this with the same code in tools/get-env-vars.js function getEnvVars() { const envFile = joinPath(__dirname, '../.env'); diff --git a/playlet/bsconfig.json b/playlet/bsconfig.json deleted file mode 100644 index cf5bf9be..00000000 --- a/playlet/bsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "../config/bsconfig.base.json", - "rootDir": "src/", - "stagingDir": "../dist/build/playlet", - "outFile": "../release/playlet.zip" -} \ No newline at end of file diff --git a/tools/RALE/TrackerTask.xml b/tools/RALE/TrackerTask.xml index 2fe96b5c..ab49c5e6 100644 --- a/tools/RALE/TrackerTask.xml +++ b/tools/RALE/TrackerTask.xml @@ -79,7 +79,7 @@ Function RALE_InitConfig() as Object minSocketPort: 49152, maxSocketPort: 65535, screensaverResetTimeout: 30000, - commandTimeout: 10000, + commandTimeout: 1000, defaultLogLevel: 3, logFormat: "[RALE][%level%] - %message%" } diff --git a/tools/bs-plugins/Classes/RawCodeStatement.ts b/tools/bs-plugins/Classes/RawCodeStatement.ts new file mode 100644 index 00000000..4f3052e2 --- /dev/null +++ b/tools/bs-plugins/Classes/RawCodeStatement.ts @@ -0,0 +1,41 @@ +// https://github.com/georgejecook/rooibos/blob/c7d900deed69d109c9bf6a82ff15c190c22fb81c/bsc-plugin/src/lib/rooibos/RawCodeStatement.ts +import type { + BscFile, + WalkOptions, + WalkVisitor +} from 'brighterscript'; +import { + Range, + Statement +} from 'brighterscript'; + +import { SourceNode } from 'source-map'; + +import type { BrsTranspileState } from 'brighterscript/dist/parser/BrsTranspileState'; + +export class RawCodeStatement extends Statement { + constructor( + public source: string, + public sourceFile?: BscFile, + public range: Range = Range.create(1, 1, 1, 99999) + ) { + super(); + } + + public transpile(state: BrsTranspileState) { + //indent every line with the current transpile indent level (except the first line, because that's pre-indented by bsc) + let source = this.source.replace(/\r?\n/g, (match, newline) => { + return state.newline + state.indent(); + }); + + return [new SourceNode( + this.range.start.line + 1, + this.range.start.character, + this.sourceFile ? this.sourceFile.pathAbsolute : state.srcPath, + source + )]; + } + public walk(visitor: WalkVisitor, options: WalkOptions) { + //nothing to walk + } +} diff --git a/tools/bs-plugins/asynctask-plugin.ts b/tools/bs-plugins/asynctask-plugin.ts index 86add474..929933bc 100644 --- a/tools/bs-plugins/asynctask-plugin.ts +++ b/tools/bs-plugins/asynctask-plugin.ts @@ -1,3 +1,5 @@ +// This plugin generates a task component for each function annotated with @asynctask + import { CompilerPlugin, BscFile, @@ -17,7 +19,7 @@ declare type FunctionInFile = { } export class AsyncTaskPlugin implements CompilerPlugin { - public name = 'asyncTaskPlugin'; + public name = 'AsyncTaskPlugin'; private asyncTaskFunctions: FunctionInFile[] = [] private duplicatesReporeted: FunctionInFile[] = [] @@ -157,9 +159,15 @@ export class AsyncTaskPlugin implements CompilerPlugin { generateBsTask(functionName: string, hasInput: boolean, file: BscFile): string { return ` import "pkg:/${file.pkgPath}" +import "pkg:/source/utils/ErrorUtils.bs" function Init() m.top.functionName = "TaskMain" + m.top.cancellation = { + node: m.top, + field: "cancel", + value: true + } end function function TaskMain() @@ -167,11 +175,19 @@ function TaskMain() result = ${functionName}(${(hasInput ? "m.top.input" : "")}) m.top.setField("output", { success: true, + task: m.top, + cancelled: m.top.cancel, result: result }) catch e + #if DEBUG + print "ERROR in ${functionName}: " + print ErrorUtils.Format(e) + #end if m.top.setField("output", { success: false, + task: m.top, + cancelled: m.top.cancel, error: e }) end try @@ -187,6 +203,8 @@ end function + +