Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@forwardimpact/libdoc

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forwardimpact/libdoc - npm Package Compare versions

Comparing version
0.2.33
to
0.2.34
+4
-1
bin/fit-doc.js

@@ -16,2 +16,3 @@ #!/usr/bin/env node

import { createLogger } from "@forwardimpact/libtelemetry";
import { createDefaultRuntime } from "@forwardimpact/libutil/runtime";
import { PagesBuilder, PagesServer } from "../src/index.js";

@@ -147,2 +148,4 @@ import { parseFrontMatter } from "../src/frontmatter.js";

async function main() {
const runtime = createDefaultRuntime();
const parsed = cli.parse(process.argv.slice(2));

@@ -182,3 +185,3 @@ if (!parsed) process.exit(0);

} else {
const server = new PagesServer(fs, Hono, serve, builder);
const server = new PagesServer(fs, Hono, serve, builder, { runtime });
await runServe(builder, server, pagesDir, distDir, {

@@ -185,0 +188,0 @@ port: parseInt(values.port || "3000", 10),

+2
-1
{
"name": "@forwardimpact/libdoc",
"version": "0.2.33",
"version": "0.2.34",
"description": "Static documentation sites from markdown — publish docs without a framework.",

@@ -44,2 +44,3 @@ "keywords": [

"@forwardimpact/libtelemetry": "^0.1.22",
"@forwardimpact/libutil": "^0.1.0",
"@hono/node-server": "^2.0.4",

@@ -46,0 +47,0 @@ "hono": "^4.12.23",

@@ -14,2 +14,3 @@ import { createLogger } from "@forwardimpact/libtelemetry";

#watcher;
#proc;

@@ -22,4 +23,5 @@ /**

* @param {import("./builder.js").PagesBuilder} builder - PagesBuilder instance
* @param {{ runtime?: import("@forwardimpact/libutil/runtime").Runtime }} [opts] - Optional injected runtime bag
*/
constructor(fs, HonoConstructor, serveFn, builder) {
constructor(fs, HonoConstructor, serveFn, builder, opts) {
if (!fs) throw new Error("fs is required");

@@ -33,2 +35,4 @@ if (!builder) throw new Error("builder is required");

this.#watcher = null;
// Fall back to the ambient process when no runtime is injected (BC shim).
this.#proc = opts?.runtime?.proc ?? process;
}

@@ -63,6 +67,9 @@

// Keep process alive
// Keep process alive. Signal registration is inherently global — the
// `runtime.proc` surface deliberately omits `.on` (like librpc's server) —
// so SIGINT is wired on the ambient `process`; only the exit routes through
// the injected `proc` so tests can observe it.
process.on("SIGINT", () => {
this.stopWatch();
process.exit(0);
this.#proc.exit(0);
});

@@ -69,0 +76,0 @@ }