@@ -299,11 +299,16 @@ class DevServer {
299
299
. join ( '\n' ) } \n\nto use dev-server.`) ;
300
300
}
301
301
async update ( ) {
302
+ var _a ;
302
303
await this . checkSetup ( ) ;
303
304
this . log . notice ( 'Updating everything...' ) ;
305
+ if ( ! ( ( _a = this . config ) === null || _a === void 0 ? void 0 : _a . useSymlinks ) ) {
306
+ this . log . notice ( 'Building local adapter.' ) ;
307
+ await this . buildLocalAdapter ( ) ;
308
+ await this . installLocalAdapter ( false ) ; //do not install, keep .tgz file.
309
+ }
304
310
this . execSync ( 'npm update --loglevel error' , this . profileDir ) ;
305
311
this . uploadAdapter ( 'admin' ) ;
306
- await this . buildLocalAdapter ( ) ;
307
312
await this . installLocalAdapter ( ) ;
308
313
if ( ! this . isJSController ( ) )
309
314
this . uploadAdapter ( this . adapterName ) ;
@@ -1288,7 +1293,7 @@ class DevServer {
1288
1293
this . execSync ( 'npm run build' , this . rootDir ) ;
1289
1294
}
1290
1295
}
1291
- async installLocalAdapter ( ) {
1296
+ async installLocalAdapter ( doInstall = true ) {
1292
1297
var _a , _b ;
1293
1298
this . log . notice ( `Install local iobroker.${ this . adapterName } ` ) ;
1294
1299
if ( ( _a = this . config ) === null || _a === void 0 ? void 0 : _a . useSymlinks ) {
@@ -1306,9 +1311,11 @@ class DevServer {
1306
1311
const { stdout } = await this . getExecOutput ( 'npm pack' , this . rootDir ) ;
1307
1312
const filename = stdout . trim ( ) ;
1308
1313
this . log . info ( `Packed to ${ filename } ` ) ;
1309
- const fullPath = path . join ( this . rootDir , filename ) ;
1310
- this . execSync ( `npm install "${ fullPath } "` , this . profileDir ) ;
1311
- await this . rimraf ( fullPath ) ;
1314
+ if ( doInstall ) {
1315
+ const fullPath = path . join ( this . rootDir , filename ) ;
1316
+ this . execSync ( `npm install "${ fullPath } "` , this . profileDir ) ;
1317
+ await this . rimraf ( fullPath ) ;
1318
+ }
1312
1319
}
1313
1320
}
1314
1321
async installRepoAdapter ( adapterName ) {
0 commit comments