bare-bundle

Application bundle format for JavaScript

Apache-2.0 33 个版本
安装
npm install bare-bundle
yarn add bare-bundle
pnpm add bare-bundle
bun add bare-bundle
README

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

版本列表
1.10.0 2025-10-29
1.9.0 2025-08-18
1.8.4 2025-07-01
1.8.3 2025-01-23
1.8.2 2025-01-23
1.8.1 2024-11-06
1.8.0 2024-11-01
1.7.2 2024-10-22
1.7.1 2024-10-15
1.7.0 2024-10-14
1.6.1 2024-10-14
1.6.0 2024-10-07
1.5.0 2024-10-03
1.4.0 2024-10-02
1.3.1 2024-10-02
1.3.0 2024-09-30
1.2.0 2024-02-08
1.1.2 2024-02-07
1.1.1 2024-02-07
1.1.0 2024-02-07
1.0.0 2024-02-02
0.4.3 2024-01-30
0.4.2 2024-01-29
0.4.1 2024-01-29
0.4.0 2024-01-29
0.3.4 2023-12-15
0.3.3 2023-12-15
0.3.2 2023-12-15
0.3.1 2023-12-15
0.3.0 2023-11-13
0.2.0 2023-11-10
0.1.3 2023-08-23
0.1.2 2023-05-16