Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Fix rebase
Fang-Pen Lin889fb8b7e09d
diff --git a/backend/src/server/routes/v1/bdd-nock-router.ts b/backend/src/server/routes/v1/bdd-nock-router.tsindex 15981ddd32..43c5b6494f 100644--- a/backend/src/server/routes/v1/bdd-nock-router.ts+++ b/backend/src/server/routes/v1/bdd-nock-router.ts@@ -26,31 +26,31 @@ export const registerBddNockRouter = async (server: FastifyZodProvider) => {}};-// server.route({-// method: "POST",-// url: "/define",-// schema: {-// body: z.object({ definitions: z.unknown().array() }),-// response: {-// 200: z.object({ status: z.string() })-// }-// },-// onRequest: verifyAuth([AuthMode.JWT]),-// handler: async (req) => {-// checkIfBddNockApiEnabled();-// const { body } = req;-// const { definitions } = body;-// logger.info(definitions, "Defining nock");-// const processedDefinitions = definitions.map((definition: unknown) => {-// const { path, ...rest } = definition as Definition;-// return {-// ...rest,-// path:-// path !== undefined && typeof path === "string"-// ? path-// : new RegExp((path as unknown as { regex: string }).regex ?? "")-// } as Definition;-// });+ server.route({+ method: "POST",+ url: "/define",+ schema: {+ body: z.object({ definitions: z.unknown().array() }),+ response: {+ 200: z.object({ status: z.string() })+ }+ },+ onRequest: verifyAuth([AuthMode.JWT]),+ handler: async (req) => {+ checkIfBddNockApiEnabled();+ const { body } = req;+ const { definitions } = body;+ logger.info(definitions, "Defining nock");+ const processedDefinitions = definitions.map((definition: unknown) => {+ const { path, ...rest } = definition as Definition;+ return {+ ...rest,+ path:+ path !== undefined && typeof path === "string"+ ? path+ : new RegExp((path as unknown as { regex: string }).regex ?? "")+ } as Definition;+ });const nock = await importNock();nock.define(processedDefinitions);