Generated task (#34)
* Async stash * tweak * Kinda works * Things work fine * Home grid task test * Convert some promises to regular tasks (#33) * Remove promise * Sponsorblock view task * Complete task cleanups * Prevent parallel search tasks * Comment * Changelog * Rename task, handle cleanups * Support task by name * Small changes
This commit is contained in:
1 parent
9a65bd4657
commit
fc20cfd7b4
27 files changed
+590
-193
No files matched your search
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Ability to clear search history from web app
|
- Ability to clear search history from web app
|
||||||
- WebSocket server for realtime events
|
- WebSocket server for realtime events
|
||||||
- SponsorBlock tracking
|
- SponsorBlock tracking
|
||||||
|
- Auto-generated tasks and the @asynctask annotation
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- The License has changed from MIT to AGPL
|
- The License has changed from MIT to AGPL
|
||||||
@@ -22,6 +23,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Bug where DASH stream is not compatible. Play format stream as a fallback
|
- Bug where DASH stream is not compatible. Play format stream as a fallback
|
||||||
- Showing upcoming videos correctly
|
- Showing upcoming videos correctly
|
||||||
|
|
||||||
|
# Removed
|
||||||
|
- Dependency on [roku-promise](https://github.com/rokucommunity/roku-promise)
|
||||||
|
|
||||||
## [0.5.0] - 2022-12-02
|
## [0.5.0] - 2022-12-02
|
||||||
### Added
|
### Added
|
||||||
- Version check in settings page
|
- Version check in settings page
|
||||||
|
|||||||
@@ -20,9 +20,13 @@
|
|||||||
"lintConfig": "config/bslint.jsonc",
|
"lintConfig": "config/bslint.jsonc",
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"roku-log-bsc-plugin",
|
"roku-log-bsc-plugin",
|
||||||
"@rokucommunity/bslint"
|
"@rokucommunity/bslint",
|
||||||
|
"../scripts/asynctask-plugin.ts"
|
||||||
],
|
],
|
||||||
"retainStagingDir": true,
|
"retainStagingDir": true,
|
||||||
|
"require": [
|
||||||
|
"ts-node/register"
|
||||||
|
],
|
||||||
"rokuLog": {
|
"rokuLog": {
|
||||||
"insertPkgPath": true,
|
"insertPkgPath": true,
|
||||||
"removeComments": false,
|
"removeComments": false,
|
||||||
|
|||||||
Generated
+332
-18
@@ -11,18 +11,57 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bslib": "npm:@rokucommunity/bslib@^0.1.1",
|
"bslib": "npm:@rokucommunity/bslib@^0.1.1",
|
||||||
"log": "npm:roku-log@^0.8.0",
|
"log": "npm:roku-log@^0.8.0",
|
||||||
"roku-promise": "^0.2.1",
|
|
||||||
"roku-requests": "^0.2.0"
|
"roku-requests": "^0.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rokucommunity/bslint": "^0.7.5",
|
"@rokucommunity/bslint": "^0.7.5",
|
||||||
|
"@types/node": "^18.11.18",
|
||||||
"brighterscript": "^0.60.6",
|
"brighterscript": "^0.60.6",
|
||||||
"brighterscript-formatter": "^1.6.19",
|
"brighterscript-formatter": "^1.6.19",
|
||||||
"convert-svg-to-png": "^0.6.4",
|
"convert-svg-to-png": "^0.6.4",
|
||||||
"dotenv": "^16.0.3",
|
"dotenv": "^16.0.3",
|
||||||
"roku-log-bsc-plugin": "^0.6.1",
|
"roku-log-bsc-plugin": "^0.6.1",
|
||||||
"ropm": "^0.10.10",
|
"ropm": "^0.10.10",
|
||||||
"semver": "^7.3.8"
|
"semver": "^7.3.8",
|
||||||
|
"ts-node": "^10.9.1",
|
||||||
|
"typescript": "^4.9.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@cspotcode/source-map-support": {
|
||||||
|
"version": "0.8.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
|
||||||
|
"integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@jridgewell/trace-mapping": "0.3.9"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@jridgewell/resolve-uri": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@jridgewell/sourcemap-codec": {
|
||||||
|
"version": "1.4.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
|
||||||
|
"integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"node_modules/@jridgewell/trace-mapping": {
|
||||||
|
"version": "0.3.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
|
||||||
|
"integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@jridgewell/resolve-uri": "^3.0.3",
|
||||||
|
"@jridgewell/sourcemap-codec": "^1.4.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@nodelib/fs.scandir": {
|
"node_modules/@nodelib/fs.scandir": {
|
||||||
@@ -84,10 +123,34 @@
|
|||||||
"brighterscript": ">= 0.43 < 1"
|
"brighterscript": ">= 0.43 < 1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@tsconfig/node10": {
|
||||||
|
"version": "1.0.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
|
||||||
|
"integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"node_modules/@tsconfig/node12": {
|
||||||
|
"version": "1.0.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
|
||||||
|
"integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"node_modules/@tsconfig/node14": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"node_modules/@tsconfig/node16": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "14.18.33",
|
"version": "18.11.18",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.33.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz",
|
||||||
"integrity": "sha512-qelS/Ra6sacc4loe/3MSjXNL1dNQ/GjxNHVzuChwMfmk7HuycRLVQN2qNY3XahK+fZc5E2szqQSKUyAF0E+2bg==",
|
"integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/yauzl": {
|
"node_modules/@types/yauzl": {
|
||||||
@@ -138,6 +201,27 @@
|
|||||||
"regexp-to-ast": "0.5.0"
|
"regexp-to-ast": "0.5.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/acorn": {
|
||||||
|
"version": "8.8.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz",
|
||||||
|
"integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==",
|
||||||
|
"dev": true,
|
||||||
|
"bin": {
|
||||||
|
"acorn": "bin/acorn"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/acorn-walk": {
|
||||||
|
"version": "8.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
|
||||||
|
"integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/agent-base": {
|
"node_modules/agent-base": {
|
||||||
"version": "6.0.2",
|
"version": "6.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||||
@@ -213,6 +297,12 @@
|
|||||||
"node": ">= 8"
|
"node": ">= 8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/arg": {
|
||||||
|
"version": "4.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
|
||||||
|
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/array-flat-polyfill": {
|
"node_modules/array-flat-polyfill": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/array-flat-polyfill/-/array-flat-polyfill-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/array-flat-polyfill/-/array-flat-polyfill-1.0.1.tgz",
|
||||||
@@ -1061,6 +1151,12 @@
|
|||||||
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
|
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/create-require": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/cross-fetch": {
|
"node_modules/cross-fetch": {
|
||||||
"version": "3.1.5",
|
"version": "3.1.5",
|
||||||
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz",
|
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz",
|
||||||
@@ -1200,6 +1296,15 @@
|
|||||||
"integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==",
|
"integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/diff": {
|
||||||
|
"version": "4.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
|
||||||
|
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.3.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/dir-glob": {
|
"node_modules/dir-glob": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
|
||||||
@@ -2043,6 +2148,12 @@
|
|||||||
"node": "*"
|
"node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/make-error": {
|
||||||
|
"version": "1.3.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
|
||||||
|
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/merge2": {
|
"node_modules/merge2": {
|
||||||
"version": "1.4.1",
|
"version": "1.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
|
||||||
@@ -2696,6 +2807,12 @@
|
|||||||
"vscode-languageserver-protocol": "~3.15.3"
|
"vscode-languageserver-protocol": "~3.15.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/roku-log-bsc-plugin/node_modules/@types/node": {
|
||||||
|
"version": "14.18.36",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.36.tgz",
|
||||||
|
"integrity": "sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/roku-log-bsc-plugin/node_modules/vscode-jsonrpc": {
|
"node_modules/roku-log-bsc-plugin/node_modules/vscode-jsonrpc": {
|
||||||
"version": "5.0.1",
|
"version": "5.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-5.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-5.0.1.tgz",
|
||||||
@@ -2733,11 +2850,6 @@
|
|||||||
"integrity": "sha512-+a9MPUQrNGRrGU630OGbYVQ+11iOIovjCkqxajPa9w57Sd5ruK8WQNsslzpa0x/QJqC8kRc2DUxWjIFwoNm4ZQ==",
|
"integrity": "sha512-+a9MPUQrNGRrGU630OGbYVQ+11iOIovjCkqxajPa9w57Sd5ruK8WQNsslzpa0x/QJqC8kRc2DUxWjIFwoNm4ZQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/roku-promise": {
|
|
||||||
"version": "0.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/roku-promise/-/roku-promise-0.2.1.tgz",
|
|
||||||
"integrity": "sha512-4wKUtmQD1TOBzUZMMfblBu8Q5rw1XK2tB4pkm1GbJs8D+xgYlW1GgAlK5yDSzX6wCjn+dHgFCFEHtJiC4WMjRg=="
|
|
||||||
},
|
|
||||||
"node_modules/roku-requests": {
|
"node_modules/roku-requests": {
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/roku-requests/-/roku-requests-0.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/roku-requests/-/roku-requests-0.2.0.tgz",
|
||||||
@@ -3308,6 +3420,49 @@
|
|||||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
|
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/ts-node": {
|
||||||
|
"version": "10.9.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
|
||||||
|
"integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@cspotcode/source-map-support": "^0.8.0",
|
||||||
|
"@tsconfig/node10": "^1.0.7",
|
||||||
|
"@tsconfig/node12": "^1.0.7",
|
||||||
|
"@tsconfig/node14": "^1.0.0",
|
||||||
|
"@tsconfig/node16": "^1.0.2",
|
||||||
|
"acorn": "^8.4.1",
|
||||||
|
"acorn-walk": "^8.1.1",
|
||||||
|
"arg": "^4.1.0",
|
||||||
|
"create-require": "^1.1.0",
|
||||||
|
"diff": "^4.0.1",
|
||||||
|
"make-error": "^1.1.1",
|
||||||
|
"v8-compile-cache-lib": "^3.0.1",
|
||||||
|
"yn": "3.1.1"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"ts-node": "dist/bin.js",
|
||||||
|
"ts-node-cwd": "dist/bin-cwd.js",
|
||||||
|
"ts-node-esm": "dist/bin-esm.js",
|
||||||
|
"ts-node-script": "dist/bin-script.js",
|
||||||
|
"ts-node-transpile-only": "dist/bin-transpile.js",
|
||||||
|
"ts-script": "dist/bin-script-deprecated.js"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@swc/core": ">=1.2.50",
|
||||||
|
"@swc/wasm": ">=1.2.50",
|
||||||
|
"@types/node": "*",
|
||||||
|
"typescript": ">=2.7"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"@swc/core": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"@swc/wasm": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/tunnel-agent": {
|
"node_modules/tunnel-agent": {
|
||||||
"version": "0.6.0",
|
"version": "0.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
||||||
@@ -3338,6 +3493,19 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/typescript": {
|
||||||
|
"version": "4.9.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz",
|
||||||
|
"integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==",
|
||||||
|
"dev": true,
|
||||||
|
"bin": {
|
||||||
|
"tsc": "bin/tsc",
|
||||||
|
"tsserver": "bin/tsserver"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/unbzip2-stream": {
|
"node_modules/unbzip2-stream": {
|
||||||
"version": "1.4.3",
|
"version": "1.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz",
|
||||||
@@ -3382,6 +3550,12 @@
|
|||||||
"uuid": "bin/uuid"
|
"uuid": "bin/uuid"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/v8-compile-cache-lib": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/verror": {
|
"node_modules/verror": {
|
||||||
"version": "1.10.0",
|
"version": "1.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
|
||||||
@@ -3625,9 +3799,49 @@
|
|||||||
"buffer-crc32": "~0.2.3",
|
"buffer-crc32": "~0.2.3",
|
||||||
"fd-slicer": "~1.1.0"
|
"fd-slicer": "~1.1.0"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"node_modules/yn": {
|
||||||
|
"version": "3.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
||||||
|
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@cspotcode/source-map-support": {
|
||||||
|
"version": "0.8.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
|
||||||
|
"integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@jridgewell/trace-mapping": "0.3.9"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@jridgewell/resolve-uri": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@jridgewell/sourcemap-codec": {
|
||||||
|
"version": "1.4.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
|
||||||
|
"integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@jridgewell/trace-mapping": {
|
||||||
|
"version": "0.3.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
|
||||||
|
"integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@jridgewell/resolve-uri": "^3.0.3",
|
||||||
|
"@jridgewell/sourcemap-codec": "^1.4.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@nodelib/fs.scandir": {
|
"@nodelib/fs.scandir": {
|
||||||
"version": "2.1.5",
|
"version": "2.1.5",
|
||||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
||||||
@@ -3672,10 +3886,34 @@
|
|||||||
"yargs": "^15.4.1"
|
"yargs": "^15.4.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@tsconfig/node10": {
|
||||||
|
"version": "1.0.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
|
||||||
|
"integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@tsconfig/node12": {
|
||||||
|
"version": "1.0.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
|
||||||
|
"integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@tsconfig/node14": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@tsconfig/node16": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "14.18.33",
|
"version": "18.11.18",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.33.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz",
|
||||||
"integrity": "sha512-qelS/Ra6sacc4loe/3MSjXNL1dNQ/GjxNHVzuChwMfmk7HuycRLVQN2qNY3XahK+fZc5E2szqQSKUyAF0E+2bg==",
|
"integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/yauzl": {
|
"@types/yauzl": {
|
||||||
@@ -3728,6 +3966,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"acorn": {
|
||||||
|
"version": "8.8.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz",
|
||||||
|
"integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"acorn-walk": {
|
||||||
|
"version": "8.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
|
||||||
|
"integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"agent-base": {
|
"agent-base": {
|
||||||
"version": "6.0.2",
|
"version": "6.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||||
@@ -3784,6 +4034,12 @@
|
|||||||
"picomatch": "^2.0.4"
|
"picomatch": "^2.0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"arg": {
|
||||||
|
"version": "4.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
|
||||||
|
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"array-flat-polyfill": {
|
"array-flat-polyfill": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/array-flat-polyfill/-/array-flat-polyfill-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/array-flat-polyfill/-/array-flat-polyfill-1.0.1.tgz",
|
||||||
@@ -4423,6 +4679,12 @@
|
|||||||
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
|
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"create-require": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"cross-fetch": {
|
"cross-fetch": {
|
||||||
"version": "3.1.5",
|
"version": "3.1.5",
|
||||||
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz",
|
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz",
|
||||||
@@ -4527,6 +4789,12 @@
|
|||||||
"integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==",
|
"integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"diff": {
|
||||||
|
"version": "4.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
|
||||||
|
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"dir-glob": {
|
"dir-glob": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
|
||||||
@@ -5173,6 +5441,12 @@
|
|||||||
"integrity": "sha512-TfTiyvZhwBYM/7QdAVDh+7dBTBA29v4ik0Ce9zda3Mnf8on1S5KJI8P2jKFZ8+5C0jhmr0KwJEO/Wdpm0VeWJQ==",
|
"integrity": "sha512-TfTiyvZhwBYM/7QdAVDh+7dBTBA29v4ik0Ce9zda3Mnf8on1S5KJI8P2jKFZ8+5C0jhmr0KwJEO/Wdpm0VeWJQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"make-error": {
|
||||||
|
"version": "1.3.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
|
||||||
|
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"merge2": {
|
"merge2": {
|
||||||
"version": "1.4.1",
|
"version": "1.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
|
||||||
@@ -5673,6 +5947,12 @@
|
|||||||
"vscode-languageserver-protocol": "~3.15.3"
|
"vscode-languageserver-protocol": "~3.15.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@types/node": {
|
||||||
|
"version": "14.18.36",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.36.tgz",
|
||||||
|
"integrity": "sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"vscode-jsonrpc": {
|
"vscode-jsonrpc": {
|
||||||
"version": "5.0.1",
|
"version": "5.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-5.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-5.0.1.tgz",
|
||||||
@@ -5706,11 +5986,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"roku-promise": {
|
|
||||||
"version": "0.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/roku-promise/-/roku-promise-0.2.1.tgz",
|
|
||||||
"integrity": "sha512-4wKUtmQD1TOBzUZMMfblBu8Q5rw1XK2tB4pkm1GbJs8D+xgYlW1GgAlK5yDSzX6wCjn+dHgFCFEHtJiC4WMjRg=="
|
|
||||||
},
|
|
||||||
"roku-requests": {
|
"roku-requests": {
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/roku-requests/-/roku-requests-0.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/roku-requests/-/roku-requests-0.2.0.tgz",
|
||||||
@@ -6167,6 +6442,27 @@
|
|||||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
|
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"ts-node": {
|
||||||
|
"version": "10.9.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
|
||||||
|
"integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@cspotcode/source-map-support": "^0.8.0",
|
||||||
|
"@tsconfig/node10": "^1.0.7",
|
||||||
|
"@tsconfig/node12": "^1.0.7",
|
||||||
|
"@tsconfig/node14": "^1.0.0",
|
||||||
|
"@tsconfig/node16": "^1.0.2",
|
||||||
|
"acorn": "^8.4.1",
|
||||||
|
"acorn-walk": "^8.1.1",
|
||||||
|
"arg": "^4.1.0",
|
||||||
|
"create-require": "^1.1.0",
|
||||||
|
"diff": "^4.0.1",
|
||||||
|
"make-error": "^1.1.1",
|
||||||
|
"v8-compile-cache-lib": "^3.0.1",
|
||||||
|
"yn": "3.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"tunnel-agent": {
|
"tunnel-agent": {
|
||||||
"version": "0.6.0",
|
"version": "0.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
||||||
@@ -6188,6 +6484,12 @@
|
|||||||
"integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==",
|
"integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"typescript": {
|
||||||
|
"version": "4.9.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz",
|
||||||
|
"integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"unbzip2-stream": {
|
"unbzip2-stream": {
|
||||||
"version": "1.4.3",
|
"version": "1.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz",
|
||||||
@@ -6225,6 +6527,12 @@
|
|||||||
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
|
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"v8-compile-cache-lib": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"verror": {
|
"verror": {
|
||||||
"version": "1.10.0",
|
"version": "1.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
|
||||||
@@ -6425,6 +6733,12 @@
|
|||||||
"buffer-crc32": "~0.2.3",
|
"buffer-crc32": "~0.2.3",
|
||||||
"fd-slicer": "~1.1.0"
|
"fd-slicer": "~1.1.0"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"yn": {
|
||||||
|
"version": "3.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
||||||
|
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
||||||
|
"dev": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+4
-3
@@ -5,23 +5,24 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bslib": "npm:@rokucommunity/bslib@^0.1.1",
|
"bslib": "npm:@rokucommunity/bslib@^0.1.1",
|
||||||
"log": "npm:roku-log@^0.8.0",
|
"log": "npm:roku-log@^0.8.0",
|
||||||
"roku-promise": "^0.2.1",
|
|
||||||
"roku-requests": "^0.2.0"
|
"roku-requests": "^0.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rokucommunity/bslint": "^0.7.5",
|
"@rokucommunity/bslint": "^0.7.5",
|
||||||
|
"@types/node": "^18.11.18",
|
||||||
"brighterscript": "^0.60.6",
|
"brighterscript": "^0.60.6",
|
||||||
"brighterscript-formatter": "^1.6.19",
|
"brighterscript-formatter": "^1.6.19",
|
||||||
"convert-svg-to-png": "^0.6.4",
|
"convert-svg-to-png": "^0.6.4",
|
||||||
"dotenv": "^16.0.3",
|
"dotenv": "^16.0.3",
|
||||||
"roku-log-bsc-plugin": "^0.6.1",
|
"roku-log-bsc-plugin": "^0.6.1",
|
||||||
"ropm": "^0.10.10",
|
"ropm": "^0.10.10",
|
||||||
"semver": "^7.3.8"
|
"semver": "^7.3.8",
|
||||||
|
"ts-node": "^10.9.1",
|
||||||
|
"typescript": "^4.9.4"
|
||||||
},
|
},
|
||||||
"ropm": {
|
"ropm": {
|
||||||
"rootDir": "src",
|
"rootDir": "src",
|
||||||
"noprefix": [
|
"noprefix": [
|
||||||
"roku-promise",
|
|
||||||
"roku-requests"
|
"roku-requests"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,95 @@
|
|||||||
|
import {
|
||||||
|
CompilerPlugin,
|
||||||
|
BscFile,
|
||||||
|
BeforeFileTranspileEvent,
|
||||||
|
isBrsFile,
|
||||||
|
WalkMode,
|
||||||
|
createVisitor,
|
||||||
|
DiagnosticSeverity
|
||||||
|
} from 'brighterscript';
|
||||||
|
|
||||||
|
export class AsyncTaskPlugin implements CompilerPlugin {
|
||||||
|
public name = 'asyncTaskPlugin';
|
||||||
|
|
||||||
|
beforeFileTranspile(event: BeforeFileTranspileEvent) {
|
||||||
|
if (!isBrsFile(event.file)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
event.file.ast.walk(createVisitor({
|
||||||
|
FunctionExpression: (func) => {
|
||||||
|
const annotations = func.functionStatement?.annotations
|
||||||
|
if (!annotations || annotations.length === 0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (annotations[0].name !== "asynctask") {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const functionName = func.functionStatement!.name.text
|
||||||
|
const hasParams = func.functionStatement!.func.parameters.length > 0
|
||||||
|
const taskName = `${functionName}_asynctask`
|
||||||
|
|
||||||
|
const bs = this.generateBsTask(functionName, hasParams, event.file)
|
||||||
|
const bsFile = `components/asynctasks/generated/${taskName}.bs`
|
||||||
|
|
||||||
|
const xml = this.generateXmlTask(taskName, bsFile)
|
||||||
|
const xmlFile = `components/asynctasks/generated/${taskName}.xml`
|
||||||
|
|
||||||
|
if (event.program.hasFile(xmlFile) || event.program.hasFile(bsFile)) {
|
||||||
|
event.program.addDiagnostics([{
|
||||||
|
message: `Duplicate async task ${functionName}, use a different name`,
|
||||||
|
range: annotations[0].nameToken.range,
|
||||||
|
file: event.file,
|
||||||
|
severity: DiagnosticSeverity.Error,
|
||||||
|
}])
|
||||||
|
}
|
||||||
|
|
||||||
|
event.program.setFile(xmlFile, xml)
|
||||||
|
event.program.setFile(bsFile, bs)
|
||||||
|
},
|
||||||
|
}), {
|
||||||
|
walkMode: WalkMode.visitExpressionsRecursive
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
generateBsTask(functionName: string, hasInput: boolean, file: BscFile): string {
|
||||||
|
return `
|
||||||
|
import "pkg:/${file.pkgPath}"
|
||||||
|
|
||||||
|
function Init()
|
||||||
|
m.top.functionName = "TaskMain"
|
||||||
|
end function
|
||||||
|
|
||||||
|
function TaskMain()
|
||||||
|
try
|
||||||
|
result = ${functionName}(${(hasInput ? "m.top.input" : "")})
|
||||||
|
m.top.setField("output", {
|
||||||
|
success: true,
|
||||||
|
result: result
|
||||||
|
})
|
||||||
|
catch e
|
||||||
|
m.top.setField("output", {
|
||||||
|
success: false,
|
||||||
|
error: e
|
||||||
|
})
|
||||||
|
end try
|
||||||
|
end function
|
||||||
|
`
|
||||||
|
}
|
||||||
|
|
||||||
|
generateXmlTask(taskName: string, bsFile: string): string {
|
||||||
|
|
||||||
|
return `<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<component name="${taskName}" extends="Task">
|
||||||
|
<interface>
|
||||||
|
<field id="input" type="assocarray" />
|
||||||
|
<field id="output" type="assocarray" />
|
||||||
|
</interface>
|
||||||
|
<script type="text/brightscript" uri="pkg:/${bsFile}" />
|
||||||
|
</component>`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default () => {
|
||||||
|
return new AsyncTaskPlugin();
|
||||||
|
};
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import "pkg:/source/roku_modules/rokupromise/Promise.brs"
|
import "pkg:/source/asyncTask/asyncTask.bs"
|
||||||
import "pkg:/components/VideoPlayer/Video.bs"
|
import "pkg:/components/VideoPlayer/Video.bs"
|
||||||
|
import "pkg:/components/HomeGridScreen/HomeGridScreenTask.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
m.rowList = m.top.FindNode("rowList")
|
m.rowList = m.top.FindNode("rowList")
|
||||||
@@ -23,6 +24,7 @@ function OnRefresh()
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function InitContent()
|
function InitContent()
|
||||||
|
' TODO: stop any currently running tasks before starting a new batch of tasks
|
||||||
m.sortedContent = []
|
m.sortedContent = []
|
||||||
contentNode = CreateObject("roSGNode", "ContentNode")
|
contentNode = CreateObject("roSGNode", "ContentNode")
|
||||||
contentNode.Update({
|
contentNode.Update({
|
||||||
@@ -54,18 +56,16 @@ function StartFetchTask() as void
|
|||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
createTaskPromise("HomeGridScreenTask", {
|
StartAsyncTask(GetHomeScreenContent, {
|
||||||
input: {
|
|
||||||
index: currentLoadingIndex,
|
index: currentLoadingIndex,
|
||||||
requestData: m.defaultLayout[currentLoadingIndex]
|
requestData: m.defaultLayout[currentLoadingIndex]
|
||||||
}
|
}, function(output as object)
|
||||||
}).then(function(task as object)
|
|
||||||
' TODO: this whole logic is not good.
|
' TODO: this whole logic is not good.
|
||||||
' The view should have placeholder, and child nodes get replaced as
|
' The view should have placeholder, and child nodes get replaced as
|
||||||
' They get ready.
|
' They get ready.
|
||||||
m.sortedContent.Push(task.output)
|
m.sortedContent.Push(output.result)
|
||||||
|
|
||||||
if task.output.rootChildren.Count() > 0
|
if output.result.rootChildren.Count() > 0
|
||||||
m.sortedContent.SortBy("index")
|
m.sortedContent.SortBy("index")
|
||||||
|
|
||||||
newChildren = []
|
newChildren = []
|
||||||
|
|||||||
@@ -1,18 +1,14 @@
|
|||||||
import "pkg:/source/services/InvidiousService.bs"
|
import "pkg:/source/services/InvidiousService.bs"
|
||||||
|
|
||||||
function Init()
|
@asynctask
|
||||||
m.top.functionName = "TaskMain"
|
function GetHomeScreenContent(input as object) as object
|
||||||
end function
|
|
||||||
|
|
||||||
function TaskMain()
|
|
||||||
rootChildren = []
|
rootChildren = []
|
||||||
|
|
||||||
invidious = new InvidiousService()
|
service = new InvidiousService()
|
||||||
|
|
||||||
input = m.top.getField("input")
|
|
||||||
requestData = input.requestData
|
requestData = input.requestData
|
||||||
|
|
||||||
response = invidious.MakeRequest(requestData)
|
response = service.MakeRequest(requestData)
|
||||||
if response <> invalid
|
if response <> invalid
|
||||||
if type(response) = "roAssociativeArray"
|
if type(response) = "roAssociativeArray"
|
||||||
for each key in response
|
for each key in response
|
||||||
@@ -29,10 +25,10 @@ function TaskMain()
|
|||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
m.top.setField("output", {
|
return {
|
||||||
index: input.index,
|
index: input.index,
|
||||||
rootChildren: rootChildren
|
rootChildren: rootChildren
|
||||||
})
|
}
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function GetCategoryContent(category as string, json as object) as object
|
function GetCategoryContent(category as string, json as object) as object
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<component name="HomeGridScreenTask" extends="Task">
|
|
||||||
<interface>
|
|
||||||
<field id="input" type="assocarray" />
|
|
||||||
<field id="output" type="assocarray" />
|
|
||||||
</interface>
|
|
||||||
</component>
|
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
import "pkg:/source/roku_modules/rokupromise/Promise.brs"
|
import "pkg:/source/asyncTask/asyncTask.bs"
|
||||||
import "pkg:/components/VideoPlayer/Video.bs"
|
import "pkg:/components/VideoPlayer/Video.bs"
|
||||||
import "pkg:/components/SearchScreen/SearchHistory.bs"
|
import "pkg:/components/SearchScreen/SearchHistory.bs"
|
||||||
|
import "pkg:/components/SearchScreen/SearchSuggestionsTask.bs"
|
||||||
|
import "pkg:/components/SearchScreen/SearchTask.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
m.container = m.top.FindNode("container")
|
m.container = m.top.FindNode("container")
|
||||||
@@ -22,7 +24,10 @@ function Init()
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function OnFocusChange() as void
|
function OnFocusChange() as void
|
||||||
if m.top.focus = true
|
if m.top.focus <> true
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
if m.rowlist.content <> invalid
|
if m.rowlist.content <> invalid
|
||||||
m.rowlist.SetFocus(true)
|
m.rowlist.SetFocus(true)
|
||||||
ScrollDown()
|
ScrollDown()
|
||||||
@@ -36,27 +41,33 @@ function OnFocusChange() as void
|
|||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
m.keyboard.SetFocus(true)
|
m.keyboard.SetFocus(true)
|
||||||
end if
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnTextChange() as void
|
function OnTextChange() as void
|
||||||
if IsNodeFocused("suggestions")
|
if IsNodeFocused("suggestions")
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
text = m.keyboard.text
|
|
||||||
|
|
||||||
createTaskPromise("SearchSuggestionsTask", {
|
if m.searchSuggestionsTask <> invalid
|
||||||
input: {
|
m.searchSuggestionsTask.control = "stop"
|
||||||
q: text
|
end if
|
||||||
}
|
|
||||||
}).then(function(task as object) as void
|
m.searchSuggestionsTask = StartAsyncTask(SearchSuggestionsTask, {
|
||||||
|
q: m.keyboard.text
|
||||||
|
}, OnSearchSuggestionsTaskResults)
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnSearchSuggestionsTaskResults(output as object) as void
|
||||||
' In case this is an old request, discard suggestions
|
' In case this is an old request, discard suggestions
|
||||||
if task.output.q <> m.keyboard.text
|
q = output.result.q
|
||||||
|
if q <> m.keyboard.text
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
q = task.output.q
|
suggestions = output.result.response
|
||||||
suggestions = task.output.response
|
if suggestions = invalid
|
||||||
if suggestions <> invalid
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
if q.len() > 0 and ArrayIndexOf(suggestions, q) = -1
|
if q.len() > 0 and ArrayIndexOf(suggestions, q) = -1
|
||||||
suggestions.Unshift(q)
|
suggestions.Unshift(q)
|
||||||
end if
|
end if
|
||||||
@@ -73,13 +84,12 @@ function OnTextChange() as void
|
|||||||
if buttonFocused <> -1
|
if buttonFocused <> -1
|
||||||
m.suggestions.focusButton = buttonFocused
|
m.suggestions.focusButton = buttonFocused
|
||||||
end if
|
end if
|
||||||
end if
|
|
||||||
end function)
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnSearchButtonSelected()
|
function OnSearchButtonSelected()
|
||||||
selected = m.suggestions.buttonSelected
|
selected = m.suggestions.buttonSelected
|
||||||
text = m.suggestions.buttons[selected]
|
text = m.suggestions.buttons[selected]
|
||||||
|
SaveSearchHistory(text)
|
||||||
Search(text)
|
Search(text)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@@ -94,13 +104,17 @@ function OnSearchButtonFocused() as void
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function Search(text as string)
|
function Search(text as string)
|
||||||
SaveSearchHistory(text)
|
if m.searchTask <> invalid
|
||||||
createTaskPromise("SearchTask", {
|
m.searchTask.control = "stop"
|
||||||
input: {
|
end if
|
||||||
|
|
||||||
|
m.searchTask = StartAsyncTask(SearchTask, {
|
||||||
q: text
|
q: text
|
||||||
}
|
}, OnSearchTaskResults)
|
||||||
}).then(function(task as object) as void
|
end function
|
||||||
rootChildren = task.output.rootChildren
|
|
||||||
|
function OnSearchTaskResults(output as object)
|
||||||
|
rootChildren = output.result.rootChildren
|
||||||
contentNode = CreateObject("roSGNode", "ContentNode")
|
contentNode = CreateObject("roSGNode", "ContentNode")
|
||||||
contentNode.Update({
|
contentNode.Update({
|
||||||
children: rootChildren
|
children: rootChildren
|
||||||
@@ -109,7 +123,6 @@ function Search(text as string)
|
|||||||
m.rowList.SetFocus(true)
|
m.rowList.SetFocus(true)
|
||||||
m.rowList.jumpToRowItem = [0, 0]
|
m.rowList.jumpToRowItem = [0, 0]
|
||||||
ScrollDown()
|
ScrollDown()
|
||||||
end function)
|
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnVisibilityChange()
|
function OnVisibilityChange()
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
import "pkg:/source/services/Invidious.bs"
|
import "pkg:/source/services/Invidious.bs"
|
||||||
import "pkg:/components/SearchScreen/SearchHistory.bs"
|
import "pkg:/components/SearchScreen/SearchHistory.bs"
|
||||||
|
|
||||||
function Init()
|
@asynctask
|
||||||
m.top.functionName = "TaskMain"
|
function SearchSuggestionsTask(input as object) as object
|
||||||
end function
|
|
||||||
|
|
||||||
function TaskMain()
|
|
||||||
input = m.top.getField("input")
|
|
||||||
q = input.q
|
q = input.q
|
||||||
|
|
||||||
searchSuggestsions = q <> "" ? Invidious.SearchSuggestions(q) : invalid
|
searchSuggestsions = q <> "" ? Invidious.SearchSuggestions(q) : invalid
|
||||||
@@ -17,10 +13,10 @@ function TaskMain()
|
|||||||
history = MergeSearchSuggestions(history, searchSuggestsions.suggestions)
|
history = MergeSearchSuggestions(history, searchSuggestsions.suggestions)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
m.top.setField("output", {
|
return {
|
||||||
q: q,
|
q: q,
|
||||||
response: history
|
response: history
|
||||||
})
|
}
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function MergeSearchSuggestions(history as object, queryResults as object, maxItems = 10 as integer) as object
|
function MergeSearchSuggestions(history as object, queryResults as object, maxItems = 10 as integer) as object
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<component name="SearchSuggestionsTask" extends="Task">
|
|
||||||
<interface>
|
|
||||||
<field id="input" type="assocarray" />
|
|
||||||
<field id="output" type="assocarray" />
|
|
||||||
</interface>
|
|
||||||
</component>
|
|
||||||
@@ -1,11 +1,7 @@
|
|||||||
import "pkg:/source/services/Invidious.bs"
|
import "pkg:/source/services/Invidious.bs"
|
||||||
|
|
||||||
function Init()
|
@asynctask
|
||||||
m.top.functionName = "TaskMain"
|
function SearchTask(input as object) as object
|
||||||
end function
|
|
||||||
|
|
||||||
function TaskMain()
|
|
||||||
input = m.top.getField("input")
|
|
||||||
q = input.q
|
q = input.q
|
||||||
|
|
||||||
rootChildren = []
|
rootChildren = []
|
||||||
@@ -17,10 +13,10 @@ function TaskMain()
|
|||||||
rootChildren.Push(rowContent)
|
rootChildren.Push(rowContent)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
m.top.setField("output", {
|
return {
|
||||||
q: q,
|
q: q,
|
||||||
rootChildren: rootChildren
|
rootChildren: rootChildren
|
||||||
})
|
}
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function GetCategoryContent(category as string, json as object) as object
|
function GetCategoryContent(category as string, json as object) as object
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<component name="SearchTask" extends="Task">
|
|
||||||
<interface>
|
|
||||||
<field id="input" type="assocarray" />
|
|
||||||
<field id="output" type="assocarray" />
|
|
||||||
</interface>
|
|
||||||
</component>
|
|
||||||
@@ -1,11 +1,8 @@
|
|||||||
import "pkg:/source/utils/General.bs"
|
import "pkg:/source/utils/General.bs"
|
||||||
import "pkg:/source/roku_modules/rokurequests/Requests.brs"
|
import "pkg:/source/roku_modules/rokurequests/Requests.brs"
|
||||||
|
|
||||||
function Init()
|
@asynctask
|
||||||
m.top.functionName = "TaskMain"
|
function AppVersionTask() as object
|
||||||
end function
|
|
||||||
|
|
||||||
function TaskMain()
|
|
||||||
latest = "N/A"
|
latest = "N/A"
|
||||||
response = Requests().request("HEAD", "https://github.com/iBicha/playlet/releases/latest", invalid)
|
response = Requests().request("HEAD", "https://github.com/iBicha/playlet/releases/latest", invalid)
|
||||||
|
|
||||||
@@ -19,7 +16,7 @@ function TaskMain()
|
|||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
m.top.setField("output", {
|
return {
|
||||||
latest: latest
|
latest: latest
|
||||||
})
|
}
|
||||||
end function
|
end function
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<component name="AppVersionTask" extends="Task">
|
|
||||||
<interface>
|
|
||||||
<field id="input" type="assocarray" />
|
|
||||||
<field id="output" type="assocarray" />
|
|
||||||
</interface>
|
|
||||||
</component>
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import "pkg:/source/utils/General.bs"
|
import "pkg:/source/utils/General.bs"
|
||||||
import "pkg:/source/roku_modules/rokupromise/Promise.brs"
|
import "pkg:/source/asyncTask/asyncTask.bs"
|
||||||
|
import "pkg:/components/SettingsScreen/AppVersionTask.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
m.versionLabel = m.top.findNode("VersionLabel")
|
m.versionLabel = m.top.findNode("VersionLabel")
|
||||||
@@ -21,11 +22,9 @@ function OnUrlSet()
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function GetLatestVersion()
|
function GetLatestVersion()
|
||||||
createTaskPromise("AppVersionTask", {
|
StartAsyncTask(AppVersionTask, {}, function(output as object) as void
|
||||||
input: {}
|
if output.result.latest <> invalid
|
||||||
}).then(function(task as object) as void
|
SetVersionLabel(m.currentVersion, output.result.latest)
|
||||||
if task.output.latest <> invalid
|
|
||||||
SetVersionLabel(m.currentVersion, task.output.latest)
|
|
||||||
end if
|
end if
|
||||||
end function)
|
end function)
|
||||||
end function
|
end function
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import "pkg:/source/services/SponsorBlock.bs"
|
import "pkg:/source/services/SponsorBlock.bs"
|
||||||
|
|
||||||
function TaskMain()
|
@asynctask
|
||||||
input = m.top.getField("input")
|
function SponsorBlockTask(input as object) as object
|
||||||
videoId = input.videoId
|
videoId = input.videoId
|
||||||
|
|
||||||
sponsorBlockResponse = SponsorBlock.GetSkipSegmentsForVideo(videoId)
|
sponsorBlockResponse = SponsorBlock.GetSkipSegmentsForVideo(videoId)
|
||||||
@@ -25,9 +25,9 @@ function TaskMain()
|
|||||||
SponsorBlock.GenerateProgressBarBackground(skipSegments, barPath)
|
SponsorBlock.GenerateProgressBarBackground(skipSegments, barPath)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
m.top.setField("output", {
|
return {
|
||||||
videoId: videoId,
|
videoId: videoId,
|
||||||
skipSegments: skipSegments,
|
skipSegments: skipSegments,
|
||||||
barPath: barPath
|
barPath: barPath
|
||||||
})
|
}
|
||||||
end function
|
end function
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<component name="SponsorBlockTask" extends="Task">
|
|
||||||
<interface>
|
|
||||||
<field id="input" type="assocarray" />
|
|
||||||
<field id="output" type="assocarray" />
|
|
||||||
</interface>
|
|
||||||
</component>
|
|
||||||
@@ -1,10 +1,7 @@
|
|||||||
import "pkg:/source/services/SponsorBlock.bs"
|
import "pkg:/source/services/SponsorBlock.bs"
|
||||||
|
|
||||||
function Init()
|
@asynctask
|
||||||
m.top.functionName = "TaskMain"
|
function SponsorBlockTrackingTask(input as object)
|
||||||
end function
|
|
||||||
|
|
||||||
function TaskMain()
|
|
||||||
input = m.top.getField("input")
|
input = m.top.getField("input")
|
||||||
segmentId = input.segmentId
|
segmentId = input.segmentId
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<component name="SponsorBlockTrackingTask" extends="Task">
|
|
||||||
<interface>
|
|
||||||
<field id="input" type="assocarray" />
|
|
||||||
<field id="output" type="assocarray" />
|
|
||||||
</interface>
|
|
||||||
</component>
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
import "pkg:/source/services/Invidious.bs"
|
import "pkg:/source/services/Invidious.bs"
|
||||||
import "pkg:/components/Dialog/DialogUtils.bs"
|
import "pkg:/components/Dialog/DialogUtils.bs"
|
||||||
import "pkg:/source/roku_modules/rokupromise/Promise.brs"
|
|
||||||
|
|
||||||
function PlayVideo(videoId as string, sender as object)
|
function PlayVideo(videoId as string, sender as object)
|
||||||
width = 1280
|
width = 1280
|
||||||
|
|||||||
@@ -1,18 +1,13 @@
|
|||||||
import "pkg:/source/services/Invidious.bs"
|
import "pkg:/source/services/Invidious.bs"
|
||||||
|
|
||||||
function Init()
|
@asynctask
|
||||||
m.top.functionName = "TaskMain"
|
function VideoDetailsTask(input as object) as object
|
||||||
end function
|
|
||||||
|
|
||||||
function TaskMain()
|
|
||||||
input = m.top.getField("input")
|
|
||||||
videoId = input.videoId
|
videoId = input.videoId
|
||||||
|
|
||||||
metadata = Invidious.GetVideoMetadata(videoId)
|
metadata = Invidious.GetVideoMetadata(videoId)
|
||||||
|
|
||||||
m.top.setField("output", {
|
return {
|
||||||
videoId: videoId,
|
videoId: videoId,
|
||||||
metadata: metadata
|
metadata: metadata
|
||||||
})
|
}
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<component name="VideoDetailsTask" extends="Task">
|
|
||||||
<interface>
|
|
||||||
<field id="input" type="assocarray" />
|
|
||||||
<field id="output" type="assocarray" />
|
|
||||||
</interface>
|
|
||||||
</component>
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import "pkg:/source/utils/TimeUtils.bs"
|
import "pkg:/source/utils/TimeUtils.bs"
|
||||||
import "pkg:/source/services/SponsorBlock.bs"
|
import "pkg:/source/services/SponsorBlock.bs"
|
||||||
import "pkg:/components/VideoPlayer/Video.bs"
|
import "pkg:/components/VideoPlayer/Video.bs"
|
||||||
|
import "pkg:/components/VideoPlayer/VideoDetailsTask.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
SetupSponsorBlock()
|
SetupSponsorBlock()
|
||||||
@@ -15,8 +16,6 @@ function Init()
|
|||||||
m.top.enableUI = m.videoContainer.fullscreen
|
m.top.enableUI = m.videoContainer.fullscreen
|
||||||
m.videoContainer.observeFieldScoped("fullscreen", "OnFullScreenChange")
|
m.videoContainer.observeFieldScoped("fullscreen", "OnFullScreenChange")
|
||||||
|
|
||||||
m.videoDetailsTask = m.top.findNode("VideoDetailsTask")
|
|
||||||
|
|
||||||
m.videoPlayingSuccess = false
|
m.videoPlayingSuccess = false
|
||||||
m.ignoreNextFinishedState = false
|
m.ignoreNextFinishedState = false
|
||||||
|
|
||||||
@@ -47,21 +46,26 @@ end function
|
|||||||
|
|
||||||
function OnControlChange()
|
function OnControlChange()
|
||||||
if m.top.control = "stop"
|
if m.top.control = "stop"
|
||||||
m.sponsorBlockTask.control = "stop"
|
if m.videoDetailsTask <> invalid
|
||||||
m.videoDetailsTask.control = "stop"
|
m.videoDetailsTask.control = "stop"
|
||||||
end if
|
end if
|
||||||
|
if m.sponsorBlockTask <> invalid
|
||||||
|
m.sponsorBlockTask.control = "stop"
|
||||||
|
end if
|
||||||
|
end if
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function StartVideoDetailsTask()
|
function StartVideoDetailsTask()
|
||||||
m.videoDetailsTask.input = { videoId: m.top.videoId }
|
if m.videoDetailsTask <> invalid
|
||||||
m.videoDetailsTask.observeField("output", "OnVideoDetailsTaskResults")
|
m.videoDetailsTask.control = "stop"
|
||||||
m.videoDetailsTask.control = "run"
|
end if
|
||||||
|
|
||||||
|
m.videoDetailsTask = StartAsyncTask(VideoDetailsTask, { videoId: m.top.videoId }, OnVideoDetailsTaskResults)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnVideoDetailsTaskResults() as void
|
function OnVideoDetailsTaskResults(output as object) as void
|
||||||
task = m.videoDetailsTask
|
videoId = output.result.videoId
|
||||||
videoId = task.output.videoId
|
metadata = output.result.metadata
|
||||||
metadata = task.output.metadata
|
|
||||||
if videoId <> m.top.videoId
|
if videoId <> m.top.videoId
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|||||||
@@ -8,13 +8,6 @@
|
|||||||
<field id="videoId" type="string" />
|
<field id="videoId" type="string" />
|
||||||
</interface>
|
</interface>
|
||||||
<children>
|
<children>
|
||||||
<SponsorBlockTask
|
|
||||||
functionName="TaskMain"
|
|
||||||
id="SponsorBlockTask" />
|
|
||||||
<VideoDetailsTask
|
|
||||||
functionName="TaskMain"
|
|
||||||
id="VideoDetailsTask" />
|
|
||||||
|
|
||||||
<Label
|
<Label
|
||||||
id="chapterLabel"
|
id="chapterLabel"
|
||||||
width="350"
|
width="350"
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
|
import "pkg:/source/asyncTask/asyncTask.bs"
|
||||||
|
import "pkg:/components/VideoPlayer/SponsorBlockTask.bs"
|
||||||
|
import "pkg:/components/VideoPlayer/SponsorBlockTrackingTask.bs"
|
||||||
|
|
||||||
function SetupSponsorBlock()
|
function SetupSponsorBlock()
|
||||||
PositionChapterLabel()
|
PositionChapterLabel()
|
||||||
m.timeLabel = FindTimeLabel()
|
m.timeLabel = FindTimeLabel()
|
||||||
m.top.trickPlayBar.observeField("visible", "OnTrickPlayBarVisible")
|
m.top.trickPlayBar.observeField("visible", "OnTrickPlayBarVisible")
|
||||||
m.chapterLabelTimer = m.top.findNode("chapterLabelTimer")
|
m.chapterLabelTimer = m.top.findNode("chapterLabelTimer")
|
||||||
m.chapterLabelTimer.observeField("fire", "OnChapterLabelTimer")
|
m.chapterLabelTimer.observeField("fire", "OnChapterLabelTimer")
|
||||||
m.sponsorBlockTask = m.top.findNode("SponsorBlockTask")
|
|
||||||
m.top.observeField("videoId", "StartSponsorBlockTask")
|
m.top.observeField("videoId", "StartSponsorBlockTask")
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@@ -79,15 +82,16 @@ function UpdateSponsorBlockChapter(time as integer) as void
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function StartSponsorBlockTask()
|
function StartSponsorBlockTask()
|
||||||
m.sponsorBlockTask.input = { videoId: m.top.videoId }
|
if m.sponsorBlockTask <> invalid
|
||||||
m.sponsorBlockTask.observeField("output", "OnSponsorBlockTaskResults")
|
m.sponsorBlockTask.control = "stop"
|
||||||
m.sponsorBlockTask.control = "run"
|
end if
|
||||||
|
|
||||||
|
m.sponsorBlockTask = StartAsyncTask(SponsorBlockTask, { videoId: m.top.videoId }, OnSponsorBlockTaskResults)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnSponsorBlockTaskResults()
|
function OnSponsorBlockTaskResults(output as object)
|
||||||
task = m.sponsorBlockTask
|
skipSegments = output.result.skipSegments
|
||||||
skipSegments = task.output.skipSegments
|
barPath = output.result.barPath
|
||||||
barPath = task.output.barPath
|
|
||||||
if skipSegments <> invalid
|
if skipSegments <> invalid
|
||||||
m.skipSegments = skipSegments
|
m.skipSegments = skipSegments
|
||||||
m.top.seekMode = "accurate"
|
m.top.seekMode = "accurate"
|
||||||
@@ -144,7 +148,5 @@ function OnPositionChangeSkipSponsorBlockSections() as void
|
|||||||
end function
|
end function
|
||||||
|
|
||||||
function SendSkippedSectionEvent(segmentId as string)
|
function SendSkippedSectionEvent(segmentId as string)
|
||||||
task = createObject("roSGNode", "SponsorBlockTrackingTask")
|
StartAsyncTask(SponsorBlockTrackingTask, { segmentId: segmentId })
|
||||||
task.input = { segmentId: segmentId }
|
|
||||||
task.control = "RUN"
|
|
||||||
end function
|
end function
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
import "pkg:/source/utils/Types.bs"
|
||||||
|
|
||||||
|
function StartAsyncTask(taskFunc as object, input as object, callback = invalid as object) as object
|
||||||
|
task = CreateAsyncTask(taskFunc, input, callback)
|
||||||
|
task.control = "RUN"
|
||||||
|
return task
|
||||||
|
end function
|
||||||
|
|
||||||
|
function CreateAsyncTask(taskFunc as object, input as object, callback = invalid as object) as object
|
||||||
|
id = StrI(rnd(2147483647), 36)
|
||||||
|
task = createObject("roSGNode", GetFunctionName(taskFunc))
|
||||||
|
task.id = id
|
||||||
|
task.input = input
|
||||||
|
|
||||||
|
m[`asynctask_${id}`] = task
|
||||||
|
m[`asynctask_${id}_callback`] = callback
|
||||||
|
task.ObserveField("state", "OnTaskState")
|
||||||
|
|
||||||
|
return task
|
||||||
|
end function
|
||||||
|
|
||||||
|
function GetFunctionName(taskFunc as object) as string
|
||||||
|
if IsStr(taskFunc)
|
||||||
|
return LCase(`${taskFunc}_asynctask`)
|
||||||
|
end if
|
||||||
|
return (LCase(`${taskFunc}_asynctask`)).replace("function:", "").trim()
|
||||||
|
end function
|
||||||
|
|
||||||
|
function OnTaskState(e as object) as void
|
||||||
|
task = e.getRoSGNode()
|
||||||
|
if task.state = "init" or task.state = "run"
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
|
||||||
|
id = task.id
|
||||||
|
output = task.output
|
||||||
|
' if output is invalid, it means the task was interrupted before the result is ready
|
||||||
|
if output <> invalid
|
||||||
|
callback = m[`asynctask_${id}_callback`]
|
||||||
|
if callback <> invalid
|
||||||
|
output = task.output
|
||||||
|
callback(output)
|
||||||
|
end if
|
||||||
|
end if
|
||||||
|
|
||||||
|
m.delete(`asynctask_${id}`)
|
||||||
|
m.delete(`asynctask_${id}_callback`)
|
||||||
|
end function
|
||||||
Reference in new issue
Block a user