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.

22 lines (21 loc) 936 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = isFirewallSupported; const getNodeVersion_1 = require("./getNodeVersion"); function isFirewallSupported() { // @ts-expect-error Unknown type of globalThis if (globalThis.Deno || globalThis.Bun) { // @ts-expect-error Unknown type of globalThis const runtimeName = globalThis.Deno ? "Deno" : "Bun"; // oxlint-disable-next-line no-console console.error(`Error: Aikido Firewall does not support ${runtimeName}. If you want support for ${runtimeName}, please contact us: hello@aikido.dev`); return false; } // Check for unsupported Node.js versions if ((0, getNodeVersion_1.getMajorNodeVersion)() < 16) { // oxlint-disable-next-line no-console console.error("Error: Aikido Firewall requires Node.js 16 or higher to run."); return false; } return true; }