diff --git a/.github/workflows/build-dev.yml b/.github/workflows/build-dev.yml index 3c945d5e..7957bffd 100644 --- a/.github/workflows/build-dev.yml +++ b/.github/workflows/build-dev.yml @@ -1,4 +1,4 @@ -name: build +name: build-dev on: pull_request: @@ -17,11 +17,14 @@ jobs: with: node-version: "lts/*" cache: "npm" - - run: npm ci - - run: npx ropm install - - run: make dev + - name: NPM install + run: npm ci + - name: Install roku module dependencies + run: npx ropm install + - name: Build app + run: npm run build - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3 with: name: Jellyfin-Roku-dev-${{ github.sha }} - path: ${{ github.workspace }}/out/staging + path: ${{ github.workspace }}/build/staging if-no-files-found: error \ No newline at end of file diff --git a/.github/workflows/build-prod.yml b/.github/workflows/build-prod.yml index ded52f4e..78ca1be0 100644 --- a/.github/workflows/build-prod.yml +++ b/.github/workflows/build-prod.yml @@ -1,4 +1,4 @@ -name: build +name: build-prod on: pull_request: @@ -66,11 +66,14 @@ jobs: with: node-version: "lts/*" cache: "npm" - - run: npm ci - - run: npx ropm install - - run: make release + - name: NPM install + run: npm ci + - name: Install roku module dependencies + run: npx ropm install + - name: Build app for production + run: npm run build-prod - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3 with: - name: Jellyfin-Roku-release-${{ github.sha }} - path: ${{ github.workspace }}/out/staging + name: Jellyfin-Roku-v${{ env.newManVersion }}-${{ github.sha }} + path: ${{ github.workspace }}/build/staging if-no-files-found: error \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index c4673d71..fe6b11d6 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,6 +5,8 @@ "type": "brightscript", "request": "launch", "name": "Jellyfin Debug", + "rootDir": "${workspaceFolder}/build/staging", + "preLaunchTask": "build-dev", "stopOnEntry": false, // To enable RALE: // set "brightscript.debug.raleTrackerTaskFileLocation": "/absolute/path/to/rale/TrackerTask.xml" in your vscode user settings @@ -14,14 +16,6 @@ //"host": "${promptForHost}", //WARNING: don't edit this value. Instead, set "brightscript.debug.password": "YOUR_PASSWORD_HERE" in your vscode user settings //"password": "${promptForPassword}", - "files": [ - "components/**/*", - "images/**/*", - "locale/**/*", - "settings/**/*", - "source/**/*", - "manifest" - ] }, { "name": "Run tests", diff --git a/.vscode/settings.json b/.vscode/settings.json index a2379557..b0c28bbe 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,5 +10,6 @@ }, "xml.format.maxLineWidth": 0, "editor.formatOnSave": true, + "brightscript.output.hyperlinkFormat": "FilenameAndFunction", "brightscript.bsdk": "node_modules/brighterscript" } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 232baf36..039935d0 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,6 +1,42 @@ { + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ + { + "label": "build-dev", + "type": "shell", + "command": "npm run build", + "problemMatcher": [], + "presentation": { + "echo": true, + "focus": false, + "panel": "shared", + "showReuseMessage": false, + "clear": true + }, + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "build-prod", + "type": "shell", + "command": "npm run build-prod", + "problemMatcher": [], + "presentation": { + "echo": true, + "focus": false, + "panel": "shared", + "showReuseMessage": false, + "clear": true + }, + "group": { + "kind": "build", + "isDefault": true + } + }, { "label": "build-tests", "type": "shell", @@ -8,7 +44,7 @@ "problemMatcher": [], "presentation": { "echo": true, - "reveal": "silent", + "reveal": "always", "focus": false, "panel": "shared", "showReuseMessage": false, @@ -26,7 +62,7 @@ "problemMatcher": [], "presentation": { "echo": true, - "reveal": "silent", + "reveal": "always", "focus": false, "panel": "shared", "showReuseMessage": false, diff --git a/bsconfig-prod.json b/bsconfig-prod.json new file mode 100644 index 00000000..60beb933 --- /dev/null +++ b/bsconfig-prod.json @@ -0,0 +1,37 @@ +{ + "files": [ + "manifest", + "source/**/*.*", + "components/**/*.*", + "images/**/*.*", + "locale/en_US/translations.ts", + "locale/en_GB/translations.ts", + "locale/fr_CA/translations.ts", + "locale/es_ES/translations.ts", + "locale/de_DE/translations.ts", + "locale/it_IT/translations.ts", + "locale/pt_BR/translations.ts", + "settings/**/*.*", + { + "src": "resources/branding/release/*.*", + "dest": "images" + } + ], + "plugins": [ + "@rokucommunity/bslint", + "roku-log-bsc-plugin" + ], + "rokuLog": { + "strip": true, + "insertPkgPath": false, + "removeComments": true + }, + "diagnosticFilters": [ + "node_modules/**/*", + "**/roku_modules/**/*" + ], + "allowBrighterScriptInBrightScript": true, + "autoImportComponentScript": true, + "stagingDir": "build/staging", + "retainStagingDir": true +} \ No newline at end of file diff --git a/bsconfig-tests.json b/bsconfig-tests.json index ee5a654b..21247d4a 100644 --- a/bsconfig-tests.json +++ b/bsconfig-tests.json @@ -20,7 +20,12 @@ "dest": "settings" } ], + "diagnosticFilters": [ + "node_modules/**/*", + "**/roku_modules/**/*" + ], "autoImportComponentScript": true, + "allowBrighterScriptInBrightScript": true, "createPackage": false, "stagingFolderPath": "build", "plugins": [ diff --git a/bsconfig.json b/bsconfig.json index 61a5eb62..907df1a7 100644 --- a/bsconfig.json +++ b/bsconfig.json @@ -10,10 +10,18 @@ ], "plugins": [ "@rokucommunity/bslint", - "rooibos-roku" + "roku-log-bsc-plugin" ], + "rokuLog": { + "insertPkgPath": true + }, "diagnosticFilters": [ - "node_modules/**", - "**/roku_modules/**" - ] + "node_modules/**/*", + "**/roku_modules/**/*" + ], + "sourceMap": true, + "autoImportComponentScript": true, + "allowBrighterScriptInBrightScript": true, + "stagingDir": "build/staging", + "retainStagingDir": true } \ No newline at end of file diff --git a/bsfmt.json b/bsfmt.json index 3deaa0f9..23cbd4f6 100644 --- a/bsfmt.json +++ b/bsfmt.json @@ -1,9 +1,10 @@ { - "files": [ - "source/**/*.brs", - "source/**/*.bs", - "components/**/*.brs", - "components/**/*.bs", - "test-app/**/*.bs" - ] + "files": [ + "source/**/*.brs", + "source/**/*.bs", + "components/**/*.brs", + "components/**/*.bs", + "test-app/**/*.bs", + "!**/roku_modules/**/*.*" + ] } \ No newline at end of file diff --git a/components/ButtonGroupHoriz.xml b/components/ButtonGroupHoriz.xml index 8646a3be..574e43fc 100644 --- a/components/ButtonGroupHoriz.xml +++ b/components/ButtonGroupHoriz.xml @@ -1,9 +1,6 @@ - + - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/components/PersonDetails.brs b/components/PersonDetails.brs index de3b5730..8104c7bf 100644 --- a/components/PersonDetails.brs +++ b/components/PersonDetails.brs @@ -1,3 +1,7 @@ +import "pkg:/source/api/Image.brs" +import "pkg:/source/api/baserequest.brs" +import "pkg:/source/utils/config.brs" + sub init() m.dscr = m.top.findNode("description") m.vidsList = m.top.findNode("extrasGrid") diff --git a/components/PersonDetails.xml b/components/PersonDetails.xml index 6acc1eb4..fc7ead8b 100644 --- a/components/PersonDetails.xml +++ b/components/PersonDetails.xml @@ -1,4 +1,4 @@ - + @@ -7,26 +7,26 @@ - - - - - - -