create-daloy 0.3.0 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-daloy",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Scaffold a new DaloyJS project. Run with `pnpm create daloy`, `npm create daloy@latest`, `yarn create daloy`, or `bun create daloy`.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -27,7 +27,7 @@
27
27
  "openapi"
28
28
  ],
29
29
  "engines": {
30
- "node": ">=20.10.0"
30
+ "node": ">=24.15.0"
31
31
  },
32
32
  "bin": {
33
33
  "create-daloy": "bin/create-daloy.mjs"
@@ -16,7 +16,7 @@
16
16
  "gen": "pnpm gen:openapi && pnpm gen:client"
17
17
  },
18
18
  "dependencies": {
19
- "@daloyjs/core": "^0.8.2",
19
+ "@daloyjs/core": "^0.9.0",
20
20
  "zod": "^4.4.3"
21
21
  },
22
22
  "devDependencies": {
@@ -1,4 +1,5 @@
1
1
  import { serve } from "@daloyjs/core/bun";
2
+ import { printStartupBanner, type StartupBannerLink } from "@daloyjs/core/banner";
2
3
  import { buildApp } from "./build-app.ts";
3
4
 
4
5
  const app = buildApp();
@@ -9,11 +10,16 @@ const handle = serve(app, {
9
10
  // Bun closes idle keep-alive connections after this many seconds.
10
11
  idleTimeout: 30,
11
12
  });
12
- console.log(`DaloyJS (Bun) listening on ${handle.url ?? `http://localhost:${port}`}`);
13
- // daloy-minimal:strip-start docs
14
- console.log(` Swagger UI: http://localhost:${port}/docs`);
15
- console.log(` OpenAPI JSON: http://localhost:${port}/openapi.json`);
16
- // daloy-minimal:strip-end docs
17
- console.log(` Health: http://localhost:${port}/healthz`);
13
+
14
+ const url = handle.url ? String(handle.url) : `http://localhost:${port}`;
15
+ const links: StartupBannerLink[] = [
16
+ // daloy-minimal:strip-start docs
17
+ { label: "Swagger UI", url: `${url}/docs` },
18
+ { label: "OpenAPI JSON", url: `${url}/openapi.json` },
19
+ // daloy-minimal:strip-end docs
20
+ { label: "Health", url: `${url}/healthz` },
21
+ ];
22
+
23
+ printStartupBanner({ name: "DaloyJS API", url, runtime: "Bun", links });
18
24
 
19
25
  export default app;
@@ -10,7 +10,7 @@
10
10
  "test": "node --import tsx/esm --test tests/**/*.test.ts"
11
11
  },
12
12
  "dependencies": {
13
- "@daloyjs/core": "^0.8.2",
13
+ "@daloyjs/core": "^0.9.0",
14
14
  "zod": "^4.4.3"
15
15
  },
16
16
  "devDependencies": {
@@ -8,8 +8,8 @@
8
8
  "gen:openapi": "deno run --allow-net --allow-env --allow-read --allow-write scripts/dump-openapi.ts"
9
9
  },
10
10
  "imports": {
11
- "@daloyjs/core": "npm:@daloyjs/core@^0.8.2",
12
- "@daloyjs/core/": "npm:@daloyjs/core@^0.8.2/",
11
+ "@daloyjs/core": "npm:@daloyjs/core@^0.9.0",
12
+ "@daloyjs/core/": "npm:@daloyjs/core@^0.9.0/",
13
13
  "zod": "npm:zod@^4.4.3"
14
14
  },
15
15
  "compilerOptions": {
@@ -1,4 +1,5 @@
1
1
  import { serve } from "@daloyjs/core/deno";
2
+ import { printStartupBanner, type StartupBannerLink } from "@daloyjs/core/banner";
2
3
  import { buildApp } from "./build-app.ts";
3
4
 
4
5
  const app = buildApp();
@@ -7,11 +8,14 @@ const port = Number(Deno.env.get("PORT") ?? 3000);
7
8
  serve(app, {
8
9
  port,
9
10
  onListen: ({ hostname, port: actualPort }) => {
10
- console.log(`DaloyJS (Deno) listening on http://${hostname}:${actualPort}`);
11
- // daloy-minimal:strip-start docs
12
- console.log(` Swagger UI: http://${hostname}:${actualPort}/docs`);
13
- console.log(` OpenAPI JSON: http://${hostname}:${actualPort}/openapi.json`);
14
- // daloy-minimal:strip-end docs
15
- console.log(` Health: http://${hostname}:${actualPort}/healthz`);
11
+ const url = `http://${hostname}:${actualPort}`;
12
+ const links: StartupBannerLink[] = [
13
+ // daloy-minimal:strip-start docs
14
+ { label: "Swagger UI", url: `${url}/docs` },
15
+ { label: "OpenAPI JSON", url: `${url}/openapi.json` },
16
+ // daloy-minimal:strip-end docs
17
+ { label: "Health", url: `${url}/healthz` },
18
+ ];
19
+ printStartupBanner({ name: "DaloyJS API", url, runtime: "Deno", links });
16
20
  },
17
21
  });
@@ -4,7 +4,7 @@ A [DaloyJS](https://daloyjs.dev) Node.js REST API. **Contract-first**:
4
4
  routes are defined with Zod schemas and OpenAPI 3.1 is generated from them.
5
5
 
6
6
  - Package manager: pnpm (use `pnpm` unless the project's `package.json` was rewritten for npm/yarn/bun).
7
- - Runtime: Node.js >= 20.10.
7
+ - Runtime: Node.js >= 24.15 (active LTS).
8
8
 
9
9
  ## Commands
10
10
 
@@ -4,7 +4,7 @@
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "engines": {
7
- "node": ">=20.10.0"
7
+ "node": ">=24.15.0"
8
8
  },
9
9
  "scripts": {
10
10
  "dev": "node --import tsx/esm --watch src/index.ts",
@@ -18,7 +18,7 @@
18
18
  "audit": "pnpm audit --prod"
19
19
  },
20
20
  "dependencies": {
21
- "@daloyjs/core": "^0.8.2",
21
+ "@daloyjs/core": "^0.9.0",
22
22
  "zod": "^4.4.3"
23
23
  },
24
24
  "devDependencies": {
@@ -1,15 +1,21 @@
1
1
  import { serve } from "@daloyjs/core/node";
2
+ import { printStartupBanner, type StartupBannerLink } from "@daloyjs/core/banner";
2
3
  import { buildApp } from "./build-app.js";
3
4
 
4
5
  const app = buildApp();
5
6
  const port = Number(process.env.PORT ?? 3000);
6
7
 
7
8
  serve(app, { port });
8
- console.log(`DaloyJS listening on http://localhost:${port}`);
9
- // daloy-minimal:strip-start docs
10
- console.log(` Swagger UI: http://localhost:${port}/docs`);
11
- console.log(` OpenAPI JSON: http://localhost:${port}/openapi.json`);
12
- // daloy-minimal:strip-end docs
13
- console.log(` Health: http://localhost:${port}/healthz`);
9
+
10
+ const url = `http://localhost:${port}`;
11
+ const links: StartupBannerLink[] = [
12
+ // daloy-minimal:strip-start docs
13
+ { label: "Swagger UI", url: `${url}/docs` },
14
+ { label: "OpenAPI JSON", url: `${url}/openapi.json` },
15
+ // daloy-minimal:strip-end docs
16
+ { label: "Health", url: `${url}/healthz` },
17
+ ];
18
+
19
+ printStartupBanner({ name: "DaloyJS API", url, runtime: "Node.js", links });
14
20
 
15
21
  export default app;
@@ -10,7 +10,7 @@
10
10
  "test": "node --import tsx/esm --test tests/**/*.test.ts"
11
11
  },
12
12
  "dependencies": {
13
- "@daloyjs/core": "^0.8.2",
13
+ "@daloyjs/core": "^0.9.0",
14
14
  "zod": "^4.4.3"
15
15
  },
16
16
  "devDependencies": {