@putdotio/taizn 1.2.0 → 1.4.0
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/README.md +30 -1
- package/dist/taizn.mjs +987 -260
- package/docs/DISTRIBUTION.md +54 -0
- package/docs/TV_REMOTE.md +70 -0
- package/package.json +10 -9
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Distribution
|
|
2
|
+
|
|
3
|
+
## Delivery Model
|
|
4
|
+
|
|
5
|
+
Every merge to `main` should be releasable.
|
|
6
|
+
|
|
7
|
+
CI runs:
|
|
8
|
+
|
|
9
|
+
1. `vp install`
|
|
10
|
+
2. `vp run verify`
|
|
11
|
+
3. `semantic-release` on `main`
|
|
12
|
+
|
|
13
|
+
The Effect source helper exits when `CI` is set, so install, pack, publish, and
|
|
14
|
+
release automation do not clone the ignored Effect source checkout.
|
|
15
|
+
|
|
16
|
+
The release workflow publishes the scoped `@putdotio/taizn` package to npm, creates a
|
|
17
|
+
GitHub release, and commits the released `package.json` version back to `main`
|
|
18
|
+
with `[skip ci]`.
|
|
19
|
+
|
|
20
|
+
Verify jobs can cancel stale runs; release jobs queue so package publishing is
|
|
21
|
+
not interrupted.
|
|
22
|
+
|
|
23
|
+
## Release Environment
|
|
24
|
+
|
|
25
|
+
The release job uses the GitHub Environment named `release`.
|
|
26
|
+
|
|
27
|
+
Environment entries:
|
|
28
|
+
|
|
29
|
+
- secrets: `PUTIO_RELEASE_BOT_PRIVATE_KEY`
|
|
30
|
+
- variables: `PUTIO_RELEASE_BOT_CLIENT_ID`
|
|
31
|
+
- approval: none
|
|
32
|
+
- branch policy: `main`
|
|
33
|
+
- deployment records: disabled with `deployment: false`
|
|
34
|
+
|
|
35
|
+
The npm package uses Trusted Publishing from GitHub Actions. On npm, configure owner `putdotio`, repository `taizn`, workflow `ci.yml`, and Environment named `release` for the package.
|
|
36
|
+
|
|
37
|
+
During the `@semantic-release/npm` publish step, npm detects the GitHub OIDC identity, mints short-lived publish credentials, and publishes provenance for the release job.
|
|
38
|
+
|
|
39
|
+
Release GitHub writes use `putio-release-bot`, and the release-bot remote is configured only after dependencies are installed.
|
|
40
|
+
|
|
41
|
+
## Local Checks
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
vp install
|
|
45
|
+
vp run verify
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Versioning
|
|
49
|
+
|
|
50
|
+
Conventional Commits drive releases:
|
|
51
|
+
|
|
52
|
+
- `feat:` publishes a minor release
|
|
53
|
+
- `fix:` publishes a patch release
|
|
54
|
+
- breaking changes publish a major release
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Samsung TV Remote
|
|
2
|
+
|
|
3
|
+
`taizn tv` wraps Samsung's websocket remote-control API for local development
|
|
4
|
+
and smoke checks against a physical TV or monitor.
|
|
5
|
+
|
|
6
|
+
## Commands
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
taizn tv info
|
|
10
|
+
taizn tv pair
|
|
11
|
+
taizn tv press KEY_ENTER
|
|
12
|
+
taizn tv press --delay-ms 250 KEY_HOME KEY_DOWN KEY_ENTER
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
- `info` reads the TV's local `/api/v2/` metadata and reports remote-control
|
|
16
|
+
support.
|
|
17
|
+
- `pair` opens a Samsung remote websocket and waits for the TV to approve the
|
|
18
|
+
client. When pairing succeeds, it stores the token in `.taizn/remote.json`.
|
|
19
|
+
- `press` reconnects with the paired token and sends a Samsung remote key such
|
|
20
|
+
as `KEY_HOME`, `KEY_BACK`, `KEY_UP`, `KEY_DOWN`, `KEY_LEFT`, `KEY_RIGHT`, or
|
|
21
|
+
`KEY_ENTER`. Pass multiple keys to send a navigation sequence on one
|
|
22
|
+
websocket connection. `--delay-ms` controls the delay between sequence keys.
|
|
23
|
+
|
|
24
|
+
## Environment
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
TAIZN_TV_HOST=<tv-ip>
|
|
28
|
+
TAIZN_TV_INFO_PORT=8001
|
|
29
|
+
TAIZN_TV_NAME=taizn
|
|
30
|
+
TAIZN_TV_PORT=8002
|
|
31
|
+
TAIZN_TV_PROTOCOL=wss
|
|
32
|
+
TAIZN_TV_TIMEOUT_MS=30000
|
|
33
|
+
TAIZN_TV_TOKEN=<paired-remote-token>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`TAIZN_TV_HOST` is optional when `TAIZN_TARGET=<tv-ip>:26101` is set; `taizn`
|
|
37
|
+
uses the host part of `TAIZN_TARGET` as a fallback. The default remote endpoint
|
|
38
|
+
is `wss://<tv-ip>:8002`. Use `TAIZN_TV_PROTOCOL=ws` and `TAIZN_TV_PORT=8001`
|
|
39
|
+
only for older TVs or test fixtures that do not support the TLS endpoint.
|
|
40
|
+
`TAIZN_TV_INFO_PORT` controls the HTTP metadata endpoint used by `tv info`.
|
|
41
|
+
|
|
42
|
+
`TAIZN_TV_TOKEN` overrides `.taizn/remote.json` for one-off runs. Do not commit
|
|
43
|
+
remote tokens. `TAIZN_TV_TIMEOUT_MS` controls websocket pairing/key-press and
|
|
44
|
+
HTTP info request timeouts.
|
|
45
|
+
|
|
46
|
+
## Pairing
|
|
47
|
+
|
|
48
|
+
Run:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
TAIZN_TV_HOST=<tv-ip> taizn tv pair
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
If the TV shows an allow prompt, approve it. If no prompt appears, check the TV
|
|
55
|
+
settings for IP remote control and device permissions, then retry pairing.
|
|
56
|
+
|
|
57
|
+
Successful pairing prints the token and writes:
|
|
58
|
+
|
|
59
|
+
```txt
|
|
60
|
+
.taizn/remote.json
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The `.taizn/` directory is local state and must stay ignored.
|
|
64
|
+
|
|
65
|
+
## Scope
|
|
66
|
+
|
|
67
|
+
Remote commands send key presses only. They do not install widgets, launch
|
|
68
|
+
applications, or capture screenshots. Use the regular `taizn install` and Tizen
|
|
69
|
+
CLI commands for app lifecycle work. Use logs, app-level probes, Samsung Web
|
|
70
|
+
Inspector, Remote Test Lab, or external capture when visual proof is needed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putdotio/taizn",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "A tiny CLI companion for interacting with Tizen ecosystem.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
25
25
|
"dist",
|
|
26
|
+
"docs",
|
|
26
27
|
"README.md"
|
|
27
28
|
],
|
|
28
29
|
"type": "module",
|
|
@@ -39,21 +40,21 @@
|
|
|
39
40
|
"live:test:install": "vp pack src/taizn.ts && node live-test/run-live-test.ts --install",
|
|
40
41
|
"live:test:profile": "vp pack src/taizn.ts && node live-test/run-live-test.ts --profile",
|
|
41
42
|
"prepack": "vp pack src/taizn.ts",
|
|
43
|
+
"prepare": "./scripts/prepare-effect.sh",
|
|
42
44
|
"smoke": "vp pack src/taizn.ts && node dist/taizn.mjs --version && node dist/taizn.mjs --help >/dev/null",
|
|
43
|
-
"test": "
|
|
45
|
+
"test": "vitest run --passWithNoTests",
|
|
44
46
|
"typecheck": "tsc --noEmit",
|
|
45
|
-
"verify": "vp check . && tsc --noEmit && vp pack src/taizn.ts && vp test
|
|
47
|
+
"verify": "vp check . && tsc --noEmit && vp pack src/taizn.ts && vp run test && npm pack --dry-run"
|
|
46
48
|
},
|
|
47
49
|
"dependencies": {
|
|
48
|
-
"@effect/
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"@effect/printer": "^0.49.0",
|
|
52
|
-
"@effect/printer-ansi": "^0.49.0",
|
|
53
|
-
"effect": "^3.21.2"
|
|
50
|
+
"@effect/platform-node": "4.0.0-beta.66",
|
|
51
|
+
"effect": "4.0.0-beta.66",
|
|
52
|
+
"ws": "^8.20.1"
|
|
54
53
|
},
|
|
55
54
|
"devDependencies": {
|
|
55
|
+
"@effect/vitest": "4.0.0-beta.66",
|
|
56
56
|
"@types/node": "^25.7.0",
|
|
57
|
+
"@types/ws": "^8.18.1",
|
|
57
58
|
"typescript": "^6.0.2",
|
|
58
59
|
"vite-plus": "^0.1.20",
|
|
59
60
|
"vitest": "^4.1.6"
|