From ec39e19f183b7fd278de086ba59ddb59a08b6f57 Mon Sep 17 00:00:00 2001 From: Abu Masyail Date: Tue, 27 Feb 2024 09:31:15 +0700 Subject: [PATCH] fix: only read .json files --- bun.lockb | Bin 66637 -> 66637 bytes src/utils/index.ts | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/bun.lockb b/bun.lockb index d33c85cdf233f57620d5a3f517ec6fae386af841..e3e167c973b01defc678a4998c0fdcd6e270146e 100755 GIT binary patch delta 536 zcmX@x!E&~PWrDtZ_WNv?k5kur9QZ96Z@&2Gbz`T1_eQ@g?#TsAuK^ZceZd1ST(3K=lFnuEgbfYKyB(PU#Vu TJfT;H=+IrjEwXt{@4_+wfX}HN delta 3451 zcmX@x!E&~PWrDuEg+`zBz7Edz(%#37nXMmE8rC^UDT;q}>%XJx=_@C;(JzZzY_jiS zs~MpT3<4abMt|xV7%VhF^yYKiABrbu2+2*(5D~$L8QCV+Ht5%9lon@KGB7X*GBYr6 zF)%a$nGEP+EFeK30MRgYAT|i|Ac+B)q>9zU4J1P|UcF2}0~3?;i}HYU3I_uNC)9JO zV)YCSAd682=_poD(1o;hOg-+Pp{>PGd+P@__>=1iB@oI&0h9={igha!b8{HXgcun3 zpotJJR*y}Pj$*)agMbTZ>zI1nK|@=Mq4om(j}a$yu^4JEDE#4xfeIG00L>EsVm2T~ zPH?!y>WNiIBX#xg;K$`c8d(gr7a0BnV=>fTQ2Y}UPqYe!dRXcopirnE*x+XXhW|hY zKOfNk24E5xuu!NUpm>LQxPD-R9~l1w8vFvF{EwWsK@EoTjLhT=AT6oKz`zYnAG8vy fr-vnY?0~fYXyrRR7K5Xmfnl;;kJRQhy$j0#5NwRf diff --git a/src/utils/index.ts b/src/utils/index.ts index ed509b8..e3dba17 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -21,7 +21,7 @@ export const getFiles = async ( const filePath = path.join(dirPath, file) const stats = await fsPromises.stat(filePath) - if (stats.isFile()) { + if (stats.isFile() && file.endsWith('.json')) { fileList.push(filePath) } else if (stats.isDirectory()) { await getFiles(filePath, fileList)