mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Let the import throw error instead
This commit is contained in:
@@ -8,14 +8,10 @@ import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
|
||||
import { AuthMode } from "@app/services/auth/auth-type";
|
||||
|
||||
export const registerBddNockRouter = async (server: FastifyZodProvider) => {
|
||||
const importNock = async () => {
|
||||
const importNock = () => {
|
||||
// Notice: it seems like importing nock somehow increase memory usage a lots, let's import it lazily.
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
const nock = await import("nock");
|
||||
if (!nock) {
|
||||
throw new InternalServerError({ message: "Failed to import nock" });
|
||||
}
|
||||
return nock;
|
||||
return import("nock");
|
||||
};
|
||||
|
||||
const checkIfBddNockApiEnabled = () => {
|
||||
|
||||
Reference in New Issue
Block a user