Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@wefterjs/core

Latest version: v1.0.0

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: sandip-ghimire
4 Stars
0 Forks
3 Versions
22 Downloads
TypeScript Repo language

Scan summary

@wefterjs/core was last scanned on 29 Nov 2026 at version 1.0.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 3 versions; the latest 2 were published on 29 Nov 2026.
  • Findings: No rules fired in version 1.0.0.
  • Downloads: 22 downloads.

Versions

3 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.0.0 LATEST 29 Nov 2026 No rules fired
1.0.0-beta.1 29 Nov 2026 No rules fired
0.0.1 13 Aug 2026 No rules fired

No rules fired in 1.0.0

Findings

Findings for v1.0.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.0.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.


@wefterjs/core provides the runtime communication layer between JavaScript running in the web view and native code on Android (Kotlin) and iOS (Swift). It exposes promise-based invocations and event subscriptions with no dependency on external servers or background processes.

Installation

pnpm add @wefterjs/core

This package is a production runtime dependency. It executes on the user device inside the application bundle. In contrast, @wefterjs/cli is a dev dependency that operates only during development and build steps.

Usage

Most applications do not call @wefterjs/core directly for standard device features. Instead, plugins such as @wefterjs/scanner or @wefterjs/storage wrap these bridge calls in dedicated TypeScript modules.

Direct calls to @wefterjs/core are typically used for lifecycle management, bridge readiness detection, and system queries:

import {
  invokeNative,
  isNativeBridgeAvailable,
  onBridgeReady,
  getDeviceInfo,
  getPlatformInfo,
  hideSplash,
} from "@wefterjs/core";

// Ensure the native bridge is initialized before the first call
await onBridgeReady();

if (isNativeBridgeAvailable()) {
  const { platform, osVersion } = await getDeviceInfo();
  console.log(`Running on ${platform} ${osVersion}`);
}

// Inspect current platform environment synchronously
const platformInfo = getPlatformInfo();
console.log("Core protocol version:", platformInfo.coreVersion);

// Dismiss a configured splash screen
await hideSplash();

// Make a raw system invocation
const { isDebug } = await invokeNative<{ isDebug: boolean }>("__system", "isDebug");

JavaScript API reference

Bridge functions
Export Description
invokeNative<T>(plugin, method, payload?, options?) Sends a message to the native bridge and returns a Promise that resolves with the native response or rejects with a WefterBridgeError.
registerHook(hookName, callback) Subscribes to native push events (such as hardware back button presses, barcode scans, or network state transitions). Returns an object with a remove() cleanup method.
onBridgeReady() Returns a Promise that resolves once the native bridge objects (window.AndroidBridge or window.webkit.messageHandlers) are registered.
isNativeBridgeAvailable() Synchronous helper returning true when running inside a native Wefter shell, and false in a standard browser tab.
getPlatformInfo() Synchronous helper returning { platform, coreVersion, environment } without native dispatch overhead.
getDeviceInfo() Asynchronous native call returning { platform, osVersion } directly from the host operating system.
hideSplash() Signals the native shell to dismiss the splash screen when configured with waitForReady: true.
isLandscape() Returns true if the shell was built with landscape lock enabled.
definePlugin<T>(name, methodMap) Helper used by plugin authors to construct typed proxy objects around invokeNative.
Error handling

When a bridge call fails, the returned Promise rejects with a WefterBridgeError. Inspect the code property to handle specific failures:

import { invokeNative, WefterBridgeError } from "@wefterjs/core";

try {
  await invokeNative("storage", "get", { key: "auth_token" });
} catch (error) {
  if (error instanceof WefterBridgeError) {
    console.error("Bridge failure code:", error.code);
    console.error("Bridge failure message:", error.message);
  }
}

Standard error codes include:

  • TIMEOUT: The native call did not complete within the requested timeout period.
  • ABORTED: The call was cancelled before completion.
  • NO_BRIDGE: The bridge is unavailable (for example, when running inside an unsupported browser tab).
  • UNKNOWN_PLUGIN: The requested plugin identifier is not registered in the native project.
  • INVALID_PAYLOAD: The payload could not be serialized or does not match expected parameters.
  • PLUGIN_THREW: The native plugin threw an unhandled exception.
  • PERMISSION_DENIED: The user or OS rejected a required permission.
  • UNKNOWN: General unhandled native failure.

Testing with mock bridge

The @wefterjs/core/testing submodule allows testing UI components and plugins in browser tests or Node.js without requiring an emulator or physical device:

import { installMockBridge, uninstallMockBridge } from "@wefterjs/core/testing";
import { getDeviceInfo } from "@wefterjs/core";

// Register custom mock handlers per plugin
installMockBridge({
  __system: async (method, payload) => {
    if (method === "getDeviceInfo") {
      return { platform: "android", osVersion: "14" };
    }
    throw new Error(`Unhandled system method: ${method}`);
  },
  storage: async (method, payload) => {
    if (method === "get") {
      return { value: "test-token" };
    }
    return { success: true };
  },
});

const info = await getDeviceInfo();
console.log("Mocked platform:", info.platform);

// Clean up after test completion
uninstallMockBridge();

Development

pnpm build   # compiles TypeScript via tsc
pnpm test    # runs test suites via Vitest

License

MIT © 2026 Sandip Ghimire

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @wefterjs/core

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Frame 2085668439 (1)
Group 1261154229