Socket
Book a DemoInstallSign in
Socket

bare-bundle

Package Overview
Dependencies
Maintainers
2
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bare-bundle

Application bundle format for JavaScript

latest
Source
npmnpm
Version
1.9.0
Version published
Maintainers
2
Created
Source

bare-bundle

Application bundle format for JavaScript, inspired by https://github.com/electron/asar.

npm i bare-bundle

Format

[#!hashbang]
<header length><header><...files>

The header length is an integer literal denoting the total length of the header. The header itself is a JSON string literal of header length bytes and has the following format:

{
  "version": 0,
  "id": null | "<string>",
  "main": null | "<url>",
  "imports": {
    "<from>": "<to>"
  },
  "resolutions": {
    "<url>": "<imports>"
  },
  "addons": ["<url>"],
  "assets": ["<url>"],
  "files": {
    "<url>": {
      "offset": number,
      "length": number,
      "mode": number
    }
  }
}

For each <url> in files, offset provides the byte offset to the file after the header and length provides the byte length of the file.

The bundle may optionally be prefixed with a hashbang, #!, for use with script interpreters. The hashbang is ignored during parsing.

License

Apache-2.0

FAQs

Package last updated on 18 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts