@@ -1868,12 +1868,13 @@ function createVM(source, name) {
1868
1868
}
1869
1869
}
1870
1870
1871
- function execute ( script , name , verbose , debug ) {
1871
+ function execute ( script , name , engineType , verbose , debug ) {
1872
1872
script . intervals = [ ] ;
1873
1873
script . timeouts = [ ] ;
1874
1874
script . schedules = [ ] ;
1875
1875
script . wizards = [ ] ;
1876
1876
script . name = name ;
1877
+ script . engineType = engineType ;
1877
1878
script . _id = Math . floor ( Math . random ( ) * 0xFFFFFFFF ) ;
1878
1879
script . subscribes = { } ;
1879
1880
script . subscribesFile = { } ;
@@ -1948,7 +1949,7 @@ function updateLogSubscriptions() {
1948
1949
}
1949
1950
1950
1951
function stop ( name , callback ) {
1951
- adapter . log . info ( 'Stop script ' + name ) ;
1952
+ adapter . log . info ( `Stopping script ${ name } ` ) ;
1952
1953
1953
1954
adapter . setState ( 'scriptEnabled.' + name . substring ( SCRIPT_CODE_MARKER . length ) , false , true ) ;
1954
1955
@@ -2106,7 +2107,7 @@ function prepareScript(obj, callback) {
2106
2107
2107
2108
if ( ( obj . common . engineType . toLowerCase ( ) . startsWith ( 'javascript' ) || obj . common . engineType === 'Blockly' || obj . common . engineType === 'Rules' ) ) {
2108
2109
// Javascript
2109
- adapter . log . info ( ' Start javascript ' + name ) ;
2110
+ adapter . log . info ( ` Start JavaScript ${ name } ( ${ obj . common . engineType } )` ) ;
2110
2111
2111
2112
let sourceFn = name ;
2112
2113
if ( webstormDebug ) {
@@ -2119,11 +2120,11 @@ function prepareScript(obj, callback) {
2119
2120
typeof callback === 'function' && callback ( false , name ) ;
2120
2121
return ;
2121
2122
}
2122
- execute ( context . scripts [ name ] , sourceFn , obj . common . verbose , obj . common . debug ) ;
2123
+ execute ( context . scripts [ name ] , sourceFn , obj . common . engineType , obj . common . verbose , obj . common . debug ) ;
2123
2124
typeof callback === 'function' && callback ( true , name ) ;
2124
2125
} else if ( obj . common . engineType . toLowerCase ( ) . startsWith ( 'typescript' ) ) {
2125
2126
// TypeScript
2126
- adapter . log . info ( `${ name } : compiling TypeScript source... ` ) ;
2127
+ adapter . log . info ( `Compiling TypeScript source ${ name } ` ) ;
2127
2128
// The source code must be transformed in order to support top level await
2128
2129
// and to force TypeScript to compile the code as a module
2129
2130
const transformedSource = transformScriptBeforeCompilation ( obj . common . source , false ) ;
@@ -2185,7 +2186,7 @@ function prepareScript(obj, callback) {
2185
2186
typeof callback === 'function' && callback ( false , name ) ;
2186
2187
return ;
2187
2188
}
2188
- execute ( context . scripts [ name ] , name , obj . common . verbose , obj . common . debug ) ;
2189
+ execute ( context . scripts [ name ] , name , obj . common . engineType , obj . common . verbose , obj . common . debug ) ;
2189
2190
typeof callback === 'function' && callback ( true , name ) ;
2190
2191
}
2191
2192
} else {
0 commit comments