We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4150b26 commit 3d9fea4Copy full SHA for 3d9fea4
src/lib/secrets.ts
@@ -1,6 +1,3 @@
1
-// Use dynamic import to support module mock
2
-const fs = await import('node:fs/promises')
3
-
4
export const getSecret = async (key: string) => {
5
if (!key) {
6
return ''
@@ -15,6 +12,8 @@ export const getSecret = async (key: string) => {
15
12
if (!file) {
16
13
17
14
}
+ // Use dynamic import to support module mock
+ const fs = await import('node:fs/promises')
18
19
return await fs.readFile(file, { encoding: 'utf8' }).catch((e) => {
20
if (e.code == 'ENOENT') {
0 commit comments