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

capacitor-device-profile

Latest version: v0.3.0

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
npm package Publisher: jbdevprimary
0 Stars
0 Forks
5 Versions
109 Downloads
TypeScript Repo language

Scan summary

capacitor-device-profile was last scanned on 24 Nov 2026 at version 0.3.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 5 versions; the latest was published on 24 Nov 2026.
  • Findings: No rules fired in version 0.3.0.
  • Downloads: 109 downloads.

Versions

5 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.3.0 LATEST 24 Nov 2026 No rules fired
0.2.0 10 Oct 2026 No rules fired
0.1.4 8 Oct 2026 No rules fired
0.1.1 7 Oct 2026 Not shown
0.0.0-stage 7 Oct 2026 Not shown

No rules fired in 0.3.0

Findings

Findings for v0.3.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 0.3.0; other versions have their own rules, not their own score.

README

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

capacitor-device-profile

CI MIT license

A small mobile and foldable runtime for web apps and games that ship in a Capacitor shell: one device classification that re-classifies live when a foldable folds or unfolds, one orientation rule, live safe-area insets, an app lifecycle with a back-button stack, and a haptics facade.

It has no runtime dependencies. Capacitor plugins are passed in, so the package carries no Capacitor version, and every module unit-tests without a device.

Full documentation: jonbogaty.com/capacitor-device-profile

Install

pnpm add capacitor-device-profile

Compatibility

  • Node.js 22, 24 and 26 for tooling (engines.node: >=22; CI tests each maintained line)
  • React 18 or 19 only if you use the optional capacitor-device-profile/react bindings
  • The Capacitor plugins you want to drive (@capacitor/app, @capacitor/haptics, @capacitor/device) are installed by the application and passed in

The package ships native ESM and CommonJS entry points with format-correct TypeScript declarations. Support follows maintained Node.js lines, rather than every historical patch or end-of-life release.

Quick start

import { App } from '@capacitor/app'
import { Capacitor } from '@capacitor/core'
import { Device } from '@capacitor/device'
import { Haptics } from '@capacitor/haptics'
import { createAppLifecycle, createHaptics, decideOrientation } from 'capacitor-device-profile'
import { useDeviceProfile, useSafeAreaInsets } from 'capacitor-device-profile/react'

const native = Capacitor.isNativePlatform()
const lifecycle = createAppLifecycle({ app: App, native, onPause: pauseTimers })
const haptics = createHaptics({ plugin: Haptics, native })

// An open modal closes first on the Android back button; an unhandled press minimises the app.
const closeModal = lifecycle.pushBackHandler(() => dialog.close())

// Any part of the app can hear pause and resume for itself, and stop when it unmounts.
const stopSaving = lifecycle.onPause(() => void saveCheckpoint())

function Screen() {
  const profile = useDeviceProfile({ loadPlatform: () => Device.getInfo() })
  const insets = useSafeAreaInsets()
  const { promptRotate, target } = decideOrientation(profile, 'landscape')
  return promptRotate ? <RotateHint to={target} /> : <Layout form={profile.formFactor} inset={insets} />
}

API

Export What it does
classifyDevice(facts) phone, foldable-open, tablet or desktop, plus a compact/expanded frame, orientation, short/long edge, aspect and DPR
isFoldableOpen(facts) Touch, aspect at most 1.3 and short edge at least 600 CSS px (OnePlus Open unfolded: 821x765, aspect 1.07)
readViewportFacts(window, platform?) Reads innerWidth/innerHeight/DPR/touch; null gives a desktop default
decideOrientation(profile, preferred) Which orientations to accept and whether to show a "turn the device" hint. Never force-rotates; tablets and foldables accept both
watchSafeArea(options) / readSafeAreaInsets() Measures env(safe-area-inset-*) through a probe and publishes --safe-top/right/bottom/left px variables, re-measured on resize, orientation change, visual-viewport resize and fold posture change
createAppLifecycle({ app, native, onPause, onResume }) Pause/resume from Capacitor App (native) or page visibility (web); onPause(listener) / onResume(listener) subscriptions, each returning its unsubscribe; pushBackHandler stack; an unconsumed back press minimises instead of exiting
createHaptics({ plugin, native, vibrate }) impact, notify, selection; the native plugin when native, otherwise navigator.vibrate (or your vibrate) on the web, a quiet no-op where there is none (iOS Safari) and while disabled; failures never throw
capacitor-device-profile/react: useDeviceProfile, useSafeAreaInsets, subscribeViewportGeometry Live bindings: a fold or unfold re-classifies without a reload

The API reference has every signature and the exact classification rules.

Develop

corepack enable
pnpm install --frozen-lockfile
pnpm verify   # Biome, markdownlint, tsc, Vitest with coverage, the dual ESM/CJS build, publint, attw, a packed-consumer smoke

Built on Node 26 (.nvmrc), pnpm 12 and TypeScript 7. Conventional Commits drive release-please; merging its release pull request tags v<version> and the cd.yml publish job releases to npm with provenance. See CONTRIBUTING.md and AGENTS.md.

License

MIT

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 capacitor-device-profile

References

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

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Copy of Template Design OX Blog (1)
Research

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

Microsoft's Official agent framework Hijacked
AI & VibeSec

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

Frame 2085668439 (1)
Group 1261154229