Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 23 additions & 20 deletions packages/cli/THIRD_PARTY_LICENSES.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
# Third-Party Licenses

## Cozette
## Spleen

The Sixel dashboard includes a generated subset of Cozette bitmap glyph data,
version 1.30.0. Source: <https://github.com/the-moonwitch/Cozette>.
The Sixel dashboard includes a generated subset of Spleen bitmap glyph data,
version 2.2.0. Source: <https://github.com/fcambus/spleen>.

MIT License
Copyright (c) 2018-2026, Frederic Cambus
All rights reserved.

Copyright (c) 2020, Ines <ines@moonwit.ch>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"dist/index.d.mts",
"dist/ink-app.js",
"dist/node-sqlite3-wasm.wasm",
"dist/assets/spleen-8x16.bin",
"dist/vendor/symbolic_bg.wasm",
"LICENSE.md",
"THIRD_PARTY_LICENSES.md",
Expand Down
12 changes: 12 additions & 0 deletions packages/cli/script/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,18 @@ async function compileAllTargets(
copyFileSync(DIF_WASM_SRC, DIF_WASM);
assetArgs.push("--assets", DIF_WASM);

// Embed the Spleen dashboard glyph subset. The asset key matches the path
// requested through node:sea in src/lib/formatters/spleen-font.ts.
const SPLEEN_FONT_SRC = "src/lib/formatters/assets/spleen-8x16.bin";
if (!existsSync(SPLEEN_FONT_SRC)) {
throw new Error(
`Missing Spleen dashboard font asset at ${SPLEEN_FONT_SRC}`
);
}
const SPLEEN_FONT = `${BUILD_DIR}/spleen-8x16.bin`;
copyFileSync(SPLEEN_FONT_SRC, SPLEEN_FONT);
assetArgs.push("--assets", SPLEEN_FONT);

console.log(
` Step 2: Compiling ${platforms.length} target(s) (Node SEA via fossilize)...`
);
Expand Down
10 changes: 10 additions & 0 deletions packages/cli/script/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,16 @@ await copyFile(
);
console.log(" -> dist/vendor/symbolic_bg.wasm (DIF parser)");

// Ship the Spleen glyph subset next to the npm bundle. The formatter resolves
// it via new URL("./assets/spleen-8x16.bin", import.meta.url), relative to
// dist/index.cjs (see src/lib/formatters/spleen-font.ts).
await mkdir("./dist/assets", { recursive: true });
await copyFile(
"./src/lib/formatters/assets/spleen-8x16.bin",
"./dist/assets/spleen-8x16.bin"
);
console.log(" -> dist/assets/spleen-8x16.bin (dashboard font)");

// Ship the WASM SQLite driver's .wasm next to the bundle. The driver JS
// (node-sqlite3-wasm) is inlined into dist/index.cjs by esbuild, and its
// Emscripten glue locates the .wasm via `__dirname + "/node-sqlite3-wasm.wasm"`.
Expand Down
23 changes: 4 additions & 19 deletions packages/cli/src/lib/dif/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
SourceBundleWriter,
} from "@sentry/symbolic";
import { logger } from "../logger.js";
import { getSeaRawAsset } from "../sea-assets.js";

const log = logger.withTag("dif");
const _require = createRequire(import.meta.url);
Expand Down Expand Up @@ -71,22 +72,6 @@ export type DifArchiveInfo = {

let initialized = false;

/** Returns the SEA API when running inside a Node SEA binary, else null. */
function isSeaBinary(): { getRawAsset: (key: string) => ArrayBuffer } | null {
try {
const sea = _require("node:sea") as {
isSea?: () => boolean;
getRawAsset?: (key: string) => ArrayBuffer;
};
if (sea.isSea?.() && sea.getRawAsset) {
return { getRawAsset: sea.getRawAsset };
}
} catch (err) {
log.debug("node:sea unavailable; treating as non-SEA runtime", err);
}
return null;
}

/**
* Load the WASM bytes for the current runtime mode.
*
Expand All @@ -95,9 +80,9 @@ function isSeaBinary(): { getRawAsset: (key: string) => ArrayBuffer } | null {
* time. In dev it is resolved from the installed `@sentry/symbolic` package.
*/
function loadWasmBytes(): Uint8Array {
const sea = isSeaBinary();
if (sea) {
return new Uint8Array(sea.getRawAsset(DIF_WASM_ASSET_KEY));
const seaAsset = getSeaRawAsset(DIF_WASM_ASSET_KEY);
if (seaAsset) {
return seaAsset;
}
const sibling = new URL("./vendor/symbolic_bg.wasm", import.meta.url);
if (existsSync(sibling)) {
Expand Down
Binary file not shown.
182 changes: 0 additions & 182 deletions packages/cli/src/lib/formatters/cozette-font.ts

This file was deleted.

Loading
Loading