@zsukim/ctv-run 1.0.11 → 1.0.12
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/dist/platforms/tizen.js +2 -1
- package/dist/platforms/webos.js +10 -5
- package/package.json +1 -1
package/dist/platforms/tizen.js
CHANGED
|
@@ -204,7 +204,8 @@ function runTizen() {
|
|
|
204
204
|
console.error(`\n❌ 오류 발생: ${err.message}`);
|
|
205
205
|
}
|
|
206
206
|
finally {
|
|
207
|
-
|
|
207
|
+
if (fs_extra_1.default.existsSync(tempAppDir))
|
|
208
|
+
fs_extra_1.default.removeSync(tempAppDir);
|
|
208
209
|
}
|
|
209
210
|
});
|
|
210
211
|
}
|
package/dist/platforms/webos.js
CHANGED
|
@@ -70,8 +70,6 @@ function runWebOS() {
|
|
|
70
70
|
if (fs_extra_1.default.existsSync(tempAppDir))
|
|
71
71
|
fs_extra_1.default.removeSync(tempAppDir);
|
|
72
72
|
fs_extra_1.default.ensureDirSync(tempAppDir);
|
|
73
|
-
// appinfo.json 생성
|
|
74
|
-
yield ensureWebosAppInfo(appId, tempAppDir);
|
|
75
73
|
// 콘텐츠 모드 설정
|
|
76
74
|
if (targetArg) {
|
|
77
75
|
const distPath = path_1.default.resolve(process.cwd(), targetArg);
|
|
@@ -99,14 +97,21 @@ function runWebOS() {
|
|
|
99
97
|
`;
|
|
100
98
|
fs_extra_1.default.writeFileSync(path_1.default.join(tempAppDir, 'index.html'), redirectHtml);
|
|
101
99
|
}
|
|
100
|
+
// appinfo.json 생성 (dist에 없으면 기본값으로 생성)
|
|
101
|
+
yield ensureWebosAppInfo(appId, tempAppDir);
|
|
102
|
+
// 실제 appId를 appinfo.json에서 읽음 (dist에 있던 값 우선)
|
|
103
|
+
const appInfoPath = path_1.default.join(tempAppDir, 'appinfo.json');
|
|
104
|
+
const resolvedAppId = fs_extra_1.default.existsSync(appInfoPath)
|
|
105
|
+
? fs_extra_1.default.readJsonSync(appInfoPath).id || appId
|
|
106
|
+
: appId;
|
|
102
107
|
// 아이콘
|
|
103
108
|
(0, platform_1.resolveIcon)(tempAppDir);
|
|
104
109
|
// 패키징
|
|
105
|
-
console.log(`🔨 Packaging [${
|
|
110
|
+
console.log(`🔨 Packaging [${resolvedAppId}]...`);
|
|
106
111
|
(0, child_process_1.execSync)(`ares-package ${tempAppDir} -o .`, { stdio: 'inherit' });
|
|
107
112
|
const ipkFile = fs_extra_1.default
|
|
108
113
|
.readdirSync(process.cwd())
|
|
109
|
-
.find((f) => f.startsWith(
|
|
114
|
+
.find((f) => f.startsWith(resolvedAppId) && f.endsWith('.ipk'));
|
|
110
115
|
if (ipkFile) {
|
|
111
116
|
// 설치
|
|
112
117
|
console.log(`🚀 Installing to ${deviceName}...`);
|
|
@@ -115,7 +120,7 @@ function runWebOS() {
|
|
|
115
120
|
});
|
|
116
121
|
// 런치
|
|
117
122
|
console.log(`▶️ Launching App...`);
|
|
118
|
-
(0, child_process_1.execSync)(`ares-launch -d ${deviceName} ${
|
|
123
|
+
(0, child_process_1.execSync)(`ares-launch -d ${deviceName} ${resolvedAppId}`, { stdio: 'inherit' });
|
|
119
124
|
// 파일 정리
|
|
120
125
|
fs_extra_1.default.removeSync(path_1.default.resolve(process.cwd(), ipkFile));
|
|
121
126
|
fs_extra_1.default.removeSync(tempAppDir);
|