@zsukim/ctv-run 1.0.0 โ†’ 1.0.3

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 CHANGED
@@ -1,4 +1,4 @@
1
- # ๐Ÿ“บ ctv-run
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** | (๊ธฐ๋ณธ๊ฐ’) | ๊ฐœ๋ฐœ ์„œ๋ฒ„ URL์„ TV์— ์ฃผ์ž…. HMR ์ง€์› |
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.11.27",
40
- "url": "http://192.168.11.10:3300"
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.11.30",
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,24 +51,30 @@
66
51
 
67
52
  | Field | ํ•„์ˆ˜ | Description |
68
53
  |-------|------|-------------|
69
- | `ip` | โœ… | Vizio TV ๋กœ์ปฌ IP |
70
- | `url` | | TV์—์„œ ๋กœ๋“œํ•  ๊ฐœ๋ฐœ ์„œ๋ฒ„ URL |
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` | โœ… | Fire TV ๋กœ์ปฌ IP |
62
+ | `ip` | โœ… | TV ๋กœ์ปฌ IP |
77
63
  | `package` | โœ… | Android ์•ฑ ํŒจํ‚ค์ง€๋ช… |
78
- | `url` | | Live Mode์—์„œ ์ฃผ์ž…ํ•  ๊ฐœ๋ฐœ ์„œ๋ฒ„ URL |
64
+ | `url` | | TV๊ฐ€ ๋กœ๋“œํ•  URL |
65
+ | `port` | | TV๊ฐ€ ๋กœ๋“œํ•  URL์˜ ํฌํŠธ |
66
+ | `activity` | | ์‹คํ–‰ํ•  Activity (๊ธฐ๋ณธ๊ฐ’: `.MainActivity`) |
79
67
  | `adbPath` | | adb ์‹คํ–‰ ๊ฒฝ๋กœ (๊ธฐ๋ณธ๊ฐ’: `adb`) |
80
- | `androidAssetsPath` | Static Mode ์‹œ โœ… | dist ํŒŒ์ผ์ด ๋ณต์‚ฌ๋  Android `assets` ํด๋” ์ ˆ๋Œ€ ๊ฒฝ๋กœ |
68
+ | `androidProjectPath` | Static Mode ์‹œ โœ… | Android ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ ๊ฒฝ๋กœ (gradlew๊ฐ€ ์žˆ๋Š” ํด๋”) |
69
+ | `moduleName` | | Android ๋ชจ๋“ˆ๋ช… (๊ธฐ๋ณธ๊ฐ’: `app`) |
81
70
 
82
71
  **Tizen**
83
72
 
84
73
  | Field | ํ•„์ˆ˜ | Description |
85
74
  |-------|------|-------------|
86
- | `ip` | โœ… | Samsung Tizen TV ๋กœ์ปฌ IP |
75
+ | `ip` | โœ… | TV ๋กœ์ปฌ IP |
76
+ | `url` | | TV๊ฐ€ ๋กœ๋“œํ•  URL |
77
+ | `port` | | TV๊ฐ€ ๋กœ๋“œํ•  URL์˜ ํฌํŠธ |
87
78
  | `appId` | | Tizen ์•ฑ ๊ณ ์œ  ID (์—†์œผ๋ฉด ์ž๋™ ์ƒ์„ฑ) |
88
79
 
89
80
  **WebOS**
@@ -91,13 +82,15 @@
91
82
  | Field | ํ•„์ˆ˜ | Description |
92
83
  |-------|------|-------------|
93
84
  | `deviceName` | โœ… | ares-cli์— ๋“ฑ๋ก๋œ ๊ธฐ๊ธฐ ์ด๋ฆ„ |
85
+ | `url` | | TV๊ฐ€ ๋กœ๋“œํ•  URL |
86
+ | `port` | | TV๊ฐ€ ๋กœ๋“œํ•  URL์˜ ํฌํŠธ |
94
87
  | `appId` | | webOS ์•ฑ ID (๊ธฐ๋ณธ๊ฐ’: `com.ctvrun.app`) |
95
88
 
96
89
  **Common**
97
90
 
98
91
  | Field | Description |
99
92
  |-------|-------------|
100
- | `devServerPort` | Live Mode์—์„œ ์‚ฌ์šฉํ•  ๊ฐœ๋ฐœ ์„œ๋ฒ„ ํฌํŠธ (๊ธฐ๋ณธ๊ฐ’: `3000`) |
93
+ | `devServerPort` | ๋ชจ๋“  ํ”Œ๋žซํผ์— ๊ณตํ†ต์œผ๋กœ ์ ์šฉํ•  ํฌํŠธ (๊ธฐ๋ณธ๊ฐ’: `3000`) |
101
94
 
102
95
  > ๐Ÿ’ก TV IP๊ฐ€ ๊ฐœ๋ฐœ์ž๋งˆ๋‹ค ๋‹ค๋ฅผ ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ `ctv.config.json`์€ `.gitignore`์— ์ถ”๊ฐ€ํ•˜๊ณ , `ctv.config.sample.json`์„ ์ €์žฅ์†Œ์— ๊ณต์œ ํ•˜๋Š” ๊ฒƒ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค.
103
96
 
@@ -118,6 +111,9 @@ npx playwright install chromium
118
111
  ADB๊ฐ€ ์„ค์น˜๋˜์–ด ์žˆ์–ด์•ผ ํ•˜๋ฉฐ, TV์—์„œ **๊ฐœ๋ฐœ์ž ์˜ต์…˜ โ†’ ADB ๋””๋ฒ„๊น…**์ด ํ™œ์„ฑํ™”๋˜์–ด ์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
119
112
 
120
113
  ```bash
114
+ # macOS โ€” ADB ์„ค์น˜
115
+ brew install --cask android-platform-tools
116
+
121
117
  # ์—ฐ๊ฒฐ ํ™•์ธ
122
118
  adb devices
123
119
  ```
@@ -186,7 +182,7 @@ ares-setup-device --list
186
182
  # URL ์ง์ ‘ ์ง€์ •
187
183
  ctv-run vizio --ip=192.168.11.27 --url=http://192.168.11.10:3300
188
184
 
189
- # ํฌํŠธ๋งŒ ์ง€์ • (๋กœ์ปฌ IP ์ž๋™ ๊ฐ์ง€)
185
+ # ํฌํŠธ๋งŒ ์ง€์ • โ†’ http://[๋‚ด PC IP]:3300 ์œผ๋กœ ์ž๋™ ์กฐํ•ฉ
190
186
  ctv-run vizio --ip=192.168.11.27 --port=3300
191
187
  ```
192
188
 
@@ -199,10 +195,10 @@ Playwright๋กœ Vizio ์›น ๋Ÿฐ์ฒ˜๋ฅผ ์ž๋™ ์กฐ์ž‘ํ•˜์—ฌ ํŽ˜์–ด๋ง(PIN ์ž…๋ ฅ) ํ›„
199
195
  ### Fire TV
200
196
 
201
197
  ```bash
202
- # Live Mode โ€” ๊ฐœ๋ฐœ ์„œ๋ฒ„ URL ์ฃผ์ž…
198
+ # URL ์ง์ ‘ ์ง€์ •
203
199
  ctv-run fire --url=http://192.168.11.10:3300
204
200
 
205
- # Live Mode โ€” ํฌํŠธ๋งŒ ์ง€์ •
201
+ # ํฌํŠธ๋งŒ ์ง€์ • โ†’ http://[๋‚ด PC IP]:3300 ์œผ๋กœ ์ž๋™ ์กฐํ•ฉ
206
202
  ctv-run fire --port=3300
207
203
 
208
204
  # Static Mode โ€” dist๋ฅผ Android assets์— ๋ณต์‚ฌ ํ›„ ๋กœ์ปฌ ์‹คํ–‰
@@ -221,8 +217,11 @@ ctv-run fire --target=dist
221
217
  ### Tizen
222
218
 
223
219
  ```bash
224
- # Live Mode โ€” ๊ฐœ๋ฐœ ์„œ๋ฒ„๋กœ ๋ฆฌ๋‹ค์ด๋ ‰ํŠธํ•˜๋Š” ์•ฑ ์„ค์น˜ ํ›„ ์‹คํ–‰
225
- ctv-run tizen --ip=192.168.11.30
220
+ # URL ์ง์ ‘ ์ง€์ •
221
+ ctv-run tizen --ip=192.168.11.30 --url=http://192.168.11.10:3300
222
+
223
+ # ํฌํŠธ๋งŒ ์ง€์ • โ†’ http://[๋‚ด PC IP]:3300 ์œผ๋กœ ์ž๋™ ์กฐํ•ฉ
224
+ ctv-run tizen --ip=192.168.11.30 --port=3300
226
225
 
227
226
  # Static Mode โ€” dist๋ฅผ .wgt๋กœ ํŒจํ‚ค์ง•ํ•˜์—ฌ TV์— ์„ค์น˜
228
227
  ctv-run tizen --ip=192.168.11.30 --target=dist
@@ -242,8 +241,11 @@ ctv-run tizen --ip=192.168.11.30 --target=dist
242
241
  ### WebOS
243
242
 
244
243
  ```bash
245
- # Live Mode โ€” ๊ฐœ๋ฐœ ์„œ๋ฒ„๋กœ ๋ฆฌ๋‹ค์ด๋ ‰ํŠธํ•˜๋Š” ์•ฑ ์„ค์น˜ ํ›„ ์‹คํ–‰
246
- ctv-run webos --device=my-lg-tv
244
+ # URL ์ง์ ‘ ์ง€์ •
245
+ ctv-run webos --device=my-lg-tv --url=http://192.168.11.10:3300
246
+
247
+ # ํฌํŠธ๋งŒ ์ง€์ • โ†’ http://[๋‚ด PC IP]:3300 ์œผ๋กœ ์ž๋™ ์กฐํ•ฉ
248
+ ctv-run webos --device=my-lg-tv --port=3300
247
249
 
248
250
  # Static Mode โ€” dist๋ฅผ .ipk๋กœ ํŒจํ‚ค์ง•ํ•˜์—ฌ TV์— ์„ค์น˜
249
251
  ctv-run webos --device=my-lg-tv --target=dist
@@ -21,7 +21,7 @@ const ip_1 = require("../utils/ip");
21
21
  const platform_1 = require("../utils/platform");
22
22
  function runFireTv() {
23
23
  return __awaiter(this, void 0, void 0, function* () {
24
- var _a, _b, _c, _d, _e, _f, _g, _h;
24
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
25
25
  const args = process.argv.slice(2);
26
26
  const config = (0, config_1.loadConfig)();
27
27
  const getArg = (0, platform_1.makeArgParser)(args);
@@ -31,49 +31,61 @@ function runFireTv() {
31
31
  const pkg = getArg('package') || ((_c = config.fire) === null || _c === void 0 ? void 0 : _c.package);
32
32
  const activity = getArg('activity') || ((_d = config.fire) === null || _d === void 0 ? void 0 : _d.activity) || '.MainActivity';
33
33
  const targetArg = getArg('target');
34
- const androidAssetsPath = getArg('assetsPath') || ((_e = config.fire) === null || _e === void 0 ? void 0 : _e.androidAssetsPath);
34
+ const androidProjectPath = getArg('androidProjectPath') || ((_e = config.fire) === null || _e === void 0 ? void 0 : _e.androidProjectPath);
35
+ const moduleName = getArg('moduleName') || ((_f = config.fire) === null || _f === void 0 ? void 0 : _f.moduleName) || 'app';
35
36
  // ์•ฑ URL ๊ฒฐ์ • (Live Mode ์ „์šฉ)
36
- const userUrl = getArg('url') || ((_f = config.fire) === null || _f === void 0 ? void 0 : _f.url);
37
- const port = getArg('port') || ((_g = config.fire) === null || _g === void 0 ? void 0 : _g.port) || ((_h = config.common) === null || _h === void 0 ? void 0 : _h.devServerPort) || 3000;
37
+ const userUrl = getArg('url') || ((_g = config.fire) === null || _g === void 0 ? void 0 : _g.url);
38
+ const port = getArg('port') || ((_h = config.fire) === null || _h === void 0 ? void 0 : _h.port) || ((_j = config.common) === null || _j === void 0 ? void 0 : _j.devServerPort) || 3000;
38
39
  const appUrl = userUrl || `http://${(0, ip_1.getLocalIp)()}:${port}`;
39
40
  if (!tvIp || !pkg) {
40
41
  console.error(`\nโŒ Fire TV ํ•„์ˆ˜ ์„ค์ •(ip, package)์ด ๋ˆ„๋ฝ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!`);
41
42
  return;
42
43
  }
43
- // Static Mode: dist๋ฅผ Android assets์— ๋ณต์‚ฌ (Tizen/WebOS์™€ ๋™์ผํ•œ ๊ฐœ๋…)
44
+ // Static Mode
44
45
  if (targetArg) {
45
- if (!androidAssetsPath) {
46
- console.error(`\nโŒ ctv.config.json์— 'androidAssetsPath'๊ฐ€ ์„ค์ •๋˜์–ด ์žˆ์ง€ ์•Š์Šต๋‹ˆ๋‹ค.`);
46
+ if (!androidProjectPath) {
47
+ console.error(`\nโŒ ctv.config.json์— 'androidProjectPath'๊ฐ€ ์„ค์ •๋˜์–ด ์žˆ์ง€ ์•Š์Šต๋‹ˆ๋‹ค.`);
47
48
  return;
48
49
  }
49
50
  const distPath = path_1.default.resolve(process.cwd(), targetArg);
50
- const finalAssetsPath = path_1.default.isAbsolute(androidAssetsPath)
51
- ? androidAssetsPath
52
- : path_1.default.resolve(process.cwd(), androidAssetsPath);
51
+ const assetsPath = path_1.default.join(androidProjectPath, moduleName, 'src', 'main', 'assets');
52
+ const apkPath = path_1.default.join(androidProjectPath, moduleName, 'build', 'outputs', 'apk', 'debug', `${moduleName}-debug.apk`);
53
53
  console.log(`-----------------------------------------`);
54
54
  console.log(`๐Ÿ“ก Target TV IP : ${tvIp}`);
55
55
  console.log(`๐Ÿ“ฆ Package Name : ${pkg}`);
56
56
  console.log(`๐Ÿ›  ADB Binary : ${adbBin}`);
57
- console.log(`๐Ÿ“ฆ Mode : ๐Ÿ“‚ Static Mode (Assets Embedded)`);
58
- console.log(`๐Ÿ“‚ Path : ${finalAssetsPath}`);
57
+ console.log(`๐Ÿ“ฆ Mode : ๐Ÿ“‚ Static Mode`);
58
+ console.log(`๐Ÿ“‚ Project : ${androidProjectPath}`);
59
59
  console.log(`-----------------------------------------`);
60
60
  try {
61
- const parentPath = path_1.default.dirname(finalAssetsPath);
62
- if (!fs_1.default.existsSync(parentPath)) {
63
- console.error(`\nโŒ ๊ฒฝ๋กœ ์˜ค๋ฅ˜: ๋ถ€๋ชจ ํด๋”๊ฐ€ ์กด์žฌํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. (${parentPath})`);
61
+ // assets ๋ณต์‚ฌ
62
+ if (!fs_1.default.existsSync(path_1.default.dirname(assetsPath))) {
63
+ console.error(`\nโŒ ๊ฒฝ๋กœ ์˜ค๋ฅ˜: Android ํ”„๋กœ์ ํŠธ๋ฅผ ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. (${androidProjectPath})`);
64
64
  return;
65
65
  }
66
- if (fs_1.default.existsSync(finalAssetsPath)) {
67
- (0, child_process_1.execSync)(`rm -rf "${finalAssetsPath}"/*`);
66
+ if (fs_1.default.existsSync(assetsPath)) {
67
+ (0, child_process_1.execSync)(`rm -rf "${assetsPath}"/*`);
68
68
  }
69
69
  else {
70
- (0, child_process_1.execSync)(`mkdir -p "${finalAssetsPath}"`);
70
+ (0, child_process_1.execSync)(`mkdir -p "${assetsPath}"`);
71
71
  }
72
- (0, child_process_1.execSync)(`cp -r "${distPath}"/* "${finalAssetsPath}"`);
72
+ (0, child_process_1.execSync)(`cp -r "${distPath}"/* "${assetsPath}"`);
73
73
  console.log(`โœ… Asset copy complete.`);
74
+ // APK ๋นŒ๋“œ
75
+ console.log(`\n๐Ÿ”จ Building APK...`);
76
+ (0, child_process_1.execSync)(`./gradlew ${moduleName}:assembleDebug`, {
77
+ cwd: androidProjectPath,
78
+ stdio: 'inherit',
79
+ });
80
+ // APK ์„ค์น˜
81
+ console.log(`\n๐Ÿ“ฒ Installing APK...`);
82
+ (0, child_process_1.execSync)(`${adbBin} -s ${tvIp}:5555 install -r "${apkPath}"`, {
83
+ stdio: 'inherit',
84
+ });
85
+ console.log(`โœ… APK install complete.`);
74
86
  }
75
87
  catch (err) {
76
- console.error(`\nโŒ ํŒŒ์ผ ๋ณต์‚ฌ ์ค‘ ์—๋Ÿฌ ๋ฐœ์ƒ: ${err.message}`);
88
+ console.error(`\nโŒ Static Mode ์‹คํŒจ: ${err.message}`);
77
89
  return;
78
90
  }
79
91
  }
@@ -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
- `http://${(0, ip_1.getLocalIp)()}:${((_b = config.common) === null || _b === void 0 ? void 0 : _b.devServerPort) || 3000}`;
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
- ((_c = config.tizen) === null || _c === void 0 ? void 0 : _c.appId) ||
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 ์—†์œผ๋ฉด ์ƒ์„ฑ
@@ -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
- `http://${(0, ip_1.getLocalIp)()}:${((_c = config.common) === null || _c === void 0 ? void 0 : _c.devServerPort) || 3000}`;
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.0",
3
+ "version": "1.0.3",
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 && cp src/README.md README.md"
30
+ "prepublishOnly": "tsc"
31
31
  },
32
32
  "dependencies": {
33
33
  "fs-extra": "^11.3.4",