File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 44
44
},
45
45
"peerDependencies" : {
46
46
"@stacksjs/arrays" : " workspace:*" ,
47
+ "@stacksjs/path" : " workspace:*" ,
47
48
"@stacksjs/types" : " workspace:*" ,
48
49
"@stacksjs/utils" : " workspace:*" ,
49
50
"fs-extra" : " ^11.1.1" ,
50
51
"unstorage" : " ^1.4.1"
51
52
},
52
53
"devDependencies" : {
53
- "@stacksjs/development" : " workspace:*" ,
54
- "@stacksjs/path" : " workspace:*"
54
+ "@stacksjs/development" : " workspace:*"
55
55
}
56
56
}
Original file line number Diff line number Diff line change @@ -181,20 +181,21 @@ export function createFolder(dir: string): Promise<void> {
181
181
} )
182
182
}
183
183
184
- export function updateConfigFile ( filePath : string , newConfig : Array < string > ) : Promise < void > {
184
+ export function updateConfigFile ( filePath : string , newConfig : Record < string , unknown > ) : Promise < void > {
185
185
return new Promise ( ( resolve , reject ) => {
186
- let config = JSON . parse ( fs . readFileSync ( filePath , 'utf8' ) ) ;
186
+ const config = JSON . parse ( fs . readFileSync ( filePath , 'utf8' ) ) as Record < string , unknown > ;
187
187
188
188
for ( const key in newConfig ) {
189
189
config [ key ] = newConfig [ key ] ;
190
190
}
191
191
192
192
fs . writeFileSync ( filePath , JSON . stringify ( config , null , 2 ) ) ;
193
193
194
- return config
194
+ resolve ( ) ;
195
195
} )
196
196
}
197
197
198
+
198
199
export const filesystem = {
199
200
_dirname,
200
201
readJsonFile,
You can’t perform that action at this time.
0 commit comments