From 86679e078b3cd3cb329f4dd8f85e3ffad0fe2b07 Mon Sep 17 00:00:00 2001 From: "me@rodrigorodriguez.com" Date: Thu, 26 Sep 2024 13:58:24 -0300 Subject: [PATCH] fix(core.gbapp): SaaS missing in PROD. --- packages/core.gbapp/services/GBDeployer.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/core.gbapp/services/GBDeployer.ts b/packages/core.gbapp/services/GBDeployer.ts index 63927c4c4..fccc5c0e7 100644 --- a/packages/core.gbapp/services/GBDeployer.ts +++ b/packages/core.gbapp/services/GBDeployer.ts @@ -437,7 +437,7 @@ export class GBDeployer implements IGBDeployer { let rows: any[] = []; let obj: any = {}; - const workbook = new Excel.Workbook(); + const workbook = new Excel.Workbook(); if (await GBUtil.exists(xls)) { await workbook.xlsx.readFile(xls); @@ -467,10 +467,14 @@ export class GBDeployer implements IGBDeployer { } await asyncPromise.eachSeries(rows, async (line: any) => { if (line && line.length > 0) { - obj[line[1]] = line[2]; + const key = line[1]?.trim(); + const value = line[2]?.trim(); + if (key && value) { + obj[key] = value; + } } }); - + GBLogEx.info(min, `Processing ${rows.length} rows from ${path.basename(filePath)}...`); rows = null; return obj;