Skip to content

Commit fda5edf

Browse files
authored
Merge pull request #107 from nishant-labs/feature/fix-vulns
feat: fix vulnerabilities
2 parents 52017c2 + 70171ae commit fda5edf

File tree

7 files changed

+1157
-873
lines changed

7 files changed

+1157
-873
lines changed

dev/index.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
import { existsSync } from 'node:fs';
22
import { join } from 'node:path';
33

4-
const getFile = (file: string, timeout: number) => {
4+
const getFile = async (file: string, timeout: number) => {
55
const exists = existsSync(file);
66
if (exists) {
7-
import('./server');
7+
await import('./server');
88
} else {
9-
const stopTimer = setInterval(function () {
9+
const stopTimer = setInterval(() => {
1010
const fileExists = existsSync(file);
1111
if (fileExists) {
1212
clearInterval(stopTimer);
13-
import('./server');
13+
void (async () => {
14+
await import('./server');
15+
})();
1416
}
1517
}, timeout);
1618
}
1719
};
1820

19-
getFile(join(process.cwd(), '/lib/index.mjs'), 1000);
21+
await getFile(join(process.cwd(), '/lib/index.mjs'), 1000);

0 commit comments

Comments
 (0)