@daloyjs/core 0.42.0 → 0.43.0

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.
package/README.md CHANGED
@@ -516,7 +516,7 @@ DaloyJS is in **public preview** (`0.x`). The public API may still change betwee
516
516
 
517
517
  - Adapters for Node (Heroku, Railway, Render, Fly.io), Bun, Deno, Cloudflare Workers, Vercel Node / Edge / Next.js / Netlify Edge, Fastly Compute, and AWS Lambda / Netlify Functions / Lambda Function URLs.
518
518
  - `daloy dev` watch loop delegates to the host runtime's native watcher (`node --import tsx --watch`, `bun --hot`, or `deno run --watch`) with a `--runtime` override for cross-runtime `package.json` scripts.
519
- - `pnpm create daloy` scaffolder with Node, Bun, Deno, Cloudflare Worker, and Vercel Edge templates, plus optional `--with-ci` GitHub Actions / Dependabot / CODEOWNERS / SECURITY.md hardening.
519
+ - `pnpm create daloy` scaffolder with Node, Bun, Deno, Cloudflare Worker, and Vercel Edge templates, plus optional `--with-ci` GitHub Actions / Dependabot / CODEOWNERS / SECURITY.md hardening. The completion summary surfaces official install links (nodejs.org, pnpm.io, bun.sh) for any runtime or package manager your selections need but that is missing from `PATH`, and skips a doomed dependency install when the chosen package manager is absent.
520
520
  - Container-first templates: `HEALTHCHECK` to `/readyz`, `STOPSIGNAL SIGTERM`, non-root user, `tini` as PID 1.
521
521
  - Generated `deploy.yml` for container templates signs every pushed GHCR image with **Sigstore Cosign** (keyless OIDC) and attaches an **SPDX SBOM attestation** so consumers can `cosign verify` and `cosign verify-attestation --type spdxjson` instead of trusting the registry alone.
522
522
  - Pretty `printStartupBanner()` / `formatStartupBanner()` helpers at `@daloyjs/core/banner`, used by every starter template (TTY + `NO_COLOR` / `FORCE_COLOR` aware, ASCII fallback for dumb terminals).
package/dist/banner.js CHANGED
@@ -36,24 +36,44 @@ const GLYPHS_ASCII = {
36
36
  mid: "-",
37
37
  };
38
38
  const ANSI_REGEX = /\u001b\[[0-9;]*m/g;
39
+ /**
40
+ * Read a single environment variable defensively. On runtimes with a
41
+ * capability-based permission model (Deno), reading an env var the process was
42
+ * not granted via `--allow-env` throws a `NotCapable` error. The startup
43
+ * banner is purely cosmetic, so a missing color/locale hint must never crash
44
+ * the host application — swallow the denial and treat the variable as unset.
45
+ * On Node and Bun `process.env` access never throws, so this is a no-op there.
46
+ *
47
+ * @param key - Environment variable name.
48
+ * @returns The value, or `undefined` when unset or inaccessible.
49
+ */
50
+ function readEnv(key) {
51
+ try {
52
+ return process.env[key];
53
+ }
54
+ catch {
55
+ return undefined;
56
+ }
57
+ }
39
58
  function detectColor() {
40
- if (process.env.NO_COLOR)
59
+ if (readEnv("NO_COLOR"))
41
60
  return false;
42
- if (process.env.FORCE_COLOR && process.env.FORCE_COLOR !== "0")
61
+ const force = readEnv("FORCE_COLOR");
62
+ if (force && force !== "0")
43
63
  return true;
44
64
  const stdout = process.stdout;
45
65
  return Boolean(stdout && stdout.isTTY);
46
66
  }
47
67
  function detectAscii() {
48
- if (process.env.DALOY_ASCII)
68
+ if (readEnv("DALOY_ASCII"))
49
69
  return true;
50
70
  if (process.platform === "win32") {
51
- return !(process.env.WT_SESSION || process.env.TERM_PROGRAM);
71
+ return !(readEnv("WT_SESSION") || readEnv("TERM_PROGRAM"));
52
72
  }
53
- const lang = process.env.LANG ?? process.env.LC_ALL ?? "";
73
+ const lang = readEnv("LANG") ?? readEnv("LC_ALL") ?? "";
54
74
  if (/UTF-?8/i.test(lang))
55
75
  return false;
56
- if (process.env.TERM_PROGRAM)
76
+ if (readEnv("TERM_PROGRAM"))
57
77
  return false;
58
78
  return true;
59
79
  }
package/dist/cli.js CHANGED
@@ -547,9 +547,14 @@ async function runDiff(opts, io) {
547
547
  }
548
548
  /**
549
549
  * `daloy doctor` — boot-time + CLI audit. Loads the user's
550
- * App entry and runs the secure-by-default checklist. Exits non-zero on any
551
- * finding so the command can guard container `HEALTHCHECK` and CI deploy
552
- * steps.
550
+ * App entry and runs the secure-by-default checklist so the command can guard
551
+ * container `HEALTHCHECK` and CI deploy steps.
552
+ *
553
+ * Exit code: non-zero (`1`) only when at least one **`error`-level** finding is
554
+ * present; `warn`-level findings are advisory and leave the exit code at `0`.
555
+ * The `--json` output reports `ok: true` only when there are **no findings at
556
+ * all** (any level), so `ok` is a stricter signal than the exit code — a
557
+ * warn-only run prints `ok: false` but still exits `0`.
553
558
  *
554
559
  * @internal
555
560
  */
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "bomFormat": "CycloneDX",
3
3
  "specVersion": "1.5",
4
- "serialNumber": "urn:uuid:c3e0bc4b-403c-5789-b2e4-dbafa73b03ee",
4
+ "serialNumber": "urn:uuid:66a4adf1-88f7-56e9-a00f-95633f473b23",
5
5
  "version": 1,
6
6
  "metadata": {
7
- "timestamp": "2026-06-19T08:56:49.249Z",
7
+ "timestamp": "2026-06-20T12:10:13.811Z",
8
8
  "tools": [
9
9
  {
10
10
  "vendor": "DaloyJS",
11
11
  "name": "daloy-generate-sbom",
12
- "version": "0.42.0"
12
+ "version": "0.43.0"
13
13
  }
14
14
  ],
15
15
  "authors": [
@@ -19,11 +19,11 @@
19
19
  ],
20
20
  "component": {
21
21
  "type": "library",
22
- "bom-ref": "pkg:npm/@daloyjs/core@0.42.0",
22
+ "bom-ref": "pkg:npm/@daloyjs/core@0.43.0",
23
23
  "name": "@daloyjs/core",
24
- "version": "0.42.0",
24
+ "version": "0.43.0",
25
25
  "description": "DaloyJS is a runtime-portable, contract-first TypeScript web framework with built-in OpenAPI (Hey API), typed client generation, large-scale maintainability, and security-first defaults. Hono-grade portability, Elysia-grade DX, FastAPI-grade docs, Fastify-grade ops — distributed via pnpm.",
26
- "purl": "pkg:npm/@daloyjs/core@0.42.0",
26
+ "purl": "pkg:npm/@daloyjs/core@0.43.0",
27
27
  "licenses": [
28
28
  {
29
29
  "license": {
@@ -46,9 +46,9 @@
46
46
  }
47
47
  ],
48
48
  "swid": {
49
- "tagId": "swidtag--daloyjs-core-0.42.0",
49
+ "tagId": "swidtag--daloyjs-core-0.43.0",
50
50
  "name": "@daloyjs/core",
51
- "version": "0.42.0",
51
+ "version": "0.43.0",
52
52
  "tagVersion": 0,
53
53
  "patch": false
54
54
  }
@@ -57,7 +57,7 @@
57
57
  "components": [],
58
58
  "dependencies": [
59
59
  {
60
- "ref": "pkg:npm/@daloyjs/core@0.42.0",
60
+ "ref": "pkg:npm/@daloyjs/core@0.43.0",
61
61
  "dependsOn": []
62
62
  }
63
63
  ]
@@ -2,10 +2,10 @@
2
2
  "spdxVersion": "SPDX-2.3",
3
3
  "dataLicense": "CC0-1.0",
4
4
  "SPDXID": "SPDXRef-DOCUMENT",
5
- "name": "@daloyjs/core-0.42.0",
6
- "documentNamespace": "https://github.com/daloyjs/daloy/sbom/@daloyjs/core-0.42.0-c3e0bc4b-403c-5789-b2e4-dbafa73b03ee",
5
+ "name": "@daloyjs/core-0.43.0",
6
+ "documentNamespace": "https://github.com/daloyjs/daloy/sbom/@daloyjs/core-0.43.0-66a4adf1-88f7-56e9-a00f-95633f473b23",
7
7
  "creationInfo": {
8
- "created": "2026-06-19T08:56:49.249Z",
8
+ "created": "2026-06-20T12:10:13.811Z",
9
9
  "creators": [
10
10
  "Tool: daloy-generate-sbom",
11
11
  "Organization: DaloyJS"
@@ -16,7 +16,7 @@
16
16
  {
17
17
  "SPDXID": "SPDXRef-Package--daloyjs-core",
18
18
  "name": "@daloyjs/core",
19
- "versionInfo": "0.42.0",
19
+ "versionInfo": "0.43.0",
20
20
  "downloadLocation": "https://github.com/daloyjs/daloy",
21
21
  "filesAnalyzed": false,
22
22
  "licenseConcluded": "MIT",
@@ -27,7 +27,7 @@
27
27
  {
28
28
  "referenceCategory": "PACKAGE-MANAGER",
29
29
  "referenceType": "purl",
30
- "referenceLocator": "pkg:npm/@daloyjs/core@0.42.0"
30
+ "referenceLocator": "pkg:npm/@daloyjs/core@0.43.0"
31
31
  }
32
32
  ]
33
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daloyjs/core",
3
- "version": "0.42.0",
3
+ "version": "0.43.0",
4
4
  "description": "DaloyJS is a runtime-portable, contract-first TypeScript web framework with built-in OpenAPI (Hey API), typed client generation, large-scale maintainability, and security-first defaults. Hono-grade portability, Elysia-grade DX, FastAPI-grade docs, Fastify-grade ops — distributed via pnpm.",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -45,10 +45,6 @@
45
45
  "types": "./dist/index.d.ts",
46
46
  "import": "./dist/index.js"
47
47
  },
48
- "./app": {
49
- "types": "./dist/app.d.ts",
50
- "import": "./dist/app.js"
51
- },
52
48
  "./node": {
53
49
  "types": "./dist/adapters/node.d.ts",
54
50
  "import": "./dist/adapters/node.js"