mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 17:29:14 +00:00
Fix nock import
This commit is contained in:
@@ -16,10 +16,9 @@ if (process.env.NODE_ENV !== "development") {
|
|||||||
|
|
||||||
export const registerBddNockRouter = async (server: FastifyZodProvider) => {
|
export const registerBddNockRouter = async (server: FastifyZodProvider) => {
|
||||||
const appCfg = getConfig();
|
const appCfg = getConfig();
|
||||||
const importNock = () => {
|
const importNock = async () => {
|
||||||
// Notice: it seems like importing nock somehow increase memory usage a lots, let's import it lazily.
|
const { default: nock } = await import("nock");
|
||||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
return nock;
|
||||||
return import("nock");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const checkIfBddNockApiEnabled = () => {
|
const checkIfBddNockApiEnabled = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user