UNPKG

@aikidosec/firewall

Version:

Zen by Aikido is an embedded Application Firewall that autonomously protects Node.js apps against common and critical attacks, provides rate limiting, detects malicious traffic (including bots), and more.

21 lines (20 loc) 1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.warnIfUsingTurbopackWithOldSystem = warnIfUsingTurbopackWithOldSystem; const isUsingTurbopack_1 = require("./isUsingTurbopack"); const colorText_1 = require("./colorText"); const warnBox_1 = require("./warnBox"); function warnIfUsingTurbopackWithOldSystem() { // Defer so that Next.js standalone server.js can set __NEXT_PRIVATE_STANDALONE_CONFIG first setImmediate(() => { try { if ((0, isUsingTurbopack_1.isUsingTurbopack)()) { // oxlint-disable-next-line no-console console.warn((0, colorText_1.colorText)("red", (0, warnBox_1.warnBox)("Zen is NOT protecting your application. Your app is using Turbopack, which requires the new hook system. Setup instructions: https://github.com/AikidoSec/firewall-node/blob/main/docs/esm.md"))); } } catch { // Ignore errors to avoid crashing the application } }); }