Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion library/agent/hooks/wrapRequire.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ function patchPackage(this: mod, id: string, originalExports: unknown) {
// Read the package.json of the required package
let packageJson: PackageJson | undefined;
try {
packageJson = originalRequire(
packageJson = originalRequire.call(
this,
`${pathInfo.base}/package.json`
) as PackageJson;
} catch {
Expand Down
5 changes: 2 additions & 3 deletions library/helpers/isFirewallSupported.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ import { getMajorNodeVersion } from "./getNodeVersion";

export default 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";
if (globalThis.Deno) {
const runtimeName = "Deno";
console.error(
`Error: Aikido Firewall does not support ${runtimeName}. If you want support for ${runtimeName}, please contact us: [email protected]`
);
Expand Down
Loading