44 * Copies data/ and images from packages/cli.
55 */
66
7- import { cpSync } from 'node:fs'
7+ import { promises as fs } from 'node:fs'
88import { spawn } from 'node:child_process'
99import path from 'node:path'
1010import { fileURLToPath } from 'node:url'
@@ -57,7 +57,7 @@ async function main() {
5757
5858 // Copy data directory from packages/cli.
5959 logger . log ( `${ colors . blue ( 'ℹ' ) } Copying data/ from packages/cli...` )
60- cpSync ( path . join ( cliPath , 'data' ) , path . join ( rootPath , 'data' ) , {
60+ await fs . cp ( path . join ( cliPath , 'data' ) , path . join ( rootPath , 'data' ) , {
6161 recursive : true ,
6262 } )
6363 logger . log ( `${ colors . green ( '✓' ) } Copied data/` )
@@ -66,7 +66,7 @@ async function main() {
6666 logger . log ( `${ colors . blue ( 'ℹ' ) } Copying images from repo root...` )
6767 const images = [ 'logo-dark.png' , 'logo-light.png' ]
6868 for ( const image of images ) {
69- cpSync ( path . join ( repoRoot , image ) , path . join ( rootPath , image ) )
69+ await fs . cp ( path . join ( repoRoot , image ) , path . join ( rootPath , image ) )
7070 }
7171 logger . log ( `${ colors . green ( '✓' ) } Copied images` )
7272 } catch ( error ) {
0 commit comments