@zsukim/ctv-run 1.0.0 โ 1.0.2
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 +35 -34
- package/dist/platforms/tizen.js +5 -3
- package/dist/platforms/webos.js +4 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ctv-run
|
|
2
2
|
|
|
3
3
|
> React, Vue ๋ฑ **์น ๊ธฐ์ ๋ก ๋ง๋ TV ์ฑ**์ Vizio, LG webOS, Fire TV, Samsung Tizen์ ๋ฐฐํฌํ๊ณ ์คํํ๋ CLI ๋๊ตฌ์
๋๋ค.
|
|
4
4
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
| ๋ชจ๋ | ์ต์
| ์ค๋ช
|
|
|
24
24
|
|------|------|------|
|
|
25
|
-
| **Live Mode** | (๊ธฐ๋ณธ๊ฐ) |
|
|
25
|
+
| **Live Mode** | (๊ธฐ๋ณธ๊ฐ) | TV๊ฐ ๋ก๋ํ URL์ TV์ ์ฃผ์
. HMR ์ง์ |
|
|
26
26
|
| **Static Mode** | `--target=dist` | ๋น๋ ๊ฒฐ๊ณผ๋ฌผ์ TV์ ์ง์ ์ค์น |
|
|
27
27
|
|
|
28
28
|
> **Vizio**๋ ๊ตฌ์กฐ์ ํญ์ URL์ด ํ์ํ๋ฏ๋ก Live Mode๋ง ์ง์ํฉ๋๋ค.
|
|
@@ -31,31 +31,16 @@
|
|
|
31
31
|
|
|
32
32
|
## ctv.config.json
|
|
33
33
|
|
|
34
|
-
ํ๋ก์ ํธ ๋ฃจํธ์ ์์ฑํ๋ฉด CLI ์ต์
์ ์๋ตํ ์ ์์ต๋๋ค. CLI ์ต์
์ด ํญ์ ์ฐ์ ํฉ๋๋ค.
|
|
34
|
+
ํ๋ก์ ํธ ๋ฃจํธ์ ์์ฑํ๋ฉด CLI ์ต์
์ ์๋ตํ ์ ์์ต๋๋ค. ์ฌ์ฉํ๋ ํ๋ซํผ์ ์ค์ ๋ง ์ถ๊ฐํ๋ฉด ๋ฉ๋๋ค. CLI ์ต์
์ด ํญ์ ์ฐ์ ํฉ๋๋ค.
|
|
35
35
|
|
|
36
36
|
```json
|
|
37
37
|
{
|
|
38
38
|
"vizio": {
|
|
39
|
-
"ip": "192.168.
|
|
40
|
-
"url": "http://192.168.
|
|
41
|
-
},
|
|
42
|
-
"fire": {
|
|
43
|
-
"ip": "192.168.11.20",
|
|
44
|
-
"package": "com.example.tvapp",
|
|
45
|
-
"url": "http://192.168.11.10:3300",
|
|
46
|
-
"adbPath": "/usr/local/bin/adb",
|
|
47
|
-
"androidAssetsPath": "/path/to/android/app/src/main/assets"
|
|
39
|
+
"ip": "192.168.x.x",
|
|
40
|
+
"url": "http://192.168.x.x:3300"
|
|
48
41
|
},
|
|
49
42
|
"tizen": {
|
|
50
|
-
"ip": "192.168.
|
|
51
|
-
"appId": "A123456789.MyApp"
|
|
52
|
-
},
|
|
53
|
-
"webos": {
|
|
54
|
-
"deviceName": "my-lg-tv",
|
|
55
|
-
"appId": "com.example.tvapp"
|
|
56
|
-
},
|
|
57
|
-
"common": {
|
|
58
|
-
"devServerPort": 3300
|
|
43
|
+
"ip": "192.168.x.x"
|
|
59
44
|
}
|
|
60
45
|
}
|
|
61
46
|
```
|
|
@@ -66,16 +51,19 @@
|
|
|
66
51
|
|
|
67
52
|
| Field | ํ์ | Description |
|
|
68
53
|
|-------|------|-------------|
|
|
69
|
-
| `ip` | โ
|
|
|
70
|
-
| `url` | | TV
|
|
54
|
+
| `ip` | โ
| TV ๋ก์ปฌ IP |
|
|
55
|
+
| `url` | | TV๊ฐ ๋ก๋ํ URL |
|
|
56
|
+
| `port` | | TV๊ฐ ๋ก๋ํ URL์ ํฌํธ |
|
|
71
57
|
|
|
72
58
|
**Fire TV**
|
|
73
59
|
|
|
74
60
|
| Field | ํ์ | Description |
|
|
75
61
|
|-------|------|-------------|
|
|
76
|
-
| `ip` | โ
|
|
|
62
|
+
| `ip` | โ
| TV ๋ก์ปฌ IP |
|
|
77
63
|
| `package` | โ
| Android ์ฑ ํจํค์ง๋ช
|
|
|
78
|
-
| `url` | |
|
|
64
|
+
| `url` | | TV๊ฐ ๋ก๋ํ URL |
|
|
65
|
+
| `port` | | TV๊ฐ ๋ก๋ํ URL์ ํฌํธ |
|
|
66
|
+
| `activity` | | ์คํํ Activity (๊ธฐ๋ณธ๊ฐ: `.MainActivity`) |
|
|
79
67
|
| `adbPath` | | adb ์คํ ๊ฒฝ๋ก (๊ธฐ๋ณธ๊ฐ: `adb`) |
|
|
80
68
|
| `androidAssetsPath` | Static Mode ์ โ
| dist ํ์ผ์ด ๋ณต์ฌ๋ Android `assets` ํด๋ ์ ๋ ๊ฒฝ๋ก |
|
|
81
69
|
|
|
@@ -83,7 +71,9 @@
|
|
|
83
71
|
|
|
84
72
|
| Field | ํ์ | Description |
|
|
85
73
|
|-------|------|-------------|
|
|
86
|
-
| `ip` | โ
|
|
|
74
|
+
| `ip` | โ
| TV ๋ก์ปฌ IP |
|
|
75
|
+
| `url` | | TV๊ฐ ๋ก๋ํ URL |
|
|
76
|
+
| `port` | | TV๊ฐ ๋ก๋ํ URL์ ํฌํธ |
|
|
87
77
|
| `appId` | | Tizen ์ฑ ๊ณ ์ ID (์์ผ๋ฉด ์๋ ์์ฑ) |
|
|
88
78
|
|
|
89
79
|
**WebOS**
|
|
@@ -91,13 +81,15 @@
|
|
|
91
81
|
| Field | ํ์ | Description |
|
|
92
82
|
|-------|------|-------------|
|
|
93
83
|
| `deviceName` | โ
| ares-cli์ ๋ฑ๋ก๋ ๊ธฐ๊ธฐ ์ด๋ฆ |
|
|
84
|
+
| `url` | | TV๊ฐ ๋ก๋ํ URL |
|
|
85
|
+
| `port` | | TV๊ฐ ๋ก๋ํ URL์ ํฌํธ |
|
|
94
86
|
| `appId` | | webOS ์ฑ ID (๊ธฐ๋ณธ๊ฐ: `com.ctvrun.app`) |
|
|
95
87
|
|
|
96
88
|
**Common**
|
|
97
89
|
|
|
98
90
|
| Field | Description |
|
|
99
91
|
|-------|-------------|
|
|
100
|
-
| `devServerPort` |
|
|
92
|
+
| `devServerPort` | ๋ชจ๋ ํ๋ซํผ์ ๊ณตํต์ผ๋ก ์ ์ฉํ ํฌํธ (๊ธฐ๋ณธ๊ฐ: `3000`) |
|
|
101
93
|
|
|
102
94
|
> ๐ก TV IP๊ฐ ๊ฐ๋ฐ์๋ง๋ค ๋ค๋ฅผ ์ ์์ผ๋ฏ๋ก `ctv.config.json`์ `.gitignore`์ ์ถ๊ฐํ๊ณ , `ctv.config.sample.json`์ ์ ์ฅ์์ ๊ณต์ ํ๋ ๊ฒ์ ๊ถ์ฅํฉ๋๋ค.
|
|
103
95
|
|
|
@@ -118,6 +110,9 @@ npx playwright install chromium
|
|
|
118
110
|
ADB๊ฐ ์ค์น๋์ด ์์ด์ผ ํ๋ฉฐ, TV์์ **๊ฐ๋ฐ์ ์ต์
โ ADB ๋๋ฒ๊น
**์ด ํ์ฑํ๋์ด ์์ด์ผ ํฉ๋๋ค.
|
|
119
111
|
|
|
120
112
|
```bash
|
|
113
|
+
# macOS โ ADB ์ค์น
|
|
114
|
+
brew install --cask android-platform-tools
|
|
115
|
+
|
|
121
116
|
# ์ฐ๊ฒฐ ํ์ธ
|
|
122
117
|
adb devices
|
|
123
118
|
```
|
|
@@ -186,7 +181,7 @@ ares-setup-device --list
|
|
|
186
181
|
# URL ์ง์ ์ง์
|
|
187
182
|
ctv-run vizio --ip=192.168.11.27 --url=http://192.168.11.10:3300
|
|
188
183
|
|
|
189
|
-
# ํฌํธ๋ง ์ง์
|
|
184
|
+
# ํฌํธ๋ง ์ง์ โ http://[๋ด PC IP]:3300 ์ผ๋ก ์๋ ์กฐํฉ
|
|
190
185
|
ctv-run vizio --ip=192.168.11.27 --port=3300
|
|
191
186
|
```
|
|
192
187
|
|
|
@@ -199,10 +194,10 @@ Playwright๋ก Vizio ์น ๋ฐ์ฒ๋ฅผ ์๋ ์กฐ์ํ์ฌ ํ์ด๋ง(PIN ์
๋ ฅ) ํ
|
|
|
199
194
|
### Fire TV
|
|
200
195
|
|
|
201
196
|
```bash
|
|
202
|
-
#
|
|
197
|
+
# URL ์ง์ ์ง์
|
|
203
198
|
ctv-run fire --url=http://192.168.11.10:3300
|
|
204
199
|
|
|
205
|
-
#
|
|
200
|
+
# ํฌํธ๋ง ์ง์ โ http://[๋ด PC IP]:3300 ์ผ๋ก ์๋ ์กฐํฉ
|
|
206
201
|
ctv-run fire --port=3300
|
|
207
202
|
|
|
208
203
|
# Static Mode โ dist๋ฅผ Android assets์ ๋ณต์ฌ ํ ๋ก์ปฌ ์คํ
|
|
@@ -221,8 +216,11 @@ ctv-run fire --target=dist
|
|
|
221
216
|
### Tizen
|
|
222
217
|
|
|
223
218
|
```bash
|
|
224
|
-
#
|
|
225
|
-
ctv-run tizen --ip=192.168.11.30
|
|
219
|
+
# URL ์ง์ ์ง์
|
|
220
|
+
ctv-run tizen --ip=192.168.11.30 --url=http://192.168.11.10:3300
|
|
221
|
+
|
|
222
|
+
# ํฌํธ๋ง ์ง์ โ http://[๋ด PC IP]:3300 ์ผ๋ก ์๋ ์กฐํฉ
|
|
223
|
+
ctv-run tizen --ip=192.168.11.30 --port=3300
|
|
226
224
|
|
|
227
225
|
# Static Mode โ dist๋ฅผ .wgt๋ก ํจํค์งํ์ฌ TV์ ์ค์น
|
|
228
226
|
ctv-run tizen --ip=192.168.11.30 --target=dist
|
|
@@ -242,8 +240,11 @@ ctv-run tizen --ip=192.168.11.30 --target=dist
|
|
|
242
240
|
### WebOS
|
|
243
241
|
|
|
244
242
|
```bash
|
|
245
|
-
#
|
|
246
|
-
ctv-run webos --device=my-lg-tv
|
|
243
|
+
# URL ์ง์ ์ง์
|
|
244
|
+
ctv-run webos --device=my-lg-tv --url=http://192.168.11.10:3300
|
|
245
|
+
|
|
246
|
+
# ํฌํธ๋ง ์ง์ โ http://[๋ด PC IP]:3300 ์ผ๋ก ์๋ ์กฐํฉ
|
|
247
|
+
ctv-run webos --device=my-lg-tv --port=3300
|
|
247
248
|
|
|
248
249
|
# Static Mode โ dist๋ฅผ .ipk๋ก ํจํค์งํ์ฌ TV์ ์ค์น
|
|
249
250
|
ctv-run webos --device=my-lg-tv --target=dist
|
package/dist/platforms/tizen.js
CHANGED
|
@@ -21,7 +21,7 @@ const ip_1 = require("../utils/ip");
|
|
|
21
21
|
const platform_1 = require("../utils/platform");
|
|
22
22
|
function runTizen() {
|
|
23
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
var _a, _b, _c;
|
|
24
|
+
var _a, _b, _c, _d, _e;
|
|
25
25
|
const config = (0, config_1.loadConfig)();
|
|
26
26
|
const args = process.argv.slice(2);
|
|
27
27
|
const getArg = (0, platform_1.makeArgParser)(args);
|
|
@@ -32,8 +32,10 @@ function runTizen() {
|
|
|
32
32
|
}
|
|
33
33
|
const targetArg = getArg('target');
|
|
34
34
|
const isLiveMode = !targetArg;
|
|
35
|
+
const port = getArg('port') || ((_b = config.tizen) === null || _b === void 0 ? void 0 : _b.port) || ((_c = config.common) === null || _c === void 0 ? void 0 : _c.devServerPort) || 3000;
|
|
35
36
|
const appUrl = getArg('url') ||
|
|
36
|
-
|
|
37
|
+
((_d = config.tizen) === null || _d === void 0 ? void 0 : _d.url) ||
|
|
38
|
+
`http://${(0, ip_1.getLocalIp)()}:${port}`;
|
|
37
39
|
const tempAppDir = path_1.default.resolve(process.cwd(), '.ctv-run-tizen');
|
|
38
40
|
if (fs_extra_1.default.existsSync(tempAppDir))
|
|
39
41
|
fs_extra_1.default.removeSync(tempAppDir);
|
|
@@ -66,7 +68,7 @@ function runTizen() {
|
|
|
66
68
|
xmlInfo = getInfoFromXml(process.cwd());
|
|
67
69
|
const appId = getArg('appId') ||
|
|
68
70
|
(xmlInfo === null || xmlInfo === void 0 ? void 0 : xmlInfo.appId) ||
|
|
69
|
-
((
|
|
71
|
+
((_e = config.tizen) === null || _e === void 0 ? void 0 : _e.appId) ||
|
|
70
72
|
'A123456789.CtvRunApp';
|
|
71
73
|
const safeAppName = ((xmlInfo === null || xmlInfo === void 0 ? void 0 : xmlInfo.appName) || 'CtvRunApp').replace(/\s+/g, '');
|
|
72
74
|
// config.xml ์์ผ๋ฉด ์์ฑ
|
package/dist/platforms/webos.js
CHANGED
|
@@ -21,7 +21,7 @@ const ip_1 = require("../utils/ip");
|
|
|
21
21
|
const platform_1 = require("../utils/platform");
|
|
22
22
|
function runWebOS() {
|
|
23
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
var _a, _b, _c;
|
|
24
|
+
var _a, _b, _c, _d, _e;
|
|
25
25
|
const config = (0, config_1.loadConfig)();
|
|
26
26
|
const args = process.argv.slice(2);
|
|
27
27
|
const getArg = (0, platform_1.makeArgParser)(args);
|
|
@@ -29,8 +29,10 @@ function runWebOS() {
|
|
|
29
29
|
const deviceName = getArg('device') || ((_a = config.webos) === null || _a === void 0 ? void 0 : _a.deviceName);
|
|
30
30
|
const appId = getArg('appId') || ((_b = config.webos) === null || _b === void 0 ? void 0 : _b.appId) || 'com.ctvrun.app';
|
|
31
31
|
const targetArg = getArg('target');
|
|
32
|
+
const port = getArg('port') || ((_c = config.webos) === null || _c === void 0 ? void 0 : _c.port) || ((_d = config.common) === null || _d === void 0 ? void 0 : _d.devServerPort) || 3000;
|
|
32
33
|
const appUrl = getArg('url') ||
|
|
33
|
-
|
|
34
|
+
((_e = config.webos) === null || _e === void 0 ? void 0 : _e.url) ||
|
|
35
|
+
`http://${(0, ip_1.getLocalIp)()}:${port}`;
|
|
34
36
|
// ๋ฑ๋ก๋ ๊ธฐ๊ธฐ๊ฐ ์๋ ๊ฒฝ์ฐ
|
|
35
37
|
if (!deviceName) {
|
|
36
38
|
console.log('\n๐บ ์ฐ๊ฒฐ๋ WebOS TV ์ ๋ณด๊ฐ ์์ต๋๋ค.');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zsukim/ctv-run",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Smart TV deployment CLI for Vizio, LG webOS, Fire TV, and Samsung Tizen",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ctv",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"scripts": {
|
|
28
28
|
"build": "tsc",
|
|
29
29
|
"watch": "tsc -w",
|
|
30
|
-
"prepublishOnly": "tsc
|
|
30
|
+
"prepublishOnly": "tsc"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"fs-extra": "^11.3.4",
|