File tree 3 files changed +11
-4
lines changed
3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,9 @@ export const defaultConfiguration = {
71
71
72
72
packages : {
73
73
manifest : '/api/packages/manifest' ,
74
+ vfsPaths : [
75
+ 'home:/.packages'
76
+ ] ,
74
77
metadata : [ ]
75
78
} ,
76
79
Original file line number Diff line number Diff line change @@ -134,8 +134,12 @@ export default class Packages {
134
134
135
135
const manifest = this . core . config ( 'packages.manifest' ) ;
136
136
137
+ const query = this . core . config ( 'packages.vfsPaths' , [ ] )
138
+ . map ( str => `root[]=${ encodeURIComponent ( str ) } ` )
139
+ . join ( '&' ) ;
140
+
137
141
return manifest
138
- ? this . core . request ( manifest , { } , 'json' )
142
+ ? this . core . request ( ` ${ manifest } ? ${ query } ` , { } , 'json' )
139
143
. then ( metadata => this . addPackages ( metadata ) )
140
144
. then ( ( ) => true )
141
145
. catch ( error => logger . error ( error ) )
@@ -390,7 +394,7 @@ export default class Packages {
390
394
if ( list instanceof Array ) {
391
395
const append = list
392
396
. map ( iter => Object . assign ( {
393
- _user : false ,
397
+ _vfs : null ,
394
398
type : 'application' ,
395
399
files : [ ]
396
400
} , iter ) ) ;
Original file line number Diff line number Diff line change @@ -52,8 +52,8 @@ export const urlResolver = configuration => {
52
52
metadata . type === 'icons' ? 'icons' : 'apps'
53
53
) ;
54
54
55
- if ( metadata . _user ) {
56
- url = `vfs/readfile?path=${ encodeURIComponent ( `home:/.packages /${ metadata . name } ${ path } ` ) } ` ;
55
+ if ( metadata . _vfs ) {
56
+ url = `vfs/readfile?path=${ encodeURIComponent ( `${ metadata . _vfs } /${ metadata . name } ${ path } ` ) } ` ;
57
57
} else {
58
58
url = `${ type } /${ metadata . name } ${ path } ` ;
59
59
}
You can’t perform that action at this time.
0 commit comments