From 8ba3a1f83cacf34132cd1cc301a9082239e0b90b Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Mon, 9 Sep 2024 21:52:47 +0200 Subject: [PATCH] chore: lint --- src/services/build.services.ts | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/services/build.services.ts b/src/services/build.services.ts index 1b240ca..9b20e85 100644 --- a/src/services/build.services.ts +++ b/src/services/build.services.ts @@ -126,21 +126,23 @@ const didc = async () => { return; } - await Promise.all( - ['js', 'ts'].map((type) => - spawn({ - command: 'junobuild-didc', - args: [ - '-i', - SATELLITE_CUSTOM_DID_FILE, - '-t', - type, - '-o', - `${DEVELOPER_PROJECT_SATELLITE_DECLARATIONS_PATH}/satellite.${type}` - ] - }) - ) - ); + const generate = async (type: 'js' | 'ts') => { + await spawn({ + command: 'junobuild-didc', + args: [ + '-i', + SATELLITE_CUSTOM_DID_FILE, + '-t', + type, + '-o', + `${DEVELOPER_PROJECT_SATELLITE_DECLARATIONS_PATH}/satellite.${type}` + ] + }); + }; + + const promises = (['js', 'ts'] as Array<'js' | 'ts'>).map(generate); + + await Promise.all(promises); }; const icWasm = async () => {