nl_tokens: get all installed zealder apps / themes
pl_tokens: function getPackages ( app , cb = null ) { let stdout = '' ; const ls = spawn ( 'npm' , [ 'ls' , '--json' , '--prod' , '--depth=0' , '--long' ] ) ; ls . stdout . on ( 'data' , data => { stdout += data ; } ) ; ls . stderr . on ( 'data' , data => { app . error ( ` ${ data } ` ) ; } ) ; ls . on ( 'close' , ( <mask> ) => { if ( 0 !== code ) app . error ( 'child process exited with code %s' , code ) ; app . debug ( 'loading installed zealder packages' ) ; var p = JSON . parse ( stdout ) ; if ( p . dependencies ) { // now set packages to state setPackagesState ( app , p . dependencies , cb ) ; } } ) ; }