create-daloy 0.1.17 → 0.1.19
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 +14 -5
- package/bin/create-daloy.mjs +567 -91
- package/package.json +1 -1
- package/templates/bun-basic/AGENTS.md +29 -8
- package/templates/bun-basic/README.md +1 -1
- package/templates/bun-basic/_agents/skills/daloyjs-best-practices/SKILL.md +233 -0
- package/templates/cloudflare-worker/AGENTS.md +29 -7
- package/templates/cloudflare-worker/README.md +6 -0
- package/templates/cloudflare-worker/_agents/skills/daloyjs-best-practices/SKILL.md +236 -0
- package/templates/deno-basic/AGENTS.md +29 -8
- package/templates/deno-basic/README.md +1 -1
- package/templates/deno-basic/_agents/skills/daloyjs-best-practices/SKILL.md +225 -0
- package/templates/node-basic/AGENTS.md +27 -6
- package/templates/node-basic/README.md +1 -1
- package/templates/node-basic/_agents/skills/daloyjs-best-practices/SKILL.md +298 -0
- package/templates/vercel-edge/AGENTS.md +27 -7
- package/templates/vercel-edge/README.md +11 -0
- package/templates/vercel-edge/_agents/skills/daloyjs-best-practices/SKILL.md +204 -0
- package/templates/bun-basic/SKILL.md +0 -68
- package/templates/cloudflare-worker/SKILL.md +0 -68
- package/templates/deno-basic/SKILL.md +0 -71
- package/templates/node-basic/SKILL.md +0 -70
- package/templates/vercel-edge/SKILL.md +0 -64
package/README.md
CHANGED
|
@@ -19,6 +19,11 @@ The CLI is interactive when arguments are missing. It will ask you for:
|
|
|
19
19
|
- Whether to install dependencies
|
|
20
20
|
- Whether to initialize a git repository
|
|
21
21
|
|
|
22
|
+
Interactive runs use a polished terminal UI with a DaloyJS welcome banner,
|
|
23
|
+
arrow-key template and package-manager pickers, progress indicators, and a
|
|
24
|
+
boxed completion summary. Non-TTY environments and `--yes` mode keep a plain,
|
|
25
|
+
script-friendly transcript with the same decisions and next steps.
|
|
26
|
+
|
|
22
27
|
## Non-interactive usage
|
|
23
28
|
|
|
24
29
|
```bash
|
|
@@ -63,6 +68,7 @@ A production-ready Node.js HTTP server using `@daloyjs/core` with:
|
|
|
63
68
|
A minimal Cloudflare Worker bootstrap using `@daloyjs/core/cloudflare` with:
|
|
64
69
|
|
|
65
70
|
- `wrangler.toml` ready to deploy.
|
|
71
|
+
- `secureHeaders` and `requestId` enabled by default, with smaller edge-friendly body and timeout limits.
|
|
66
72
|
- Zod-validated route exposed as `fetch`.
|
|
67
73
|
- A sample test that exercises `app.request(...)`.
|
|
68
74
|
|
|
@@ -73,6 +79,7 @@ A Vercel Edge API bootstrap using `@daloyjs/core/vercel` with:
|
|
|
73
79
|
- `api/[...path].ts` catch-all routing so DaloyJS owns the API surface.
|
|
74
80
|
- `export const config = { runtime: "edge" }` ready for Vercel Edge.
|
|
75
81
|
- `vercel dev` / `vercel deploy` scripts.
|
|
82
|
+
- `secureHeaders` and `requestId` enabled by default, with smaller edge-friendly body and timeout limits.
|
|
76
83
|
- A health route and bookstore route mirroring the Node starter.
|
|
77
84
|
|
|
78
85
|
### `bun-basic`
|
|
@@ -81,7 +88,7 @@ A [Bun](https://bun.sh) runtime starter using `@daloyjs/core/bun` with:
|
|
|
81
88
|
|
|
82
89
|
- `bun --hot src/index.ts` for instant reloads.
|
|
83
90
|
- `bun test` wired to in-process `app.request(...)` checks.
|
|
84
|
-
- The same
|
|
91
|
+
- The same starter security middleware as the Node template (`secureHeaders`, `requestId`, `rateLimit`).
|
|
85
92
|
- A health route and contract-first `/books/:id` route with Zod validation.
|
|
86
93
|
- Hey API codegen wired to `bun run gen:openapi` + `bun run gen:client`.
|
|
87
94
|
|
|
@@ -92,6 +99,7 @@ A [Deno](https://deno.com) runtime starter using `@daloyjs/core/deno` with:
|
|
|
92
99
|
- A `deno.json` with `deno task dev`, `test`, and `gen:openapi` tasks.
|
|
93
100
|
- `@daloyjs/core` and Zod loaded via `npm:` import-map specifiers.
|
|
94
101
|
- Minimum-permissions dev script (`--allow-net --allow-env --allow-read`).
|
|
102
|
+
- The same starter security middleware as the Node template (`secureHeaders`, `requestId`, `rateLimit`).
|
|
95
103
|
- A health route and contract-first `/books/:id` route with Zod validation.
|
|
96
104
|
- The CLI skips Node-style installs for this template (no `package.json`).
|
|
97
105
|
|
|
@@ -113,17 +121,18 @@ re-run with `--minimal`, or delete the marked blocks by hand later.
|
|
|
113
121
|
## What the CLI guarantees
|
|
114
122
|
|
|
115
123
|
- Zero runtime dependencies (uses only Node built-ins) for a clean supply-chain footprint.
|
|
124
|
+
- A modern terminal experience with Unicode/color capability detection and ASCII fallbacks.
|
|
116
125
|
- Templates are copied verbatim from this package's `templates/` directory.
|
|
117
|
-
- Files prefixed with `_` are renamed (`_gitignore` → `.gitignore`, `_npmrc` → `.npmrc`) to survive npm packing.
|
|
126
|
+
- Files and folders prefixed with `_` are renamed on copy (`_gitignore` → `.gitignore`, `_npmrc` → `.npmrc`, `_agents/` → `.agents/`) to survive npm packing.
|
|
118
127
|
- pnpm-specific `.npmrc` hardening is kept only when you choose `pnpm`; other package managers get a clean project without unsupported config warnings.
|
|
119
128
|
- pnpm projects ship with `ignore-scripts=true`, `minimum-release-age=1440`, `verify-store-integrity=true`, `prefer-frozen-lockfile=true`, and `strict-peer-dependencies=true` by default.
|
|
120
129
|
- The CLI never executes template scripts and never makes network calls beyond the package manager you select.
|
|
121
130
|
|
|
122
131
|
## AI agent helper files
|
|
123
132
|
|
|
124
|
-
Every scaffolded project ships with two files
|
|
133
|
+
Every scaffolded project ships with two files that help AI coding agents (Copilot, Claude Code, Cursor, Codex, etc.) understand and work in your project:
|
|
125
134
|
|
|
126
|
-
- `AGENTS.md` — a small, top-of-context file (per the open [AGENTS.md](https://agents.md) convention): one-line project description, package manager / runtime, and the few commands an agent needs. It
|
|
127
|
-
-
|
|
135
|
+
- `AGENTS.md` (repo root) — a small, top-of-context file (per the open [AGENTS.md](https://agents.md) convention): one-line project description, package manager / runtime, project shape, core rules, and the few commands an agent needs. It links to the full skill below.
|
|
136
|
+
- `.agents/skills/daloyjs-best-practices/SKILL.md` — comprehensive operational guidance following the open `agents/skills/<skill-name>/SKILL.md` convention: when to use the skill, project structure, core workflows (adding routes, regenerating the OpenAPI spec and client), schema and validation conventions, error-handling patterns, middleware order, testing best practices (happy and unhappy paths), security best practices, logging and observability notes, configuration and secrets handling, deployment notes, pitfalls and guardrails, and process expectations.
|
|
128
137
|
|
|
129
138
|
Both files are tailored to the chosen template (Node, Bun, Deno, Vercel Edge, or Cloudflare Workers), and Node-style templates rewrite their commands to match your selected package manager. They follow the "instruction budget" advice — small root file, progressive disclosure for the rest — so they don't waste agent tokens. Edit or delete them freely; the framework does not depend on them at runtime.
|