@@ -20,27 +20,20 @@ const adjacentSmithyPkgs = fs.readdirSync(smithyPackages);
2020    if  ( ! fs . existsSync ( path . join ( smithyPackages ,  smithyPkg ,  "dist-cjs" ) ) )  { 
2121      continue ; 
2222    } 
23-     await  Promise . all ( [ 
24-       spawnProcess ( "cp" ,  [ 
25-         "-r" , 
26-         path . join ( smithyPackages ,  smithyPkg ,  "dist-cjs" ) , 
27-         path . join ( node_modules ,  "@smithy" ,  smithyPkg ) , 
28-       ] ) , 
29-       spawnProcess ( "cp" ,  [ 
30-         "-r" , 
31-         path . join ( smithyPackages ,  smithyPkg ,  "dist-types" ) , 
32-         path . join ( node_modules ,  "@smithy" ,  smithyPkg ) , 
33-       ] ) , 
34-       spawnProcess ( "cp" ,  [ 
35-         "-r" , 
36-         path . join ( smithyPackages ,  smithyPkg ,  "dist-es" ) , 
37-         path . join ( node_modules ,  "@smithy" ,  smithyPkg ) , 
38-       ] ) , 
39-       spawnProcess ( "cp" ,  [ 
40-         "-r" , 
23+ 
24+     const  operations  =  [ 
25+       [ path . join ( smithyPackages ,  smithyPkg ,  "dist-cjs" ) ,  path . join ( node_modules ,  "@smithy" ,  smithyPkg ,  "dist-cjs" ) ] , 
26+       [ path . join ( smithyPackages ,  smithyPkg ,  "dist-types" ) ,  path . join ( node_modules ,  "@smithy" ,  smithyPkg ,  "dist-types" ) ] , 
27+       [ path . join ( smithyPackages ,  smithyPkg ,  "dist-es" ) ,  path . join ( node_modules ,  "@smithy" ,  smithyPkg ,  "dist-es" ) ] , 
28+       [ 
4129        path . join ( smithyPackages ,  smithyPkg ,  "package.json" ) , 
42-         path . join ( node_modules ,  "@smithy" ,  smithyPkg ) , 
43-       ] ) , 
44-     ] ) ; 
30+         path . join ( node_modules ,  "@smithy" ,  smithyPkg ,  "package.json" ) , 
31+       ] , 
32+     ] ; 
33+ 
34+     for  ( const  [ from ,  to ]  of  operations )  { 
35+       fs . cpSync ( from ,  to ,  {  recursive : true ,  force : true ,  errorOnExist : false  } ) ; 
36+     } 
37+     console . log ( "copied" ,  smithyPkg ) ; 
4538  } 
4639} ) ( ) ; 
0 commit comments