File tree Expand file tree Collapse file tree 1 file changed +22
-13
lines changed
Expand file tree Collapse file tree 1 file changed +22
-13
lines changed Original file line number Diff line number Diff line change 1- import node from './node.mjs' ;
1+ import metacom from 'metacom' ;
2+ import metaconfiguration from 'metaconfiguration' ;
3+ import metalog from 'metalog' ;
4+ import metaschema from 'metaschema' ;
5+ import metautil from 'metautil' ;
6+ import metavm from 'metavm' ;
7+ import metawatch from 'metawatch' ;
8+ import pg from 'pg' ;
9+ import redis from 'redis' ;
10+ import ws from 'ws' ;
211
3- const npm = { } ;
12+ const npm = Object . freeze ( {
13+ metacom,
14+ metaconfiguration,
15+ metalog,
16+ metaschema,
17+ metautil,
18+ metavm,
19+ metawatch,
20+ pg,
21+ redis,
22+ ws,
23+ } ) ;
424
5- const pkgPath = node . path . join ( node . process . cwd ( ) , 'package.json' ) ;
6- const pkg = JSON . parse ( await node . fsp . readFile ( pkgPath ) ) ;
7-
8- if ( pkg . dependencies ) {
9- const modules = Object . keys ( pkg . dependencies ) ;
10- for ( const dependency of modules ) {
11- npm [ dependency ] = await import ( dependency ) ;
12- }
13- }
14-
15- Object . freeze ( npm ) ;
1625export default npm ;
You can’t perform that action at this time.
0 commit comments