From 54252ebe1823965946946f70f7360326e0fc4279 Mon Sep 17 00:00:00 2001 From: GermanVor Date: Thu, 21 Nov 2024 23:30:36 +0100 Subject: [PATCH] chore: sync tsc --- scripts/build_services/index.ts | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/scripts/build_services/index.ts b/scripts/build_services/index.ts index d2e27f63..8dd3778b 100644 --- a/scripts/build_services/index.ts +++ b/scripts/build_services/index.ts @@ -1,10 +1,7 @@ import path from 'path'; import fs from 'fs'; -import { promisify } from 'node:util'; -import child_process from 'node:child_process'; - -const exec = promisify(child_process.exec); +import { exec } from 'child_process'; const CLIENTS_PATH = path.resolve('./clients'); @@ -13,14 +10,11 @@ const getServices = () => { return files.filter((file) => file.isDirectory()).map((file) => file.name); }; -const buildService = async (serviceName: string) => { - await exec( - `cross-env NODE_OPTIONS="--max-old-space-size=4096" tsc -p ${CLIENTS_PATH}/${serviceName}`, - ); +const buildService = (serviceName: string) => { + exec(`NODE_OPTIONS="--max-old-space-size=4096" tsc -p ${CLIENTS_PATH}/${serviceName}`); }; (async () => { const serviceList = getServices(); - - await Promise.all(serviceList.map(buildService)); + serviceList.forEach(buildService); })();