@adhd/apigen-engine-runtime 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Listen-host policy shared by every apigen TypeScript host (fastify, express,
3
+ * mcp). Defaults to IPv4 loopback; binding anything else is a deliberate
4
+ * override (`--opt host=…` / `options.host`) and logs a warning. Node's
5
+ * `listen(port)` with no host — or with an empty string — binds ALL
6
+ * interfaces, so the empty/whitespace case is treated as unset.
7
+ *
8
+ * Pure (no sockets), so the default is unit-testable without binding a port.
9
+ */
10
+ /** Default listen address for every apigen host: IPv4 loopback. */
11
+ export declare const DEFAULT_LISTEN_HOST = "127.0.0.1";
12
+ /** True for `localhost`, `127.0.0.0/8`, `::1` and IPv4-mapped loopback. */
13
+ export declare function isLoopbackListenHost(host: string): boolean;
14
+ /**
15
+ * Resolve the effective listen host from the plugin `host` option. Non-string,
16
+ * empty and whitespace-only values fall back to {@link DEFAULT_LISTEN_HOST}.
17
+ */
18
+ export declare function resolveListenHost(raw: unknown): string;
19
+ /**
20
+ * Emit a warning when `host` is not loopback (unauthenticated-by-default
21
+ * hosts become network-reachable). Returns whether it warned.
22
+ */
23
+ export declare function warnIfNonLoopbackListen(host: string, label: string, logger?: {
24
+ warn: (obj: Record<string, unknown>, msg: string) => void;
25
+ }): boolean;
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@adhd/apigen-engine-runtime",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "dependencies": {
5
5
  "ajv": "^8.20.0",
6
6
  "ajv-formats": "2.1.1",
7
7
  "pino": "10.3.1",
8
- "@adhd/apigen-core-client": "^0.3.3",
8
+ "@adhd/apigen-core-client": "^0.3.5",
9
9
  "@adhd/apigen-base-logical": "^0.1.4",
10
10
  "@adhd/apigen-base-errors": "^0.2.3",
11
- "@adhd/apigen-engine-naming": "^0.2.5",
11
+ "@adhd/apigen-engine-naming": "^0.2.6",
12
12
  "better-sqlite3": "12.10.0"
13
13
  },
14
14
  "main": "./index.js",