Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@arcjet/analyze

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arcjet/analyze - npm Package Compare versions

Comparing version 1.0.0-alpha.2 to 1.0.0-alpha.3

26

index.js

@@ -18,16 +18,16 @@ import initWasm, { detect_bot, generate_fingerprint, is_valid_email } from './wasm/arcjet_analyze_js_req.js';

if (state === "uninitialized") {
let wasmModule;
// We use `NEXT_RUNTIME` env var to DCE the Node/Browser code in the `else` block
// possible values: "edge" | "nodejs" | undefined
if (process.env["NEXT_RUNTIME"] === "edge") {
const mod = await import(
// @ts-expect-error
'./wasm/arcjet_analyze_js_req_bg.wasm?module');
wasmModule = mod.default;
}
else {
const { wasm } = await import('./wasm/arcjet.wasm.js');
wasmModule = await WebAssembly.compile(wasm);
}
try {
let wasmModule;
// We use `NEXT_RUNTIME` env var to DCE the Node/Browser code in the `else` block
// possible values: "edge" | "nodejs" | undefined
if (process.env["NEXT_RUNTIME"] === "edge") {
const mod = await import(
// @ts-expect-error
'./wasm/arcjet_analyze_js_req_bg.wasm?module');
wasmModule = mod.default;
}
else {
const { wasm } = await import('./wasm/arcjet.wasm.js');
wasmModule = await WebAssembly.compile(await wasm());
}
await initWasm(wasmModule);

@@ -34,0 +34,0 @@ state = "initialized";

@@ -47,17 +47,17 @@ import initWasm, {

if (state === "uninitialized") {
let wasmModule: WebAssembly.Module;
// We use `NEXT_RUNTIME` env var to DCE the Node/Browser code in the `else` block
// possible values: "edge" | "nodejs" | undefined
if (process.env["NEXT_RUNTIME"] === "edge") {
const mod = await import(
// @ts-expect-error
"./wasm/arcjet_analyze_js_req_bg.wasm?module"
);
wasmModule = mod.default;
} else {
const { wasm } = await import("./wasm/arcjet.wasm.js");
wasmModule = await WebAssembly.compile(wasm);
}
try {
let wasmModule: WebAssembly.Module;
// We use `NEXT_RUNTIME` env var to DCE the Node/Browser code in the `else` block
// possible values: "edge" | "nodejs" | undefined
if (process.env["NEXT_RUNTIME"] === "edge") {
const mod = await import(
// @ts-expect-error
"./wasm/arcjet_analyze_js_req_bg.wasm?module"
);
wasmModule = mod.default;
} else {
const { wasm } = await import("./wasm/arcjet.wasm.js");
wasmModule = await WebAssembly.compile(await wasm());
}
try {
await initWasm(wasmModule);

@@ -64,0 +64,0 @@ state = "initialized";

{
"name": "@arcjet/analyze",
"version": "1.0.0-alpha.2",
"version": "1.0.0-alpha.3",
"description": "Arcjet local analysis engine",

@@ -31,2 +31,3 @@ "license": "Apache-2.0",

"lint": "eslint .",
"pretest": "npm run build",
"test": "NODE_OPTIONS=--experimental-vm-modules jest --passWithNoTests"

@@ -38,12 +39,12 @@ },

"dependencies": {
"@arcjet/logger": "1.0.0-alpha.2"
"@arcjet/logger": "1.0.0-alpha.3"
},
"devDependencies": {
"@arcjet/eslint-config": "1.0.0-alpha.2",
"@arcjet/rollup-config": "1.0.0-alpha.2",
"@arcjet/tsconfig": "1.0.0-alpha.2",
"@arcjet/eslint-config": "1.0.0-alpha.3",
"@arcjet/rollup-config": "1.0.0-alpha.3",
"@arcjet/tsconfig": "1.0.0-alpha.3",
"@jest/globals": "29.7.0",
"@rollup/wasm-node": "4.6.1",
"@types/node": "18.18.0",
"jest": "29.7.0",
"rollup": "4.6.1",
"typescript": "5.3.2"

@@ -50,0 +51,0 @@ },

@@ -27,2 +27,6 @@ // @generated by wasm2module - DO NOT EDIT

export const wasm: ArrayBuffer;
/**
* Returns an ArrayBuffer for the Arcjet Wasm binary, decoded from a base64 Data
* URL.
*/
export function wasm(): Promise<ArrayBuffer>;

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc