@krx3d/tizentubekrx 1.15.17 → 1.15.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish-on-release.yml +93 -103
- package/README.md +1 -1
- package/dist/service.js +49855 -108
- package/package.json +1 -1
|
@@ -1,13 +1,74 @@
|
|
|
1
|
-
|
|
1
|
+
# -----------------------------------------------------------------------------
|
|
2
|
+
# Build and publish TizenTubeKrX to npm
|
|
3
|
+
#
|
|
4
|
+
# WHAT THIS WORKFLOW DOES
|
|
5
|
+
# -----------------------
|
|
6
|
+
# - Runs on every push to the `main` branch (build + verification)
|
|
7
|
+
# - Runs again when a GitHub Release is published (build + npm publish)
|
|
8
|
+
# - Builds:
|
|
9
|
+
# - dist/userScript.js (browser userscript, bundled & minified)
|
|
10
|
+
# - dist/service.js (DIAL service, bundled with Rollup)
|
|
11
|
+
# - Publishes the package to https://www.npmjs.com on release only
|
|
12
|
+
#
|
|
13
|
+
# WHEN IT RUNS
|
|
14
|
+
# ------------
|
|
15
|
+
# push to main:
|
|
16
|
+
# - Builds the project
|
|
17
|
+
# - Does NOT publish to npm
|
|
18
|
+
#
|
|
19
|
+
# release (published):
|
|
20
|
+
# - Builds the project
|
|
21
|
+
# - Publishes to npm
|
|
22
|
+
#
|
|
23
|
+
# PREREQUISITES (REQUIRED)
|
|
24
|
+
# -----------------------
|
|
25
|
+
# 1) Create an npm account:
|
|
26
|
+
# https://www.npmjs.com/signup
|
|
27
|
+
#
|
|
28
|
+
# 2) Create an npm access token:
|
|
29
|
+
# - npm → Profile → Access Tokens
|
|
30
|
+
# - Click "Generate New Token"
|
|
31
|
+
# - Token name: anything you want
|
|
32
|
+
# - CHECK: "Bypass two-factor authentication (2FA)"
|
|
33
|
+
# - Packages and scopes:
|
|
34
|
+
# - Permissions: Read and Write
|
|
35
|
+
# - Scope: All packages
|
|
36
|
+
# - Expiration date: e.g. 90 days
|
|
37
|
+
# - Click "Generate token" and COPY it
|
|
38
|
+
#
|
|
39
|
+
# 3) Add the token to GitHub Secrets:
|
|
40
|
+
# - GitHub repository → Settings
|
|
41
|
+
# - Security → Secrets and variables → Actions
|
|
42
|
+
# - Repository secrets → New repository secret
|
|
43
|
+
# Name: NPM_TOKEN
|
|
44
|
+
# Secret: <paste npm token here>
|
|
45
|
+
#
|
|
46
|
+
# PACKAGE REQUIREMENTS
|
|
47
|
+
# --------------------
|
|
48
|
+
# - package.json must contain a unique name, e.g.:
|
|
49
|
+
# "@krx3d/tizentubekrx"
|
|
50
|
+
# - The version MUST be increased before each release
|
|
51
|
+
# (npm will reject duplicate versions)
|
|
52
|
+
#
|
|
53
|
+
# HOW TO PUBLISH A NEW VERSION
|
|
54
|
+
# ----------------------------
|
|
55
|
+
# 1) Bump "version" in package.json
|
|
56
|
+
# 2) Commit and push to `main`
|
|
57
|
+
# 3) Create a GitHub Release
|
|
58
|
+
# 4) When the release is published:
|
|
59
|
+
# → GitHub Actions builds
|
|
60
|
+
# → npm publish runs automatically
|
|
61
|
+
#
|
|
62
|
+
# -----------------------------------------------------------------------------
|
|
63
|
+
|
|
64
|
+
name: Build and publish on release
|
|
2
65
|
|
|
3
66
|
on:
|
|
4
67
|
push:
|
|
5
68
|
branches:
|
|
6
69
|
- main
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
contents: read
|
|
10
|
-
packages: write
|
|
70
|
+
release:
|
|
71
|
+
types: [published]
|
|
11
72
|
|
|
12
73
|
jobs:
|
|
13
74
|
build-and-publish:
|
|
@@ -21,123 +82,52 @@ jobs:
|
|
|
21
82
|
uses: actions/setup-node@v4
|
|
22
83
|
with:
|
|
23
84
|
node-version: 20
|
|
24
|
-
registry-url:
|
|
25
|
-
|
|
26
|
-
- name: Show repository structure
|
|
27
|
-
run: |
|
|
28
|
-
echo "=== ROOT ==="
|
|
29
|
-
ls -la
|
|
30
|
-
echo "=== mods ==="
|
|
31
|
-
[ -d mods ] && ls -la mods || echo "mods/ not present"
|
|
32
|
-
echo "=== service ==="
|
|
33
|
-
[ -d service ] && ls -la service || echo "service/ not present"
|
|
85
|
+
registry-url: https://registry.npmjs.org/
|
|
34
86
|
|
|
35
|
-
#
|
|
36
|
-
# Build
|
|
37
|
-
#
|
|
87
|
+
# ----------------------------
|
|
88
|
+
# Build mods (userScript.js)
|
|
89
|
+
# ----------------------------
|
|
38
90
|
- name: Install mods dependencies
|
|
39
91
|
run: |
|
|
40
92
|
set -euo pipefail
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if [ -f mods/package-lock.json ]; then
|
|
44
|
-
npm ci --prefix mods
|
|
45
|
-
else
|
|
46
|
-
npm install --prefix mods
|
|
47
|
-
fi
|
|
48
|
-
else
|
|
49
|
-
echo "No mods/package.json, skipping mods install"
|
|
50
|
-
fi
|
|
93
|
+
cd mods
|
|
94
|
+
npm ci
|
|
51
95
|
|
|
52
96
|
- name: Build mods (rollup)
|
|
53
97
|
run: |
|
|
54
98
|
set -euo pipefail
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
npm run build --prefix mods
|
|
58
|
-
else
|
|
59
|
-
echo "Skipping mods build"
|
|
60
|
-
fi
|
|
61
|
-
|
|
62
|
-
- name: Verify dist/userScript.js
|
|
63
|
-
run: |
|
|
64
|
-
set -euo pipefail
|
|
65
|
-
if [ ! -f dist/userScript.js ]; then
|
|
66
|
-
echo "::error::dist/userScript.js not generated"
|
|
67
|
-
exit 1
|
|
68
|
-
fi
|
|
69
|
-
echo "dist/userScript.js:"
|
|
70
|
-
ls -lh dist/userScript.js
|
|
99
|
+
cd mods
|
|
100
|
+
npx rollup -c
|
|
71
101
|
|
|
72
|
-
#
|
|
73
|
-
# Build
|
|
74
|
-
#
|
|
102
|
+
# ----------------------------
|
|
103
|
+
# Build service (service.js)
|
|
104
|
+
# ----------------------------
|
|
75
105
|
- name: Install service dependencies
|
|
76
106
|
run: |
|
|
77
107
|
set -euo pipefail
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if [ -f service/package-lock.json ]; then
|
|
81
|
-
npm ci --prefix service
|
|
82
|
-
else
|
|
83
|
-
npm install --prefix service
|
|
84
|
-
fi
|
|
85
|
-
else
|
|
86
|
-
echo "No service/package.json, skipping service install"
|
|
87
|
-
fi
|
|
108
|
+
cd service
|
|
109
|
+
npm ci
|
|
88
110
|
|
|
89
|
-
- name:
|
|
90
|
-
id: service_entry
|
|
111
|
+
- name: Build service (rollup)
|
|
91
112
|
run: |
|
|
92
113
|
set -euo pipefail
|
|
114
|
+
cd service
|
|
115
|
+
npx rollup -c
|
|
93
116
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
if [ -n "$MAIN" ]; then
|
|
99
|
-
if [[ "$MAIN" == */* ]]; then
|
|
100
|
-
ENTRY="$MAIN"
|
|
101
|
-
else
|
|
102
|
-
ENTRY="service/$MAIN"
|
|
103
|
-
fi
|
|
104
|
-
fi
|
|
105
|
-
fi
|
|
106
|
-
|
|
107
|
-
if [ -z "$ENTRY" ]; then
|
|
108
|
-
for f in service.js index.js app.js server.js; do
|
|
109
|
-
if [ -f "service/$f" ]; then
|
|
110
|
-
ENTRY="service/$f"
|
|
111
|
-
break
|
|
112
|
-
fi
|
|
113
|
-
done
|
|
114
|
-
fi
|
|
115
|
-
|
|
116
|
-
if [ -n "$ENTRY" ]; then
|
|
117
|
-
echo "entry=$ENTRY" >> "$GITHUB_OUTPUT"
|
|
118
|
-
echo "Service entry: $ENTRY"
|
|
119
|
-
else
|
|
120
|
-
echo "entry=" >> "$GITHUB_OUTPUT"
|
|
121
|
-
echo "No service entry found"
|
|
122
|
-
fi
|
|
123
|
-
|
|
124
|
-
- name: Bundle service with ncc
|
|
125
|
-
if: steps.service_entry.outputs.entry != ''
|
|
117
|
+
# ----------------------------
|
|
118
|
+
# Verify output
|
|
119
|
+
# ----------------------------
|
|
120
|
+
- name: Verify dist output
|
|
126
121
|
run: |
|
|
127
122
|
set -euo pipefail
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
rm -rf dist_tmp
|
|
132
|
-
echo "dist/service.js:"
|
|
133
|
-
ls -lh dist/service.js
|
|
123
|
+
ls -lh dist
|
|
124
|
+
test -f dist/userScript.js
|
|
125
|
+
test -f dist/service.js
|
|
134
126
|
|
|
135
|
-
#
|
|
127
|
+
# ----------------------------
|
|
136
128
|
# Publish to npm
|
|
137
|
-
#
|
|
138
|
-
- name: Publish
|
|
129
|
+
# ----------------------------
|
|
130
|
+
- name: Publish package
|
|
131
|
+
run: npm publish
|
|
139
132
|
env:
|
|
140
133
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
141
|
-
run: |
|
|
142
|
-
set -euo pipefail
|
|
143
|
-
npm publish --access public
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Looking for an app for Android TVs? Check out [TizenTube Cobalt](https://github.
|
|
|
12
12
|
|
|
13
13
|
1. Install TizenBrew from [here](https://github.com/reisxd/TizenBrew) and follow the instructions.
|
|
14
14
|
|
|
15
|
-
2. TizenTube is installed to TizenBrew by default. It should be in the home screen. If not, add `@
|
|
15
|
+
2. TizenTube is installed to TizenBrew by default. It should be in the home screen. If not, add `@krx3d/tizentubekrx` as a NPM module in TizenBrew module manager.
|
|
16
16
|
|
|
17
17
|
# Features
|
|
18
18
|
|