@@ -13,7 +13,6 @@ import Service, { Message } from 'webos-service';
13
13
14
14
import { asyncStat , asyncExecFile , asyncPipeline , asyncUnlink , asyncWriteFile , asyncReadFile , asyncChmod , asyncMkdir } from './adapter' ;
15
15
import { fetchWrapper } from './fetch-wrapper' ;
16
- import { buildBetterJail } from './better-jail' ;
17
16
18
17
import rootAppInfo from '../appinfo.json' ;
19
18
import serviceInfo from './services.json' ;
@@ -407,17 +406,12 @@ function runService(): void {
407
406
return serviceRemote as Service ;
408
407
}
409
408
410
- interface AppInfo {
411
- id : string ;
412
- title : string ;
413
- type : string ;
414
- folderPath : string ;
415
- }
416
- interface AppsList {
417
- apps : AppInfo [ ] ;
418
- }
419
- async function getAppInfo ( appId : string ) : Promise < AppInfo > {
420
- const appList = await asyncCall < AppsList > ( getInstallerService ( ) , 'luna://com.webos.applicationManager/dev/listApps' , { } ) ;
409
+ async function getAppInfo ( appId : string ) : Promise < Record < string , any > > {
410
+ const appList = await asyncCall < { apps : { id : string } [ ] } > (
411
+ getInstallerService ( ) ,
412
+ 'luna://com.webos.applicationManager/dev/listApps' ,
413
+ { } ,
414
+ ) ;
421
415
const appInfo = appList . apps . find ( ( app ) => app . id === appId ) ;
422
416
if ( ! appInfo ) throw new Error ( `Invalid appId, or unsupported application type: ${ appId } ` ) ;
423
417
return appInfo ;
@@ -497,13 +491,7 @@ function runService(): void {
497
491
498
492
try {
499
493
const appInfo = await getAppInfo ( installedPackageId ) ;
500
- if ( appInfo . type === 'native' && runningAsRoot ) {
501
- await createToast ( `Updating jailer config for ${ appInfo . title } …` , service ) ;
502
- await buildBetterJail ( appInfo . id , appInfo . folderPath ) . catch ( ( err ) => {
503
- console . warn ( 'jailer execution failed:' , err ) ;
504
- } ) ;
505
- }
506
- await createToast ( `Application installed: ${ appInfo . title } ` , service ) ;
494
+ await createToast ( `Application installed: ${ appInfo [ 'title' ] } ` , service ) ;
507
495
} catch ( err : unknown ) {
508
496
console . warn ( 'appinfo fetch failed:' , err ) ;
509
497
await createToast ( `Application installed: ${ installedPackageId } ` , service ) ;
0 commit comments