REA npm package notes (unofficial)

Last updated: · By the RepoRead editorial team · Unofficial guide
Quick answer

REA’s JavaScript application analysis understands npm-style package roots inside a local tree or ASAR — it does not crawl the public registry for you. Prefer javascript-artifact-reconstruction.md.

Minimal path

rea analyze-javascript-application /absolute/path/to/app --json
# or focus entry sources:
rea analyze /absolute/path/to/app.asar \
  --source-path package.json --source-path main.js --json

Mental model

  1. Bring a local tree/ASAR you may examine; REA will not npm install for analysis.
  2. Shallowest non-node_modules package.json wins as package root.
  3. Selecting sources limits AST work; the complete artifact is still inventoried/verified.
  4. Treat dependency manifests as observations, not automatic Electron entry declarations.

Packaged applications remain reverse engineering under most policies. Inspect only trees you are authorized to examine; do not ask RepoRead for private-registry credential abuse.

RepoRead is unofficial. Prefer javascript-artifact-reconstruction.md.

FAQ

Does REA download packages from the npm registry?

No. Analysis runs on a local ASAR or extracted tree you supply. RepoRead will not help scrape private registries or steal tokens.

How is the package root chosen?

The application graph selects the shallowest package.json outside node_modules, breaking equal-depth ties by Unicode code-point order. Dependency manifests remain package observations but do not declare Electron main/renderer entries by themselves.

Can I focus on package.json and an entry file?

Yes — supply exact artifact-relative paths with --source-path / source_paths (for example package.json and main.js). Unknown paths return invalid_request; imports do not expand the selection.

What about nested packages under node_modules?

Docs describe stopping package-scope inheritance at a node_modules directory so a nested package cannot inherit an enclosing imports map incorrectly.

npm version checked?

rea-agents 6.7.0 (re-checked 2026-10-24). Note this is the rea-agents release, not the version of a third-party package under analysis.

Sources