diff --git a/.changeset/make-generators.md b/.changeset/make-generators.md new file mode 100644 index 0000000..d1ead28 --- /dev/null +++ b/.changeset/make-generators.md @@ -0,0 +1,10 @@ +--- +"cliuno": minor +--- + +Add `cliuno make:*` generators and ship the Claude skills with the package: + +- `cliuno make:resource --fields a:string,b:int?` generates a working CRUD vertical slice (entity/model + controller/route + validation + test, or API client + list/detail pages) that follows each template's conventions and the shared `{status, message, data}` contract. Single-file generators (`make:controller`, `make:model`, `make:migration`, …) delegate to the framework's own CLI (`php artisan`, `node ace`, `bin/rails g`, `ng g`) when it exists. +- `cliuno make` lists what the detected stack supports; `--dry-run` previews, `--force` overwrites. +- `cliuno skills status|install` installs the `cliuno-scaffold`, `cliuno-make`, and `cliuno-matrix` skills into `.claude/skills/` (or `~/.claude/skills/` with `--global`). +- The repo is now a Claude Code plugin marketplace: `claude plugin marketplace add CLIuno/core` then `claude plugin install cliuno@cliuno`. diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json new file mode 100644 index 0000000..7306dab --- /dev/null +++ b/.claude-plugin/marketplace.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://anthropic.com/claude-code/marketplace.schema.json", + "name": "cliuno", + "owner": { + "name": "ru44", + "url": "https://github.com/ru44" + }, + "description": "CLIuno skills: scaffold full-stack apps from contract-tested templates, generate resources with `cliuno make:*`, and run the frontend×backend compatibility matrix.", + "plugins": [ + { + "name": "cliuno", + "source": "./", + "description": "Scaffold apps from CLIuno templates, generate resources with cliuno make:*, and verify the shared REST contract.", + "category": "development", + "tags": ["scaffold", "generator", "fullstack", "templates", "rest-api"] + } + ] +} diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..ebfb164 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,14 @@ +{ + "name": "cliuno", + "version": "2.1.1", + "description": "Scaffold full-stack apps from CLIuno's contract-tested templates, generate resources with `cliuno make:*`, and run the compatibility matrix.", + "author": { + "name": "ru44", + "url": "https://github.com/ru44" + }, + "homepage": "https://cliuno.github.io", + "repository": "https://github.com/CLIuno/core", + "license": "MIT", + "keywords": ["cliuno", "scaffold", "generator", "fullstack", "templates"], + "skills": ["./skills/"] +} diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md new file mode 100644 index 0000000..77376f0 --- /dev/null +++ b/.claude/CLAUDE.md @@ -0,0 +1,61 @@ +# CLIuno core (the `cliuno` CLI) + +TypeScript CLI that scaffolds full-stack apps by cloning the CLIuno templates and running +each stack's install (npm/pnpm/…, composer, uv, bundler), generates resources inside a +scaffolded project (`cliuno make:*`), and ships the Claude skills (`cliuno skills`). +Published to npm as `cliuno`; the repo is also a Claude Code plugin marketplace. + +## Commands + +```bash +pnpm dev # run the CLI from source (tsx) — e.g. pnpm dev make:resource Post --dry-run +pnpm build # tsup → dist/app.js (ESM-only; prebuild stamps versions into skills/ + plugin.json) +pnpm test # node:test unit tests (src/**/*.test.ts) +pnpm lint / lintfix # oxlint +pnpm fmt / fmt:check # oxfmt +pnpm test:matrix # frontend×backend compatibility matrix (see below) +node scripts/test-generators.mjs [--only express,react] # generate a resource in every local template + run its gates +pnpm release # build + changeset publish +``` + +## Layout + +- `src/app.ts` — entry: `parseArgv` → `help|version|doctor|make|skills|scaffold`. +- `src/cli/argv.ts` — tiny argv parser (`make: --fields … --dry-run --force`). +- `src/commands/scaffold.ts` — the interactive menus (unchanged behaviour); `make.ts`, + `skills.ts` — the new commands. +- `src/generators/` — `names.ts` (casing + plural), `fields.ts` (`a:string,b:int?` DSL), + `detect.ts` (manifest probes → `StackId`), `types.ts` (`Generator`/`Command`/`Patch`), + `engine.ts` (native-vs-stub decision, write/patch with `--force`/`--dry-run`, + idempotent patches, optional post-write formatter), `stacks/.ts` one module per + stack (stubs mirror that template's `todo` resource), `stacks/index.ts` registry. +- `src/utils/questions.ts` + `src/utils/links.ts` — menu choices ↔ template repo URLs. + **These two must stay in sync**: every menu value needs a links entry. +- `src/utils/GitHandler.ts` — clone + per-stack install commands; `src/utils/doctor.ts`. +- `skills/` — the packaged Claude skills (`cliuno-scaffold`, `cliuno-make`, `cliuno-matrix`); + `.claude/skills/*` are symlinks to them so they load while working in this workspace. + `.claude-plugin/{marketplace,plugin}.json` — Claude Code plugin manifests + (`claude plugin validate . --strict` must pass). +- `scripts/test-matrix.mjs` — the compatibility matrix (zero-dep Node ≥18). Full guide: + `skills/cliuno-matrix/SKILL.md`. +- `scripts/test-generators.mjs` — generates a resource in a throw-away git worktree of + every local template and runs that stack's typecheck/lint/tests. + +## Adding or changing a generator + +1. Read the template's `todo` files (router/controller/entity or api/view) — stubs must + mirror their imports, helpers, envelope and formatting exactly. +2. Edit `src/generators/stacks/.ts`; keep `resource` as the full vertical slice and + make single-file kinds delegate to the framework CLI via `native` when one exists. +3. `pnpm test` (the render test covers every registered stack), then + `node scripts/test-generators.mjs --only `. +4. Update `skills/cliuno-make/references/stacks.md`. + +## Conventions + +- oxc-only tooling (oxlint + oxfmt, 4-space, double quotes here — this repo's own style). + Generated template code uses the template's style (4-space, `semi: false`, single quotes). +- Conventional commits (commitlint via husky); no co-author trailers. +- husky pre-commit runs lint-staged; if `pnpm` suddenly fails with IGNORED_BUILDS, fix + `pnpm-workspace.yaml` `allowBuilds` — don't bypass hooks. +- The matrix must exit 0 before releasing template-facing changes. diff --git a/.claude/skills/cliuno-make b/.claude/skills/cliuno-make new file mode 120000 index 0000000..0205b54 --- /dev/null +++ b/.claude/skills/cliuno-make @@ -0,0 +1 @@ +../../skills/cliuno-make \ No newline at end of file diff --git a/.claude/skills/cliuno-matrix b/.claude/skills/cliuno-matrix new file mode 120000 index 0000000..1e6c323 --- /dev/null +++ b/.claude/skills/cliuno-matrix @@ -0,0 +1 @@ +../../skills/cliuno-matrix \ No newline at end of file diff --git a/.claude/skills/cliuno-scaffold b/.claude/skills/cliuno-scaffold new file mode 120000 index 0000000..78cd098 --- /dev/null +++ b/.claude/skills/cliuno-scaffold @@ -0,0 +1 @@ +../../skills/cliuno-scaffold \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ad7b9dd..8418f55 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,6 +3,7 @@ on: push: branches: - "**" + pull_request: jobs: build: @@ -14,8 +15,21 @@ jobs: version: 10 - uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: 22.x cache: "pnpm" - run: pnpm install - - run: pnpm lint && pnpm build + - run: pnpm lint && pnpm fmt:check + - run: pnpm test + - run: pnpm build + + plugin: + name: Claude Code plugin manifest + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22.x + - run: npm install -g @anthropic-ai/claude-code + - run: claude plugin validate . --strict diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 959d2a4..c34bf2d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -52,6 +52,7 @@ jobs: id: changesets uses: changesets/action@v1 with: + version: pnpm changeset:version publish: bash scripts/ci-publish.sh env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 7e06dbe..009446f 100644 --- a/.gitignore +++ b/.gitignore @@ -105,3 +105,4 @@ dist .tern-port matrix-report.json .claude/skills/cliuno-matrix-workspace/ +dist-*/ diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index bb0726b..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,38 +0,0 @@ -# CLIuno core (the `cliuno` CLI) - -TypeScript CLI that scaffolds full-stack apps by cloning the CLIuno templates and running -each stack's install (npm/pnpm/…, composer, uv, bundler). Published to npm as `cliuno`. - -## Commands - -```bash -pnpm dev # run the CLI from source (tsx) -pnpm build # tsup → dist/app.js (ESM-only; CJS is gone because of top-level await) -pnpm lint / lintfix # oxlint -pnpm fmt / fmt:check # oxfmt -pnpm test:matrix # frontend×backend compatibility matrix (see below) -pnpm release # build + changeset publish -``` - -## Layout - -- `src/app.ts` — entry: flags (`--help`, `--version`, `--doctor`) + interactive menus. -- `src/utils/questions.ts` — menu choices; `src/utils/links.ts` — choice → template repo - URL. **These two must stay in sync**: every menu value needs a links entry. -- `src/utils/GitHandler.ts` — clone + per-stack install commands (Django/FastAPI use - `uv sync`, Rails `bundle install`, Laravel `composer install`). -- `src/utils/doctor.ts` — checks required tools per framework. -- `scripts/test-matrix.mjs` — the compatibility matrix (zero-dep Node ≥18). Boots every - backend template, drives the shared contract flow with real frontend payloads (including - a live TOTP), extracts each frontend's API calls, grades all pairs into - `matrix-report.json` (gitignored). Full guide: `.claude/skills/cliuno-matrix/SKILL.md`. -- `.claude/skills/cliuno-scaffold/` — the "build on templates, not from scratch" skill: - stack chooser, clone/install per stack, shadcn UI conventions, quality gates. - -## Conventions - -- oxc-only tooling (oxlint + oxfmt, 4-space, double quotes here — this repo's own style). -- Conventional commits (commitlint via husky); no co-author trailers. -- husky pre-commit runs lint-staged; if `pnpm` suddenly fails with IGNORED_BUILDS, fix - `pnpm-workspace.yaml` `allowBuilds` — don't bypass hooks. -- The matrix must exit 0 before releasing template-facing changes. diff --git a/README.md b/README.md index 6a2cb97..2f77ff7 100644 --- a/README.md +++ b/README.md @@ -43,10 +43,59 @@ pnpm add -g cliuno ## Running the app ```bash -# run it +# interactive scaffolder: pick a backend, a frontend / mobile app, a package manager $ cliuno + +# health check for every supported stack +$ cliuno --doctor +``` + +## Generating code inside a scaffolded project (`cliuno make:*`) + +Every template implements the same demo app on one REST contract. `cliuno make:*` clones +that pattern for your own resources, in the template's conventions, so you (or an AI +agent) edit fields and business logic instead of writing boilerplate: + +```bash +cd my-api # any CLIuno template, any sub-folder +cliuno make # what this stack can generate +cliuno make:resource Product --fields name:string,price:number,inStock:boolean,notes:text? +cliuno make:controller Invoice --dry-run # preview without writing +cliuno make:model Tag --force # overwrite an existing file ``` +- `make:resource` generates the whole vertical slice — entity/model + controller/route + + validation + test on backends, API client + list/detail pages on frontends — and + registers it (router, module, `apis/index`, …). Re-running never duplicates registrations. +- Single-file kinds (`make:controller`, `make:model`, `make:migration`, `make:service`, + `make:validator|request|dto`, `make:test`, `make:api`, `make:store`, `make:page`, + `make:component`) delegate to the framework's own CLI when it has one + (`php artisan`, `node ace`, `bin/rails g`, `ng g`, `shadcn add`), otherwise render a + CLIuno stub. +- Field types: `string text int number boolean date json`, add `?` for nullable. + +## Claude Code / AI agents + +The repo ships three skills (`cliuno-scaffold`, `cliuno-make`, `cliuno-matrix`) that +teach an agent to scaffold from the templates and to run the generators instead of +hand-writing files. Install them in any of these ways: + +```bash +# 1. as a Claude Code plugin +claude plugin marketplace add CLIuno/core +claude plugin install cliuno@cliuno +# (inside a session: /plugin marketplace add CLIuno/core, then /plugin install cliuno@cliuno) + +# 2. copied into the current project's .claude/skills/ (works offline, no plugin system needed) +npx cliuno@^2.2 skills install # --global → ~/.claude/skills + +# 3. with the skills.sh CLI +npx skills add CLIuno/core +``` + +`cliuno skills status` tells you whether the skills are installed, outdated, or locally +modified. Every template's `CLAUDE.md` asks the agent to run it first. + ### Project status ✅ Production ready and maintained. diff --git a/docs/superpowers/plans/2026-10-10-make-generators-and-plugin.md b/docs/superpowers/plans/2026-10-10-make-generators-and-plugin.md new file mode 100644 index 0000000..e87c8e9 --- /dev/null +++ b/docs/superpowers/plans/2026-10-10-make-generators-and-plugin.md @@ -0,0 +1,258 @@ +# `cliuno make:*` generators, skills plugin, dependency refresh — Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Give every CLIuno template a one-command resource generator an AI agent can call, ship the skills as a Claude Code plugin / skills.sh set, and refresh every repo's dependencies with one PR per repo. + +**Architecture:** `core/src/app.ts` becomes a tiny argv router over three commands (interactive scaffold, `make`, `skills`). Generators are data: one module per stack exporting `Generator` (a map of `Kind → Command`), where a `Command` is either a native-CLI delegation or a list of rendered files + idempotent patches + notes. A stack-agnostic engine detects the stack, builds a `Ctx` (names, fields), renders, and writes with `--force`/`--dry-run` semantics. Skills live in `core/skills/` and are installed by copying into `.claude/skills/`. + +**Tech Stack:** TypeScript 6, tsup (ESM), `node:test` via tsx, oxlint/oxfmt, Claude Code plugin manifests. + +**Spec:** `docs/superpowers/specs/2026-10-10-make-generators-and-plugin-design.md` + +## Global Constraints + +- core style: 4-space, double quotes, oxlint + oxfmt clean (`pnpm lint`, `pnpm fmt:check`). +- Generated JS/TS for templates: 4-space, `semi: false`, single quotes (matches every template's oxfmt). +- Never overwrite an existing file without `--force`; patches idempotent; missing anchor → note. +- No `Co-Authored-By` / AI attribution in any commit or PR. Conventional commit messages. +- `make:resource` = CLIuno stubs on every stack; primitives delegate to native CLIs (`php artisan`, `node ace`, `bin/rails g`, `ng g`) when the binary exists. +- Dependencies: attempt latest; pin back only when a major needs more than an obvious fix, and say so in the PR body. +- Each template's own gates must stay green: `tsc`/`vue-tsc`/`svelte-check`/`ng build`, `oxlint .`, build, test suites, `ruff`, `pint`, `rubocop`, `mvnw test`. + +## Review Focus + +1. Resource names given in any case/plural form (`post`, `Posts`, `blog-post`, `BlogPost`) must normalise to one consistent set (`BlogPost`, `blogPost`, `blog-post`, `blog_post`, plural `BlogPosts`/`blog-posts`/`blog_posts`) — Task 2 tests pin this. +2. A field list with a trailing comma, spaces, or an unknown type (`price:money`) must fail with a message that lists valid types, not generate broken code — Task 2 tests. +3. Running `make:resource` twice must not duplicate route registrations or imports — Task 4 patch tests. +4. Running from a sub-directory of a template (e.g. `src/`) must still detect the stack by walking up to the manifest — Task 3 tests. +5. `cliuno skills install` run twice must not clobber a user-modified skill without `--force`, and `status` must report "outdated" when the installed `metadata.version` is lower — Task 6 tests. + +--- + +### Task 1: argv router + command modules + +**Files:** + +- Modify: `src/app.ts` (becomes router) +- Create: `src/commands/scaffold.ts` (existing interactive flow moved verbatim), `src/commands/make.ts`, `src/commands/skills.ts` (stubs that print "not implemented" until Tasks 5/6) +- Modify: `package.json` scripts: `"test": "tsx --test src/**/*.test.ts"`, `files: ["dist", "skills"]` + +**Interfaces:** + +- Produces: `runMake(argv: string[]): Promise` and `runSkills(argv: string[]): Promise` returning the exit code. `src/app.ts` dispatches `make`, `make:`, `skills`, `--doctor`, `--help`, `--version`; anything else → interactive scaffold (banner printed only there). + +Steps: write `src/app.test.ts` asserting `parseArgv(["make:resource","Post","--fields","a:string","--dry-run"])` → `{command:"make", kind:"resource", name:"Post", flags:{fields:"a:string", dryRun:true}}`; run (fail); implement `parseArgv` in `src/cli/argv.ts`; run (pass); commit `refactor(cli): route argv to scaffold/make/skills commands`. + +### Task 2: names + fields + +**Files:** + +- Create: `src/generators/names.ts`, `src/generators/fields.ts`, tests beside them. + +**Interfaces (produces):** + +```ts +export interface CaseSet { + pascal: string; + camel: string; + kebab: string; + snake: string; + title: string; +} +export interface Names extends CaseSet { + raw: string; + plural: CaseSet; +} +export function buildNames(raw: string): Names; // "blog-post" | "BlogPosts" | "blog_post" → singular base "BlogPost" +export function pluralize(word: string): string; // post→posts, category→categories, box→boxes, person→people, status→statuses +export type FieldType = "string" | "text" | "int" | "number" | "boolean" | "date" | "json"; +export interface Field { + name: string; + camel: string; + snake: string; + type: FieldType; + nullable: boolean; +} +export function parseFields(spec?: string): Field[]; // undefined/"" → DEFAULT_FIELDS (title:string, description:text?) +export const FIELD_TYPES: readonly FieldType[]; +export function mapType(field: Field, map: Record): T; +``` + +Tests: casing table (Review Focus 1), plural rules, `parseFields("price:money")` throws with message containing `string, text, int, number, boolean, date, json`, trailing comma/spaces tolerated, `?` sets nullable, duplicate field name throws. Commit `feat(make): name casing and field parsing`. + +### Task 3: stack detection + +**Files:** `src/generators/detect.ts` + test using `fs.mkdtemp` fixtures. + +**Interfaces:** + +```ts +export type StackId = + | "express" + | "fastify" + | "nest" + | "adonis" + | "django" + | "fastapi" + | "laravel" + | "tallstack" + | "rails" + | "spring" + | "aspnet" + | "drogon" + | "react" + | "next" + | "vue" + | "nuxt" + | "svelte" + | "solid" + | "angular" + | "flutter" + | "reactnative"; +export interface Detection { + stack: StackId; + root: string; +} +export function detectStack(cwd: string): Detection | null; // walks up ≤ 6 parents until a manifest is found; order per spec §2 +export const PROBES: ReadonlyArray<{ stack: StackId; describe: string }>; +``` + +Tests: one fixture per stack (minimal manifest), sub-directory walk-up (Review Focus 4), express-vs-nest precedence, null for empty dir. Commit `feat(make): detect the CLIuno stack from manifests`. + +### Task 4: engine (render + apply) + +**Files:** `src/generators/types.ts`, `src/generators/engine.ts`, tests. + +**Interfaces:** + +```ts +export type Kind = + | "resource" + | "controller" + | "model" + | "migration" + | "service" + | "validator" + | "request" + | "dto" + | "test" + | "api" + | "store" + | "page" + | "component"; +export interface Ctx { + cwd: string; + names: Names; + fields: Field[]; + force: boolean; + dryRun: boolean; +} +export interface FileSpec { + path: string; + content: string; +} // path relative to ctx.cwd (the stack root) +export interface Patch { + path: string; + anchor: string | RegExp; + insert: string; + where: "before" | "after"; + skipIf: string; + describe: string; +} +export interface Command { + describe: string; + native?: (ctx: Ctx) => { bin: string; args: string[] }[]; // delegated when `bin` resolves on PATH or as a relative file + files?: (ctx: Ctx) => FileSpec[]; + patches?: (ctx: Ctx) => Patch[]; + notes?: (ctx: Ctx) => string[]; +} +export interface Generator { + id: StackId; + label: string; + kind: "backend" | "frontend" | "mobile"; + commands: Partial>; +} +export interface Plan { + native: { bin: string; args: string[] }[]; + files: FileSpec[]; + patches: Patch[]; + notes: string[]; +} +export function plan(gen: Generator, kind: Kind, ctx: Ctx): Plan; // throws if kind unsupported +export function apply( + p: Plan, + ctx: Ctx, + io?: Io, +): Promise<{ written: string[]; skipped: string[]; patched: string[]; notes: string[] }>; +export function applyPatch( + source: string, + patch: Patch, +): { text: string; status: "applied" | "skipped" | "anchor-missing" }; +``` + +Tests: `applyPatch` after/before, skipIf (Review Focus 3), anchor-missing → note; `apply` refuses overwrite without force, writes with force, dry-run writes nothing; native resolution uses an injected `which`. Commit `feat(make): generator engine with dry-run, force and idempotent patches`. + +### Task 5: `make` command + registry + reference stacks (express, react) + +**Files:** `src/generators/stacks/index.ts` (registry: `export const generators: Record`; every stack module pre-created as `{ id, label, kind, commands: {} }` so parallel workers only touch their own file), `src/generators/stacks/express.ts`, `src/generators/stacks/react.ts`, `src/generators/stacks/stacks.test.ts` (for every registered generator with ≥1 command: `plan(gen,"resource",ctx)` renders with default and custom fields; no file content contains `undefined`, `[object Object]`, or `{{`; every file path is relative and unique), `src/commands/make.ts` (real implementation: detect → ctx → plan → print/apply; `cliuno make` lists kinds with `(native: …)` markers). + +Express `resource` → `src/routers/v1/.router.ts`, `src/controllers/.controller.ts`, `src/entities/.entity.ts`, patch `src/routers/index.ts` (import after the last `import … from './v1/…'` line; `router.use('/', Router)` before `// Export the main router`), patch `src/entities/user.entity.ts` is NOT touched (owner relation is one-way `@ManyToOne(() => User)` without inverse). Primitives: `controller`, `model` (entity), `validator` (express-validator chain file in `src/validators/.validator.ts`), `test` (`src/__tests__/.spec.ts` jest). TS type map: string→`text`, text→`text`, int→`integer`, number→`real`, boolean→`boolean`, date→`datetime`, json→`simple-json`. + +React `resource` → `src/apis/-api.ts`, `src/views/app/View.tsx` (list + create dialog + delete), `src/views/app/DetailView.tsx`; patches `src/apis/index.ts` (import + key) and `src/router/index.tsx` (lazy import + two `` lines inside the protected group, anchored on ` -y`), `store` (zustand `src/stores/.ts`). + +Commit `feat(make): make command with express and react generators`. + +### Task 6: `skills` command + skills relocation + +**Files:** `git mv .claude/skills/cliuno-scaffold skills/cliuno-scaffold`, same for `cliuno-matrix`; symlinks `.claude/skills/cliuno-scaffold -> ../../skills/cliuno-scaffold` (and matrix); `src/commands/skills.ts`; `src/skills/locate.ts` (`packagedSkillsDir()` resolves `../skills` relative to `import.meta.url` of the built file, falling back to `../../skills` when running from `src/` via tsx); tests with tmp dirs. + +**Interfaces:** + +```ts +export interface SkillStatus { + name: string; + packaged: string; + project?: string; + user?: string; + state: "missing" | "installed" | "outdated" | "modified"; +} +export function skillsStatus(opts: { cwd: string; home: string; packaged: string }): SkillStatus[]; +export function installSkills(opts: { + cwd: string; + home: string; + packaged: string; + global: boolean; + force: boolean; +}): { installed: string[]; skipped: string[] }; +``` + +`metadata.version` in each packaged SKILL.md frontmatter is the package version (a `scripts/stamp-skills.mjs` run in `prebuild` rewrites it); installed copies with a lower version → `outdated`; same version but different content → `modified` (skipped unless `--force`). Commit `feat(skills): cliuno skills status/install and package the skills`. + +### Task 7: plugin manifests, CI, README, changeset, CLAUDE.md + +**Files:** `.claude-plugin/marketplace.json`, `.claude-plugin/plugin.json`, `.github/workflows/main.yml` (+ job: `npm i -g @anthropic-ai/claude-code && claude plugin validate . --strict`, plus `pnpm test`), `README.md` (sections: AI agents / Claude Code plugin / make commands), `.changeset/make-generators.md` (`cliuno: minor`), `CLAUDE.md` (core) and workspace `../CLAUDE.md` (skill paths now `core/skills/…`). + +Validate locally: `claude plugin validate . --strict` exits 0. Commit `feat(plugin): publish core as a Claude Code plugin marketplace`. + +### Task 8: skills content + +**Files:** `skills/cliuno-make/SKILL.md` (+ `references/stacks.md` table of outputs per stack), update `skills/cliuno-scaffold/SKILL.md` (after scaffold → `npx cliuno@latest make:resource`, `skills status`), `skills/cliuno-matrix/SKILL.md` (paths). Keep frontmatter to `name`, `description`, `metadata` only (portable). Commit `docs(skills): add cliuno-make skill and point scaffold at the generators`. + +### Task 9: remaining stack generators (parallel, one worker per group) + +Each worker: read the template's `todo` files listed in the spec §5 table (plus the file that registers routes/apis), write `src/generators/stacks/.ts` mirroring imports/helpers/envelope/formatting exactly, run `pnpm test -- src/generators/stacks/stacks.test.ts` and `pnpm lint`, then `node scripts/test-generators.mjs --only ` (Task 10) where the toolchain exists locally (JS, PHP, Python, Ruby, Java); for aspnet/drogon/flutter use `--dry-run` review only. Commit `feat(make): generator`. + +Groups: (a) fastify, nest, adonis · (b) django, fastapi · (c) laravel, tallstack, rails · (d) spring, aspnet, drogon · (e) vue, nuxt, svelte · (f) solid, next, angular · (g) flutter, reactnative. + +### Task 10: integration script + +**Files:** `scripts/test-generators.mjs` — for each template dir in `..` (or `--only id`): `git worktree add / HEAD`, install (per stack table in `skills/cliuno-scaffold/references/stacks.md`), run `node /dist/app.js make:resource Widget --fields name:string,price:number,done:boolean,due:date?`, run gates, `git worktree remove --force`. Exit non-zero on any failure, print a table. Commit `test(make): integration script that generates a resource in every template`. + +### Task 11: dependency refresh per repo (parallel batches) + +Per repo on branch `chore/deps-2026-10`: update per spec §7, run gates, fix, commit `build(deps): update dependencies to latest (2026-10)`; worker reports majors kept/pinned. Then the orchestrator adds the CLAUDE.md "AI agents" section (`docs: point AI agents at cliuno make and skills`), pushes, opens the PR with `gh pr create` (body: summary table of bumps, gates run, pinned majors; no attribution). Run `pnpm test:matrix` in core after all backends are bumped. + +### Task 12: docs site + VS Code extension + +Docs: dependency bump + a page documenting `make:*`, `skills`, plugin install. Extension: dependency bump only (its eslint setup is out of scope). Same branch/PR flow. diff --git a/docs/superpowers/specs/2026-10-10-make-generators-and-plugin-design.md b/docs/superpowers/specs/2026-10-10-make-generators-and-plugin-design.md new file mode 100644 index 0000000..0c773c2 --- /dev/null +++ b/docs/superpowers/specs/2026-10-10-make-generators-and-plugin-design.md @@ -0,0 +1,266 @@ +# CLIuno: `make:*` generators, Claude skills plugin, and workspace dependency refresh + +Date: 2026-10-10 · Status: approved-by-assumption (autonomous session; see "Decisions taken") + +## Intent (what the user asked for, in their words, condensed) + +1. Go through every CLIuno repo, update its packages, open a PR — no Claude author. +2. Update the Claude skills and put the `core` repo on the Claude skills marketplace. +3. When someone installs the `cliuno` package, Claude should check whether the CLIuno + skills are installed, and use the CLI to produce files instead of writing whole files + by hand (save tokens). +4. Laravel-style `make:*` commands (controller, model, …): delegate to the framework's + own CLI when it has one; otherwise CLIuno provides a simple generator Claude can call. + +Success = an AI agent working in any CLIuno template can run one command to add a working +resource (route + controller + model + validation + tests, or api + store + page) and only +has to edit fields/business logic; every repo's dependencies are current with CI green; +`core` installs as a Claude Code plugin and as a skills.sh skill set. + +## Workstreams + +| # | Workstream | Repos | +| --- | ------------------------------------------- | ------------------------------- | +| 1 | `cliuno make:*` + `cliuno skills` + plugin | `core` | +| 2 | Dependency refresh + "AI agents" CLAUDE.md | 21 templates | +| 3 | Dependency refresh (+ docs page for `make`) | `cliuno.github.io`, VS Code ext | + +## 1. CLI surface (core) + +``` +cliuno interactive scaffold (unchanged) +cliuno --doctor | --help | --version +cliuno make list the generators available for the detected stack +cliuno make: [--fields name:string,price:number?] [--force] [--dry-run] +cliuno skills status which CLIuno skills are installed (project / user), version +cliuno skills install [--global] [--force] +``` + +`` is the union: `resource controller model migration service validator request dto +test api store page component`. Each stack implements the subset that exists in that +stack; `cliuno make` prints the subset and marks which ones delegate to a native CLI. + +The welcome banner moves into the interactive path so `make`/`skills` output stays +machine-readable. + +## 2. Stack detection + +Probe `process.cwd()` in this order and stop at the first match: + +| stack | probe | +| ----------- | ------------------------------------------------------- | +| tallstack | `composer.json` requires `livewire/livewire` | +| laravel | `composer.json` requires `laravel/framework` | +| django | `pyproject.toml` lists `django` | +| fastapi | `pyproject.toml` lists `fastapi` | +| rails | `Gemfile` has `gem "rails"` | +| spring | `pom.xml` contains `spring-boot` | +| aspnet | any `*.csproj` with `Microsoft.NET.Sdk.Web` (depth ≤ 2) | +| drogon | `CMakeLists.txt` contains `Drogon` | +| flutter | `pubspec.yaml` with `flutter:` dependency | +| nest | package.json dep `@nestjs/core` | +| adonis | package.json dep `@adonisjs/core` | +| fastify | package.json dep `fastify` | +| express | package.json dep `express` (and not nest/adonis) | +| next | package.json dep `next` | +| nuxt | package.json dep `nuxt` | +| reactnative | package.json dep `expo` | +| react | package.json dep `react` + `react-router-dom` | +| vue | package.json dep `vue` + `vue-router` (not nuxt) | +| svelte | package.json dep `@sveltejs/kit` | +| solid | package.json dep `solid-js` | +| angular | package.json dep `@angular/core` | + +No match → exit 1 with the probe table. No marker file is written at scaffold time +(templates cloned by hand must work too). + +## 3. Generator model + +```ts +type Kind = + | "resource" + | "controller" + | "model" + | "migration" + | "service" + | "validator" + | "request" + | "dto" + | "test" + | "api" + | "store" + | "page" + | "component"; + +interface Field { + name: string; + type: FieldType; + nullable: boolean; +} // FieldType: string|text|int|number|boolean|date|json +interface Names { + raw; + pascal; + camel; + kebab; + snake; + plural: { pascal; camel; kebab; snake }; +} +interface Ctx { + cwd: string; + names: Names; + fields: Field[]; + force: boolean; + dryRun: boolean; +} + +interface Command { + describe: string; + native?: (ctx: Ctx) => string[]; // argv to delegate to (framework CLI) — used when its binary exists + files?: (ctx: Ctx) => FileSpec[]; // { path, content } + patches?: (ctx: Ctx) => Patch[]; // { path, anchor: string | RegExp, insert, where: 'before' | 'after', skipIf?: string } + notes?: (ctx: Ctx) => string[]; // follow-up instructions printed at the end +} + +interface Generator { + id: StackId; + label: string; + commands: Partial>; +} +``` + +Rules: + +- `native` wins when defined **and** its binary resolves (`php`, `node`, `bin/rails`, + `ng`); otherwise fall back to `files` when present, else error "needs ". +- `make:resource` always renders CLIuno stubs (the framework CLIs don't know CLIuno's + envelope `{status, message, data}`, Bearer guard, owner relation, timestamps). It also + applies route-registration patches where the stack needs them. +- Never overwrite an existing file unless `--force`. Patches are idempotent (`skipIf` + text already present → skip). Missing anchor → the patch becomes a note, never a crash. +- `--dry-run` prints every file path + content and every patch, writes nothing. +- Stubs are TypeScript template strings in `src/generators/stacks/.ts` (bundled by + tsup, so `files: ["dist", "skills"]` stays simple). +- Default fields when `--fields` is omitted: `title:string,description:text?`. + +## 4. Fields DSL + +`--fields name:string,price:number,qty:int,done:boolean,body:text?,due:date?,meta:json?` + +`?` = nullable. Type map is owned per stack, e.g. TypeORM `text/real/integer/boolean/ +datetime/simple-json`, Django `CharField/TextField/IntegerField/FloatField/BooleanField/ +DateTimeField/JSONField`, Eloquent migration `string/text/integer/float/boolean/dateTime/ +json`, Rails `string/text/integer/float/boolean/datetime/json`, JPA `String/String/Integer/ +Double/Boolean/Instant/String`, EF Core `string/string/int/double/bool/DateTime/string`, +SQLAlchemy `String/Text/Integer/Float/Boolean/DateTime/JSON`, TS `string/string/number/ +number/boolean/string/Record`, Dart `String/String/int/double/bool/ +String/Map`. + +## 5. What `make:resource ` produces per stack + +Backends (route prefix `/`, all guarded by the template's auth middleware, +owner = authenticated user, list/get/create/update/delete): + +| stack | files | registration patch | native primitives (`make:controller` …) | +| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- | ------------------------------------------------------ | +| express | `src/routers/v1/.router.ts`, `src/controllers/.controller.ts`, `src/entities/.entity.ts` | `src/routers/index.ts` import + `use` | none → stubs | +| fastify | `src/routes/.routes.ts`, `src/entities/.entity.ts` (or wherever the template keeps entities) | `src/app.ts` register | none → stubs | +| nest | `src/controllers/.controller.ts`, `src/services/.service.ts`, `src/dto/.dto.ts`, `src/entities/.entity.ts`, `src/modules/.module.ts` | `src/app.module.ts` import + imports[] | `nest g` layouts differ from the template → stubs | +| adonis | controller, model, migration, validator | `start/routes.ts` | `node ace make:controller/model/migration/validator` | +| django | `src/views/_views.py`, `src/serializers/_serializers.py`, `src/urls/_urls.py`, model appended to `src/models.py`, `src/tests/test_.py` | `src/urls/__init__.py` (or root urls) | `manage.py makemigrations` (migration), rest → stubs | +| fastapi | `src/routers/.py`, `src/models/.py`, `src/schemas/.py`, `tests/test_.py` | `src/app.py` include_router | none → stubs | +| laravel | `app/Models/

.php`, `app/Http/Controllers/

Controller.php`, `app/Http/Requests/Store

Request.php`, migration, `tests/Feature/

Test.php` | `routes/api.php` apiResource | `php artisan make:*` for every primitive | +| tallstack | same as laravel (+ note about Volt page) | `routes/api.php` | `php artisan make:*` | +| rails | model, migration, `app/controllers/api/v1/_controller.rb`, tests | `config/routes.rb` resources | `bin/rails g model/controller/migration` | +| spring | `entity/

.java`, `repo/

Repository.java`, `controller/

Controller.java` | none (component scan) | none → stubs | +| aspnet | `Controllers/Controller.cs`, model class, DbSet line in the DbContext | DbContext patch | none → stubs | +| drogon | `controllers/

Controller.cc` (+ schema statement in the template's bootstrap SQL) | schema patch | `drogon_ctl` output doesn't match the template → stubs | + +Frontends (list page + detail page, api client, store where the template uses one): + +| stack | files | registration patch | +| ----------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------- | +| react | `src/apis/-api.ts`, `src/views/app/

sView.tsx`, `src/views/app/

DetailView.tsx` | `src/apis/index.ts`, `src/router/index.tsx` | +| vue | `src/apis/-api.ts`, `src/views/app/

sView.vue`, `

DetailView.vue` | `src/apis/index.ts`, `src/router/index.ts` | +| solid | `src/apis/-api.ts`, `src/pages/app/

sPage.tsx`, `

DetailPage.tsx` | `src/apis/index.ts`, routes file | +| svelte | `src/lib/apis/-api.ts`, `src/routes//+page.svelte`, `src/routes//[id]/+page.svelte` | `src/lib/apis/index.ts` | +| next | `src/apis/-api.ts`, `src/app//page.tsx`, `src/app//[id]/page.tsx` | `src/apis/index.ts` | +| nuxt | `composables/use

Api.ts`, `pages//index.vue`, `pages//[id].vue` | none (auto-imports, file routing) | +| angular | `src/app/services/-api.service.ts`, `src/app/views/app/.component.ts`, `-detail.component.ts` | `src/app/app.routes.ts` | +| flutter | `lib/apis/_api.dart`, `lib/screens/_screen.dart`, `lib/screens/_detail_screen.dart` | note (routes map) | +| reactnative | `src/apis/-api.ts`, `src/app//index.tsx`, `src/app//[id].tsx` | `src/apis/index.ts` | + +`make:component ` on web frontends delegates to the template's documented +shadcn-style `add` command (`npx shadcn@latest add`, `shadcn-vue`, `shadcn-svelte`, +`ng g @spartan-ng/cli:ui`); Solid/mobile get a stub file. + +Stubs are derived from each template's existing `todo` resource so the generated code +matches the template's imports, helpers, envelope, lint rules and formatting (4-space, +`semi: false`, single quotes for the JS templates; the backend's own style elsewhere). + +## 6. `cliuno skills` and the plugin + +- Skills move from `core/.claude/skills/` to `core/skills/` (the layout both Claude Code + plugins and `npx skills add` discover). `core/.claude/skills/` become relative + symlinks so working inside the workspace keeps project-skill discovery. +- Three skills: `cliuno-scaffold` (updated: after scaffolding use `make:resource`; check + skills), `cliuno-matrix` (path updates), **new `cliuno-make`** (when to generate instead + of hand-writing, flags, per-stack outputs, what to edit after, dry-run first when + unsure). +- `.claude-plugin/marketplace.json` → name `cliuno`, owner ru44, one plugin `cliuno`, + `source: "./"`. `.claude-plugin/plugin.json` → name `cliuno`, `skills: ["./skills/"]`. + CI job runs `claude plugin validate . --strict`. +- npm package ships `skills/` (`files: ["dist", "skills"]`). `cliuno skills install` + copies `skills/*` from the installed package into `./.claude/skills/` (project) or + `~/.claude/skills/` (`--global`); `status` lists installed/missing/outdated using the + `metadata.version` frontmatter stamped from `package.json`. +- "Claude checks the skills are installed": every template's `CLAUDE.md` gains an **AI + agents** section telling the agent to run `npx cliuno@latest skills status` first (install + if missing) and to use `npx cliuno@latest make:resource` instead of hand-writing + resources. The interactive `cliuno` also prints a one-line hint when the cwd has a + `CLAUDE.md`/`.claude/` but no CLIuno skills. +- README: install via `claude plugin marketplace add CLIuno/core` + `claude plugin install + cliuno@cliuno`, or `npx skills add CLIuno/core`, or `cliuno skills install`. + +## 7. Dependency refresh policy (workstream 2 and 3) + +| ecosystem | update | gates | +| --------- | -------------------------------------------------------------------------------------------- | ----------------------------------------- | +| pnpm | `pnpm up --latest`; majors that break non-trivially → pin to latest compatible, listed in PR | lint, typecheck, build, unit tests | +| npm | `npm update` + manual majors (RN: `npx expo install --fix`) | type-check, lint | +| uv | `uv lock --upgrade`, raise `>=` floors to locked versions | `manage.py test` / `pytest`, `ruff check` | +| composer | `composer update` | `artisan test`, `pint --test` | +| bundler | `bundle update` | `rails test`, `rubocop` | +| maven | bump `spring-boot-starter-parent` (latest 3.5.x; 4.x only if green) | `./mvnw test` | +| dotnet | bump PackageReference versions (no local SDK) | CI (`dotnet build`) | +| flutter | bump pubspec from pub.dev (local flutter shim is broken) | CI (`flutter analyze`, `flutter test`) | +| drogon | nothing to bump | — | + +Branch `chore/deps-2026-10`, commits `build(deps): …` and `docs: …`, one PR per repo, +no AI attribution in commits or PR bodies. After the backend bumps, run the full matrix. + +## 8. Testing + +- `core`: `node:test` via tsx (`pnpm test`): names/fields parsing, detection table, + patch idempotency, and a render test that every stack's `resource` renders with default + and custom fields without throwing and with no leftover `{{` placeholders. +- `core/scripts/test-generators.mjs` (local workspace only): for each template dir run + `make:resource Widget --fields name:string,price:number,done:boolean`, run that stack's + typecheck/lint/tests, then `git checkout -- . && git clean -fd` to restore. +- Each template PR: its own CI. + +## 9. Out of scope + +Axum template (stale 2025, not in the CLI menu), the org `.github` repo, triaging the +existing Dependabot PRs (left open for the user), VS Code extension lint migration. + +## Decisions taken without a live user (override by replying) + +1. `make:resource` uses CLIuno stubs even where a framework CLI exists; only single-file + primitives delegate to the native CLI. Reason: native stubs are empty shells that + don't save an agent tokens; the resource stub is a working vertical slice. +2. No marker file in scaffolded projects — detection is heuristic. +3. Skills are installed by copying into `.claude/skills/` (works offline, no plugin + system required); the plugin marketplace is the second path, not the only one. +4. Dependabot's open PRs are left as-is. +5. Major-version bumps are attempted everywhere; when a major needs more than a small, + obvious fix it is pinned back and listed in the PR body. diff --git a/package.json b/package.json index f6745a4..7ff16ec 100644 --- a/package.json +++ b/package.json @@ -3,14 +3,19 @@ "version": "2.1.1", "description": "CLIuno is a CLI tool to make your journey in web development less painful (it makes your life way easier).", "keywords": [ + "agent-skills", "all in one", "all-in-1", "all-in-one", "automation", + "claude-code", + "claude-skills", "cli", "cliuno", + "generator", "javascript", "nodeJs", + "scaffold", "typescript" ], "homepage": "https://github.com/CLIuno/core#readme", @@ -27,7 +32,8 @@ "cliuno": "dist/app.js" }, "files": [ - "dist" + "dist", + "skills" ], "type": "module", "main": "dist/app.js", @@ -42,27 +48,30 @@ "test:matrix": "node scripts/test-matrix.mjs", "build": "tsup", "release": "pnpm build && changeset publish", - "prepare": "husky" + "prepare": "husky", + "test": "node --import tsx --test \"src/**/*.test.ts\"", + "prebuild": "node scripts/stamp-version.mjs", + "changeset:version": "changeset version && node scripts/stamp-version.mjs" }, "dependencies": { - "@inquirer/prompts": "^8.3.2", - "chalk": "^5.6.2", + "@inquirer/prompts": "^8.7.3", + "chalk": "^6.0.1", "shelljs": "^0.10.0" }, "devDependencies": { - "@changesets/cli": "^2.30.0", - "@commitlint/cli": "^20.5.0", - "@commitlint/config-conventional": "^20.5.0", - "@types/node": "^25.5.0", + "@changesets/cli": "^3.0.3", + "@commitlint/cli": "^21.2.3", + "@commitlint/config-conventional": "^21.2.3", + "@types/node": "^26.6.4", "@types/shelljs": "^0.10.0", - "globals": "^17.4.0", + "globals": "^17.13.0", "husky": "^9.1.7", - "lint-staged": "^16.4.0", - "oxfmt": "^0.44.0", - "oxlint": "^1.59.0", + "lint-staged": "^17.6.0", + "oxfmt": "^0.72.0", + "oxlint": "^1.87.0", "tsup": "^8.5.1", - "tsx": "^4.21.0", - "typescript": "^6.0.2" + "tsx": "^4.23.15", + "typescript": "^6.0.3" }, "lint-staged": { "**/*.{js,ts}": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 22ab583..0036824 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,498 +9,659 @@ importers: .: dependencies: '@inquirer/prompts': - specifier: ^8.3.2 - version: 8.3.2(@types/node@25.5.0) + specifier: ^8.7.3 + version: 8.7.3(@types/node@26.6.4) chalk: - specifier: ^5.6.2 - version: 5.6.2 + specifier: ^6.0.1 + version: 6.0.1 shelljs: specifier: ^0.10.0 version: 0.10.0 devDependencies: '@changesets/cli': - specifier: ^2.30.0 - version: 2.30.0(@types/node@25.5.0) + specifier: ^3.0.3 + version: 3.0.3 '@commitlint/cli': - specifier: ^20.5.0 - version: 20.5.0(@types/node@25.5.0)(conventional-commits-parser@6.4.0)(typescript@6.0.2) + specifier: ^21.2.3 + version: 21.2.3(@types/node@26.6.4)(conventional-commits-parser@7.1.3)(typescript@6.0.3) '@commitlint/config-conventional': - specifier: ^20.5.0 - version: 20.5.0 + specifier: ^21.2.3 + version: 21.2.3 '@types/node': - specifier: ^25.5.0 - version: 25.5.0 + specifier: ^26.6.4 + version: 26.6.4 '@types/shelljs': specifier: ^0.10.0 version: 0.10.0 globals: - specifier: ^17.4.0 - version: 17.4.0 + specifier: ^17.13.0 + version: 17.13.0 husky: specifier: ^9.1.7 version: 9.1.7 lint-staged: - specifier: ^16.4.0 - version: 16.4.0 + specifier: ^17.6.0 + version: 17.6.0 oxfmt: - specifier: ^0.44.0 - version: 0.44.0 + specifier: ^0.72.0 + version: 0.72.0 oxlint: - specifier: ^1.59.0 - version: 1.59.0 + specifier: ^1.87.0 + version: 1.87.0 tsup: specifier: ^8.5.1 - version: 8.5.1(jiti@2.6.1)(tsx@4.21.0)(typescript@6.0.2)(yaml@2.8.3) + version: 8.5.1(jiti@2.6.1)(tsx@4.23.15)(typescript@6.0.3)(yaml@2.9.1) tsx: - specifier: ^4.21.0 - version: 4.21.0 + specifier: ^4.23.15 + version: 4.23.15 typescript: - specifier: ^6.0.2 - version: 6.0.2 + specifier: ^6.0.3 + version: 6.0.3 packages: - '@babel/code-frame@7.29.0': - resolution: {integrity: sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==} + '@babel/code-frame@7.29.7': + resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.28.5': - resolution: {integrity: sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==} + '@babel/helper-validator-identifier@7.29.7': + resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} engines: {node: '>=6.9.0'} - '@babel/runtime@7.29.2': - resolution: {integrity: sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==} - engines: {node: '>=6.9.0'} - - '@changesets/apply-release-plan@7.1.0': - resolution: {integrity: sha512-yq8ML3YS7koKQ/9bk1PqO0HMzApIFNwjlwCnwFEXMzNe8NpzeeYYKCmnhWJGkN8g7E51MnWaSbqRcTcdIxUgnQ==} + '@changesets/apply-release-plan@8.1.1': + resolution: {integrity: sha512-nk2Hbq3M9NeHMdaIRBDvawKrQJzXB9sGyBUE5yWnIKtvdcNCPj75zBekJYr0gTT2ecJH3eFeTrc8eisPImcv0Q==} + engines: {node: ^22.11 || ^24 || >=26} - '@changesets/assemble-release-plan@6.0.9': - resolution: {integrity: sha512-tPgeeqCHIwNo8sypKlS3gOPmsS3wP0zHt67JDuL20P4QcXiw/O4Hl7oXiuLnP9yg+rXLQ2sScdV1Kkzde61iSQ==} + '@changesets/assemble-release-plan@7.0.0': + resolution: {integrity: sha512-oEW8BxdA604kGGtDSCiHr5w9Tv4UWe9I2k61IBNZzCOE1kbYaJj4v+lFQNgcEZFkUc2pV/+hASErGDvpJOZCTg==} + engines: {node: ^22.11 || ^24 || >=26} - '@changesets/changelog-git@0.2.1': - resolution: {integrity: sha512-x/xEleCFLH28c3bQeQIyeZf8lFXyDFVn1SgcBiR2Tw/r4IAWlk1fzxCEZ6NxQAjF2Nwtczoen3OA2qR+UawQ8Q==} + '@changesets/changelog-git@1.0.0': + resolution: {integrity: sha512-3Dst2Ime2Op5nd4XmWJLPIgp11ZFqJqSkVug9izK6TDcIV4YlhPS4ECbEVR+eGI0bk0r1ItogD4j2Oli87bJrA==} + engines: {node: ^22.11 || ^24 || >=26} - '@changesets/cli@2.30.0': - resolution: {integrity: sha512-5D3Nk2JPqMI1wK25pEymeWRSlSMdo5QOGlyfrKg0AOufrUcjEE3RQgaCpHoBiM31CSNrtSgdJ0U6zL1rLDDfBA==} + '@changesets/cli@3.0.3': + resolution: {integrity: sha512-L1i67bMfkK6iC/kDejuNO4pFgTRcWIObsD6Qof2woP1I4M8tj17DGlcpRaTzTv1DYSP5EMwWdEtR8X0Pj5Jg3Q==} + engines: {node: ^22.11 || ^24 || >=26, npm: '>=10.9.0', pnpm: '>=10.0.0', yarn: '>=4.5.2'} hasBin: true - '@changesets/config@3.1.3': - resolution: {integrity: sha512-vnXjcey8YgBn2L1OPWd3ORs0bGC4LoYcK/ubpgvzNVr53JXV5GiTVj7fWdMRsoKUH7hhhMAQnsJUqLr21EncNw==} - - '@changesets/errors@0.2.0': - resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} + '@changesets/config@4.0.1': + resolution: {integrity: sha512-PxpxSQLQSLDjceAgRq+4FWlU+HflDIw03mmPVipxoQx9xrXFUjmqTy3SE+n/2t+DqPdpPiLWVr5NRiLZvjyLwg==} + engines: {node: ^22.11 || ^24 || >=26} - '@changesets/get-dependents-graph@2.1.3': - resolution: {integrity: sha512-gphr+v0mv2I3Oxt19VdWRRUxq3sseyUpX9DaHpTUmLj92Y10AGy+XOtV+kbM6L/fDcpx7/ISDFK6T8A/P3lOdQ==} + '@changesets/errors@1.0.0': + resolution: {integrity: sha512-ElN/mEzn6zmETgjwf5MclCMa9ef59sAR0lfO8VSYIsiRvbC2FbLB/92EoYw10Sl0kGixxHFiJZUSv7dA+YpR8g==} + engines: {node: ^22.11 || ^24 || >=26} - '@changesets/get-release-plan@4.0.15': - resolution: {integrity: sha512-Q04ZaRPuEVZtA+auOYgFaVQQSA98dXiVe/yFaZfY7hoSmQICHGvP0TF4u3EDNHWmmCS4ekA/XSpKlSM2PyTS2g==} + '@changesets/format@0.1.2': + resolution: {integrity: sha512-Caez5XtNXCFS/G5bwyav3wuXL0tMxVd2ZGbaumWbzN08tyzO21asCw7JZhNtVsAZDCvDRUzZN+Iit9SyRITSYA==} + engines: {node: ^22.11 || ^24 || >=26} - '@changesets/get-version-range-type@0.4.0': - resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} + '@changesets/get-dependents-graph@3.0.0': + resolution: {integrity: sha512-ji/t5wFA1zREKXRUePE6Qi+Qu2UgxCeSSGQrphezwvQZrp49B7sJ+8+wvM0tA7zPeSxYKCojDy3WWgrl+s+awg==} + engines: {node: ^22.11 || ^24 || >=26} - '@changesets/git@3.0.4': - resolution: {integrity: sha512-BXANzRFkX+XcC1q/d27NKvlJ1yf7PSAgi8JG6dt8EfbHFHi4neau7mufcSca5zRhwOL8j9s6EqsxmT+s+/E6Sw==} + '@changesets/git@4.0.1': + resolution: {integrity: sha512-6vWpIAC4LkpmlqaIu37ViT5enyd9+uBwAiGqCGhASvkSHBgx4PrtTGXWTMFYpDmZbjgyonyVgMciPrW4MqtJsA==} + engines: {node: ^22.11 || ^24 || >=26} - '@changesets/logger@0.1.1': - resolution: {integrity: sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==} + '@changesets/parse@1.0.0': + resolution: {integrity: sha512-P0iaMb9p9CRYZiTgAllEIF9AUMQHIy1G72tKlcIqJp61icZSsKQNiOPdxAMZG8m/DvZwt/oz5xEbTpike//dWg==} + engines: {node: ^22.11 || ^24 || >=26} - '@changesets/parse@0.4.3': - resolution: {integrity: sha512-ZDmNc53+dXdWEv7fqIUSgRQOLYoUom5Z40gmLgmATmYR9NbL6FJJHwakcCpzaeCy+1D0m0n7mT4jj2B/MQPl7A==} + '@changesets/pre@3.0.0': + resolution: {integrity: sha512-Zm/6YliV/a2oeWTqHJf6KxLrQwgcK1i/BRDl2m0EKZvbnxV5fG9QRhwJJGshjsZTUTS6dkfURQ2K6aAvgNw/3Q==} + engines: {node: ^22.11 || ^24 || >=26} - '@changesets/pre@2.0.2': - resolution: {integrity: sha512-HaL/gEyFVvkf9KFg6484wR9s0qjAXlZ8qWPDkTyKF6+zqjBe/I2mygg3MbpZ++hdi0ToqNUF8cjj7fBy0dg8Ug==} + '@changesets/read@1.0.1': + resolution: {integrity: sha512-nzvSC6RcTiWf/dsuwZFXpLzGGsRHYCL68U3uHV7srsulU93aVWY7u2GEJiDZ+4GIIElfaW5EqtKC0UHroY+LTQ==} + engines: {node: ^22.11 || ^24 || >=26} - '@changesets/read@0.6.7': - resolution: {integrity: sha512-D1G4AUYGrBEk8vj8MGwf75k9GpN6XL3wg8i42P2jZZwFLXnlr2Pn7r9yuQNbaMCarP7ZQWNJbV6XLeysAIMhTA==} + '@changesets/should-skip-package@1.0.0': + resolution: {integrity: sha512-pwqoJmbONn1XgXmZXPEExgAaT+HdZLjALFTDgIm+PnS5KeO2nLtzA2/Q+4aMFY14kFMuXKG30MObhvDzWgzDgg==} + engines: {node: ^22.11 || ^24 || >=26} - '@changesets/should-skip-package@0.1.2': - resolution: {integrity: sha512-qAK/WrqWLNCP22UDdBTMPH5f41elVDlsNyat180A33dWxuUDyNpg6fPi/FyTZwRriVjg0L8gnjJn2F9XAoF0qw==} + '@changesets/types@7.0.0': + resolution: {integrity: sha512-c5GoiQyt3pxiXjrWSNoP8/GRf4kG+VnKzovx1OQM8dYYALlSwgedmkPmJ+ZqGxqwg9D3Bkj85Uo4KLd5BN3A0w==} + engines: {node: ^22.11 || ^24 || >=26} - '@changesets/types@4.1.0': - resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} + '@changesets/write@1.0.1': + resolution: {integrity: sha512-q/ThtP9gcnEP6xlv7LrY26C2mHqdGBti/MmOVngt/M/oIGYkssmQGxPK9WzBNt2juVcH/vml2WQ+ra8LXYOTaA==} + engines: {node: ^22.11 || ^24 || >=26} - '@changesets/types@6.1.0': - resolution: {integrity: sha512-rKQcJ+o1nKNgeoYRHKOS07tAMNd3YSN0uHaJOZYjBAgxfV7TUE7JE+z4BzZdQwb5hKaYbayKN5KrYV7ODb2rAA==} + '@clack/core@1.5.1': + resolution: {integrity: sha512-iHTrHA8MtVuLl2TfZySmcKv1qO2PoyC9Z7pfSDozEuV5vtY3/wcOPKJXlqJ5Oq2Cx5DDGQGAMVx6HZfRRoVEbQ==} + engines: {node: '>= 20.12.0'} - '@changesets/write@0.4.0': - resolution: {integrity: sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q==} + '@clack/prompts@1.8.1': + resolution: {integrity: sha512-dlT1m5e/0yUL0kRNcQn7yGLVThkgbB0Ga/1AmfDDC/8ik6AIiSf2QLQO2zPYvefsHP0aFgxO93cVLCCfDp7kzQ==} + engines: {node: '>= 20.12.0'} - '@commitlint/cli@20.5.0': - resolution: {integrity: sha512-yNkyN/tuKTJS3wdVfsZ2tXDM4G4Gi7z+jW54Cki8N8tZqwKBltbIvUUrSbT4hz1bhW/h0CdR+5sCSpXD+wMKaQ==} - engines: {node: '>=v18'} + '@commitlint/cli@21.2.3': + resolution: {integrity: sha512-5yOX6IRjcrIReCxpyAd04hgI/yhUMpVBJ/ouwFV0wk9yx5+fYRDWZWJ5h55Tbedgfol+5m2mU5nqzbB8g3v0vQ==} + engines: {node: '>=22.12.0'} hasBin: true - '@commitlint/config-conventional@20.5.0': - resolution: {integrity: sha512-t3Ni88rFw1XMa4nZHgOKJ8fIAT9M2j5TnKyTqJzsxea7FUetlNdYFus9dz+MhIRZmc16P0PPyEfh6X2d/qw8SA==} - engines: {node: '>=v18'} + '@commitlint/config-conventional@21.2.3': + resolution: {integrity: sha512-EP2n5DN2GwRWNVrLX0Jx3mpQlW5PfFi9HnD9OJ8hN/H0xFqpCFyHeGDhg+0P8/21iMMcdkcQgbNqmVklebqYsQ==} + engines: {node: '>=22.12.0'} - '@commitlint/config-validator@20.5.0': - resolution: {integrity: sha512-T/Uh6iJUzyx7j35GmHWdIiGRQB+ouZDk0pwAaYq4SXgB54KZhFdJ0vYmxiW6AMYICTIWuyMxDBl1jK74oFp/Gw==} - engines: {node: '>=v18'} + '@commitlint/config-validator@21.2.3': + resolution: {integrity: sha512-JQ13v0GafSM4fBYX8UowSy++07Was20auq0NcTdnzSEq6/05Cq5GBUMIfKkqjzyBwC9sJFmPpKWgLLhH7cygkw==} + engines: {node: '>=22.12.0'} - '@commitlint/ensure@20.5.0': - resolution: {integrity: sha512-IpHqAUesBeW1EDDdjzJeaOxU9tnogLAyXLRBn03SHlj1SGENn2JGZqSWGkFvBJkJzfXAuCNtsoYzax+ZPS+puw==} - engines: {node: '>=v18'} + '@commitlint/ensure@21.2.3': + resolution: {integrity: sha512-gEjNKgRocbODI5/sMx2Qc9XOf2/zFTNV2aEK1QZ4gKDKxDC/VR7us3QtIX1C5d5xxHxx0I/tEbYbdSP1Am2LwA==} + engines: {node: '>=22.12.0'} - '@commitlint/execute-rule@20.0.0': - resolution: {integrity: sha512-xyCoOShoPuPL44gVa+5EdZsBVao/pNzpQhkzq3RdtlFdKZtjWcLlUFQHSWBuhk5utKYykeJPSz2i8ABHQA+ZZw==} - engines: {node: '>=v18'} + '@commitlint/execute-rule@21.0.1': + resolution: {integrity: sha512-RifH+FmImozKBE6mozhF4K3r2RRKP7SMi/Q/zLCmExtp5e05lhHOUYqGBlFBAGNHaZxU/WYw1XuugYK9jQzqnA==} + engines: {node: '>=22.12.0'} - '@commitlint/format@20.5.0': - resolution: {integrity: sha512-TI9EwFU/qZWSK7a5qyXMpKPPv3qta7FO4tKW+Wt2al7sgMbLWTsAcDpX1cU8k16TRdsiiet9aOw0zpvRXNJu7Q==} - engines: {node: '>=v18'} + '@commitlint/format@21.2.3': + resolution: {integrity: sha512-KKwCjXYqA8r295uhLnulDXL9yekdXmj2yp2Q0XsBPhxQ2iPuvRE8F43j7g7yexo69wTdmUQmFz15jpderluzUQ==} + engines: {node: '>=22.12.0'} - '@commitlint/is-ignored@20.5.0': - resolution: {integrity: sha512-JWLarAsurHJhPozbuAH6GbP4p/hdOCoqS9zJMfqwswne+/GPs5V0+rrsfOkP68Y8PSLphwtFXV0EzJ+GTXTTGg==} - engines: {node: '>=v18'} + '@commitlint/is-ignored@21.2.3': + resolution: {integrity: sha512-Ng4nRj/LBAOvc+GQu7bsFW4/fL89LvZ14OOC/ERLbUpnG6QBwWRzY/1oXGwPs3C8YHWjJObin4kLYo2YeEn70w==} + engines: {node: '>=22.12.0'} - '@commitlint/lint@20.5.0': - resolution: {integrity: sha512-jiM3hNUdu04jFBf1VgPdjtIPvbuVfDTBAc6L98AWcoLjF5sYqkulBHBzlVWll4rMF1T5zeQFB6r//a+s+BBKlA==} - engines: {node: '>=v18'} + '@commitlint/lint@21.2.3': + resolution: {integrity: sha512-lUZcSuVLLEDkhge9ERk8Rp+FXQtrUhCK+h328BFnzKXrTuXGdqiYMEpTlNWdZaOrjyMhMJaz354ZaWEGJxcLeg==} + engines: {node: '>=22.12.0'} - '@commitlint/load@20.5.0': - resolution: {integrity: sha512-sLhhYTL/KxeOTZjjabKDhwidGZan84XKK1+XFkwDYL/4883kIajcz/dZFAhBJmZPtL8+nBx6bnkzA95YxPeDPw==} - engines: {node: '>=v18'} + '@commitlint/load@21.2.3': + resolution: {integrity: sha512-cDrL8lOo23Lk7knGzQdjbFcq7z2JgvjwV6PhbESVvEc+Fe21MeLjPKBJi8nKjg7j+jh79CVbVSUbZc104thXRw==} + engines: {node: '>=22.12.0'} - '@commitlint/message@20.4.3': - resolution: {integrity: sha512-6akwCYrzcrFcTYz9GyUaWlhisY4lmQ3KvrnabmhoeAV8nRH4dXJAh4+EUQ3uArtxxKQkvxJS78hNX2EU3USgxQ==} - engines: {node: '>=v18'} + '@commitlint/message@21.2.0': + resolution: {integrity: sha512-YxGoiXD/HXNXLJPrQwE5poXa+XH0CBEm+mdvbHQP0g6MV/dmJyUFCzPNzZbxL93GvZ70TmtTK0Z0/IBpAqHv8g==} + engines: {node: '>=22.12.0'} - '@commitlint/parse@20.5.0': - resolution: {integrity: sha512-SeKWHBMk7YOTnnEWUhx+d1a9vHsjjuo6Uo1xRfPNfeY4bdYFasCH1dDpAv13Lyn+dDPOels+jP6D2GRZqzc5fA==} - engines: {node: '>=v18'} + '@commitlint/parse@21.2.3': + resolution: {integrity: sha512-Jt61QpF1xA88damCELe8I0FlDZPSpXNc8IhN7z5kZ0EcDYPjdZ+ZHPvsSXl69r2MIlLnNKeHhOn2cmVpziFE9w==} + engines: {node: '>=22.12.0'} - '@commitlint/read@20.5.0': - resolution: {integrity: sha512-JDEIJ2+GnWpK8QqwfmW7O42h0aycJEWNqcdkJnyzLD11nf9dW2dWLTVEa8Wtlo4IZFGLPATjR5neA5QlOvIH1w==} - engines: {node: '>=v18'} + '@commitlint/read@21.2.3': + resolution: {integrity: sha512-szAepuLA1vTTr7fuudEg7jYyVHudf+FH+vptU91bhxE1WnE8TKrfTAi44HVllz8XpI8Pvp4GjR/iP5Nshgh+og==} + engines: {node: '>=22.12.0'} - '@commitlint/resolve-extends@20.5.0': - resolution: {integrity: sha512-3SHPWUW2v0tyspCTcfSsYml0gses92l6TlogwzvM2cbxDgmhSRc+fldDjvGkCXJrjSM87BBaWYTPWwwyASZRrg==} - engines: {node: '>=v18'} + '@commitlint/resolve-extends@21.2.3': + resolution: {integrity: sha512-bqJdmAtXgAQel+l02uIsF7rHgKgx1AGZdGBjam7uK4XW54ZAQtB6XAIUXezYprQiCcRMpBh4fHs5JodXK4mVZA==} + engines: {node: '>=22.12.0'} - '@commitlint/rules@20.5.0': - resolution: {integrity: sha512-5NdQXQEdnDPT5pK8O39ZA7HohzPRHEsDGU23cyVCNPQy4WegAbAwrQk3nIu7p2sl3dutPk8RZd91yKTrMTnRkQ==} - engines: {node: '>=v18'} + '@commitlint/rules@21.2.3': + resolution: {integrity: sha512-5+YnI/LuTx3JDl9GjqfP2z9x96M8KKDrd+4jOel/T0L1BB3oAmBlSN8xppf63QsudiVEgR8C0gRoAMrPVrms6g==} + engines: {node: '>=22.12.0'} - '@commitlint/to-lines@20.0.0': - resolution: {integrity: sha512-2l9gmwiCRqZNWgV+pX1X7z4yP0b3ex/86UmUFgoRt672Ez6cAM2lOQeHFRUTuE6sPpi8XBCGnd8Kh3bMoyHwJw==} - engines: {node: '>=v18'} + '@commitlint/to-lines@21.0.1': + resolution: {integrity: sha512-bd1BFII7p1EQZre9Kaj+kKaMFP3cFCdt21K7DItVux9XP5WjLgJ0/Uy1pJJh9aPwVJ6SKg62PxqlZaHI8hQAXw==} + engines: {node: '>=22.12.0'} - '@commitlint/top-level@20.4.3': - resolution: {integrity: sha512-qD9xfP6dFg5jQ3NMrOhG0/w5y3bBUsVGyJvXxdWEwBm8hyx4WOk3kKXw28T5czBYvyeCVJgJJ6aoJZUWDpaacQ==} - engines: {node: '>=v18'} + '@commitlint/top-level@21.2.0': + resolution: {integrity: sha512-Y5gmQ+KxzqCrBFJfLvFEPvvwD3LDiNZoTT2yeFBm96M8qhmqSzQc5DvX3rheAaAMjyIvMXOCLS/mWfdpONsjyQ==} + engines: {node: '>=22.12.0'} - '@commitlint/types@20.5.0': - resolution: {integrity: sha512-ZJoS8oSq2CAZEpc/YI9SulLrdiIyXeHb/OGqGrkUP6Q7YV+0ouNAa7GjqRdXeQPncHQIDz/jbCTlHScvYvO/gA==} - engines: {node: '>=v18'} + '@commitlint/types@21.2.3': + resolution: {integrity: sha512-sGEA473TlCvhCGNoTBY9OXZVWdscIXdGt0dm8EpB+2MRfmt8LNh/X56P/T3nCtEB+eH5qGEa3odphSAoUxSfSQ==} + engines: {node: '>=22.12.0'} - '@conventional-changelog/git-client@2.6.0': - resolution: {integrity: sha512-T+uPDciKf0/ioNNDpMGc8FDsehJClZP0yR3Q5MN6wE/Y/1QZ7F+80OgznnTCOlMEG4AV0LvH2UJi3C/nBnaBUg==} - engines: {node: '>=18'} + '@conventional-changelog/git-client@3.2.0': + resolution: {integrity: sha512-sD/E0vzpkoDz/dqM1Hhv0ihC4KBw6RXjefeO8SG1XrX+wGkMxe1pKeedkKDPCtr2JjuhbuS9aJNgOvnT8hbeBw==} + engines: {node: '>=22'} peerDependencies: - conventional-commits-filter: ^5.0.0 - conventional-commits-parser: ^6.3.0 + conventional-commits-filter: ^6.0.1 + conventional-commits-parser: ^7.1.3 peerDependenciesMeta: conventional-commits-filter: optional: true conventional-commits-parser: optional: true - '@esbuild/aix-ppc64@0.27.4': - resolution: {integrity: sha512-cQPwL2mp2nSmHHJlCyoXgHGhbEPMrEEU5xhkcy3Hs/O7nGZqEpZ2sUtLaL9MORLtDfRvVl2/3PAuEkYZH0Ty8Q==} + '@conventional-changelog/template@1.4.0': + resolution: {integrity: sha512-aalGyl7dbB5PArRebDIX43ZvBlXrYm9uWzGJ26t+4SzJVPsOuvfILGGbw5X4yX7i50YEmJ8zvbiWnqH/AAnZqg==} + engines: {node: '>=22'} + + '@esbuild/aix-ppc64@0.27.7': + resolution: {integrity: sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/aix-ppc64@0.28.2': + resolution: {integrity: sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.27.4': - resolution: {integrity: sha512-gdLscB7v75wRfu7QSm/zg6Rx29VLdy9eTr2t44sfTW7CxwAtQghZ4ZnqHk3/ogz7xao0QAgrkradbBzcqFPasw==} + '@esbuild/android-arm64@0.27.7': + resolution: {integrity: sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm64@0.28.2': + resolution: {integrity: sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.27.4': - resolution: {integrity: sha512-X9bUgvxiC8CHAGKYufLIHGXPJWnr0OCdR0anD2e21vdvgCI8lIfqFbnoeOz7lBjdrAGUhqLZLcQo6MLhTO2DKQ==} + '@esbuild/android-arm@0.27.7': + resolution: {integrity: sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.27.4': - resolution: {integrity: sha512-PzPFnBNVF292sfpfhiyiXCGSn9HZg5BcAz+ivBuSsl6Rk4ga1oEXAamhOXRFyMcjwr2DVtm40G65N3GLeH1Lvw==} + '@esbuild/android-arm@0.28.2': + resolution: {integrity: sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.27.7': + resolution: {integrity: sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/android-x64@0.28.2': + resolution: {integrity: sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.27.4': - resolution: {integrity: sha512-b7xaGIwdJlht8ZFCvMkpDN6uiSmnxxK56N2GDTMYPr2/gzvfdQN8rTfBsvVKmIVY/X7EM+/hJKEIbbHs9oA4tQ==} + '@esbuild/darwin-arm64@0.27.7': + resolution: {integrity: sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-arm64@0.28.2': + resolution: {integrity: sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.27.4': - resolution: {integrity: sha512-sR+OiKLwd15nmCdqpXMnuJ9W2kpy0KigzqScqHI3Hqwr7IXxBp3Yva+yJwoqh7rE8V77tdoheRYataNKL4QrPw==} + '@esbuild/darwin-x64@0.27.7': + resolution: {integrity: sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/darwin-x64@0.28.2': + resolution: {integrity: sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.27.4': - resolution: {integrity: sha512-jnfpKe+p79tCnm4GVav68A7tUFeKQwQyLgESwEAUzyxk/TJr4QdGog9sqWNcUbr/bZt/O/HXouspuQDd9JxFSw==} + '@esbuild/freebsd-arm64@0.27.7': + resolution: {integrity: sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-arm64@0.28.2': + resolution: {integrity: sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.27.4': - resolution: {integrity: sha512-2kb4ceA/CpfUrIcTUl1wrP/9ad9Atrp5J94Lq69w7UwOMolPIGrfLSvAKJp0RTvkPPyn6CIWrNy13kyLikZRZQ==} + '@esbuild/freebsd-x64@0.27.7': + resolution: {integrity: sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.28.2': + resolution: {integrity: sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.27.4': - resolution: {integrity: sha512-7nQOttdzVGth1iz57kxg9uCz57dxQLHWxopL6mYuYthohPKEK0vU0C3O21CcBK6KDlkYVcnDXY099HcCDXd9dA==} + '@esbuild/linux-arm64@0.27.7': + resolution: {integrity: sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm64@0.28.2': + resolution: {integrity: sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.27.4': - resolution: {integrity: sha512-aBYgcIxX/wd5n2ys0yESGeYMGF+pv6g0DhZr3G1ZG4jMfruU9Tl1i2Z+Wnj9/KjGz1lTLCcorqE2viePZqj4Eg==} + '@esbuild/linux-arm@0.27.7': + resolution: {integrity: sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-arm@0.28.2': + resolution: {integrity: sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.27.4': - resolution: {integrity: sha512-oPtixtAIzgvzYcKBQM/qZ3R+9TEUd1aNJQu0HhGyqtx6oS7qTpvjheIWBbes4+qu1bNlo2V4cbkISr8q6gRBFA==} + '@esbuild/linux-ia32@0.27.7': + resolution: {integrity: sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.27.4': - resolution: {integrity: sha512-8mL/vh8qeCoRcFH2nM8wm5uJP+ZcVYGGayMavi8GmRJjuI3g1v6Z7Ni0JJKAJW+m0EtUuARb6Lmp4hMjzCBWzA==} + '@esbuild/linux-ia32@0.28.2': + resolution: {integrity: sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.27.7': + resolution: {integrity: sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-loong64@0.28.2': + resolution: {integrity: sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.27.4': - resolution: {integrity: sha512-1RdrWFFiiLIW7LQq9Q2NES+HiD4NyT8Itj9AUeCl0IVCA459WnPhREKgwrpaIfTOe+/2rdntisegiPWn/r/aAw==} + '@esbuild/linux-mips64el@0.27.7': + resolution: {integrity: sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-mips64el@0.28.2': + resolution: {integrity: sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.27.4': - resolution: {integrity: sha512-tLCwNG47l3sd9lpfyx9LAGEGItCUeRCWeAx6x2Jmbav65nAwoPXfewtAdtbtit/pJFLUWOhpv0FpS6GQAmPrHA==} + '@esbuild/linux-ppc64@0.27.7': + resolution: {integrity: sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-ppc64@0.28.2': + resolution: {integrity: sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.27.4': - resolution: {integrity: sha512-BnASypppbUWyqjd1KIpU4AUBiIhVr6YlHx/cnPgqEkNoVOhHg+YiSVxM1RLfiy4t9cAulbRGTNCKOcqHrEQLIw==} + '@esbuild/linux-riscv64@0.27.7': + resolution: {integrity: sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-riscv64@0.28.2': + resolution: {integrity: sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.27.4': - resolution: {integrity: sha512-+eUqgb/Z7vxVLezG8bVB9SfBie89gMueS+I0xYh2tJdw3vqA/0ImZJ2ROeWwVJN59ihBeZ7Tu92dF/5dy5FttA==} + '@esbuild/linux-s390x@0.27.7': + resolution: {integrity: sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-s390x@0.28.2': + resolution: {integrity: sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.27.4': - resolution: {integrity: sha512-S5qOXrKV8BQEzJPVxAwnryi2+Iq5pB40gTEIT69BQONqR7JH1EPIcQ/Uiv9mCnn05jff9umq/5nqzxlqTOg9NA==} + '@esbuild/linux-x64@0.27.7': + resolution: {integrity: sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/linux-x64@0.28.2': + resolution: {integrity: sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.27.4': - resolution: {integrity: sha512-xHT8X4sb0GS8qTqiwzHqpY00C95DPAq7nAwX35Ie/s+LO9830hrMd3oX0ZMKLvy7vsonee73x0lmcdOVXFzd6Q==} + '@esbuild/netbsd-arm64@0.27.7': + resolution: {integrity: sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-arm64@0.28.2': + resolution: {integrity: sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-x64@0.27.4': - resolution: {integrity: sha512-RugOvOdXfdyi5Tyv40kgQnI0byv66BFgAqjdgtAKqHoZTbTF2QqfQrFwa7cHEORJf6X2ht+l9ABLMP0dnKYsgg==} + '@esbuild/netbsd-x64@0.27.7': + resolution: {integrity: sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.28.2': + resolution: {integrity: sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.27.4': - resolution: {integrity: sha512-2MyL3IAaTX+1/qP0O1SwskwcwCoOI4kV2IBX1xYnDDqthmq5ArrW94qSIKCAuRraMgPOmG0RDTA74mzYNQA9ow==} + '@esbuild/openbsd-arm64@0.27.7': + resolution: {integrity: sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-arm64@0.28.2': + resolution: {integrity: sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.27.4': - resolution: {integrity: sha512-u8fg/jQ5aQDfsnIV6+KwLOf1CmJnfu1ShpwqdwC0uA7ZPwFws55Ngc12vBdeUdnuWoQYx/SOQLGDcdlfXhYmXQ==} + '@esbuild/openbsd-x64@0.27.7': + resolution: {integrity: sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.28.2': + resolution: {integrity: sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/openharmony-arm64@0.27.4': - resolution: {integrity: sha512-JkTZrl6VbyO8lDQO3yv26nNr2RM2yZzNrNHEsj9bm6dOwwu9OYN28CjzZkH57bh4w0I2F7IodpQvUAEd1mbWXg==} + '@esbuild/openharmony-arm64@0.27.7': + resolution: {integrity: sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + + '@esbuild/openharmony-arm64@0.28.2': + resolution: {integrity: sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] - '@esbuild/sunos-x64@0.27.4': - resolution: {integrity: sha512-/gOzgaewZJfeJTlsWhvUEmUG4tWEY2Spp5M20INYRg2ZKl9QPO3QEEgPeRtLjEWSW8FilRNacPOg8R1uaYkA6g==} + '@esbuild/sunos-x64@0.27.7': + resolution: {integrity: sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/sunos-x64@0.28.2': + resolution: {integrity: sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.27.4': - resolution: {integrity: sha512-Z9SExBg2y32smoDQdf1HRwHRt6vAHLXcxD2uGgO/v2jK7Y718Ix4ndsbNMU/+1Qiem9OiOdaqitioZwxivhXYg==} + '@esbuild/win32-arm64@0.27.7': + resolution: {integrity: sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-arm64@0.28.2': + resolution: {integrity: sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.27.4': - resolution: {integrity: sha512-DAyGLS0Jz5G5iixEbMHi5KdiApqHBWMGzTtMiJ72ZOLhbu/bzxgAe8Ue8CTS3n3HbIUHQz/L51yMdGMeoxXNJw==} + '@esbuild/win32-ia32@0.27.7': + resolution: {integrity: sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-ia32@0.28.2': + resolution: {integrity: sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.27.4': - resolution: {integrity: sha512-+knoa0BDoeXgkNvvV1vvbZX4+hizelrkwmGJBdT17t8FNPwG2lKemmuMZlmaNQ3ws3DKKCxpb4zRZEIp3UxFCg==} + '@esbuild/win32-x64@0.27.7': + resolution: {integrity: sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==} engines: {node: '>=18'} cpu: [x64] os: [win32] - '@inquirer/ansi@2.0.4': - resolution: {integrity: sha512-DpcZrQObd7S0R/U3bFdkcT5ebRwbTTC4D3tCc1vsJizmgPLxNJBo+AAFmrZwe8zk30P2QzgzGWZ3Q9uJwWuhIg==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + '@esbuild/win32-x64@0.28.2': + resolution: {integrity: sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] - '@inquirer/checkbox@5.1.2': - resolution: {integrity: sha512-PubpMPO2nJgMufkoB3P2wwxNXEMUXnBIKi/ACzDUYfaoPuM7gSTmuxJeMscoLVEsR4qqrCMf5p0SiYGWnVJ8kw==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true + '@inquirer/ansi@2.0.9': + resolution: {integrity: sha512-0Ywt3S8tqM6TWUcsRlBFQ1x+X3/o8kktX0ZiKAnByYb9GFDknnOhse1PVtfiD2BXPI8ar+BWx9PV9R0lQIcygw==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} - '@inquirer/confirm@6.0.10': - resolution: {integrity: sha512-tiNyA73pgpQ0FQ7axqtoLUe4GDYjNCDcVsbgcA5anvwg2z6i+suEngLKKJrWKJolT//GFPZHwN30binDIHgSgQ==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + '@inquirer/checkbox@5.2.6': + resolution: {integrity: sha512-XkOardciF3tow2NUlY6/Qjk1QqYa+6WpmVLTpxXl97Uv4erczDEZ+xg1j6LqBf0ekcRSUiICQA4nQXHHkVKQ9w==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: '@types/node': optional: true - '@inquirer/core@11.1.7': - resolution: {integrity: sha512-1BiBNDk9btIwYIzNZpkikIHXWeNzNncJePPqwDyVMhXhD1ebqbpn1mKGctpoqAbzywZfdG0O4tvmsGIcOevAPQ==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + '@inquirer/confirm@6.3.3': + resolution: {integrity: sha512-ImOBgpl/sJTFp8naeSkNu4S0Sf8F8pxv3/CUx+LoBAdQvCVqFz6rSB2A/oZYsJge3+yphbEDxEkfaRNYq1OU0A==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: '@types/node': optional: true - '@inquirer/editor@5.0.10': - resolution: {integrity: sha512-VJx4XyaKea7t8hEApTw5dxeIyMtWXre2OiyJcICCRZI4hkoHsMoCnl/KbUnJJExLbH9csLLHMVR144ZhFE1CwA==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + '@inquirer/core@12.0.4': + resolution: {integrity: sha512-M5fB67y7jPObI45vhD82RskWwCSm0scOvenV/I6K8tIi2gfr9DXqQqJ+iw+Wi6SgapikdOiJibYzz1gW47fsDg==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: '@types/node': optional: true - '@inquirer/expand@5.0.10': - resolution: {integrity: sha512-fC0UHJPXsTRvY2fObiwuQYaAnHrp3aDqfwKUJSdfpgv18QUG054ezGbaRNStk/BKD5IPijeMKWej8VV8O5Q/eQ==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + '@inquirer/editor@5.3.4': + resolution: {integrity: sha512-imzxQDfw26NpcJAubMj/dE5RjU9Mp80IcT+FzsD6YoxXmL8L1QYnAFdCNv7ccGWh//73+0YP+1kfhwnExdl2VQ==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: '@types/node': optional: true - '@inquirer/external-editor@1.0.3': - resolution: {integrity: sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==} - engines: {node: '>=18'} + '@inquirer/expand@5.1.6': + resolution: {integrity: sha512-JfiLKi7qGuHmcQO/DqR10UFEp054Y1FXZaszP5ZEfHhgHeuFoT5nNFQIXFhed/5/p07SbsV2tIJFwG/dg5+NmQ==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: '@types/node': optional: true - '@inquirer/external-editor@2.0.4': - resolution: {integrity: sha512-Prenuv9C1PHj2Itx0BcAOVBTonz02Hc2Nd2DbU67PdGUaqn0nPCnV34oDyyoaZHnmfRxkpuhh/u51ThkrO+RdA==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + '@inquirer/external-editor@3.0.6': + resolution: {integrity: sha512-rWmw6WG8JZ7LMn/srXEylYGhL6EXXJeROE7/4x4GREh6NgzqJBDbIgpNGsYoLPfobeb4VZtEYzPGnT5EFNYhiQ==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: '@types/node': optional: true - '@inquirer/figures@2.0.4': - resolution: {integrity: sha512-eLBsjlS7rPS3WEhmOmh1znQ5IsQrxWzxWDxO51e4urv+iVrSnIHbq4zqJIOiyNdYLa+BVjwOtdetcQx1lWPpiQ==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + '@inquirer/figures@2.0.9': + resolution: {integrity: sha512-EAWgUTGQ/Umgga51dE3B2PUHbufuXarDfg86uVgoSgNHNNQnyFKcOrQLWVqYMghuSyHh8+2HUH0Js9cTC1WAdg==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} - '@inquirer/input@5.0.10': - resolution: {integrity: sha512-nvZ6qEVeX/zVtZ1dY2hTGDQpVGD3R7MYPLODPgKO8Y+RAqxkrP3i/3NwF3fZpLdaMiNuK0z2NaYIx9tPwiSegQ==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + '@inquirer/input@5.1.7': + resolution: {integrity: sha512-Icrs9tuMBCxGI+lFYNO71VFOnqGO8IIrLIGqnTGh07X8jZ2la9QLAYxXcikHZQjjVhIZUtU2xyH89DVN/pPhVg==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: '@types/node': optional: true - '@inquirer/number@4.0.10': - resolution: {integrity: sha512-Ht8OQstxiS3APMGjHV0aYAjRAysidWdwurWEo2i8yI5xbhOBWqizT0+MU1S2GCcuhIBg+3SgWVjEoXgfhY+XaA==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + '@inquirer/number@4.2.4': + resolution: {integrity: sha512-C6g80U4U2+w2Vxa1CB0MN3a2WnQIfzLSUG0lduO3Au9GsirJsKATZkOwZPK+vZ1BlAlz+/Z5ParfQCS9E0svmg==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: '@types/node': optional: true - '@inquirer/password@5.0.10': - resolution: {integrity: sha512-QbNyvIE8q2GTqKLYSsA8ATG+eETo+m31DSR0+AU7x3d2FhaTWzqQek80dj3JGTo743kQc6mhBR0erMjYw5jQ0A==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + '@inquirer/password@5.2.3': + resolution: {integrity: sha512-1Uo2qfI2K3wXbfunMpvwAzoZPIUf5iEETwDGqRVbswoorXGqYQJ/bfIJFeLj+pxjq+e2UFPNOmx+fsIl4Urigw==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: '@types/node': optional: true - '@inquirer/prompts@8.3.2': - resolution: {integrity: sha512-yFroiSj2iiBFlm59amdTvAcQFvWS6ph5oKESls/uqPBect7rTU2GbjyZO2DqxMGuIwVA8z0P4K6ViPcd/cp+0w==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + '@inquirer/prompts@8.7.3': + resolution: {integrity: sha512-DHK20kO+H5k/XcJQpHQUpVQbMYHHhZchlGWhZVMUV4WIuRuBW5744hipOtriE1vMqPLgnIyXFMHWKkIbTepa4Q==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: '@types/node': optional: true - '@inquirer/rawlist@5.2.6': - resolution: {integrity: sha512-jfw0MLJ5TilNsa9zlJ6nmRM0ZFVZhhTICt4/6CU2Dv1ndY7l3sqqo1gIYZyMMDw0LvE1u1nzJNisfHEhJIxq5w==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + '@inquirer/rawlist@5.3.6': + resolution: {integrity: sha512-2exExhQ5xTBqfN/rRlZkvM1Gm3b0eiLcWe2NqxWxe7qYmnU4M3j/n9TwzfPUb+Q7dAAz9TmBtDWWdF3jbp4ZLA==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: '@types/node': optional: true - '@inquirer/search@4.1.6': - resolution: {integrity: sha512-3/6kTRae98hhDevENScy7cdFEuURnSpM3JbBNg8yfXLw88HgTOl+neUuy/l9W0No5NzGsLVydhBzTIxZP7yChQ==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + '@inquirer/search@4.3.4': + resolution: {integrity: sha512-xsk0UeFP04jsbEeFMzghjUaH2aHXyt+WykSajQzq/8qyBNHsgGYHea/sFwv5T08kW7Sp+KDX8aF124zPUIs1Ww==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: '@types/node': optional: true - '@inquirer/select@5.1.2': - resolution: {integrity: sha512-kTK8YIkHV+f02y7bWCh7E0u2/11lul5WepVTclr3UMBtBr05PgcZNWfMa7FY57ihpQFQH/spLMHTcr0rXy50tA==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + '@inquirer/select@5.2.6': + resolution: {integrity: sha512-jFu7CFghlr0vpi/326a4wz6BGkJH9X3H/iIu+ahyV2Ja52ktqQE3fC9BYP47JKeSPQYGUv5xquE2Vp9PbepZ3g==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: '@types/node': optional: true - '@inquirer/type@4.0.4': - resolution: {integrity: sha512-PamArxO3cFJZoOzspzo6cxVlLeIftyBsZw/S9bKY5DzxqJVZgjoj1oP8d0rskKtp7sZxBycsoer1g6UeJV1BBA==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} + '@inquirer/type@4.2.0': + resolution: {integrity: sha512-2rnHX8RPo4glJYqnFc/v3nQeIhDcjyRRyaT7MGcfL/8xv/8K03SXYoA2tX06WVSKywWOE/ncbG3dtuzLjR5TCQ==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: @@ -514,17 +675,30 @@ packages: resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} engines: {node: '>=6.0.0'} - '@jridgewell/sourcemap-codec@1.5.5': - resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + '@jridgewell/sourcemap-codec@1.6.0': + resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} - '@manypkg/find-root@1.1.0': - resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} + '@manypkg/find-root@3.1.0': + resolution: {integrity: sha512-BcSqCyKhBVZ5YkSzOiheMCV41kqAFptW6xGqYSTjkVTl9XQpr+pqHhwgGCOHQtjDCv7Is6EFyA14Sm5GVbVABA==} + engines: {node: '>=20.0.0'} - '@manypkg/get-packages@1.1.3': - resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} + '@manypkg/get-packages@3.1.0': + resolution: {integrity: sha512-0TbBVyvPrP7xGYBI/cP8UP+yl/z+HtbTttAD7FMAJgn/kXOTwh5/60TsqP9ZYY710forNfyV0N8P/IE/ujGZJg==} + engines: {node: '>=20.0.0'} + + '@manypkg/tools@2.1.2': + resolution: {integrity: sha512-6QEf6yqFbETdwGITKq57aYoPfX/3K8XFNwsAlx0C1M7o8cb79sv1M3w+tWuWvIcSbNqrLF7OD7YpZMVVz335hQ==} + engines: {node: '>=20.0.0'} + + '@napi-rs/lzma-linux-x64-gnu@1.5.1': + resolution: {integrity: sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==} + engines: {node: ^22.20 || ^24.12 || >=25} + cpu: [x64] + os: [linux] + libc: [glibc] '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} @@ -538,436 +712,421 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@oxfmt/binding-android-arm-eabi@0.44.0': - resolution: {integrity: sha512-5UvghMd9SA/yvKTWCAxMAPXS1d2i054UeOf4iFjZjfayTwCINcC3oaSXjtbZfCaEpxgJod7XiOjTtby5yEv/BQ==} + '@oxfmt/binding-android-arm-eabi@0.72.0': + resolution: {integrity: sha512-u4U1uaDOVBuorGNC/07NLm48nECHOiJJka002YGML16Md2DRvf38RGBt01lH60EOGvNlFVmbLoksQedNBoZHKw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [android] - '@oxfmt/binding-android-arm64@0.44.0': - resolution: {integrity: sha512-IVudM1BWfvrYO++Khtzr8q9n5Rxu7msUvoFMqzGJVdX7HfUXUDHwaH2zHZNB58svx2J56pmCUzophyaPFkcG/A==} + '@oxfmt/binding-android-arm64@0.72.0': + resolution: {integrity: sha512-GCnM+Ae2mWOKC+92y3FOb6eZJeVnBAVz82e3lITUUg+kxukYKzBNAvJ/hhHIfa2A0md55SYYhdWPddSSy3KPVA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@oxfmt/binding-darwin-arm64@0.44.0': - resolution: {integrity: sha512-eWCLAIKAHfx88EqEP1Ga2yz7qVcqDU5lemn4xck+07bH182hDdprOHjbogyk0In1Djys3T0/pO2JepFnRJ41Mg==} + '@oxfmt/binding-darwin-arm64@0.72.0': + resolution: {integrity: sha512-LjQ8tlevdtwraFlWC6AnQ1Forzde0clRmnsP3QmK+ydSElDt/J+5Jc+m+//Ly1G97aP7WCNUw110QMIUw2K7xA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@oxfmt/binding-darwin-x64@0.44.0': - resolution: {integrity: sha512-eHTBznHLM49++dwz07MblQ2cOXyIgeedmE3Wgy4ptUESj38/qYZyRi1MPwC9olQJWssMeY6WI3UZ7YmU5ggvyQ==} + '@oxfmt/binding-darwin-x64@0.72.0': + resolution: {integrity: sha512-+ZbcxhB1C34RQR5IldSyY6Z/yalJIxHXhP36PGE4sEq0f/lgL5jCLmOKoDeVm8dqd9gFGDsd1bNWHSGCAwdSkw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@oxfmt/binding-freebsd-x64@0.44.0': - resolution: {integrity: sha512-jLMmbj0u0Ft43QpkUVr/0v1ZfQCGWAvU+WznEHcN3wZC/q6ox7XeSJtk9P36CCpiDSUf3sGnzbIuG1KdEMEDJQ==} + '@oxfmt/binding-freebsd-x64@0.72.0': + resolution: {integrity: sha512-yGPhA8sePEBFV9iGcprhyOk3Bz3fZshswMH3DpYIPZFLT1DG5LjiZ0j6AJQpSueaL6bUK0av1K+5+fe+ldy5EQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@oxfmt/binding-linux-arm-gnueabihf@0.44.0': - resolution: {integrity: sha512-n+A/u/ByK1qV8FVGOwyaSpw5NPNl0qlZfgTBqHeGIqr8Qzq1tyWZ4lAaxPoe5mZqE3w88vn3+jZtMxriHPE7tg==} + '@oxfmt/binding-linux-arm-gnueabihf@0.72.0': + resolution: {integrity: sha512-/g5axuqFMcAtoQrFLR5EJEMDjR5Ea4GuzpdDmMpPWAgrF1DmL4kD1NPNVlpXEOxpFJnD6lPvLKYj1lzdlrfifA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxfmt/binding-linux-arm-musleabihf@0.44.0': - resolution: {integrity: sha512-5eax+FkxyCqAi3Rw0mrZFr7+KTt/XweFsbALR+B5ljWBLBl8nHe4ADrUnb1gLEfQCJLl+Ca5FIVD4xEt95AwIw==} + '@oxfmt/binding-linux-arm-musleabihf@0.72.0': + resolution: {integrity: sha512-InVitdHbS09PM+w+WinIiyX37rC9R3L7lUP9mKy9uKTEDSUFaLjWsLoreRIxKivnv7Ndqc6Trvi+K+b6ZzhiJg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxfmt/binding-linux-arm64-gnu@0.44.0': - resolution: {integrity: sha512-58l8JaHxSGOmOMOG2CIrNsnkRJAj0YcHQCmvNACniOa/vd1iRHhlPajczegzS5jwMENlqgreyiTR9iNlke8qCw==} + '@oxfmt/binding-linux-arm64-gnu@0.72.0': + resolution: {integrity: sha512-WKjlyRAxpPjXoqeuwFBim5LscgvY+RNEiZ971C9JlRQZONhJTsXDki/oHFYQE+fzzRpzXh3owZvOdT3kNL2g+g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-arm64-musl@0.44.0': - resolution: {integrity: sha512-AlObQIXyVRZ96LbtVljtFq0JqH5B92NU+BQeDFrXWBUWlCKAM0wF5GLfIhCLT5kQ3Sl+U0YjRJ7Alqj5hGQaCg==} + '@oxfmt/binding-linux-arm64-musl@0.72.0': + resolution: {integrity: sha512-poafnbsPpJhR+5Mbwpf8CscugTyiRAzjTOxRVn8ra3X2jnURs2xL5Du2xl5g2iW85lICMglpmLf8jDjZEbNgzQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] - '@oxfmt/binding-linux-ppc64-gnu@0.44.0': - resolution: {integrity: sha512-YcFE8/q/BbrCiIiM5piwbkA6GwJc5QqhMQp2yDrqQ2fuVkZ7CInb1aIijZ/k8EXc72qXMSwKpVlBv1w/MsGO/A==} + '@oxfmt/binding-linux-ppc64-gnu@0.72.0': + resolution: {integrity: sha512-zNUi0gKRsO7S3IfPzsTbnm88OedPuX32hmZFWZRWHvWJlAoZRwVbeO6Nb3hng4vDgL7qUKp4TGqzPz1mhsycYg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-riscv64-gnu@0.44.0': - resolution: {integrity: sha512-eOdzs6RqkRzuqNHUX5C8ISN5xfGh4xDww8OEd9YAmc3OWN8oAe5bmlIqQ+rrHLpv58/0BuU48bxkhnIGjA/ATQ==} + '@oxfmt/binding-linux-riscv64-gnu@0.72.0': + resolution: {integrity: sha512-qTY7z/iyF/rWI2HWwWMevXqZW5PZUOofUy2afK7v6rseXnpld3yjgyIk6pCux3DqWQ0lB+f5atvLJNBwzLvFsw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-riscv64-musl@0.44.0': - resolution: {integrity: sha512-YBgNTxntD/QvlFUfgvh8bEdwOhXiquX8gaofZJAwYa/Xp1S1DQrFVZEeck7GFktr24DztsSp8N8WtWCBwxs0Hw==} + '@oxfmt/binding-linux-riscv64-musl@0.72.0': + resolution: {integrity: sha512-w18qfo8vEMD6EKEHtzTvjc6jH8yCyXIT1Bn7PFWJd0PpZyzH/VQDx4xvjCh0LGz6GRzqiezbisTdG9AoXtpkZQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [musl] - '@oxfmt/binding-linux-s390x-gnu@0.44.0': - resolution: {integrity: sha512-GLIh1R6WHWshl/i4QQDNgj0WtT25aRO4HNUWEoitxiywyRdhTFmFEYT2rXlcl9U6/26vhmOqG5cRlMLG3ocaIA==} + '@oxfmt/binding-linux-s390x-gnu@0.72.0': + resolution: {integrity: sha512-grW8HwEir+vK7fCcq1ZgL3NHQCfZ1PidiERE9Hbf+24xGys+DoDaoqTht4ccfn0PcBwbViLkwkda/KNpJu2KRQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-x64-gnu@0.44.0': - resolution: {integrity: sha512-gZOpgTlOsLcLfAF9qgpTr7FIIFSKnQN3hDf/0JvQ4CIwMY7h+eilNjxq/CorqvYcEOu+LRt1W4ZS7KccEHLOdA==} + '@oxfmt/binding-linux-x64-gnu@0.72.0': + resolution: {integrity: sha512-wQJRQfWBRIn88Pkr449EUViwRayrYUScg7ty+Ihiem21mQ9BUA6S9e/4RAgyNk9lMag0KBouyKskjq61rOC0WQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-x64-musl@0.44.0': - resolution: {integrity: sha512-1CyS9JTB+pCUFYFI6pkQGGZaT/AY5gnhHVrQQLhFba6idP9AzVYm1xbdWfywoldTYvjxQJV6x4SuduCIfP3W+A==} + '@oxfmt/binding-linux-x64-musl@0.72.0': + resolution: {integrity: sha512-T1B0uQzafxuGPjjaPrZJ497nxoi1BiI65JfsYc56nNpmev3msfb/iaTmH2kQuNFqa8PKxpMlf3GhWrWBvBPORQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] - '@oxfmt/binding-openharmony-arm64@0.44.0': - resolution: {integrity: sha512-bmEv70Ak6jLr1xotCbF5TxIKjsmQaiX+jFRtnGtfA03tJPf6VG3cKh96S21boAt3JZc+Vjx8PYcDuLj39vM2Pw==} + '@oxfmt/binding-openharmony-arm64@0.72.0': + resolution: {integrity: sha512-OKxxgTurl7+hypVplO8QRAbbQlwEs0j1Y6FZv+ZN2qNbdxQk2muMlzuJNBGTCWwxQ0rkkOD1uK/DW1fvzoUSJA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@oxfmt/binding-win32-arm64-msvc@0.44.0': - resolution: {integrity: sha512-yWzB+oCpSnP/dmw85eFLAT5o35Ve5pkGS2uF/UCISpIwDqf1xa7OpmtomiqY/Vzg8VyvMbuf6vroF2khF/+1Vg==} + '@oxfmt/binding-win32-arm64-msvc@0.72.0': + resolution: {integrity: sha512-L78TKzURqvjuZOCo88ixMbPXf/RP7u31Y0cmjJ/KEmrHmfYhmhEvsDaTYPiyTRne64jUgCbADfY0YeoQk4/Xyw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@oxfmt/binding-win32-ia32-msvc@0.44.0': - resolution: {integrity: sha512-TcWpo18xEIE3AmIG2kpr3kz5IEhQgnx0lazl2+8L+3eTopOAUevQcmlr4nhguImNWz0OMeOZrYZOhJNCf16nlQ==} + '@oxfmt/binding-win32-ia32-msvc@0.72.0': + resolution: {integrity: sha512-gQtFW+Ii8BWgtJTAD17TY/WsdNS5gUfAPov8iI1jeq4r9lRRYImmxPL08UU00/RLaCfBJwh2UgINnDY0iOiZ+A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ia32] os: [win32] - '@oxfmt/binding-win32-x64-msvc@0.44.0': - resolution: {integrity: sha512-oj8aLkPJZppIM4CMQNsyir9ybM1Xw/CfGPTSsTnzpVGyljgfbdP0EVUlURiGM0BDrmw5psQ6ArmGCcUY/yABaQ==} + '@oxfmt/binding-win32-x64-msvc@0.72.0': + resolution: {integrity: sha512-uhooIN+DCzWX5uH7mQkSVCsODqsGluGJ4n3ch4+mITtWKpESMDjUJUSDBAVFuYQDwqY2McPDKdKJbM0oZVW/Qw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@oxlint/binding-android-arm-eabi@1.59.0': - resolution: {integrity: sha512-etYDw/UaEv936AQUd/CRMBVd+e+XuuU6wC+VzOv1STvsTyZenLChepLWqLtnyTTp4YMlM22ypzogDDwqYxv5cg==} + '@oxlint/binding-android-arm-eabi@1.87.0': + resolution: {integrity: sha512-22tVIHlB9898OYsBKmYB6He1MCSqdTmK1BVWuSNUTVrpS0KWNege+U9uEYqGJ+KatQag0r/oU44i3OOs46z7HQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [android] - '@oxlint/binding-android-arm64@1.59.0': - resolution: {integrity: sha512-TgLc7XVLKH2a4h8j3vn1MDjfK33i9MY60f/bKhRGWyVzbk5LCZ4X01VZG7iHrMmi5vYbAp8//Ponigx03CLsdw==} + '@oxlint/binding-android-arm64@1.87.0': + resolution: {integrity: sha512-JfZQ3MWf74n8ov0DojZpkOduIubYJvZL5tbTMMhDutsal6u1xH1QuNpN+lK+EQwF8AeAfgwTR2fgh5U2br27XA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@oxlint/binding-darwin-arm64@1.59.0': - resolution: {integrity: sha512-DXyFPf5ZKldMLloRHx/B9fsxsiTQomaw7cmEW3YIJko2HgCh+GUhp9gGYwHrqlLJPsEe3dYj9JebjX92D3j3AA==} + '@oxlint/binding-darwin-arm64@1.87.0': + resolution: {integrity: sha512-rkx6Xvvw93z2GImVOyvbZwAZcoY0Z6MJW177XNsSB+i/CBsH7ANyelTp01VZyIkM3iSXtqKVb4+ptBgPHap5pQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@oxlint/binding-darwin-x64@1.59.0': - resolution: {integrity: sha512-LgvrsdgVLX1qWqIEmNsSmMXJhpAWdtUQ0M+oR0CySwi+9IHWyOGuIL8w8+u/kbZNMyZr4WUyYB5i0+D+AKgkLg==} + '@oxlint/binding-darwin-x64@1.87.0': + resolution: {integrity: sha512-cw5nYw7L/pQ2SgGBgOcg/Qo89llQre3vIc/kuBLhSICzu1r5s8L76H3ug6AIFsD98WpROj8/z5JVzkf4daxHaQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@oxlint/binding-freebsd-x64@1.59.0': - resolution: {integrity: sha512-bOJhqX/ny4hrFuTPlyk8foSRx/vLRpxJh0jOOKN2NWW6FScXHPAA5rQbrwdQPcgGB5V8Ua51RS03fke8ssBcug==} + '@oxlint/binding-freebsd-x64@1.87.0': + resolution: {integrity: sha512-x/SuznE6loRZK9gz9AS4ZmzNzSu+5KdeoCS+sVHhnrE8HM6AD8UyTjwldQTTqlXGvkwHASgB0NiTNOc3o3PdAg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@oxlint/binding-linux-arm-gnueabihf@1.59.0': - resolution: {integrity: sha512-vVUXxYMF9trXCsz4m9H6U0IjehosVHxBzVgJUxly1uz4W1PdDyicaBnpC0KRXsHYretLVe+uS9pJy8iM57Kujw==} + '@oxlint/binding-linux-arm-gnueabihf@1.87.0': + resolution: {integrity: sha512-+JEDmCAXiiFmKhAjZhgAOwaHWY6WENOQ5QA+lFuY59tgsUCDOTRi46B+lENK6CWvtxsXpwkZXNOgpjAQcpIpnA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxlint/binding-linux-arm-musleabihf@1.59.0': - resolution: {integrity: sha512-TULQW8YBPGRWg5yZpFPL54HLOnJ3/HiX6VenDPi6YfxB/jlItwSMFh3/hCeSNbh+DAMaE1Py0j5MOaivHkI/9Q==} + '@oxlint/binding-linux-arm-musleabihf@1.87.0': + resolution: {integrity: sha512-/uC9XqXLAC9AHFLNycwmSQEvKqGrOCgU+uXALI7gNW0DG81TJ/3T2eHnKdRvcb5R1gFEfjxDwI4e4zIa29rICQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxlint/binding-linux-arm64-gnu@1.59.0': - resolution: {integrity: sha512-Gt54Y4eqSgYJ90xipm24xeyaPV854706o/kiT8oZvUt3VDY7qqxdqyGqchMaujd87ib+/MXvnl9WkK8Cc1BExg==} + '@oxlint/binding-linux-arm64-gnu@1.87.0': + resolution: {integrity: sha512-FTRYPsBy/M728vnUv7l+KAwSAa3Qi4BQbhVvy7NYuMTZ0sUa/OWsbMx79HVFw6u/5KWcaYayDsoOiv7xbevzDg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] - '@oxlint/binding-linux-arm64-musl@1.59.0': - resolution: {integrity: sha512-3CtsKp7NFB3OfqQzbuAecrY7GIZeiv7AD+xutU4tefVQzlfmTI7/ygWLrvkzsDEjTlMq41rYHxgsn6Yh8tybmA==} + '@oxlint/binding-linux-arm64-musl@1.87.0': + resolution: {integrity: sha512-6sC+N7IY0h1egd8SrYUGNN7CUyKJZ4bIZakKa7V7hfinf4jfi8Kq4+klJvFp5DqXcwMn44I5MeBwmJluO1odFg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] - '@oxlint/binding-linux-ppc64-gnu@1.59.0': - resolution: {integrity: sha512-K0diOpT3ncDmOfl9I1HuvpEsAuTxkts0VYwIv/w6Xiy9CdwyPBVX88Ga9l8VlGgMrwBMnSY4xIvVlVY/fkQk7Q==} + '@oxlint/binding-linux-ppc64-gnu@1.87.0': + resolution: {integrity: sha512-d5Mnn+ICbhoJPi37Ccjy+86T5qfH2+mSTrTMBXNPfB+wqSWOayBBLLIrCXdUy1YssluCVdGkl+DO9w5r5ODmUA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] libc: [glibc] - '@oxlint/binding-linux-riscv64-gnu@1.59.0': - resolution: {integrity: sha512-xAU7+QDU6kTJJ7mJLOGgo7oOjtAtkKyFZ0Yjdb5cEo3DiCCPFLvyr08rWiQh6evZ7RiUTf+o65NY/bqttzJiQQ==} + '@oxlint/binding-linux-riscv64-gnu@1.87.0': + resolution: {integrity: sha512-sf5YWuUo1Dx9loqWCgF8P278MycfcD4JHjDC/LV5j11L3Lqa4PFiwCjD6B8kP4AjsgZZkLn3xbpJEtZBaccs4Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [glibc] - '@oxlint/binding-linux-riscv64-musl@1.59.0': - resolution: {integrity: sha512-KUmZmKlTTyauOnvUNVxK7G40sSSx0+w5l1UhaGsC6KPpOYHenx2oqJTnabmpLJicok7IC+3Y6fXAUOMyexaeJQ==} + '@oxlint/binding-linux-riscv64-musl@1.87.0': + resolution: {integrity: sha512-+aCraYbmK3uU3P0rFojjeaK9pGY6JvBDXh/0CM+gPyWKmNmXmnFe0qj4qj02U4ibFpbd9Pa9CmDvIdjJUd29rA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [musl] - '@oxlint/binding-linux-s390x-gnu@1.59.0': - resolution: {integrity: sha512-4usRxC8gS0PGdkHnRmwJt/4zrQNZyk6vL0trCxwZSsAKM+OxhB8nKiR+mhjdBbl8lbMh2gc3bZpNN/ik8c4c2A==} + '@oxlint/binding-linux-s390x-gnu@1.87.0': + resolution: {integrity: sha512-7rzbZQIljo6VLWVPqUyLa2P/WV3VFsJB4M52R4NCUJn1A50yjtUsHxiMHFL9opEKGFIiTbZ3VQzmtcJOPUq4NQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] libc: [glibc] - '@oxlint/binding-linux-x64-gnu@1.59.0': - resolution: {integrity: sha512-s/rNE2gDmbwAOOP493xk2X7M8LZfI1LJFSSW1+yanz3vuQCFPiHkx4GY+O1HuLUDtkzGlhtMrIcxxzyYLv308w==} + '@oxlint/binding-linux-x64-gnu@1.87.0': + resolution: {integrity: sha512-Dry46Fa+AXE/xt9J/YriujU1pU9mzfNWHGQwtOYibAFH8HLrKWCi93AhIGnuUMiwn2JbuBkRyz51f50Ly4r4ow==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] - '@oxlint/binding-linux-x64-musl@1.59.0': - resolution: {integrity: sha512-+yYj1udJa2UvvIUmEm0IcKgc0UlPMgz0nsSTvkPL2y6n0uU5LgIHSwVu4AHhrve6j9BpVSoRksnz8c9QcvITJA==} + '@oxlint/binding-linux-x64-musl@1.87.0': + resolution: {integrity: sha512-f/HMZez74gJvnRpGz+b5sdGyWrEgRLmFTXg9sNoqjPWogGxYHUhXKTKyMiYsu9rUGR2ciYqL3fk+Ua4JhMJbRA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] - '@oxlint/binding-openharmony-arm64@1.59.0': - resolution: {integrity: sha512-bUplUb48LYsB3hHlQXP2ZMOenpieWoOyppLAnnAhuPag3MGPnt+7caxE3w/Vl9wpQsTA3gzLntQi9rxWrs7Xqg==} + '@oxlint/binding-openharmony-arm64@1.87.0': + resolution: {integrity: sha512-lEC6ZfPZm/07JlB7FsOWX9o1RiHlXiBW594LSUGuXmekC8LZmvUPP9XzE2WZcNxJi5cHA/Fw56o02c3JxgMA5g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@oxlint/binding-win32-arm64-msvc@1.59.0': - resolution: {integrity: sha512-/HLsLuz42rWl7h7ePdmMTpHm2HIDmPtcEMYgm5BBEHiEiuNOrzMaUpd2z7UnNni5LGN9obJy2YoAYBLXQwazrA==} + '@oxlint/binding-win32-arm64-msvc@1.87.0': + resolution: {integrity: sha512-afBWKOD36dUiA9AenaiWpCg8xfyUVPYznyAAVXu413brK4RA5UI/Xoc4yfeGIT8G1a44MV+JR7hioryerBDzGQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@oxlint/binding-win32-ia32-msvc@1.59.0': - resolution: {integrity: sha512-rUPy+JnanpPwV/aJCPnxAD1fW50+XPI0VkWr7f0vEbqcdsS8NpB24Rw6RsS7SdpFv8Dw+8ugCwao5nCFbqOUSg==} + '@oxlint/binding-win32-ia32-msvc@1.87.0': + resolution: {integrity: sha512-daptNsEOuru4/nJTxV4DBHNJ5GepzmaBVQf+jjgKQGi9NRlZKik+RFq4hUL7ewsF1pwjKM+SkYaMbF82UwFGnw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ia32] os: [win32] - '@oxlint/binding-win32-x64-msvc@1.59.0': - resolution: {integrity: sha512-xkE7puteDS/vUyRngLXW0t8WgdWoS/tfxXjhP/P7SMqPDx+hs44SpssO3h3qmTqECYEuXBUPzcAw5257Ka+ofA==} + '@oxlint/binding-win32-x64-msvc@1.87.0': + resolution: {integrity: sha512-k+m/EShyXE29J/r1fjk0HlAzhN5JhIvj044oSJkXTEkCLrWZQgXb/3r4q5LTw/eaKW/4GuMXG2xmiJs3s5rPNw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@rollup/rollup-android-arm-eabi@4.60.1': - resolution: {integrity: sha512-d6FinEBLdIiK+1uACUttJKfgZREXrF0Qc2SmLII7W2AD8FfiZ9Wjd+rD/iRuf5s5dWrr1GgwXCvPqOuDquOowA==} + '@pnpm/deps.graph-sequencer@1100.0.1': + resolution: {integrity: sha512-pOr5+q1fLYKwFN3LAJuGZEnfXDcQ73zqgDHMtGy+K+uIoUqyY+6MeDCWFwfu+4EFuq76I5EPFofoNAI+Bmmq4A==} + engines: {node: '>=22.13'} + + '@rollup/rollup-android-arm-eabi@4.64.3': + resolution: {integrity: sha512-a31GFbL70GlGUGhn8goVjRLtdDG1urLCJFWLZ7JcxdHK9pPvCohLFtYLgJDdNbtrNZSrJl1u9bK05ISsSC2EpA==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.60.1': - resolution: {integrity: sha512-YjG/EwIDvvYI1YvYbHvDz/BYHtkY4ygUIXHnTdLhG+hKIQFBiosfWiACWortsKPKU/+dUwQQCKQM3qrDe8c9BA==} + '@rollup/rollup-android-arm64@4.64.3': + resolution: {integrity: sha512-IRv757RLiPGlNxAX5JXU0eiUlUPvKiwFRbkqLd+gywptLK4uSEg1qkl6en6r0cXMazSnWUWOBABv+QfuLV3n5Q==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.60.1': - resolution: {integrity: sha512-mjCpF7GmkRtSJwon+Rq1N8+pI+8l7w5g9Z3vWj4T7abguC4Czwi3Yu/pFaLvA3TTeMVjnu3ctigusqWUfjZzvw==} + '@rollup/rollup-darwin-arm64@4.64.3': + resolution: {integrity: sha512-UkzI35Fnz6+MJNATdnjnZ3TpdG/rXab8h7oDOD9R0zDVIFmuuYrvgUj8V8mh+A//+LR4TlEQo4ZW4RhyRtWv3A==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.60.1': - resolution: {integrity: sha512-haZ7hJ1JT4e9hqkoT9R/19XW2QKqjfJVv+i5AGg57S+nLk9lQnJ1F/eZloRO3o9Scy9CM3wQ9l+dkXtcBgN5Ew==} + '@rollup/rollup-darwin-x64@4.64.3': + resolution: {integrity: sha512-C3AyMtAnKQ/jSkZ0chIoWbPXRbFz8JnPLhl1ULecEhcaOGkT19xt7KmO8BulQxt9S/XideHRXvsVQUbGj4JCOg==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.60.1': - resolution: {integrity: sha512-czw90wpQq3ZsAVBlinZjAYTKduOjTywlG7fEeWKUA7oCmpA8xdTkxZZlwNJKWqILlq0wehoZcJYfBvOyhPTQ6w==} + '@rollup/rollup-freebsd-arm64@4.64.3': + resolution: {integrity: sha512-M8yAdBMyHh14JLeXDNGvEkljzuHdcoLBQ399O4Fp4nvX51lueuEY/5U2G9Ci0D6/bQlBp/3JLiBQH55STwwbwg==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.60.1': - resolution: {integrity: sha512-KVB2rqsxTHuBtfOeySEyzEOB7ltlB/ux38iu2rBQzkjbwRVlkhAGIEDiiYnO2kFOkJp+Z7pUXKyrRRFuFUKt+g==} + '@rollup/rollup-freebsd-x64@4.64.3': + resolution: {integrity: sha512-WQjuOKGh2FN98ZK6i0uM6M6YqnPEds85p3oRkrxiEeTQo/p7RpuU8c9MwQ88LfgwVAzohumlzbQQSikz4Zw9rw==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.60.1': - resolution: {integrity: sha512-L+34Qqil+v5uC0zEubW7uByo78WOCIrBvci69E7sFASRl0X7b/MB6Cqd1lky/CtcSVTydWa2WZwFuWexjS5o6g==} + '@rollup/rollup-linux-arm-gnueabihf@4.64.3': + resolution: {integrity: sha512-5tDLZG5s9WyVKoEHgwos6FpKrgpotl61EYeHSLSVkQzMzTsaClwEr8mok9rm3y734zjiGInG4dfw/56ebWVvEQ==} cpu: [arm] os: [linux] libc: [glibc] - '@rollup/rollup-linux-arm-musleabihf@4.60.1': - resolution: {integrity: sha512-n83O8rt4v34hgFzlkb1ycniJh7IR5RCIqt6mz1VRJD6pmhRi0CXdmfnLu9dIUS6buzh60IvACM842Ffb3xd6Gg==} + '@rollup/rollup-linux-arm-musleabihf@4.64.3': + resolution: {integrity: sha512-Mh5KbLeplM2HX6lQI18jsxSsqvPW8d+Hyk8HtY6Zl93woMitRSCZ92rBEzq6v8bfZGlpyMgj4P/sKW4KCjhH3A==} cpu: [arm] os: [linux] libc: [musl] - '@rollup/rollup-linux-arm64-gnu@4.60.1': - resolution: {integrity: sha512-Nql7sTeAzhTAja3QXeAI48+/+GjBJ+QmAH13snn0AJSNL50JsDqotyudHyMbO2RbJkskbMbFJfIJKWA6R1LCJQ==} + '@rollup/rollup-linux-arm64-gnu@4.64.3': + resolution: {integrity: sha512-QZrrwHnznTv6y4iiHtCqDN+ZsF4qNFQObMOLgPrbxhh9O5o4rgoUe5OnkqG/ceCObMrAjhQt+eQ6HSDzBFgVMw==} cpu: [arm64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-arm64-musl@4.60.1': - resolution: {integrity: sha512-+pUymDhd0ys9GcKZPPWlFiZ67sTWV5UU6zOJat02M1+PiuSGDziyRuI/pPue3hoUwm2uGfxdL+trT6Z9rxnlMA==} + '@rollup/rollup-linux-arm64-musl@4.64.3': + resolution: {integrity: sha512-4vLehpXSwlkltnvk5ETB+Hz+d3xayZS3NamZ5Vq4bSo+IUoIALovEJF1YgWPMjHwN7R5o/R4BpP9h3q8EK1xAA==} cpu: [arm64] os: [linux] libc: [musl] - '@rollup/rollup-linux-loong64-gnu@4.60.1': - resolution: {integrity: sha512-VSvgvQeIcsEvY4bKDHEDWcpW4Yw7BtlKG1GUT4FzBUlEKQK0rWHYBqQt6Fm2taXS+1bXvJT6kICu5ZwqKCnvlQ==} + '@rollup/rollup-linux-loong64-gnu@4.64.3': + resolution: {integrity: sha512-SEN7TTTOdXJKZmsWKOnQeVfgy3Dje/08ISXWwFhTggQ3SxjuIaChvmOB5ZDZqJNlBjaXrV6nAHraqEAvdLGqcw==} cpu: [loong64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-loong64-musl@4.60.1': - resolution: {integrity: sha512-4LqhUomJqwe641gsPp6xLfhqWMbQV04KtPp7/dIp0nzPxAkNY1AbwL5W0MQpcalLYk07vaW9Kp1PBhdpZYYcEw==} + '@rollup/rollup-linux-loong64-musl@4.64.3': + resolution: {integrity: sha512-1LDsQMRMCEdGF9Dih5qyh6fF1LK3NnA+pAtE2+9AgZwUdXyd19TOBVC9crSB63iZBHR4vOG7h8gN/LcUH3J7xw==} cpu: [loong64] os: [linux] libc: [musl] - '@rollup/rollup-linux-ppc64-gnu@4.60.1': - resolution: {integrity: sha512-tLQQ9aPvkBxOc/EUT6j3pyeMD6Hb8QF2BTBnCQWP/uu1lhc9AIrIjKnLYMEroIz/JvtGYgI9dF3AxHZNaEH0rw==} + '@rollup/rollup-linux-ppc64-gnu@4.64.3': + resolution: {integrity: sha512-v3D2tAfRriqGOi+5Ac5CiYbBo2NXtLVxJlludTvUZRj502lVMFeVIuvvWbz4qCrotn3e3Uvpvh7FcMpG2QxxXQ==} cpu: [ppc64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-ppc64-musl@4.60.1': - resolution: {integrity: sha512-RMxFhJwc9fSXP6PqmAz4cbv3kAyvD1etJFjTx4ONqFP9DkTkXsAMU4v3Vyc5BgzC+anz7nS/9tp4obsKfqkDHg==} + '@rollup/rollup-linux-ppc64-musl@4.64.3': + resolution: {integrity: sha512-db5q6dP189V2+JkMpsXBl8ym6bC0x8ydZ47fUJZ9YdM6T2OF5uqNzX9HaAZHRP/lqjA9bJeNwi0qw1/2/37dUA==} cpu: [ppc64] os: [linux] libc: [musl] - '@rollup/rollup-linux-riscv64-gnu@4.60.1': - resolution: {integrity: sha512-QKgFl+Yc1eEk6MmOBfRHYF6lTxiiiV3/z/BRrbSiW2I7AFTXoBFvdMEyglohPj//2mZS4hDOqeB0H1ACh3sBbg==} + '@rollup/rollup-linux-riscv64-gnu@4.64.3': + resolution: {integrity: sha512-nArAVDmrL5ix9UoipcKEsYJw4kMUQCIPYRWuYF2POOC7jd9rmN95d/48ewsYFC/OdtwEx6VYYWYxrp8FbMOU2Q==} cpu: [riscv64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-riscv64-musl@4.60.1': - resolution: {integrity: sha512-RAjXjP/8c6ZtzatZcA1RaQr6O1TRhzC+adn8YZDnChliZHviqIjmvFwHcxi4JKPSDAt6Uhf/7vqcBzQJy0PDJg==} + '@rollup/rollup-linux-riscv64-musl@4.64.3': + resolution: {integrity: sha512-2dc7LElu7EVSvpQT8epNnBLa02wlqilNYqHN0FA/RaKqCr9U9ZFYQ0Eh4sfgSzLneLDuJsJRjcezR/l2UyYGXA==} cpu: [riscv64] os: [linux] libc: [musl] - '@rollup/rollup-linux-s390x-gnu@4.60.1': - resolution: {integrity: sha512-wcuocpaOlaL1COBYiA89O6yfjlp3RwKDeTIA0hM7OpmhR1Bjo9j31G1uQVpDlTvwxGn2nQs65fBFL5UFd76FcQ==} + '@rollup/rollup-linux-s390x-gnu@4.64.3': + resolution: {integrity: sha512-9PYq2IEzSwXcvQLERcT9LKXRzw8J05GFTbJHA2anJR2WmlRjA1esgXVYhanp+bmjKsDVoZeU2L7Z2pRClLcZTw==} cpu: [s390x] os: [linux] libc: [glibc] - '@rollup/rollup-linux-x64-gnu@4.60.1': - resolution: {integrity: sha512-77PpsFQUCOiZR9+LQEFg9GClyfkNXj1MP6wRnzYs0EeWbPcHs02AXu4xuUbM1zhwn3wqaizle3AEYg5aeoohhg==} + '@rollup/rollup-linux-x64-gnu@4.64.3': + resolution: {integrity: sha512-vMh+mt0cw1BHldd8cqaU6A5s1W4EUKl6+8MRsv86mj954L4xyruKD7qPXMUI2icImadAZARK10h0onaGTLmCVg==} cpu: [x64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-x64-musl@4.60.1': - resolution: {integrity: sha512-5cIATbk5vynAjqqmyBjlciMJl1+R/CwX9oLk/EyiFXDWd95KpHdrOJT//rnUl4cUcskrd0jCCw3wpZnhIHdD9w==} + '@rollup/rollup-linux-x64-musl@4.64.3': + resolution: {integrity: sha512-PpiKU+sWbqDGc0U0su8oXiyeyqm0UQjmaaPKHktX+DaLe6YKJwW2YVD0f2AXHdVvblZbRqpwRVClWP2F5HCqrQ==} cpu: [x64] os: [linux] libc: [musl] - '@rollup/rollup-openbsd-x64@4.60.1': - resolution: {integrity: sha512-cl0w09WsCi17mcmWqqglez9Gk8isgeWvoUZ3WiJFYSR3zjBQc2J5/ihSjpl+VLjPqjQ/1hJRcqBfLjssREQILw==} + '@rollup/rollup-openbsd-x64@4.64.3': + resolution: {integrity: sha512-/3enY/AmaIt8IS0fWjX4ztYVPBqkj49cQTy/hCryhBFaEzDfJwwEolq9sxvyWAM2qmsmVuPdeRg5JXSrmeqvJg==} cpu: [x64] os: [openbsd] - '@rollup/rollup-openharmony-arm64@4.60.1': - resolution: {integrity: sha512-4Cv23ZrONRbNtbZa37mLSueXUCtN7MXccChtKpUnQNgF010rjrjfHx3QxkS2PI7LqGT5xXyYs1a7LbzAwT0iCA==} + '@rollup/rollup-openharmony-arm64@4.64.3': + resolution: {integrity: sha512-zsEP/QDuet52hhwvi5T1VPg0/Tkms0m3zkVv7CPsznvhdO4pL4oJTMz26EJsiCe18OeLKPgpTu3XVO3C1eq3ew==} cpu: [arm64] os: [openharmony] - '@rollup/rollup-win32-arm64-msvc@4.60.1': - resolution: {integrity: sha512-i1okWYkA4FJICtr7KpYzFpRTHgy5jdDbZiWfvny21iIKky5YExiDXP+zbXzm3dUcFpkEeYNHgQ5fuG236JPq0g==} + '@rollup/rollup-win32-arm64-msvc@4.64.3': + resolution: {integrity: sha512-4ESknW4Db+kqvazVOfsReYJaHxcIsOqcgwjKV2J1tG5Bn4RVf5ocTQKSGuq2HWBJcOLuyim8IWX8DuH6nKmELA==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.60.1': - resolution: {integrity: sha512-u09m3CuwLzShA0EYKMNiFgcjjzwqtUMLmuCJLeZWjjOYA3IT2Di09KaxGBTP9xVztWyIWjVdsB2E9goMjZvTQg==} + '@rollup/rollup-win32-ia32-msvc@4.64.3': + resolution: {integrity: sha512-3B8VCQyIyv7FQxYYhb3HpR3bIpronR20txjMSffSoz/sm/DDs3/49CFpEueOsvq9qW9sWoI/6pi6mtciD9NXFg==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-gnu@4.60.1': - resolution: {integrity: sha512-k+600V9Zl1CM7eZxJgMyTUzmrmhB/0XZnF4pRypKAlAgxmedUA+1v9R+XOFv56W4SlHEzfeMtzujLJD22Uz5zg==} + '@rollup/rollup-win32-x64-gnu@4.64.3': + resolution: {integrity: sha512-YOoDkKh2oQxOxRB5D9AR8sj3qpMShpmyTkjojiBjMGigz3caV7UvCnXWWUQC0TBmrZ5zuHe2pWl8S+cMfvXzRg==} cpu: [x64] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.60.1': - resolution: {integrity: sha512-lWMnixq/QzxyhTV6NjQJ4SFo1J6PvOX8vUx5Wb4bBPsEb+8xZ89Bz6kOXpfXj9ak9AHTQVQzlgzBEc1SyM27xQ==} + '@rollup/rollup-win32-x64-msvc@4.64.3': + resolution: {integrity: sha512-qTv4bG+eKJKifzxNJevMUh8L6CjJrz9/Kn1IbP2F5bo0tBzNIR7HMg4vni6XmDzcKUl00lHHY+J5ZgjbGiujOQ==} cpu: [x64] os: [win32] - '@simple-libs/child-process-utils@1.0.2': - resolution: {integrity: sha512-/4R8QKnd/8agJynkNdJmNw2MBxuFTRcNFnE5Sg/G+jkSsV8/UBgULMzhizWWW42p8L5H7flImV2ATi79Ove2Tw==} - engines: {node: '>=18'} - - '@simple-libs/stream-utils@1.2.0': - resolution: {integrity: sha512-KxXvfapcixpz6rVEB6HPjOUZT22yN6v0vI0urQSk1L8MlEWPDFCZkhw2xmkyoTGYeFw7tWTZd7e3lVzRZRN/EA==} - engines: {node: '>=18'} + '@simple-libs/child-process-utils@2.0.0': + resolution: {integrity: sha512-dvNoRKLijXnD0XoJAz94pbNuB5GQgDr55UhpSPhffDkTT0Cmcqh9jSCOtwfT2d4H6MI9E7c4SgtMuJXZ6F3c6A==} + engines: {node: '>=22'} - '@types/estree@1.0.8': - resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} + '@simple-libs/stream-utils@2.0.0': + resolution: {integrity: sha512-fCTuZK4QBa+39Oz9l4OGfJfz+GpwCp3AqO7Zch3to99xHPgstVsRFpeQ8LNd2o1Gv8raL2mCFwiaHh7bFSp5DQ==} + engines: {node: '>=22'} - '@types/node@12.20.55': - resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} - '@types/node@25.5.0': - resolution: {integrity: sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==} + '@types/node@26.6.4': + resolution: {integrity: sha512-ldVPDCzj7fsaGZrLB0NuHuTvJcsNasysBAqMolr/cgxrLd1xbqxIr3XJiPnHHJUCxj5sNF1vnRj9aWnrVh5Jcg==} '@types/shelljs@0.10.0': resolution: {integrity: sha512-OEfyhE5Ox+FeoHbhrEDwm0kXxntO6nsyMRCFvNsIBHPZu5rV1w2OjPcLclaC/IZ1TlzZPgbeMfwAZEi5N238yQ==} - acorn@8.16.0: - resolution: {integrity: sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==} + acorn@8.19.0: + resolution: {integrity: sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==} engines: {node: '>=0.4.0'} hasBin: true - ajv@8.18.0: - resolution: {integrity: sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==} - - ansi-colors@4.1.3: - resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} - engines: {node: '>=6'} + ajv@8.20.0: + resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} - ansi-escapes@7.3.0: - resolution: {integrity: sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg==} - engines: {node: '>=18'} - - ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - - ansi-regex@6.2.2: - resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==} + ansi-regex@6.4.0: + resolution: {integrity: sha512-KzTVk2tCWAHtYrvvvaP8bJKJq2pVinhLcGEQdtLIYPbmNGNyYe8QwNaTUYQp2J7/vIsUKt5QCqAfUkYyG9DkOw==} engines: {node: '>=12'} - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - ansi-styles@6.2.3: resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} engines: {node: '>=12'} @@ -975,22 +1134,12 @@ packages: any-promise@1.3.0: resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} - argparse@1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - array-ify@1.0.0: - resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==} - - array-union@2.1.0: - resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} - engines: {node: '>=8'} - - better-path-resolve@1.0.0: - resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} - engines: {node: '>=4'} + argue-cli@3.2.0: + resolution: {integrity: sha512-VipTB0gXgGIFO2Rg9yEVN5wLt2AurJcZqDbgmYSwPwsykhLrQhs240/bfceev4w68lI8JshoOJIk9uW7tFzROw==} + engines: {node: '>=22'} braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} @@ -1006,58 +1155,37 @@ packages: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} + cac@7.0.1: + resolution: {integrity: sha512-86diuUyeeWM8CrqhpGCaDafrzjS1s++7sWy2AbAPoFNz/xKv7ID57CR4pZsMuGCh60PtsnEx4z68b+Vgt07VPw==} + engines: {node: '>=20.19.0'} + callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - chalk@5.6.2: - resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==} - engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + chalk@6.0.1: + resolution: {integrity: sha512-/Ce6KNm3vIbWdMlNna6RVIZ/ICQxnJxCicet5LBKK9ZffBkqzDw0xh9EiKSljdRtiIQ1S1z4YgcscUUGzNCWrA==} + engines: {node: '>=22'} - chardet@2.1.1: - resolution: {integrity: sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==} + chardet@2.2.0: + resolution: {integrity: sha512-rddelWYNPRrXq6PtNEN2S3f6t9ILzvqaN5pVgi4kqt9jHQaXIial9PznB5iSPVlQSLNaaH22ItWz3EJtQ10+OA==} chokidar@4.0.3: resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} engines: {node: '>= 14.16.0'} - cli-cursor@5.0.0: - resolution: {integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==} - engines: {node: '>=18'} - - cli-truncate@5.2.0: - resolution: {integrity: sha512-xRwvIOMGrfOAnM1JYtqQImuaNtDEv9v6oIYAs4LIHwTiKee8uwvIi363igssOC0O5U04i4AlENs79LQLu9tEMw==} - engines: {node: '>=20'} - cli-width@4.1.0: resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} engines: {node: '>= 12'} - cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} - - color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - - color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - - colorette@2.0.20: - resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} - - commander@14.0.3: - resolution: {integrity: sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==} + cliui@9.0.1: + resolution: {integrity: sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==} engines: {node: '>=20'} commander@4.1.1: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} - compare-func@2.0.0: - resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==} - confbox@0.1.8: resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} @@ -1065,29 +1193,29 @@ packages: resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} engines: {node: ^14.18.0 || >=16.10.0} - conventional-changelog-angular@8.3.1: - resolution: {integrity: sha512-6gfI3otXK5Ph5DfCOI1dblr+kN3FAm5a97hYoQkqNZxOaYa5WKfXH+AnpsmS+iUH2mgVC2Cg2Qw9m5OKcmNrIg==} - engines: {node: '>=18'} + conventional-changelog-angular@9.4.0: + resolution: {integrity: sha512-HdxRxuS8bBXVIuo4V82gvSwAXT0vYQUizrjs/izmPg5JdDstr8v8I5hduGL3iQbG+o310dUDxC4+LetuS5hu9w==} + engines: {node: '>=22'} - conventional-changelog-conventionalcommits@9.3.1: - resolution: {integrity: sha512-dTYtpIacRpcZgrvBYvBfArMmK2xvIpv2TaxM0/ZI5CBtNUzvF2x0t15HsbRABWprS6UPmvj+PzHVjSx4qAVKyw==} - engines: {node: '>=18'} + conventional-changelog-conventionalcommits@10.4.1: + resolution: {integrity: sha512-jS1LRFSbRoAr6JbhhRy1JYfNNUj5LM3+v49hRE03CgccsiYqgdVj/RTmrw4J1rylrqijHwdOlJWiJa61JHOgHg==} + engines: {node: '>=22'} - conventional-commits-parser@6.4.0: - resolution: {integrity: sha512-tvRg7FIBNlyPzjdG8wWRlPHQJJHI7DylhtRGeU9Lq+JuoPh5BKpPRX83ZdLrvXuOSu5Eo/e7SzOQhU4Hd2Miuw==} - engines: {node: '>=18'} + conventional-commits-parser@7.1.3: + resolution: {integrity: sha512-Q9oWm1o9uy/oEsZQIraoFMZ4RuPD+79KgwWj6mJVP356tazolCB0piRLZ5Kz9te9p027uSEcUW+Gu44Eh+X79g==} + engines: {node: '>=22'} hasBin: true - cosmiconfig-typescript-loader@6.2.0: - resolution: {integrity: sha512-GEN39v7TgdxgIoNcdkRE3uiAzQt3UXLyHbRHD6YoL048XAeOomyxaP+Hh/+2C6C2wYjxJ2onhJcsQp+L4YEkVQ==} + cosmiconfig-typescript-loader@6.3.0: + resolution: {integrity: sha512-Akr82WH1Wfqatyiqpj8HDkO2o2KmJRu1FhKfSNJP3K4IdXwHfEyL7MOb62i1AGQVLtIQM+iCE9CGOtrfhR+mmA==} engines: {node: '>=v18'} peerDependencies: '@types/node': '*' cosmiconfig: '>=9' typescript: '>=5' - cosmiconfig@9.0.1: - resolution: {integrity: sha512-hr4ihw+DBqcvrsEDioRO31Z17x71pUYoNe/4h6Z0wB72p7MU7/9gH8Q3s12NFhHPfYBBOV3qyfUxmr/Yn3shnQ==} + cosmiconfig@9.0.2: + resolution: {integrity: sha512-gtTZxTDau1wL7Y7zifc2dd8jHSK/k6BTx/2Xp/BpdlAdnlYWFVt7qhJqgwi7637yRwRQ3qL4ZidbB4I8tA5VOg==} engines: {node: '>=14'} peerDependencies: typescript: '>=4.9.5' @@ -1108,41 +1236,26 @@ packages: supports-color: optional: true - detect-indent@6.1.0: - resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} - engines: {node: '>=8'} - - dir-glob@3.0.1: - resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} - engines: {node: '>=8'} - - dot-prop@5.3.0: - resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} - engines: {node: '>=8'} - emoji-regex@10.6.0: resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==} - emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - - enquirer@2.4.1: - resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} - engines: {node: '>=8.6'} - env-paths@2.2.1: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} - environment@1.1.0: - resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==} - engines: {node: '>=18'} - error-ex@1.3.4: resolution: {integrity: sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==} - esbuild@0.27.4: - resolution: {integrity: sha512-Rq4vbHnYkK5fws5NF7MYTU68FPRE1ajX7heQ/8QXXWqNgqqJ/GkmmyxIzUnf2Sr/bakf8l54716CcMGHYhMrrQ==} + es-toolkit@1.52.0: + resolution: {integrity: sha512-XTNEJQh1tY1ZJVcf6ayP/2n4ZPyaHlW2FWs7xvw5ddPuhUVjLD3olQVQS7kf58JbAB48iL0uL/jerTrjtV3lDA==} + + esbuild@0.27.7: + resolution: {integrity: sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==} + engines: {node: '>=18'} + hasBin: true + + esbuild@0.28.2: + resolution: {integrity: sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==} engines: {node: '>=18'} hasBin: true @@ -1150,21 +1263,10 @@ packages: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} - esprima@4.0.1: - resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} - engines: {node: '>=4'} - hasBin: true - - eventemitter3@5.0.4: - resolution: {integrity: sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==} - execa@5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} - extendable-error@0.1.7: - resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} - fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -1178,14 +1280,14 @@ packages: fast-string-width@3.0.2: resolution: {integrity: sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==} - fast-uri@3.1.0: - resolution: {integrity: sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==} + fast-uri@3.1.8: + resolution: {integrity: sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==} - fast-wrap-ansi@0.2.0: - resolution: {integrity: sha512-rLV8JHxTyhVmFYhBJuMujcrHqOT2cnO5Zxj37qROj23CP39GXubJRBUFF0z8KFK77Uc0SukZUf7JZhsVEQ6n8w==} + fast-wrap-ansi@0.2.2: + resolution: {integrity: sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q==} - fastq@1.20.1: - resolution: {integrity: sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==} + fastq@1.20.3: + resolution: {integrity: sha512-XKv5nnLs6nLF71NgiKJLIZFLkPyIEuOselLG7ujZnGrRfQK8HpvY+WqKhAJUAdLomwVHErVS4LfxFlPq0/FTAw==} fdir@6.5.0: resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} @@ -1200,21 +1302,9 @@ packages: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} - find-up@4.1.0: - resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} - engines: {node: '>=8'} - fix-dts-default-cjs-exports@1.0.1: resolution: {integrity: sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==} - fs-extra@7.0.1: - resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} - engines: {node: '>=6 <7 || >=8'} - - fs-extra@8.1.0: - resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} - engines: {node: '>=6 <7 || >=8'} - fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -1224,44 +1314,28 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - get-east-asian-width@1.5.0: - resolution: {integrity: sha512-CQ+bEO+Tva/qlmw24dCejulK5pMzVnUOFOijVogd3KQs07HnRIgp8TGipvCCRT06xeYEbpbgwaCxglFyiuIcmA==} + get-east-asian-width@1.7.0: + resolution: {integrity: sha512-XjH1AECxf0giL2V1aU8vKyRR2ppRUb5c0EvT7zuJTokQ74bNo52zOtghqdWIqrhUD79fo3x0WfKZdOqxF6LG1Q==} engines: {node: '>=18'} get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} - get-tsconfig@4.13.7: - resolution: {integrity: sha512-7tN6rFgBlMgpBML5j8typ92BKFi2sFQvIdpAqLA2beia5avZDrMs0FLZiM5etShWq5irVyGcGMEA1jcDaK7A/Q==} - - git-raw-commits@5.0.1: - resolution: {integrity: sha512-Y+csSm2GD/PCSh6Isd/WiMjNAydu0VBiG9J7EdQsNA5P9uXvLayqjmTsNlK5Gs9IhblFZqOU0yid5Il5JPoLiQ==} - engines: {node: '>=18'} - deprecated: Deprecated and no longer maintained. Use @conventional-changelog/git-client instead. - hasBin: true - glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} - global-directory@4.0.1: - resolution: {integrity: sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==} - engines: {node: '>=18'} + global-directory@5.0.0: + resolution: {integrity: sha512-1pgFdhK3J2LeM+dVf2Pd424yHx2ou338lC0ErNP2hPx4j8eW1Sp0XqSjNxtk6Tc4Kr5wlWtSvz8cn2yb7/SG/w==} + engines: {node: '>=20'} - globals@17.4.0: - resolution: {integrity: sha512-hjrNztw/VajQwOLsMNT1cbJiH2muO3OROCHnbehc8eY5JyD2gqz4AcMHPqgaOR59DjgUjYAYLeH699g/eWi2jw==} + globals@17.13.0: + resolution: {integrity: sha512-RwMTC61u7hrG3ZJMkZQOK4JLJrKS8QtoTii63EmWvFXHqycY9FObBJQCbsLxSO8kjKhWE5kV1GC+Vb1g3RI0Zg==} engines: {node: '>=18'} - globby@11.1.0: - resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} - engines: {node: '>=10'} - - graceful-fs@4.2.11: - resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - - human-id@4.1.3: - resolution: {integrity: sha512-tsYlhAYpjCKa//8rXZ9DqKEawhPoSytweBC2eNvcaDK+57RZLHGqNs3PZTQO6yekLFSuvA6AlnAfrw1uBvtb+Q==} + human-id@4.2.2: + resolution: {integrity: sha512-Z+8unD6em/MJwyrkWQ2M3wygRGI1+MztbutiNwk1DCuEPXOZRWGjtcMPZYP1exY9iNZMhd7ZOSMQSo9WYtiQRw==} hasBin: true human-signals@2.1.0: @@ -1273,14 +1347,10 @@ packages: engines: {node: '>=18'} hasBin: true - iconv-lite@0.7.2: - resolution: {integrity: sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==} + iconv-lite@0.7.3: + resolution: {integrity: sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==} engines: {node: '>=0.10.0'} - ignore@5.3.2: - resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} - engines: {node: '>= 4'} - import-fresh@3.3.1: resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} engines: {node: '>=6'} @@ -1288,9 +1358,9 @@ packages: import-meta-resolve@4.2.0: resolution: {integrity: sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==} - ini@4.1.1: - resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + ini@6.0.0: + resolution: {integrity: sha512-IBTdIkzZNOpqm7q3dRqJvMaldXjDHWkEDfrwGEQTs5eaQMWV+djAhR+wahyNNMAa+qpbDUhBMVt4ZKNwpPm7xQ==} + engines: {node: ^20.17.0 || >=22.9.0} is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} @@ -1299,14 +1369,6 @@ packages: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} - is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - - is-fullwidth-code-point@5.1.0: - resolution: {integrity: sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==} - engines: {node: '>=18'} - is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -1315,10 +1377,6 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} - is-obj@2.0.0: - resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==} - engines: {node: '>=8'} - is-plain-obj@4.1.0: resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} engines: {node: '>=12'} @@ -1327,14 +1385,6 @@ packages: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} - is-subdir@1.2.0: - resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} - engines: {node: '>=4'} - - is-windows@1.0.2: - resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} - engines: {node: '>=0.10.0'} - isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -1342,6 +1392,9 @@ packages: resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} hasBin: true + jju@1.4.0: + resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} + joycon@3.1.1: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} engines: {node: '>=10'} @@ -1349,12 +1402,8 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - js-yaml@3.14.2: - resolution: {integrity: sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==} - hasBin: true - - js-yaml@4.1.1: - resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} + js-yaml@4.3.2: + resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} hasBin: true json-parse-even-better-errors@2.3.1: @@ -1363,8 +1412,11 @@ packages: json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} - jsonfile@4.0.0: - resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + jsonc-parser@3.3.1: + resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} + + launch-editor@2.14.2: + resolution: {integrity: sha512-NHJEb30MGBCkmZXLZwz25t37QR4aY03ZzPYUJXOJaOa92uWwExI9SBQUuIznBYc1xkD7cJNGX7oc3Nl3sq2kQQ==} lilconfig@3.1.3: resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} @@ -1373,52 +1425,18 @@ packages: lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - lint-staged@16.4.0: - resolution: {integrity: sha512-lBWt8hujh/Cjysw5GYVmZpFHXDCgZzhrOm8vbcUdobADZNOK/bRshr2kM3DfgrrtR1DQhfupW9gnIXOfiFi+bw==} - engines: {node: '>=20.17'} + lint-staged@17.6.0: + resolution: {integrity: sha512-nOhBfYkZEwkFtNzD5pK9s9LkcWoxJ+whLzEnhqi9nl7zTB5n7tg8+9iYgMGx2Wm3VlLu8cbNj0RACzY+nWi5iQ==} + engines: {node: '>=22.22.1'} hasBin: true - listr2@9.0.5: - resolution: {integrity: sha512-ME4Fb83LgEgwNw96RKNvKV4VTLuXfoKudAmm2lP8Kk87KaMK0/Xrx/aAkMWmT8mDb+3MlFDspfbCs7adjRxA2g==} - engines: {node: '>=20.0.0'} - load-tsconfig@0.2.5: resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - locate-path@5.0.0: - resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} - engines: {node: '>=8'} - - lodash.camelcase@4.3.0: - resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} - - lodash.kebabcase@4.1.1: - resolution: {integrity: sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==} - - lodash.mergewith@4.6.2: - resolution: {integrity: sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==} - - lodash.snakecase@4.1.1: - resolution: {integrity: sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==} - - lodash.startcase@4.4.0: - resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} - - lodash.upperfirst@4.3.1: - resolution: {integrity: sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==} - - log-update@6.1.0: - resolution: {integrity: sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==} - engines: {node: '>=18'} - magic-string@0.30.21: resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} - meow@13.2.0: - resolution: {integrity: sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==} - engines: {node: '>=18'} - merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} @@ -1434,20 +1452,9 @@ packages: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} - mimic-function@5.0.1: - resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} - engines: {node: '>=18'} - - minimist@1.2.8: - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - mlly@1.8.2: resolution: {integrity: sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA==} - mri@1.2.0: - resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} - engines: {node: '>=4'} - ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -1470,50 +1477,34 @@ packages: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} - onetime@7.0.0: - resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==} - engines: {node: '>=18'} - - outdent@0.5.0: - resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} - - oxfmt@0.44.0: - resolution: {integrity: sha512-lnncqvHewyRvaqdrnntVIrZV2tEddz8lbvPsQzG/zlkfvgZkwy0HP1p/2u1aCDToeg1jb9zBpbJdfkV73Itw+w==} + oxfmt@0.72.0: + resolution: {integrity: sha512-16OQeL0uhPZbfmT9S9WWM0Nv9+BmVi8Ra1uTYaSKj/qSCs6FB30KOhz9JoNYw6thT+K5bVxsk/tSEOu497i34g==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true + peerDependencies: + svelte: ^5.0.0 + vite-plus: '*' + peerDependenciesMeta: + svelte: + optional: true + vite-plus: + optional: true - oxlint@1.59.0: - resolution: {integrity: sha512-0xBLeGGjP4vD9pygRo8iuOkOzEU1MqOnfiOl7KYezL/QvWL8NUg6n03zXc7ZVqltiOpUxBk2zgHI3PnRIEdAvw==} + oxlint@1.87.0: + resolution: {integrity: sha512-drxVlaW7Oqq7wSy1CN25znRu00aRq8n57Q2wniJRxCmtYVz07ufCm7EVDPQFZURrTgQIjzKrVEHAD/HcvJXObg==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: - oxlint-tsgolint: '>=0.18.0' + oxlint-tsgolint: '>=7.0.2003' + vite-plus: '*' peerDependenciesMeta: oxlint-tsgolint: optional: true + vite-plus: + optional: true - p-filter@2.1.0: - resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} - engines: {node: '>=8'} - - p-limit@2.3.0: - resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} - engines: {node: '>=6'} - - p-locate@4.1.0: - resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} - engines: {node: '>=8'} - - p-map@2.1.0: - resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} - engines: {node: '>=6'} - - p-try@2.2.0: - resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} - engines: {node: '>=6'} - - package-manager-detector@0.2.11: - resolution: {integrity: sha512-BEnLolu+yuz22S56CU1SUKq3XC3PkwD5wv4ikR4MfGvnRVcmzXR9DwSlW2fEamyTPyXHomBJRzgapeuBvRNzJQ==} + package-manager-detector@1.9.0: + resolution: {integrity: sha512-zAMfbta9nPA8AKkA4WdmNAT8R8s6Dk0/xwPsqNnRidMFcLo1YkLuPDTgs2f64XdzS8vbLNnoJ+uUIkgbz7oRHA==} parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} @@ -1523,18 +1514,10 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} - path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} - path-type@4.0.0: - resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} - engines: {node: '>=8'} - pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} @@ -1545,14 +1528,10 @@ packages: resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==} engines: {node: '>=8.6'} - picomatch@4.0.4: - resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} + picomatch@4.0.7: + resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} engines: {node: '>=12'} - pify@4.0.1: - resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} - engines: {node: '>=6'} - pirates@4.0.7: resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==} engines: {node: '>= 6'} @@ -1578,29 +1557,13 @@ packages: yaml: optional: true - prettier@2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} - engines: {node: '>=10.13.0'} - hasBin: true - - quansync@0.2.11: - resolution: {integrity: sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==} - queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - read-yaml-file@1.1.0: - resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} - engines: {node: '>=6'} - readdirp@4.1.2: resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} engines: {node: '>= 14.18.0'} - require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} @@ -1613,22 +1576,12 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} - resolve-pkg-maps@1.0.0: - resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} - - restore-cursor@5.1.0: - resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==} - engines: {node: '>=18'} - reusify@1.1.0: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rfdc@1.4.1: - resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} - - rollup@4.60.1: - resolution: {integrity: sha512-VmtB2rFU/GroZ4oL8+ZqXgSA38O6GR8KSIvWmEFv63pQ0G6KaBH9s07PO8XTXP4vI+3UJUEypOfjkGfmSBBR0w==} + rollup@4.64.3: + resolution: {integrity: sha512-iIMWbptLYsZdGTJMH8ngApXdsCatE6bCMv2eqGIfGE1++kwh7TCWBdWKK0FKC0yx++196vGK5VdagzRXSLMa8A==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -1638,8 +1591,8 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - semver@7.7.4: - resolution: {integrity: sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==} + semver@7.8.5: + resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} engines: {node: '>=10'} hasBin: true @@ -1651,6 +1604,10 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} + shell-quote@1.12.0: + resolution: {integrity: sha512-PcByqNyT/38F2kDNi006HAMRJaULuBzq/FOsw3qdZvX/GA9W/jamDaRskgHjubHiftXK5sIFxLNkvrXUwcof6Q==} + engines: {node: '>= 0.4'} + shelljs@0.10.0: resolution: {integrity: sha512-Jex+xw5Mg2qMZL3qnzXIfaxEtBaC4n7xifqaqtrZDdlheR70OGkydrPJWT0V1cA1k3nanC86x9FwAmQl6w3Klw==} engines: {node: '>=18'} @@ -1662,56 +1619,29 @@ packages: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} - slash@3.0.0: - resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} - engines: {node: '>=8'} - - slice-ansi@7.1.2: - resolution: {integrity: sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==} - engines: {node: '>=18'} - - slice-ansi@8.0.0: - resolution: {integrity: sha512-stxByr12oeeOyY2BlviTNQlYV5xOj47GirPr4yA1hE9JCtxfQN0+tVbkxwCtYDQWhEKWFHsEK48ORg5jrouCAg==} - engines: {node: '>=20'} + sisteransi@1.0.5: + resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} source-map@0.7.6: resolution: {integrity: sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==} engines: {node: '>= 12'} - spawndamnit@3.0.1: - resolution: {integrity: sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg==} - - sprintf-js@1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - string-argv@0.3.2: resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} engines: {node: '>=0.6.19'} - string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - string-width@7.2.0: resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} engines: {node: '>=18'} - string-width@8.2.0: - resolution: {integrity: sha512-6hJPQ8N0V0P3SNmP6h2J99RLuzrWz2gvT7VnK5tKvrNqJoyS9W4/Fb8mo31UiPvy00z7DQXkP2hnKBVav76thw==} + string-width@8.3.0: + resolution: {integrity: sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ==} engines: {node: '>=20'} - strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - strip-ansi@7.2.0: resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} engines: {node: '>=12'} - strip-bom@3.0.0: - resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} - engines: {node: '>=4'} - strip-final-newline@2.0.0: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} @@ -1721,10 +1651,6 @@ packages: engines: {node: '>=16 || 14 >=14.17'} hasBin: true - term-size@2.2.1: - resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} - engines: {node: '>=8'} - thenify-all@1.6.0: resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} engines: {node: '>=0.8'} @@ -1735,16 +1661,16 @@ packages: tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} - tinyexec@1.0.4: - resolution: {integrity: sha512-u9r3uZC0bdpGOXtlxUIdwf9pkmvhqJdrVCH9fapQtgy/OeTTMZ1nqH7agtvEfmGui6e1XxjcdrlxvxJvc3sMqw==} + tinyexec@1.3.1: + resolution: {integrity: sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==} engines: {node: '>=18'} - tinyglobby@0.2.15: - resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} engines: {node: '>=12.0.0'} - tinypool@2.1.0: - resolution: {integrity: sha512-Pugqs6M0m7Lv1I7FtxN4aoyToKg1C4tu+/381vH35y8oENM/Ai7f7C4StcoK4/+BSw9ebcS8jRiVrORFKCALLw==} + tinypool@2.2.0: + resolution: {integrity: sha512-jBrmx4lYmaC9k/mgPbylxs7kBUxHtD8256up+HjLaDFfXScKJQyil+SWXSvhAtT7XHo+yTVlpB81PGmHP8oLSQ==} engines: {node: ^20.0.0 || >=22.0.0} to-regex-range@5.0.1: @@ -1777,35 +1703,31 @@ packages: typescript: optional: true - tsx@4.21.0: - resolution: {integrity: sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==} + tsx@4.23.15: + resolution: {integrity: sha512-Yiex1Ovn8z2xPpOWckIiysV1SSyRMY9BkLF++q0yKiDxCqRhosKfMg3janKkiLBwZ5c/YryloKwGZcrEmtwxKw==} engines: {node: '>=18.0.0'} hasBin: true - typescript@6.0.2: - resolution: {integrity: sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==} + typescript@6.0.3: + resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} engines: {node: '>=14.17'} hasBin: true - ufo@1.6.3: - resolution: {integrity: sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==} + ufo@1.6.4: + resolution: {integrity: sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==} - undici-types@7.18.2: - resolution: {integrity: sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==} + undici-types@8.9.0: + resolution: {integrity: sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==} - universalify@0.1.2: - resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} - engines: {node: '>= 4.0.0'} + verkit@0.5.0: + resolution: {integrity: sha512-u4J1hr6Y+C/hit34GwL3eIcUf3wngT8TlYUjK7tk0jxydKLAq3sYvifjdTDA6U3KCKRcQCQDGf/srjxfZF3l7g==} + engines: {node: '>=18.12.0'} which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} hasBin: true - wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} - wrap-ansi@9.0.2: resolution: {integrity: sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==} engines: {node: '>=18'} @@ -1814,529 +1736,570 @@ packages: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} - yaml@2.8.3: - resolution: {integrity: sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==} + yaml@2.9.1: + resolution: {integrity: sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==} engines: {node: '>= 14.6'} hasBin: true - yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} + yargs-parser@22.0.0: + resolution: {integrity: sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==} + engines: {node: ^20.19.0 || ^22.12.0 || >=23} - yargs@17.7.2: - resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} - engines: {node: '>=12'} + yargs@18.2.0: + resolution: {integrity: sha512-9OpKOLeaoNFecEp7P6iYbzze/5CqWoH7N3SMs/6y1XF4nMvFMspEGZzJ6uFi9MmQwXhyzqYoSEKO3tvA3Z/o2w==} + engines: {node: ^20.19.0 || ^22.12.0 || >=23} snapshots: - '@babel/code-frame@7.29.0': + '@babel/code-frame@7.29.7': dependencies: - '@babel/helper-validator-identifier': 7.28.5 + '@babel/helper-validator-identifier': 7.29.7 js-tokens: 4.0.0 picocolors: 1.1.1 - '@babel/helper-validator-identifier@7.28.5': {} - - '@babel/runtime@7.29.2': {} - - '@changesets/apply-release-plan@7.1.0': - dependencies: - '@changesets/config': 3.1.3 - '@changesets/get-version-range-type': 0.4.0 - '@changesets/git': 3.0.4 - '@changesets/should-skip-package': 0.1.2 - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 - detect-indent: 6.1.0 - fs-extra: 7.0.1 - lodash.startcase: 4.4.0 - outdent: 0.5.0 - prettier: 2.8.8 - resolve-from: 5.0.0 - semver: 7.7.4 - - '@changesets/assemble-release-plan@6.0.9': - dependencies: - '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.3 - '@changesets/should-skip-package': 0.1.2 - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 - semver: 7.7.4 - - '@changesets/changelog-git@0.2.1': - dependencies: - '@changesets/types': 6.1.0 - - '@changesets/cli@2.30.0(@types/node@25.5.0)': - dependencies: - '@changesets/apply-release-plan': 7.1.0 - '@changesets/assemble-release-plan': 6.0.9 - '@changesets/changelog-git': 0.2.1 - '@changesets/config': 3.1.3 - '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.3 - '@changesets/get-release-plan': 4.0.15 - '@changesets/git': 3.0.4 - '@changesets/logger': 0.1.1 - '@changesets/pre': 2.0.2 - '@changesets/read': 0.6.7 - '@changesets/should-skip-package': 0.1.2 - '@changesets/types': 6.1.0 - '@changesets/write': 0.4.0 - '@inquirer/external-editor': 1.0.3(@types/node@25.5.0) - '@manypkg/get-packages': 1.1.3 - ansi-colors: 4.1.3 - enquirer: 2.4.1 - fs-extra: 7.0.1 - mri: 1.2.0 - package-manager-detector: 0.2.11 - picocolors: 1.1.1 - resolve-from: 5.0.0 - semver: 7.7.4 - spawndamnit: 3.0.1 - term-size: 2.2.1 - transitivePeerDependencies: - - '@types/node' + '@babel/helper-validator-identifier@7.29.7': {} - '@changesets/config@3.1.3': + '@changesets/apply-release-plan@8.1.1': dependencies: - '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.3 - '@changesets/logger': 0.1.1 - '@changesets/should-skip-package': 0.1.2 - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 - fs-extra: 7.0.1 - micromatch: 4.0.8 + '@changesets/config': 4.0.1 + '@changesets/format': 0.1.2 + '@changesets/git': 4.0.1 + '@changesets/should-skip-package': 1.0.0 + '@changesets/types': 7.0.0 + import-meta-resolve: 4.2.0 + jsonc-parser: 3.3.1 + semver: 7.8.5 + + '@changesets/assemble-release-plan@7.0.0': + dependencies: + '@changesets/errors': 1.0.0 + '@changesets/get-dependents-graph': 3.0.0 + '@changesets/should-skip-package': 1.0.0 + '@changesets/types': 7.0.0 + semver: 7.8.5 + + '@changesets/changelog-git@1.0.0': + dependencies: + '@changesets/types': 7.0.0 + + '@changesets/cli@3.0.3': + dependencies: + '@changesets/apply-release-plan': 8.1.1 + '@changesets/assemble-release-plan': 7.0.0 + '@changesets/changelog-git': 1.0.0 + '@changesets/config': 4.0.1 + '@changesets/errors': 1.0.0 + '@changesets/get-dependents-graph': 3.0.0 + '@changesets/git': 4.0.1 + '@changesets/pre': 3.0.0 + '@changesets/read': 1.0.1 + '@changesets/should-skip-package': 1.0.0 + '@changesets/types': 7.0.0 + '@changesets/write': 1.0.1 + '@clack/prompts': 1.8.1 + '@manypkg/get-packages': 3.1.0 + '@pnpm/deps.graph-sequencer': 1100.0.1 + cac: 7.0.1 + import-meta-resolve: 4.2.0 + launch-editor: 2.14.2 + package-manager-detector: 1.9.0 + semver: 7.8.5 + tinyexec: 1.3.1 - '@changesets/errors@0.2.0': + '@changesets/config@4.0.1': dependencies: - extendable-error: 0.1.7 + '@changesets/get-dependents-graph': 3.0.0 + '@changesets/should-skip-package': 1.0.0 + '@changesets/types': 7.0.0 + '@manypkg/get-packages': 3.1.0 + picomatch: 4.0.7 - '@changesets/get-dependents-graph@2.1.3': - dependencies: - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 - picocolors: 1.1.1 - semver: 7.7.4 + '@changesets/errors@1.0.0': {} - '@changesets/get-release-plan@4.0.15': + '@changesets/format@0.1.2': dependencies: - '@changesets/assemble-release-plan': 6.0.9 - '@changesets/config': 3.1.3 - '@changesets/pre': 2.0.2 - '@changesets/read': 0.6.7 - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 + package-manager-detector: 1.9.0 + tinyexec: 1.3.1 - '@changesets/get-version-range-type@0.4.0': {} - - '@changesets/git@3.0.4': + '@changesets/get-dependents-graph@3.0.0': dependencies: - '@changesets/errors': 0.2.0 - '@manypkg/get-packages': 1.1.3 - is-subdir: 1.2.0 - micromatch: 4.0.8 - spawndamnit: 3.0.1 + '@changesets/types': 7.0.0 + semver: 7.8.5 - '@changesets/logger@0.1.1': + '@changesets/git@4.0.1': dependencies: - picocolors: 1.1.1 + '@changesets/errors': 1.0.0 + '@changesets/types': 7.0.0 + '@manypkg/get-packages': 3.1.0 + picomatch: 4.0.7 + tinyexec: 1.3.1 - '@changesets/parse@0.4.3': + '@changesets/parse@1.0.0': dependencies: - '@changesets/types': 6.1.0 - js-yaml: 4.1.1 + '@changesets/types': 7.0.0 + yaml: 2.9.1 - '@changesets/pre@2.0.2': + '@changesets/pre@3.0.0': dependencies: - '@changesets/errors': 0.2.0 - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 - fs-extra: 7.0.1 + '@changesets/errors': 1.0.0 + '@changesets/types': 7.0.0 + '@manypkg/get-packages': 3.1.0 - '@changesets/read@0.6.7': + '@changesets/read@1.0.1': dependencies: - '@changesets/git': 3.0.4 - '@changesets/logger': 0.1.1 - '@changesets/parse': 0.4.3 - '@changesets/types': 6.1.0 - fs-extra: 7.0.1 - p-filter: 2.1.0 - picocolors: 1.1.1 + '@changesets/git': 4.0.1 + '@changesets/parse': 1.0.0 + '@changesets/types': 7.0.0 - '@changesets/should-skip-package@0.1.2': + '@changesets/should-skip-package@1.0.0': dependencies: - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 + '@changesets/types': 7.0.0 - '@changesets/types@4.1.0': {} + '@changesets/types@7.0.0': {} - '@changesets/types@6.1.0': {} + '@changesets/write@1.0.1': + dependencies: + '@changesets/format': 0.1.2 + '@changesets/types': 7.0.0 + human-id: 4.2.2 - '@changesets/write@0.4.0': + '@clack/core@1.5.1': dependencies: - '@changesets/types': 6.1.0 - fs-extra: 7.0.1 - human-id: 4.1.3 - prettier: 2.8.8 + fast-wrap-ansi: 0.2.2 + sisteransi: 1.0.5 - '@commitlint/cli@20.5.0(@types/node@25.5.0)(conventional-commits-parser@6.4.0)(typescript@6.0.2)': + '@clack/prompts@1.8.1': dependencies: - '@commitlint/format': 20.5.0 - '@commitlint/lint': 20.5.0 - '@commitlint/load': 20.5.0(@types/node@25.5.0)(typescript@6.0.2) - '@commitlint/read': 20.5.0(conventional-commits-parser@6.4.0) - '@commitlint/types': 20.5.0 - tinyexec: 1.0.4 - yargs: 17.7.2 + '@clack/core': 1.5.1 + fast-string-width: 3.0.2 + fast-wrap-ansi: 0.2.2 + sisteransi: 1.0.5 + + '@commitlint/cli@21.2.3(@types/node@26.6.4)(conventional-commits-parser@7.1.3)(typescript@6.0.3)': + dependencies: + '@commitlint/config-conventional': 21.2.3 + '@commitlint/format': 21.2.3 + '@commitlint/lint': 21.2.3 + '@commitlint/load': 21.2.3(@types/node@26.6.4)(typescript@6.0.3) + '@commitlint/read': 21.2.3(conventional-commits-parser@7.1.3) + '@commitlint/types': 21.2.3 + tinyexec: 1.3.1 + yargs: 18.2.0 transitivePeerDependencies: - '@types/node' - conventional-commits-filter - conventional-commits-parser - typescript - '@commitlint/config-conventional@20.5.0': + '@commitlint/config-conventional@21.2.3': dependencies: - '@commitlint/types': 20.5.0 - conventional-changelog-conventionalcommits: 9.3.1 + '@commitlint/types': 21.2.3 + conventional-changelog-conventionalcommits: 10.4.1 - '@commitlint/config-validator@20.5.0': + '@commitlint/config-validator@21.2.3': dependencies: - '@commitlint/types': 20.5.0 - ajv: 8.18.0 + '@commitlint/types': 21.2.3 + ajv: 8.20.0 - '@commitlint/ensure@20.5.0': + '@commitlint/ensure@21.2.3': dependencies: - '@commitlint/types': 20.5.0 - lodash.camelcase: 4.3.0 - lodash.kebabcase: 4.1.1 - lodash.snakecase: 4.1.1 - lodash.startcase: 4.4.0 - lodash.upperfirst: 4.3.1 + '@commitlint/types': 21.2.3 + es-toolkit: 1.52.0 - '@commitlint/execute-rule@20.0.0': {} + '@commitlint/execute-rule@21.0.1': {} - '@commitlint/format@20.5.0': + '@commitlint/format@21.2.3': dependencies: - '@commitlint/types': 20.5.0 + '@commitlint/types': 21.2.3 picocolors: 1.1.1 - '@commitlint/is-ignored@20.5.0': + '@commitlint/is-ignored@21.2.3': dependencies: - '@commitlint/types': 20.5.0 - semver: 7.7.4 + '@commitlint/types': 21.2.3 + semver: 7.8.5 - '@commitlint/lint@20.5.0': + '@commitlint/lint@21.2.3': dependencies: - '@commitlint/is-ignored': 20.5.0 - '@commitlint/parse': 20.5.0 - '@commitlint/rules': 20.5.0 - '@commitlint/types': 20.5.0 + '@commitlint/is-ignored': 21.2.3 + '@commitlint/parse': 21.2.3 + '@commitlint/rules': 21.2.3 + '@commitlint/types': 21.2.3 - '@commitlint/load@20.5.0(@types/node@25.5.0)(typescript@6.0.2)': + '@commitlint/load@21.2.3(@types/node@26.6.4)(typescript@6.0.3)': dependencies: - '@commitlint/config-validator': 20.5.0 - '@commitlint/execute-rule': 20.0.0 - '@commitlint/resolve-extends': 20.5.0 - '@commitlint/types': 20.5.0 - cosmiconfig: 9.0.1(typescript@6.0.2) - cosmiconfig-typescript-loader: 6.2.0(@types/node@25.5.0)(cosmiconfig@9.0.1(typescript@6.0.2))(typescript@6.0.2) + '@commitlint/config-validator': 21.2.3 + '@commitlint/execute-rule': 21.0.1 + '@commitlint/resolve-extends': 21.2.3 + '@commitlint/types': 21.2.3 + cosmiconfig: 9.0.2(typescript@6.0.3) + cosmiconfig-typescript-loader: 6.3.0(@types/node@26.6.4)(cosmiconfig@9.0.2(typescript@6.0.3))(typescript@6.0.3) + es-toolkit: 1.52.0 is-plain-obj: 4.1.0 - lodash.mergewith: 4.6.2 picocolors: 1.1.1 transitivePeerDependencies: - '@types/node' - typescript - '@commitlint/message@20.4.3': {} + '@commitlint/message@21.2.0': {} - '@commitlint/parse@20.5.0': + '@commitlint/parse@21.2.3': dependencies: - '@commitlint/types': 20.5.0 - conventional-changelog-angular: 8.3.1 - conventional-commits-parser: 6.4.0 + '@commitlint/types': 21.2.3 + conventional-changelog-angular: 9.4.0 + conventional-commits-parser: 7.1.3 - '@commitlint/read@20.5.0(conventional-commits-parser@6.4.0)': + '@commitlint/read@21.2.3(conventional-commits-parser@7.1.3)': dependencies: - '@commitlint/top-level': 20.4.3 - '@commitlint/types': 20.5.0 - git-raw-commits: 5.0.1(conventional-commits-parser@6.4.0) - minimist: 1.2.8 - tinyexec: 1.0.4 + '@commitlint/top-level': 21.2.0 + '@commitlint/types': 21.2.3 + '@conventional-changelog/git-client': 3.2.0(conventional-commits-parser@7.1.3) + tinyexec: 1.3.1 transitivePeerDependencies: - conventional-commits-filter - conventional-commits-parser - '@commitlint/resolve-extends@20.5.0': + '@commitlint/resolve-extends@21.2.3': dependencies: - '@commitlint/config-validator': 20.5.0 - '@commitlint/types': 20.5.0 - global-directory: 4.0.1 - import-meta-resolve: 4.2.0 - lodash.mergewith: 4.6.2 + '@commitlint/config-validator': 21.2.3 + '@commitlint/types': 21.2.3 + es-toolkit: 1.52.0 + global-directory: 5.0.0 resolve-from: 5.0.0 - '@commitlint/rules@20.5.0': + '@commitlint/rules@21.2.3': dependencies: - '@commitlint/ensure': 20.5.0 - '@commitlint/message': 20.4.3 - '@commitlint/to-lines': 20.0.0 - '@commitlint/types': 20.5.0 + '@commitlint/ensure': 21.2.3 + '@commitlint/message': 21.2.0 + '@commitlint/to-lines': 21.0.1 + '@commitlint/types': 21.2.3 - '@commitlint/to-lines@20.0.0': {} + '@commitlint/to-lines@21.0.1': {} - '@commitlint/top-level@20.4.3': + '@commitlint/top-level@21.2.0': dependencies: escalade: 3.2.0 - '@commitlint/types@20.5.0': + '@commitlint/types@21.2.3': dependencies: - conventional-commits-parser: 6.4.0 + conventional-commits-parser: 7.1.3 picocolors: 1.1.1 - '@conventional-changelog/git-client@2.6.0(conventional-commits-parser@6.4.0)': + '@conventional-changelog/git-client@3.2.0(conventional-commits-parser@7.1.3)': dependencies: - '@simple-libs/child-process-utils': 1.0.2 - '@simple-libs/stream-utils': 1.2.0 - semver: 7.7.4 + '@simple-libs/child-process-utils': 2.0.0 + '@simple-libs/stream-utils': 2.0.0 + verkit: 0.5.0 optionalDependencies: - conventional-commits-parser: 6.4.0 + conventional-commits-parser: 7.1.3 + + '@conventional-changelog/template@1.4.0': {} + + '@esbuild/aix-ppc64@0.27.7': + optional: true + + '@esbuild/aix-ppc64@0.28.2': + optional: true + + '@esbuild/android-arm64@0.27.7': + optional: true + + '@esbuild/android-arm64@0.28.2': + optional: true - '@esbuild/aix-ppc64@0.27.4': + '@esbuild/android-arm@0.27.7': optional: true - '@esbuild/android-arm64@0.27.4': + '@esbuild/android-arm@0.28.2': optional: true - '@esbuild/android-arm@0.27.4': + '@esbuild/android-x64@0.27.7': optional: true - '@esbuild/android-x64@0.27.4': + '@esbuild/android-x64@0.28.2': optional: true - '@esbuild/darwin-arm64@0.27.4': + '@esbuild/darwin-arm64@0.27.7': optional: true - '@esbuild/darwin-x64@0.27.4': + '@esbuild/darwin-arm64@0.28.2': optional: true - '@esbuild/freebsd-arm64@0.27.4': + '@esbuild/darwin-x64@0.27.7': optional: true - '@esbuild/freebsd-x64@0.27.4': + '@esbuild/darwin-x64@0.28.2': optional: true - '@esbuild/linux-arm64@0.27.4': + '@esbuild/freebsd-arm64@0.27.7': optional: true - '@esbuild/linux-arm@0.27.4': + '@esbuild/freebsd-arm64@0.28.2': optional: true - '@esbuild/linux-ia32@0.27.4': + '@esbuild/freebsd-x64@0.27.7': optional: true - '@esbuild/linux-loong64@0.27.4': + '@esbuild/freebsd-x64@0.28.2': optional: true - '@esbuild/linux-mips64el@0.27.4': + '@esbuild/linux-arm64@0.27.7': optional: true - '@esbuild/linux-ppc64@0.27.4': + '@esbuild/linux-arm64@0.28.2': optional: true - '@esbuild/linux-riscv64@0.27.4': + '@esbuild/linux-arm@0.27.7': optional: true - '@esbuild/linux-s390x@0.27.4': + '@esbuild/linux-arm@0.28.2': optional: true - '@esbuild/linux-x64@0.27.4': + '@esbuild/linux-ia32@0.27.7': optional: true - '@esbuild/netbsd-arm64@0.27.4': + '@esbuild/linux-ia32@0.28.2': optional: true - '@esbuild/netbsd-x64@0.27.4': + '@esbuild/linux-loong64@0.27.7': optional: true - '@esbuild/openbsd-arm64@0.27.4': + '@esbuild/linux-loong64@0.28.2': optional: true - '@esbuild/openbsd-x64@0.27.4': + '@esbuild/linux-mips64el@0.27.7': optional: true - '@esbuild/openharmony-arm64@0.27.4': + '@esbuild/linux-mips64el@0.28.2': optional: true - '@esbuild/sunos-x64@0.27.4': + '@esbuild/linux-ppc64@0.27.7': optional: true - '@esbuild/win32-arm64@0.27.4': + '@esbuild/linux-ppc64@0.28.2': optional: true - '@esbuild/win32-ia32@0.27.4': + '@esbuild/linux-riscv64@0.27.7': optional: true - '@esbuild/win32-x64@0.27.4': + '@esbuild/linux-riscv64@0.28.2': optional: true - '@inquirer/ansi@2.0.4': {} + '@esbuild/linux-s390x@0.27.7': + optional: true + + '@esbuild/linux-s390x@0.28.2': + optional: true + + '@esbuild/linux-x64@0.27.7': + optional: true + + '@esbuild/linux-x64@0.28.2': + optional: true + + '@esbuild/netbsd-arm64@0.27.7': + optional: true + + '@esbuild/netbsd-arm64@0.28.2': + optional: true + + '@esbuild/netbsd-x64@0.27.7': + optional: true + + '@esbuild/netbsd-x64@0.28.2': + optional: true + + '@esbuild/openbsd-arm64@0.27.7': + optional: true + + '@esbuild/openbsd-arm64@0.28.2': + optional: true + + '@esbuild/openbsd-x64@0.27.7': + optional: true + + '@esbuild/openbsd-x64@0.28.2': + optional: true + + '@esbuild/openharmony-arm64@0.27.7': + optional: true + + '@esbuild/openharmony-arm64@0.28.2': + optional: true + + '@esbuild/sunos-x64@0.27.7': + optional: true + + '@esbuild/sunos-x64@0.28.2': + optional: true + + '@esbuild/win32-arm64@0.27.7': + optional: true + + '@esbuild/win32-arm64@0.28.2': + optional: true + + '@esbuild/win32-ia32@0.27.7': + optional: true + + '@esbuild/win32-ia32@0.28.2': + optional: true + + '@esbuild/win32-x64@0.27.7': + optional: true + + '@esbuild/win32-x64@0.28.2': + optional: true + + '@inquirer/ansi@2.0.9': {} - '@inquirer/checkbox@5.1.2(@types/node@25.5.0)': + '@inquirer/checkbox@5.2.6(@types/node@26.6.4)': dependencies: - '@inquirer/ansi': 2.0.4 - '@inquirer/core': 11.1.7(@types/node@25.5.0) - '@inquirer/figures': 2.0.4 - '@inquirer/type': 4.0.4(@types/node@25.5.0) + '@inquirer/ansi': 2.0.9 + '@inquirer/core': 12.0.4(@types/node@26.6.4) + '@inquirer/figures': 2.0.9 + '@inquirer/type': 4.2.0(@types/node@26.6.4) optionalDependencies: - '@types/node': 25.5.0 + '@types/node': 26.6.4 - '@inquirer/confirm@6.0.10(@types/node@25.5.0)': + '@inquirer/confirm@6.3.3(@types/node@26.6.4)': dependencies: - '@inquirer/core': 11.1.7(@types/node@25.5.0) - '@inquirer/type': 4.0.4(@types/node@25.5.0) + '@inquirer/core': 12.0.4(@types/node@26.6.4) + '@inquirer/type': 4.2.0(@types/node@26.6.4) optionalDependencies: - '@types/node': 25.5.0 + '@types/node': 26.6.4 - '@inquirer/core@11.1.7(@types/node@25.5.0)': + '@inquirer/core@12.0.4(@types/node@26.6.4)': dependencies: - '@inquirer/ansi': 2.0.4 - '@inquirer/figures': 2.0.4 - '@inquirer/type': 4.0.4(@types/node@25.5.0) + '@inquirer/ansi': 2.0.9 + '@inquirer/figures': 2.0.9 + '@inquirer/type': 4.2.0(@types/node@26.6.4) cli-width: 4.1.0 - fast-wrap-ansi: 0.2.0 + fast-wrap-ansi: 0.2.2 mute-stream: 3.0.0 signal-exit: 4.1.0 optionalDependencies: - '@types/node': 25.5.0 + '@types/node': 26.6.4 - '@inquirer/editor@5.0.10(@types/node@25.5.0)': + '@inquirer/editor@5.3.4(@types/node@26.6.4)': dependencies: - '@inquirer/core': 11.1.7(@types/node@25.5.0) - '@inquirer/external-editor': 2.0.4(@types/node@25.5.0) - '@inquirer/type': 4.0.4(@types/node@25.5.0) + '@inquirer/core': 12.0.4(@types/node@26.6.4) + '@inquirer/external-editor': 3.0.6(@types/node@26.6.4) + '@inquirer/type': 4.2.0(@types/node@26.6.4) optionalDependencies: - '@types/node': 25.5.0 + '@types/node': 26.6.4 - '@inquirer/expand@5.0.10(@types/node@25.5.0)': + '@inquirer/expand@5.1.6(@types/node@26.6.4)': dependencies: - '@inquirer/core': 11.1.7(@types/node@25.5.0) - '@inquirer/type': 4.0.4(@types/node@25.5.0) + '@inquirer/core': 12.0.4(@types/node@26.6.4) + '@inquirer/type': 4.2.0(@types/node@26.6.4) optionalDependencies: - '@types/node': 25.5.0 + '@types/node': 26.6.4 - '@inquirer/external-editor@1.0.3(@types/node@25.5.0)': + '@inquirer/external-editor@3.0.6(@types/node@26.6.4)': dependencies: - chardet: 2.1.1 - iconv-lite: 0.7.2 + chardet: 2.2.0 + iconv-lite: 0.7.3 optionalDependencies: - '@types/node': 25.5.0 + '@types/node': 26.6.4 - '@inquirer/external-editor@2.0.4(@types/node@25.5.0)': - dependencies: - chardet: 2.1.1 - iconv-lite: 0.7.2 - optionalDependencies: - '@types/node': 25.5.0 + '@inquirer/figures@2.0.9': {} - '@inquirer/figures@2.0.4': {} - - '@inquirer/input@5.0.10(@types/node@25.5.0)': + '@inquirer/input@5.1.7(@types/node@26.6.4)': dependencies: - '@inquirer/core': 11.1.7(@types/node@25.5.0) - '@inquirer/type': 4.0.4(@types/node@25.5.0) + '@inquirer/core': 12.0.4(@types/node@26.6.4) + '@inquirer/type': 4.2.0(@types/node@26.6.4) optionalDependencies: - '@types/node': 25.5.0 + '@types/node': 26.6.4 - '@inquirer/number@4.0.10(@types/node@25.5.0)': + '@inquirer/number@4.2.4(@types/node@26.6.4)': dependencies: - '@inquirer/core': 11.1.7(@types/node@25.5.0) - '@inquirer/type': 4.0.4(@types/node@25.5.0) + '@inquirer/core': 12.0.4(@types/node@26.6.4) + '@inquirer/type': 4.2.0(@types/node@26.6.4) optionalDependencies: - '@types/node': 25.5.0 + '@types/node': 26.6.4 - '@inquirer/password@5.0.10(@types/node@25.5.0)': + '@inquirer/password@5.2.3(@types/node@26.6.4)': dependencies: - '@inquirer/ansi': 2.0.4 - '@inquirer/core': 11.1.7(@types/node@25.5.0) - '@inquirer/type': 4.0.4(@types/node@25.5.0) + '@inquirer/ansi': 2.0.9 + '@inquirer/core': 12.0.4(@types/node@26.6.4) + '@inquirer/type': 4.2.0(@types/node@26.6.4) optionalDependencies: - '@types/node': 25.5.0 - - '@inquirer/prompts@8.3.2(@types/node@25.5.0)': - dependencies: - '@inquirer/checkbox': 5.1.2(@types/node@25.5.0) - '@inquirer/confirm': 6.0.10(@types/node@25.5.0) - '@inquirer/editor': 5.0.10(@types/node@25.5.0) - '@inquirer/expand': 5.0.10(@types/node@25.5.0) - '@inquirer/input': 5.0.10(@types/node@25.5.0) - '@inquirer/number': 4.0.10(@types/node@25.5.0) - '@inquirer/password': 5.0.10(@types/node@25.5.0) - '@inquirer/rawlist': 5.2.6(@types/node@25.5.0) - '@inquirer/search': 4.1.6(@types/node@25.5.0) - '@inquirer/select': 5.1.2(@types/node@25.5.0) + '@types/node': 26.6.4 + + '@inquirer/prompts@8.7.3(@types/node@26.6.4)': + dependencies: + '@inquirer/checkbox': 5.2.6(@types/node@26.6.4) + '@inquirer/confirm': 6.3.3(@types/node@26.6.4) + '@inquirer/editor': 5.3.4(@types/node@26.6.4) + '@inquirer/expand': 5.1.6(@types/node@26.6.4) + '@inquirer/input': 5.1.7(@types/node@26.6.4) + '@inquirer/number': 4.2.4(@types/node@26.6.4) + '@inquirer/password': 5.2.3(@types/node@26.6.4) + '@inquirer/rawlist': 5.3.6(@types/node@26.6.4) + '@inquirer/search': 4.3.4(@types/node@26.6.4) + '@inquirer/select': 5.2.6(@types/node@26.6.4) optionalDependencies: - '@types/node': 25.5.0 + '@types/node': 26.6.4 - '@inquirer/rawlist@5.2.6(@types/node@25.5.0)': + '@inquirer/rawlist@5.3.6(@types/node@26.6.4)': dependencies: - '@inquirer/core': 11.1.7(@types/node@25.5.0) - '@inquirer/type': 4.0.4(@types/node@25.5.0) + '@inquirer/core': 12.0.4(@types/node@26.6.4) + '@inquirer/type': 4.2.0(@types/node@26.6.4) optionalDependencies: - '@types/node': 25.5.0 + '@types/node': 26.6.4 - '@inquirer/search@4.1.6(@types/node@25.5.0)': + '@inquirer/search@4.3.4(@types/node@26.6.4)': dependencies: - '@inquirer/core': 11.1.7(@types/node@25.5.0) - '@inquirer/figures': 2.0.4 - '@inquirer/type': 4.0.4(@types/node@25.5.0) + '@inquirer/core': 12.0.4(@types/node@26.6.4) + '@inquirer/figures': 2.0.9 + '@inquirer/type': 4.2.0(@types/node@26.6.4) optionalDependencies: - '@types/node': 25.5.0 + '@types/node': 26.6.4 - '@inquirer/select@5.1.2(@types/node@25.5.0)': + '@inquirer/select@5.2.6(@types/node@26.6.4)': dependencies: - '@inquirer/ansi': 2.0.4 - '@inquirer/core': 11.1.7(@types/node@25.5.0) - '@inquirer/figures': 2.0.4 - '@inquirer/type': 4.0.4(@types/node@25.5.0) + '@inquirer/ansi': 2.0.9 + '@inquirer/core': 12.0.4(@types/node@26.6.4) + '@inquirer/figures': 2.0.9 + '@inquirer/type': 4.2.0(@types/node@26.6.4) optionalDependencies: - '@types/node': 25.5.0 + '@types/node': 26.6.4 - '@inquirer/type@4.0.4(@types/node@25.5.0)': + '@inquirer/type@4.2.0(@types/node@26.6.4)': optionalDependencies: - '@types/node': 25.5.0 + '@types/node': 26.6.4 '@jridgewell/gen-mapping@0.3.13': dependencies: - '@jridgewell/sourcemap-codec': 1.5.5 + '@jridgewell/sourcemap-codec': 1.6.0 '@jridgewell/trace-mapping': 0.3.31 '@jridgewell/resolve-uri@3.1.2': {} - '@jridgewell/sourcemap-codec@1.5.5': {} + '@jridgewell/sourcemap-codec@1.6.0': {} '@jridgewell/trace-mapping@0.3.31': dependencies: '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.5 + '@jridgewell/sourcemap-codec': 1.6.0 + + '@manypkg/find-root@3.1.0': + dependencies: + '@manypkg/tools': 2.1.2 - '@manypkg/find-root@1.1.0': + '@manypkg/get-packages@3.1.0': dependencies: - '@babel/runtime': 7.29.2 - '@types/node': 12.20.55 - find-up: 4.1.0 - fs-extra: 8.1.0 + '@manypkg/find-root': 3.1.0 + '@manypkg/tools': 2.1.2 - '@manypkg/get-packages@1.1.3': + '@manypkg/tools@2.1.2': dependencies: - '@babel/runtime': 7.29.2 - '@changesets/types': 4.1.0 - '@manypkg/find-root': 1.1.0 - fs-extra: 8.1.0 - globby: 11.1.0 - read-yaml-file: 1.1.0 + jju: 1.4.0 + tinyglobby: 0.2.17 + yaml: 2.9.1 + + '@napi-rs/lzma-linux-x64-gnu@1.5.1': + optional: true '@nodelib/fs.scandir@2.1.5': dependencies: @@ -2348,344 +2311,300 @@ snapshots: '@nodelib/fs.walk@1.2.8': dependencies: '@nodelib/fs.scandir': 2.1.5 - fastq: 1.20.1 + fastq: 1.20.3 - '@oxfmt/binding-android-arm-eabi@0.44.0': + '@oxfmt/binding-android-arm-eabi@0.72.0': optional: true - '@oxfmt/binding-android-arm64@0.44.0': + '@oxfmt/binding-android-arm64@0.72.0': optional: true - '@oxfmt/binding-darwin-arm64@0.44.0': + '@oxfmt/binding-darwin-arm64@0.72.0': optional: true - '@oxfmt/binding-darwin-x64@0.44.0': + '@oxfmt/binding-darwin-x64@0.72.0': optional: true - '@oxfmt/binding-freebsd-x64@0.44.0': + '@oxfmt/binding-freebsd-x64@0.72.0': optional: true - '@oxfmt/binding-linux-arm-gnueabihf@0.44.0': + '@oxfmt/binding-linux-arm-gnueabihf@0.72.0': optional: true - '@oxfmt/binding-linux-arm-musleabihf@0.44.0': + '@oxfmt/binding-linux-arm-musleabihf@0.72.0': optional: true - '@oxfmt/binding-linux-arm64-gnu@0.44.0': + '@oxfmt/binding-linux-arm64-gnu@0.72.0': optional: true - '@oxfmt/binding-linux-arm64-musl@0.44.0': + '@oxfmt/binding-linux-arm64-musl@0.72.0': optional: true - '@oxfmt/binding-linux-ppc64-gnu@0.44.0': + '@oxfmt/binding-linux-ppc64-gnu@0.72.0': optional: true - '@oxfmt/binding-linux-riscv64-gnu@0.44.0': + '@oxfmt/binding-linux-riscv64-gnu@0.72.0': optional: true - '@oxfmt/binding-linux-riscv64-musl@0.44.0': + '@oxfmt/binding-linux-riscv64-musl@0.72.0': optional: true - '@oxfmt/binding-linux-s390x-gnu@0.44.0': + '@oxfmt/binding-linux-s390x-gnu@0.72.0': optional: true - '@oxfmt/binding-linux-x64-gnu@0.44.0': + '@oxfmt/binding-linux-x64-gnu@0.72.0': optional: true - '@oxfmt/binding-linux-x64-musl@0.44.0': + '@oxfmt/binding-linux-x64-musl@0.72.0': optional: true - '@oxfmt/binding-openharmony-arm64@0.44.0': + '@oxfmt/binding-openharmony-arm64@0.72.0': optional: true - '@oxfmt/binding-win32-arm64-msvc@0.44.0': + '@oxfmt/binding-win32-arm64-msvc@0.72.0': optional: true - '@oxfmt/binding-win32-ia32-msvc@0.44.0': + '@oxfmt/binding-win32-ia32-msvc@0.72.0': optional: true - '@oxfmt/binding-win32-x64-msvc@0.44.0': + '@oxfmt/binding-win32-x64-msvc@0.72.0': optional: true - '@oxlint/binding-android-arm-eabi@1.59.0': + '@oxlint/binding-android-arm-eabi@1.87.0': optional: true - '@oxlint/binding-android-arm64@1.59.0': + '@oxlint/binding-android-arm64@1.87.0': optional: true - '@oxlint/binding-darwin-arm64@1.59.0': + '@oxlint/binding-darwin-arm64@1.87.0': optional: true - '@oxlint/binding-darwin-x64@1.59.0': + '@oxlint/binding-darwin-x64@1.87.0': optional: true - '@oxlint/binding-freebsd-x64@1.59.0': + '@oxlint/binding-freebsd-x64@1.87.0': optional: true - '@oxlint/binding-linux-arm-gnueabihf@1.59.0': + '@oxlint/binding-linux-arm-gnueabihf@1.87.0': optional: true - '@oxlint/binding-linux-arm-musleabihf@1.59.0': + '@oxlint/binding-linux-arm-musleabihf@1.87.0': optional: true - '@oxlint/binding-linux-arm64-gnu@1.59.0': + '@oxlint/binding-linux-arm64-gnu@1.87.0': optional: true - '@oxlint/binding-linux-arm64-musl@1.59.0': + '@oxlint/binding-linux-arm64-musl@1.87.0': optional: true - '@oxlint/binding-linux-ppc64-gnu@1.59.0': + '@oxlint/binding-linux-ppc64-gnu@1.87.0': optional: true - '@oxlint/binding-linux-riscv64-gnu@1.59.0': + '@oxlint/binding-linux-riscv64-gnu@1.87.0': optional: true - '@oxlint/binding-linux-riscv64-musl@1.59.0': + '@oxlint/binding-linux-riscv64-musl@1.87.0': optional: true - '@oxlint/binding-linux-s390x-gnu@1.59.0': + '@oxlint/binding-linux-s390x-gnu@1.87.0': optional: true - '@oxlint/binding-linux-x64-gnu@1.59.0': + '@oxlint/binding-linux-x64-gnu@1.87.0': optional: true - '@oxlint/binding-linux-x64-musl@1.59.0': + '@oxlint/binding-linux-x64-musl@1.87.0': optional: true - '@oxlint/binding-openharmony-arm64@1.59.0': + '@oxlint/binding-openharmony-arm64@1.87.0': optional: true - '@oxlint/binding-win32-arm64-msvc@1.59.0': + '@oxlint/binding-win32-arm64-msvc@1.87.0': optional: true - '@oxlint/binding-win32-ia32-msvc@1.59.0': + '@oxlint/binding-win32-ia32-msvc@1.87.0': optional: true - '@oxlint/binding-win32-x64-msvc@1.59.0': + '@oxlint/binding-win32-x64-msvc@1.87.0': optional: true - '@rollup/rollup-android-arm-eabi@4.60.1': + '@pnpm/deps.graph-sequencer@1100.0.1': {} + + '@rollup/rollup-android-arm-eabi@4.64.3': optional: true - '@rollup/rollup-android-arm64@4.60.1': + '@rollup/rollup-android-arm64@4.64.3': optional: true - '@rollup/rollup-darwin-arm64@4.60.1': + '@rollup/rollup-darwin-arm64@4.64.3': optional: true - '@rollup/rollup-darwin-x64@4.60.1': + '@rollup/rollup-darwin-x64@4.64.3': optional: true - '@rollup/rollup-freebsd-arm64@4.60.1': + '@rollup/rollup-freebsd-arm64@4.64.3': optional: true - '@rollup/rollup-freebsd-x64@4.60.1': + '@rollup/rollup-freebsd-x64@4.64.3': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.60.1': + '@rollup/rollup-linux-arm-gnueabihf@4.64.3': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.60.1': + '@rollup/rollup-linux-arm-musleabihf@4.64.3': optional: true - '@rollup/rollup-linux-arm64-gnu@4.60.1': + '@rollup/rollup-linux-arm64-gnu@4.64.3': optional: true - '@rollup/rollup-linux-arm64-musl@4.60.1': + '@rollup/rollup-linux-arm64-musl@4.64.3': optional: true - '@rollup/rollup-linux-loong64-gnu@4.60.1': + '@rollup/rollup-linux-loong64-gnu@4.64.3': optional: true - '@rollup/rollup-linux-loong64-musl@4.60.1': + '@rollup/rollup-linux-loong64-musl@4.64.3': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.60.1': + '@rollup/rollup-linux-ppc64-gnu@4.64.3': optional: true - '@rollup/rollup-linux-ppc64-musl@4.60.1': + '@rollup/rollup-linux-ppc64-musl@4.64.3': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.60.1': + '@rollup/rollup-linux-riscv64-gnu@4.64.3': optional: true - '@rollup/rollup-linux-riscv64-musl@4.60.1': + '@rollup/rollup-linux-riscv64-musl@4.64.3': optional: true - '@rollup/rollup-linux-s390x-gnu@4.60.1': + '@rollup/rollup-linux-s390x-gnu@4.64.3': optional: true - '@rollup/rollup-linux-x64-gnu@4.60.1': + '@rollup/rollup-linux-x64-gnu@4.64.3': optional: true - '@rollup/rollup-linux-x64-musl@4.60.1': + '@rollup/rollup-linux-x64-musl@4.64.3': optional: true - '@rollup/rollup-openbsd-x64@4.60.1': + '@rollup/rollup-openbsd-x64@4.64.3': optional: true - '@rollup/rollup-openharmony-arm64@4.60.1': + '@rollup/rollup-openharmony-arm64@4.64.3': optional: true - '@rollup/rollup-win32-arm64-msvc@4.60.1': + '@rollup/rollup-win32-arm64-msvc@4.64.3': optional: true - '@rollup/rollup-win32-ia32-msvc@4.60.1': + '@rollup/rollup-win32-ia32-msvc@4.64.3': optional: true - '@rollup/rollup-win32-x64-gnu@4.60.1': + '@rollup/rollup-win32-x64-gnu@4.64.3': optional: true - '@rollup/rollup-win32-x64-msvc@4.60.1': + '@rollup/rollup-win32-x64-msvc@4.64.3': optional: true - '@simple-libs/child-process-utils@1.0.2': + '@simple-libs/child-process-utils@2.0.0': dependencies: - '@simple-libs/stream-utils': 1.2.0 + '@simple-libs/stream-utils': 2.0.0 - '@simple-libs/stream-utils@1.2.0': {} + '@simple-libs/stream-utils@2.0.0': {} - '@types/estree@1.0.8': {} + '@types/estree@1.0.9': {} - '@types/node@12.20.55': {} - - '@types/node@25.5.0': + '@types/node@26.6.4': dependencies: - undici-types: 7.18.2 + undici-types: 8.9.0 '@types/shelljs@0.10.0': dependencies: - '@types/node': 25.5.0 + '@types/node': 26.6.4 fast-glob: 3.3.3 - acorn@8.16.0: {} + acorn@8.19.0: {} - ajv@8.18.0: + ajv@8.20.0: dependencies: fast-deep-equal: 3.1.3 - fast-uri: 3.1.0 + fast-uri: 3.1.8 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 - ansi-colors@4.1.3: {} - - ansi-escapes@7.3.0: - dependencies: - environment: 1.1.0 - - ansi-regex@5.0.1: {} - - ansi-regex@6.2.2: {} - - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 + ansi-regex@6.4.0: {} ansi-styles@6.2.3: {} any-promise@1.3.0: {} - argparse@1.0.10: - dependencies: - sprintf-js: 1.0.3 - argparse@2.0.1: {} - array-ify@1.0.0: {} - - array-union@2.1.0: {} - - better-path-resolve@1.0.0: - dependencies: - is-windows: 1.0.2 + argue-cli@3.2.0: {} braces@3.0.3: dependencies: fill-range: 7.1.1 - bundle-require@5.1.0(esbuild@0.27.4): + bundle-require@5.1.0(esbuild@0.27.7): dependencies: - esbuild: 0.27.4 + esbuild: 0.27.7 load-tsconfig: 0.2.5 cac@6.7.14: {} + cac@7.0.1: {} + callsites@3.1.0: {} - chalk@5.6.2: {} + chalk@6.0.1: {} - chardet@2.1.1: {} + chardet@2.2.0: {} chokidar@4.0.3: dependencies: readdirp: 4.1.2 - cli-cursor@5.0.0: - dependencies: - restore-cursor: 5.1.0 - - cli-truncate@5.2.0: - dependencies: - slice-ansi: 8.0.0 - string-width: 8.2.0 - cli-width@4.1.0: {} - cliui@8.0.1: - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - - color-convert@2.0.1: + cliui@9.0.1: dependencies: - color-name: 1.1.4 - - color-name@1.1.4: {} - - colorette@2.0.20: {} - - commander@14.0.3: {} + string-width: 7.2.0 + strip-ansi: 7.2.0 + wrap-ansi: 9.0.2 commander@4.1.1: {} - compare-func@2.0.0: - dependencies: - array-ify: 1.0.0 - dot-prop: 5.3.0 - confbox@0.1.8: {} consola@3.4.2: {} - conventional-changelog-angular@8.3.1: + conventional-changelog-angular@9.4.0: dependencies: - compare-func: 2.0.0 + '@conventional-changelog/template': 1.4.0 - conventional-changelog-conventionalcommits@9.3.1: + conventional-changelog-conventionalcommits@10.4.1: dependencies: - compare-func: 2.0.0 + '@conventional-changelog/template': 1.4.0 - conventional-commits-parser@6.4.0: + conventional-commits-parser@7.1.3: dependencies: - '@simple-libs/stream-utils': 1.2.0 - meow: 13.2.0 + '@simple-libs/stream-utils': 2.0.0 + argue-cli: 3.2.0 - cosmiconfig-typescript-loader@6.2.0(@types/node@25.5.0)(cosmiconfig@9.0.1(typescript@6.0.2))(typescript@6.0.2): + cosmiconfig-typescript-loader@6.3.0(@types/node@26.6.4)(cosmiconfig@9.0.2(typescript@6.0.3))(typescript@6.0.3): dependencies: - '@types/node': 25.5.0 - cosmiconfig: 9.0.1(typescript@6.0.2) + '@types/node': 26.6.4 + cosmiconfig: 9.0.2(typescript@6.0.3) jiti: 2.6.1 - typescript: 6.0.2 + typescript: 6.0.3 - cosmiconfig@9.0.1(typescript@6.0.2): + cosmiconfig@9.0.2(typescript@6.0.3): dependencies: env-paths: 2.2.1 import-fresh: 3.3.1 - js-yaml: 4.1.1 + js-yaml: 4.3.2 parse-json: 5.2.0 optionalDependencies: - typescript: 6.0.2 + typescript: 6.0.3 cross-spawn@7.0.6: dependencies: @@ -2697,68 +2616,76 @@ snapshots: dependencies: ms: 2.1.3 - detect-indent@6.1.0: {} - - dir-glob@3.0.1: - dependencies: - path-type: 4.0.0 - - dot-prop@5.3.0: - dependencies: - is-obj: 2.0.0 - emoji-regex@10.6.0: {} - emoji-regex@8.0.0: {} - - enquirer@2.4.1: - dependencies: - ansi-colors: 4.1.3 - strip-ansi: 6.0.1 - env-paths@2.2.1: {} - environment@1.1.0: {} - error-ex@1.3.4: dependencies: is-arrayish: 0.2.1 - esbuild@0.27.4: + es-toolkit@1.52.0: {} + + esbuild@0.27.7: + optionalDependencies: + '@esbuild/aix-ppc64': 0.27.7 + '@esbuild/android-arm': 0.27.7 + '@esbuild/android-arm64': 0.27.7 + '@esbuild/android-x64': 0.27.7 + '@esbuild/darwin-arm64': 0.27.7 + '@esbuild/darwin-x64': 0.27.7 + '@esbuild/freebsd-arm64': 0.27.7 + '@esbuild/freebsd-x64': 0.27.7 + '@esbuild/linux-arm': 0.27.7 + '@esbuild/linux-arm64': 0.27.7 + '@esbuild/linux-ia32': 0.27.7 + '@esbuild/linux-loong64': 0.27.7 + '@esbuild/linux-mips64el': 0.27.7 + '@esbuild/linux-ppc64': 0.27.7 + '@esbuild/linux-riscv64': 0.27.7 + '@esbuild/linux-s390x': 0.27.7 + '@esbuild/linux-x64': 0.27.7 + '@esbuild/netbsd-arm64': 0.27.7 + '@esbuild/netbsd-x64': 0.27.7 + '@esbuild/openbsd-arm64': 0.27.7 + '@esbuild/openbsd-x64': 0.27.7 + '@esbuild/openharmony-arm64': 0.27.7 + '@esbuild/sunos-x64': 0.27.7 + '@esbuild/win32-arm64': 0.27.7 + '@esbuild/win32-ia32': 0.27.7 + '@esbuild/win32-x64': 0.27.7 + + esbuild@0.28.2: optionalDependencies: - '@esbuild/aix-ppc64': 0.27.4 - '@esbuild/android-arm': 0.27.4 - '@esbuild/android-arm64': 0.27.4 - '@esbuild/android-x64': 0.27.4 - '@esbuild/darwin-arm64': 0.27.4 - '@esbuild/darwin-x64': 0.27.4 - '@esbuild/freebsd-arm64': 0.27.4 - '@esbuild/freebsd-x64': 0.27.4 - '@esbuild/linux-arm': 0.27.4 - '@esbuild/linux-arm64': 0.27.4 - '@esbuild/linux-ia32': 0.27.4 - '@esbuild/linux-loong64': 0.27.4 - '@esbuild/linux-mips64el': 0.27.4 - '@esbuild/linux-ppc64': 0.27.4 - '@esbuild/linux-riscv64': 0.27.4 - '@esbuild/linux-s390x': 0.27.4 - '@esbuild/linux-x64': 0.27.4 - '@esbuild/netbsd-arm64': 0.27.4 - '@esbuild/netbsd-x64': 0.27.4 - '@esbuild/openbsd-arm64': 0.27.4 - '@esbuild/openbsd-x64': 0.27.4 - '@esbuild/openharmony-arm64': 0.27.4 - '@esbuild/sunos-x64': 0.27.4 - '@esbuild/win32-arm64': 0.27.4 - '@esbuild/win32-ia32': 0.27.4 - '@esbuild/win32-x64': 0.27.4 + '@esbuild/aix-ppc64': 0.28.2 + '@esbuild/android-arm': 0.28.2 + '@esbuild/android-arm64': 0.28.2 + '@esbuild/android-x64': 0.28.2 + '@esbuild/darwin-arm64': 0.28.2 + '@esbuild/darwin-x64': 0.28.2 + '@esbuild/freebsd-arm64': 0.28.2 + '@esbuild/freebsd-x64': 0.28.2 + '@esbuild/linux-arm': 0.28.2 + '@esbuild/linux-arm64': 0.28.2 + '@esbuild/linux-ia32': 0.28.2 + '@esbuild/linux-loong64': 0.28.2 + '@esbuild/linux-mips64el': 0.28.2 + '@esbuild/linux-ppc64': 0.28.2 + '@esbuild/linux-riscv64': 0.28.2 + '@esbuild/linux-s390x': 0.28.2 + '@esbuild/linux-x64': 0.28.2 + '@esbuild/netbsd-arm64': 0.28.2 + '@esbuild/netbsd-x64': 0.28.2 + '@esbuild/openbsd-arm64': 0.28.2 + '@esbuild/openbsd-x64': 0.28.2 + '@esbuild/openharmony-arm64': 0.28.2 + '@esbuild/sunos-x64': 0.28.2 + '@esbuild/win32-arm64': 0.28.2 + '@esbuild/win32-ia32': 0.28.2 + '@esbuild/win32-x64': 0.28.2 escalade@3.2.0: {} - esprima@4.0.1: {} - - eventemitter3@5.0.4: {} - execa@5.1.1: dependencies: cross-spawn: 7.0.6 @@ -2771,8 +2698,6 @@ snapshots: signal-exit: 3.0.7 strip-final-newline: 2.0.0 - extendable-error@0.1.7: {} - fast-deep-equal@3.1.3: {} fast-glob@3.3.3: @@ -2789,101 +2714,59 @@ snapshots: dependencies: fast-string-truncated-width: 3.0.3 - fast-uri@3.1.0: {} + fast-uri@3.1.8: {} - fast-wrap-ansi@0.2.0: + fast-wrap-ansi@0.2.2: dependencies: fast-string-width: 3.0.2 - fastq@1.20.1: + fastq@1.20.3: dependencies: reusify: 1.1.0 - fdir@6.5.0(picomatch@4.0.4): + fdir@6.5.0(picomatch@4.0.7): optionalDependencies: - picomatch: 4.0.4 + picomatch: 4.0.7 fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 - find-up@4.1.0: - dependencies: - locate-path: 5.0.0 - path-exists: 4.0.0 - fix-dts-default-cjs-exports@1.0.1: dependencies: magic-string: 0.30.21 mlly: 1.8.2 - rollup: 4.60.1 - - fs-extra@7.0.1: - dependencies: - graceful-fs: 4.2.11 - jsonfile: 4.0.0 - universalify: 0.1.2 - - fs-extra@8.1.0: - dependencies: - graceful-fs: 4.2.11 - jsonfile: 4.0.0 - universalify: 0.1.2 + rollup: 4.64.3 fsevents@2.3.3: optional: true get-caller-file@2.0.5: {} - get-east-asian-width@1.5.0: {} + get-east-asian-width@1.7.0: {} get-stream@6.0.1: {} - get-tsconfig@4.13.7: - dependencies: - resolve-pkg-maps: 1.0.0 - - git-raw-commits@5.0.1(conventional-commits-parser@6.4.0): - dependencies: - '@conventional-changelog/git-client': 2.6.0(conventional-commits-parser@6.4.0) - meow: 13.2.0 - transitivePeerDependencies: - - conventional-commits-filter - - conventional-commits-parser - glob-parent@5.1.2: dependencies: is-glob: 4.0.3 - global-directory@4.0.1: - dependencies: - ini: 4.1.1 - - globals@17.4.0: {} - - globby@11.1.0: + global-directory@5.0.0: dependencies: - array-union: 2.1.0 - dir-glob: 3.0.1 - fast-glob: 3.3.3 - ignore: 5.3.2 - merge2: 1.4.1 - slash: 3.0.0 + ini: 6.0.0 - graceful-fs@4.2.11: {} + globals@17.13.0: {} - human-id@4.1.3: {} + human-id@4.2.2: {} human-signals@2.1.0: {} husky@9.1.7: {} - iconv-lite@0.7.2: + iconv-lite@0.7.3: dependencies: safer-buffer: 2.1.2 - ignore@5.3.2: {} - import-fresh@3.3.1: dependencies: parent-module: 1.0.1 @@ -2891,50 +2774,33 @@ snapshots: import-meta-resolve@4.2.0: {} - ini@4.1.1: {} + ini@6.0.0: {} is-arrayish@0.2.1: {} is-extglob@2.1.1: {} - is-fullwidth-code-point@3.0.0: {} - - is-fullwidth-code-point@5.1.0: - dependencies: - get-east-asian-width: 1.5.0 - is-glob@4.0.3: dependencies: is-extglob: 2.1.1 is-number@7.0.0: {} - is-obj@2.0.0: {} - is-plain-obj@4.1.0: {} is-stream@2.0.1: {} - is-subdir@1.2.0: - dependencies: - better-path-resolve: 1.0.0 - - is-windows@1.0.2: {} - isexe@2.0.0: {} jiti@2.6.1: {} + jju@1.4.0: {} + joycon@3.1.1: {} js-tokens@4.0.0: {} - js-yaml@3.14.2: - dependencies: - argparse: 1.0.10 - esprima: 4.0.1 - - js-yaml@4.1.1: + js-yaml@4.3.2: dependencies: argparse: 2.0.1 @@ -2942,63 +2808,30 @@ snapshots: json-schema-traverse@1.0.0: {} - jsonfile@4.0.0: - optionalDependencies: - graceful-fs: 4.2.11 + jsonc-parser@3.3.1: {} + + launch-editor@2.14.2: + dependencies: + picocolors: 1.1.1 + shell-quote: 1.12.0 lilconfig@3.1.3: {} lines-and-columns@1.2.4: {} - lint-staged@16.4.0: + lint-staged@17.6.0: dependencies: - commander: 14.0.3 - listr2: 9.0.5 - picomatch: 4.0.4 + picomatch: 4.0.7 string-argv: 0.3.2 - tinyexec: 1.0.4 - yaml: 2.8.3 - - listr2@9.0.5: - dependencies: - cli-truncate: 5.2.0 - colorette: 2.0.20 - eventemitter3: 5.0.4 - log-update: 6.1.0 - rfdc: 1.4.1 - wrap-ansi: 9.0.2 + tinyexec: 1.3.1 + optionalDependencies: + yaml: 2.9.1 load-tsconfig@0.2.5: {} - locate-path@5.0.0: - dependencies: - p-locate: 4.1.0 - - lodash.camelcase@4.3.0: {} - - lodash.kebabcase@4.1.1: {} - - lodash.mergewith@4.6.2: {} - - lodash.snakecase@4.1.1: {} - - lodash.startcase@4.4.0: {} - - lodash.upperfirst@4.3.1: {} - - log-update@6.1.0: - dependencies: - ansi-escapes: 7.3.0 - cli-cursor: 5.0.0 - slice-ansi: 7.1.2 - strip-ansi: 7.2.0 - wrap-ansi: 9.0.2 - magic-string@0.30.21: dependencies: - '@jridgewell/sourcemap-codec': 1.5.5 - - meow@13.2.0: {} + '@jridgewell/sourcemap-codec': 1.6.0 merge-stream@2.0.0: {} @@ -3011,18 +2844,12 @@ snapshots: mimic-fn@2.1.0: {} - mimic-function@5.0.1: {} - - minimist@1.2.8: {} - mlly@1.8.2: dependencies: - acorn: 8.16.0 + acorn: 8.19.0 pathe: 2.0.3 pkg-types: 1.3.1 - ufo: 1.6.3 - - mri@1.2.0: {} + ufo: 1.6.4 ms@2.1.3: {} @@ -3044,77 +2871,53 @@ snapshots: dependencies: mimic-fn: 2.1.0 - onetime@7.0.0: - dependencies: - mimic-function: 5.0.1 - - outdent@0.5.0: {} - - oxfmt@0.44.0: + oxfmt@0.72.0: dependencies: - tinypool: 2.1.0 + tinypool: 2.2.0 optionalDependencies: - '@oxfmt/binding-android-arm-eabi': 0.44.0 - '@oxfmt/binding-android-arm64': 0.44.0 - '@oxfmt/binding-darwin-arm64': 0.44.0 - '@oxfmt/binding-darwin-x64': 0.44.0 - '@oxfmt/binding-freebsd-x64': 0.44.0 - '@oxfmt/binding-linux-arm-gnueabihf': 0.44.0 - '@oxfmt/binding-linux-arm-musleabihf': 0.44.0 - '@oxfmt/binding-linux-arm64-gnu': 0.44.0 - '@oxfmt/binding-linux-arm64-musl': 0.44.0 - '@oxfmt/binding-linux-ppc64-gnu': 0.44.0 - '@oxfmt/binding-linux-riscv64-gnu': 0.44.0 - '@oxfmt/binding-linux-riscv64-musl': 0.44.0 - '@oxfmt/binding-linux-s390x-gnu': 0.44.0 - '@oxfmt/binding-linux-x64-gnu': 0.44.0 - '@oxfmt/binding-linux-x64-musl': 0.44.0 - '@oxfmt/binding-openharmony-arm64': 0.44.0 - '@oxfmt/binding-win32-arm64-msvc': 0.44.0 - '@oxfmt/binding-win32-ia32-msvc': 0.44.0 - '@oxfmt/binding-win32-x64-msvc': 0.44.0 - - oxlint@1.59.0: + '@oxfmt/binding-android-arm-eabi': 0.72.0 + '@oxfmt/binding-android-arm64': 0.72.0 + '@oxfmt/binding-darwin-arm64': 0.72.0 + '@oxfmt/binding-darwin-x64': 0.72.0 + '@oxfmt/binding-freebsd-x64': 0.72.0 + '@oxfmt/binding-linux-arm-gnueabihf': 0.72.0 + '@oxfmt/binding-linux-arm-musleabihf': 0.72.0 + '@oxfmt/binding-linux-arm64-gnu': 0.72.0 + '@oxfmt/binding-linux-arm64-musl': 0.72.0 + '@oxfmt/binding-linux-ppc64-gnu': 0.72.0 + '@oxfmt/binding-linux-riscv64-gnu': 0.72.0 + '@oxfmt/binding-linux-riscv64-musl': 0.72.0 + '@oxfmt/binding-linux-s390x-gnu': 0.72.0 + '@oxfmt/binding-linux-x64-gnu': 0.72.0 + '@oxfmt/binding-linux-x64-musl': 0.72.0 + '@oxfmt/binding-openharmony-arm64': 0.72.0 + '@oxfmt/binding-win32-arm64-msvc': 0.72.0 + '@oxfmt/binding-win32-ia32-msvc': 0.72.0 + '@oxfmt/binding-win32-x64-msvc': 0.72.0 + + oxlint@1.87.0: optionalDependencies: - '@oxlint/binding-android-arm-eabi': 1.59.0 - '@oxlint/binding-android-arm64': 1.59.0 - '@oxlint/binding-darwin-arm64': 1.59.0 - '@oxlint/binding-darwin-x64': 1.59.0 - '@oxlint/binding-freebsd-x64': 1.59.0 - '@oxlint/binding-linux-arm-gnueabihf': 1.59.0 - '@oxlint/binding-linux-arm-musleabihf': 1.59.0 - '@oxlint/binding-linux-arm64-gnu': 1.59.0 - '@oxlint/binding-linux-arm64-musl': 1.59.0 - '@oxlint/binding-linux-ppc64-gnu': 1.59.0 - '@oxlint/binding-linux-riscv64-gnu': 1.59.0 - '@oxlint/binding-linux-riscv64-musl': 1.59.0 - '@oxlint/binding-linux-s390x-gnu': 1.59.0 - '@oxlint/binding-linux-x64-gnu': 1.59.0 - '@oxlint/binding-linux-x64-musl': 1.59.0 - '@oxlint/binding-openharmony-arm64': 1.59.0 - '@oxlint/binding-win32-arm64-msvc': 1.59.0 - '@oxlint/binding-win32-ia32-msvc': 1.59.0 - '@oxlint/binding-win32-x64-msvc': 1.59.0 - - p-filter@2.1.0: - dependencies: - p-map: 2.1.0 - - p-limit@2.3.0: - dependencies: - p-try: 2.2.0 - - p-locate@4.1.0: - dependencies: - p-limit: 2.3.0 - - p-map@2.1.0: {} - - p-try@2.2.0: {} - - package-manager-detector@0.2.11: - dependencies: - quansync: 0.2.11 + '@oxlint/binding-android-arm-eabi': 1.87.0 + '@oxlint/binding-android-arm64': 1.87.0 + '@oxlint/binding-darwin-arm64': 1.87.0 + '@oxlint/binding-darwin-x64': 1.87.0 + '@oxlint/binding-freebsd-x64': 1.87.0 + '@oxlint/binding-linux-arm-gnueabihf': 1.87.0 + '@oxlint/binding-linux-arm-musleabihf': 1.87.0 + '@oxlint/binding-linux-arm64-gnu': 1.87.0 + '@oxlint/binding-linux-arm64-musl': 1.87.0 + '@oxlint/binding-linux-ppc64-gnu': 1.87.0 + '@oxlint/binding-linux-riscv64-gnu': 1.87.0 + '@oxlint/binding-linux-riscv64-musl': 1.87.0 + '@oxlint/binding-linux-s390x-gnu': 1.87.0 + '@oxlint/binding-linux-x64-gnu': 1.87.0 + '@oxlint/binding-linux-x64-musl': 1.87.0 + '@oxlint/binding-openharmony-arm64': 1.87.0 + '@oxlint/binding-win32-arm64-msvc': 1.87.0 + '@oxlint/binding-win32-ia32-msvc': 1.87.0 + '@oxlint/binding-win32-x64-msvc': 1.87.0 + + package-manager-detector@1.9.0: {} parent-module@1.0.1: dependencies: @@ -3122,26 +2925,20 @@ snapshots: parse-json@5.2.0: dependencies: - '@babel/code-frame': 7.29.0 + '@babel/code-frame': 7.29.7 error-ex: 1.3.4 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 - path-exists@4.0.0: {} - path-key@3.1.1: {} - path-type@4.0.0: {} - pathe@2.0.3: {} picocolors@1.1.1: {} picomatch@2.3.2: {} - picomatch@4.0.4: {} - - pify@4.0.1: {} + picomatch@4.0.7: {} pirates@4.0.7: {} @@ -3151,77 +2948,56 @@ snapshots: mlly: 1.8.2 pathe: 2.0.3 - postcss-load-config@6.0.1(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3): + postcss-load-config@6.0.1(jiti@2.6.1)(tsx@4.23.15)(yaml@2.9.1): dependencies: lilconfig: 3.1.3 optionalDependencies: jiti: 2.6.1 - tsx: 4.21.0 - yaml: 2.8.3 - - prettier@2.8.8: {} - - quansync@0.2.11: {} + tsx: 4.23.15 + yaml: 2.9.1 queue-microtask@1.2.3: {} - read-yaml-file@1.1.0: - dependencies: - graceful-fs: 4.2.11 - js-yaml: 3.14.2 - pify: 4.0.1 - strip-bom: 3.0.0 - readdirp@4.1.2: {} - require-directory@2.1.1: {} - require-from-string@2.0.2: {} resolve-from@4.0.0: {} resolve-from@5.0.0: {} - resolve-pkg-maps@1.0.0: {} - - restore-cursor@5.1.0: - dependencies: - onetime: 7.0.0 - signal-exit: 4.1.0 - reusify@1.1.0: {} - rfdc@1.4.1: {} - - rollup@4.60.1: + rollup@4.64.3: dependencies: - '@types/estree': 1.0.8 + '@types/estree': 1.0.9 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.60.1 - '@rollup/rollup-android-arm64': 4.60.1 - '@rollup/rollup-darwin-arm64': 4.60.1 - '@rollup/rollup-darwin-x64': 4.60.1 - '@rollup/rollup-freebsd-arm64': 4.60.1 - '@rollup/rollup-freebsd-x64': 4.60.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.60.1 - '@rollup/rollup-linux-arm-musleabihf': 4.60.1 - '@rollup/rollup-linux-arm64-gnu': 4.60.1 - '@rollup/rollup-linux-arm64-musl': 4.60.1 - '@rollup/rollup-linux-loong64-gnu': 4.60.1 - '@rollup/rollup-linux-loong64-musl': 4.60.1 - '@rollup/rollup-linux-ppc64-gnu': 4.60.1 - '@rollup/rollup-linux-ppc64-musl': 4.60.1 - '@rollup/rollup-linux-riscv64-gnu': 4.60.1 - '@rollup/rollup-linux-riscv64-musl': 4.60.1 - '@rollup/rollup-linux-s390x-gnu': 4.60.1 - '@rollup/rollup-linux-x64-gnu': 4.60.1 - '@rollup/rollup-linux-x64-musl': 4.60.1 - '@rollup/rollup-openbsd-x64': 4.60.1 - '@rollup/rollup-openharmony-arm64': 4.60.1 - '@rollup/rollup-win32-arm64-msvc': 4.60.1 - '@rollup/rollup-win32-ia32-msvc': 4.60.1 - '@rollup/rollup-win32-x64-gnu': 4.60.1 - '@rollup/rollup-win32-x64-msvc': 4.60.1 + '@napi-rs/lzma-linux-x64-gnu': 1.5.1 + '@rollup/rollup-android-arm-eabi': 4.64.3 + '@rollup/rollup-android-arm64': 4.64.3 + '@rollup/rollup-darwin-arm64': 4.64.3 + '@rollup/rollup-darwin-x64': 4.64.3 + '@rollup/rollup-freebsd-arm64': 4.64.3 + '@rollup/rollup-freebsd-x64': 4.64.3 + '@rollup/rollup-linux-arm-gnueabihf': 4.64.3 + '@rollup/rollup-linux-arm-musleabihf': 4.64.3 + '@rollup/rollup-linux-arm64-gnu': 4.64.3 + '@rollup/rollup-linux-arm64-musl': 4.64.3 + '@rollup/rollup-linux-loong64-gnu': 4.64.3 + '@rollup/rollup-linux-loong64-musl': 4.64.3 + '@rollup/rollup-linux-ppc64-gnu': 4.64.3 + '@rollup/rollup-linux-ppc64-musl': 4.64.3 + '@rollup/rollup-linux-riscv64-gnu': 4.64.3 + '@rollup/rollup-linux-riscv64-musl': 4.64.3 + '@rollup/rollup-linux-s390x-gnu': 4.64.3 + '@rollup/rollup-linux-x64-gnu': 4.64.3 + '@rollup/rollup-linux-x64-musl': 4.64.3 + '@rollup/rollup-openbsd-x64': 4.64.3 + '@rollup/rollup-openharmony-arm64': 4.64.3 + '@rollup/rollup-win32-arm64-msvc': 4.64.3 + '@rollup/rollup-win32-ia32-msvc': 4.64.3 + '@rollup/rollup-win32-x64-gnu': 4.64.3 + '@rollup/rollup-win32-x64-msvc': 4.64.3 fsevents: 2.3.3 run-parallel@1.2.0: @@ -3230,7 +3006,7 @@ snapshots: safer-buffer@2.1.2: {} - semver@7.7.4: {} + semver@7.8.5: {} shebang-command@2.0.0: dependencies: @@ -3238,6 +3014,8 @@ snapshots: shebang-regex@3.0.0: {} + shell-quote@1.12.0: {} + shelljs@0.10.0: dependencies: execa: 5.1.1 @@ -3247,55 +3025,26 @@ snapshots: signal-exit@4.1.0: {} - slash@3.0.0: {} - - slice-ansi@7.1.2: - dependencies: - ansi-styles: 6.2.3 - is-fullwidth-code-point: 5.1.0 - - slice-ansi@8.0.0: - dependencies: - ansi-styles: 6.2.3 - is-fullwidth-code-point: 5.1.0 + sisteransi@1.0.5: {} source-map@0.7.6: {} - spawndamnit@3.0.1: - dependencies: - cross-spawn: 7.0.6 - signal-exit: 4.1.0 - - sprintf-js@1.0.3: {} - string-argv@0.3.2: {} - string-width@4.2.3: - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - string-width@7.2.0: dependencies: emoji-regex: 10.6.0 - get-east-asian-width: 1.5.0 + get-east-asian-width: 1.7.0 strip-ansi: 7.2.0 - string-width@8.2.0: + string-width@8.3.0: dependencies: - get-east-asian-width: 1.5.0 + get-east-asian-width: 1.7.0 strip-ansi: 7.2.0 - strip-ansi@6.0.1: - dependencies: - ansi-regex: 5.0.1 - strip-ansi@7.2.0: dependencies: - ansi-regex: 6.2.2 - - strip-bom@3.0.0: {} + ansi-regex: 6.4.0 strip-final-newline@2.0.0: {} @@ -3306,11 +3055,9 @@ snapshots: lines-and-columns: 1.2.4 mz: 2.7.0 pirates: 4.0.7 - tinyglobby: 0.2.15 + tinyglobby: 0.2.17 ts-interface-checker: 0.1.13 - term-size@2.2.1: {} - thenify-all@1.6.0: dependencies: thenify: 3.3.1 @@ -3321,14 +3068,14 @@ snapshots: tinyexec@0.3.2: {} - tinyexec@1.0.4: {} + tinyexec@1.3.1: {} - tinyglobby@0.2.15: + tinyglobby@0.2.17: dependencies: - fdir: 6.5.0(picomatch@4.0.4) - picomatch: 4.0.4 + fdir: 6.5.0(picomatch@4.0.7) + picomatch: 4.0.7 - tinypool@2.1.0: {} + tinypool@2.2.0: {} to-regex-range@5.0.1: dependencies: @@ -3338,58 +3085,51 @@ snapshots: ts-interface-checker@0.1.13: {} - tsup@8.5.1(jiti@2.6.1)(tsx@4.21.0)(typescript@6.0.2)(yaml@2.8.3): + tsup@8.5.1(jiti@2.6.1)(tsx@4.23.15)(typescript@6.0.3)(yaml@2.9.1): dependencies: - bundle-require: 5.1.0(esbuild@0.27.4) + bundle-require: 5.1.0(esbuild@0.27.7) cac: 6.7.14 chokidar: 4.0.3 consola: 3.4.2 debug: 4.4.3 - esbuild: 0.27.4 + esbuild: 0.27.7 fix-dts-default-cjs-exports: 1.0.1 joycon: 3.1.1 picocolors: 1.1.1 - postcss-load-config: 6.0.1(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3) + postcss-load-config: 6.0.1(jiti@2.6.1)(tsx@4.23.15)(yaml@2.9.1) resolve-from: 5.0.0 - rollup: 4.60.1 + rollup: 4.64.3 source-map: 0.7.6 sucrase: 3.35.1 tinyexec: 0.3.2 - tinyglobby: 0.2.15 + tinyglobby: 0.2.17 tree-kill: 1.2.2 optionalDependencies: - typescript: 6.0.2 + typescript: 6.0.3 transitivePeerDependencies: - jiti - supports-color - tsx - yaml - tsx@4.21.0: + tsx@4.23.15: dependencies: - esbuild: 0.27.4 - get-tsconfig: 4.13.7 + esbuild: 0.28.2 optionalDependencies: fsevents: 2.3.3 - typescript@6.0.2: {} + typescript@6.0.3: {} - ufo@1.6.3: {} + ufo@1.6.4: {} - undici-types@7.18.2: {} + undici-types@8.9.0: {} - universalify@0.1.2: {} + verkit@0.5.0: {} which@2.0.2: dependencies: isexe: 2.0.0 - wrap-ansi@7.0.0: - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi@9.0.2: dependencies: ansi-styles: 6.2.3 @@ -3398,16 +3138,15 @@ snapshots: y18n@5.0.8: {} - yaml@2.8.3: {} + yaml@2.9.1: {} - yargs-parser@21.1.1: {} + yargs-parser@22.0.0: {} - yargs@17.7.2: + yargs@18.2.0: dependencies: - cliui: 8.0.1 + cliui: 9.0.1 escalade: 3.2.0 get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 + string-width: 8.3.0 y18n: 5.0.8 - yargs-parser: 21.1.1 + yargs-parser: 22.0.0 diff --git a/scripts/stamp-version.mjs b/scripts/stamp-version.mjs new file mode 100644 index 0000000..a8b0f07 --- /dev/null +++ b/scripts/stamp-version.mjs @@ -0,0 +1,42 @@ +// Keep every version marker in sync with package.json: +// - `metadata.version` in each packaged SKILL.md (so `cliuno skills status` can detect stale copies) +// - `version` in .claude-plugin/plugin.json (the Claude Code plugin manifest) +// Runs on `pnpm build` (prebuild) and after `changeset version`. +import fs from "node:fs"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; + +const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); +const { version } = JSON.parse(fs.readFileSync(path.join(root, "package.json"), "utf8")); + +const skillsDir = path.join(root, "skills"); +for (const name of fs.readdirSync(skillsDir)) { + const file = path.join(skillsDir, name, "SKILL.md"); + if (!fs.existsSync(file)) continue; + const text = fs.readFileSync(file, "utf8"); + const end = text.indexOf("\n---", 3); + if (!text.startsWith("---") || end === -1) throw new Error(`${file}: missing frontmatter`); + let front = text.slice(0, end); + const body = text.slice(end); + if (/^metadata:\s*$/m.test(front)) { + front = /^\s+version:/m.test(front) + ? front.replace(/^(\s+version:\s*).*$/m, `$1${version}`) + : front.replace(/^metadata:\s*$/m, `metadata:\n version: ${version}`); + } else { + front = `${front}\nmetadata:\n version: ${version}`; + } + const next = front + body; + if (next !== text) { + fs.writeFileSync(file, next); + console.log(`stamped ${name} → ${version}`); + } +} + +const pluginFile = path.join(root, ".claude-plugin", "plugin.json"); +const plugin = JSON.parse(fs.readFileSync(pluginFile, "utf8")); +if (plugin.version !== version) { + const next = { name: plugin.name, version, ...plugin }; + next.version = version; + fs.writeFileSync(pluginFile, `${JSON.stringify(next, null, 4)}\n`); + console.log(`stamped plugin.json → ${version}`); +} diff --git a/scripts/test-generators.mjs b/scripts/test-generators.mjs new file mode 100644 index 0000000..3b6ad03 --- /dev/null +++ b/scripts/test-generators.mjs @@ -0,0 +1,330 @@ +#!/usr/bin/env node +// Generate a resource in a throw-away git worktree of every local template and run that +// stack's own quality gates. Local-workspace only (needs ../CLIuno-*-template checkouts). +// +// node scripts/test-generators.mjs # every template +// node scripts/test-generators.mjs --only express,react +// node scripts/test-generators.mjs --keep # leave the worktrees for inspection +// node scripts/test-generators.mjs --scratch dir --clean # reuse a scratch dir, discarding old worktrees +// node scripts/test-generators.mjs --fields name:string,price:number +// node scripts/test-generators.mjs --cli dist-nest/app.js # use a separate build output +import { spawnSync } from "node:child_process"; +import fs from "node:fs"; +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; + +const core = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); +const workspace = path.resolve(core, ".."); + +const args = process.argv.slice(2); +const flag = (name) => { + const i = args.indexOf(`--${name}`); + return i === -1 ? undefined : args[i + 1] && !args[i + 1].startsWith("--") ? args[i + 1] : true; +}; +const only = typeof flag("only") === "string" ? flag("only").split(",") : null; +const keep = flag("keep") === true; +const fields = + typeof flag("fields") === "string" + ? flag("fields") + : "name:string,price:number,done:boolean,due:date?"; +// Every run gets a fresh scratch directory unless --scratch is given; an existing worktree there +// (e.g. one kept with --keep and edited since) is never deleted unless --clean is passed too. +const scratch = + typeof flag("scratch") === "string" + ? path.resolve(flag("scratch")) + : fs.mkdtempSync(path.join(os.tmpdir(), "cliuno-gen-")); +const clean = flag("clean") === true; +const ownScratch = typeof flag("scratch") !== "string"; +// --cli lets parallel workers use their own build (e.g. `pnpm exec tsup --out-dir dist-x`). +const cli = path.resolve( + core, + typeof flag("cli") === "string" ? flag("cli") : path.join("dist", "app.js"), +); + +const has = (bin) => + spawnSync("which", [bin], { stdio: "ignore" }).status === 0 && + spawnSync(bin, ["--version"], { stdio: "ignore" }).status === 0; +const pnpm = ["pnpm install --prefer-offline"]; + +/** id → { dir, needs: [binaries], prepare: [cmds], check: [cmds] } — mirrors each template's CI. */ +const TEMPLATES = { + express: { + dir: "CLIuno-Express-template", + needs: ["pnpm"], + prepare: pnpm, + check: [ + "pnpm type-check", + "pnpm lint", + "pnpm build", + "npx jest --passWithNoTests src/__tests__/widget.spec.ts", + ], + }, + fastify: { + dir: "CLIuno-Fastify-template", + needs: ["pnpm"], + prepare: pnpm, + check: ["pnpm type-check", "pnpm lint", "pnpm build"], + }, + nest: { + dir: "CLIuno-Nest-template", + needs: ["pnpm"], + prepare: pnpm, + check: ["pnpm build", "pnpm lint", "pnpm test"], + }, + adonis: { + dir: "CLIuno-Adonis-template", + needs: ["pnpm"], + prepare: pnpm, + check: ["pnpm typecheck", "pnpm lint"], + }, + django: { + dir: "CLIuno-Django-template", + needs: ["uv"], + prepare: ["uv sync --extra dev"], + check: [ + "uv run python manage.py makemigrations", + "uv run python manage.py test", + "uv run ruff check .", + ], + }, + fastapi: { + dir: "CLIuno-FastAPI-template", + needs: ["uv"], + prepare: ["uv sync --extra dev"], + check: ["uv run pytest tests/ -q", "uv run ruff check ."], + }, + laravel: { + dir: "CLIuno-Laravel-template", + needs: ["php", "composer"], + prepare: [ + "composer install --prefer-dist --no-interaction --quiet", + "cp -n .env.example .env", + "php artisan key:generate --quiet", + "touch database/database.sqlite", + ], + check: ["php artisan test", "vendor/bin/pint --test"], + }, + tallstack: { + dir: "CLIuno-TallStack-template", + needs: ["php", "composer", "npm"], + prepare: [ + "composer install --prefer-dist --no-interaction --quiet", + "cp -n .env.example .env", + "php artisan key:generate --quiet", + "touch database/database.sqlite", + "npm ci --silent", + "npm run build --silent", + ], + check: ["php artisan test", "vendor/bin/pint --test"], + }, + rails: { + dir: "CLIuno-Rails-template", + needs: ["ruby", "bundle"], + prepare: ["bundle install --quiet", "bin/rails db:prepare"], + check: ["bin/rails db:migrate", "bin/rails test", "bin/rubocop"], + }, + spring: { + dir: "CLIuno-Spring-template", + needs: ["java"], + prepare: [], + check: ["./mvnw -B -q test"], + }, + aspnet: { + dir: "CLIuno-ASP.NET-template", + needs: ["dotnet"], + prepare: [], + check: ["dotnet build"], + }, + drogon: { + dir: "CLIuno-Drogon-template", + needs: ["cmake"], + prepare: [], + check: ["cmake -S . -B build", "cmake --build build"], + }, + axum: { + dir: "CLIuno-Axum-template", + needs: ["cargo"], + prepare: [], + check: [ + "cargo fmt --check", + "cargo clippy --all-targets -- -D warnings", + "cargo test --quiet", + ], + }, + react: { + dir: "CLIuno-React-template", + needs: ["pnpm"], + prepare: pnpm, + check: ["pnpm build", "pnpm lint"], + }, + next: { + dir: "CLIuno-Next-template", + needs: ["pnpm"], + prepare: pnpm, + check: ["pnpm type-check", "pnpm lint", "pnpm build"], + }, + vue: { + dir: "CLIuno-Vue-template", + needs: ["pnpm"], + prepare: ["cp -n .env.example .env", ...pnpm], + check: ["pnpm type-check", "pnpm lint", "pnpm build-only"], + }, + nuxt: { + dir: "CLIuno-Nuxt-template", + needs: ["pnpm"], + prepare: pnpm, + check: ["pnpm lint", "pnpm build"], + }, + svelte: { + dir: "CLIuno-Svelte-template", + needs: ["pnpm"], + prepare: pnpm, + check: ["pnpm build", "pnpm check", "pnpm lint"], + }, + solid: { + dir: "CLIuno-Solid-template", + needs: ["pnpm"], + prepare: pnpm, + check: ["npx tsc --noEmit", "pnpm lint", "pnpm build"], + }, + angular: { + dir: "CLIuno-Angular-template", + needs: ["pnpm"], + prepare: pnpm, + check: ["pnpm build", "pnpm lint"], + }, + flutter: { + dir: "CLIuno-Flutter-template", + needs: ["flutter"], + prepare: ["flutter pub get"], + check: ["flutter analyze", "flutter test"], + }, + reactnative: { + dir: "CLIuno-ReactNative-template", + needs: ["npm"], + prepare: ["npm ci --silent"], + check: ["npm run type-check", "npm run lint"], + }, +}; + +function run(cmd, cwd, env = {}) { + const started = Date.now(); + const result = spawnSync(cmd, { + cwd, + shell: true, + stdio: "pipe", + encoding: "utf8", + env: { ...process.env, VIRTUAL_ENV: undefined, CI: "1", ...env }, + }); + return { + ok: result.status === 0, + out: `${result.stdout ?? ""}${result.stderr ?? ""}`, + ms: Date.now() - started, + }; +} + +if (only) { + const unknown = only.filter((id) => !(id in TEMPLATES)); + if (unknown.length > 0) { + console.error( + `Unknown template id(s): ${unknown.join(", ")}. Known: ${Object.keys(TEMPLATES).join(", ")}`, + ); + process.exit(2); + } +} + +function runArgv([bin, ...argv], cwd) { + const started = Date.now(); + const result = spawnSync(bin, argv, { cwd, stdio: "pipe", encoding: "utf8" }); + return { + ok: result.status === 0, + out: `${result.stdout ?? ""}${result.stderr ?? ""}`, + ms: Date.now() - started, + }; +} + +const results = []; +fs.mkdirSync(scratch, { recursive: true }); + +for (const [id, t] of Object.entries(TEMPLATES)) { + if (only && !only.includes(id)) continue; + const repo = path.join(workspace, t.dir); + const row = { id, status: "PASS", step: "", ms: 0, detail: "" }; + results.push(row); + const started = Date.now(); + const missing = t.needs.filter((bin) => !has(bin)); + if (!fs.existsSync(repo)) { + row.status = "SKIP"; + row.detail = `${t.dir} not checked out`; + continue; + } + if (missing.length > 0) { + row.status = "SKIP"; + row.detail = `missing tool: ${missing.join(", ")}`; + continue; + } + + const wt = path.join(scratch, id); + if (fs.existsSync(wt)) { + if (!clean) { + row.status = "FAIL"; + row.step = "worktree"; + row.detail = `${wt} already exists (kept by an earlier --keep run?). Re-run with --clean to discard it.`; + continue; + } + run(`git worktree remove --force "${wt}"`, repo); + fs.rmSync(wt, { recursive: true, force: true }); + } + run("git worktree prune", repo); + const add = run(`git worktree add --detach "${wt}" HEAD`, repo); + if (!add.ok) { + row.status = "FAIL"; + row.step = "worktree"; + row.detail = add.out.trim().split("\n").slice(-5).join("\n"); + continue; + } + + // The generate step is an argv array (no shell) so --fields reaches the CLI as one argument. + const generate = [process.execPath, cli, "make:resource", "Widget", "--fields", fields]; + const steps = [ + ...t.prepare.map((c) => ["prepare", c]), + ["generate", generate], + ...t.check.map((c) => ["check", c]), + ]; + for (const [phase, cmd] of steps) { + const shown = Array.isArray(cmd) + ? cmd + .slice(1) + .map((a) => JSON.stringify(a)) + .join(" ") + : cmd; + process.stdout.write(`${id.padEnd(12)} ${phase.padEnd(9)} ${shown}\n`); + const r = Array.isArray(cmd) ? runArgv(cmd, wt) : run(cmd, wt); + if (!r.ok) { + row.status = "FAIL"; + row.step = `${phase}: ${shown}`; + row.detail = r.out.trim().split("\n").slice(-25).join("\n"); + break; + } + } + row.ms = Date.now() - started; + if (!keep) { + run(`git worktree remove --force "${wt}"`, repo); + fs.rmSync(wt, { recursive: true, force: true }); + } +} + +console.log("\n" + "id".padEnd(12) + "status " + "time".padStart(7) + " detail"); +for (const r of results) { + console.log( + `${r.id.padEnd(12)}${r.status.padEnd(8)}${String(Math.round(r.ms / 1000) + "s").padStart(7)} ${r.step}`, + ); + if (r.status === "FAIL") console.log(r.detail.replace(/^/gm, " ")); + else if (r.status === "SKIP") console.log(` ${r.detail}`); +} +if (keep) console.log(`\nWorktrees kept under ${scratch}`); +else if (ownScratch) fs.rmSync(scratch, { recursive: true, force: true }); +// A targeted run (--only) must actually validate what it named: a SKIP there is a failure. +const failed = results.some((r) => r.status === "FAIL" || (only && r.status === "SKIP")); +process.exit(failed || results.length === 0 ? 1 : 0); diff --git a/scripts/test-matrix.mjs b/scripts/test-matrix.mjs index db6f820..be7941b 100644 --- a/scripts/test-matrix.mjs +++ b/scripts/test-matrix.mjs @@ -17,7 +17,7 @@ * Zero dependencies. Requires Node >= 18 (global fetch). */ -import { spawn, execFileSync } from "node:child_process"; +import { spawn, spawnSync, execFileSync } from "node:child_process"; import crypto from "node:crypto"; import { existsSync, readFileSync, readdirSync, writeFileSync } from "node:fs"; import net from "node:net"; @@ -77,6 +77,34 @@ const sqliteRead = (dir, dbFile, table, col, email) => .toString() .trim(); +/** A host .NET SDK new enough for the template's TargetFramework, else undefined (→ Docker). */ +const HOST_DOTNET = (() => { + let major = 0; + try { + const csproj = readFileSync( + path.join(ROOT, "CLIuno-ASP.NET-template", "BackendASP.NET", "BackendASP.NET.csproj"), + "utf8", + ); + major = Number(csproj.match(/net(\d+)/)?.[1] ?? 0); + } catch { + return undefined; + } + for (const bin of [ + `${process.env.HOME}/.dotnet/dotnet`, + "/usr/bin/dotnet", + "/usr/local/bin/dotnet", + ]) { + if (!existsSync(bin)) continue; + const sdks = spawnSync(bin, ["--list-sdks"], { encoding: "utf8" }).stdout ?? ""; + if (sdks.split("\n").some((l) => Number(l.split(".")[0]) >= major)) return bin; + } + return undefined; +})(); +const DOTNET_DOCKER = + 'docker run --rm --user "$(id -u):$(id -g)" -e HOME=/tmp -e DOTNET_CLI_HOME=/tmp ' + + '-e NUGET_PACKAGES=/nuget -v "$HOME/.nuget/packages":/nuget -v "$PWD":/app -w /app'; +const DOTNET_IMAGE = "mcr.microsoft.com/dotnet/sdk:10.0"; + const BACKENDS = [ { id: "express", @@ -272,11 +300,31 @@ const BACKENDS = [ { id: "aspnet", dir: "CLIuno-ASP.NET-template", - prepare: [["rm", ["-f", "BackendASP.NET/db.sqlite"]]], - start: () => ({ - cmd: `${process.env.HOME}/.dotnet/dotnet`, - args: ["run", "--project", "BackendASP.NET"], - }), + // Host .NET SDK when present, otherwise the official SDK image (as the host user, with + // the NuGet cache on the host) — same idea as the Drogon column. + prepare: HOST_DOTNET + ? [["rm", ["-f", "BackendASP.NET/db.sqlite"]]] + : [ + ["docker", ["rm", "-f", "cliuno-aspnet-matrix"]], + ["rm", ["-f", "BackendASP.NET/db.sqlite"]], + [ + "bash", + [ + "-c", + `mkdir -p "$HOME/.nuget/packages" && ${DOTNET_DOCKER} ${DOTNET_IMAGE} dotnet build BackendASP.NET -v q`, + ], + ], + ], + start: () => + HOST_DOTNET + ? { cmd: HOST_DOTNET, args: ["run", "--project", "BackendASP.NET"] } + : { + cmd: "bash", + args: [ + "-c", + `exec ${DOTNET_DOCKER} --init --name cliuno-aspnet-matrix -p 127.0.0.1:${PORT}:${PORT} -e PORT=${PORT} -e ASPNETCORE_URLS=http://0.0.0.0:${PORT} ${DOTNET_IMAGE} dotnet run --no-build --project BackendASP.NET`, + ], + }, env: { PORT: String(PORT) }, readToken: (dir, email, kind) => execFileSync( @@ -343,7 +391,10 @@ const BACKENDS = [ // stray root-owned build/ can exist; remove it before the user-owned build. [ "bash", - ["-lc", 'docker run --rm -v "$PWD":/app -w /app drogonframework/drogon:latest rm -rf build cliuno.db'], + [ + "-lc", + 'docker run --rm -v "$PWD":/app -w /app drogonframework/drogon:latest rm -rf build cliuno.db', + ], ], [ "bash", @@ -378,6 +429,35 @@ const BACKENDS = [ .toString() .trim(), }, + { + // Rust + Axum: release build, then the binary. sqlx migrations are embedded in + // the binary and run on boot, so a fresh matrix-test.db (WAL mode) is all it needs. + id: "axum", + dir: "CLIuno-Axum-template", + prepare: [ + ["rm", ["-f", "matrix-test.db", "matrix-test.db-wal", "matrix-test.db-shm"]], + [ + existsSync(`${process.env.HOME}/.cargo/bin/cargo`) + ? `${process.env.HOME}/.cargo/bin/cargo` + : "cargo", + ["build", "--release", "--quiet"], + ], + ], + start: () => ({ cmd: "target/release/cliuno-axum-template", args: [] }), + env: { PORT: String(PORT), DATABASE_URL: "sqlite://matrix-test.db" }, + readToken: (dir, email, kind) => + execFileSync( + "python3", + [ + "-c", + `import sqlite3,sys;r=sqlite3.connect('matrix-test.db').execute("SELECT ${kind === "reset" ? "reset_token" : "verify_token"} FROM users WHERE email=?",(sys.argv[1],)).fetchone();print((r[0] if r and r[0] else ''),end='')`, + email, + ], + { cwd: dir }, + ) + .toString() + .trim(), + }, ]; const FRONTENDS = [ @@ -386,7 +466,8 @@ const FRONTENDS = [ { id: "solid", dir: "CLIuno-Solid-template", globs: ["src/apis"] }, { id: "next", dir: "CLIuno-Next-template", globs: ["src/apis"] }, { id: "svelte", dir: "CLIuno-Svelte-template", globs: ["src/lib/apis"] }, - { id: "nuxt", dir: "CLIuno-Nuxt-template", globs: ["composables"] }, + // Nuxt 4 keeps the app in app/; the root path covers older Nuxt 3-style checkouts. + { id: "nuxt", dir: "CLIuno-Nuxt-template", globs: ["app/composables", "composables"] }, { id: "angular", dir: "CLIuno-Angular-template", globs: ["src/app/services"] }, { id: "flutter", dir: "CLIuno-Flutter-template", globs: ["lib/apis"] }, { id: "reactnative", dir: "CLIuno-ReactNative-template", globs: ["src/apis"] }, @@ -1129,6 +1210,13 @@ async function main() { const eps = extractEndpoints(dir, fe.globs); feEndpoints.set(fe.id, eps); log(` ${fe.id.padEnd(8)} expects ${eps.size} endpoints`); + if (existsSync(dir) && eps.size === 0) { + // An empty API layer means the scan paths are wrong — a PASS would be meaningless. + console.error( + ` ✘ ${fe.id}: no API calls found under ${fe.globs.join(", ")} — fix its globs`, + ); + process.exitCode = 1; + } } const smtp = startSmtpSink(SMTP_PORT); diff --git a/skills/cliuno-make/SKILL.md b/skills/cliuno-make/SKILL.md new file mode 100644 index 0000000..4f1afd4 --- /dev/null +++ b/skills/cliuno-make/SKILL.md @@ -0,0 +1,78 @@ +--- +name: cliuno-make +description: Generate code inside a CLIuno-scaffolded project with `cliuno make:*` instead of hand-writing it. Use this whenever the user, working in any CLIuno template (Express, Fastify, NestJS, AdonisJS, Django, FastAPI, Laravel, TallStack, Rails, Spring Boot, ASP.NET, Drogon, Axum, React, Next, Vue, Nuxt, Svelte, Solid, Angular, Flutter, React Native), asks to add a resource, model, entity, table, endpoint, CRUD, controller, service, migration, validator/DTO, API client, store, page/screen, or UI component — phrases like "add a Product resource", "create an Orders endpoint", "I need a Comments model with …", "add a page for invoices", "make:controller". One command produces a working vertical slice that follows the template's conventions and the shared REST contract; you then only edit fields and business logic. +metadata: + version: 2.1.1 +--- + +# cliuno make — generate, don't hand-write + +Every CLIuno template ships the same demo app (auth, users, todos, posts, …) on one REST +contract. `cliuno make:*` clones that pattern for a new resource: the generated files use +the template's own imports, helpers, auth guard, `{status, message, data}` envelope, +owner relation, timestamps, lint rules and formatting. Hand-writing the same files costs +thousands of tokens and drifts from the conventions — **run the generator, then edit.** + +## Workflow + +1. **Make sure the skills are present** (once per project): + `npx cliuno@^2.2 skills status` → if anything is `missing`/`outdated`, + `npx cliuno@^2.2 skills install` (adds `.claude/skills/cliuno-*`; `--global` for `~/.claude/skills`). +2. **See what this stack supports**: `npx cliuno@^2.2 make` (run anywhere inside the + project — detection walks up to the manifest). It lists the kinds and marks which ones + delegate to the framework's own CLI (`[native: php]`, `node ace`, `bin/rails`, `ng`). +3. **Generate the resource**: + + ```bash + npx cliuno@^2.2 make:resource Product --fields name:string,price:number,inStock:boolean,notes:text? + ``` + + Unsure? Add `--dry-run` to print every file and patch without writing. Re-running is + safe: existing files are skipped (use `--force` to overwrite) and registrations are + never duplicated. + +4. **Read the printed notes** (`!` lines) — they are the manual follow-ups: run a + migration, add a nav link, wire a validator, register a route when the anchor wasn't + found. +5. **Edit, don't rewrite**: adjust field types/validation, add business rules, rename + labels. Keep the envelope and the auth guard. +6. **Run the template's gates** (its `CLAUDE.md` lists them: typecheck, lint, build, tests). +7. **Frontend + backend pair?** Generate on both sides with the **same name and fields**; + the frontend client calls `/` with camelCase JSON keys, which the backend + stub accepts. + +## Fields DSL + +`--fields a:type,b:type?` — `?` marks nullable. Default when omitted: `title:string,description:text?`. + +| type | meaning | backend column (typical) | TS / Dart type | +| --------- | ------------------ | ------------------------- | ------------------- | +| `string` | short text (label) | text / string / varchar | `string` | +| `text` | long text | text | `string` | +| `int` | integer | integer | `number` / `int` | +| `number` | float | real / float / double | `number` / `double` | +| `boolean` | flag (default off) | boolean | `boolean` / `bool` | +| `date` | timestamp | datetime | `string` / `Date` | +| `json` | arbitrary object | json / simple-json / text | `Record` | + +The first `string` field is the display field used by list pages. Aliases accepted: +`integer`, `float`, `double`, `bool`, `datetime`, `timestamp`, `object`. + +## Kinds + +| kind | what it generates | +| ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `resource` | the full vertical slice (always CLIuno stubs, never bare framework stubs) | +| `controller` `model` `migration` `service` `validator` `request` `dto` `test` | one backend piece; delegates to `php artisan` / `node ace` / `bin/rails g` / `manage.py` where that CLI exists, otherwise a CLIuno stub | +| `api` `store` `page` `component` | one frontend piece; `component` delegates to the template's shadcn-style `add` command | + +Per-stack file lists, registration patches and follow-ups: [references/stacks.md](references/stacks.md). + +## When not to use it + +- Changing an **existing** endpoint or page → edit it directly (and, in the CLIuno + workspace, follow the `cliuno-matrix` contract). +- The project is not a CLIuno template (detection fails) → `--dry-run` still shows a + reasonable pattern to adapt, but don't apply blindly. +- A stack whose `cliuno make` lists no generators yet → fall back to copying that + template's `todo` files as the pattern. diff --git a/skills/cliuno-make/references/stacks.md b/skills/cliuno-make/references/stacks.md new file mode 100644 index 0000000..0ca2346 --- /dev/null +++ b/skills/cliuno-make/references/stacks.md @@ -0,0 +1,44 @@ +# What `make:resource ` produces, per stack + +Generated by `cliuno make:resource Product --fields name:string,price:number,inStock:boolean` +in each template (timestamps masked). Every backend resource is auth-guarded, owned by the +authenticated user, exposes list / get / create / update / delete under `/api/v1/` +(plus `/current-user` where the template's todo has it), and answers with +`{status, message, data: { | }}`. Frontends get an API client plus a +list page (create + delete) and a detail page using the template's own UI kit. + +Single-file kinds marked with → delegate to the framework's CLI when its binary is on PATH and +fall back to a CLIuno stub otherwise (`component` on web frontends delegates to the shadcn-style +`add` command). + +## Backends + +| stack | files (`make:resource Product --fields name:string,price:number,inStock:boolean`) | auto-registered in | follow-ups printed | single-file kinds (→ native CLI when delegated) | +| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| express | `src/entities/product.entity.ts`, `src/controllers/product.controller.ts`, `src/routers/v1/product.router.ts`, `src/validators/product.validator.ts`, `src/__tests__/product.spec.ts` | `src/routers/index.ts` | TypeORM synchronize is on — restart the dev server and the Products table appears.; Wire ValidateProduct into the router if you want request validation (see auth.router.ts). | `model`, `controller`, `validator`, `test` | +| fastify | `src/routes/products.routes.ts`, `src/__tests__/product.test.ts` | `src/entities.ts`, `src/db.ts`, `src/app.ts` | TypeORM synchronize is on — restart the dev server and the Products table appears.; Run the test with: DB_FILE=:memory: node --import tsx --test src/**tests**/product.test.ts | `model`, `controller`, `test` | +| nest | `src/entities/product.entity.ts`, `src/dto/product.dto.ts`, `src/services/product.service.ts`, `src/controllers/product.controller.ts`, `src/modules/product.module.ts`, `src/services/product.service.spec.ts` | `src/modules/app.module.ts` | TypeORM synchronize is on — restart the dev server and the products table appears. | `model`, `dto`, `service`, `controller`, `test` | +| adonis | `app/models/product.ts`, `database/migrations/_create_products_table.ts`, `app/controllers/products_controller.ts`, `app/validators/product.ts` | `start/routes.ts` | Run 'node ace migration:run' to create the products table.; Use createProductValidator with request.validateUsing() in the controller if you want schema validation. | `model` → `node ace make:model`, `migration` → `node ace make:migration`, `controller` → `node ace make:controller`, `validator` → `node ace make:validator` | +| django | `src/serializers/product_serializers.py`, `src/views/product_views.py`, `src/urls/product_urls.py`, `src/tests/test_products.py` | `src/models.py`, `src/urls/__init__.py` | Create and apply the migration: uv run python manage.py makemigrations src && uv run python manage.py migrate (the products table does not exist until then).; Run the suite: uv run python manage.py test src.tests.test_products | `model`, `migration` → `uv run python`, `controller`, `validator`, `test` | +| fastapi | `src/models/product.py`, `src/schemas/product.py`, `src/routers/products.py`, `tests/test_products.py` | `src/app.py` | Tables come from Base.metadata.create_all at startup — restart the dev server and the products table appears. | `model`, `controller`, `dto`, `validator`, `test` | +| laravel | `app/Models/Product.php`, `database/migrations/_create_products_table.php`, `app/Http/Controllers/ProductController.php`, `tests/Feature/ProductTest.php` | `routes/api.php`, `app/Models/User.php` | php artisan migrate — creates the products table.; Edit the validation rules in ProductController (store/update) and add business logic there; the frontends destructure data.products / data.product. | `model` → `php artisan make:model`, `controller` → `php artisan make:controller`, `migration` → `php artisan make:migration`, `request` → `php artisan make:request`, `test` → `php artisan make:test` | +| tallstack | `app/Models/Product.php`, `database/migrations/_create_products_table.php`, `app/Http/Controllers/ProductController.php`, `tests/Feature/ProductsTest.php` | `routes/api.php`, `app/Models/User.php` | php artisan migrate — creates the products table.; Edit the validation rules in ProductController (store/update) and add business logic there; the frontends destructure data.products / data.product.; Livewire UI (optional): 'cliuno make:page Product' (or 'php artisan make:livewire pages.products') creates resources/views/livewire/pages/products.blade.php — copy the body of pages/todos.blade.php and swap Todo for Product. | `model` → `php artisan make:model`, `controller` → `php artisan make:controller`, `migration` → `php artisan make:migration`, `request` → `php artisan make:request`, `test` → `php artisan make:test`, `page` → `php artisan make:livewire` | +| rails | `app/models/product.rb`, `db/migrate/_create_products.rb`, `app/controllers/api/v1/products_controller.rb`, `test/fixtures/products.yml`, `test/controllers/api/v1/products_controller_test.rb`, `test/models/product_test.rb` | `config/routes.rb`, `app/models/user.rb` | bin/rails db:migrate — creates the products table (and refreshes db/schema.rb).; Edit product_params / validations in app/models/product.rb for business rules; the frontends destructure data.products / data.product. | `model` → `bin/rails generate model`, `controller` → `bin/rails generate controller`, `migration` → `bin/rails generate migration`, `test` | +| spring | `src/main/java/com/cliuno/api/entity/Product.java`, `src/main/java/com/cliuno/api/repo/ProductRepository.java`, `src/main/java/com/cliuno/api/controller/ProductController.java`, `src/test/java/com/cliuno/api/ProductTests.java` | — | ddl-auto=update creates the products table on the next boot (./mvnw spring-boot:run).; Component scan picks up ProductController — routes live at /api/v1/products (+ /current-user).; Responses serialise fields as snake_case (Jackson SNAKE_CASE); requests accept camelCase or snake_case keys. | `model`, `controller`, `test` | +| aspnet | `BackendASP.NET/Data/Product.cs`, `BackendASP.NET/Controllers/ProductsController.cs` | `BackendASP.NET/Data/Models.cs` | EnsureCreated does not migrate an existing database — delete BackendASP.NET/db.sqlite so the Products table is created on the next run.; MapControllers picks up ProductsController — routes live at /api/v1/products (+ /current-user).; Responses serialise properties as snake_case; requests accept camelCase or snake_case keys. | `model`, `controller` | +| drogon | `controllers/ProductController.cc` | `main.cc` | Rebuild (cmake --build build) — CMake globs controllers/*.cc; the products table is created at boot by main.cc.; Routes live at /api/v1/products (+ /current-user); rows are scoped to the Bearer user.; Responses use snake_case keys; requests accept camelCase or snake_case keys. | `controller` | +| axum | `src/models/product.rs`, `src/routes/products.rs`, `migrations/_create_products.sql`, `tests/products.rs` | `src/routes/mod.rs`, `src/models/mod.rs` | Migrations are embedded at build time and run on boot — restart 'cargo run' and the products table appears.; Run 'cargo test' and 'cargo clippy --all-targets -- -D warnings'. | `model`, `controller`, `migration`, `test` | + +## Frontends + +| stack | files (`make:resource Product --fields name:string,price:number,inStock:boolean`) | auto-registered in | follow-ups printed | single-file kinds (→ native CLI when delegated) | +| ----------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------- | +| react | `src/apis/product-api.ts`, `src/views/app/ProductsView.tsx`, `src/views/app/ProductDetailView.tsx` | `src/apis/index.ts`, `src/router/index.tsx` | Add a nav link to /products in src/layouts/DefaultLayout.tsx if you want it in the menu. | `api`, `page`, `store`, `component` → `npx shadcn@latest add` | +| next | `src/apis/product-api.ts`, `src/app/products/page.tsx`, `src/app/products/[id]/page.tsx` | `src/apis/index.ts` | Add a nav link to /products in src/components/Navbar.tsx if you want it in the menu. | `api`, `page`, `store`, `component` → `npx shadcn@latest add` | +| vue | `src/apis/product-api.ts`, `src/views/app/ProductsView.vue`, `src/views/app/ProductDetailView.vue` | `src/apis/index.ts`, `src/router/index.ts` | Add a nav link to { name: 'products' } in src/components/NavbarComp.vue if you want it in the menu. | `api`, `page`, `store`, `component` → `npx shadcn-vue@latest add` | +| nuxt | `app/composables/useProductApi.ts`, `app/pages/products/index.vue`, `app/pages/products/[id].vue` | — | Add a NuxtLink to /products in components/NavbarComp.vue if you want it in the menu.; Optional: add "useProductApi": "readonly" to the globals in .oxlintrc.json (keeps the auto-import list in sync). | `api`, `page`, `store`, `component` → `npx shadcn-vue@latest add` | +| svelte | `src/lib/apis/product-api.ts`, `src/routes/products/+page.svelte`, `src/routes/products/[id]/+page.svelte` | `src/lib/apis/index.ts` | Add a nav link to /products in src/routes/+layout.svelte if you want it in the menu. | `api`, `page`, `store`, `component` → `npx shadcn-svelte@latest add` | +| solid | `src/apis/product-api.ts`, `src/pages/app/ProductsPage.tsx`, `src/pages/app/ProductDetailPage.tsx` | `src/apis/index.ts`, `src/App.tsx` | Add a nav link to /products in src/components/NavbarComp.tsx if you want it in the menu. | `api`, `page`, `store`, `component` | +| angular | `src/app/services/product-api.service.ts`, `src/app/views/app/products.component.ts`, `src/app/views/app/product-detail.component.ts` | `src/app/app.routes.ts` | Add a nav link to /products in src/app/layouts/default-layout.component.ts if you want it in the menu.; Move the Product interface into src/app/types/models.ts if you prefer the shared models file. | `api`, `service`, `page`, `store`, `component` → `ng g @spartan-ng/cli:ui` | +| flutter | `lib/apis/product_api.dart`, `lib/screens/products_screen.dart`, `lib/screens/product_detail_screen.dart` | `lib/main.dart` | Add a drawer entry in lib/widgets/app_drawer.dart: _item(context, Icons.widgets_outlined, 'Products', '/products') | `api`, `page`, `store`, `component` | +| reactnative | `src/apis/product-api.ts`, `src/app/(tabs)/products.tsx`, `src/app/products/[id].tsx` | `src/apis/index.ts`, `src/app/(tabs)/_layout.tsx`, `src/app/_layout.tsx` | The products tab was added to src/app/(tabs)/_layout.tsx — change its glyph or order there (restart "expo start" to pick up the new routes). | `api`, `page`, `store`, `component` | diff --git a/.claude/skills/cliuno-matrix/SKILL.md b/skills/cliuno-matrix/SKILL.md similarity index 89% rename from .claude/skills/cliuno-matrix/SKILL.md rename to skills/cliuno-matrix/SKILL.md index d6c77e6..69aa85b 100644 --- a/.claude/skills/cliuno-matrix/SKILL.md +++ b/skills/cliuno-matrix/SKILL.md @@ -1,6 +1,8 @@ --- name: cliuno-matrix -description: Run, debug, and extend the CLIuno frontend×backend compatibility matrix, and consult the shared API contract every template implements. Use this whenever working in the CLIuno workspace on anything API-shaped — adding or changing an endpoint in any backend template (Express, Nest, Fastify, Adonis, Django, FastAPI, Laravel, TallStack, Rails, Spring, ASP.NET, Drogon), changing a frontend's API layer (Vue, React, Solid, Next, Svelte, Nuxt, Angular, Flutter, React Native), adding a new template, investigating why a frontend and backend disagree, or when asked to "run the matrix", "check compatibility", "test the templates against each other", or verify the demo-app contract (auth/users/todos/posts/comments/follows/OTP). +description: Run, debug, and extend the CLIuno frontend×backend compatibility matrix, and consult the shared API contract every template implements. Use this whenever working in the CLIuno workspace on anything API-shaped — adding or changing an endpoint in any backend template (Express, Nest, Fastify, Adonis, Django, FastAPI, Laravel, TallStack, Rails, Spring, ASP.NET, Drogon, Axum), changing a frontend's API layer (Vue, React, Solid, Next, Svelte, Nuxt, Angular, Flutter, React Native), adding a new template, investigating why a frontend and backend disagree, or when asked to "run the matrix", "check compatibility", "test the templates against each other", or verify the demo-app contract (auth/users/todos/posts/comments/follows/OTP). +metadata: + version: 2.1.1 --- # CLIuno compatibility matrix @@ -20,7 +22,7 @@ adding or changing any endpoint. Per-backend boot/DB/test details are in ```bash cd core -pnpm test:matrix # full board: 9 frontends × 12 backends +pnpm test:matrix # full board: 9 frontends × 13 backends node scripts/test-matrix.mjs --backends express # one backend node scripts/test-matrix.mjs --backends rails --frontends vue --verbose ``` @@ -76,6 +78,8 @@ Adding an endpoint end-to-end: Adding a new backend template: add a registry entry in `BACKENDS` (dir, prepare, start, env, and `activateUser`/`readToken` hooks if it gates email verification or stores one-time tokens), implement the whole contract, and run its column until `flow` is full. +Then give it a generator module in `core/src/generators/stacks/.ts` so +`cliuno make:resource` works there too (`node scripts/test-generators.mjs --only `). ## Gotchas that have burned this workspace before diff --git a/.claude/skills/cliuno-matrix/evals/evals.json b/skills/cliuno-matrix/evals/evals.json similarity index 100% rename from .claude/skills/cliuno-matrix/evals/evals.json rename to skills/cliuno-matrix/evals/evals.json diff --git a/.claude/skills/cliuno-matrix/references/backends.md b/skills/cliuno-matrix/references/backends.md similarity index 71% rename from .claude/skills/cliuno-matrix/references/backends.md rename to skills/cliuno-matrix/references/backends.md index a2bed3c..bdea903 100644 --- a/.claude/skills/cliuno-matrix/references/backends.md +++ b/skills/cliuno-matrix/references/backends.md @@ -3,20 +3,21 @@ How each backend template boots, stores data, and verifies. The matrix registry in `core/scripts/test-matrix.mjs` encodes the same facts as code — keep them in sync. -| | boot (matrix) | database | verify locally | -| ------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| **Express** | `node_modules/.bin/tsx src/app.ts` (`PORT`, `API_VERSION=v1`, `JWT_SECRET_KEY`, `REFRESH_JWT_SECRET_KEY`) | sqlite `db.sqlite`, TypeORM `synchronize: true`, table `users` | `tsc --noEmit --skipLibCheck` · `oxlint .` · `oxfmt --check src/` · `tsup` | -| **Nest** | `nest build` then `node dist/main.js` (`PORT`, `JWT_SECRET_KEY`) | sqlite `database.sqlite`, TypeORM synchronize, table `Users` | `oxlint .` · `nest build` · `jest` | -| **Django** | `manage.py migrate` then `runserver --noreload` | sqlite `db.sqlite3`, real migrations (`makemigrations src`) | `manage.py check` · `manage.py test` (73) | -| **FastAPI** | `uv run uvicorn src.app:app` with `DATABASE_URL=sqlite:///./matrix-test.db` (deleted each run) | SQLAlchemy `create_all` on startup — model changes need a fresh db file | `uv run ruff check .` · `uv run pytest` (94) | -| **Laravel** | `php artisan migrate --force` then `artisan serve` | sqlite `database/database.sqlite`, migrations | `./vendor/bin/pint --test` · `php artisan test` (10) | -| **Rails** | `bin/rails db:prepare` (runs seeds) then `bin/rails server` | sqlite dev db, migrations + `db/seeds.rb` (roles + admin) | `bundle exec rubocop` · `bin/rails test` (83) | -| **Fastify** | `node_modules/.bin/tsx src/app.ts` (`PORT`, `JWT_SECRET_KEY`, `REFRESH_JWT_SECRET_KEY`) | sqlite `db.sqlite`, TypeORM `synchronize: true`, table `Users` | `tsc --noEmit` · `oxlint .` · `oxfmt --check src/` | -| **Adonis** | `node ace migration:run --force` then `node ace serve` (`APP_KEY` ≥32 chars, `HOST`, `LOG_LEVEL`, `TZ`) | sqlite `tmp/db.sqlite3`, Lucid migrations | `pnpm typecheck` · `oxlint .` | -| **Spring** | `./mvnw -q -DskipTests package` then `java -jar target/cliuno-spring-template-*.jar` | sqlite `db.sqlite`, Hibernate `ddl-auto=update` | `./mvnw test` (context loads) | -| **ASP.NET** | `~/.dotnet/dotnet run --project BackendASP.NET` (`PORT`) | sqlite `BackendASP.NET/db.sqlite`, EF Core `EnsureCreated` (PascalCase columns) | `dotnet build` (0 warnings) | -| **TallStack** | `php artisan migrate --force` then `artisan serve` (same as Laravel) | sqlite `database/database.sqlite`, migrations | `php artisan test` (43) · `./vendor/bin/pint --test` | -| **Drogon** | builds + runs inside `drogonframework/drogon:latest` via `docker run` (host needs docker + the image) | sqlite `cliuno.db`, volume-mounted from the repo dir, created on boot | build in the image (`cmake --build`); CI also smoke-tests register/login | +| | boot (matrix) | database | verify locally | +| ------------- | --------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| **Express** | `node_modules/.bin/tsx src/app.ts` (`PORT`, `API_VERSION=v1`, `JWT_SECRET_KEY`, `REFRESH_JWT_SECRET_KEY`) | sqlite `db.sqlite`, TypeORM `synchronize: true`, table `users` | `tsc --noEmit --skipLibCheck` · `oxlint .` · `oxfmt --check src/` · `tsup` | +| **Nest** | `nest build` then `node dist/main.js` (`PORT`, `JWT_SECRET_KEY`) | sqlite `database.sqlite`, TypeORM synchronize, table `Users` | `oxlint .` · `nest build` · `jest` | +| **Django** | `manage.py migrate` then `runserver --noreload` | sqlite `db.sqlite3`, real migrations (`makemigrations src`) | `manage.py check` · `manage.py test` (73) | +| **FastAPI** | `uv run uvicorn src.app:app` with `DATABASE_URL=sqlite:///./matrix-test.db` (deleted each run) | SQLAlchemy `create_all` on startup — model changes need a fresh db file | `uv run ruff check .` · `uv run pytest` (94) | +| **Laravel** | `php artisan migrate --force` then `artisan serve` | sqlite `database/database.sqlite`, migrations | `./vendor/bin/pint --test` · `php artisan test` (10) | +| **Rails** | `bin/rails db:prepare` (runs seeds) then `bin/rails server` | sqlite dev db, migrations + `db/seeds.rb` (roles + admin) | `bundle exec rubocop` · `bin/rails test` (83) | +| **Fastify** | `node_modules/.bin/tsx src/app.ts` (`PORT`, `JWT_SECRET_KEY`, `REFRESH_JWT_SECRET_KEY`) | sqlite `db.sqlite`, TypeORM `synchronize: true`, table `Users` | `tsc --noEmit` · `oxlint .` · `oxfmt --check src/` | +| **Adonis** | `node ace migration:run --force` then `node ace serve` (`APP_KEY` ≥32 chars, `HOST`, `LOG_LEVEL`, `TZ`) | sqlite `tmp/db.sqlite3`, Lucid migrations | `pnpm typecheck` · `oxlint .` | +| **Spring** | `./mvnw -q -DskipTests package` then `java -jar target/cliuno-spring-template-*.jar` | sqlite `db.sqlite`, Hibernate `ddl-auto=update` | `./mvnw test` (context loads) | +| **ASP.NET** | host `dotnet run` if an SDK ≥ the TargetFramework exists, else `dotnet/sdk:10.0` in Docker (host user) | sqlite `BackendASP.NET/db.sqlite`, EF Core `EnsureCreated` (PascalCase columns) | `dotnet build` (0 warnings) | +| **TallStack** | `php artisan migrate --force` then `artisan serve` (same as Laravel) | sqlite `database/database.sqlite`, migrations | `php artisan test` (43) · `./vendor/bin/pint --test` | +| **Drogon** | builds + runs inside `drogonframework/drogon:latest` via `docker run` (host needs docker + the image) | sqlite `cliuno.db`, volume-mounted from the repo dir, created on boot | build in the image (`cmake --build`); CI also smoke-tests register/login | +| **Axum** | `cargo build --release` then `target/release/cliuno-axum-template` (`PORT`, `DATABASE_URL`) | sqlite `matrix-test.db` (deleted each run), sqlx migrations embedded + run on boot | `cargo fmt --check` · `cargo clippy -- -D warnings` · `cargo test` (14) | ## Matrix hooks @@ -72,8 +73,18 @@ How each backend template boots, stores data, and verifies. The matrix registry - **Drogon**: C++17; the matrix `prepare` builds inside the drogon image as the host user (`--user $(id -u):$(id -g)` so `build/` + `cliuno.db` stay host-readable), cleaning any root-owned `build/` first (the README build runs as root). `start` does `docker run ---init -p 127.0.0.1:PORT:PORT` so SIGTERM tears the container down with `--rm`. `readToken` + --init -p 127.0.0.1:PORT:PORT` so SIGTERM tears the container down with `--rm`. `readToken` reads the volume-mounted `cliuno.db` with host `python3`. Requires the image pulled; on WSL where the docker credential helper is broken, `docker run` of a local image still works. - **React Native frontend**: Expo SDK 57; `src/apis/` mirrors the React template - one-to-one (same 29 endpoints). AsyncStorage v3 renamed `multiRemove` → `removeMany`. + one-to-one. Expo 57 pins AsyncStorage 2.2, which uses `multiRemove` (v3's `removeMany` + does not exist there). +- **Nuxt frontend**: Nuxt 4 layout — the API layer is `app/composables/`; the matrix scans + both that and the legacy root `composables/`, and fails a frontend whose scan finds 0 calls. +- **ASP.NET**: .NET 10. The matrix uses a host SDK only when `--list-sdks` covers the + csproj's TargetFramework (the machine's `~/.dotnet` 8.x does not); otherwise it builds and + runs in `mcr.microsoft.com/dotnet/sdk:10.0` as the host user with `~/.nuget/packages` + mounted, so no root-owned `bin/`/`obj/` is left behind. +- **Axum**: Rust stable, release build in `prepare` (first build takes a few minutes; later + runs are incremental). `readToken` reads `matrix-test.db` with host `python3`. Login is not + gated on email verification, so no `activateUser` hook. Ids are integers. diff --git a/.claude/skills/cliuno-matrix/references/contract.md b/skills/cliuno-matrix/references/contract.md similarity index 100% rename from .claude/skills/cliuno-matrix/references/contract.md rename to skills/cliuno-matrix/references/contract.md diff --git a/.claude/skills/cliuno-scaffold/SKILL.md b/skills/cliuno-scaffold/SKILL.md similarity index 65% rename from .claude/skills/cliuno-scaffold/SKILL.md rename to skills/cliuno-scaffold/SKILL.md index 5306d80..665fc68 100644 --- a/.claude/skills/cliuno-scaffold/SKILL.md +++ b/skills/cliuno-scaffold/SKILL.md @@ -1,14 +1,17 @@ --- name: cliuno-scaffold -description: Scaffold new apps from CLIuno's contract-tested templates instead of writing boilerplate from scratch. Use this whenever the user wants to start a new website, web app, frontend, REST API, backend, full-stack app, or mobile app in Vue, React, Next, Svelte, Solid, Nuxt, Angular, Flutter, React Native, Express, Fastify, NestJS, AdonisJS, Django, FastAPI, Laravel, TALL stack, Rails, Spring Boot, or ASP.NET — even if they don't mention CLIuno. Phrases like "create an app", "set up a project", "build me a todo/social/CRUD app", "start a new API", or "scaffold X with auth" should all trigger this skill before any from-scratch scaffolding. +description: Scaffold new apps from CLIuno's contract-tested templates instead of writing boilerplate from scratch. Use this whenever the user wants to start a new website, web app, frontend, REST API, backend, full-stack app, or mobile app in Vue, React, Next, Svelte, Solid, Nuxt, Angular, Flutter, React Native, Express, Fastify, NestJS, AdonisJS, Django, FastAPI, Laravel, TALL stack, Rails, Spring Boot, ASP.NET, Drogon, or Axum (Rust) — even if they don't mention CLIuno. Phrases like "create an app", "set up a project", "build me a todo/social/CRUD app", "start a new API", or "scaffold X with auth" should all trigger this skill before any from-scratch scaffolding. +metadata: + version: 2.1.1 --- # CLIuno scaffold — start from a working app, not a blank folder -CLIuno is one CLI plus 20 templates that all implement the **same demo app** (JWT auth +CLIuno is one CLI plus 22 templates that all implement the **same demo app** (JWT auth with refresh/reset/verify-email/OTP, users, todos, posts+comments, follows) against one shared REST contract. Every frontend×backend pair is proven by a live compatibility -matrix (9 frontends × 11 backends, all green) — so instead of generating boilerplate, +matrix (9 frontends × every backend; locally verified columns are listed in the +`cliuno-matrix` skill) — so instead of generating boilerplate, you clone a template that already has auth, CRUD, tests, linting, CI-grade quality gates, and a `CLAUDE.md` briefing for AI agents, then reshape it into what the user wants. @@ -20,13 +23,13 @@ stack (then say so explicitly). ## Choosing -| The user wants | Scaffold | -| ---------------------------- | -------------------------------------------------------------------------------------------- | -| Frontend / SPA / website | Vue, React, Solid, Next, Svelte, Nuxt, or Angular template | -| REST API / backend | Express, Fastify, Nest, Adonis, Django, FastAPI, Laravel, Rails, Spring, or ASP.NET template | -| Full-stack in one repo (MVC) | TallStack (Laravel 13 + Livewire/Volt; also serves the API) | -| Mobile app | Flutter or React Native (Expo) template | -| Frontend + backend pair | any frontend + any backend — every pair passes the matrix | +| The user wants | Scaffold | +| ---------------------------- | ---------------------------------------------------------------------------------------------------------- | +| Frontend / SPA / website | Vue, React, Solid, Next, Svelte, Nuxt, or Angular template | +| REST API / backend | Express, Fastify, Nest, Adonis, Django, FastAPI, Laravel, Rails, Spring, ASP.NET, Drogon, or Axum template | +| Full-stack in one repo (MVC) | TallStack (Laravel 13 + Livewire/Volt; also serves the API) | +| Mobile app | Flutter or React Native (Expo) template | +| Frontend + backend pair | any frontend + any backend — every pair passes the matrix | If the user has no stack preference, recommend: **React + Express** (largest ecosystems), or **TallStack** when they want one deployable unit. @@ -53,22 +56,28 @@ them, and [references/stacks.md](references/stacks.md) has the full per-stack ta ## After scaffolding — reshape, don't rebuild -1. **Rename**: package name / app id / titles to the user's project name. -2. **Keep the API layer intact while it serves you.** The auth/user plumbing +1. **Install the CLIuno skills into the project** so every later session has them: + `npx cliuno@^2.2 skills install` (check with `skills status`). +2. **Rename**: package name / app id / titles to the user's project name. +3. **Generate the user's real resources instead of writing them**: + `npx cliuno@^2.2 make:resource Product --fields name:string,price:number,inStock:boolean` + produces the route/controller/model/validation/test (or api/store/pages) in the + template's own conventions — see the `cliuno-make` skill. Then edit fields and + business logic only. +4. **Keep the API layer intact while it serves you.** The auth/user plumbing (login/register/reset/OTP) is production-shaped — reuse it. The demo resources - (todos, posts, follows) are _reference implementations_: copy their pattern - (route → controller/service → model → test) to build the user's real resources, - then delete the demo ones the user doesn't need (remove route + controller + - model + migration + test together, and the matching frontend pages). -3. **Frontends: build UI with the installed shadcn-style kit** — components live in + (todos, posts, follows) are _reference implementations_; delete the ones the user + doesn't need (remove route + controller + model + migration + test together, and the + matching frontend pages). +5. **Frontends: build UI with the installed shadcn-style kit** — components live in the ui directory (`src/components/ui`, `src/lib/components/ui`, or `components/ui`) on Base UI primitives (React/Next) or the framework's equivalent (reka-ui, bits-ui, Kobalte, spartan Brain). Add more via the stack's `add` command in the table. Don't reintroduce other CSS frameworks; compose these components + Tailwind utilities. -4. **Keep the quality gates green** — they are why these templates are trustworthy. +6. **Keep the quality gates green** — they are why these templates are trustworthy. Run the stack's test + lint + typecheck/build commands (table) after each change; templates arrive green, so any red is yours. -5. If you change or extend **API endpoints** while both a CLIuno frontend and backend +7. If you change or extend **API endpoints** while both a CLIuno frontend and backend are in play, follow the shared contract — the `cliuno-matrix` skill documents every endpoint, payload, and response shape, and how to verify pairs. diff --git a/.claude/skills/cliuno-scaffold/references/stacks.md b/skills/cliuno-scaffold/references/stacks.md similarity index 67% rename from .claude/skills/cliuno-scaffold/references/stacks.md rename to skills/cliuno-scaffold/references/stacks.md index f71af7f..0db8956 100644 --- a/.claude/skills/cliuno-scaffold/references/stacks.md +++ b/skills/cliuno-scaffold/references/stacks.md @@ -10,15 +10,15 @@ Base UI for the React family, the framework's equivalent elsewhere — with Tail CSS-variable theming (`:root` + `.dark`) and lucide icons. UI components are vendored into the repo (you own the code), not imported from a kit package. -| Template | Install/dev | Verify | UI kit (primitives) | Add a component | -| -------- | ----------------------------- | --------------------------------------------- | ------------------------------------------------------- | ---------------------------------------------------- | -| React | `pnpm i` · `pnpm dev` | `tsc -b` · `oxlint .` · `pnpm build` | shadcn/ui (**Base UI**) in `src/components/ui` | `npx shadcn@latest add -y` | -| Next | `pnpm i` · `pnpm dev` (:5002) | `pnpm type-check` · `oxlint .` · `pnpm build` | shadcn/ui (**Base UI**) in `src/components/ui` | `npx shadcn@latest add -y` | -| Vue | `pnpm i` · `pnpm dev` | `vue-tsc --build` · `oxlint .` · `pnpm build` | shadcn-vue (reka-ui) in `src/components/ui` | `npx shadcn-vue@latest add ` | -| Nuxt | `pnpm i` · `pnpm dev` | `nuxi typecheck` · `oxlint .` · `pnpm build` | shadcn-vue via shadcn-nuxt (reka-ui) in `components/ui` | `npx shadcn-vue@latest add ` | -| Svelte | `pnpm i` · `pnpm dev` (:5000) | `pnpm check` · `oxlint .` · `pnpm build` | shadcn-svelte (bits-ui) in `src/lib/components/ui` | `npx shadcn-svelte@latest add ` | -| Solid | `pnpm i` · `pnpm dev` | `tsc --noEmit` · `oxlint .` · `pnpm build` | shadcn-style on Kobalte in `src/components/ui` | vendored — copy an existing component as the pattern | -| Angular | `pnpm i` · `pnpm start` | `ng build` · `oxlint .` | spartan-ng helm (Brain) | `ng g @spartan-ng/cli:ui ` | +| Template | Install/dev | Verify | UI kit (primitives) | Add a component | +| -------- | ----------------------------- | --------------------------------------------- | ----------------------------------------------------------- | ---------------------------------------------------- | +| React | `pnpm i` · `pnpm dev` | `tsc -b` · `oxlint .` · `pnpm build` | shadcn/ui (**Base UI**) in `src/components/ui` | `npx shadcn@latest add -y` | +| Next | `pnpm i` · `pnpm dev` (:5002) | `pnpm type-check` · `oxlint .` · `pnpm build` | shadcn/ui (**Base UI**) in `src/components/ui` | `npx shadcn@latest add -y` | +| Vue | `pnpm i` · `pnpm dev` | `vue-tsc --build` · `oxlint .` · `pnpm build` | shadcn-vue (reka-ui) in `src/components/ui` | `npx shadcn-vue@latest add ` | +| Nuxt | `pnpm i` · `pnpm dev` | `pnpm typecheck` · `oxlint .` · `pnpm build` | shadcn-vue via shadcn-nuxt (reka-ui) in `app/components/ui` | `npx shadcn-vue@latest add ` | +| Svelte | `pnpm i` · `pnpm dev` (:5000) | `pnpm check` · `oxlint .` · `pnpm build` | shadcn-svelte (bits-ui) in `src/lib/components/ui` | `npx shadcn-svelte@latest add ` | +| Solid | `pnpm i` · `pnpm dev` | `tsc --noEmit` · `oxlint .` · `pnpm build` | shadcn-style on Kobalte in `src/components/ui` | vendored — copy an existing component as the pattern | +| Angular | `pnpm i` · `pnpm start` | `ng build` · `oxlint .` | spartan-ng helm (Brain) | `ng g @spartan-ng/cli:ui ` | Frontend → backend base URL env: Vite apps `VITE_BACKEND_URL`; Next `NEXT_PUBLIC_API_BASE`; Nuxt via runtime config; Angular environments file. @@ -40,26 +40,31 @@ Material 3, React Native uses plain StyleSheet + expo-router. All serve the same contract at `/api/v1` on SQLite out of the box; first registration creates the `user` role (no seeding needed). -| Template | Install | Dev | Verify | -| --------- | -------------------------------------------- | -------------------------------------------------------- | ---------------------------------- | -| Express | `pnpm i` | `pnpm dev` | `tsc --noEmit` · `oxlint .` | -| Fastify | `pnpm i` | `pnpm dev` | `tsc --noEmit` · `oxlint .` | -| Nest | `pnpm i` | `pnpm start:dev` | `jest` · `nest build` · `oxlint .` | -| Adonis | `pnpm i` | `node ace migration:run && node ace serve --hmr` | `pnpm typecheck` · `oxlint .` | -| Django | `uv sync` | `uv run manage.py migrate && uv run manage.py runserver` | `manage.py test` · `ruff check .` | -| FastAPI | `uv sync` | `uv run uvicorn src.app:app --reload` | `pytest` · `ruff check .` | -| Laravel | `composer install` | `php artisan migrate && php artisan serve` | `artisan test` · `pint --test` | -| TallStack | `composer install && npm i && npm run build` | `php artisan migrate && php artisan serve` | `artisan test` · `pint --test` | -| Rails | `bundle install` | `bin/rails db:prepare && bin/rails server` | `rails test` · `rubocop` | -| Spring | — | `./mvnw spring-boot:run` | `./mvnw test` | -| ASP.NET | — | `dotnet run --project BackendASP.NET` | `dotnet build` (0 warnings) | +| Template | Install | Dev | Verify | +| --------- | -------------------------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------ | +| Express | `pnpm i` | `pnpm dev` | `tsc --noEmit` · `oxlint .` | +| Fastify | `pnpm i` | `pnpm dev` | `tsc --noEmit` · `oxlint .` | +| Nest | `pnpm i` | `pnpm start:dev` | `jest` · `nest build` · `oxlint .` | +| Adonis | `pnpm i` | `node ace migration:run && node ace serve --hmr` | `pnpm typecheck` · `oxlint .` | +| Django | `uv sync` | `uv run manage.py migrate && uv run manage.py runserver` | `manage.py test` · `ruff check .` | +| FastAPI | `uv sync` | `uv run uvicorn src.app:app --reload` | `pytest` · `ruff check .` | +| Laravel | `composer install` | `php artisan migrate && php artisan serve` | `artisan test` · `pint --test` | +| TallStack | `composer install && npm i && npm run build` | `php artisan migrate && php artisan serve` | `artisan test` · `pint --test` | +| Rails | `bundle install` | `bin/rails db:prepare && bin/rails server` | `rails test` · `rubocop` | +| Spring | — | `./mvnw spring-boot:run` | `./mvnw test` | +| ASP.NET | — | `dotnet run --project BackendASP.NET` | `dotnet build` (0 warnings) | +| Drogon | `cmake -S . -B build && cmake --build build` | `./build/cliuno_drogon` | `cmake --build build` (0 warnings) | +| Axum | `cargo build` | `cargo run` | `cargo test` · `cargo clippy -- -D warnings` · `cargo fmt --check` | Python templates: `unset VIRTUAL_ENV` first if a foreign venv is active. ## Why these templates are trustworthy (tell the user when relevant) -- Every frontend×backend pair passes a live 46-step contract flow (real one-time - tokens, a real TOTP, response-shape assertions) — the 9×11 board is kept fully green. +- Every frontend×backend pair passes a live 49-step contract flow (real one-time + tokens, a real TOTP, response-shape assertions). Columns whose toolchain is missing on a + machine (e.g. ASP.NET without the .NET SDK) are verified by that template's CI build only. +- `npx cliuno@^2.2 make:resource --fields …` adds a new resource in any of + them in one command (see the `cliuno-make` skill). - Each repo keeps its own test suite and native linter green, ships editor-ready configs, conventional-commit hooks where applicable, and a `CLAUDE.md` so AI agents extend it idiomatically instead of guessing. diff --git a/src/app.ts b/src/app.ts index ea78a0f..b7a8f77 100644 --- a/src/app.ts +++ b/src/app.ts @@ -1,118 +1,50 @@ #!/usr/bin/env node "use strict"; -import chalk from "chalk"; -import shell from "shelljs"; -import { select } from "@inquirer/prompts"; -import * as messages from "./utils/messages"; -import * as handler from "./utils/GitHandler"; +import { parseArgv } from "./cli/argv"; import { runDoctor } from "./utils/doctor"; -import { questions } from "./utils/questions"; +import { banner, runScaffold } from "./commands/scaffold"; +import { runMake, MAKE_USAGE } from "./commands/make"; +import { runSkills, SKILLS_USAGE } from "./commands/skills"; import { version } from "../package.json"; -console.log(chalk.blue("CLIuno 🕹")); -console.log( - chalk.green( - "Welcome to CLIuno, the Ultimate tool for making full web apps in less than min 🚀", - ), -); -console.log("Current version:", chalk.yellow(version)); +const HELP = ` +Usage: cliuno [command] [options] -const noJsPackageManager = new Set([ - "Django", - "FastAPI", - "Rails", - "Spring Boot", - "ASP.NET", - "Without Backend", -]); -const args = new Set(process.argv.slice(2)); - -if (args.has("--help") || args.has("-h")) { - console.log(` -Usage: cliuno [options] +Commands: + (none) interactive scaffolder: pick a backend / frontend / mobile template + make list the generators available in the current project + make: generate a resource, controller, model, … in the current project + skills status|install check / install the CLIuno Claude skills (.claude/skills/) Options: --help, -h Show this help message --version, -v Show the current version --doctor Run system diagnostics -`); - process.exit(0); -} else if (args.has("--version") || args.has("-v")) { - process.exit(0); -} else if (args.has("--doctor")) { - runDoctor(); -} else { - try { - const designPattern = await select(questions.DesignPattern); - - if (designPattern === "Doctor 🩺") { - runDoctor(); - } else if (designPattern === "MVC") { - await handleMVC(); - } else { - await handleRestApi(); - } - } catch { - console.log(chalk.yellow("\n👋 Bye!")); - process.exit(0); - } -} - -async function askPackageManager(): Promise { - return select(questions.PackageManager); -} - -async function handleMVC() { - console.log(chalk.yellow("🚧 Only TallStack is available for MVC with Postgres 🚧")); - const mvcChoice = await select(questions.MVC); - - if (mvcChoice === "TallStack") { - handler.mkdirAndClone(mvcChoice); - shell.exec("composer install"); - const packageManager = await askPackageManager(); - shell.exec(handler.getInstallCmd(packageManager)); - messages.goodBye(); - handler.cleaner(); - } else { - console.log(chalk.red("🚧 This feature is not available yet 🚧")); - } -} +${MAKE_USAGE}${SKILLS_USAGE}`; -async function handleRestApi() { - console.log(chalk.yellow("🚧 Only SQLite is supported for now 🚧")); - const backendChoice = await select(questions.RestApiBackend); +const parsed = parseArgv(process.argv.slice(2)); - let packageManager = "npm"; - if (!noJsPackageManager.has(backendChoice)) { - packageManager = await askPackageManager(); - } - - console.log(chalk.green("📁 Created a folder for the backend project")); - handler.backendInstaller(backendChoice, packageManager); - - const frontendType = await select(questions.RestApiFrontend); - - if (frontendType === "Website") { - if (noJsPackageManager.has(backendChoice)) { - packageManager = await askPackageManager(); - } - await handleWebsite(packageManager); - } else if (frontendType === "Mobile") { - await handleMobile(); - } else { - messages.withoutDepend(); - } -} - -async function handleWebsite(packageManager: string) { - const frontend = await select(questions.RestApiWebsite); - console.log(chalk.green("📁 Created a folder for the frontend project")); - handler.frontEndInstaller(frontend, packageManager); -} - -async function handleMobile() { - const mobile = await select(questions.RestApiMobile); - console.log(chalk.green("📁 Created a folder for the mobile app project")); - handler.mobileInstaller(mobile); +switch (parsed.command) { + case "help": + console.log(HELP); + process.exit(0); + break; + case "version": + console.log(version); + process.exit(0); + break; + case "doctor": + banner(version); + runDoctor(); + break; + case "make": + process.exit(await runMake(parsed)); + break; + case "skills": + process.exit(await runSkills(parsed)); + break; + default: + banner(version); + process.exit(await runScaffold()); } diff --git a/src/cli/argv.test.ts b/src/cli/argv.test.ts new file mode 100644 index 0000000..0245b65 --- /dev/null +++ b/src/cli/argv.test.ts @@ -0,0 +1,50 @@ +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { parseArgv } from "./argv"; + +test("make: with name and flags", () => { + const parsed = parseArgv(["make:resource", "Post", "--fields", "a:string", "--dry-run"]); + assert.equal(parsed.command, "make"); + assert.equal(parsed.kind, "resource"); + assert.equal(parsed.name, "Post"); + assert.equal(parsed.flags.fields, "a:string"); + assert.equal(parsed.flags["dry-run"], true); +}); + +test("bare make lists generators", () => { + const parsed = parseArgv(["make"]); + assert.equal(parsed.command, "make"); + assert.equal(parsed.kind, undefined); +}); + +test("skills sub-command and global flag", () => { + const parsed = parseArgv(["skills", "install", "--global", "--force"]); + assert.equal(parsed.command, "skills"); + assert.equal(parsed.sub, "install"); + assert.equal(parsed.flags.global, true); + assert.equal(parsed.flags.force, true); +}); + +test("legacy flags still route", () => { + assert.equal(parseArgv(["--doctor"]).command, "doctor"); + assert.equal(parseArgv(["-v"]).command, "version"); + assert.equal(parseArgv(["--help"]).command, "help"); + assert.equal(parseArgv([]).command, "scaffold"); +}); + +test("--flag=value form", () => { + const parsed = parseArgv(["make:model", "Tag", "--fields=name:string"]); + assert.equal(parsed.flags.fields, "name:string"); +}); + +test("unknown or mistyped flags never swallow the resource name", () => { + for (const argv of [ + ["make:resource", "--verbose", "Post"], + ["make:resource", "--dryrun", "Post"], + ["make:resource", "--force", "Post"], + ]) { + const parsed = parseArgv(argv); + assert.equal(parsed.name, "Post", argv.join(" ")); + } + assert.equal(parseArgv(["make:resource", "Post", "--fields", "a:int"]).flags.fields, "a:int"); +}); diff --git a/src/cli/argv.ts b/src/cli/argv.ts new file mode 100644 index 0000000..8d916e3 --- /dev/null +++ b/src/cli/argv.ts @@ -0,0 +1,73 @@ +export interface ParsedArgv { + command: "scaffold" | "make" | "skills" | "doctor" | "help" | "version"; + kind?: string; + name?: string; + sub?: string; + flags: Record; + positional: string[]; +} + +/** Flags that take a value; every other flag is boolean so it can never swallow the resource name. */ +const VALUE_FLAGS = new Set(["fields"]); + +function flagName(raw: string): string { + return raw.replace(/^--?/, ""); +} + +export function parseArgv(argv: string[]): ParsedArgv { + const flags: Record = {}; + const positional: string[] = []; + + for (let i = 0; i < argv.length; i++) { + const arg = argv[i] as string; + if (!arg.startsWith("-")) { + positional.push(arg); + continue; + } + const eq = arg.indexOf("="); + if (eq !== -1) { + flags[flagName(arg.slice(0, eq))] = arg.slice(eq + 1); + continue; + } + const name = flagName(arg); + const next = argv[i + 1]; + if (!VALUE_FLAGS.has(name) || next === undefined || next.startsWith("-")) { + flags[name] = true; + } else { + flags[name] = next; + i++; + } + } + + const first = positional[0]; + if (flags.help || flags.h) return { command: "help", flags, positional }; + if (flags.version || flags.v) return { command: "version", flags, positional }; + if (flags.doctor) return { command: "doctor", flags, positional }; + + if (first === "make" || first?.startsWith("make:")) { + const kind = first === "make" ? undefined : first.slice("make:".length); + return { + command: "make", + kind, + name: positional[1], + flags, + positional: positional.slice(2), + }; + } + if (first === "skills") { + return { command: "skills", sub: positional[1], flags, positional: positional.slice(2) }; + } + return { command: "scaffold", flags, positional }; +} + +export function flagString( + flags: Record, + name: string, +): string | undefined { + const value = flags[name]; + return typeof value === "string" ? value : undefined; +} + +export function flagBool(flags: Record, name: string): boolean { + return flags[name] === true || flags[name] === "true"; +} diff --git a/src/commands/make.ts b/src/commands/make.ts new file mode 100644 index 0000000..f4b752c --- /dev/null +++ b/src/commands/make.ts @@ -0,0 +1,143 @@ +import chalk from "chalk"; +import { detectStack, PROBES } from "../generators/detect"; +import { generators } from "../generators/stacks"; +import { buildNames } from "../generators/names"; +import { parseFields, FIELD_TYPES } from "../generators/fields"; +import { apply, plan, UnsupportedKindError } from "../generators/engine"; +import { KINDS, type Ctx, type Kind } from "../generators/types"; +import { flagBool, flagString, type ParsedArgv } from "../cli/argv"; + +export const MAKE_USAGE = ` +Usage: cliuno make list generators for the detected stack + cliuno make: [options] + +Kinds: ${KINDS.join(", ")} +Options: + --fields a:string,b:int? fields for the resource (types: ${FIELD_TYPES.join(", ")}; "?" = nullable) + default: title:string,description:text? + --dry-run print what would be written, write nothing + --force overwrite files that already exist + +Examples: + cliuno make:resource Product --fields name:string,price:number,inStock:boolean + cliuno make:controller Invoice --dry-run +`; + +function printPlan(label: string, kind: Kind, p: ReturnType) { + console.log(chalk.blue(`cliuno make:${kind}`) + chalk.gray(` (${label})`)); + for (const call of p.native) + console.log(chalk.yellow(` $ ${call.bin} ${call.args.join(" ")}`)); + for (const file of p.files) { + console.log(chalk.green(` + ${file.path}`)); + console.log(file.content.replace(/^/gm, " ")); + } + for (const patch of p.patches) { + console.log(chalk.cyan(` ~ ${patch.path}: ${patch.describe}`)); + console.log(patch.insert.replace(/^/gm, " ")); + } +} + +export async function runMake(parsed: ParsedArgv, cwd = process.cwd()): Promise { + const detection = detectStack(cwd); + if (!detection) { + console.error( + chalk.red( + "Could not detect a CLIuno stack here. Run this inside a scaffolded project.", + ), + ); + console.error(chalk.gray("Probes, in order:")); + for (const probe of PROBES) + console.error(chalk.gray(` ${probe.stack.padEnd(12)} ${probe.describe}`)); + return 1; + } + const gen = generators[detection.stack]; + const kinds = Object.keys(gen.commands) as Kind[]; + + if (!parsed.kind) { + console.log(chalk.blue(`${gen.label}`) + chalk.gray(` (${detection.root})`)); + if (kinds.length === 0) { + console.log(chalk.yellow(" no generators for this stack yet")); + return 0; + } + for (const kind of kinds) { + const cmd = gen.commands[kind]!; + const native = cmd.native + ? chalk.gray(` [native: ${cmd.native(demoCtx(detection.root))[0]?.bin}]`) + : ""; + console.log(` make:${kind.padEnd(11)} ${cmd.describe}${native}`); + } + console.log(MAKE_USAGE); + return 0; + } + + if (!(KINDS as readonly string[]).includes(parsed.kind)) { + console.error( + chalk.red(`Unknown generator "make:${parsed.kind}".`) + ` Kinds: ${KINDS.join(", ")}`, + ); + return 1; + } + if (!parsed.name) { + console.error( + chalk.red(`make:${parsed.kind} needs a name, e.g. cliuno make:${parsed.kind} Product`), + ); + return 1; + } + + let ctx: Ctx; + try { + ctx = { + cwd: detection.root, + names: buildNames(parsed.name), + fields: parseFields(flagString(parsed.flags, "fields")), + force: flagBool(parsed.flags, "force"), + dryRun: flagBool(parsed.flags, "dry-run"), + }; + } catch (error) { + console.error(chalk.red((error as Error).message)); + return 1; + } + + let p; + try { + p = plan(gen, parsed.kind as Kind, ctx); + } catch (error) { + if (error instanceof UnsupportedKindError) { + console.error(chalk.red(error.message)); + return 1; + } + console.error(chalk.red((error as Error).message)); + return 1; + } + + if (ctx.dryRun) printPlan(gen.label, parsed.kind as Kind, p); + + const result = await apply(p, ctx, undefined, gen); + if (result.nativeExit !== undefined) { + if (result.nativeExit !== 0) + console.error(chalk.red(`native command failed (exit ${result.nativeExit})`)); + for (const note of result.notes) console.log(chalk.gray(` ${note}`)); + return result.nativeExit; + } + + if (!ctx.dryRun) { + for (const file of result.written) console.log(chalk.green(` + ${file}`)); + for (const file of result.patched) console.log(chalk.cyan(` ~ ${file}`)); + } + for (const file of result.skipped) + console.log(chalk.yellow(` = ${file} exists (use --force to overwrite)`)); + if (result.formatted) console.log(chalk.gray(" ✓ formatted")); + for (const note of result.notes) console.log(chalk.gray(` ! ${note}`)); + if (result.written.length === 0 && result.patched.length === 0 && result.skipped.length > 0) + return 1; + return 0; +} + +function demoCtx(cwd: string): Ctx { + return { + cwd, + names: buildNames("example"), + fields: parseFields(undefined), + force: false, + dryRun: true, + }; +} diff --git a/src/commands/scaffold.ts b/src/commands/scaffold.ts new file mode 100644 index 0000000..a313746 --- /dev/null +++ b/src/commands/scaffold.ts @@ -0,0 +1,115 @@ +import chalk from "chalk"; +import shell from "shelljs"; +import { select } from "@inquirer/prompts"; +import * as messages from "../utils/messages"; +import * as handler from "../utils/GitHandler"; +import { runDoctor } from "../utils/doctor"; +import { questions } from "../utils/questions"; +import { shouldHintSkills } from "./skills"; + +const noJsPackageManager = new Set([ + "Django", + "FastAPI", + "Rails", + "Spring Boot", + "ASP.NET", + "Drogon", + "Axum", + "Without Backend", +]); + +export function banner(version: string) { + console.log(chalk.blue("CLIuno 🕹")); + console.log( + chalk.green( + "Welcome to CLIuno, the Ultimate tool for making full web apps in less than min 🚀", + ), + ); + console.log("Current version:", chalk.yellow(version)); + if (shouldHintSkills(process.cwd())) { + console.log( + chalk.gray("💡 AI agent here? Install the CLIuno skills: ") + + chalk.cyan("cliuno skills install"), + ); + } +} + +export async function runScaffold(): Promise { + try { + const designPattern = await select(questions.DesignPattern); + + if (designPattern === "Doctor 🩺") { + runDoctor(); + } else if (designPattern === "MVC") { + await handleMVC(); + } else { + await handleRestApi(); + } + return 0; + } catch (error) { + if (error instanceof Error && error.name === "ExitPromptError") { + console.log(chalk.yellow("\n👋 Bye!")); + return 0; + } + console.error(chalk.red(`\n✘ ${error instanceof Error ? error.message : String(error)}`)); + return 1; + } +} + +async function askPackageManager(): Promise { + return select(questions.PackageManager); +} + +async function handleMVC() { + console.log(chalk.yellow("🚧 Only TallStack is available for MVC with Postgres 🚧")); + const mvcChoice = await select(questions.MVC); + + if (mvcChoice === "TallStack") { + handler.mkdirAndClone(mvcChoice); + shell.exec("composer install"); + const packageManager = await askPackageManager(); + shell.exec(handler.getInstallCmd(packageManager)); + messages.goodBye(); + handler.cleaner(); + } else { + console.log(chalk.red("🚧 This feature is not available yet 🚧")); + } +} + +async function handleRestApi() { + console.log(chalk.yellow("🚧 Only SQLite is supported for now 🚧")); + const backendChoice = await select(questions.RestApiBackend); + + let packageManager = "npm"; + if (!noJsPackageManager.has(backendChoice)) { + packageManager = await askPackageManager(); + } + + console.log(chalk.green("📁 Created a folder for the backend project")); + handler.backendInstaller(backendChoice, packageManager); + + const frontendType = await select(questions.RestApiFrontend); + + if (frontendType === "Website") { + if (noJsPackageManager.has(backendChoice)) { + packageManager = await askPackageManager(); + } + await handleWebsite(packageManager); + } else if (frontendType === "Mobile") { + await handleMobile(); + } else { + messages.withoutDepend(); + } +} + +async function handleWebsite(packageManager: string) { + const frontend = await select(questions.RestApiWebsite); + console.log(chalk.green("📁 Created a folder for the frontend project")); + handler.frontEndInstaller(frontend, packageManager); +} + +async function handleMobile() { + const mobile = await select(questions.RestApiMobile); + console.log(chalk.green("📁 Created a folder for the mobile app project")); + handler.mobileInstaller(mobile); +} diff --git a/src/commands/skills.test.ts b/src/commands/skills.test.ts new file mode 100644 index 0000000..95e7959 --- /dev/null +++ b/src/commands/skills.test.ts @@ -0,0 +1,106 @@ +import { test } from "node:test"; +import assert from "node:assert/strict"; +import fs from "node:fs"; +import os from "node:os"; +import path from "node:path"; +import { installSkills, skillsStatus } from "./skills"; + +function tmp(): string { + return fs.mkdtempSync(path.join(os.tmpdir(), "cliuno-skills-")); +} + +function skill(root: string, name: string, version: string, body = "hello") { + fs.mkdirSync(path.join(root, name, "references"), { recursive: true }); + fs.writeFileSync( + path.join(root, name, "SKILL.md"), + `---\nname: ${name}\ndescription: x\nmetadata:\n version: ${version}\n---\n${body}\n`, + ); + fs.writeFileSync(path.join(root, name, "references", "a.md"), "ref"); +} + +const install = (cwd: string, home: string, packaged: string, extra = {}) => + installSkills({ cwd, home, packaged, global: false, force: false, ...extra }); + +test("an untouched older install is outdated and upgrades; an edited one is modified and kept", () => { + const packaged = tmp(); + const cwd = tmp(); + const home = tmp(); + skill(packaged, "cliuno-make", "2.2.0"); + skill(packaged, "cliuno-scaffold", "2.2.0"); + install(cwd, home, packaged); + + // a new release ships different content + skill(packaged, "cliuno-make", "2.3.0", "new body"); + skill(packaged, "cliuno-scaffold", "2.3.0", "new body"); + // the user edited one of the installed copies + fs.appendFileSync(path.join(cwd, ".claude/skills/cliuno-scaffold/SKILL.md"), "my notes\n"); + + const states = Object.fromEntries( + skillsStatus({ cwd, home, packaged }).map((s) => [s.name, s.state]), + ); + assert.deepEqual(states, { "cliuno-make": "outdated", "cliuno-scaffold": "modified" }); + + const r = install(cwd, home, packaged); + assert.deepEqual(r.installed, ["cliuno-make"]); + assert.deepEqual(r.skipped, [{ name: "cliuno-scaffold", state: "modified" }]); + assert.match( + fs.readFileSync(path.join(cwd, ".claude/skills/cliuno-scaffold/SKILL.md"), "utf8"), + /my notes/, + ); +}); + +test("a hand-copied skill without an install record is never overwritten without --force", () => { + const packaged = tmp(); + const cwd = tmp(); + const home = tmp(); + skill(packaged, "cliuno-make", "2.3.0"); + skill(path.join(cwd, ".claude", "skills"), "cliuno-make", "2.0.0"); + assert.equal(skillsStatus({ cwd, home, packaged })[0]!.state, "modified"); + assert.deepEqual(install(cwd, home, packaged).installed, []); + assert.deepEqual(install(cwd, home, packaged, { force: true }).installed, ["cliuno-make"]); + assert.equal(skillsStatus({ cwd, home, packaged })[0]!.state, "installed"); +}); + +test("a directory without SKILL.md is reported as occupied and left alone", () => { + const packaged = tmp(); + const cwd = tmp(); + const home = tmp(); + skill(packaged, "cliuno-make", "2.3.0"); + const dir = path.join(cwd, ".claude", "skills", "cliuno-make"); + fs.mkdirSync(dir, { recursive: true }); + fs.writeFileSync(path.join(dir, "my-file.txt"), "keep me"); + + assert.equal(skillsStatus({ cwd, home, packaged })[0]!.state, "occupied"); + const r = install(cwd, home, packaged); + assert.deepEqual(r.skipped, [{ name: "cliuno-make", state: "occupied" }]); + assert.equal(fs.readFileSync(path.join(dir, "my-file.txt"), "utf8"), "keep me"); +}); + +test("status reports the copy Claude Code loads: the personal one wins over the project one", () => { + const packaged = tmp(); + const cwd = tmp(); + const home = tmp(); + skill(packaged, "cliuno-make", "2.3.0"); + install(cwd, home, packaged); + skill(path.join(home, ".claude", "skills"), "cliuno-make", "2.3.0", "edited personal copy"); + + const [s] = skillsStatus({ cwd, home, packaged }); + assert.equal(s!.projectState, "installed"); + assert.equal(s!.userState, "modified"); + assert.equal(s!.state, "modified"); +}); + +test("install is idempotent and --global targets the home directory", () => { + const packaged = tmp(); + const cwd = tmp(); + const home = tmp(); + skill(packaged, "cliuno-make", "2.3.0"); + assert.deepEqual(install(cwd, home, packaged).installed, ["cliuno-make"]); + assert.deepEqual(install(cwd, home, packaged).skipped, [ + { name: "cliuno-make", state: "installed" }, + ]); + const g = install(cwd, home, packaged, { global: true }); + assert.equal(g.target, path.join(home, ".claude", "skills")); + assert.deepEqual(g.installed, ["cliuno-make"]); + assert.ok(fs.existsSync(path.join(home, ".claude/skills/cliuno-make/references/a.md"))); +}); diff --git a/src/commands/skills.ts b/src/commands/skills.ts new file mode 100644 index 0000000..2e03012 --- /dev/null +++ b/src/commands/skills.ts @@ -0,0 +1,232 @@ +import crypto from "node:crypto"; +import fs from "node:fs"; +import os from "node:os"; +import path from "node:path"; +import chalk from "chalk"; +import { flagBool, type ParsedArgv } from "../cli/argv"; +import { packagedSkillsDir } from "../skills/locate"; + +/** + * - `missing` no copy in this scope + * - `installed` identical to the packaged skill + * - `outdated` an untouched copy from an earlier `cliuno skills install` — safe to upgrade + * - `modified` differs from the package and was not provably installed by us — kept unless --force + * - `occupied` the directory exists but has no SKILL.md — never touched without --force + */ +export type SkillState = "missing" | "installed" | "outdated" | "modified" | "occupied"; + +export interface SkillStatus { + name: string; + packaged: string; + project?: string; + user?: string; + projectState: SkillState; + userState: SkillState; + /** State of the copy Claude Code actually loads (personal scope wins over project scope). */ + state: SkillState; +} + +export const SKILLS_USAGE = ` +Usage: cliuno skills status show which CLIuno skills are installed (project + user scope) + cliuno skills install [options] copy the skills into ./.claude/skills/ + +Options: + --global install into ~/.claude/skills/ instead of the current project + --force overwrite skills that were modified locally (or directories that are not skills) +`; + +/** Written next to an installed skill so a later install can tell an untouched copy from an edited one. */ +const RECORD = ".cliuno-skill.json"; + +function listSkills(dir: string): string[] { + if (!fs.existsSync(dir)) return []; + return fs + .readdirSync(dir, { withFileTypes: true }) + .filter( + (e) => + (e.isDirectory() || e.isSymbolicLink()) && + fs.existsSync(path.join(dir, e.name, "SKILL.md")), + ) + .map((e) => e.name) + .sort(); +} + +export function skillVersion(skillDir: string): string { + const text = fs.readFileSync(path.join(skillDir, "SKILL.md"), "utf8"); + const match = text.match(/^\s*version:\s*["']?([\w.-]+)["']?\s*$/m); + return match?.[1] ?? "0.0.0"; +} + +function walk(dir: string): string[] { + const out: string[] = []; + for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { + if (entry.name === RECORD) continue; + const full = path.join(dir, entry.name); + if (entry.isDirectory()) out.push(...walk(full)); + else out.push(full); + } + return out.sort(); +} + +/** Content hash of a skill directory (relative paths + bytes), ignoring our install record. */ +export function hashSkill(dir: string): string { + const hash = crypto.createHash("sha256"); + for (const file of walk(dir)) { + hash.update(path.relative(dir, file)); + hash.update("\0"); + hash.update(fs.readFileSync(file)); + hash.update("\0"); + } + return hash.digest("hex"); +} + +function readRecord(dir: string): { hash?: string } | null { + try { + return JSON.parse(fs.readFileSync(path.join(dir, RECORD), "utf8")) as { hash?: string }; + } catch { + return null; + } +} + +export function stateOf(packaged: string, target: string): SkillState { + if (!fs.existsSync(target)) return "missing"; + if (!fs.existsSync(path.join(target, "SKILL.md"))) return "occupied"; + const current = hashSkill(target); + if (current === hashSkill(packaged)) return "installed"; + // Content differs. It is only safe to replace when our record proves nobody edited it since install. + return readRecord(target)?.hash === current ? "outdated" : "modified"; +} + +export function skillsStatus(opts: { cwd: string; home: string; packaged: string }): SkillStatus[] { + const projectDir = path.join(opts.cwd, ".claude", "skills"); + const userDir = path.join(opts.home, ".claude", "skills"); + return listSkills(opts.packaged).map((name) => { + const packaged = path.join(opts.packaged, name); + const project = path.join(projectDir, name); + const user = path.join(userDir, name); + const projectState = stateOf(packaged, project); + const userState = stateOf(packaged, user); + return { + name, + packaged, + project: projectState === "missing" ? undefined : project, + user: userState === "missing" ? undefined : user, + projectState, + userState, + state: userState !== "missing" ? userState : projectState, + }; + }); +} + +function copySkill(from: string, to: string) { + fs.rmSync(to, { recursive: true, force: true }); + fs.mkdirSync(to, { recursive: true }); + fs.cpSync(from, to, { recursive: true, dereference: true }); + fs.writeFileSync( + path.join(to, RECORD), + `${JSON.stringify({ version: skillVersion(from), hash: hashSkill(from) }, null, 2)}\n`, + ); +} + +export function installSkills(opts: { + cwd: string; + home: string; + packaged: string; + global: boolean; + force: boolean; +}): { + installed: string[]; + skipped: { name: string; state: SkillState }[]; + target: string; +} { + const target = path.join(opts.global ? opts.home : opts.cwd, ".claude", "skills"); + const installed: string[] = []; + const skipped: { name: string; state: SkillState }[] = []; + for (const name of listSkills(opts.packaged)) { + const from = path.join(opts.packaged, name); + const to = path.join(target, name); + const state = stateOf(from, to); + const safe = state === "missing" || state === "outdated"; + if (state === "installed" || (!safe && !opts.force)) { + skipped.push({ name, state }); + continue; + } + copySkill(from, to); + installed.push(name); + } + return { installed, skipped, target }; +} + +/** True when the cwd looks like an AI-agent-aware project but has none of the CLIuno skills. */ +export function shouldHintSkills(cwd: string, home = os.homedir()): boolean { + const agentAware = + fs.existsSync(path.join(cwd, "CLAUDE.md")) || fs.existsSync(path.join(cwd, ".claude")); + if (!agentAware) return false; + try { + return skillsStatus({ cwd, home, packaged: packagedSkillsDir() }).every( + (s) => s.state === "missing", + ); + } catch { + return false; + } +} + +const SKIP_REASON: Record = { + installed: "already up to date", + modified: "modified locally — kept (use --force to overwrite)", + occupied: "directory exists but is not a skill — kept (use --force to replace)", + outdated: "outdated", + missing: "missing", +}; + +export async function runSkills( + parsed: ParsedArgv, + cwd = process.cwd(), + home = os.homedir(), +): Promise { + const packaged = packagedSkillsDir(); + const sub = parsed.sub ?? "status"; + + if (sub === "status") { + const statuses = skillsStatus({ cwd, home, packaged }); + for (const s of statuses) { + const icon = + s.state === "installed" + ? chalk.green("✔") + : s.state === "missing" + ? chalk.red("✘") + : chalk.yellow("!"); + const scopes = chalk.gray(`project: ${s.projectState} · user: ${s.userState}`); + console.log(`${icon} ${s.name.padEnd(16)} ${s.state.padEnd(10)} ${scopes}`); + } + if (statuses.some((s) => s.state !== "installed")) { + console.log( + chalk.gray("\nInstall or refresh with: cliuno skills install [--global] [--force]"), + ); + return statuses.every((s) => s.state === "missing") ? 2 : 0; + } + return 0; + } + + if (sub === "install") { + const result = installSkills({ + cwd, + home, + packaged, + global: flagBool(parsed.flags, "global"), + force: flagBool(parsed.flags, "force"), + }); + for (const name of result.installed) + console.log(chalk.green(` + ${path.join(result.target, name)}`)); + for (const { name, state } of result.skipped) + console.log(chalk.yellow(` = ${name}: ${SKIP_REASON[state]}`)); + console.log( + chalk.gray("\nClaude Code picks project skills up from .claude/skills/ automatically."), + ); + return 0; + } + + console.error(chalk.red(`Unknown sub-command "skills ${sub}".`)); + console.error(SKILLS_USAGE); + return 1; +} diff --git a/src/generators/detect.test.ts b/src/generators/detect.test.ts new file mode 100644 index 0000000..f71f442 --- /dev/null +++ b/src/generators/detect.test.ts @@ -0,0 +1,77 @@ +import { test } from "node:test"; +import assert from "node:assert/strict"; +import fs from "node:fs"; +import os from "node:os"; +import path from "node:path"; +import { detectStack } from "./detect"; + +function fixture(files: Record): string { + const dir = fs.mkdtempSync(path.join(os.tmpdir(), "cliuno-detect-")); + for (const [file, content] of Object.entries(files)) { + fs.mkdirSync(path.dirname(path.join(dir, file)), { recursive: true }); + fs.writeFileSync(path.join(dir, file), content); + } + return dir; +} + +const pkg = (deps: Record) => JSON.stringify({ dependencies: deps }); + +const cases: Array<[string, Record]> = [ + [ + "tallstack", + { + "composer.json": JSON.stringify({ + require: { "laravel/framework": "^13", "livewire/livewire": "^3" }, + }), + }, + ], + ["laravel", { "composer.json": JSON.stringify({ require: { "laravel/framework": "^13" } }) }], + ["django", { "pyproject.toml": 'dependencies = ["django>=6.0", "djangorestframework"]' }], + ["fastapi", { "pyproject.toml": 'dependencies = ["fastapi[standard]>=0.1"]' }], + ["rails", { Gemfile: 'source "https://rubygems.org"\ngem "rails", "~> 8.1"' }], + [ + "spring", + { + "pom.xml": + "spring-boot-starter-parent", + }, + ], + ["aspnet", { "Api/Api.csproj": '' }], + ["drogon", { "CMakeLists.txt": "find_package(Drogon CONFIG REQUIRED)" }], + [ + "axum", + { "Cargo.toml": '[package]\nname = "x"\n\n[dependencies]\naxum = "0.8"\ntokio = "1"\n' }, + ], + ["flutter", { "pubspec.yaml": "dependencies:\n flutter:\n sdk: flutter\n" }], + ["nest", { "package.json": pkg({ "@nestjs/core": "1", express: "1" }) }], + ["adonis", { "package.json": pkg({ "@adonisjs/core": "1" }) }], + ["fastify", { "package.json": pkg({ fastify: "1" }) }], + ["express", { "package.json": pkg({ express: "1" }) }], + ["next", { "package.json": pkg({ next: "1", react: "1" }) }], + ["nuxt", { "package.json": pkg({ nuxt: "1", vue: "1", "vue-router": "1" }) }], + ["reactnative", { "package.json": pkg({ expo: "1", react: "1" }) }], + ["react", { "package.json": pkg({ react: "1", "react-router-dom": "1" }) }], + ["vue", { "package.json": pkg({ vue: "1", "vue-router": "1" }) }], + ["svelte", { "package.json": pkg({ "@sveltejs/kit": "1" }) }], + ["solid", { "package.json": pkg({ "solid-js": "1" }) }], + ["angular", { "package.json": pkg({ "@angular/core": "1" }) }], +]; + +for (const [stack, files] of cases) { + test(`detects ${stack}`, () => { + const dir = fixture(files); + assert.equal(detectStack(dir)?.stack, stack); + }); +} + +test("walks up from a sub directory and returns the root", () => { + const dir = fixture({ "package.json": pkg({ express: "1" }), "src/controllers/.keep": "" }); + const found = detectStack(path.join(dir, "src/controllers")); + assert.equal(found?.stack, "express"); + assert.equal(found?.root, dir); +}); + +test("returns null when nothing matches", () => { + assert.equal(detectStack(fixture({ "README.md": "" })), null); + assert.equal(detectStack(fixture({ "package.json": pkg({ lodash: "1" }) })), null); +}); diff --git a/src/generators/detect.ts b/src/generators/detect.ts new file mode 100644 index 0000000..27eac5b --- /dev/null +++ b/src/generators/detect.ts @@ -0,0 +1,236 @@ +import fs from "node:fs"; +import path from "node:path"; + +export type StackId = + | "express" + | "fastify" + | "nest" + | "adonis" + | "django" + | "fastapi" + | "laravel" + | "tallstack" + | "rails" + | "spring" + | "aspnet" + | "drogon" + | "axum" + | "react" + | "next" + | "vue" + | "nuxt" + | "svelte" + | "solid" + | "angular" + | "flutter" + | "reactnative"; + +export interface Detection { + stack: StackId; + root: string; +} + +interface Probe { + stack: StackId; + describe: string; + test: (dir: string) => boolean; +} + +function read(dir: string, file: string): string | null { + try { + return fs.readFileSync(path.join(dir, file), "utf8"); + } catch { + return null; + } +} + +function pkgDeps(dir: string): Record | null { + const raw = read(dir, "package.json"); + if (!raw) return null; + try { + const pkg = JSON.parse(raw) as { + dependencies?: Record; + devDependencies?: Record; + }; + return { ...pkg.dependencies, ...pkg.devDependencies }; + } catch { + return null; + } +} + +function composerRequires(dir: string, name: string): boolean { + const raw = read(dir, "composer.json"); + if (!raw) return false; + try { + const c = JSON.parse(raw) as { require?: Record }; + return Boolean(c.require?.[name]); + } catch { + return false; + } +} + +function pyprojectHas(dir: string, name: string): boolean { + const raw = read(dir, "pyproject.toml"); + return raw !== null && new RegExp(`["']${name}(\\[|[>=<~!]|["'])`, "i").test(raw); +} + +function csprojIsWeb(dir: string): boolean { + const candidates: string[] = []; + try { + for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { + if (entry.isFile() && entry.name.endsWith(".csproj")) + candidates.push(path.join(dir, entry.name)); + if (entry.isDirectory() && !entry.name.startsWith(".")) { + try { + for (const sub of fs.readdirSync(path.join(dir, entry.name))) { + if (sub.endsWith(".csproj")) + candidates.push(path.join(dir, entry.name, sub)); + } + } catch { + /* unreadable sub dir */ + } + } + } + } catch { + return false; + } + return candidates.some((file) => { + try { + return fs.readFileSync(file, "utf8").includes("Microsoft.NET.Sdk.Web"); + } catch { + return false; // dangling symlink or unreadable file + } + }); +} + +const dep = (dir: string, name: string) => Boolean(pkgDeps(dir)?.[name]); + +export const PROBES: readonly Probe[] = [ + { + stack: "tallstack", + describe: "composer.json requires livewire/livewire", + test: (d) => composerRequires(d, "livewire/livewire"), + }, + { + stack: "laravel", + describe: "composer.json requires laravel/framework", + test: (d) => composerRequires(d, "laravel/framework"), + }, + { + stack: "django", + describe: "pyproject.toml lists django", + test: (d) => pyprojectHas(d, "django"), + }, + { + stack: "fastapi", + describe: "pyproject.toml lists fastapi", + test: (d) => pyprojectHas(d, "fastapi"), + }, + { + stack: "rails", + describe: 'Gemfile has gem "rails"', + test: (d) => /gem\s+["']rails["']/.test(read(d, "Gemfile") ?? ""), + }, + { + stack: "spring", + describe: "pom.xml contains spring-boot", + test: (d) => (read(d, "pom.xml") ?? "").includes("spring-boot"), + }, + { stack: "aspnet", describe: "*.csproj uses Microsoft.NET.Sdk.Web", test: csprojIsWeb }, + { + stack: "drogon", + describe: "CMakeLists.txt links Drogon", + test: (d) => (read(d, "CMakeLists.txt") ?? "").includes("Drogon"), + }, + { + stack: "axum", + describe: "Cargo.toml depends on axum", + test: (d) => /^\s*axum\s*=/m.test(read(d, "Cargo.toml") ?? ""), + }, + { + stack: "flutter", + describe: "pubspec.yaml depends on flutter", + test: (d) => /^\s+flutter:\s*$/m.test(read(d, "pubspec.yaml") ?? ""), + }, + { + stack: "nest", + describe: "package.json depends on @nestjs/core", + test: (d) => dep(d, "@nestjs/core"), + }, + { + stack: "adonis", + describe: "package.json depends on @adonisjs/core", + test: (d) => dep(d, "@adonisjs/core"), + }, + { + stack: "fastify", + describe: "package.json depends on fastify", + test: (d) => dep(d, "fastify"), + }, + { + stack: "express", + describe: "package.json depends on express", + test: (d) => dep(d, "express"), + }, + { stack: "next", describe: "package.json depends on next", test: (d) => dep(d, "next") }, + { stack: "nuxt", describe: "package.json depends on nuxt", test: (d) => dep(d, "nuxt") }, + { stack: "reactnative", describe: "package.json depends on expo", test: (d) => dep(d, "expo") }, + { + stack: "react", + describe: "package.json depends on react + react-router-dom", + test: (d) => dep(d, "react") && dep(d, "react-router-dom"), + }, + { + stack: "vue", + describe: "package.json depends on vue + vue-router", + test: (d) => dep(d, "vue") && dep(d, "vue-router"), + }, + { + stack: "svelte", + describe: "package.json depends on @sveltejs/kit", + test: (d) => dep(d, "@sveltejs/kit"), + }, + { + stack: "solid", + describe: "package.json depends on solid-js", + test: (d) => dep(d, "solid-js"), + }, + { + stack: "angular", + describe: "package.json depends on @angular/core", + test: (d) => dep(d, "@angular/core"), + }, +]; + +const MANIFESTS = [ + "Cargo.toml", + "package.json", + "composer.json", + "pyproject.toml", + "Gemfile", + "pom.xml", + "CMakeLists.txt", + "pubspec.yaml", +]; + +function hasManifest(dir: string): boolean { + if (MANIFESTS.some((m) => fs.existsSync(path.join(dir, m)))) return true; + return csprojIsWeb(dir); +} + +/** Walk up from cwd (≤ 6 levels) to the first directory with a manifest, then run the probes in order. */ +export function detectStack(cwd: string): Detection | null { + let dir = path.resolve(cwd); + for (let depth = 0; depth <= 6; depth++) { + if (hasManifest(dir)) { + for (const probe of PROBES) { + if (probe.test(dir)) return { stack: probe.stack, root: dir }; + } + return null; + } + const parent = path.dirname(dir); + if (parent === dir) break; + dir = parent; + } + return null; +} diff --git a/src/generators/engine.test.ts b/src/generators/engine.test.ts new file mode 100644 index 0000000..7cf3f9c --- /dev/null +++ b/src/generators/engine.test.ts @@ -0,0 +1,181 @@ +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { apply, applyPatch, plan, quoteForCmd, type Io } from "./engine"; +import type { Ctx, Generator, Patch } from "./types"; +import { buildNames } from "./names"; +import { parseFields } from "./fields"; + +const ctx = (over: Partial = {}): Ctx => ({ + cwd: "/app", + names: buildNames("post"), + fields: parseFields(undefined), + force: false, + dryRun: false, + ...over, +}); + +function memIo( + files: Record, + bins: string[] = [], +): Io & { files: Record; ran: string[] } { + const ran: string[] = []; + return { + files, + ran, + exists: (f) => f in files, + read: (f) => files[f] as string, + write: (f, c) => { + files[f] = c; + }, + which: (bin) => bins.includes(bin), + run: (call) => { + ran.push(`${call.bin} ${call.args.join(" ")}`); + return 0; + }, + }; +} + +const gen: Generator = { + id: "express", + label: "Express", + kind: "backend", + commands: { + model: { + describe: "entity", + native: () => [{ bin: "php", args: ["artisan", "make:model"] }], + files: (c) => [{ path: `src/${c.names.kebab}.ts`, content: "stub" }], + }, + migration: { + describe: "only native", + native: () => [{ bin: "php", args: ["artisan", "make:migration"] }], + }, + resource: { + describe: "all", + files: (c) => [{ path: `src/${c.names.kebab}.ts`, content: "stub" }], + patches: () => [ + { + path: "src/index.ts", + anchor: "// end", + insert: "use(post)\n", + where: "before", + skipIf: "use(post)", + describe: "register", + }, + ], + }, + }, +}; + +const patch: Patch = { + path: "x", + anchor: "// anchor", + insert: "NEW\n", + where: "after", + skipIf: "NEW", + describe: "add", +}; + +test("applyPatch after/before/skip/missing", () => { + assert.equal(applyPatch("a\n// anchor\nb", patch).text, "a\n// anchorNEW\n\nb"); + assert.equal( + applyPatch("a\n// anchor\nb", { ...patch, where: "before" }).text, + "a\nNEW\n// anchor\nb", + ); + assert.equal(applyPatch("NEW\n// anchor", patch).status, "skipped"); + assert.equal(applyPatch("nothing", patch).status, "anchor-missing"); + assert.equal( + applyPatch("x\nimport a\nimport b\ny", { ...patch, anchor: /^import .*$/m }).text, + "x\nimport a\nimport bNEW\n\ny", + ); +}); + +test("plan prefers native when the binary exists, falls back to stubs otherwise", () => { + const withPhp = plan(gen, "model", ctx(), memIo({}, ["php"])); + assert.equal(withPhp.native.length, 1); + assert.equal(withPhp.files.length, 0); + const noPhp = plan(gen, "model", ctx(), memIo({})); + assert.equal(noPhp.native.length, 0); + assert.equal(noPhp.files.length, 1); + assert.match(noPhp.notes[0] as string, /not found/); + assert.throws(() => plan(gen, "migration", ctx(), memIo({})), /not found on PATH/); + assert.throws(() => plan(gen, "page", ctx(), memIo({})), /no "make:page"/); +}); + +test("apply refuses to overwrite without --force, writes with it, dry-run touches nothing", async () => { + const io = memIo({ "/app/src/post.ts": "old", "/app/src/index.ts": "// end" }); + const p = plan(gen, "resource", ctx(), io); + let r = await apply(p, ctx(), io); + assert.deepEqual(r.skipped, ["src/post.ts"]); + assert.equal(io.files["/app/src/post.ts"], "old"); + assert.equal(io.files["/app/src/index.ts"], "use(post)\n// end"); + + r = await apply(p, ctx({ force: true }), io); + assert.deepEqual(r.written, ["src/post.ts"]); + assert.equal(io.files["/app/src/post.ts"], "stub"); + assert.equal(io.files["/app/src/index.ts"], "use(post)\n// end", "patch is idempotent"); + assert.deepEqual(r.patched, []); + + const dry = memIo({ "/app/src/index.ts": "// end" }); + r = await apply(p, ctx({ dryRun: true }), dry); + assert.deepEqual(r.written, ["src/post.ts"]); + assert.equal(dry.files["/app/src/post.ts"], undefined); + assert.equal(dry.files["/app/src/index.ts"], "// end"); +}); + +test("missing patch target or anchor becomes a note", async () => { + const io = memIo({}); + const r = await apply(plan(gen, "resource", ctx(), io), ctx(), io); + assert.match(r.notes[0] as string, /src\/index.ts not found/); + const io2 = memIo({ "/app/src/index.ts": "no anchor here" }); + const r2 = await apply(plan(gen, "resource", ctx(), io2), ctx(), io2); + assert.match(r2.notes[0] as string, /Could not find where to register/); +}); + +test("native calls run in order and dry-run only reports them", async () => { + const io = memIo({}, ["php"]); + const r = await apply(plan(gen, "model", ctx(), io), ctx(), io); + assert.deepEqual(io.ran, ["php artisan make:model"]); + assert.equal(r.nativeExit, 0); + const dry = memIo({}, ["php"]); + const r2 = await apply(plan(gen, "model", ctx(), dry), ctx({ dryRun: true }), dry); + assert.deepEqual(dry.ran, []); + assert.match(r2.notes[0] as string, /would run: php artisan make:model/); +}); + +test("formatter runs on written + patched files when its binary exists", async () => { + const io = memIo({ "/app/src/index.ts": "// end" }, ["node_modules/.bin/oxfmt"]); + const formatted: Generator = { + ...gen, + format: (files) => ({ bin: "node_modules/.bin/oxfmt", args: files, quiet: true }), + }; + const r = await apply(plan(formatted, "resource", ctx(), io), ctx(), io, formatted); + assert.equal(r.formatted, true); + assert.deepEqual(io.ran, ["node_modules/.bin/oxfmt src/post.ts src/index.ts"]); + const none = memIo({ "/app/src/index.ts": "// end" }); + const r2 = await apply(plan(formatted, "resource", ctx(), none), ctx(), none, formatted); + assert.equal(r2.formatted, undefined); + assert.deepEqual(none.ran, []); +}); + +test("replace patches rewrite the matched text and are idempotent", () => { + const merge = (m: string) => (m.includes("b") ? m : `${m}, b`); + const p: Patch = { + path: "x", + anchor: /^import .+$/m, + insert: "b", + where: "after", + skipIf: "__never__", + replace: merge, + describe: "merge", + }; + const once = applyPatch("import a\nrest", p); + assert.equal(once.text, "import a, b\nrest"); + assert.equal(applyPatch(once.text, p).status, "skipped"); +}); + +test("cmd.exe quoting keeps names with spaces and metacharacters as one argument", () => { + assert.equal(quoteForCmd("make:model"), "make:model"); + assert.equal(quoteForCmd("Blog Post"), '"Blog Post"'); + assert.equal(quoteForCmd('a"b&c'), '"a""b&c"'); + assert.equal(quoteForCmd(""), '""'); +}); diff --git a/src/generators/engine.ts b/src/generators/engine.ts new file mode 100644 index 0000000..33d877b --- /dev/null +++ b/src/generators/engine.ts @@ -0,0 +1,207 @@ +import fs from "node:fs"; +import path from "node:path"; +import { spawnSync } from "node:child_process"; +import type { Command, Ctx, Generator, Kind, NativeCall, Patch, Plan } from "./types"; + +export interface Io { + exists: (file: string) => boolean; + read: (file: string) => string; + write: (file: string, content: string) => void; + which: (bin: string, cwd: string) => boolean; + run: (call: NativeCall, cwd: string) => number; +} + +export const realIo: Io = { + exists: (file) => fs.existsSync(file), + read: (file) => fs.readFileSync(file, "utf8"), + write: (file, content) => { + fs.mkdirSync(path.dirname(file), { recursive: true }); + fs.writeFileSync(file, content); + }, + which: (bin, cwd) => { + if (bin.includes("/") || bin.includes("\\")) return fs.existsSync(path.resolve(cwd, bin)); + const result = spawnSync(process.platform === "win32" ? "where" : "which", [bin], { + stdio: "ignore", + }); + return result.status === 0; + }, + run: (call, cwd) => { + // .cmd shims (npx, node_modules/.bin/*) need a shell on Windows; quote every argument for cmd.exe. + const windows = process.platform === "win32"; + const result = windows + ? spawnSync([call.bin, ...call.args].map(quoteForCmd).join(" "), { + cwd, + stdio: call.quiet ? "ignore" : "inherit", + shell: true, + }) + : spawnSync(call.bin, call.args, { cwd, stdio: call.quiet ? "ignore" : "inherit" }); + return result.status ?? 1; + }, +}; + +/** Quote one argument for cmd.exe so spaces and metacharacters are passed through literally. */ +export function quoteForCmd(arg: string): string { + if (arg === "") return '""'; + if (!/[\s"&|<>^%()!,;=]/.test(arg)) return arg; + return `"${arg.replace(/"/g, '""')}"`; +} + +export class UnsupportedKindError extends Error { + constructor( + public readonly gen: Generator, + public readonly kind: Kind, + ) { + super( + `${gen.label} has no "make:${kind}" generator. Available: ${Object.keys(gen.commands).join(", ")}.`, + ); + } +} + +function command(gen: Generator, kind: Kind): Command { + const cmd = gen.commands[kind]; + if (!cmd) throw new UnsupportedKindError(gen, kind); + return cmd; +} + +/** Decide between native delegation and stub rendering, then collect everything the command would do. */ +export function plan(gen: Generator, kind: Kind, ctx: Ctx, io: Io = realIo): Plan { + const cmd = command(gen, kind); + const nativeCalls = cmd.native?.(ctx) ?? []; + const canDelegate = + nativeCalls.length > 0 && nativeCalls.every((c) => io.which(c.bin, ctx.cwd)); + const result: Plan = { native: [], files: [], patches: [], notes: cmd.notes?.(ctx) ?? [] }; + + if (canDelegate) { + result.native = nativeCalls; + return result; + } + if (!cmd.files && !cmd.patches) { + const needed = [...new Set(nativeCalls.map((c) => c.bin))].join(", "); + throw new Error( + `"make:${kind}" for ${gen.label} delegates to "${needed}", which was not found on PATH.`, + ); + } + if (nativeCalls.length > 0) { + result.notes.unshift( + `Native CLI (${nativeCalls[0]!.bin}) not found — rendered CLIuno stubs instead.`, + ); + } + result.files = cmd.files?.(ctx) ?? []; + result.patches = cmd.patches?.(ctx) ?? []; + return result; +} + +export function applyPatch( + source: string, + patch: Patch, +): { text: string; status: "applied" | "skipped" | "anchor-missing" } { + if (patch.skipIf && source.includes(patch.skipIf)) return { text: source, status: "skipped" }; + const anchor = patch.anchor; + let index = -1; + let length = 0; + if (typeof anchor === "string") { + index = patch.where === "after" ? source.lastIndexOf(anchor) : source.indexOf(anchor); + length = anchor.length; + } else { + const flags = anchor.flags.includes("g") ? anchor.flags : `${anchor.flags}g`; + const re = new RegExp(anchor.source, flags); + let match: RegExpExecArray | null; + let last: RegExpExecArray | null = null; + while ((match = re.exec(source)) !== null) { + last = match; + if (patch.where === "before") break; + if (match[0].length === 0) re.lastIndex++; + } + if (last) { + index = last.index; + length = last[0].length; + } + } + if (index === -1) return { text: source, status: "anchor-missing" }; + if (patch.replace) { + const matched = source.slice(index, index + length); + const replaced = patch.replace(matched); + if (replaced === matched) return { text: source, status: "skipped" }; + return { + text: source.slice(0, index) + replaced + source.slice(index + length), + status: "applied", + }; + } + const at = patch.where === "after" ? index + length : index; + return { text: source.slice(0, at) + patch.insert + source.slice(at), status: "applied" }; +} + +export interface ApplyResult { + written: string[]; + skipped: string[]; + patched: string[]; + notes: string[]; + nativeExit?: number; + formatted?: boolean; +} + +export async function apply( + p: Plan, + ctx: Ctx, + io: Io = realIo, + gen?: Generator, +): Promise { + const result: ApplyResult = { written: [], skipped: [], patched: [], notes: [...p.notes] }; + + if (p.native.length > 0) { + if (ctx.dryRun) { + result.notes.push(...p.native.map((c) => `would run: ${c.bin} ${c.args.join(" ")}`)); + return result; + } + for (const call of p.native) { + const code = io.run(call, ctx.cwd); + if (code !== 0) { + result.nativeExit = code; + return result; + } + } + result.nativeExit = 0; + return result; + } + + for (const file of p.files) { + const abs = path.join(ctx.cwd, file.path); + if (io.exists(abs) && !ctx.force) { + result.skipped.push(file.path); + continue; + } + if (!ctx.dryRun) io.write(abs, file.content); + result.written.push(file.path); + } + + for (const patch of p.patches) { + const abs = path.join(ctx.cwd, patch.path); + if (!io.exists(abs)) { + result.notes.push( + `${patch.path} not found — ${patch.describe} by hand: ${patch.insert.trim()}`, + ); + continue; + } + const { text, status } = applyPatch(io.read(abs), patch); + if (status === "applied") { + if (!ctx.dryRun) io.write(abs, text); + result.patched.push(patch.path); + } else if (status === "anchor-missing") { + result.notes.push( + `Could not find where to ${patch.describe} in ${patch.path} — add by hand: ${patch.insert.trim()}`, + ); + } + } + + const touched = [...result.written, ...result.patched]; + if (gen?.format && touched.length > 0 && !ctx.dryRun) { + const call = gen.format(touched); + if (io.which(call.bin, ctx.cwd)) { + const code = io.run({ ...call, args: call.args }, ctx.cwd); + if (code !== 0) + result.notes.push(`formatter ${call.bin} exited ${code} — run it by hand.`); + else result.formatted = true; + } + } + return result; +} diff --git a/src/generators/fields.test.ts b/src/generators/fields.test.ts new file mode 100644 index 0000000..7acc01b --- /dev/null +++ b/src/generators/fields.test.ts @@ -0,0 +1,56 @@ +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { labelField, mapType, parseFields } from "./fields"; + +test("defaults when omitted", () => { + const f = parseFields(undefined); + assert.deepEqual( + f.map((x) => [x.name, x.type, x.nullable]), + [ + ["title", "string", false], + ["description", "text", true], + ], + ); + assert.deepEqual(parseFields(" "), f); +}); + +test("tolerates spaces and trailing comma, maps aliases, marks nullable", () => { + const f = parseFields(" name:string , price:float?, qty : integer, "); + assert.deepEqual( + f.map((x) => [x.name, x.type, x.nullable]), + [ + ["name", "string", false], + ["price", "number", true], + ["qty", "int", false], + ], + ); +}); + +test("unknown type lists the valid ones", () => { + assert.throws( + () => parseFields("price:money"), + /string, text, int, number, boolean, date, json/, + ); +}); + +test("duplicates and malformed entries fail", () => { + assert.throws(() => parseFields("a:string,a:text"), /Duplicate/); + assert.throws(() => parseFields("justname"), /expected name:type/); + assert.throws(() => parseFields("1x:string"), /Invalid field name/); +}); + +test("case variants of a field", () => { + const [f] = parseFields("dueDate:date"); + assert.equal(f!.snake, "due_date"); + assert.equal(f!.camel, "dueDate"); + assert.equal(f!.pascal, "DueDate"); + assert.equal( + mapType(f!, { string: 1, text: 2, int: 3, number: 4, boolean: 5, date: 6, json: 7 }), + 6, + ); + assert.equal(labelField(parseFields("done:boolean,name:string")).name, "name"); +}); + +test("an entry with more than one colon is rejected", () => { + assert.throws(() => parseFields("price:number:extra"), /expected name:type/); +}); diff --git a/src/generators/fields.ts b/src/generators/fields.ts new file mode 100644 index 0000000..3cb922b --- /dev/null +++ b/src/generators/fields.ts @@ -0,0 +1,107 @@ +export const FIELD_TYPES = ["string", "text", "int", "number", "boolean", "date", "json"] as const; +export type FieldType = (typeof FIELD_TYPES)[number]; + +export interface Field { + name: string; + camel: string; + snake: string; + pascal: string; + type: FieldType; + nullable: boolean; +} + +const ALIASES: Record = { + str: "string", + varchar: "string", + longtext: "text", + integer: "int", + bigint: "int", + float: "number", + double: "number", + decimal: "number", + bool: "boolean", + datetime: "date", + timestamp: "date", + object: "json", + array: "json", +}; + +export const DEFAULT_FIELDS_SPEC = "title:string,description:text?"; + +function toParts(name: string): string[] { + return name + .replace(/([a-z0-9])([A-Z])/g, "$1 $2") + .split(/[^A-Za-z0-9]+/) + .filter(Boolean) + .map((w) => w.toLowerCase()); +} + +export function makeField(rawName: string, rawType: string, nullable: boolean): Field { + const name = rawName.trim(); + if (!/^[A-Za-z][A-Za-z0-9_]*$/.test(name)) { + throw new Error( + `Invalid field name "${rawName}": use letters, digits or "_" and start with a letter.`, + ); + } + const typeKey = rawType.trim().toLowerCase(); + const type = (FIELD_TYPES as readonly string[]).includes(typeKey) + ? (typeKey as FieldType) + : ALIASES[typeKey]; + if (!type) { + throw new Error( + `Unknown field type "${rawType}" for "${name}". Valid types: ${FIELD_TYPES.join(", ")}.`, + ); + } + const parts = toParts(name); + const pascal = parts.map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(""); + return { + name, + camel: pascal.charAt(0).toLowerCase() + pascal.slice(1), + snake: parts.join("_"), + pascal, + type, + nullable, + }; +} + +/** Parse `name:type?,other:type` — empty/undefined falls back to the default title/description pair. */ +export function parseFields(spec?: string): Field[] { + const source = spec && spec.trim() ? spec : DEFAULT_FIELDS_SPEC; + const fields: Field[] = []; + const seen = new Set(); + for (const chunk of source.split(",")) { + const item = chunk.trim(); + if (!item) continue; + const parts = item.split(":"); + const [rawName, rawType] = parts; + if (parts.length !== 2 || !rawName || !rawType) { + throw new Error( + `Invalid field "${item}": expected name:type (e.g. title:string). Valid types: ${FIELD_TYPES.join(", ")}.`, + ); + } + const nullable = rawType.trim().endsWith("?"); + const field = makeField( + rawName, + nullable ? rawType.trim().slice(0, -1) : rawType, + nullable, + ); + if (seen.has(field.snake)) throw new Error(`Duplicate field "${field.name}".`); + seen.add(field.snake); + fields.push(field); + } + if (fields.length === 0) throw new Error("At least one field is required."); + return fields; +} + +export function mapType(field: Field, map: Record): T { + return map[field.type]; +} + +/** First string-ish field — used by stubs as the display/"title" column. */ +export function labelField(fields: Field[]): Field { + return ( + fields.find((f) => f.type === "string") ?? + fields.find((f) => f.type === "text") ?? + (fields[0] as Field) + ); +} diff --git a/src/generators/names.test.ts b/src/generators/names.test.ts new file mode 100644 index 0000000..d74fae3 --- /dev/null +++ b/src/generators/names.test.ts @@ -0,0 +1,48 @@ +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { buildNames, pluralize, singularize } from "./names"; + +test("every spelling normalises to the same set", () => { + for (const raw of [ + "post", + "Posts", + "blog-post", + "BlogPost", + "blog_posts", + "Blog Posts", + "blogPosts", + ]) { + const n = buildNames(raw); + const expectPascal = raw.toLowerCase().includes("blog") ? "BlogPost" : "Post"; + assert.equal(n.pascal, expectPascal, raw); + assert.equal(n.plural.pascal, `${expectPascal}s`, raw); + } + const n = buildNames("blog-post"); + assert.deepEqual( + [n.pascal, n.camel, n.kebab, n.snake, n.title], + ["BlogPost", "blogPost", "blog-post", "blog_post", "Blog Post"], + ); + assert.deepEqual( + [n.plural.pascal, n.plural.camel, n.plural.kebab, n.plural.snake], + ["BlogPosts", "blogPosts", "blog-posts", "blog_posts"], + ); +}); + +test("plural rules", () => { + assert.equal(pluralize("category"), "categories"); + assert.equal(pluralize("box"), "boxes"); + assert.equal(pluralize("person"), "people"); + assert.equal(pluralize("status"), "statuses"); + assert.equal(pluralize("day"), "days"); + assert.equal(pluralize("leaf"), "leaves"); + assert.equal(singularize("categories"), "category"); + assert.equal(singularize("statuses"), "status"); + assert.equal(singularize("people"), "person"); + assert.equal(singularize("todos"), "todo"); + assert.equal(singularize("address"), "address"); +}); + +test("invalid names are rejected", () => { + assert.throws(() => buildNames("1abc"), /Invalid name/); + assert.throws(() => buildNames("a/b"), /Invalid name/); +}); diff --git a/src/generators/names.ts b/src/generators/names.ts new file mode 100644 index 0000000..5d742f4 --- /dev/null +++ b/src/generators/names.ts @@ -0,0 +1,110 @@ +export interface CaseSet { + pascal: string; + camel: string; + kebab: string; + snake: string; + title: string; +} + +export interface Names extends CaseSet { + raw: string; + plural: CaseSet; +} + +const IRREGULAR: Record = { + person: "people", + child: "children", + man: "men", + woman: "women", + mouse: "mice", + foot: "feet", + tooth: "teeth", + goose: "geese", +}; + +const UNCOUNTABLE = new Set([ + "news", + "series", + "species", + "sheep", + "fish", + "deer", + "equipment", + "information", + "media", + "data", +]); + +export function pluralize(word: string): string { + const lower = word.toLowerCase(); + if (UNCOUNTABLE.has(lower)) return word; + if (IRREGULAR[lower]) return matchCase(word, IRREGULAR[lower] as string); + if (/(s|x|z|ch|sh)$/i.test(word)) return `${word}es`; + if (/[^aeiou]y$/i.test(word)) return `${word.slice(0, -1)}ies`; + if (/(?:fe|[^f]f)$/i.test(word)) return word.replace(/fe?$/i, "ves"); + return `${word}s`; +} + +export function singularize(word: string): string { + const lower = word.toLowerCase(); + if (UNCOUNTABLE.has(lower)) return word; + for (const [singular, plural] of Object.entries(IRREGULAR)) { + if (lower === plural) return matchCase(word, singular); + } + if (/ies$/i.test(word) && word.length > 4) return `${word.slice(0, -3)}y`; + if (/(ss|us|is)$/i.test(word)) return word; + if (/(ches|shes|xes|zes|sses|uses)$/i.test(word)) return word.slice(0, -2); + if (/ves$/i.test(word) && word.length > 4) return `${word.slice(0, -3)}f`; + if (/s$/i.test(word) && word.length > 2) return word.slice(0, -1); + return word; +} + +function matchCase(source: string, target: string): string { + if (source[0] && source[0] === source[0].toUpperCase()) { + return target[0]!.toUpperCase() + target.slice(1); + } + return target; +} + +function words(raw: string): string[] { + return raw + .trim() + .replace(/([a-z0-9])([A-Z])/g, "$1 $2") + .replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2") + .split(/[^A-Za-z0-9]+/) + .filter(Boolean) + .map((w) => w.toLowerCase()); +} + +function caseSet(parts: string[]): CaseSet { + const cap = (w: string) => w.charAt(0).toUpperCase() + w.slice(1); + const pascal = parts.map(cap).join(""); + return { + pascal, + camel: pascal.charAt(0).toLowerCase() + pascal.slice(1), + kebab: parts.join("-"), + snake: parts.join("_"), + title: parts.map(cap).join(" "), + }; +} + +export function isValidName(raw: string): boolean { + return /^[A-Za-z][A-Za-z0-9_ -]*$/.test(raw.trim()); +} + +/** Normalise any spelling/plurality of a resource name to one consistent set of cases. */ +export function buildNames(raw: string): Names { + if (!isValidName(raw)) { + throw new Error( + `Invalid name "${raw}": use letters, digits, "-" or "_" and start with a letter.`, + ); + } + const parts = words(raw); + const last = parts[parts.length - 1] as string; + const singularParts = [...parts.slice(0, -1), singularize(last)]; + const pluralParts = [ + ...singularParts.slice(0, -1), + pluralize(singularParts[singularParts.length - 1] as string), + ]; + return { raw, ...caseSet(singularParts), plural: caseSet(pluralParts) }; +} diff --git a/src/generators/stacks/adonis.ts b/src/generators/stacks/adonis.ts new file mode 100644 index 0000000..2d0eecb --- /dev/null +++ b/src/generators/stacks/adonis.ts @@ -0,0 +1,320 @@ +import fs from "node:fs"; +import path from "node:path"; +import type { Ctx, FileSpec, Generator, NativeCall, Patch } from "../types"; +import type { Field, FieldType } from "../fields"; +import { oxfmt } from "./shared"; + +const TS: Record = { + string: "string", + text: "string", + int: "number", + number: "number", + boolean: "boolean", + date: "DateTime", + json: "Record", +}; + +const KNEX: Record = { + string: "string", + text: "text", + int: "integer", + number: "float", + boolean: "boolean", + date: "timestamp", + json: "json", +}; + +const VINE: Record = { + string: "vine.string().trim()", + text: "vine.string().trim()", + int: "vine.number().withoutDecimals()", + number: "vine.number()", + boolean: "vine.boolean()", + date: "vine.date()", + json: "vine.object({}).allowUnknownProperties()", +}; + +function modelColumn(f: Field): string { + const type = `${TS[f.type]}${f.nullable ? " | null" : ""}`; + if (f.type === "date") return ` @column.dateTime()\n declare ${f.snake}: ${type}`; + if (f.type === "json") { + return ` @column({ + prepare: (value: unknown) => JSON.stringify(value), + consume: (value: unknown) => (typeof value === 'string' ? JSON.parse(value) : value), + }) + declare ${f.snake}: ${type}`; + } + return ` @column()\n declare ${f.snake}: ${type}`; +} + +function model(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + return { + path: `app/models/${names.snake}.ts`, + content: `import { DateTime } from 'luxon' +import { BaseModel, belongsTo, column } from '@adonisjs/lucid/orm' +import type { BelongsTo } from '@adonisjs/lucid/types/relations' +import User from '#models/user' + +export default class ${names.pascal} extends BaseModel { + @column({ isPrimary: true }) + declare id: number + +${fields.map(modelColumn).join("\n\n")} + + @column() + declare user_id: number + + @column.dateTime({ autoCreate: true }) + declare createdAt: DateTime + + @column.dateTime({ autoCreate: true, autoUpdate: true }) + declare updatedAt: DateTime | null + + @belongsTo(() => User, { foreignKey: 'user_id' }) + declare user: BelongsTo +} +`, + }; +} + +function migrationColumn(f: Field): string { + let line = ` table.${KNEX[f.type]}('${f.snake}')`; + line += f.nullable ? ".nullable()" : ".notNullable()"; + if (f.type === "boolean" && !f.nullable) line += ".defaultTo(false)"; + return line; +} + +/** Reuse an existing create__table migration so a second run is a no-op. */ +function migrationPath(ctx: Ctx): string { + const suffix = `_create_${ctx.names.plural.snake}_table.ts`; + try { + const existing = fs + .readdirSync(path.join(ctx.cwd, "database", "migrations")) + .find((f) => f.endsWith(suffix)); + if (existing) return `database/migrations/${existing}`; + } catch { + // no migrations dir (dry-run outside a checkout) + } + return `database/migrations/${Date.now()}${suffix}`; +} + +function migration(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + return { + path: migrationPath(ctx), + content: `import { BaseSchema } from '@adonisjs/lucid/schema' + +export default class extends BaseSchema { + protected tableName = '${names.plural.snake}' + + async up() { + this.schema.createTable(this.tableName, (table) => { + table.increments('id').notNullable() +${fields.map(migrationColumn).join("\n")} + table + .integer('user_id') + .unsigned() + .notNullable() + .references('id') + .inTable('users') + .onDelete('CASCADE') + + table.timestamp('created_at').notNullable() + table.timestamp('updated_at').nullable() + }) + } + + async down() { + this.schema.dropTable(this.tableName) + } +} +`, + }; +} + +function controller(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const P = names.pascal; + const one = names.camel; + const many = names.plural.camel; + const title = names.title; + const keys = fields.map((f) => `'${f.snake}'`).join(", "); + const required = fields.filter( + (f) => !f.nullable && (f.type === "string" || f.type === "text"), + ); + const guards = required + .map( + (f) => ` if (!payload.${f.snake}) { + return response.badRequest({ status: 'error', message: '${f.pascal} is required' }) + }`, + ) + .join("\n"); + return { + path: `app/controllers/${names.plural.snake}_controller.ts`, + content: `import type { HttpContext } from '@adonisjs/core/http' + +import ${P} from '#models/${names.snake}' + +export default class ${names.plural.pascal}Controller { + async index({ response }: HttpContext) { + const ${many} = await ${P}.query().preload('user').orderBy('created_at', 'desc') + return response.ok({ status: 'success', data: { ${many} } }) + } + + async currentUser({ auth, response }: HttpContext) { + const ${many} = await ${P}.query() + .where('user_id', auth.getUserOrFail().id) + .preload('user') + .orderBy('created_at', 'desc') + return response.ok({ status: 'success', data: { ${many} } }) + } + + async store({ auth, request, response }: HttpContext) { + const payload = request.only([${keys}]) +${guards ? `${guards}\n` : ""} + const ${one} = await ${P}.create({ + ...payload, + user_id: auth.getUserOrFail().id, + }) + await ${one}.load('user') + return response.created({ + status: 'success', + message: '${title} created successfully', + data: { ${one} }, + }) + } + + async show({ params, response }: HttpContext) { + const ${one} = await ${P}.query().where('id', params.id).preload('user').first() + if (!${one}) { + return response.notFound({ status: 'error', message: '${title} not found' }) + } + return response.ok({ status: 'success', data: { ${one} } }) + } + + async update({ auth, params, request, response }: HttpContext) { + const ${one} = await ${P}.query().where('id', params.id).preload('user').first() + if (!${one}) { + return response.notFound({ status: 'error', message: '${title} not found' }) + } + if (${one}.user_id !== auth.getUserOrFail().id) { + return response.forbidden({ status: 'error', message: 'You can only update your own ${names.plural.title.toLowerCase()}' }) + } + ${one}.merge(request.only([${keys}])) + await ${one}.save() + return response.ok({ status: 'success', message: '${title} updated', data: { ${one} } }) + } + + async destroy({ auth, params, response }: HttpContext) { + const ${one} = await ${P}.find(params.id) + if (!${one}) { + return response.notFound({ status: 'error', message: '${title} not found' }) + } + if (${one}.user_id !== auth.getUserOrFail().id) { + return response.forbidden({ status: 'error', message: 'You can only delete your own ${names.plural.title.toLowerCase()}' }) + } + await ${one}.delete() + return response.ok({ status: 'success', message: '${title} deleted successfully' }) + } +} +`, + }; +} + +function validator(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const rules = fields + .map((f) => ` ${f.snake}: ${VINE[f.type]}${f.nullable ? ".nullable().optional()" : ""},`) + .join("\n"); + return { + path: `app/validators/${names.snake}.ts`, + content: `import vine from '@vinejs/vine' + +export const create${names.pascal}Validator = vine.compile( + vine.object({ +${rules} + }), +) + +export const update${names.pascal}Validator = vine.compile( + vine.object({ +${fields.map((f) => ` ${f.snake}: ${VINE[f.type]}.optional(),`).join("\n")} + }), +) +`, + }; +} + +function registerRoutes(ctx: Ctx): Patch[] { + const { names } = ctx; + const C = `${names.plural.pascal}Controller`; + const kp = names.plural.kebab; + return [ + { + path: "start/routes.ts", + anchor: /^const \w+Controller = \(\) => import\('#controllers\/\w+'\)$/m, + where: "after", + insert: `\nconst ${C} = () => import('#controllers/${names.plural.snake}_controller')`, + skipIf: `#controllers/${names.plural.snake}_controller`, + describe: `lazy-import ${C}`, + }, + { + path: "start/routes.ts", + anchor: " // Uploads\n", + where: "before", + insert: ` // ${names.plural.title} + router.get('/${kp}/current-user', [${C}, 'currentUser']) + router.get('/${kp}', [${C}, 'index']) + router.post('/${kp}', [${C}, 'store']) + router.get('/${kp}/:id', [${C}, 'show']) + router.patch('/${kp}/:id', [${C}, 'update']) + router.delete('/${kp}/:id', [${C}, 'destroy']) + +`, + skipIf: `router.get('/${kp}'`, + describe: `add the /${kp} routes inside the auth group`, + }, + ]; +} + +const ace = (...args: string[]): NativeCall[] => [{ bin: "node", args: ["ace", ...args] }]; + +export const adonis: Generator = { + id: "adonis", + label: "AdonisJS", + kind: "backend", + format: oxfmt, + commands: { + resource: { + describe: + "Lucid model + migration + controller + VineJS validator, routed under /api/v1/ in start/routes.ts", + files: (ctx) => [model(ctx), migration(ctx), controller(ctx), validator(ctx)], + patches: registerRoutes, + notes: (ctx) => [ + `Run \`node ace migration:run\` to create the ${ctx.names.plural.snake} table.`, + `Use create${ctx.names.pascal}Validator with request.validateUsing() in the controller if you want schema validation.`, + ], + }, + model: { + describe: "Lucid model in app/models/", + native: (ctx) => ace("make:model", ctx.names.pascal), + files: (ctx) => [model(ctx)], + }, + migration: { + describe: "migration in database/migrations/", + native: (ctx) => ace("make:migration", ctx.names.plural.snake), + files: (ctx) => [migration(ctx)], + }, + controller: { + describe: "controller in app/controllers/", + native: (ctx) => ace("make:controller", ctx.names.plural.snake), + files: (ctx) => [controller(ctx)], + }, + validator: { + describe: "VineJS validator in app/validators/", + native: (ctx) => ace("make:validator", ctx.names.snake), + files: (ctx) => [validator(ctx)], + }, + }, +}; diff --git a/src/generators/stacks/angular.ts b/src/generators/stacks/angular.ts new file mode 100644 index 0000000..f626071 --- /dev/null +++ b/src/generators/stacks/angular.ts @@ -0,0 +1,612 @@ +import type { Ctx, FileSpec, Generator, Patch } from "../types"; +import type { Field, FieldType } from "../fields"; +import { labelField } from "../fields"; +import { oxfmt } from "./shared"; + +// Stubs mirror ../CLIuno-Angular-template (src/app/services/todo-api.service.ts, +// src/app/views/app/todos.component.ts, todo-detail.component.ts): standalone components +// with inline templates (@if/@for control flow), constructor injection, FormsModule +// ngModel forms, spartan-ng helm UI (`@spartan-ng/helm/*` path aliases), @ng-icons/lucide. +// The template's style is semi: false + single quotes (oxfmt), so stubs follow it. + +const TS: Record = { + string: "string", + text: "string", + int: "number", + number: "number", + boolean: "boolean", + date: "string", + json: "Record", +}; + +const INIT: Record = { + string: "''", + text: "''", + int: "0", + number: "0", + boolean: "false", + date: "''", + json: "'{}'", // kept as JSON text in the form, parsed on submit +}; + +function tsType(f: Field): string { + return `${TS[f.type]}${f.nullable ? " | null" : ""}`; +} + +function iface(ctx: Ctx): string { + const { names, fields } = ctx; + return `export interface ${names.pascal} { + id: string +${fields.map((f) => ` ${f.camel}: ${tsType(f)}`).join("\n")} + user: User + createdAt: string + updatedAt: string +}`; +} + +function inputType(fields: Field[], partial: boolean): string { + return `{ ${fields.map((f) => `${f.camel}${partial || f.nullable ? "?" : ""}: ${TS[f.type]}${f.nullable ? " | null" : ""}`).join("; ")} }`; +} + +function service(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const P = names.pascal; + const PP = names.plural.pascal; + const path = names.plural.kebab; + return { + path: `src/app/services/${names.kebab}-api.service.ts`, + content: `import { Injectable } from '@angular/core' +import { HttpService } from './http.service' +import { ApiResponse } from './auth-api.service' +import { User } from '../types/models' + +${iface(ctx)} + +@Injectable({ providedIn: 'root' }) +export class ${P}ApiService { + constructor(private readonly http: HttpService) {} + + getAll${PP}() { + return this.http.get>('/${path}') + } + get${P}ById(id: string) { + return this.http.get>(\`/${path}/\${id}\`) + } + create${P}(data: ${inputType(fields, false)}) { + return this.http.post('/${path}', data) + } + update${P}(id: string, data: ${inputType(fields, true)}) { + return this.http.patch(\`/${path}/\${id}\`, data) + } + delete${P}(id: string) { + return this.http.delete(\`/${path}/\${id}\`) + } +} +`, + }; +} + +/** Component properties backing the create form (`newName = ''`). */ +function formProps(fields: Field[]): string { + return fields + .map( + (f) => + ` new${f.pascal}${f.type === "json" ? "" : `: ${TS[f.type]}`} = ${INIT[f.type]}`, + ) + .join("\n"); +} + +function formReset(fields: Field[]): string { + return fields.map((f) => ` this.new${f.pascal} = ${INIT[f.type]}`).join("\n"); +} + +function payload(fields: Field[]): string { + return fields + .map((f) => { + if (f.type === "json") return `${f.camel}: parseJson(this.new${f.pascal})`; + const stringish = f.type === "string" || f.type === "text" || f.type === "date"; + return f.nullable && stringish + ? `${f.camel}: this.new${f.pascal} || null` + : `${f.camel}: this.new${f.pascal}`; + }) + .join(", "); +} + +function formInput(f: Field, kebab: string): string { + const id = `new-${kebab}-${f.snake.replace(/_/g, "-")}`; + const optional = f.nullable ? " (optional)" : ""; + if (f.type === "boolean") { + return `

+ + +
`; + } + if (f.type === "text" || f.type === "json") { + return `
+ + +
`; + } + const numeric = f.type === "int" || f.type === "number"; + const type = numeric ? "number" : f.type === "date" ? "datetime-local" : "text"; + return `
+ + +
`; +} + +/** Angular interpolation for one field; `??` only on nullable fields (strictTemplates warns otherwise). */ +function display(f: Field, varName: string): string { + const v = `${varName}.${f.camel}`; + if (f.type === "boolean") return `{{ ${v} ? 'Yes' : 'No' }}`; + if (f.type === "json") return `{{ ${v} | json }}`; + if (f.type === "date") + return f.nullable ? `{{ ${v} ? timeAgo(${v}) : '—' }}` : `{{ timeAgo(${v}) }}`; + return f.nullable ? `{{ ${v} ?? '—' }}` : `{{ ${v} }}`; +} + +const PARSE_JSON = `function parseJson(text: string): Record { + try { + return JSON.parse(text) + } catch { + return {} + } +} +`; + +function listComponent(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const P = names.pascal; + const PP = names.plural.pascal; + const kp = names.plural.kebab; + const label = labelField(fields); + const others = fields.filter((f) => f !== label); + const usesJson = fields.some((f) => f.type === "json"); + const usesCheckbox = fields.some((f) => f.type === "boolean"); + const usesTextarea = fields.some((f) => f.type === "text" || f.type === "json"); + const usesInput = fields.some((f) => !["boolean", "text", "json"].includes(f.type)); + const imports = [ + usesJson ? "JsonPipe" : "", + "FormsModule", + "RouterLink", + "NgIcon", + "HlmButton", + "HlmCard", + "HlmCardContent", + usesCheckbox ? "HlmCheckbox" : "", + usesInput ? "HlmInput" : "", + "HlmLabel", + usesTextarea ? "HlmTextarea" : "", + "HlmSpinner", + "HlmDialog", + "HlmDialogContent", + "HlmDialogHeader", + "HlmDialogTitle", + "HlmDialogFooter", + "BrnDialogTrigger", + "BrnDialogContent", + "BrnDialogClose", + ].filter(Boolean); + return { + path: `src/app/views/app/${kp}.component.ts`, + content: `${usesJson ? "import { JsonPipe } from '@angular/common'\n" : ""}import { Component, OnInit } from '@angular/core' +import { FormsModule } from '@angular/forms' +import { RouterLink } from '@angular/router' +import { NgIcon, provideIcons } from '@ng-icons/core' +import { lucidePlus, lucidePackage, lucideUser, lucideTrash2 } from '@ng-icons/lucide' +import { ${P}, ${P}ApiService } from '../../services/${names.kebab}-api.service' +import { AuthStore } from '../../services/auth.store' +import { timeAgo } from '../../utils/helpers' +import { HlmButton } from '@spartan-ng/helm/button' +import { HlmCard, HlmCardContent } from '@spartan-ng/helm/card' +${usesCheckbox ? "import { HlmCheckbox } from '@spartan-ng/helm/checkbox'\n" : ""}${usesInput ? "import { HlmInput } from '@spartan-ng/helm/input'\n" : ""}import { HlmLabel } from '@spartan-ng/helm/label' +${usesTextarea ? "import { HlmTextarea } from '@spartan-ng/helm/textarea'\n" : ""}import { HlmSpinner } from '@spartan-ng/helm/spinner' +import { + HlmDialog, + HlmDialogContent, + HlmDialogHeader, + HlmDialogTitle, + HlmDialogFooter, +} from '@spartan-ng/helm/dialog' +import { BrnDialogTrigger, BrnDialogContent, BrnDialogClose } from '@spartan-ng/brain/dialog' + +${usesJson ? `${PARSE_JSON}\n` : ""}@Component({ + selector: 'app-${kp}', + standalone: true, + imports: [ +${imports.map((i) => ` ${i},`).join("\n")} + ], + viewProviders: [provideIcons({ lucidePlus, lucidePackage, lucideUser, lucideTrash2 })], + template: \` +
+ +
+
+

${names.plural.title}

+

Manage your ${names.plural.title.toLowerCase()}

+
+ + + + + +

Create New ${names.title}

+
+
+${fields.map((f) => formInput(f, names.kebab)).join("\n")} + + + + +
+
+
+
+ + + @if (loading) { +
+ +
+ } + + + @if (!loading && ${names.plural.camel}.length === 0) { +
+ +

No ${names.plural.title.toLowerCase()} yet

+

Create your first ${names.title.toLowerCase()} to get started!

+
+ } + + + @if (!loading && ${names.plural.camel}.length > 0) { +
+ @for (item of ${names.plural.camel}; track item.id) { +
+
+
+ +

+ ${display(label, "item")} +

+
+${others + .map( + (f) => `

+ ${f.pascal}: ${display(f, "item")} +

`, + ) + .join("\n")} +
+ + + {{ item.user.username }} + + {{ timeAgo(item.createdAt) }} +
+
+ + @if (item.user.id === authStore.user()?.id) { + + } +
+
+ } +
+ } +
+ \`, +}) +export class ${PP}Component implements OnInit { + ${names.plural.camel}: ${P}[] = [] + loading = true + creating = false +${formProps(fields)} + timeAgo = timeAgo + + constructor( + private readonly ${names.camel}Api: ${P}ApiService, + public authStore: AuthStore, + ) {} + + ngOnInit() { + this.fetch${PP}() + } + + fetch${PP}() { + this.loading = true + this.${names.camel}Api.getAll${PP}().subscribe({ + next: (res) => { + this.${names.plural.camel} = res.data.${names.plural.camel} + this.loading = false + }, + error: () => { + this.loading = false + }, + }) + } + + create${P}(dialog: { close: () => void }) { + this.creating = true + this.${names.camel}Api.create${P}({ ${payload(fields)} }).subscribe({ + next: () => { +${formReset(fields)} + this.creating = false + dialog.close() + this.fetch${PP}() + }, + error: () => { + this.creating = false + }, + }) + } + + delete${P}(id: string) { + this.${names.camel}Api.delete${P}(id).subscribe({ + next: () => { + this.${names.plural.camel} = this.${names.plural.camel}.filter((item) => item.id !== id) + }, + }) + } +} +`, + }; +} + +function detailComponent(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const P = names.pascal; + const kp = names.plural.kebab; + const label = labelField(fields); + const others = fields.filter((f) => f !== label); + const usesJson = fields.some((f) => f.type === "json"); + const v = names.camel; + return { + path: `src/app/views/app/${names.kebab}-detail.component.ts`, + content: `${usesJson ? "import { JsonPipe } from '@angular/common'\n" : ""}import { Component, OnInit } from '@angular/core' +import { ActivatedRoute, Router, RouterLink } from '@angular/router' +import { NgIcon, provideIcons } from '@ng-icons/core' +import { lucideArrowLeft, lucideTrash2, lucideUser } from '@ng-icons/lucide' +import { ${P}, ${P}ApiService } from '../../services/${names.kebab}-api.service' +import { AuthStore } from '../../services/auth.store' +import { timeAgo } from '../../utils/helpers' +import { HlmButton } from '@spartan-ng/helm/button' +import { HlmCard, HlmCardContent } from '@spartan-ng/helm/card' +import { HlmSpinner } from '@spartan-ng/helm/spinner' +import { HlmSeparator } from '@spartan-ng/helm/separator' + +@Component({ + selector: 'app-${names.kebab}-detail', + standalone: true, + imports: [${usesJson ? "JsonPipe, " : ""}RouterLink, NgIcon, HlmButton, HlmCard, HlmCardContent, HlmSpinner, HlmSeparator], + viewProviders: [provideIcons({ lucideArrowLeft, lucideTrash2, lucideUser })], + template: \` +
+ + + + Back to ${names.plural.title} + + + @if (loading) { +
+ +
+ } + + @if (!loading && ${v}) { +
+
+
+

${display(label, v)}

+ @if (${v}.user.id === authStore.user()?.id) { + + } +
+${others + .map( + (f) => `

+ ${f.pascal}: ${display(f, v)} +

`, + ) + .join("\n")} + + + + + +
+
+ } +
+ \`, +}) +export class ${P}DetailComponent implements OnInit { + ${v}: ${P} | null = null + loading = true + timeAgo = timeAgo + + constructor( + private readonly route: ActivatedRoute, + private readonly router: Router, + private readonly ${v}Api: ${P}ApiService, + public authStore: AuthStore, + ) {} + + ngOnInit() { + const id = this.route.snapshot.paramMap.get('id') ?? '' + this.${v}Api.get${P}ById(id).subscribe({ + next: (res) => { + this.${v} = res.data.${v} + this.loading = false + }, + error: () => { + this.loading = false + }, + }) + } + + remove() { + const ${v} = this.${v} + if (!${v}) return + this.${v}Api.delete${P}(${v}.id).subscribe({ + next: () => { + this.router.navigate(['/${kp}']) + }, + }) + } +} +`, + }; +} + +function store(ctx: Ctx): FileSpec { + const { names } = ctx; + const P = names.pascal; + return { + path: `src/app/services/${names.kebab}.store.ts`, + content: `import { Injectable, signal } from '@angular/core' +import { ${P}, ${P}ApiService } from './${names.kebab}-api.service' + +@Injectable({ providedIn: 'root' }) +export class ${P}Store { + items = signal<${P}[]>([]) + loading = signal(false) + + constructor(private readonly ${names.camel}Api: ${P}ApiService) {} + + fetchAll() { + this.loading.set(true) + this.${names.camel}Api.getAll${names.plural.pascal}().subscribe({ + next: (res) => { + this.items.set(res.data.${names.plural.camel}) + this.loading.set(false) + }, + error: () => { + this.loading.set(false) + }, + }) + } + + remove(id: string) { + this.${names.camel}Api.delete${P}(id).subscribe({ + next: () => { + this.items.update((items) => items.filter((item) => item.id !== id)) + }, + }) + } +} +`, + }; +} + +function routePatches(ctx: Ctx): Patch[] { + const { names } = ctx; + const P = names.pascal; + const PP = names.plural.pascal; + const kp = names.plural.kebab; + return [ + { + path: "src/app/app.routes.ts", + // right after the `todos/:id` route object inside the authGuard children + anchor: /m\.TodoDetailComponent\),\n\s*\},/, + where: "after", + insert: `\n {\n path: '${kp}',\n loadComponent: () => import('./views/app/${kp}.component').then((m) => m.${PP}Component),\n },\n {\n path: '${kp}/:id',\n loadComponent: () =>\n import('./views/app/${names.kebab}-detail.component').then((m) => m.${P}DetailComponent),\n },`, + skipIf: `path: '${kp}'`, + describe: `add /${kp} routes next to the todo routes (same authGuard group)`, + }, + ]; +} + +export const angular: Generator = { + id: "angular", + format: oxfmt, + label: "Angular", + kind: "frontend", + commands: { + resource: { + describe: + "api service + list component + detail component, routed in src/app/app.routes.ts", + files: (ctx) => [service(ctx), listComponent(ctx), detailComponent(ctx)], + patches: routePatches, + notes: (ctx) => [ + `Add a nav link to /${ctx.names.plural.kebab} in src/app/layouts/default-layout.component.ts if you want it in the menu.`, + `Move the ${ctx.names.pascal} interface into src/app/types/models.ts if you prefer the shared models file.`, + ], + }, + api: { + describe: "HttpService-based API service in src/app/services/ (providedIn: root)", + files: (ctx) => [service(ctx)], + }, + service: { + describe: "alias of make:api — API service in src/app/services/", + files: (ctx) => [service(ctx)], + }, + page: { + describe: "list + detail standalone components in src/app/views/app/ (+ routes)", + files: (ctx) => [listComponent(ctx), detailComponent(ctx)], + patches: routePatches, + }, + store: { + describe: "signals store service in src/app/services/ (same shape as auth.store.ts)", + files: (ctx) => [store(ctx)], + }, + component: { + describe: "spartan-ng helm UI component via ng g @spartan-ng/cli:ui", + native: (ctx) => [ + { bin: "node_modules/.bin/ng", args: ["g", "@spartan-ng/cli:ui", ctx.names.kebab] }, + ], + }, + }, +}; diff --git a/src/generators/stacks/aspnet.ts b/src/generators/stacks/aspnet.ts new file mode 100644 index 0000000..cb225e5 --- /dev/null +++ b/src/generators/stacks/aspnet.ts @@ -0,0 +1,354 @@ +import fs from "node:fs"; +import path from "node:path"; +import type { Ctx, FileSpec, Generator, Patch } from "../types"; +import type { Field, FieldType } from "../fields"; + +// Stubs mirror CLIuno-ASP.NET-template: POCO models next to AppDb in Data/, controllers with +// primary constructors (AppDb db, AuthSupport auth) that call auth.Require(Request, db) and +// build the {status, message, data} envelope with Api.Ok/Created + Api.Data("", …). +// MapControllers picks the controller up; the model only needs a DbSet on AppDb (patched). + +const DEFAULT_PROJECT = "BackendASP.NET/"; +const DEFAULT_NAMESPACE = "BackendASPNET"; + +const CS: Record = { + string: "string", + text: "string", + int: "int", + number: "double", + boolean: "bool", + date: "DateTime", + json: "string", +}; + +/** Locals every handler already declares — a field with one of these names gets a suffix. */ +const RESERVED = new Set(["body", "user", "id", "db", "auth"]); + +interface Project { + /** Path prefix of the folder that holds the .csproj, relative to the stack root ("" when it is the root). */ + prefix: string; + namespace: string; +} + +function readNamespace(dir: string): string { + try { + const src = fs.readFileSync(path.join(dir, "Data", "Models.cs"), "utf8"); + const match = /^namespace\s+([\w.]+)\.Data;/m.exec(src); + if (match) return match[1] as string; + } catch { + /* no Models.cs — fall back to the template namespace */ + } + return DEFAULT_NAMESPACE; +} + +/** The web project may be the stack root (run from inside it) or a sub-folder (run from the repo root). */ +function project(cwd: string): Project { + try { + const entries = fs.readdirSync(cwd, { withFileTypes: true }); + if (entries.some((e) => e.isFile() && e.name.endsWith(".csproj"))) { + return { prefix: "", namespace: readNamespace(cwd) }; + } + for (const e of entries) { + if (!e.isDirectory() || e.name.startsWith(".")) continue; + const sub = path.join(cwd, e.name); + if (fs.readdirSync(sub).some((n) => n.endsWith(".csproj"))) { + return { prefix: `${e.name}/`, namespace: readNamespace(sub) }; + } + } + } catch { + /* not an ASP.NET tree (dry-run from elsewhere) — use the template layout */ + } + return { prefix: DEFAULT_PROJECT, namespace: DEFAULT_NAMESPACE }; +} + +function csType(f: Field): string { + return `${CS[f.type]}${f.nullable ? "?" : ""}`; +} + +function local(f: Field, names: Ctx["names"]): string { + return RESERVED.has(f.camel) || f.camel === names.camel ? `${f.camel}Value` : f.camel; +} + +/** `Field(body, "title")`, or the camelCase key with a snake_case fallback for multi-word names. */ +function read(f: Field): string { + return f.camel === f.snake + ? `Field(body, "${f.camel}")` + : `Field(body, "${f.camel}", "${f.snake}")`; +} + +const READER: Record = { + string: "Str", + text: "Str", + int: "Int", + number: "Num", + boolean: "Bool", + date: "Date", + json: "Json", +}; + +function modelProperty(f: Field): string { + let init = ""; + if (!f.nullable && (f.type === "string" || f.type === "text")) init = ' = "";'; + if (!f.nullable && f.type === "json") init = ' = "{}";'; + return ` public ${csType(f)} ${f.pascal} { get; set; }${init}`; +} + +function model(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const { prefix, namespace } = project(ctx.cwd); + return { + path: `${prefix}Data/${names.pascal}.cs`, + content: `namespace ${namespace}.Data; + +public class ${names.pascal} +{ + public long Id { get; set; } +${fields.map(modelProperty).join("\n")} + public DateTime CreatedAt { get; set; } = DateTime.UtcNow; + public DateTime UpdatedAt { get; set; } = DateTime.UtcNow; + + public long UserId { get; set; } + public User? User { get; set; } +} +`, + }; +} + +function storeRead(f: Field, name: string): string[] { + const lines = [` var ${name} = ${READER[f.type]}(${read(f)});`]; + if (f.nullable || f.type === "boolean") return lines; + const check = + f.type === "string" || f.type === "text" + ? `string.IsNullOrWhiteSpace(${name})` + : `${name} is null`; + lines.push( + ` if (${check})`, + ` {`, + ` throw new ApiException(400, "${f.pascal} is required");`, + ` }`, + ); + return lines; +} + +function storeAssign(f: Field, name: string): string { + if (f.type === "boolean") + return ` ${f.pascal} = ${name}${f.nullable ? "" : " ?? false"},`; + if (f.nullable || f.type === "string" || f.type === "text" || f.type === "json") + return ` ${f.pascal} = ${name},`; + return ` ${f.pascal} = ${name}.Value,`; +} + +function updateAssign(f: Field, one: string, names: Ctx["names"]): string { + const v = local(f, names); + const clear = f.nullable + ? ` + else if (${read(f)}.ValueKind == JsonValueKind.Null) + { + ${one}.${f.pascal} = null; + }` + : ""; + return ` if (${READER[f.type]}(${read(f)}) is { } ${v}) + { + ${one}.${f.pascal} = ${v}; + }${clear}`; +} + +const HELPERS: Record = { + string: ` private static string? Str(JsonElement value) => + value.ValueKind == JsonValueKind.String ? value.GetString() : null;`, + text: "", + int: ` private static int? Int(JsonElement value) => + value.ValueKind == JsonValueKind.Number && value.TryGetInt32(out var number) ? number : null;`, + number: ` private static double? Num(JsonElement value) => + value.ValueKind == JsonValueKind.Number && value.TryGetDouble(out var number) ? number : null;`, + boolean: ` private static bool? Bool(JsonElement value) => + value.ValueKind is JsonValueKind.True or JsonValueKind.False ? value.GetBoolean() : null;`, + date: ` private static DateTime? Date(JsonElement value) => + value.ValueKind == JsonValueKind.String + && DateTime.TryParse(value.GetString(), CultureInfo.InvariantCulture, + DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out var date) + ? date + : null;`, + json: ` private static string? Json(JsonElement value) => + value.ValueKind is JsonValueKind.Undefined or JsonValueKind.Null ? null : value.GetRawText();`, +}; + +function controller(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const { prefix, namespace } = project(ctx.cwd); + const P = names.pascal; + const Pp = names.plural.pascal; + const one = names.camel; + const many = names.plural.camel; + const title = names.title; + const titles = names.plural.title; + const own = names.plural.kebab.replace(/-/g, " "); + const x = one.charAt(0); + + const usings = ["System.Text.Json"]; + if (fields.some((f) => f.type === "date")) usings.unshift("System.Globalization"); + + const reads: string[] = []; + const assigns: string[] = []; + for (const f of fields) { + const name = local(f, names); + reads.push(...storeRead(f, name)); + assigns.push(storeAssign(f, name)); + } + + const used = new Set(fields.map((f) => (f.type === "text" ? "string" : f.type))); + const helpers = (Object.keys(HELPERS) as FieldType[]) + .filter((t) => used.has(t) && HELPERS[t]) + .map((t) => HELPERS[t]); + + return { + path: `${prefix}Controllers/${Pp}Controller.cs`, + content: `${usings.map((u) => `using ${u};`).join("\n")} +using ${namespace}.Data; +using ${namespace}.Support; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace ${namespace}.Controllers; + +[ApiController] +[Route("api/v1/${names.plural.kebab}")] +public class ${Pp}Controller(AppDb db, AuthSupport auth) : ControllerBase +{ + private async Task<${P}> Find(long id) => + await db.${Pp}.Include(${x} => ${x}.User).FirstOrDefaultAsync(${x} => ${x}.Id == id) + ?? throw new ApiException(404, "${title} not found"); + + [HttpGet] + public async Task Index() + { + await auth.Require(Request, db); + var ${many} = await db.${Pp}.Include(${x} => ${x}.User) + .OrderByDescending(${x} => ${x}.CreatedAt).ToListAsync(); + return Api.Ok("${titles}", Api.Data("${many}", ${many})); + } + + [HttpGet("current-user")] + public async Task CurrentUser() + { + var user = await auth.Require(Request, db); + var ${many} = await db.${Pp}.Include(${x} => ${x}.User) + .Where(${x} => ${x}.UserId == user.Id) + .OrderByDescending(${x} => ${x}.CreatedAt).ToListAsync(); + return Api.Ok("${titles}", Api.Data("${many}", ${many})); + } + + [HttpPost] + public async Task Store([FromBody] Dictionary body) + { + var user = await auth.Require(Request, db); +${reads.join("\n")} + + var ${one} = new ${P} + { +${assigns.join("\n")} + User = user, + }; + db.${Pp}.Add(${one}); + await db.SaveChangesAsync(); + return Api.Created("${title} created successfully", Api.Data("${one}", ${one})); + } + + [HttpGet("{id:long}")] + public async Task Show(long id) + { + await auth.Require(Request, db); + return Api.Ok("${title}", Api.Data("${one}", await Find(id))); + } + + [HttpPatch("{id:long}")] + public async Task Update(long id, [FromBody] Dictionary body) + { + var user = await auth.Require(Request, db); + var ${one} = await Find(id); + if (${one}.UserId != user.Id) + { + throw new ApiException(403, "You can only update your own ${own}"); + } +${fields.map((f) => updateAssign(f, one, names)).join("\n")} + ${one}.UpdatedAt = DateTime.UtcNow; + await db.SaveChangesAsync(); + return Api.Ok("${title} updated", Api.Data("${one}", ${one})); + } + + [HttpDelete("{id:long}")] + public async Task Destroy(long id) + { + var user = await auth.Require(Request, db); + var ${one} = await Find(id); + if (${one}.UserId != user.Id) + { + throw new ApiException(403, "You can only delete your own ${own}"); + } + db.${Pp}.Remove(${one}); + await db.SaveChangesAsync(); + return Api.Ok("${title} deleted successfully"); + } + + // Request keys arrive camelCase (or snake_case); a missing key reads as JsonValueKind.Undefined. + private static JsonElement Field(Dictionary body, params string[] keys) + { + foreach (var key in keys) + { + if (body.TryGetValue(key, out var value)) + { + return value; + } + } + return default; + } + +${helpers.join("\n\n")} +} +`, + }; +} + +function registerDbSet(ctx: Ctx): Patch[] { + const { names } = ctx; + const { prefix } = project(ctx.cwd); + return [ + { + path: `${prefix}Data/Models.cs`, + anchor: /^ public DbSet<\w+> \w+ => Set<\w+>\(\);$/m, + where: "after", + insert: `\n public DbSet<${names.pascal}> ${names.plural.pascal} => Set<${names.pascal}>();`, + skipIf: `DbSet<${names.pascal}>`, + describe: `add the ${names.plural.pascal} DbSet to AppDb`, + }, + ]; +} + +export const aspnet: Generator = { + id: "aspnet", + label: "ASP.NET", + kind: "backend", + commands: { + resource: { + describe: + "EF Core model + controller under /api/v1/ + DbSet on AppDb (MapControllers registers it)", + files: (ctx) => [model(ctx), controller(ctx)], + patches: registerDbSet, + notes: (ctx) => [ + `EnsureCreated does not migrate an existing database — delete ${project(ctx.cwd).prefix}db.sqlite so the ${ctx.names.plural.pascal} table is created on the next run.`, + `MapControllers picks up ${ctx.names.plural.pascal}Controller — routes live at /api/v1/${ctx.names.plural.kebab} (+ /current-user).`, + "Responses serialise properties as snake_case; requests accept camelCase or snake_case keys.", + ], + }, + model: { + describe: "EF Core model in Data/ + DbSet on AppDb", + files: (ctx) => [model(ctx)], + patches: registerDbSet, + }, + controller: { + describe: + "[ApiController] using auth.Require + the Api envelope (needs the model + DbSet)", + files: (ctx) => [controller(ctx)], + }, + }, +}; diff --git a/src/generators/stacks/axum.test.ts b/src/generators/stacks/axum.test.ts new file mode 100644 index 0000000..ebb90b3 --- /dev/null +++ b/src/generators/stacks/axum.test.ts @@ -0,0 +1,44 @@ +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { applyPatch } from "../engine"; +import { axum, mergeModDecl } from "./axum"; +import { buildNames } from "../names"; +import { parseFields } from "../fields"; +import type { Ctx } from "../types"; + +const ctx = (name: string): Ctx => ({ + cwd: "/x", + names: buildNames(name), + fields: parseFields("type:string,meta:json"), + force: false, + dryRun: true, +}); + +test("module declarations stay sorted and unique (rustfmt reorder_modules)", () => { + assert.equal( + mergeModDecl("pub mod auth;\npub mod users;", "products"), + "pub mod auth;\npub mod products;\npub mod users;", + ); + assert.equal(mergeModDecl("pub mod a;\npub mod b;", "a"), "pub mod a;\npub mod b;"); +}); + +test("registering twice changes nothing the second time", () => { + let mod = + "pub mod auth;\npub mod todos;\n\npub fn api() -> Router {\n Router::new()\n .merge(auth::routes())\n .merge(todos::routes())\n}\n"; + const patches = axum.commands.resource!.patches!(ctx("product")).filter( + (p) => p.path === "src/routes/mod.rs", + ); + for (let i = 0; i < 2; i++) for (const p of patches) mod = applyPatch(mod, p).text; + assert.equal(mod.split("pub mod products;").length - 1, 1); + assert.equal(mod.split(".merge(products::routes())").length - 1, 1); +}); + +test("keyword field names become raw identifiers and JSON columns use the text serializer", () => { + const [model] = axum.commands.model!.files!(ctx("product")); + assert.match(model!.content, /pub r#type: String,/); + assert.match( + model!.content, + /#\[serde\(serialize_with = "as_json"\)\]\n {4}pub meta: Option,/, + ); + assert.match(model!.content, /fn as_json.rs` (sqlx `FromRow` row + Create/Update bodies + runtime queries), + * `src/routes/.rs` (`routes()` merged into `routes::api()`), an embedded sqlx + * migration, and an integration test on the in-memory `TestApp` harness. + * Responses are snake_case; multi-word request keys also accept camelCase. + */ +import fs from "node:fs"; +import path from "node:path"; +import type { Ctx, FileSpec, Generator, NativeCall, Patch } from "../types"; +import type { Field, FieldType } from "../fields"; +import { labelField } from "../fields"; + +const RUST: Record = { + string: "String", + text: "String", + int: "i64", + number: "f64", + boolean: "bool", + // Stored as ISO-8601 text exactly as sent: browsers' datetime-local values carry no + // timezone, which a strict DateTime would reject. + date: "String", + // Stored as JSON text, emitted as JSON again by `as_json`. + json: "String", +}; + +const SQL: Record = { + string: "TEXT", + text: "TEXT", + int: "INTEGER", + number: "REAL", + boolean: "INTEGER", + date: "TEXT", + json: "TEXT", +}; + +const isStringish = (f: Field) => f.type === "string" || f.type === "text"; + +const KEYWORDS = new Set( + "as async await break const continue crate dyn else enum extern false fn for if impl in let loop match mod move mut pub ref return self static struct super trait true type unsafe use where while abstract become box do final macro override priv try typeof unsized virtual yield".split( + " ", + ), +); +/** Rust identifier for a field (raw identifier when the name is a keyword; serde keeps the plain key). */ +const rs = (f: Field) => (KEYWORDS.has(f.snake) ? `r#${f.snake}` : f.snake); +const hasJson = (fields: Field[]) => fields.some((f) => f.type === "json"); + +/** Row field type (what sqlx decodes). */ +function rowType(f: Field): string { + if (f.type === "json") return "Option"; // as_json reads it as optional text + if (f.type === "boolean" && !f.nullable) return "bool"; + return f.nullable ? `Option<${RUST[f.type]}>` : RUST[f.type]; +} + +/** Request type: strings are `String` (empty = missing), everything else is optional so a + * missing required value can be reported as 400 instead of silently defaulting to 0. */ +function createType(f: Field): string { + if (f.type === "json") return "Option"; + if (isStringish(f) && !f.nullable) return "String"; + return `Option<${RUST[f.type]}>`; +} + +function updateType(f: Field): string { + return f.type === "json" ? "Option" : `Option<${RUST[f.type]}>`; +} + +function alias(f: Field): string { + return f.camel !== f.snake ? ` #[serde(alias = "${f.camel}")]\n` : ""; +} + +/** Expression bound for a field in INSERT. */ +function insertBind(f: Field): string { + if (f.type === "json") return `input.${rs(f)}.as_ref().map(Value::to_string)`; + if (f.type === "boolean" && !f.nullable) return `input.${rs(f)}.unwrap_or(false)`; + if (isStringish(f) && !f.nullable) return `&input.${rs(f)}`; + if (f.type === "string" || f.type === "text" || f.type === "date") return `&input.${rs(f)}`; + return `input.${rs(f)}`; +} + +function updateBind(f: Field): string { + if (f.type === "json") return `input.${rs(f)}.as_ref().map(Value::to_string)`; + if (f.type === "string" || f.type === "text" || f.type === "date") return `&input.${rs(f)}`; + return `input.${rs(f)}`; +} + +function model(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const P = names.pascal; + const table = names.plural.snake; + const json = hasJson(fields); + const rowFields = fields + .map((f) => { + const ser = f.type === "json" ? ` #[serde(serialize_with = "as_json")]\n` : ""; + return `${ser} pub ${rs(f)}: ${rowType(f)},`; + }) + .join("\n"); + const createFields = fields + .map((f) => `${alias(f)} pub ${rs(f)}: ${createType(f)},`) + .join("\n"); + const updateFields = fields + .map((f) => `${alias(f)} pub ${rs(f)}: ${updateType(f)},`) + .join("\n"); + const cols = fields.map((f) => f.snake).join(", "); + const marks = fields.map(() => "?").join(", "); + const sets = fields + .map((f) => ` ${f.snake} = COALESCE(?, ${f.snake}), \\`) + .join("\n"); + const imports = [ + "use chrono::{DateTime, Utc};", + "use serde::{Deserialize, Serialize};", + ...(json ? ["use serde_json::Value;"] : []), + "use sqlx::{FromRow, SqlitePool};", + ].join("\n"); + const jsonHelper = json + ? ` + +/// JSON columns are stored as text; emit them as JSON (null when unset or unreadable). +fn as_json(raw: &Option, serializer: S) -> Result { + raw.as_deref() + .map(|text| serde_json::from_str::(text).unwrap_or(Value::Null)) + .serialize(serializer) +}` + : ""; + return { + path: `src/models/${names.snake}.rs`, + content: `//! The \`${table}\` table (see \`migrations/*_create_${table}.sql\`): the row type, the +//! request bodies, and every query the ${names.plural.title.toLowerCase()} routes need. + +${imports} + +use super::Owned; + +/// A row of \`${table}\`, serialized with snake_case keys. +#[derive(Debug, Clone, FromRow, Serialize)] +pub struct ${P} { + pub id: i64, + pub user_id: i64, +${rowFields} + pub created_at: DateTime, + pub updated_at: DateTime, +} + +/// \`POST /${names.plural.kebab}\` body. Keys are snake_case; multi-word keys also accept camelCase. +#[derive(Debug, Default, Deserialize)] +#[serde(default)] +pub struct Create${P} { +${createFields} +} + +/// \`PATCH /${names.plural.kebab}/:id\` body — absent keys stay unchanged. +#[derive(Debug, Default, Deserialize)] +#[serde(default)] +pub struct Update${P} { +${updateFields} +} + +impl Owned for ${P} { + fn owner_id(&self) -> i64 { + self.user_id + } +} + +impl ${P} { + pub async fn all(db: &SqlitePool) -> sqlx::Result> { + sqlx::query_as("SELECT * FROM ${table} ORDER BY id DESC") + .fetch_all(db) + .await + } + + pub async fn for_user(db: &SqlitePool, user_id: i64) -> sqlx::Result> { + sqlx::query_as("SELECT * FROM ${table} WHERE user_id = ? ORDER BY id DESC") + .bind(user_id) + .fetch_all(db) + .await + } + + pub async fn find(db: &SqlitePool, id: i64) -> sqlx::Result> { + sqlx::query_as("SELECT * FROM ${table} WHERE id = ?") + .bind(id) + .fetch_optional(db) + .await + } + + pub async fn create(db: &SqlitePool, user_id: i64, input: &Create${P}) -> sqlx::Result<${P}> { + sqlx::query_as("INSERT INTO ${table} (user_id, ${cols}) VALUES (?, ${marks}) RETURNING *") + .bind(user_id) +${fields.map((f) => ` .bind(${insertBind(f)})`).join("\n")} + .fetch_one(db) + .await + } + + pub async fn update(db: &SqlitePool, id: i64, input: &Update${P}) -> sqlx::Result<${P}> { + sqlx::query_as( + "UPDATE ${table} SET \\ +${sets} + updated_at = CURRENT_TIMESTAMP \\ + WHERE id = ? RETURNING *", + ) +${fields.map((f) => ` .bind(${updateBind(f)})`).join("\n")} + .bind(id) + .fetch_one(db) + .await + } + + pub async fn delete(db: &SqlitePool, id: i64) -> sqlx::Result<()> { + sqlx::query("DELETE FROM ${table} WHERE id = ?") + .bind(id) + .execute(db) + .await?; + Ok(()) + } +}${jsonHelper} +`, + }; +} + +function requiredChecks(fields: Field[]): string { + return fields + .filter((f) => !f.nullable && f.type !== "boolean") + .map((f) => { + const cond = isStringish(f) + ? `input.${rs(f)}.trim().is_empty()` + : `input.${rs(f)}.is_none()`; + return ` if ${cond} { + return Err(ApiError::bad_request("${f.pascal} is required")); + }`; + }) + .join("\n"); +} + +function updateChecks(fields: Field[]): string { + return fields + .filter((f) => !f.nullable && isStringish(f)) + .map( + (f) => ` if input + .${rs(f)} + .as_deref() + .is_some_and(|value| value.trim().is_empty()) + { + return Err(ApiError::bad_request("${f.pascal} cannot be empty")); + }`, + ) + .join("\n"); +} + +function routes(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const P = names.pascal; + const one = names.snake; + const many = names.plural.snake; + const key = names.camel; + const keys = names.plural.camel; + const base = `/${names.plural.kebab}`; + const title = names.title; + const titles = names.plural.title; + const checks = requiredChecks(fields); + const upChecks = updateChecks(fields); + return { + path: `src/routes/${many}.rs`, + content: `//! \`/api/v1${base}\` — every route needs a Bearer token; creates attach the +//! authenticated user as owner and only the owner may change or delete (403). + +use axum::Router; +use axum::extract::State; +use axum::routing::get; +use serde_json::json; + +use crate::auth::AuthUser; +use crate::error::{ApiError, ApiResult}; +use crate::extract::{Json, Path}; +use crate::models::${one}::{Create${P}, ${P}, Update${P}}; +use crate::models::{with_owner, with_owners}; +use crate::response::{created, ok}; +use crate::state::AppState; + +pub fn routes() -> Router { + Router::new() + .route("${base}", get(index).post(store)) + .route("${base}/current-user", get(current_user)) + .route("${base}/{id}", get(show).patch(update).delete(destroy)) +} + +/// \`GET ${base}\` → \`data.${keys}\` +async fn index(State(state): State, _auth: AuthUser) -> ApiResult { + let ${many} = with_owners(&state.db, ${P}::all(&state.db).await?).await?; + Ok(ok("${titles} fetched successfully", json!({ "${keys}": ${many} }))) +} + +/// \`GET ${base}/current-user\` → \`data.${keys}\` (the caller's own) +async fn current_user(State(state): State, auth: AuthUser) -> ApiResult { + let ${many} = with_owners(&state.db, ${P}::for_user(&state.db, auth.id).await?).await?; + Ok(ok("${titles} fetched successfully", json!({ "${keys}": ${many} }))) +} + +/// \`GET ${base}/:id\` → \`data.${key}\` +async fn show(State(state): State, _auth: AuthUser, Path(id): Path) -> ApiResult { + let ${one} = find(&state, id).await?; + let ${one} = with_owner(&state.db, ${one}).await?; + Ok(ok("${title} fetched successfully", json!({ "${key}": ${one} }))) +} + +/// \`POST ${base}\` → 201 \`data.${key}\` +async fn store( + State(state): State, + auth: AuthUser, + Json(input): Json, +) -> ApiResult { +${checks ? `${checks}\n` : ""} let ${one} = ${P}::create(&state.db, auth.id, &input).await?; + let ${one} = with_owner(&state.db, ${one}).await?; + Ok(created("${title} created successfully", json!({ "${key}": ${one} }))) +} + +/// \`PATCH ${base}/:id\` → \`data.${key}\` +async fn update( + State(state): State, + auth: AuthUser, + Path(id): Path, + Json(input): Json, +) -> ApiResult { +${upChecks ? `${upChecks}\n` : ""} auth.ensure_owns(&find(&state, id).await?)?; + let ${one} = ${P}::update(&state.db, id, &input).await?; + let ${one} = with_owner(&state.db, ${one}).await?; + Ok(ok("${title} updated successfully", json!({ "${key}": ${one} }))) +} + +/// \`DELETE ${base}/:id\` → \`data.${key}\` (the deleted row) +async fn destroy(State(state): State, auth: AuthUser, Path(id): Path) -> ApiResult { + let ${one} = find(&state, id).await?; + auth.ensure_owns(&${one})?; + ${P}::delete(&state.db, id).await?; + Ok(ok("${title} deleted successfully", json!({ "${key}": ${one} }))) +} + +async fn find(state: &AppState, id: i64) -> Result<${P}, ApiError> { + ${P}::find(&state.db, id) + .await? + .ok_or_else(|| ApiError::not_found("${title} not found")) +} +`, + }; +} + +/** Reuse an existing `_create_.sql` so a second run is a no-op. */ +function migrationPath(ctx: Ctx): string { + const suffix = `_create_${ctx.names.plural.snake}.sql`; + try { + const existing = fs + .readdirSync(path.join(ctx.cwd, "migrations")) + .find((f) => f.endsWith(suffix)); + if (existing) return `migrations/${existing}`; + } catch { + // no migrations dir (dry-run outside a checkout) + } + const stamp = new Date().toISOString().replace(/\D/g, "").slice(0, 14); + return `migrations/${stamp}${suffix}`; +} + +function migration(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const table = names.plural.snake; + const width = Math.max(10, ...fields.map((f) => f.snake.length)); + const pad = (s: string) => s.padEnd(width); + const cols = fields.map((f) => { + let def = `${SQL[f.type].padEnd(7)}`; + if (!f.nullable) def += f.type === "boolean" ? " NOT NULL DEFAULT 0" : " NOT NULL"; + return ` ${pad(f.snake)} ${def}`; + }); + return { + path: migrationPath(ctx), + content: `CREATE TABLE IF NOT EXISTS ${table} ( + ${pad("id")} INTEGER PRIMARY KEY AUTOINCREMENT, + ${pad("user_id")} INTEGER NOT NULL REFERENCES users (id) ON DELETE CASCADE, +${cols.join(",\n")}, + ${pad("created_at")} TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, + ${pad("updated_at")} TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP +); +CREATE INDEX IF NOT EXISTS idx_${table}_user_id ON ${table} (user_id); +`, + }; +} + +function sample(f: Field): string { + switch (f.type) { + case "string": + case "text": + return `"Sample ${f.name}"`; + case "int": + return "3"; + case "number": + return "1.5"; + case "boolean": + return "true"; + case "date": + return `"2026-10-10T12:00:00Z"`; + case "json": + return `{ "k": "v" }`; + } +} + +function test(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const many = names.plural.snake; + const key = names.camel; + const keys = names.plural.camel; + const base = `/api/v1/${names.plural.kebab}`; + const label = labelField(fields); + const body = fields.map((f) => `"${f.snake}": ${sample(f)}`).join(", "); + const changed = isStringish(label) ? `"Renamed"` : sample(label); + return { + path: `tests/${many}.rs`, + content: `//! \`${base}\` — generated by \`cliuno make:resource\`: CRUD round trip and owner checks. + +mod common; + +use axum::http::StatusCode; +use common::TestApp; +use serde_json::json; + +#[tokio::test] +async fn ${many}_crud_round_trip() { + let app = TestApp::new().await; + let token = app.token_for("alice").await; + let auth = Some(token.as_str()); + + let created = app + .request("POST", "${base}", auth, Some(json!({ ${body} }))) + .await; + assert_eq!(created.status, StatusCode::CREATED); + let id = created.data("${key}")["id"].as_i64().expect("data.${key}.id"); + assert_eq!(created.data("${key}")["user"]["username"], "alice"); + + let list = app.request("GET", "${base}", auth, None).await; + assert_eq!(list.status, StatusCode::OK); + assert_eq!(list.data("${keys}").as_array().map(Vec::len), Some(1)); + + let mine = app.request("GET", "${base}/current-user", auth, None).await; + assert_eq!(mine.data("${keys}")[0]["id"], id); + + let path = format!("${base}/{id}"); + let updated = app + .request("PATCH", &path, auth, Some(json!({ "${label.snake}": ${changed} }))) + .await; + assert_eq!(updated.status, StatusCode::OK); + assert_eq!(updated.data("${key}")["${label.snake}"], json!(${changed})); + + let deleted = app.request("DELETE", &path, auth, None).await; + assert_eq!(deleted.status, StatusCode::OK); + let gone = app.request("GET", &path, auth, None).await; + assert_eq!(gone.status, StatusCode::NOT_FOUND); +} + +#[tokio::test] +async fn only_the_owner_can_change_a_${names.snake}() { + let app = TestApp::new().await; + let owner = app.token_for("owner").await; + let other = app.token_for("intruder").await; + + let created = app + .request("POST", "${base}", Some(&owner), Some(json!({ ${body} }))) + .await; + let id = created.data("${key}")["id"].as_i64().expect("id"); + let path = format!("${base}/{id}"); + + let patch = app + .request("PATCH", &path, Some(&other), Some(json!({}))) + .await; + assert_eq!(patch.status, StatusCode::FORBIDDEN); + let delete = app.request("DELETE", &path, Some(&other), None).await; + assert_eq!(delete.status, StatusCode::FORBIDDEN); +} +`, + }; +} + +/** Merge a `pub mod ;` into the first block of module declarations, sorted like rustfmt. */ +export function mergeModDecl(block: string, name: string): string { + const mods = new Set( + block + .split("\n") + .map((l) => l.match(/^pub mod (\w+);$/)?.[1]) + .filter((m): m is string => Boolean(m)), + ); + mods.add(name); + return [...mods] + .sort() + .map((m) => `pub mod ${m};`) + .join("\n"); +} + +function registerPatches(ctx: Ctx): Patch[] { + const { names } = ctx; + const many = names.plural.snake; + const one = names.snake; + const MOD_BLOCK = /^(?:pub mod \w+;\n)*pub mod \w+;$/m; + return [ + { + path: "src/routes/mod.rs", + anchor: MOD_BLOCK, + where: "after", + insert: `pub mod ${many};`, + skipIf: `__never__${many}`, + replace: (block) => mergeModDecl(block, many), + describe: `declare the ${many} routes module`, + }, + { + path: "src/routes/mod.rs", + anchor: /^ {8}\.merge\(\w+::routes\(\)\)$/m, + where: "after", + insert: `\n .merge(${many}::routes())`, + skipIf: `.merge(${many}::routes())`, + describe: `merge ${many}::routes() into api()`, + }, + { + path: "src/models/mod.rs", + anchor: MOD_BLOCK, + where: "after", + insert: `pub mod ${one};`, + skipIf: `__never__${one}`, + replace: (block) => mergeModDecl(block, one), + describe: `declare the ${one} model module`, + }, + ]; +} + +const cargoFmt = (): NativeCall => ({ bin: "cargo", args: ["fmt"], quiet: true }); + +export const axum: Generator = { + id: "axum", + label: "Axum", + kind: "backend", + format: cargoFmt, + commands: { + resource: { + describe: + "model + routes (/api/v1/, owner checks) + sqlx migration + integration test, registered in src/routes/mod.rs and src/models/mod.rs", + files: (ctx) => [model(ctx), routes(ctx), migration(ctx), test(ctx)], + patches: registerPatches, + notes: (ctx) => [ + `Migrations are embedded at build time and run on boot — restart \`cargo run\` and the ${ctx.names.plural.snake} table appears.`, + "Run `cargo test` and `cargo clippy --all-targets -- -D warnings`.", + ], + }, + model: { + describe: "sqlx row + request bodies + queries in src/models/", + files: (ctx) => [model(ctx)], + patches: (ctx) => registerPatches(ctx).slice(2), + }, + controller: { + describe: "route handlers in src/routes/ (merged into routes::api())", + files: (ctx) => [routes(ctx)], + patches: (ctx) => registerPatches(ctx).slice(0, 2), + }, + migration: { describe: "sqlx migration in migrations/", files: (ctx) => [migration(ctx)] }, + test: { + describe: "integration test in tests/ on the TestApp harness", + files: (ctx) => [test(ctx)], + }, + }, +}; diff --git a/src/generators/stacks/django.ts b/src/generators/stacks/django.ts new file mode 100644 index 0000000..661c11b --- /dev/null +++ b/src/generators/stacks/django.ts @@ -0,0 +1,487 @@ +import type { Ctx, FileSpec, Generator, Patch } from "../types"; +import type { Field, FieldType } from "../fields"; +import { labelField } from "../fields"; + +// Stubs mirror the template's todo resource: src/views/todo_views.py, src/serializers/ +// todo_serializers.py, src/urls/todo_urls.py, src/tests/test_todos.py and the Todo model in +// src/models.py — DRF function views, `{status, message, data}` envelope, single quotes. +// No post-write formatter on purpose: the template is hand-formatted (single quotes, hanging +// indents) and `ruff format` would rewrite the patched src/models.py wholesale. + +const MODEL_FIELD: Record = { + string: "CharField", + text: "TextField", + int: "IntegerField", + number: "FloatField", + boolean: "BooleanField", + date: "DateTimeField", + json: "JSONField", +}; + +/** Field types whose JSON round-trip equals the Python literal (dates don't). */ +const COMPARABLE = new Set(["string", "text", "int", "number", "boolean", "json"]); + +function modelField(f: Field): string { + const opts: string[] = []; + if (f.type === "string") opts.push("max_length=255"); + if (f.nullable) opts.push("blank=True", "null=True"); + else if (f.type === "boolean") opts.push("default=False"); + return ` ${f.snake} = models.${MODEL_FIELD[f.type]}(${opts.join(", ")})`; +} + +/** Sample literals for tests: ORM create value, JSON create payload value, JSON update value. */ +function sample(f: Field): { orm: string; api: string; updated: string } { + switch (f.type) { + case "string": + case "text": + return { + orm: `'Test ${f.snake}'`, + api: `'New ${f.snake}'`, + updated: `'Updated ${f.snake}'`, + }; + case "int": + return { orm: "1", api: "2", updated: "3" }; + case "number": + return { orm: "1.5", api: "2.5", updated: "3.5" }; + case "boolean": + return { orm: "False", api: "True", updated: "True" }; + case "date": + return { + orm: "timezone.now()", + api: "'2026-01-01T00:00:00Z'", + updated: "'2026-02-01T00:00:00Z'", + }; + case "json": + return { + orm: "{'key': 'value'}", + api: "{'key': 'new'}", + updated: "{'key': 'updated'}", + }; + } +} + +function required(fields: Field[]): Field[] { + return fields.filter((f) => !f.nullable && f.type !== "boolean"); +} + +/** `[a, b]` on one line when it fits in 99 columns, else one item per line. */ +function pyList(items: string[], indent: number, prefixLength: number): string { + const inline = `[${items.join(", ")}]`; + if (indent + prefixLength + inline.length <= 99) return inline; + const pad = " ".repeat(indent); + return `[\n${items.map((item) => `${pad} ${item},`).join("\n")}\n${pad}]`; +} + +function pyDict(pairs: string[], indent: number): string { + const inline = `{${pairs.join(", ")}}`; + if (indent + inline.length + 1 <= 99) return inline; + const pad = " ".repeat(indent); + return `{\n${pairs.map((pair) => `${pad} ${pair},`).join("\n")}\n${pad}}`; +} + +function modelClass(ctx: Ctx): string { + const { names, fields } = ctx; + const label = labelField(fields); + const str = + (label.type === "string" || label.type === "text") && !label.nullable + ? `self.${label.snake}` + : `str(self.${label.snake})`; + return `class ${names.pascal}(models.Model): + id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) +${fields.map(modelField).join("\n")} + user = models.ForeignKey( + User, on_delete=models.CASCADE, related_name='${names.plural.snake}') + created_at = models.DateTimeField(auto_now_add=True) + updated_at = models.DateTimeField(auto_now=True) + + class Meta: + db_table = '${names.plural.snake}' + ordering = ['-created_at'] + + def __str__(self): + return ${str} +`; +} + +/** Append the model class at the end of src/models.py (after the last non-blank character). */ +function modelPatch(ctx: Ctx): Patch { + return { + path: "src/models.py", + anchor: /\S\s*$/, + where: "after", + insert: `\n\n${modelClass(ctx)}`, + skipIf: `class ${ctx.names.pascal}(models.Model):`, + describe: `append the ${ctx.names.pascal} model`, + }; +} + +function serializer(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const all = ["id", ...fields.map((f) => f.snake), "user", "created_at", "updated_at"].map( + (f) => `'${f}'`, + ); + return { + path: `src/serializers/${names.snake}_serializers.py`, + content: `from rest_framework import serializers + +from src.models import ${names.pascal} + + +class ${names.pascal}Serializer(serializers.ModelSerializer): + class Meta: + model = ${names.pascal} + fields = ${pyList(all, 8, "fields = ".length)} + read_only_fields = ['id', 'user', 'created_at', 'updated_at'] +`, + }; +} + +function views(ctx: Ctx): FileSpec { + const { names } = ctx; + const P = names.pascal; + const one = names.snake; + const many = names.plural.snake; + const key = names.camel; + const keys = names.plural.camel; + const title = names.title; + const titles = names.plural.title; + const own = names.plural.kebab.replace(/-/g, " "); + const notFound = ` return Response( + {'status': 'error', 'message': '${title} not found'}, + status=status.HTTP_404_NOT_FOUND, + )`; + const invalid = ` return Response( + {'status': 'error', 'message': serializer.errors}, + status=status.HTTP_400_BAD_REQUEST, + )`; + + return { + path: `src/views/${one}_views.py`, + content: `from rest_framework import status +from rest_framework.decorators import api_view, permission_classes +from rest_framework.permissions import IsAuthenticated +from rest_framework.response import Response + +from src.models import ${P} +from src.serializers.${one}_serializers import ${P}Serializer + + +@api_view(['GET']) +@permission_classes([IsAuthenticated]) +def get_current_user_${many}(request): + ${many} = ${P}.objects.filter(user=request.user) + return Response({ + 'status': 'success', + 'message': '${titles} fetched successfully', + 'data': {'${keys}': ${P}Serializer(${many}, many=True).data}, + }) + + +@api_view(['GET']) +@permission_classes([IsAuthenticated]) +def get_all_${many}(request): + ${many} = ${P}.objects.select_related('user').all() + return Response({ + 'status': 'success', + 'message': '${titles} fetched successfully', + 'data': {'${keys}': ${P}Serializer(${many}, many=True).data}, + }) + + +@api_view(['GET']) +@permission_classes([IsAuthenticated]) +def get_${one}_by_id(request, pk): + try: + ${one} = ${P}.objects.select_related('user').get(id=pk) + except ${P}.DoesNotExist: +${notFound} + return Response({ + 'status': 'success', + 'message': '${title} fetched successfully', + 'data': {'${key}': ${P}Serializer(${one}).data}, + }) + + +@api_view(['POST']) +@permission_classes([IsAuthenticated]) +def create_${one}(request): + serializer = ${P}Serializer(data=request.data) + if not serializer.is_valid(): +${invalid} + + ${one} = serializer.save(user=request.user) + return Response({ + 'status': 'success', + 'message': '${title} created successfully', + 'data': {'${key}': ${P}Serializer(${one}).data}, + }, status=status.HTTP_201_CREATED) + + +@api_view(['PATCH']) +@permission_classes([IsAuthenticated]) +def update_${one}(request, pk): + try: + ${one} = ${P}.objects.select_related('user').get(id=pk) + except ${P}.DoesNotExist: +${notFound} + + if ${one}.user.id != request.user.id: + return Response( + {'status': 'error', 'message': 'You can only update your own ${own}'}, + status=status.HTTP_403_FORBIDDEN, + ) + + serializer = ${P}Serializer(${one}, data=request.data, partial=True) + if not serializer.is_valid(): +${invalid} + serializer.save() + + return Response({ + 'status': 'success', + 'message': '${title} updated successfully', + 'data': {'${key}': ${P}Serializer(${one}).data}, + }) + + +@api_view(['DELETE']) +@permission_classes([IsAuthenticated]) +def delete_${one}(request, pk): + try: + ${one} = ${P}.objects.select_related('user').get(id=pk) + except ${P}.DoesNotExist: +${notFound} + + if ${one}.user.id != request.user.id: + return Response( + {'status': 'error', 'message': 'You can only delete your own ${own}'}, + status=status.HTTP_403_FORBIDDEN, + ) + + ${one}.delete() + return Response({'status': 'success', 'message': '${title} deleted successfully'}) +`, + }; +} + +function urls(ctx: Ctx): FileSpec { + const { names } = ctx; + const one = names.snake; + const many = names.plural.snake; + const imported = [ + `create_${one}`, + `delete_${one}`, + `get_all_${many}`, + `get_current_user_${many}`, + `get_${one}_by_id`, + `update_${one}`, + ].sort(); + return { + path: `src/urls/${one}_urls.py`, + content: `from django.urls import path + +from src.urls.dispatch import method_dispatch +from src.views.${one}_views import ( +${imported.map((name) => ` ${name},`).join("\n")} +) + +urlpatterns = [ + path('/current-user', get_current_user_${many}, name='${names.kebab}-current-user'), + path('', method_dispatch(GET=get_all_${many}, POST=create_${one}), name='${names.kebab}-collection'), + path('/', + method_dispatch(GET=get_${one}_by_id, PATCH=update_${one}, DELETE=delete_${one}), + name='${names.kebab}-detail'), +] +`, + }; +} + +function urlPatch(ctx: Ctx): Patch { + const { names } = ctx; + return { + path: "src/urls/__init__.py", + anchor: /^ {4}path\('[^']*', include\('src\.urls\.\w+'\)\),$/m, + where: "after", + insert: `\n path('${names.plural.kebab}', include('src.urls.${names.snake}_urls')),`, + skipIf: `src.urls.${names.snake}_urls`, + describe: `mount /${names.plural.kebab}`, + }; +} + +function test(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const P = names.pascal; + const one = names.snake; + const many = names.plural.snake; + const key = names.camel; + const keys = names.plural.camel; + const label = labelField(fields); + const base = `/api/v1/${names.plural.kebab}`; + const hasDate = fields.some((f) => f.type === "date"); + const ormKwargs = (owner: string) => + [...fields.map((f) => `${f.snake}=${sample(f).orm}`), `user=${owner}`] + .map((kw) => ` ${kw},`) + .join("\n"); + const createPayload = pyDict( + fields.map((f) => `'${f.snake}': ${sample(f).api}`), + 12, + ); + const updatePayload = `{'${label.snake}': ${sample(label).updated}}`; + const assertLabel = (expr: string, value: string) => + COMPARABLE.has(label.type) + ? `self.assertEqual(${expr}['${label.snake}'], ${value})` + : `self.assertIn('${label.snake}', ${expr})`; + const assertUpdated = COMPARABLE.has(label.type) + ? `\n self.assertEqual(self.${one}.${label.snake}, ${sample(label).updated})` + : ""; + const missingRequired = + required(fields).length > 0 + ? ` + def test_create_${one}_missing_required(self): + resp = self.client.post( + '${base}', + {}, + content_type='application/json', + **self.auth_header(), + ) + self.assertEqual(resp.status_code, 400) +` + : ""; + + return { + path: `src/tests/test_${many}.py`, + content: `import uuid +${hasDate ? "\nfrom django.utils import timezone\n" : ""} +from src.models import ${P} +from src.tests.base import BaseTestCase + + +class ${P}CRUDTest(BaseTestCase): + def setUp(self): + super().setUp() + self.${one} = ${P}.objects.create( +${ormKwargs("self.user")} + ) + + def test_get_all_${many}(self): + resp = self.client.get('${base}', **self.auth_header()) + self.assertEqual(resp.status_code, 200) + self.assertEqual(len(resp.json()['data']['${keys}']), 1) + + def test_get_${one}_by_id(self): + resp = self.client.get( + f'${base}/{self.${one}.id}', **self.auth_header() + ) + self.assertEqual(resp.status_code, 200) + ${assertLabel(`resp.json()['data']['${key}']`, sample(label).orm)} + + def test_get_${one}_not_found(self): + resp = self.client.get( + f'${base}/{uuid.uuid4()}', **self.auth_header() + ) + self.assertEqual(resp.status_code, 404) + + def test_create_${one}(self): + resp = self.client.post( + '${base}', + ${createPayload}, + content_type='application/json', + **self.auth_header(), + ) + self.assertEqual(resp.status_code, 201) + ${assertLabel(`resp.json()['data']['${key}']`, sample(label).api)} +${missingRequired} + def test_update_own_${one}(self): + resp = self.client.patch( + f'${base}/{self.${one}.id}', + ${updatePayload}, + content_type='application/json', + **self.auth_header(), + ) + self.assertEqual(resp.status_code, 200) + self.${one}.refresh_from_db()${assertUpdated} + + def test_cannot_update_others_${one}(self): + other_${one} = ${P}.objects.create( +${ormKwargs("self.admin_user")} + ) + resp = self.client.patch( + f'${base}/{other_${one}.id}', + ${updatePayload}, + content_type='application/json', + **self.auth_header(), + ) + self.assertEqual(resp.status_code, 403) + + def test_delete_own_${one}(self): + resp = self.client.delete( + f'${base}/{self.${one}.id}', **self.auth_header() + ) + self.assertEqual(resp.status_code, 200) + self.assertFalse(${P}.objects.filter(id=self.${one}.id).exists()) + + def test_get_current_user_${many}(self): + resp = self.client.get( + '${base}/current-user', **self.auth_header()) + self.assertEqual(resp.status_code, 200) + self.assertEqual(len(resp.json()['data']['${keys}']), 1) + + def test_no_auth(self): + resp = self.client.get('${base}') + self.assertEqual(resp.status_code, 401) +`, + }; +} + +function migrateNote(ctx: Ctx): string { + return `Create and apply the migration: uv run python manage.py makemigrations src && uv run python manage.py migrate (the ${ctx.names.plural.snake} table does not exist until then).`; +} + +export const django: Generator = { + id: "django", + label: "Django", + kind: "backend", + commands: { + resource: { + describe: + "model appended to src/models.py + serializer + DRF views + urls (mounted under /api/v1/) + TestCase", + files: (ctx) => [serializer(ctx), views(ctx), urls(ctx), test(ctx)], + patches: (ctx) => [modelPatch(ctx), urlPatch(ctx)], + notes: (ctx) => [ + migrateNote(ctx), + `Run the suite: uv run python manage.py test src.tests.test_${ctx.names.plural.snake}`, + ], + }, + model: { + describe: "model class appended to src/models.py", + patches: (ctx) => [modelPatch(ctx)], + notes: (ctx) => [migrateNote(ctx)], + }, + migration: { + describe: "manage.py makemigrations src --name (after editing src/models.py)", + native: (ctx) => [ + { + bin: "uv", + args: [ + "run", + "python", + "manage.py", + "makemigrations", + "src", + "--name", + ctx.names.snake, + ], + }, + ], + notes: () => ["Apply it with: uv run python manage.py migrate"], + }, + controller: { + describe: "DRF function views in src/views/ using the {status, message, data} envelope", + files: (ctx) => [views(ctx)], + }, + validator: { + describe: "ModelSerializer in src/serializers/", + files: (ctx) => [serializer(ctx)], + }, + test: { describe: "TestCase in src/tests/ (BaseTestCase)", files: (ctx) => [test(ctx)] }, + }, +}; diff --git a/src/generators/stacks/drogon.ts b/src/generators/stacks/drogon.ts new file mode 100644 index 0000000..136b3a2 --- /dev/null +++ b/src/generators/stacks/drogon.ts @@ -0,0 +1,404 @@ +import type { Ctx, FileSpec, Generator, Patch } from "../types"; +import type { Field, FieldType } from "../fields"; + +// Stubs mirror CLIuno-Drogon-template: one self-contained HttpController per resource in +// controllers/

Controller.cc (METHOD_LIST + ADD_METHOD_TO, raw SQL through +// app().getDbClient()->execSqlSync with sqlite "?" placeholders, cliuno::ok/fail/envelope for +// the {status, message, data} envelope, currentUserId(req) as the auth guard). CMake globs +// controllers/*.cc, so the only registration is the CREATE TABLE statement in main.cc. + +const SQLITE: Record = { + string: "TEXT", + text: "TEXT", + int: "INTEGER", + number: "REAL", + boolean: "INTEGER", + date: "TEXT", + json: "TEXT", +}; + +const SIG = "const HttpRequestPtr &, std::function &&"; + +/** `field(b, "title")`, or the camelCase key with a snake_case fallback for multi-word names. */ +function read(f: Field): string { + return f.camel === f.snake ? `field(b, "${f.camel}")` : `field(b, "${f.camel}", "${f.snake}")`; +} + +/** jsoncpp predicate that the request value has the right shape. */ +function check(f: Field): string { + const v = read(f); + switch (f.type) { + case "string": + case "text": + case "date": + return `${v}.isString()`; + case "int": + return `${v}.isIntegral()`; + case "number": + return `${v}.isNumeric()`; + case "boolean": + return `${v}.isBool()`; + case "json": + return `!${v}.isNull()`; + } +} + +/** Expression that converts the request value into a bindable sqlite argument. */ +function bind(f: Field): string { + const v = read(f); + switch (f.type) { + case "string": + case "text": + case "date": + return `${v}.asString()`; + case "int": + return `${v}.asInt64()`; + case "number": + return `${v}.asDouble()`; + case "boolean": + return `${v}.asBool() ? 1 : 0`; + case "json": + return `jsonText(${v})`; + } +} + +/** Expression that reads the column back from an orm::Row into a Json::Value. */ +function column(f: Field): string { + const c = `r["${f.snake}"]`; + let value: string; + switch (f.type) { + case "string": + case "text": + case "date": + value = `Json::Value(${c}.as())`; + break; + case "int": + value = `Json::Value(${c}.as())`; + break; + case "number": + value = `Json::Value(${c}.as())`; + break; + case "boolean": + value = `Json::Value(${c}.as() != 0)`; + break; + case "json": + value = `parseJson(${c}.as())`; + break; + } + if (f.nullable || f.type === "json") return `${c}.isNull() ? Json::Value() : ${value}`; + return value; +} + +function schemaColumn(f: Field): string { + const parts = [f.snake, SQLITE[f.type]]; + if (!f.nullable) parts.push("NOT NULL"); + if (f.type === "boolean" && !f.nullable) parts.push("DEFAULT 0"); + return parts.join(" "); +} + +function requiredGuard(f: Field, title: string): string { + const v = read(f); + const test = + f.type === "string" || f.type === "text" + ? `!${v}.isString() || ${v}.asString().empty()` + : `!${check(f)}`; + const line = ` if (${test})`; + const action = `return cb(fail(k400BadRequest, "warning", "${title} is required"));`; + return line.length + action.length + 1 > 100 + ? `${line}\n ${action}` + : `${line} ${action}`; +} + +/** `UPDATE SET =? …` guarded by the request value's shape (one statement per field). */ +function setStatement(f: Field, table: string, indent: string, uid: string): string { + return `${indent}if (${check(f)}) +${indent} db->execSqlSync("UPDATE ${table} SET ${f.snake}=? WHERE id=? AND user_id=?", +${indent} ${bind(f)}, id, ${uid});`; +} + +function present(f: Field): string { + return f.camel === f.snake ? `has(b, "${f.camel}")` : `has(b, "${f.camel}", "${f.snake}")`; +} + +function clearStatement(f: Field, table: string, indent: string, uid: string): string { + return `${indent}else if (${present(f)} && ${read(f)}.isNull()) +${indent} db->execSqlSync("UPDATE ${table} SET ${f.snake}=NULL WHERE id=? AND user_id=?", id, ${uid});`; +} + +function controller(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const P = names.pascal; + const C = `${P}Controller`; + const one = names.camel; + const many = names.plural.camel; + const title = names.title; + const titles = names.plural.title; + const table = names.plural.snake; + const route = `/api/v1/${names.plural.kebab}`; + const required = fields.filter((f) => !f.nullable); + const optional = fields.filter((f) => f.nullable); + const hasJson = fields.some((f) => f.type === "json"); + const hasSnake = fields.some((f) => f.camel !== f.snake); + + const includes = ["#include ", "#include "]; + if (hasJson) includes.unshift("#include "); + + const insertColumns = ["user_id", ...required.map((f) => f.snake)]; + const insertArgs = [ + "*id", + ...required.map((f) => + f.type === "boolean" ? `${check(f)} && ${read(f)}.asBool() ? 1 : 0` : bind(f), + ), + ]; + + const guards = required + .filter((f) => f.type !== "boolean") + .map((f) => `${requiredGuard(f, f.pascal)}\n`) + .join(""); + + const helpers: string[] = []; + helpers.push(`// Request keys arrive camelCase (or snake_case); a missing key reads as null. +const Json::Value &field(const Json::Value &b, const char *camel${hasSnake ? ", const char *snake = nullptr" : ""}) +{ +${ + hasSnake + ? ` if (b.isMember(camel) || !snake) return b[camel]; + return b[snake];` + : ` return b[camel];` +} +}`); + if (hasJson) + helpers.push(`// JSON columns are stored as text and parsed again on the way out. +std::string jsonText(const Json::Value &value) +{ + Json::StreamWriterBuilder writer; + writer["indentation"] = ""; + return Json::writeString(writer, value); +} +Json::Value parseJson(const std::string &text) +{ + Json::CharReaderBuilder builder; + std::unique_ptr reader(builder.newCharReader()); + Json::Value out; + std::string errs; + if (text.empty() || !reader->parse(text.data(), text.data() + text.size(), &out, &errs)) + return Json::Value(); + return out; +}`); + if (optional.length > 0) + helpers.push(`// A missing key and an explicit null both read as null; only an explicit null clears a column. +bool has(const Json::Value &b, const char *camel, const char *snake = nullptr) +{ + return b.isMember(camel) || (snake != nullptr && b.isMember(snake)); +}`); + helpers.push(`// Nullable columns: set when the key is present, clear when it is explicitly null. +void applyOptional(const orm::DbClientPtr &db, const Json::Value &b, int64_t id, int64_t uid) +{ +${optional.map((f) => `${setStatement(f, table, " ", "uid")}\n${clearStatement(f, table, " ", "uid")}`).join("\n")} +}`); + + const pad = " ".repeat(`void ${C}::update(`.length); + const padShow = " ".repeat(`void ${C}::show(`.length); + const padList = " ".repeat(`void ${C}::list(`.length); + const padCreate = " ".repeat(`void ${C}::create(`.length); + const padCurrent = " ".repeat(`void ${C}::currentUser(`.length); + const padRemove = " ".repeat(`void ${C}::remove(`.length); + + return { + path: `controllers/${C}.cc`, + content: `#include "../utils/Helpers.h" + +#include + +${includes.join("\n")} + +using namespace drogon; +using namespace cliuno; + +// ${route} — all scoped to the authenticated owner. +class ${C} : public HttpController<${C}> +{ + public: + METHOD_LIST_BEGIN + ADD_METHOD_TO(${C}::currentUser, "${route}/current-user", Get); + ADD_METHOD_TO(${C}::list, "${route}", Get); + ADD_METHOD_TO(${C}::create, "${route}", Post); + ADD_METHOD_TO(${C}::show, "${route}/{id}", Get); + ADD_METHOD_TO(${C}::update, "${route}/{id}", Patch); + ADD_METHOD_TO(${C}::remove, "${route}/{id}", Delete); + METHOD_LIST_END + + void list(${SIG}); + void currentUser(${SIG}); + void create(${SIG}); + void show(${SIG}, std::string); + void update(${SIG}, std::string); + void remove(${SIG}, std::string); +}; + +namespace +{ +${helpers.join("\n")} + +Json::Value ${one}Json(const orm::Row &r) +{ + Json::Value v(Json::objectValue); + v["id"] = r["id"].as(); + v["user_id"] = r["user_id"].as(); +${fields.map((f) => ` v["${f.snake}"] = ${column(f)};`).join("\n")} + v["created_at"] = r["created_at"].isNull() ? "" : r["created_at"].as(); + return v; +} +} // namespace + +void ${C}::list(const HttpRequestPtr &req, +${padList}std::function &&cb) +{ + auto id = currentUserId(req); + if (!id) return cb(fail(k401Unauthorized, "error", "Unauthorized")); + auto rows = app().getDbClient()->execSqlSync( + "SELECT * FROM ${table} WHERE user_id=? ORDER BY id DESC", *id); + Json::Value arr(Json::arrayValue); + for (auto &r : rows) arr.append(${one}Json(r)); + Json::Value data(Json::objectValue); + data["${many}"] = arr; + cb(ok("${titles} fetched", data)); +} + +void ${C}::currentUser(const HttpRequestPtr &req, +${padCurrent}std::function &&cb) +{ + list(req, std::move(cb)); +} + +void ${C}::create(const HttpRequestPtr &req, +${padCreate}std::function &&cb) +{ + auto id = currentUserId(req); + if (!id) return cb(fail(k401Unauthorized, "error", "Unauthorized")); + const Json::Value b = bodyJson(req); +${guards} auto db = app().getDbClient(); + auto ins = db->execSqlSync( + "INSERT INTO ${table}(${insertColumns.join(",")}) VALUES(${insertColumns.map(() => "?").join(",")})", + ${insertArgs.join(",\n ")}); +${optional.length > 0 ? ` applyOptional(db, b, static_cast(ins.insertId()), *id);\n` : ""} auto rows = db->execSqlSync("SELECT * FROM ${table} WHERE id=?", ins.insertId()); + Json::Value data(Json::objectValue); + data["${one}"] = ${one}Json(rows[0]); + cb(envelope(k201Created, "success", "${title} created", data)); +} + +void ${C}::show(const HttpRequestPtr &req, +${padShow}std::function &&cb, std::string id) +{ + auto uid = currentUserId(req); + if (!uid) return cb(fail(k401Unauthorized, "error", "Unauthorized")); + try + { + auto rows = app().getDbClient()->execSqlSync( + "SELECT * FROM ${table} WHERE id=? AND user_id=?", std::stoll(id), *uid); + if (rows.empty()) return cb(fail(k404NotFound, "warning", "${title} not found")); + Json::Value data(Json::objectValue); + data["${one}"] = ${one}Json(rows[0]); + cb(ok("", data)); + } + catch (...) + { + cb(fail(k404NotFound, "warning", "${title} not found")); + } +} + +void ${C}::update(const HttpRequestPtr &req, +${pad}std::function &&cb, std::string rowId) +{ + auto uid = currentUserId(req); + if (!uid) return cb(fail(k401Unauthorized, "error", "Unauthorized")); + try + { + const Json::Value b = bodyJson(req); + auto db = app().getDbClient(); + const int64_t id = std::stoll(rowId); + auto rows = db->execSqlSync("SELECT * FROM ${table} WHERE id=? AND user_id=?", id, *uid); + if (rows.empty()) return cb(fail(k404NotFound, "warning", "${title} not found")); +${required.map((f) => setStatement(f, table, " ", "*uid")).join("\n")} +${optional.length > 0 ? ` applyOptional(db, b, id, *uid);\n` : ""} auto updated = db->execSqlSync("SELECT * FROM ${table} WHERE id=? AND user_id=?", id, *uid); + Json::Value data(Json::objectValue); + data["${one}"] = ${one}Json(updated[0]); + cb(ok("${title} updated", data)); + } + catch (...) + { + cb(fail(k404NotFound, "warning", "${title} not found")); + } +} + +void ${C}::remove(const HttpRequestPtr &req, +${padRemove}std::function &&cb, std::string id) +{ + auto uid = currentUserId(req); + if (!uid) return cb(fail(k401Unauthorized, "error", "Unauthorized")); + try + { + auto db = app().getDbClient(); + auto rows = db->execSqlSync("SELECT * FROM ${table} WHERE id=? AND user_id=?", + std::stoll(id), *uid); + if (rows.empty()) return cb(fail(k404NotFound, "warning", "${title} not found")); + Json::Value data(Json::objectValue); + data["${one}"] = ${one}Json(rows[0]); + db->execSqlSync("DELETE FROM ${table} WHERE id=? AND user_id=?", std::stoll(id), *uid); + cb(ok("${title} deleted", data)); + } + catch (...) + { + cb(fail(k404NotFound, "warning", "${title} not found")); + } +} +`, + }; +} + +function schema(ctx: Ctx): Patch[] { + const { names, fields } = ctx; + const table = names.plural.snake; + const columns = [ + "id INTEGER PRIMARY KEY AUTOINCREMENT, user_id INTEGER NOT NULL,", + ...fields.map((f) => `${schemaColumn(f)},`), + "created_at TEXT NOT NULL DEFAULT (datetime('now')))", + ]; + return [ + { + path: "main.cc", + anchor: "for (const auto &sql : schema) db->execSqlSync(sql);", + where: "after", + insert: ` + db->execSqlSync( + "CREATE TABLE IF NOT EXISTS ${table} (" +${columns.map((c) => ` "${c}"`).join("\n")});`, + skipIf: `CREATE TABLE IF NOT EXISTS ${table} (`, + describe: `create the ${table} table at boot`, + }, + ]; +} + +export const drogon: Generator = { + id: "drogon", + label: "Drogon", + kind: "backend", + commands: { + resource: { + describe: + "HttpController in controllers/ under /api/v1/ + CREATE TABLE in main.cc (CMake globs controllers/*.cc)", + files: (ctx) => [controller(ctx)], + patches: schema, + notes: (ctx) => [ + `Rebuild (cmake --build build) — CMake globs controllers/*.cc; the ${ctx.names.plural.snake} table is created at boot by main.cc.`, + `Routes live at /api/v1/${ctx.names.plural.kebab} (+ /current-user); rows are scoped to the Bearer user.`, + "Responses use snake_case keys; requests accept camelCase or snake_case keys.", + ], + }, + controller: { + describe: + "HttpController using currentUserId + the ok/fail envelope (needs the table in main.cc)", + files: (ctx) => [controller(ctx)], + }, + }, +}; diff --git a/src/generators/stacks/express.ts b/src/generators/stacks/express.ts new file mode 100644 index 0000000..5793744 --- /dev/null +++ b/src/generators/stacks/express.ts @@ -0,0 +1,414 @@ +import type { Ctx, FileSpec, Generator, Patch } from "../types"; +import type { Field, FieldType } from "../fields"; +import { labelField } from "../fields"; +import { oxfmt } from "./shared"; + +const COLUMN: Record = { + string: "text", + text: "text", + int: "integer", + number: "real", + boolean: "boolean", + date: "datetime", + json: "simple-json", +}; + +const TS: Record = { + string: "string", + text: "string", + int: "number", + number: "number", + boolean: "boolean", + date: "Date", + json: "Record", +}; + +function column(f: Field): string { + const opts: string[] = []; + if (f.nullable) opts.push("nullable: true"); + if (f.type === "boolean" && !f.nullable) opts.push("default: false"); + const options = opts.length ? `, { ${opts.join(", ")} }` : ""; + return ` @Column('${COLUMN[f.type]}'${options})\n ${f.camel}: ${TS[f.type]}\n`; +} + +function entity(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + return { + path: `src/entities/${names.kebab}.entity.ts`, + content: `import { + Entity, + Column, + PrimaryGeneratedColumn, + ManyToOne, + JoinColumn, + CreateDateColumn, + UpdateDateColumn, +} from 'typeorm' + +import { User } from './user.entity' + +@Entity('${names.plural.pascal}') +export class ${names.pascal} { + @PrimaryGeneratedColumn('uuid') + id: string + +${fields.map(column).join("\n")} + @CreateDateColumn() + createdAt: Date + + @UpdateDateColumn() + updatedAt: Date + + @ManyToOne(() => User, { nullable: false }) + @JoinColumn({ name: 'user_id' }) + user: User +} +`, + }; +} + +function controller(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const required = fields.filter((f) => !f.nullable); + const label = labelField(fields); + const destructure = fields.map((f) => f.camel).join(", "); + const requiredGuard = required + .map( + ( + f, + ) => ` if (${f.camel} === undefined || ${f.camel} === null${f.type === "string" || f.type === "text" ? ` || ${f.camel} === ''` : ""}) { + res.status(400).json({ status: 'error', message: '${f.pascal} is required' }) + return + }`, + ) + .join("\n"); + const assign = fields.map((f) => ` ${f.camel},`).join("\n"); + const updates = fields + .map( + (f) => + ` if (${f.camel} !== undefined) ${names.camel}.${f.camel} = ${f.camel}`, + ) + .join("\n"); + const one = names.camel; + const many = names.plural.camel; + const P = names.pascal; + const title = names.title; + const titles = names.plural.title; + + return { + path: `src/controllers/${names.kebab}.controller.ts`, + content: `import { Request, Response } from 'express' + +import { myDataSource } from '@/database/app-data-source' +import { ${P} } from '@/entities/${names.kebab}.entity' +import { User } from '@/entities/user.entity' +import logThisError from '@/helpers/error-logger' + +export const ${P}Controller = { + getAll: async (req: Request, res: Response): Promise => { + try { + const ${many} = await myDataSource.getRepository(${P}).find({ + relations: { user: true }, + order: { createdAt: 'DESC' }, + }) + res.status(200).json({ + status: 'success', + message: '${titles} fetched successfully', + data: { ${many} }, + }) + } catch (error) { + logThisError(error) + res.status(500).json({ status: 'error', message: 'Internal server error' }) + } + }, + + getById: async (req: Request, res: Response): Promise => { + try { + const ${one} = await myDataSource.getRepository(${P}).findOne({ + where: { id: req.params.id as string }, + relations: { user: true }, + }) + if (!${one}) { + res.status(404).json({ status: 'error', message: '${title} not found' }) + return + } + res.status(200).json({ + status: 'success', + message: '${title} fetched successfully', + data: { ${one} }, + }) + } catch (error) { + logThisError(error) + res.status(500).json({ status: 'error', message: 'Internal server error' }) + } + }, + + getCurrentUser${names.plural.pascal}: async (req: Request, res: Response): Promise => { + try { + const userId = (req as any).user.id + const ${many} = await myDataSource.getRepository(${P}).find({ + where: { user: { id: userId } }, + relations: { user: true }, + order: { createdAt: 'DESC' }, + }) + res.status(200).json({ + status: 'success', + message: '${titles} fetched successfully', + data: { ${many} }, + }) + } catch (error) { + logThisError(error) + res.status(500).json({ status: 'error', message: 'Internal server error' }) + } + }, + + create: async (req: Request, res: Response): Promise => { + try { + const { ${destructure} } = req.body + const userId = (req as any).user.id + +${requiredGuard} + + const user = await myDataSource.getRepository(User).findOneBy({ id: userId }) + if (!user) { + res.status(404).json({ status: 'error', message: 'User not found' }) + return + } + + const ${one} = myDataSource.getRepository(${P}).create({ +${assign} + user, + }) + const result = await myDataSource.getRepository(${P}).save(${one}) + + res.status(201).json({ + status: 'success', + message: '${title} created successfully', + data: { ${one}: result }, + }) + } catch (error) { + logThisError(error) + res.status(500).json({ status: 'error', message: 'Internal server error' }) + } + }, + + update: async (req: Request, res: Response): Promise => { + try { + const userId = (req as any).user.id + const ${one} = await myDataSource.getRepository(${P}).findOne({ + where: { id: req.params.id as string }, + relations: { user: true }, + }) + + if (!${one}) { + res.status(404).json({ status: 'error', message: '${title} not found' }) + return + } + + if (${one}.user.id !== userId) { + res.status(403).json({ + status: 'error', + message: 'You can only update your own ${names.plural.kebab.replace(/-/g, " ")}', + }) + return + } + + const { ${destructure} } = req.body +${updates} + + await myDataSource.getRepository(${P}).save(${one}) + res.status(200).json({ + status: 'success', + message: '${title} updated successfully', + data: { ${one} }, + }) + } catch (error) { + logThisError(error) + res.status(500).json({ status: 'error', message: 'Internal server error' }) + } + }, + + delete: async (req: Request, res: Response): Promise => { + try { + const userId = (req as any).user.id + const ${one} = await myDataSource.getRepository(${P}).findOne({ + where: { id: req.params.id as string }, + relations: { user: true }, + }) + + if (!${one}) { + res.status(404).json({ status: 'error', message: '${title} not found' }) + return + } + + if (${one}.user.id !== userId) { + res.status(403).json({ + status: 'error', + message: 'You can only delete your own ${names.plural.kebab.replace(/-/g, " ")}', + }) + return + } + + await myDataSource.getRepository(${P}).remove(${one}) + res.status(200).json({ status: 'success', message: '${title} deleted successfully' }) + } catch (error) { + logThisError(error) + res.status(500).json({ status: 'error', message: 'Internal server error' }) + } + }, +} +// ${label.camel} is the display field used by the frontends' list pages. +`, + }; +} + +function router(ctx: Ctx): FileSpec { + const { names } = ctx; + return { + path: `src/routers/v1/${names.kebab}.router.ts`, + content: `import { Router } from 'express' + +import { ${names.pascal}Controller } from '@/controllers/${names.kebab}.controller' +import { ensureAuthenticated } from '@/middlewares/auth.middleware' + +const router: Router = Router() + +router.use(ensureAuthenticated) + +// CRUD operations +router.get('/current-user', ${names.pascal}Controller.getCurrentUser${names.plural.pascal}) +router.get('/', ${names.pascal}Controller.getAll) +router.get('/:id', ${names.pascal}Controller.getById) +router.post('/', ${names.pascal}Controller.create) +router.patch('/:id', ${names.pascal}Controller.update) +router.delete('/:id', ${names.pascal}Controller.delete) + +export default router +`, + }; +} + +function validator(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const JOI: Record = { + string: "Joi.string()", + text: "Joi.string().allow('')", + int: "Joi.number().integer()", + number: "Joi.number()", + boolean: "Joi.boolean()", + date: "Joi.date()", + json: "Joi.object()", + }; + const rules = fields + .map((f) => ` ${f.camel}: ${JOI[f.type]}${f.nullable ? ".allow(null)" : ".required()"},`) + .join("\n"); + return { + path: `src/validators/${names.kebab}.validator.ts`, + content: `import { Request } from 'express' +import Joi from 'joi' + +const schema = Joi.object({ +${rules} +}) + +export async function Validate${names.pascal}(req: Request) { + try { + await schema.validateAsync(req.body) + } catch (error: any) { + const statusCode = error.isJoi ? 400 : 500 + throw { + statusCode, + message: error.details ? error.details[0].message : 'Internal server error', + } + } +} +`, + }; +} + +function spec(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const sample = fields + .map((f) => { + const value: Record = { + string: `'Sample ${f.name}'`, + text: `'Sample ${f.name}'`, + int: "1", + number: "1.5", + boolean: "false", + date: "new Date().toISOString()", + json: "{}", + }; + return ` ${f.camel}: ${value[f.type]},`; + }) + .join("\n"); + return { + path: `src/__tests__/${names.kebab}.spec.ts`, + content: `import { ${names.pascal} } from '@/entities/${names.kebab}.entity' + +describe('${names.pascal} entity', () => { + test('has the generated fields', () => { + const ${names.camel} = Object.assign(new ${names.pascal}(), { +${sample} + }) +${fields.map((f) => ` expect(${names.camel}.${f.camel}).toBeDefined()`).join("\n")} + }) +}) +`, + }; +} + +function registerRoute(ctx: Ctx): Patch[] { + const { names } = ctx; + return [ + { + path: "src/routers/index.ts", + anchor: /^import \w+ from '\.\/v1\/[\w.-]+'$/m, + where: "after", + insert: `\nimport ${names.camel}Router from './v1/${names.kebab}.router'`, + skipIf: `./v1/${names.kebab}.router`, + describe: `import the ${names.kebab} router`, + }, + { + path: "src/routers/index.ts", + anchor: "// Export the main router", + where: "before", + insert: `// ${names.plural.title} Router\nrouter.use('/${names.plural.kebab}', ${names.camel}Router)\n\n`, + skipIf: `router.use('/${names.plural.kebab}'`, + describe: `mount /${names.plural.kebab}`, + }, + ]; +} + +export const express: Generator = { + id: "express", + format: oxfmt, + label: "Express", + kind: "backend", + commands: { + resource: { + describe: + "entity + controller + router (mounted under /api/v1/) + validator + jest spec", + files: (ctx) => [entity(ctx), controller(ctx), router(ctx), validator(ctx), spec(ctx)], + patches: registerRoute, + notes: (ctx) => [ + `TypeORM synchronize is on — restart the dev server and the ${names(ctx).plural.pascal} table appears.`, + `Wire Validate${names(ctx).pascal} into the router if you want request validation (see auth.router.ts).`, + ], + }, + model: { describe: "TypeORM entity in src/entities/", files: (ctx) => [entity(ctx)] }, + controller: { + describe: "controller in src/controllers/ using the {status, message, data} envelope", + files: (ctx) => [controller(ctx)], + }, + validator: { + describe: "Joi validator in src/validators/", + files: (ctx) => [validator(ctx)], + }, + test: { describe: "jest spec in src/__tests__/", files: (ctx) => [spec(ctx)] }, + }, +}; + +function names(ctx: Ctx) { + return ctx.names; +} diff --git a/src/generators/stacks/fastapi.test.ts b/src/generators/stacks/fastapi.test.ts new file mode 100644 index 0000000..6398162 --- /dev/null +++ b/src/generators/stacks/fastapi.test.ts @@ -0,0 +1,48 @@ +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { applyPatch } from "../engine"; +import { mergeRouterImport } from "./fastapi"; +import { fastapi } from "./fastapi"; +import { buildNames } from "../names"; +import { parseFields } from "../fields"; +import type { Ctx } from "../types"; + +const ctx = (name: string): Ctx => ({ + cwd: "/x", + names: buildNames(name), + fields: parseFields(undefined), + force: false, + dryRun: true, +}); + +test("router import stays sorted and wraps like ruff format", () => { + assert.equal( + mergeRouterImport("from src.routers import auth, users", "todos"), + "from src.routers import auth, todos, users", + ); + const long = mergeRouterImport( + "from src.routers import auth, comments, follows, posts, roles, todos, uploads, users, widgets", + "gadgets", + ); + assert.match(long, /^from src\.routers import \(\n {4}auth,\n/); + assert.equal( + mergeRouterImport(long, "zebras") + .split("\n") + .filter((l) => l.trim() === "zebras,").length, + 1, + ); +}); + +test("generating several resources keeps one import per router and never a dangling include", () => { + let app = + "from src.routers import auth, comments, follows, posts, roles, todos, uploads, users\n\napp.include_router(auth.router)\n"; + for (const name of ["widget", "gadget", "invoice", "widget"]) { + for (const patch of fastapi.commands.resource!.patches!(ctx(name))) { + app = applyPatch(app, patch).text; + } + } + for (const mod of ["widgets", "gadgets", "invoices"]) { + assert.equal(app.split(`${mod}.router`).length - 1, 1, `${mod} include once`); + assert.match(app, new RegExp(`\\b${mod},?\\n|, ${mod}\\b|${mod}\\n`), `${mod} imported`); + } +}); diff --git a/src/generators/stacks/fastapi.ts b/src/generators/stacks/fastapi.ts new file mode 100644 index 0000000..f2b7674 --- /dev/null +++ b/src/generators/stacks/fastapi.ts @@ -0,0 +1,396 @@ +import type { Ctx, FileSpec, Generator, Patch } from "../types"; +import type { Field, FieldType } from "../fields"; +import { labelField } from "../fields"; +import { ruffFormat } from "./shared"; + +// Stubs mirror the template's todo resource: src/routers/todos.py (`_success`, `_todo_dict`, +// `CurrentUser` / `DbSession`, owner-or-admin checks), the Todo model in src/models/models.py, +// the Todo* schemas in src/schemas/schemas.py and tests/test_todos.py. Double quotes, 100 cols, +// isort-sorted imports (ruff "I" is enforced by the template). + +const SA_TYPE: Record = { + string: "String(255)", + text: "Text", + int: "Integer", + number: "Float", + boolean: "Boolean", + date: "DateTime", + json: "JSON", +}; + +const SA_IMPORT: Record = { + string: "String", + text: "Text", + int: "Integer", + number: "Float", + boolean: "Boolean", + date: "DateTime", + json: "JSON", +}; + +const PY: Record = { + string: "str", + text: "str", + int: "int", + number: "float", + boolean: "bool", + date: "datetime", + json: "dict", +}; + +function column(f: Field): string { + const py = f.nullable ? `${PY[f.type]} | None` : PY[f.type]; + const opts = f.nullable + ? "nullable=True" + : f.type === "boolean" + ? "default=False" + : "nullable=False"; + return ` ${f.snake}: Mapped[${py}] = mapped_column(${SA_TYPE[f.type]}, ${opts})`; +} + +/** `from sqlalchemy import …` members in isort's order-by-type order: CONSTANTS, Classes, functions. */ +function sqlalchemyImports(fields: Field[]): string { + const names = new Set(["DateTime", "ForeignKey", "String"]); + for (const f of fields) names.add(SA_IMPORT[f.type]); + const constants = [...names].filter((n) => n === n.toUpperCase()).sort(); + const classes = [...names].filter((n) => n !== n.toUpperCase()).sort(); + return [...constants, ...classes, "func"].join(", "); +} + +/** Sample JSON literals for tests (double-quoted Python). */ +function sample(f: Field): { create: string; updated: string } { + switch (f.type) { + case "string": + case "text": + return { create: `"Test ${f.snake}"`, updated: `"Updated ${f.snake}"` }; + case "int": + return { create: "1", updated: "2" }; + case "number": + return { create: "1.5", updated: "2.5" }; + case "boolean": + return { create: "False", updated: "True" }; + case "date": + return { create: '"2026-01-01T00:00:00"', updated: '"2026-02-01T00:00:00"' }; + case "json": + return { create: '{"key": "value"}', updated: '{"key": "updated"}' }; + } +} + +function required(fields: Field[]): Field[] { + return fields.filter((f) => !f.nullable && f.type !== "boolean"); +} + +function model(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + return { + path: `src/models/${names.snake}.py`, + content: `import uuid +from datetime import datetime + +from sqlalchemy import ${sqlalchemyImports(fields)} +from sqlalchemy.orm import Mapped, mapped_column, relationship + +from src.database import Base +from src.models.models import User + + +class ${names.pascal}(Base): + __tablename__ = "${names.plural.snake}" + + id: Mapped[str] = mapped_column(String(36), primary_key=True, default=lambda: str(uuid.uuid4())) +${fields.map(column).join("\n")} + user_id: Mapped[str] = mapped_column(String(36), ForeignKey("users.id"), nullable=False) + created_at: Mapped[datetime] = mapped_column(DateTime, server_default=func.now()) + updated_at: Mapped[datetime] = mapped_column( + DateTime, server_default=func.now(), onupdate=func.now() + ) + + user: Mapped[User] = relationship("User") +`, + }; +} + +function schema(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const P = names.pascal; + const createField = (f: Field) => + f.nullable + ? ` ${f.snake}: ${PY[f.type]} | None = None` + : f.type === "boolean" + ? ` ${f.snake}: bool = False` + : ` ${f.snake}: ${PY[f.type]}`; + const updateField = (f: Field) => ` ${f.snake}: ${PY[f.type]} | None = None`; + const outField = (f: Field) => + f.nullable + ? ` ${f.snake}: ${PY[f.type]} | None = None` + : ` ${f.snake}: ${PY[f.type]}`; + return { + path: `src/schemas/${names.snake}.py`, + content: `from datetime import datetime + +from pydantic import BaseModel + + +class ${P}Create(BaseModel): +${fields.map(createField).join("\n")} + + +class ${P}Update(BaseModel): +${fields.map(updateField).join("\n")} + + +class ${P}Out(BaseModel): + id: str +${fields.map(outField).join("\n")} + user_id: str + created_at: datetime + updated_at: datetime + + model_config = {"from_attributes": True} +`, + }; +} + +function router(ctx: Ctx): FileSpec { + const { names } = ctx; + const P = names.pascal; + const one = names.snake; + const many = names.plural.snake; + const key = names.camel; + const keys = names.plural.camel; + const title = names.title; + const titles = names.plural.title; + const idParam = `${one}_id`; + const lookup = ` ${one} = db.query(${P}).filter(${P}.id == ${idParam}).first() + if not ${one}: + raise HTTPException(status_code=404, detail="${title} not found")`; + const ownerOrAdmin = ` if ${one}.user_id != current_user.id and current_user.role.name != "admin": + raise HTTPException(status_code=403, detail="Not authorized")`; + + return { + path: `src/routers/${many}.py`, + content: `from fastapi import APIRouter, HTTPException, status + +from src.dependencies.auth import CurrentUser, DbSession +from src.models.${one} import ${P} +from src.schemas.${one} import ${P}Create, ${P}Out, ${P}Update + +router = APIRouter(prefix="/${names.plural.kebab}", tags=["${titles}"]) + + +def _success(message: str, data=None): + return {"status": "success", "message": message, "data": data} + + +def _${one}_dict(${one}: ${P}) -> dict: + return ${P}Out.model_validate(${one}).model_dump(mode="json") + + +@router.get("") +def list_${many}(current_user: CurrentUser, db: DbSession): + ${many} = db.query(${P}).all() + return _success("${titles} retrieved", {"${keys}": [_${one}_dict(item) for item in ${many}]}) + + +@router.get("/current-user") +def current_user_${many}(current_user: CurrentUser, db: DbSession): + ${many} = db.query(${P}).filter(${P}.user_id == current_user.id).all() + return _success("User ${many} retrieved", {"${keys}": [_${one}_dict(item) for item in ${many}]}) + + +@router.post("", status_code=status.HTTP_201_CREATED) +def create_${one}(body: ${P}Create, current_user: CurrentUser, db: DbSession): + ${one} = ${P}(**body.model_dump(), user_id=current_user.id) + db.add(${one}) + db.commit() + db.refresh(${one}) + return _success("${title} created successfully", {"${key}": _${one}_dict(${one})}) + + +@router.get("/{${idParam}}") +def get_${one}(${idParam}: str, current_user: CurrentUser, db: DbSession): +${lookup} + return _success("${title} retrieved", {"${key}": _${one}_dict(${one})}) + + +@router.patch("/{${idParam}}") +def update_${one}(${idParam}: str, body: ${P}Update, current_user: CurrentUser, db: DbSession): +${lookup} +${ownerOrAdmin} + for field, value in body.model_dump(exclude_unset=True).items(): + setattr(${one}, field, value) + db.commit() + db.refresh(${one}) + return _success("${title} updated successfully", {"${key}": _${one}_dict(${one})}) + + +@router.delete("/{${idParam}}") +def delete_${one}(${idParam}: str, current_user: CurrentUser, db: DbSession): +${lookup} +${ownerOrAdmin} + db.delete(${one}) + db.commit() + return _success("${title} deleted successfully") +`, + }; +} + +function test(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const one = names.snake; + const many = names.plural.snake; + const key = names.camel; + const keys = names.plural.camel; + const label = labelField(fields); + const base = `/api/v1/${names.plural.kebab}`; + const idParam = `${one}_id`; + const payload = `{${fields.map((f) => `"${f.snake}": ${sample(f).create}`).join(", ")}}`; + const missingRequired = + required(fields).length > 0 + ? ` + def test_create_${one}_missing_required(self, client, user_token): + res = client.post("${base}", json={}, headers=auth_header(user_token)) + assert res.status_code == 422 +` + : ""; + + return { + path: `tests/test_${many}.py`, + content: `from tests.conftest import auth_header + +PAYLOAD = ${payload} + + +def _create(client, token): + return client.post("${base}", json=PAYLOAD, headers=auth_header(token)) + + +class Test${names.plural.pascal}: + def test_create_${one}(self, client, user_token): + res = _create(client, user_token) + assert res.status_code == 201 + assert res.json()["data"]["${key}"]["${label.snake}"] == ${sample(label).create} +${missingRequired} + def test_list_${many}(self, client, user_token): + _create(client, user_token) + _create(client, user_token) + res = client.get("${base}", headers=auth_header(user_token)) + assert res.status_code == 200 + assert len(res.json()["data"]["${keys}"]) == 2 + + def test_current_user_${many}(self, client, user_token, second_user_token): + _create(client, user_token) + _create(client, second_user_token) + res = client.get("${base}/current-user", headers=auth_header(user_token)) + assert res.status_code == 200 + assert len(res.json()["data"]["${keys}"]) == 1 + + def test_get_${one}(self, client, user_token): + ${idParam} = _create(client, user_token).json()["data"]["${key}"]["id"] + res = client.get(f"${base}/{${idParam}}", headers=auth_header(user_token)) + assert res.status_code == 200 + assert res.json()["data"]["${key}"]["id"] == ${idParam} + + def test_get_${one}_not_found(self, client, user_token): + res = client.get("${base}/nonexistent", headers=auth_header(user_token)) + assert res.status_code == 404 + + def test_update_${one}(self, client, user_token): + ${idParam} = _create(client, user_token).json()["data"]["${key}"]["id"] + res = client.patch( + f"${base}/{${idParam}}", + json={"${label.snake}": ${sample(label).updated}}, + headers=auth_header(user_token), + ) + assert res.status_code == 200 + assert res.json()["data"]["${key}"]["${label.snake}"] == ${sample(label).updated} + + def test_update_${one}_forbidden(self, client, user_token, second_user_token): + ${idParam} = _create(client, user_token).json()["data"]["${key}"]["id"] + res = client.patch( + f"${base}/{${idParam}}", + json={"${label.snake}": ${sample(label).updated}}, + headers=auth_header(second_user_token), + ) + assert res.status_code == 403 + + def test_delete_${one}(self, client, user_token): + ${idParam} = _create(client, user_token).json()["data"]["${key}"]["id"] + res = client.delete(f"${base}/{${idParam}}", headers=auth_header(user_token)) + assert res.status_code == 200 + assert client.get(f"${base}/{${idParam}}", headers=auth_header(user_token)).status_code == 404 + + def test_delete_${one}_forbidden(self, client, user_token, second_user_token): + ${idParam} = _create(client, user_token).json()["data"]["${key}"]["id"] + res = client.delete(f"${base}/{${idParam}}", headers=auth_header(second_user_token)) + assert res.status_code == 403 +`, + }; +} + +/** Merge `mod` into the `from src.routers import …` statement, kept sorted (ruff isort) and wrapped like ruff format. */ +export function mergeRouterImport(statement: string, mod: string): string { + const body = statement.replace(/^from src\.routers import\s*/, "").replace(/[()]/g, ""); + const names = [ + ...new Set([...body.split(",").map((n) => n.trim()), mod].filter(Boolean)), + ].sort(); + const oneLine = `from src.routers import ${names.join(", ")}`; + if (oneLine.length <= 100) return oneLine; + return `from src.routers import (\n${names.map((n) => ` ${n},`).join("\n")}\n)`; +} + +function register(ctx: Ctx): Patch[] { + const mod = ctx.names.plural.snake; + return [ + { + path: "src/app.py", + // Matches both the one-line and the parenthesised form, however many routers came before. + anchor: /^from src\.routers import (?:\([^)]*\)|.+)$/m, + where: "after", + insert: `from src.routers import ${mod}`, + skipIf: `__never__${mod}`, + replace: (statement) => mergeRouterImport(statement, mod), + describe: `import the ${mod} router`, + }, + { + path: "src/app.py", + anchor: /^app\.include_router\(.*\)$/m, + where: "after", + insert: `\napp.include_router(${mod}.router, prefix="/api/v1")`, + skipIf: `${mod}.router`, + describe: `include the ${mod} router`, + }, + ]; +} + +export const fastapi: Generator = { + id: "fastapi", + label: "FastAPI", + kind: "backend", + format: ruffFormat, + commands: { + resource: { + describe: + "SQLAlchemy model + pydantic schemas + router (included under /api/v1/) + pytest", + files: (ctx) => [model(ctx), schema(ctx), router(ctx), test(ctx)], + patches: register, + notes: (ctx) => [ + `Tables come from Base.metadata.create_all at startup — restart the dev server and the ${ctx.names.plural.snake} table appears.`, + ], + }, + model: { describe: "SQLAlchemy model in src/models/", files: (ctx) => [model(ctx)] }, + controller: { + describe: "APIRouter in src/routers/ using the {status, message, data} envelope", + files: (ctx) => [router(ctx)], + }, + dto: { + describe: "pydantic Create/Update/Out schemas in src/schemas/", + files: (ctx) => [schema(ctx)], + }, + validator: { + describe: "pydantic Create/Update/Out schemas in src/schemas/ (alias of make:dto)", + files: (ctx) => [schema(ctx)], + }, + test: { describe: "pytest module in tests/", files: (ctx) => [test(ctx)] }, + }, +}; diff --git a/src/generators/stacks/fastify.ts b/src/generators/stacks/fastify.ts new file mode 100644 index 0000000..865b68e --- /dev/null +++ b/src/generators/stacks/fastify.ts @@ -0,0 +1,425 @@ +import type { Ctx, FileSpec, Generator, Patch } from "../types"; +import type { Field, FieldType } from "../fields"; +import { oxfmt } from "./shared"; + +// The Fastify template keeps every TypeORM entity in src/entities.ts and lists them in +// src/db.ts, so "model" is a pair of patches rather than a new file. Routes are one plugin +// per resource in src/routes/.routes.ts, registered in src/app.ts. + +const COLUMN: Record = { + string: "text", + text: "text", + int: "integer", + number: "real", + boolean: "boolean", + date: "datetime", + json: "simple-json", +}; + +const TS: Record = { + string: "string", + text: "string", + int: "number", + number: "number", + boolean: "boolean", + date: "Date", + json: "Record", +}; + +/** Wire type of a field in a request body (dates travel as ISO strings). */ +const BODY: Record = { ...TS, date: "string" }; + +/** "due_date" → "Due date" for messages. */ +function human(f: Field): string { + const words = f.snake.replace(/_/g, " "); + return words.charAt(0).toUpperCase() + words.slice(1); +} + +function column(f: Field): string { + const type = f.nullable ? `${TS[f.type]} | null` : TS[f.type]; + if (f.type === "boolean") { + const opts = f.nullable ? "nullable: true" : "default: false"; + return ` @Column({ type: 'boolean', ${opts} })\n ${f.snake}: ${type}\n`; + } + const opts = f.nullable ? ", { nullable: true }" : ""; + return ` @Column('${COLUMN[f.type]}'${opts})\n ${f.snake}: ${type}\n`; +} + +function entityClass(ctx: Ctx): string { + const { names, fields } = ctx; + return `@Entity('${names.plural.pascal}') +export class ${names.pascal} { + @PrimaryGeneratedColumn('uuid') + id: string + +${fields.map(column).join("\n")} + @CreateDateColumn() + createdAt: Date + + @UpdateDateColumn() + updatedAt: Date + + @ManyToOne(() => User, { nullable: false }) + @JoinColumn({ name: 'user_id' }) + user: User +}`; +} + +function requiredGuard(f: Field): string { + const check = + f.type === "string" || f.type === "text" + ? `!${f.snake}` + : `${f.snake} === undefined || ${f.snake} === null`; + return ` if (${check}) { + return reply.status(400).send({ status: 'error', message: '${human(f)} is required' }) + }`; +} + +function createValue(f: Field): string { + if (f.type === "date") { + return f.nullable ? `${f.snake} ? new Date(${f.snake}) : null` : `new Date(${f.snake})`; + } + if (f.type === "boolean" && !f.nullable) return `${f.snake} ?? false`; + return f.nullable ? `${f.snake} ?? null` : f.snake; +} + +function updateLine(f: Field, one: string): string { + const value = + f.type === "date" + ? f.nullable + ? `${f.snake} ? new Date(${f.snake}) : null` + : `new Date(${f.snake})` + : f.snake; + return ` if (${f.snake} !== undefined) ${one}.${f.snake} = ${value}`; +} + +function routes(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const P = names.pascal; + const one = names.camel; + const many = names.plural.camel; + const title = names.title; + const plain = names.plural.kebab.replace(/-/g, " "); + const destructure = fields.map((f) => f.snake).join(", "); + const bodyType = fields + .map((f) => ` ${f.snake}?: ${BODY[f.type]}${f.nullable ? " | null" : ""}`) + .join("\n"); + const guards = fields + .filter((f) => !f.nullable && f.type !== "boolean") + .map(requiredGuard) + .join("\n"); + const assign = fields.map((f) => ` ${f.snake}: ${createValue(f)},`).join("\n"); + const updates = fields.map((f) => updateLine(f, one)).join("\n"); + + return { + path: `src/routes/${names.plural.kebab}.routes.ts`, + content: `import type { FastifyInstance } from 'fastify' + +import { authenticate } from '../auth' +import { db } from '../db' +import { ${P}, User } from '../entities' + +type ${P}Body = { +${bodyType} +} + +export default async function ${one}Routes(app: FastifyInstance) { + const ${many} = () => db.getRepository(${P}) + app.addHook('preHandler', authenticate) + + app.get('/', async (_request, reply) => { + const all = await ${many}().find({ relations: { user: true }, order: { createdAt: 'DESC' } }) + return reply.send({ status: 'success', data: { ${many}: all } }) + }) + + app.get('/current-user', async (request, reply) => { + const mine = await ${many}().find({ + where: { user: { id: request.user.id } }, + relations: { user: true }, + order: { createdAt: 'DESC' }, + }) + return reply.send({ status: 'success', data: { ${many}: mine } }) + }) + + app.post('/', async (request, reply) => { + const { ${destructure} } = (request.body ?? {}) as ${P}Body +${guards ? `${guards}\n` : ""} const user = await db.getRepository(User).findOneBy({ id: request.user.id }) + if (!user) { + return reply.status(404).send({ status: 'error', message: 'User not found' }) + } + + const ${one} = ${many}().create({ +${assign} + user, + }) + const saved = await ${many}().save(${one}) + return reply.status(201).send({ + status: 'success', + message: '${title} created successfully', + data: { ${one}: saved }, + }) + }) + + app.get('/:id', async (request, reply) => { + const { id } = request.params as { id: string } + const ${one} = await ${many}().findOne({ where: { id }, relations: { user: true } }) + if (!${one}) { + return reply.status(404).send({ status: 'error', message: '${title} not found' }) + } + return reply.send({ status: 'success', data: { ${one} } }) + }) + + app.patch('/:id', async (request, reply) => { + const { id } = request.params as { id: string } + const ${one} = await ${many}().findOne({ where: { id }, relations: { user: true } }) + if (!${one}) { + return reply.status(404).send({ status: 'error', message: '${title} not found' }) + } + if (${one}.user.id !== request.user.id) { + return reply + .status(403) + .send({ status: 'error', message: 'You can only update your own ${plain}' }) + } + const { ${destructure} } = (request.body ?? {}) as ${P}Body +${updates} + await ${many}().save(${one}) + return reply.send({ status: 'success', message: '${title} updated', data: { ${one} } }) + }) + + app.delete('/:id', async (request, reply) => { + const { id } = request.params as { id: string } + const ${one} = await ${many}().findOne({ where: { id }, relations: { user: true } }) + if (!${one}) { + return reply.status(404).send({ status: 'error', message: '${title} not found' }) + } + if (${one}.user.id !== request.user.id) { + return reply + .status(403) + .send({ status: 'error', message: 'You can only delete your own ${plain}' }) + } + await ${many}().remove(${one}) + return reply.send({ status: 'success', message: '${title} deleted successfully' }) + }) +} +`, + }; +} + +function sample(f: Field, variant: 0 | 1): string { + const label = f.snake.replace(/_/g, " "); + const values: Record = { + string: [`'Sample ${label}'`, `'Updated ${label}'`], + text: [`'Sample ${label}'`, `'Updated ${label}'`], + int: ["1", "2"], + number: ["1.5", "2.5"], + boolean: ["false", "true"], + date: ["'2026-01-01T00:00:00.000Z'", "'2026-02-01T00:00:00.000Z'"], + json: ["{ key: 'value' }", "{ key: 'updated' }"], + }; + return values[f.type][variant]; +} + +function test(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const P = names.pascal; + const one = names.camel; + const many = names.plural.camel; + const prefix = `/api/v1/${names.plural.kebab}`; + const payload = fields.map((f) => ` ${f.snake}: ${sample(f, 0)},`).join("\n"); + // Compare a scalar field after the update (dates and json round-trip differently). + const scalar = fields.find((f) => f.type !== "date" && f.type !== "json"); + const updatePayload = scalar ? `{ ${scalar.snake}: ${sample(scalar, 1)} }` : "{}"; + const updateAssert = scalar + ? `\n assert.equal(updated.json().data.${one}.${scalar.snake}, ${sample(scalar, 1)})` + : ""; + const createAssert = scalar + ? `\n assert.equal(${one}.${scalar.snake}, sample.${scalar.snake})` + : ""; + + return { + path: `src/__tests__/${names.kebab}.test.ts`, + content: `// Run with: DB_FILE=:memory: node --import tsx --test src/__tests__/${names.kebab}.test.ts +// (without DB_FILE it uses the dev db.sqlite and cleans up after itself) +import assert from 'node:assert/strict' +import { after, before, test } from 'node:test' +import Fastify from 'fastify' + +import { signToken } from '../auth' +import { db } from '../db' +import { ${P}, User } from '../entities' +import ${one}Routes from '../routes/${names.plural.kebab}.routes' + +const app = Fastify() +const stamp = Date.now() +let token = '' +let userId = '' + +before(async () => { + if (!db.isInitialized) await db.initialize() + const users = db.getRepository(User) + const user = await users.save( + users.create({ + username: \`${names.kebab}-tester-\${stamp}\`, + first_name: '${P}', + last_name: 'Tester', + email: \`${names.kebab}-tester-\${stamp}@example.com\`, + password: 'not-a-real-hash', + }), + ) + userId = user.id + token = signToken(user) + await app.register(${one}Routes, { prefix: '${prefix}' }) + await app.ready() +}) + +after(async () => { + await app.close() + await db + .getRepository(${P}) + .createQueryBuilder() + .delete() + .where('user_id = :userId', { userId }) + .execute() + await db.getRepository(User).delete({ id: userId }) + await db.destroy() +}) + +test('${many}: create, list, read, update, delete', async () => { + const headers = { authorization: \`Bearer \${token}\` } + const sample = { +${payload} + } + + const created = await app.inject({ method: 'POST', url: '${prefix}', headers, payload: sample }) + assert.equal(created.statusCode, 201) + const { ${one} } = created.json().data + assert.ok(${one}.id)${createAssert} + + const listed = await app.inject({ method: 'GET', url: '${prefix}/current-user', headers }) + assert.equal(listed.statusCode, 200) + assert.ok(listed.json().data.${many}.some((item: { id: string }) => item.id === ${one}.id)) + + const fetched = await app.inject({ method: 'GET', url: \`${prefix}/\${${one}.id}\`, headers }) + assert.equal(fetched.statusCode, 200) + assert.equal(fetched.json().data.${one}.id, ${one}.id) + + const updated = await app.inject({ + method: 'PATCH', + url: \`${prefix}/\${${one}.id}\`, + headers, + payload: ${updatePayload}, + }) + assert.equal(updated.statusCode, 200)${updateAssert} + + const removed = await app.inject({ method: 'DELETE', url: \`${prefix}/\${${one}.id}\`, headers }) + assert.equal(removed.statusCode, 200) + + const gone = await app.inject({ method: 'GET', url: \`${prefix}/\${${one}.id}\`, headers }) + assert.equal(gone.statusCode, 404) +}) + +test('${many}: rejects requests without a Bearer token', async () => { + const response = await app.inject({ method: 'GET', url: '${prefix}' }) + assert.equal(response.statusCode, 401) +}) +`, + }; +} + +function registerEntity(ctx: Ctx): Patch[] { + const { names } = ctx; + const P = names.pascal; + return [ + { + path: "src/entities.ts", + // last top-level closing brace → append the class at the end of the file + anchor: /^}$/m, + where: "after", + insert: `\n\n${entityClass(ctx)}`, + skipIf: `export class ${P} {`, + describe: `add the ${P} entity`, + }, + { + path: "src/db.ts", + anchor: /^import \{[^}]*\} from '\.\/entities'$/m, + where: "after", + insert: `\nimport { ${P} } from './entities'`, + skipIf: `{ ${P} }`, + describe: `import ${P} into the data source`, + }, + { + path: "src/db.ts", + anchor: "entities: [", + where: "after", + insert: `${P}, `, + skipIf: `${P},`, + describe: `register ${P} in the DataSource entities`, + }, + ]; +} + +function registerRoutes(ctx: Ctx): Patch[] { + const { names } = ctx; + const plugin = `${names.camel}Routes`; + const file = `./routes/${names.plural.kebab}.routes`; + return [ + { + path: "src/app.ts", + anchor: /^import \w+ from '\.\/routes\/[\w.-]+'$/m, + where: "after", + insert: `\nimport ${plugin} from '${file}'`, + skipIf: `${file}'`, + describe: `import the ${names.plural.kebab} routes`, + }, + { + path: "src/app.ts", + anchor: /^ *await app\.register\(\w+, \{ prefix: `\$\{prefix\}\/[\w-]+` \}\)$/m, + where: "after", + insert: `\n await app.register(${plugin}, { prefix: \`\${prefix}/${names.plural.kebab}\` })`, + skipIf: `\${prefix}/${names.plural.kebab}\``, + describe: `register /${names.plural.kebab}`, + }, + ]; +} + +export const fastify: Generator = { + id: "fastify", + label: "Fastify", + kind: "backend", + format: oxfmt, + commands: { + resource: { + describe: + "entity (appended to src/entities.ts) + route plugin (mounted under /api/v1/) + node:test spec", + files: (ctx) => [routes(ctx), test(ctx)], + patches: (ctx) => [...registerEntity(ctx), ...registerRoutes(ctx)], + notes: (ctx) => [ + `TypeORM synchronize is on — restart the dev server and the ${ctx.names.plural.pascal} table appears.`, + `Run the test with: DB_FILE=:memory: node --import tsx --test src/__tests__/${ctx.names.kebab}.test.ts`, + ], + }, + model: { + describe: "TypeORM entity appended to src/entities.ts and registered in src/db.ts", + patches: registerEntity, + notes: (ctx) => [ + `Import { ${ctx.names.pascal} } from '../entities' wherever you need the repository.`, + ], + }, + controller: { + describe: + "route plugin in src/routes/ using the {status, message, data} envelope (registered in src/app.ts)", + files: (ctx) => [routes(ctx)], + patches: registerRoutes, + notes: (ctx) => [ + `The plugin expects a ${ctx.names.pascal} entity — run make:model ${ctx.names.pascal} if it does not exist yet.`, + ], + }, + test: { + describe: "node:test spec in src/__tests__/ that drives the routes through app.inject", + files: (ctx) => [test(ctx)], + notes: (ctx) => [ + `Run with: DB_FILE=:memory: node --import tsx --test src/__tests__/${ctx.names.kebab}.test.ts`, + ], + }, + }, +}; diff --git a/src/generators/stacks/flutter.ts b/src/generators/stacks/flutter.ts new file mode 100644 index 0000000..c705436 --- /dev/null +++ b/src/generators/stacks/flutter.ts @@ -0,0 +1,577 @@ +import type { Ctx, FileSpec, Generator, Patch } from "../types"; +import type { Field, FieldType } from "../fields"; +import { labelField } from "../fields"; + +/** Fields DSL → Dart (documented on the API client; screens keep the template's `Map` items). */ +const DART: Record = { + string: "String", + text: "String", + int: "int", + number: "double", + boolean: "bool", + date: "String", + json: "Map", +}; + +function dartType(f: Field): string { + return `${DART[f.type]}${f.nullable ? "?" : ""}`; +} + +function title(f: Field): string { + return f.pascal.replace(/([a-z0-9])([A-Z])/g, "$1 $2"); +} + +function label(f: Field): string { + if (f.type === "json") return `${title(f)} (JSON)`; + return f.nullable && f.type !== "boolean" ? `${title(f)} (optional)` : title(f); +} + +function indent(lines: string[], n: number): string[] { + const pad = " ".repeat(n); + return lines.map((l) => (l ? pad + l : l)); +} + +function needsConvert(fields: Field[]): boolean { + return fields.some((f) => f.type === "json"); +} + +/** Dart expression that turns the form state into the JSON value sent to the API. */ +function dartValue(f: Field, prefix: string): string { + const text = `${prefix}${f.camel}Ctrl.text.trim()`; + switch (f.type) { + case "boolean": + return `${prefix}${f.camel}`; + case "int": + return f.nullable ? `int.tryParse(${text})` : `int.tryParse(${text}) ?? 0`; + case "number": + return f.nullable ? `double.tryParse(${text})` : `double.tryParse(${text}) ?? 0`; + case "json": + return f.nullable + ? `${text}.isEmpty ? null : jsonDecode(${text})` + : `${text}.isEmpty ? {} : jsonDecode(${text})`; + default: + return f.nullable ? `${text}.isEmpty ? null : ${text}` : text; + } +} + +/** Interpolation used when showing a field from an item map. */ +function dartDisplay(f: Field): string { + const v = `item['${f.camel}']`; + if (f.type === "boolean") return `\${${v} == true || ${v} == 1 ? 'Yes' : 'No'}`; + return `\${${v} ?? ''}`; +} + +/** One form field; `prefix` is "" for dialog locals and "_" for State fields. */ +function input(f: Field, prefix: string, setter: string, autofocus: boolean): string[] { + if (f.type === "boolean") { + return [ + "SwitchListTile(", + ` title: const Text('${label(f)}'),`, + ` value: ${prefix}${f.camel},`, + ` onChanged: (v) => ${setter}(() => ${prefix}${f.camel} = v),`, + "),", + ]; + } + const lines = ["TextField(", ` controller: ${prefix}${f.camel}Ctrl,`]; + if (autofocus) lines.push(" autofocus: true,"); + if (f.type === "text" || f.type === "json") lines.push(" maxLines: 3,"); + if (f.type === "int") lines.push(" keyboardType: TextInputType.number,"); + if (f.type === "number") { + lines.push( + " keyboardType: const TextInputType.numberWithOptions(", + " decimal: true,", + " ),", + ); + } + lines.push(` decoration: const InputDecoration(labelText: '${label(f)}'),`, "),"); + return lines; +} + +function api(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const P = names.pascal; + const route = names.plural.kebab; + const payload = fields.map((f) => `${f.camel}: ${dartType(f)}`).join(", "); + return { + path: `lib/apis/${names.snake}_api.dart`, + content: `import 'package:dio/dio.dart'; + +import 'http.dart'; + +/// \`/${route}\` — payload: \`{${payload}}\`. +class ${P}Api { + Future> get${names.plural.pascal}() => http.get('/${route}'); + + Future> get${P}ById(String id) => + http.get('/${route}/\${id}'); + + Future> create${P}(Map data) => + http.post('/${route}', data: data); + + Future> update${P}(String id, Map data) => + http.patch('/${route}/\${id}', data: data); + + Future> delete${P}(String id) => + http.delete('/${route}/\${id}'); +} + +final ${names.camel}Api = ${P}Api(); +`, + }; +} + +function createDialog(ctx: Ctx): string[] { + const { names, fields } = ctx; + const hasBool = fields.some((f) => f.type === "boolean"); + const inputs = fields.flatMap((f, i) => input(f, "", "setDialogState", i === 0)); + const alert = [ + "AlertDialog(", + ` title: const Text('New ${names.title.toLowerCase()}'),`, + " content: Column(", + " mainAxisSize: MainAxisSize.min,", + " children: [", + ...indent(inputs, 6), + " ],", + " ),", + " actions: [", + " TextButton(", + " onPressed: () => Navigator.pop(ctx, false),", + " child: const Text('Cancel'),", + " ),", + " FilledButton(", + " onPressed: () => Navigator.pop(ctx, true),", + " child: const Text('Add'),", + " ),", + " ],", + "),", + ]; + const builder = hasBool + ? [ + "builder: (ctx) => StatefulBuilder(", + ` builder: (ctx, setDialogState) => ${alert[0]}`, + ...indent(alert.slice(1), 2), + "),", + ] + : [`builder: (ctx) => ${alert[0]}`, ...alert.slice(1)]; + return [ + "final ok = await showDialog(", + " context: context,", + ...indent(builder, 2), + ");", + ]; +} + +function listScreen(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const P = names.pascal; + const Pp = names.plural.pascal; + const items = `_${names.plural.camel}`; + const lbl = labelField(fields); + const others = fields.filter((f) => f !== lbl); + const locals = fields.map((f) => + f.type === "boolean" + ? ` var ${f.camel} = false;` + : ` final ${f.camel}Ctrl = TextEditingController();`, + ); + const guard = + lbl.type === "string" || lbl.type === "text" + ? ` if (ok != true || ${lbl.camel}Ctrl.text.trim().isEmpty) return;` + : " if (ok != true) return;"; + const payload = fields.map((f) => ` '${f.camel}': ${dartValue(f, "")},`); + const subtitle = others.map((f) => `Text('${title(f)}: ${dartDisplay(f)}'),`); + return { + path: `lib/screens/${names.plural.snake}_screen.dart`, + content: `${needsConvert(fields) ? "import 'dart:convert';\n\n" : ""}import 'package:flutter/material.dart'; + +import '../apis/http.dart'; +import '../apis/${names.snake}_api.dart'; +import '../widgets/app_drawer.dart'; +import '${names.snake}_detail_screen.dart'; + +class ${Pp}Screen extends StatefulWidget { + const ${Pp}Screen({super.key}); + + @override + State<${Pp}Screen> createState() => _${Pp}ScreenState(); +} + +class _${Pp}ScreenState extends State<${Pp}Screen> { + List> ${items} = []; + bool _loading = true; + + @override + void initState() { + super.initState(); + _load(); + } + + Future _load() async { + try { + final res = await ${names.camel}Api.get${Pp}(); + final list = (res.data['data'] as Map)['${names.plural.camel}'] as List? ?? []; + if (!mounted) return; + setState(() { + ${items} = list.map((e) => (e as Map).cast()).toList(); + _loading = false; + }); + } catch (e) { + if (!mounted) return; + setState(() => _loading = false); + _snack(apiMessage(e)); + } + } + + void _snack(String msg) { + ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text(msg))); + } + + Future _add${P}() async { +${locals.join("\n")} +${indent(createDialog(ctx), 4).join("\n")} +${guard} + try { + await ${names.camel}Api.create${P}({ +${payload.join("\n")} + }); + await _load(); + } catch (e) { + if (mounted) _snack(apiMessage(e)); + } + } + + Future _delete(Map item) async { + try { + await ${names.camel}Api.delete${P}('\${item['id']}'); + await _load(); + } catch (e) { + if (mounted) _snack(apiMessage(e)); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: const Text('${names.plural.title}')), + drawer: const AppDrawer(), + floatingActionButton: FloatingActionButton( + onPressed: _add${P}, + child: const Icon(Icons.add), + ), + body: _loading + ? const Center(child: CircularProgressIndicator()) + : RefreshIndicator( + onRefresh: _load, + child: ${items}.isEmpty + ? ListView( + children: const [ + Padding( + padding: EdgeInsets.all(32), + child: Center( + child: Text('No ${names.plural.title.toLowerCase()} yet — add one!'), + ), + ), + ], + ) + : ListView.builder( + itemCount: ${items}.length, + itemBuilder: (context, i) { + final item = ${items}[i]; + final author = + ((item['user'] as Map?)?['username'] ?? '') + as String; + return ListTile( + title: Text('${dartDisplay(lbl)}'), + subtitle: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ +${indent(subtitle, 30).join("\n")}${subtitle.length > 0 ? "\n" : ""} if (author.isNotEmpty) + Text( + '@$author', + style: Theme.of(context).textTheme.bodySmall, + ), + ], + ), + trailing: IconButton( + icon: const Icon(Icons.delete_outline), + onPressed: () => _delete(item), + ), + onTap: () async { + await Navigator.push( + context, + MaterialPageRoute( + builder: (_) => + ${P}DetailScreen(id: '\${item['id']}'), + ), + ); + await _load(); + }, + ); + }, + ), + ), + ); + } +} +`, + }; +} + +function detailScreen(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const P = names.pascal; + const textFields = fields.filter((f) => f.type !== "boolean"); + const boolFields = fields.filter((f) => f.type === "boolean"); + const state = [ + ...textFields.map((f) => ` final _${f.camel}Ctrl = TextEditingController();`), + " bool _loading = true;", + ...boolFields.map((f) => ` bool _${f.camel} = false;`), + ]; + const dispose = textFields.map((f) => ` _${f.camel}Ctrl.dispose();`); + const load = fields.map((f) => { + const v = `item['${f.camel}']`; + if (f.type === "boolean") return ` _${f.camel} = ${v} == true || ${v} == 1;`; + if (f.type === "json") { + return ` _${f.camel}Ctrl.text = ${v} == null ? '' : jsonEncode(${v});`; + } + return ` _${f.camel}Ctrl.text = '\${${v} ?? ''}';`; + }); + const payload = fields.map((f) => ` '${f.camel}': ${dartValue(f, "_")},`); + const inputs = fields.flatMap((f, i) => [ + ...(i > 0 ? ["const SizedBox(height: 12),"] : []), + ...input(f, "_", "setState", false), + ]); + return { + path: `lib/screens/${names.snake}_detail_screen.dart`, + content: `${needsConvert(fields) ? "import 'dart:convert';\n\n" : ""}import 'package:flutter/material.dart'; + +import '../apis/http.dart'; +import '../apis/${names.snake}_api.dart'; + +class ${P}DetailScreen extends StatefulWidget { + const ${P}DetailScreen({super.key, required this.id}); + + final String id; + + @override + State<${P}DetailScreen> createState() => _${P}DetailScreenState(); +} + +class _${P}DetailScreenState extends State<${P}DetailScreen> { +${state.join("\n")} + + @override + void initState() { + super.initState(); + _load(); + } + + @override + void dispose() { +${dispose.join("\n")}${dispose.length > 0 ? "\n" : ""} super.dispose(); + } + + Future _load() async { + try { + final res = await ${names.camel}Api.get${P}ById(widget.id); + final item = ((res.data['data'] as Map)['${names.camel}'] as Map) + .cast(); + if (!mounted) return; + setState(() { +${load.join("\n")} + _loading = false; + }); + } catch (e) { + if (!mounted) return; + setState(() => _loading = false); + _snack(apiMessage(e)); + } + } + + void _snack(String msg) { + ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text(msg))); + } + + Future _save() async { + try { + await ${names.camel}Api.update${P}(widget.id, { +${payload.join("\n")} + }); + if (!mounted) return; + _snack('${names.title} saved'); + } catch (e) { + if (mounted) _snack(apiMessage(e)); + } + } + + Future _delete() async { + try { + await ${names.camel}Api.delete${P}(widget.id); + if (!mounted) return; + Navigator.pop(context); + } catch (e) { + if (mounted) _snack(apiMessage(e)); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('${names.title}'), + actions: [ + IconButton( + icon: const Icon(Icons.delete_outline), + onPressed: _delete, + ), + ], + ), + body: _loading + ? const Center(child: CircularProgressIndicator()) + : ListView( + padding: const EdgeInsets.all(16), + children: [ +${indent(inputs, 16).join("\n")} + const SizedBox(height: 8), + FilledButton(onPressed: _save, child: const Text('Save')), + ], + ), + ); + } +} +`, + }; +} + +function store(ctx: Ctx): FileSpec { + const { names } = ctx; + const P = names.pascal; + return { + path: `lib/stores/${names.snake}_store.dart`, + content: `import 'package:flutter/foundation.dart'; + +import '../apis/http.dart'; +import '../apis/${names.snake}_api.dart'; + +/// App-wide ${names.title} list (same singleton ChangeNotifier shape as AuthStore). +class ${P}Store extends ChangeNotifier { + ${P}Store._(); + + static final ${P}Store instance = ${P}Store._(); + + List> items = []; + bool loading = false; + String? error; + + Future fetchAll() async { + loading = true; + error = null; + notifyListeners(); + try { + final res = await ${names.camel}Api.get${names.plural.pascal}(); + final list = (res.data['data'] as Map)['${names.plural.camel}'] as List? ?? []; + items = list.map((e) => (e as Map).cast()).toList(); + } catch (e) { + error = apiMessage(e); + } finally { + loading = false; + notifyListeners(); + } + } + + Future remove(String id) async { + await ${names.camel}Api.delete${P}(id); + items = items.where((item) => '\${item['id']}' != id).toList(); + notifyListeners(); + } +} +`, + }; +} + +function component(ctx: Ctx): FileSpec { + const { names } = ctx; + return { + path: `lib/widgets/${names.snake}.dart`, + content: `import 'package:flutter/material.dart'; + +/// ${names.title} — reusable widget stub, edit freely. +class ${names.pascal} extends StatelessWidget { + const ${names.pascal}({super.key}); + + @override + Widget build(BuildContext context) { + return const Card( + child: Padding( + padding: EdgeInsets.all(16), + child: Text('${names.title}'), + ), + ); + } +} +`, + }; +} + +function routePatches(ctx: Ctx): Patch[] { + const { names } = ctx; + const screen = `${names.plural.pascal}Screen`; + const file = `screens/${names.plural.snake}_screen.dart`; + return [ + { + path: "lib/main.dart", + anchor: /^import 'screens\/\w+\.dart';$/m, + where: "after", + insert: `\nimport '${file}';`, + skipIf: file, + describe: `import ${screen}`, + }, + { + path: "lib/main.dart", + anchor: /^\s*'\/[\w-]+': \(_\) => const \w+\(\),$/m, + where: "after", + insert: `\n '/${names.plural.kebab}': (_) => const ${screen}(),`, + skipIf: `'/${names.plural.kebab}':`, + describe: `register the /${names.plural.kebab} route`, + }, + ]; +} + +function drawerNote(ctx: Ctx): string { + const { names } = ctx; + return `Add a drawer entry in lib/widgets/app_drawer.dart: _item(context, Icons.widgets_outlined, '${names.plural.title}', '/${names.plural.kebab}')`; +} + +export const flutter: Generator = { + id: "flutter", + label: "Flutter", + kind: "mobile", + format: (files) => ({ bin: "dart", args: ["format", ...files], quiet: true }), + commands: { + resource: { + describe: + "Dio API client + list screen (create dialog, delete) + detail screen, route added to lib/main.dart", + files: (ctx) => [api(ctx), listScreen(ctx), detailScreen(ctx)], + patches: routePatches, + notes: (ctx) => [drawerNote(ctx)], + }, + api: { + describe: "Dio API client class in lib/apis/ (import it directly — no registry)", + files: (ctx) => [api(ctx)], + }, + page: { + describe: "list + detail screens in lib/screens/ (+ route in lib/main.dart)", + files: (ctx) => [listScreen(ctx), detailScreen(ctx)], + patches: routePatches, + notes: (ctx) => [drawerNote(ctx)], + }, + store: { + describe: "singleton ChangeNotifier store in lib/stores/", + files: (ctx) => [store(ctx)], + }, + component: { + describe: "StatelessWidget stub in lib/widgets/", + files: (ctx) => [component(ctx)], + }, + }, +}; diff --git a/src/generators/stacks/index.ts b/src/generators/stacks/index.ts new file mode 100644 index 0000000..cca0043 --- /dev/null +++ b/src/generators/stacks/index.ts @@ -0,0 +1,49 @@ +import type { Generator } from "../types"; +import type { StackId } from "../detect"; +import { express } from "./express"; +import { fastify } from "./fastify"; +import { nest } from "./nest"; +import { adonis } from "./adonis"; +import { django } from "./django"; +import { fastapi } from "./fastapi"; +import { laravel } from "./laravel"; +import { tallstack } from "./tallstack"; +import { rails } from "./rails"; +import { spring } from "./spring"; +import { aspnet } from "./aspnet"; +import { drogon } from "./drogon"; +import { axum } from "./axum"; +import { react } from "./react"; +import { next } from "./next"; +import { vue } from "./vue"; +import { nuxt } from "./nuxt"; +import { svelte } from "./svelte"; +import { solid } from "./solid"; +import { angular } from "./angular"; +import { flutter } from "./flutter"; +import { reactnative } from "./reactnative"; + +export const generators: Record = { + express, + fastify, + nest, + adonis, + django, + fastapi, + laravel, + tallstack, + rails, + spring, + aspnet, + drogon, + axum, + react, + next, + vue, + nuxt, + svelte, + solid, + angular, + flutter, + reactnative, +}; diff --git a/src/generators/stacks/laravel.ts b/src/generators/stacks/laravel.ts new file mode 100644 index 0000000..3f5003d --- /dev/null +++ b/src/generators/stacks/laravel.ts @@ -0,0 +1,561 @@ +import fs from "node:fs"; +import path from "node:path"; +import type { Ctx, FileSpec, Generator, NativeCall, Patch } from "../types"; +import type { Field, FieldType } from "../fields"; +import { labelField } from "../fields"; +import { pint } from "./shared"; + +/* + * Stubs mirror CLIuno-Laravel-template's todo resource: Eloquent model with $fillable/casts(), + * anonymous-class migration, inline $request->validate() in the controller, explicit routes in + * routes/api.php inside the auth:sanctum group, {data: {|}} responses with + * snake_case attributes, and a hasMany relation on User (the todo controller uses + * $request->user()->todos()). Pint (laravel preset) formats everything written. + */ + +const COLUMN: Record = { + string: "string", + text: "text", + int: "integer", + number: "float", + boolean: "boolean", + date: "dateTime", + json: "json", +}; + +const CAST: Record = { + string: null, + text: null, + int: "integer", + number: "float", + boolean: "boolean", + date: "datetime", + json: "array", +}; + +const RULES: Record = { + string: ["string", "max:255"], + text: ["string"], + int: ["integer"], + number: ["numeric"], + boolean: ["boolean"], + date: ["date"], + json: ["array"], +}; + +/** PHP literal for a sample value (tests). */ +const SAMPLE: Record string> = { + string: (f) => `'Sample ${f.snake.replace(/_/g, " ")}'`, + text: (f) => `'Sample ${f.snake.replace(/_/g, " ")} text'`, + int: () => "1", + number: () => "1.5", + boolean: () => "false", + date: () => "'2026-01-01 00:00:00'", + json: () => "['key' => 'value']", +}; + +const UPDATED: Record string> = { + string: (f) => `'Updated ${f.snake.replace(/_/g, " ")}'`, + text: (f) => `'Updated ${f.snake.replace(/_/g, " ")} text'`, + int: () => "2", + number: () => "2.5", + boolean: () => "true", + date: () => "'2026-02-02 00:00:00'", + json: () => "['key' => 'updated']", +}; + +const phpList = (items: string[]) => items.map((i) => `'${i}'`).join(", "); + +/** Sort `use` statements the way Pint's ordered_imports (alpha) does. */ +export function phpUses(classes: string[]): string { + const key = (c: string) => c.replace(/\\/g, " ").toLowerCase(); + return [...new Set(classes)] + .sort((a, b) => (key(a) < key(b) ? -1 : key(a) > key(b) ? 1 : 0)) + .map((c) => `use ${c};`) + .join("\n"); +} + +function storeRules(f: Field): string { + const rules = f.type === "boolean" ? ["sometimes"] : f.nullable ? ["nullable"] : ["required"]; + return ` '${f.snake}' => [${phpList([...rules, ...RULES[f.type]])}],`; +} + +function updateRules(f: Field): string { + const rules = f.nullable ? ["sometimes", "nullable"] : ["sometimes"]; + return ` '${f.snake}' => [${phpList([...rules, ...RULES[f.type]])}],`; +} + +function column(f: Field): string { + let line = ` $table->${COLUMN[f.type]}('${f.snake}')`; + if (f.type === "boolean") line += "->default(false)"; + else if (f.nullable) line += "->nullable()"; + return `${line};`; +} + +function utcStamp(): string { + const d = new Date(); + const p = (n: number) => String(n).padStart(2, "0"); + return `${d.getUTCFullYear()}_${p(d.getUTCMonth() + 1)}_${p(d.getUTCDate())}_${p(d.getUTCHours())}${p(d.getUTCMinutes())}${p(d.getUTCSeconds())}`; +} + +/** Reuse an existing create__table migration so a second run is a no-op. */ +export function migrationPath(ctx: Ctx): string { + const suffix = `create_${ctx.names.plural.snake}_table.php`; + try { + const existing = fs + .readdirSync(path.join(ctx.cwd, "database", "migrations")) + .find((f) => f.endsWith(`_${suffix}`)); + if (existing) return `database/migrations/${existing}`; + } catch { + // no migrations dir (dry-run outside a checkout) — fall through to a fresh name + } + return `database/migrations/${utcStamp()}_${suffix}`; +} + +export function model(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const casts = fields.filter((f) => CAST[f.type]); + const castsBlock = casts.length + ? ` + protected function casts(): array + { + return [ +${casts.map((f) => ` '${f.snake}' => '${CAST[f.type]}',`).join("\n")} + ]; + } +` + : ""; + return { + path: `app/Models/${names.pascal}.php`, + content: ` ` '${f.snake}',`).join("\n")} + 'user_id', + ]; +${castsBlock} + public function user(): BelongsTo + { + return $this->belongsTo(User::class); + } +} +`, + }; +} + +export function migration(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + return { + path: migrationPath(ctx), + content: `id(); +${fields.map(column).join("\n")} + $table->foreignId('user_id')->constrained()->cascadeOnDelete(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('${names.plural.snake}'); + } +}; +`, + }; +} + +export function controller(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const P = names.pascal; + const one = names.camel; + const many = names.plural.camel; + const title = names.title; + return { + path: `app/Http/Controllers/${P}Controller.php`, + content: `latest()->get(); + + return response()->json(['data' => ['${many}' => $${many}]]); + } + + public function show(int $id): JsonResponse + { + $${one} = ${P}::with('user')->findOrFail($id); + + return response()->json(['data' => ['${one}' => $${one}]]); + } + + public function store(Request $request): JsonResponse + { + $validated = $request->validate([ +${fields.map(storeRules).join("\n")} + ]); + + $${one} = $request->user()->${many}()->create($validated); + + return response()->json(['data' => ['${one}' => $${one}->load('user')]], 201); + } + + public function update(Request $request, int $id): JsonResponse + { + $${one} = ${P}::findOrFail($id); + + if ($${one}->user_id !== $request->user()->id) { + return response()->json(['message' => 'Unauthorized'], 403); + } + + $validated = $request->validate([ +${fields.map(updateRules).join("\n")} + ]); + + $${one}->update($validated); + + return response()->json(['data' => ['${one}' => $${one}->fresh()->load('user')]]); + } + + public function destroy(Request $request, int $id): JsonResponse + { + $${one} = ${P}::findOrFail($id); + + if ($${one}->user_id !== $request->user()->id) { + return response()->json(['message' => 'Unauthorized'], 403); + } + + $${one}->delete(); + + return response()->json(['message' => '${title} deleted successfully']); + } + + public function currentUser(Request $request): JsonResponse + { + $${many} = $request->user()->${many}()->with('user')->latest()->get(); + + return response()->json(['data' => ['${many}' => $${many}]]); + } +} +`, + }; +} + +/** Form request (only used as the stub fallback for make:request — the controllers validate inline like the template). */ +export function formRequest(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + return { + path: `app/Http/Requests/Store${names.pascal}Request.php`, + content: `> + */ + public function rules(): array + { + return [ +${fields.map(storeRules).join("\n")} + ]; + } +} +`, + }; +} + +/** PHP array literal with one sample value per field, indented for a test body. */ +export function samplePayload(fields: Field[], indent: string): string { + return fields.map((f) => `${indent}'${f.snake}' => ${SAMPLE[f.type](f)},`).join("\n"); +} + +export function labelInfo(fields: Field[]) { + const label = labelField(fields); + const jsonAssertable = ["string", "text", "int", "number", "boolean"].includes(label.type); + const dbAssertable = ["string", "text", "int"].includes(label.type); + return { + label, + sample: SAMPLE[label.type](label), + updated: UPDATED[label.type](label), + jsonAssertable, + dbAssertable, + }; +} + +/** Pest feature test (CLIuno-Laravel-template uses Pest with RefreshDatabase bound to tests/Feature). */ +export function pestTest(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const P = names.pascal; + const one = names.camel; + const many = names.plural.camel; + const url = `/api/v1/${names.plural.kebab}`; + const table = names.plural.snake; + const { label, sample, updated, jsonAssertable, dbAssertable } = labelInfo(fields); + const human = names.title.toLowerCase(); + const humans = names.plural.title.toLowerCase(); + const createdAssert = jsonAssertable + ? ` + ->assertJsonPath('data.${one}.${label.snake}', ${sample})` + : ""; + const createdDb = dbAssertable + ? ` + $this->assertDatabaseHas('${table}', ['${label.snake}' => ${sample}, 'user_id' => $this->user->id]);` + : ` + $this->assertDatabaseCount('${table}', 1);`; + const updatedAssert = jsonAssertable + ? ` + ->assertJsonPath('data.${one}.${label.snake}', ${updated})` + : ""; + + return { + path: `tests/Feature/${P}Test.php`, + content: `user = User::factory()->create(); + $this->payload = [ +${samplePayload(fields, " ")} + ]; +}); + +test('${humans} require authentication', function () { + $this->getJson('${url}')->assertUnauthorized(); +}); + +test('${humans} can be listed', function () { + ${P}::create([...$this->payload, 'user_id' => $this->user->id]); + + Sanctum::actingAs($this->user); + + $this->getJson('${url}') + ->assertOk() + ->assertJsonCount(1, 'data.${many}'); +}); + +test('current user ${humans} can be listed', function () { + ${P}::create([...$this->payload, 'user_id' => $this->user->id]); + ${P}::create([...$this->payload, 'user_id' => User::factory()->create()->id]); + + Sanctum::actingAs($this->user); + + $this->getJson('${url}/current-user') + ->assertOk() + ->assertJsonCount(1, 'data.${many}'); +}); + +test('a ${human} can be created', function () { + Sanctum::actingAs($this->user); + + $this->postJson('${url}', $this->payload) + ->assertCreated()${createdAssert}; +${createdDb} +}); + +test('a ${human} can be shown', function () { + $${one} = ${P}::create([...$this->payload, 'user_id' => $this->user->id]); + + Sanctum::actingAs($this->user); + + $this->getJson('${url}/'.$${one}->id) + ->assertOk() + ->assertJsonPath('data.${one}.id', $${one}->id); +}); + +test('an own ${human} can be updated', function () { + $${one} = ${P}::create([...$this->payload, 'user_id' => $this->user->id]); + + Sanctum::actingAs($this->user); + + $this->patchJson('${url}/'.$${one}->id, ['${label.snake}' => ${updated}]) + ->assertOk()${updatedAssert}; +}); + +test('a ${human} of another user cannot be updated', function () { + $${one} = ${P}::create([...$this->payload, 'user_id' => User::factory()->create()->id]); + + Sanctum::actingAs($this->user); + + $this->patchJson('${url}/'.$${one}->id, ['${label.snake}' => ${updated}]) + ->assertForbidden(); +}); + +test('an own ${human} can be deleted', function () { + $${one} = ${P}::create([...$this->payload, 'user_id' => $this->user->id]); + + Sanctum::actingAs($this->user); + + $this->deleteJson('${url}/'.$${one}->id) + ->assertOk(); + + $this->assertDatabaseMissing('${table}', ['id' => $${one}->id]); +}); +`, + }; +} + +/** Insert `use App\Http\Controllers\

Controller;` where Pint's alpha import order wants it. */ +function useControllerPatch(ctx: Ctx): Patch { + const { names } = ctx; + const line = `use App\\Http\\Controllers\\${names.pascal}Controller;`; + const mine = `${names.pascal}Controller`.toLowerCase(); + let anchor: string | RegExp = /^use App\\Http\\Controllers\\[\w\\]+;$/m; + let where: "before" | "after" = "after"; + try { + const source = fs.readFileSync(path.join(ctx.cwd, "routes", "api.php"), "utf8"); + const re = /^use App\\Http\\Controllers\\([\w\\]+);$/gm; + let m: RegExpExecArray | null; + while ((m = re.exec(source)) !== null) { + const key = (m[1] as string).replace(/\\/g, " ").toLowerCase(); + if (key > mine) { + anchor = m[0]; + where = "before"; + break; + } + } + } catch { + // routes/api.php unreadable — append after the last controller import instead + } + return { + path: "routes/api.php", + anchor, + where, + insert: where === "before" ? `${line}\n` : `\n${line}`, + skipIf: line, + describe: `import ${names.pascal}Controller`, + }; +} + +export function apiRoutePatches(ctx: Ctx): Patch[] { + const { names } = ctx; + const P = names.pascal; + const kp = names.plural.kebab; + return [ + useControllerPatch(ctx), + { + path: "routes/api.php", + anchor: "Route::middleware(['auth:sanctum'])->group(function () {", + where: "after", + insert: ` + // ${names.plural.title} + Route::get('/${kp}/current-user', [${P}Controller::class, 'currentUser']); + Route::get('/${kp}', [${P}Controller::class, 'index']); + Route::get('/${kp}/{id}', [${P}Controller::class, 'show']); + Route::post('/${kp}', [${P}Controller::class, 'store']); + Route::patch('/${kp}/{id}', [${P}Controller::class, 'update']); + Route::delete('/${kp}/{id}', [${P}Controller::class, 'destroy']); +`, + skipIf: `Route::get('/${kp}', [${P}Controller::class, 'index']);`, + describe: `register /${kp} routes in the auth:sanctum group`, + }, + ]; +} + +/** hasMany relation on User, after the last single-line hasMany (todos/posts/comments). */ +export function userRelationPatch(ctx: Ctx): Patch { + const { names } = ctx; + const many = names.plural.camel; + return { + path: "app/Models/User.php", + anchor: / public function \w+\(\): HasMany\n \{\n return \$this->hasMany\(\w+::class\);\n \}\n/, + where: "after", + insert: ` + public function ${many}(): HasMany + { + return $this->hasMany(${names.pascal}::class); + } +`, + skipIf: `public function ${many}(): HasMany`, + describe: `add the ${many}() relation to User`, + }; +} + +export function artisan(...args: string[]): NativeCall[] { + return [{ bin: "php", args: ["artisan", ...args] }]; +} + +export function resourceNotes(ctx: Ctx): string[] { + const { names } = ctx; + return [ + `php artisan migrate — creates the ${names.plural.snake} table.`, + `Edit the validation rules in ${names.pascal}Controller (store/update) and add business logic there; the frontends destructure data.${names.plural.camel} / data.${names.camel}.`, + ]; +} + +export const laravel: Generator = { + id: "laravel", + label: "Laravel", + kind: "backend", + format: pint, + commands: { + resource: { + describe: + "model + migration + controller (inline validation) + routes in routes/api.php + Pest feature test", + files: (ctx) => [model(ctx), migration(ctx), controller(ctx), pestTest(ctx)], + patches: (ctx) => [...apiRoutePatches(ctx), userRelationPatch(ctx)], + notes: resourceNotes, + }, + model: { + describe: "Eloquent model in app/Models/", + native: (ctx) => artisan("make:model", ctx.names.pascal), + files: (ctx) => [model(ctx)], + }, + controller: { + describe: "API controller in app/Http/Controllers/", + native: (ctx) => artisan("make:controller", `${ctx.names.pascal}Controller`, "--api"), + files: (ctx) => [controller(ctx)], + }, + migration: { + describe: "create__table migration in database/migrations/", + native: (ctx) => artisan("make:migration", `create_${ctx.names.plural.snake}_table`), + files: (ctx) => [migration(ctx)], + }, + request: { + describe: "form request in app/Http/Requests/", + native: (ctx) => artisan("make:request", `Store${ctx.names.pascal}Request`), + files: (ctx) => [formRequest(ctx)], + }, + test: { + describe: "Pest feature test in tests/Feature/", + native: (ctx) => artisan("make:test", `${ctx.names.pascal}Test`, "--pest"), + files: (ctx) => [pestTest(ctx)], + }, + }, +}; diff --git a/src/generators/stacks/nest.ts b/src/generators/stacks/nest.ts new file mode 100644 index 0000000..b711345 --- /dev/null +++ b/src/generators/stacks/nest.ts @@ -0,0 +1,414 @@ +import type { Ctx, FileSpec, Generator, Patch } from "../types"; +import type { Field, FieldType } from "../fields"; +import { oxfmt } from "./shared"; + +const TS: Record = { + string: "string", + text: "string", + int: "number", + number: "number", + boolean: "boolean", + date: "Date", + json: "Record", +}; + +const DTO_TS: Record = { ...TS, date: "string" }; + +const VALIDATOR: Record = { + string: "IsString", + text: "IsString", + int: "IsInt", + number: "IsNumber", + boolean: "IsBoolean", + date: "IsDateString", + json: "IsObject", +}; + +function column(f: Field): string { + const opts: string[] = []; + let type = ""; + if (f.type === "int") type = "'integer'"; + if (f.type === "number") type = "'real'"; + if (f.type === "date") opts.push("type: 'datetime'"); + if (f.type === "json") type = "'simple-json'"; + if (f.nullable) opts.push("nullable: true"); + else if (f.type === "boolean") opts.push("default: false"); + else if (f.type === "text") opts.push("default: ''"); + const args = [type, opts.length ? `{ ${opts.join(", ")} }` : ""].filter(Boolean).join(", "); + return ` @Column(${args})\n ${f.camel}: ${TS[f.type]}${f.nullable ? " | null" : ""}\n`; +} + +function entity(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + return { + path: `src/entities/${names.kebab}.entity.ts`, + content: `import { + Entity, + PrimaryGeneratedColumn, + Column, + CreateDateColumn, + UpdateDateColumn, + ManyToOne, + JoinColumn, +} from 'typeorm' +import { User } from './user.entity' + +@Entity('${names.plural.snake}') +export class ${names.pascal} { + @PrimaryGeneratedColumn('uuid') + id: string + +${fields.map(column).join("\n")} + @CreateDateColumn() + createdAt: Date + + @UpdateDateColumn() + updatedAt: Date + + @ManyToOne(() => User) + @JoinColumn() + user: User +} +`, + }; +} + +function dtoField(f: Field, forceOptional: boolean): string { + const optional = forceOptional || f.nullable; + const decorators = [` @${VALIDATOR[f.type]}()`]; + if (optional) decorators.push(" @IsOptional()"); + else if (f.type === "string" || f.type === "text") decorators.push(" @IsNotEmpty()"); + return `${decorators.join("\n")}\n ${f.camel}${optional ? "?" : ""}: ${DTO_TS[f.type]}`; +} + +function dto(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const used = new Set(["IsOptional"]); + for (const f of fields) used.add(VALIDATOR[f.type]); + if (fields.some((f) => !f.nullable && (f.type === "string" || f.type === "text"))) + used.add("IsNotEmpty"); + return { + path: `src/dto/${names.kebab}.dto.ts`, + content: `import { ${[...used].sort().join(", ")} } from 'class-validator' + +export class Create${names.pascal}Dto { +${fields.map((f) => dtoField(f, false)).join("\n\n")} +} + +export class Update${names.pascal}Dto { +${fields.map((f) => dtoField(f, true)).join("\n\n")} +} +`, + }; +} + +function service(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const P = names.pascal; + const one = names.camel; + const many = names.plural.camel; + const title = names.title; + const titles = names.plural.title; + const lowerPlural = names.plural.title.toLowerCase(); + const required = fields.filter( + (f) => !f.nullable && (f.type === "string" || f.type === "text"), + ); + const guards = required + .map( + (f) => + ` if (!dto.${f.camel}) throw new BadRequestException('${f.pascal} is required')`, + ) + .join("\n"); + const value = (f: Field) => + f.type === "date" + ? f.nullable + ? `dto.${f.camel} ? new Date(dto.${f.camel}) : null` + : `new Date(dto.${f.camel})` + : `dto.${f.camel}${f.nullable ? " ?? null" : ""}`; + const assign = fields.map((f) => ` ${f.camel}: ${value(f)},`).join("\n"); + const updates = fields + .map((f) => ` if (dto.${f.camel} !== undefined) ${one}.${f.camel} = ${value(f)}`) + .join("\n"); + return { + path: `src/services/${names.kebab}.service.ts`, + content: `import { + Injectable, + NotFoundException, + ForbiddenException,${required.length ? "\n BadRequestException," : ""} +} from '@nestjs/common' +import { InjectRepository } from '@nestjs/typeorm' +import { Repository } from 'typeorm' + +import { ${P} } from '../entities/${names.kebab}.entity' +import { User } from '../entities/user.entity' +import { Create${P}Dto, Update${P}Dto } from '../dto/${names.kebab}.dto' + +@Injectable() +export class ${P}Service { + constructor( + @InjectRepository(${P}) private readonly ${one}Repository: Repository<${P}>, + @InjectRepository(User) private readonly userRepository: Repository, + ) {} + + async getAll() { + const ${many} = await this.${one}Repository.find({ + relations: { user: true }, + order: { createdAt: 'DESC' }, + }) + return { status: 'success', message: '${titles} fetched successfully', data: { ${many} } } + } + + async getById(id: string) { + const ${one} = await this.${one}Repository.findOne({ + where: { id }, + relations: { user: true }, + }) + if (!${one}) throw new NotFoundException('${title} not found') + return { status: 'success', message: '${title} fetched successfully', data: { ${one} } } + } + + async getCurrentUser${names.plural.pascal}(userId: string) { + const ${many} = await this.${one}Repository.find({ + where: { user: { id: userId } }, + relations: { user: true }, + order: { createdAt: 'DESC' }, + }) + return { status: 'success', message: '${titles} fetched successfully', data: { ${many} } } + } + + async create(userId: string, dto: Create${P}Dto) { +${guards ? `${guards}\n\n` : ""} const user = await this.userRepository.findOneBy({ id: userId }) + if (!user) throw new NotFoundException('User not found') + + const ${one} = this.${one}Repository.create({ +${assign} + user, + }) + const result = await this.${one}Repository.save(${one}) + return { status: 'success', message: '${title} created successfully', data: { ${one}: result } } + } + + async update(userId: string, id: string, dto: Update${P}Dto) { + const ${one} = await this.${one}Repository.findOne({ where: { id }, relations: { user: true } }) + if (!${one}) throw new NotFoundException('${title} not found') + if (${one}.user.id !== userId) throw new ForbiddenException('You can only update your own ${lowerPlural}') + +${updates} + + await this.${one}Repository.save(${one}) + return { status: 'success', message: '${title} updated successfully', data: { ${one} } } + } + + async delete(userId: string, id: string) { + const ${one} = await this.${one}Repository.findOne({ where: { id }, relations: { user: true } }) + if (!${one}) throw new NotFoundException('${title} not found') + if (${one}.user.id !== userId) throw new ForbiddenException('You can only delete your own ${lowerPlural}') + + await this.${one}Repository.remove(${one}) + return { status: 'success', message: '${title} deleted successfully' } + } +} +`, + }; +} + +function controller(ctx: Ctx): FileSpec { + const { names } = ctx; + const P = names.pascal; + const one = names.camel; + return { + path: `src/controllers/${names.kebab}.controller.ts`, + content: `import { + Controller, + Get, + Post, + Patch, + Delete, + Param, + Body, + UseGuards, + Request, +} from '@nestjs/common' +import { ${P}Service } from '../services/${names.kebab}.service' +import { JwtAuthGuard } from '../guards/jwt-auth.guard' +import { Create${P}Dto, Update${P}Dto } from '../dto/${names.kebab}.dto' + +@Controller('api/v1/${names.plural.kebab}') +@UseGuards(JwtAuthGuard) +export class ${P}Controller { + constructor(private readonly ${one}Service: ${P}Service) {} + + @Get('current-user') + async getCurrentUser${names.plural.pascal}(@Request() req) { + return this.${one}Service.getCurrentUser${names.plural.pascal}(req.user.id) + } + + @Get() + async getAll() { + return this.${one}Service.getAll() + } + + @Get(':id') + async getById(@Param('id') id: string) { + return this.${one}Service.getById(id) + } + + @Post() + async create(@Request() req, @Body() dto: Create${P}Dto) { + return this.${one}Service.create(req.user.id, dto) + } + + @Patch(':id') + async update(@Request() req, @Param('id') id: string, @Body() dto: Update${P}Dto) { + return this.${one}Service.update(req.user.id, id, dto) + } + + @Delete(':id') + async delete(@Request() req, @Param('id') id: string) { + return this.${one}Service.delete(req.user.id, id) + } +} +`, + }; +} + +function module(ctx: Ctx): FileSpec { + const { names } = ctx; + const P = names.pascal; + return { + path: `src/modules/${names.kebab}.module.ts`, + content: `import { Module } from '@nestjs/common' +import { TypeOrmModule } from '@nestjs/typeorm' + +import { ${P}Controller } from '../controllers/${names.kebab}.controller' +import { ${P}Service } from '../services/${names.kebab}.service' +import { ${P} } from '../entities/${names.kebab}.entity' +import { User } from '../entities/user.entity' + +@Module({ + imports: [TypeOrmModule.forFeature([${P}, User])], + controllers: [${P}Controller], + providers: [${P}Service], + exports: [${P}Service], +}) +export class ${P}Module {} +`, + }; +} + +function spec(ctx: Ctx): FileSpec { + const { names } = ctx; + const P = names.pascal; + const one = names.camel; + const many = names.plural.camel; + return { + path: `src/services/${names.kebab}.service.spec.ts`, + content: `import { NotFoundException } from '@nestjs/common' +import { ${P}Service } from './${names.kebab}.service' + +describe('${P}Service', () => { + const ${one}Repository = { + find: jest.fn(), + findOne: jest.fn(), + create: jest.fn(), + save: jest.fn(), + remove: jest.fn(), + } + const userRepository = { findOneBy: jest.fn() } + const service = new ${P}Service(${one}Repository as never, userRepository as never) + + it('lists ${many} in the contract envelope', async () => { + ${one}Repository.find.mockResolvedValue([]) + await expect(service.getAll()).resolves.toEqual({ + status: 'success', + message: '${names.plural.title} fetched successfully', + data: { ${many}: [] }, + }) + }) + + it('throws 404 for a missing ${names.title.toLowerCase()}', async () => { + ${one}Repository.findOne.mockResolvedValue(null) + await expect(service.getById('missing')).rejects.toBeInstanceOf(NotFoundException) + }) +}) +`, + }; +} + +function registerModule(ctx: Ctx): Patch[] { + const { names } = ctx; + const P = names.pascal; + return [ + { + path: "src/modules/app.module.ts", + anchor: /^import \{ \w+Module \} from '\.\/[\w-]+\.module'$/m, + where: "after", + insert: `\nimport { ${P}Module } from './${names.kebab}.module'`, + skipIf: `./${names.kebab}.module`, + describe: `import ${P}Module`, + }, + { + path: "src/modules/app.module.ts", + anchor: /^import \{ \w+ \} from '\.\.\/entities\/[\w.-]+\.entity'$/m, + where: "after", + insert: `\nimport { ${P} } from '../entities/${names.kebab}.entity'`, + skipIf: `../entities/${names.kebab}.entity`, + describe: `import the ${P} entity`, + }, + { + path: "src/modules/app.module.ts", + anchor: "entities: [", + where: "after", + insert: `${P}, `, + skipIf: `entities: [${P}, `, + describe: `add ${P} to TypeOrmModule entities`, + }, + { + path: "src/modules/app.module.ts", + anchor: /^ \],\n controllers: \[/m, + where: "before", + insert: ` ${P}Module,\n`, + skipIf: ` ${P}Module,`, + describe: `add ${P}Module to the AppModule imports`, + }, + ]; +} + +export const nest: Generator = { + id: "nest", + label: "NestJS", + kind: "backend", + format: oxfmt, + commands: { + resource: { + describe: + "entity + DTOs + service + controller (api/v1/) + module + jest spec, wired into AppModule", + files: (ctx) => [ + entity(ctx), + dto(ctx), + service(ctx), + controller(ctx), + module(ctx), + spec(ctx), + ], + patches: registerModule, + notes: (ctx) => [ + `TypeORM synchronize is on — restart the dev server and the ${ctx.names.plural.snake} table appears.`, + ], + }, + model: { describe: "TypeORM entity in src/entities/", files: (ctx) => [entity(ctx)] }, + dto: { + describe: "Create/Update DTOs with class-validator in src/dto/", + files: (ctx) => [dto(ctx)], + }, + service: { + describe: "service in src/services/ using the {status, message, data} envelope", + files: (ctx) => [service(ctx)], + }, + controller: { + describe: "controller in src/controllers/ guarded by JwtAuthGuard", + files: (ctx) => [controller(ctx)], + }, + test: { describe: "jest spec for the service", files: (ctx) => [spec(ctx)] }, + }, +}; diff --git a/src/generators/stacks/next.ts b/src/generators/stacks/next.ts new file mode 100644 index 0000000..f0704a3 --- /dev/null +++ b/src/generators/stacks/next.ts @@ -0,0 +1,526 @@ +import type { Ctx, FileSpec, Generator, Patch } from "../types"; +import type { Field, FieldType } from "../fields"; +import { labelField } from "../fields"; +import { oxfmt } from "./shared"; + +// Stubs mirror ../CLIuno-Next-template (src/apis/todo-api.ts, src/app/todos/page.tsx, +// src/app/todos/[id]/page.tsx): App Router client pages ('use client'), explicit React +// imports (no auto-imports), next/link + next/navigation, Base UI shadcn components, +// zustand auth store. File routing → only src/apis/index.ts needs a patch. + +const TS: Record = { + string: "string", + text: "string", + int: "number", + number: "number", + boolean: "boolean", + date: "string", + json: "Record", +}; + +const INIT: Record = { + string: "''", + text: "''", + int: "0", + number: "0", + boolean: "false", + date: "''", + json: "'{}'", +}; + +function tsType(f: Field): string { + return `${TS[f.type]}${f.nullable ? " | null" : ""}`; +} + +function iface(ctx: Ctx): string { + const { names, fields } = ctx; + return `interface ${names.pascal} { + id: string | number +${fields.map((f) => ` ${f.camel}: ${tsType(f)}`).join("\n")} + createdAt?: string + user?: { id: string | number; username: string } +}`; +} + +function inputType(fields: Field[], partial: boolean): string { + return `{ ${fields.map((f) => `${f.camel}${partial || f.nullable ? "?" : ""}: ${TS[f.type]}${f.nullable ? " | null" : ""}`).join("; ")} }`; +} + +function api(ctx: Ctx): FileSpec { + const { names, fields } = ctx; + const P = names.pascal; + const path = names.plural.kebab; + return { + path: `src/apis/${names.kebab}-api.ts`, + content: `import http from './http' + +const ${names.camel}Api = { + getAll${names.plural.pascal}: () => http.get('/${path}'), + get${P}ById: (id: string) => http.get(\`/${path}/\${id}\`), + create${P}: (data: ${inputType(fields, false)}) => http.post('/${path}', data), + update${P}: (id: string, data: ${inputType(fields, true)}) => + http.patch(\`/${path}/\${id}\`, data), + delete${P}: (id: string) => http.delete(\`/${path}/\${id}\`), +} + +export default ${names.camel}Api +`, + }; +} + +function formState(fields: Field[]): string { + return fields + .map( + (f) => + ` const [${f.camel}, set${f.pascal}] = useState<${f.type === "json" ? "string" : TS[f.type]}>(${INIT[f.type]})`, + ) + .join("\n"); +} + +/** Empty strings become null for nullable string-ish fields so the backend gets a real null. */ +function payload(fields: Field[]): string { + return fields + .map((f) => { + if (f.type === "json") { + // edited as raw text; parsed on submit + return f.nullable + ? `${f.camel}: ${f.camel}.trim() ? JSON.parse(${f.camel}) : null` + : `${f.camel}: JSON.parse(${f.camel} || '{}')`; + } + const stringish = f.type === "string" || f.type === "text" || f.type === "date"; + return f.nullable && stringish ? `${f.camel}: ${f.camel} || null` : f.camel; + }) + .join(", "); +} + +function formInput(f: Field): string { + const id = `${f.snake}-input`; + const optional = f.nullable ? " (optional)" : ""; + if (f.type === "boolean") { + return `

+ set${f.pascal}(v === true)} + /> + +
`; + } + if (f.type === "text") { + return `
+ +