diff --git a/README.md b/README.md index 8e3d8b92..0614bea1 100644 --- a/README.md +++ b/README.md @@ -29,30 +29,27 @@ across database drivers, storage drivers, and deployment targets. Interactive: ```bash -bun create holo-js my-app +npm create holo-js@latest my-app ``` Non-interactive: ```bash -bun create holo-js my-app \ +npm create holo-js@latest my-app -- \ --framework next \ --database sqlite \ - --package-manager bun \ + --package-manager npm \ --storage-default-disk public ``` Equivalent create-package entrypoints: ```bash -npm create holo-js@latest my-app -bunx create-holo-js my-app +pnpm create holo-js@latest my-app +yarn create holo-js my-app +npx create-holo-js my-app ``` -Do not use `bunx create holo-js`. -`bunx` treats `create` as the package name in that form, so it installs and runs the npm package named `create` -instead of resolving `create-holo-js`. - That scaffold writes the framework glue once. After that, the user-facing setup surface is: - `config/*.ts` @@ -89,15 +86,21 @@ my-app/ ## Core commands +Use your package manager's run command for framework lifecycle: + ```bash -bun install -bun run dev -bun run build -bunx holo prepare -bunx holo config:cache -bunx holo config:clear -bunx holo migrate -bunx holo seed +npm run dev +npm run build +``` + +Use your package manager's exec wrapper for direct Holo-JS CLI commands: + +```bash +npx holo prepare +npx holo config:cache +npx holo config:clear +npx holo migrate +npx holo seed ``` `holo dev` and `holo build` run discovery before handing control to the selected framework. @@ -111,12 +114,7 @@ const app = await holo.getApp() The framework route wrapper stays native, but Holo-JS access stays consistent. -Inside a project, use: - -- `bun run dev` / `bun run build` for framework lifecycle commands -- `bunx holo ...` for direct Holo-JS CLI commands such as `make:model`, `migrate`, and `seed` - -Equivalent direct CLI forms are `npx holo ...`, `pnpm dlx holo ...`, and `yarn dlx holo ...`. +Equivalent exec forms: `npx holo ...`, `pnpm dlx holo ...`, `yarn dlx holo ...`, `bunx holo ...`. ## Flexible runtime diff --git a/apps/docs/docs/auth/email-verification.md b/apps/docs/docs/auth/email-verification.md index fe96e3e3..a7da983a 100644 --- a/apps/docs/docs/auth/email-verification.md +++ b/apps/docs/docs/auth/email-verification.md @@ -173,11 +173,11 @@ To enable email verification delivery through notifications or mail: ```bash # For full notifications + mail integration (recommended) -bunx holo install notifications -bunx holo install mail +npx holo install notifications +npx holo install mail # For mail-only delivery -bunx holo install mail +npx holo install mail ``` ## Protecting Application Routes @@ -274,8 +274,8 @@ notifications or mail for auth-managed verification emails. Install notifications or mail into an existing project with: ```bash -bunx holo install notifications -bunx holo install mail +npx holo install notifications +npx holo install mail ``` ## Runtime Delivery Hook Configuration diff --git a/apps/docs/docs/auth/index.md b/apps/docs/docs/auth/index.md index 2f54dda4..9bdd00e6 100644 --- a/apps/docs/docs/auth/index.md +++ b/apps/docs/docs/auth/index.md @@ -51,12 +51,12 @@ authentication. Install only the packages you need: ```bash -bunx holo install auth -bunx holo install auth --social --provider google -bunx holo install auth --social --provider github -bunx holo install auth --social --provider google,github -bunx holo install auth --workos -bunx holo install auth --clerk +npx holo install auth +npx holo install auth --social --provider google +npx holo install auth --social --provider github +npx holo install auth --social --provider google,github +npx holo install auth --workos +npx holo install auth --clerk ``` When `auth` is installed, `session` is installed with it automatically because session-backed auth depends on it. diff --git a/apps/docs/docs/auth/social-login.md b/apps/docs/docs/auth/social-login.md index 9ef60f2f..45220968 100644 --- a/apps/docs/docs/auth/social-login.md +++ b/apps/docs/docs/auth/social-login.md @@ -25,9 +25,9 @@ Social login uses one shared runtime package plus one package per provider. Inst actually uses. ```bash -bunx holo install auth --social --provider google -bunx holo install auth --social --provider github -bunx holo install auth --social --provider google,github +npx holo install auth --social --provider google +npx holo install auth --social --provider github +npx holo install auth --social --provider google,github ``` Supported first-party providers: @@ -48,12 +48,12 @@ provider package installed by the CLI. | Provider | Install Command | Config Key | Package | Default Scopes | | --- | --- | --- | --- | --- | -| Google | `bunx holo install auth --social --provider google` | `google` | `@holo-js/auth-social-google` | `openid email profile` | -| GitHub | `bunx holo install auth --social --provider github` | `github` | `@holo-js/auth-social-github` | `read:user user:email` | -| Discord | `bunx holo install auth --social --provider discord` | `discord` | `@holo-js/auth-social-discord` | `identify email` | -| Facebook | `bunx holo install auth --social --provider facebook` | `facebook` | `@holo-js/auth-social-facebook` | `email public_profile` | -| Apple | `bunx holo install auth --social --provider apple` | `apple` | `@holo-js/auth-social-apple` | `name email` | -| LinkedIn | `bunx holo install auth --social --provider linkedin` | `linkedin` | `@holo-js/auth-social-linkedin` | `openid profile email` | +| Google | `npx holo install auth --social --provider google` | `google` | `@holo-js/auth-social-google` | `openid email profile` | +| GitHub | `npx holo install auth --social --provider github` | `github` | `@holo-js/auth-social-github` | `read:user user:email` | +| Discord | `npx holo install auth --social --provider discord` | `discord` | `@holo-js/auth-social-discord` | `identify email` | +| Facebook | `npx holo install auth --social --provider facebook` | `facebook` | `@holo-js/auth-social-facebook` | `email public_profile` | +| Apple | `npx holo install auth --social --provider apple` | `apple` | `@holo-js/auth-social-apple` | `name email` | +| LinkedIn | `npx holo install auth --social --provider linkedin` | `linkedin` | `@holo-js/auth-social-linkedin` | `openid profile email` | Those default scopes come from the first-party provider packages. Override them only when your application needs a different upstream permission set. @@ -202,7 +202,7 @@ different services. Install: ```bash -bunx holo install auth --social --provider google +npx holo install auth --social --provider google ``` Config: @@ -225,7 +225,7 @@ Use Google when you want OpenID Connect style profile data with `openid`, `email Install: ```bash -bunx holo install auth --social --provider github +npx holo install auth --social --provider github ``` Config: @@ -249,7 +249,7 @@ user by email. Install: ```bash -bunx holo install auth --social --provider discord +npx holo install auth --social --provider discord ``` Config: @@ -273,7 +273,7 @@ address. Install: ```bash -bunx holo install auth --social --provider facebook +npx holo install auth --social --provider facebook ``` Config: @@ -296,7 +296,7 @@ Facebook uses Graph API profile fields. Keep `email` when your app needs local a Install: ```bash -bunx holo install auth --social --provider apple +npx holo install auth --social --provider apple ``` Config: @@ -320,7 +320,7 @@ through the same Holo `callback('apple', request)` flow. Install: ```bash -bunx holo install auth --social --provider linkedin +npx holo install auth --social --provider linkedin ``` Config: diff --git a/apps/docs/docs/authorization/index.md b/apps/docs/docs/authorization/index.md index b9ee8fba..420349d7 100644 --- a/apps/docs/docs/authorization/index.md +++ b/apps/docs/docs/authorization/index.md @@ -5,7 +5,7 @@ Authorization is Holo's package for deciding what an authenticated or explicit a Install it when your application needs policy checks, ability checks, or typed authorization decisions: ```bash -bunx holo install authorization +npx holo install authorization ``` The package is optional and can be used without `@holo-js/auth`. When auth is installed, Holo wires the current diff --git a/apps/docs/docs/cache/config-and-drivers.md b/apps/docs/docs/cache/config-and-drivers.md index 052424d8..490a2f33 100644 --- a/apps/docs/docs/cache/config-and-drivers.md +++ b/apps/docs/docs/cache/config-and-drivers.md @@ -138,7 +138,7 @@ Database install requirements: - `@holo-js/cache` - `@holo-js/cache-db` -- `bunx holo cache:table` +- `npx holo cache:table` The cache driver reuses a named DB connection from `config/database.ts`. It does not duplicate database credentials inside `config/cache.ts`. diff --git a/apps/docs/docs/cache/setup-and-cli.md b/apps/docs/docs/cache/setup-and-cli.md index a1d5d0f9..6485ab89 100644 --- a/apps/docs/docs/cache/setup-and-cli.md +++ b/apps/docs/docs/cache/setup-and-cli.md @@ -5,7 +5,7 @@ Scaffold cache during project creation: ```bash -bun create holo-js my-app --package cache +npm create holo-js@latest my-app -- --package cache ``` That adds `@holo-js/cache`, writes `config/cache.ts`, and adds `CACHE_PREFIX` to `.env` files. @@ -15,15 +15,15 @@ That adds `@holo-js/cache`, writes `config/cache.ts`, and adds `CACHE_PREFIX` to Install cache into an existing app: ```bash -bunx holo install cache +npx holo install cache ``` Pick an explicit driver when needed: ```bash -bunx holo install cache --driver file -bunx holo install cache --driver redis -bunx holo install cache --driver database +npx holo install cache --driver file +npx holo install cache --driver redis +npx holo install cache --driver database ``` `file` is the default install target and the default runtime driver. @@ -50,25 +50,25 @@ Install output by driver: Clear the default cache store: ```bash -bunx holo cache:clear +npx holo cache:clear ``` Clear a named cache store: ```bash -bunx holo cache:clear --driver redis +npx holo cache:clear --driver redis ``` Forget one key from the default cache store: ```bash -bunx holo cache:forget dashboard.stats +npx holo cache:forget dashboard.stats ``` Forget one key from a named cache store: ```bash -bunx holo cache:forget dashboard.stats --driver redis +npx holo cache:forget dashboard.stats --driver redis ``` ## Database cache tables @@ -76,8 +76,8 @@ bunx holo cache:forget dashboard.stats --driver redis If your cache driver is `database`, generate the migration and then migrate normally: ```bash -bunx holo cache:table -bunx holo migrate +npx holo cache:table +npx holo migrate ``` `cache:table` creates a normal app migration under `server/db/migrations`. Holo-JS does not hide cache @@ -88,24 +88,24 @@ tables inside a package. ### File cache ```bash -bunx holo install cache --driver file +npx holo install cache --driver file ``` ### Redis cache ```bash -bunx holo install cache --driver redis +npx holo install cache --driver redis ``` -Use `bunx holo cache:clear --driver redis` later when you need to clear existing Redis cache state during migration or +Use `npx holo cache:clear --driver redis` later when you need to clear existing Redis cache state during migration or troubleshooting. ### Database cache ```bash -bunx holo install cache --driver database -bunx holo cache:table -bunx holo migrate +npx holo install cache --driver database +npx holo cache:table +npx holo migrate ``` ## Continue diff --git a/apps/docs/docs/database/commands.md b/apps/docs/docs/database/commands.md index 5aee5b61..19950ed8 100644 --- a/apps/docs/docs/database/commands.md +++ b/apps/docs/docs/database/commands.md @@ -6,16 +6,16 @@ scaffolding files, running migrations, seeding data, and pruning models. Inside a project, run direct Holo-JS commands through your package manager: ```bash -bunx holo list +npx holo list ``` Equivalent forms: -- `npx holo ...` - `pnpm dlx holo ...` - `yarn dlx holo ...` +- `npx holo ...` -Use package scripts such as `bun run dev` and `bun run build` for framework lifecycle commands. +Use package scripts such as `npm run dev` and `npm run build` for framework lifecycle commands. Use `holo list` to see every available command. The output groups Holo-JS's internal commands separately from app commands auto-discovered from `server/commands`. @@ -23,7 +23,7 @@ from app commands auto-discovered from `server/commands`. ## Command discovery ```bash -bunx holo list +npx holo list ``` Use this as the entry point when you want to see the installed internal commands and any custom commands @@ -34,8 +34,8 @@ your app provides. ### Create a model ```bash -bunx holo make:model User -bunx holo make:model courses/Course --migration --observer --factory --seeder +npx holo make:model User +npx holo make:model courses/Course --migration --observer --factory --seeder ``` `make:model` creates files under: @@ -52,9 +52,9 @@ migration registries. ### Create a migration ```bash -bunx holo make:migration create_users_table -bunx holo make:migration create_users_table --create users -bunx holo make:migration add_status_to_users_table --table users +npx holo make:migration create_users_table +npx holo make:migration create_users_table --create users +npx holo make:migration add_status_to_users_table --table users ``` This creates a timestamped migration in `server/db/migrations`. `holo prepare`, `holo dev`, and @@ -73,7 +73,7 @@ the flags make the intended scaffold explicit. ### Create cache tables ```bash -bunx holo cache:table +npx holo cache:table ``` Use this when your cache config uses the `database` driver. The generator creates a normal migration file under @@ -82,7 +82,7 @@ Use this when your cache config uses the `database` driver. The generator create ### Create a seeder ```bash -bunx holo make:seeder RoleSeeder +npx holo make:seeder RoleSeeder ``` This creates a seeder in `server/db/seeders` and refreshes generated discovery artifacts when the next @@ -91,8 +91,8 @@ prepare step runs. ### Create an observer ```bash -bunx holo make:observer UserObserver -bunx holo make:observer courses/CourseObserver +npx holo make:observer UserObserver +npx holo make:observer courses/CourseObserver ``` This creates an observer in `server/db/observers`. Standalone observer generation does not rewrite an @@ -102,7 +102,7 @@ existing model automatically. If you want the observer wired into a new model im ### Create a factory ```bash -bunx holo make:factory UserFactory +npx holo make:factory UserFactory ``` This creates a factory in `server/db/factories`. @@ -112,17 +112,17 @@ This creates a factory in `server/db/factories`. ### Run migrations ```bash -bunx holo migrate -bunx holo migrate --step 1 +npx holo migrate +npx holo migrate --step 1 ``` ### Refresh the database from scratch ```bash -bunx holo migrate:fresh -bunx holo migrate:fresh --seed -bunx holo migrate:fresh --seed --only roles,users -bunx holo migrate:fresh --seed --force +npx holo migrate:fresh +npx holo migrate:fresh --seed +npx holo migrate:fresh --seed --only roles,users +npx holo migrate:fresh --seed --force ``` `migrate:fresh` drops every table in the active connection, reruns all registered migrations from @@ -138,19 +138,19 @@ The seeding flags match `holo seed`: ### Roll back migrations ```bash -bunx holo migrate:rollback -bunx holo migrate:rollback --batch 1 -bunx holo migrate:rollback --step 1 +npx holo migrate:rollback +npx holo migrate:rollback --batch 1 +npx holo migrate:rollback --step 1 ``` ### Run seeders ```bash -bunx holo seed -bunx holo seed --only database -bunx holo seed --only roles,users -bunx holo seed --quietly -bunx holo seed --force +npx holo seed +npx holo seed --only database +npx holo seed --only roles,users +npx holo seed --quietly +npx holo seed --force ``` `seed` runs the seeders discovered from `server/db/seeders`. @@ -158,9 +158,9 @@ bunx holo seed --force ### Prune models ```bash -bunx holo prune -bunx holo prune Session -bunx holo prune Session AuditLog +npx holo prune +npx holo prune Session +npx holo prune Session AuditLog ``` `prune` works in two modes: @@ -175,9 +175,9 @@ the command succeeds and reports that there was nothing to prune. ### Cache maintenance ```bash -bunx holo cache:clear -bunx holo cache:clear --driver redis -bunx holo cache:forget dashboard.stats +npx holo cache:clear +npx holo cache:clear --driver redis +npx holo cache:forget dashboard.stats ``` Use these commands when you want to clear one configured store or drop one specific key without writing a custom @@ -191,7 +191,7 @@ of failing immediately. For example, this will ask for the model name: ```bash -bunx holo make:model +npx holo make:model ``` Some generator commands also ask follow-up questions for optional scaffolding when that makes the workflow @@ -200,7 +200,7 @@ faster. Disable prompts explicitly with: ```bash -bunx holo make:model --no-interactive +npx holo make:model --no-interactive ``` In non-interactive environments, missing required values fail immediately. @@ -241,7 +241,7 @@ export default defineCommand({ That file is available as: ```bash -bunx holo courses:reindex +npx holo courses:reindex ``` If the file does not provide an explicit `name`, the command name is derived from its path under diff --git a/apps/docs/docs/database/index.md b/apps/docs/docs/database/index.md index c8204aef..e4d29655 100644 --- a/apps/docs/docs/database/index.md +++ b/apps/docs/docs/database/index.md @@ -9,7 +9,7 @@ Most applications follow this path: 1. configure a connection in `config/database.ts` 2. write migrations in `server/db/migrations` -3. run `bunx holo migrate` +3. run `npx holo migrate` 4. let Holo-JS refresh `server/db/schema.generated.ts` 5. define models under `server/models` 6. query through `DB.table(...)` or the ORM @@ -47,13 +47,13 @@ changes underneath it. For day-to-day database work, use the Holo-JS CLI: ```bash -bunx holo list -bunx holo migrate -bunx holo migrate:fresh --seed -bunx holo seed +npx holo list +npx holo migrate +npx holo migrate:fresh --seed +npx holo seed ``` -`bunx holo list` shows internal database commands plus app commands auto-discovered from +`npx holo list` shows internal database commands plus app commands auto-discovered from `server/commands`. ## Multiple connections diff --git a/apps/docs/docs/database/migrations.md b/apps/docs/docs/database/migrations.md index ec59dc6e..8e93dd6b 100644 --- a/apps/docs/docs/database/migrations.md +++ b/apps/docs/docs/database/migrations.md @@ -23,7 +23,7 @@ Do not put migrations in client code. They belong to deployment, local setup, CI bootstrap flows. In Holo-JS, migrations are the operational source of truth. They change the real database, and after a -successful `bunx holo migrate` run the CLI refreshes `server/db/schema.generated.ts`. Model files consume +successful `npx holo migrate` run the CLI refreshes `server/db/schema.generated.ts`. Model files consume that generated schema metadata instead of redefining columns inline. Columns are not nullable by default. Write `.nullable()` only when a column should allow nulls. Use @@ -34,9 +34,9 @@ Columns are not nullable by default. Write `.nullable()` only when a column shou Generate migrations with the CLI: ```bash -bunx holo make:migration create_users_table -bunx holo make:migration create_users_table --create users -bunx holo make:migration add_status_to_users_table --table users +npx holo make:migration create_users_table +npx holo make:migration create_users_table --create users +npx holo make:migration add_status_to_users_table --table users ``` This creates a timestamped file in `server/db/migrations`: @@ -125,14 +125,14 @@ export default defineMigration({ Use `--create` when the table does not exist yet: ```bash -bunx holo make:migration create_users_table --create users +npx holo make:migration create_users_table --create users ``` Use `--table` when the table already exists and the migration is adding, changing, renaming, indexing, or dropping parts of it: ```bash -bunx holo make:migration add_profile_photo_to_users_table --table users +npx holo make:migration add_profile_photo_to_users_table --table users ``` That keeps create-table and alter-table scaffolds explicit and easy to review. @@ -149,20 +149,20 @@ omit `down` when the migration is intentionally irreversible and your team is tr Run all pending migrations: ```bash -bunx holo migrate +npx holo migrate ``` Run only the next `N` migrations: ```bash -bunx holo migrate --step 1 +npx holo migrate --step 1 ``` Reset the database and rerun everything: ```bash -bunx holo migrate:fresh -bunx holo migrate:fresh --seed +npx holo migrate:fresh +npx holo migrate:fresh --seed ``` `migrate:fresh` drops every table in the active connection, reruns the full migration chain, and then @@ -183,19 +183,19 @@ That keeps schema work explicit even when teams wrap it in deployment automation Roll back the latest batch: ```bash -bunx holo migrate:rollback +npx holo migrate:rollback ``` Roll back a specific number of migrations: ```bash -bunx holo migrate:rollback --step 1 +npx holo migrate:rollback --step 1 ``` Roll back a specific batch: ```bash -bunx holo migrate:rollback --batch 3 +npx holo migrate:rollback --batch 3 ``` Use rollback when you need to reverse recent schema changes in development, tests, or controlled diff --git a/apps/docs/docs/deployment.md b/apps/docs/docs/deployment.md index b496a0e2..dc725837 100644 --- a/apps/docs/docs/deployment.md +++ b/apps/docs/docs/deployment.md @@ -28,7 +28,7 @@ For deployable artifacts, keep these steps explicit: ```bash holo prepare holo config:cache -bun run build +npm run build ``` `holo prepare` refreshes discovery output. `holo config:cache` is optional but useful when you want @@ -66,14 +66,14 @@ Do not expose secrets to browser-visible config or client bundles. ## Validation before rollout ```bash -bun run typecheck -bun run lint -bun run test -bun run build +npm run typecheck +npm run lint +npm run test +npm run build ``` If docs changed: ```bash -bun run build:docs +npm run build:docs ``` diff --git a/apps/docs/docs/development/index.md b/apps/docs/docs/development/index.md index beb538f2..435129cf 100644 --- a/apps/docs/docs/development/index.md +++ b/apps/docs/docs/development/index.md @@ -30,9 +30,9 @@ holo build holo prepare holo config:cache holo config:clear -bun run typecheck -bun run lint -bun run test +npm run typecheck +npm run lint +npm run test ``` `holo dev` already runs discovery before starting the selected framework. `holo prepare` is the manual diff --git a/apps/docs/docs/development/workflow.md b/apps/docs/docs/development/workflow.md index fb2ba38a..1d429a5c 100644 --- a/apps/docs/docs/development/workflow.md +++ b/apps/docs/docs/development/workflow.md @@ -67,16 +67,16 @@ files. ## Validate before merge ```bash -bun run typecheck -bun run lint -bun run test -bun run build +npm run typecheck +npm run lint +npm run test +npm run build ``` If documentation changed: ```bash -bun run build:docs +npm run build:docs ``` ## Keep operational steps explicit diff --git a/apps/docs/docs/directory-structure.md b/apps/docs/docs/directory-structure.md index 6e970878..a766f05c 100644 --- a/apps/docs/docs/directory-structure.md +++ b/apps/docs/docs/directory-structure.md @@ -165,7 +165,7 @@ Holo-JS does not replace those layouts. Use: ```bash -bun run dev +holo dev holo build holo prepare ``` diff --git a/apps/docs/docs/events/setup-and-cli.md b/apps/docs/docs/events/setup-and-cli.md index 4568cfb8..8dae890c 100644 --- a/apps/docs/docs/events/setup-and-cli.md +++ b/apps/docs/docs/events/setup-and-cli.md @@ -25,19 +25,19 @@ server/listeners/billing/sync-invoice-state.ts Create an event: ```bash -bunx holo make:event user/registered +npx holo make:event user/registered ``` Create a listener for one event: ```bash -bunx holo make:listener user/send-welcome-email --event user.registered +npx holo make:listener user/send-welcome-email --event user.registered ``` Create a listener for multiple events: ```bash -bunx holo make:listener audit/user-lifecycle \ +npx holo make:listener audit/user-lifecycle \ --event user.registered \ --event user.deleted ``` @@ -47,7 +47,7 @@ bunx holo make:listener audit/user-lifecycle \ Install event support into an existing Holo-JS app with: ```bash -bunx holo install events +npx holo install events ``` This adds the `@holo-js/events` package dependency when needed and creates the discovery directories: diff --git a/apps/docs/docs/index.md b/apps/docs/docs/index.md index dd4faf70..a167fa4f 100644 --- a/apps/docs/docs/index.md +++ b/apps/docs/docs/index.md @@ -24,12 +24,6 @@ database drivers, storage drivers, and hosting targets. ::: code-group -```bash [Bun] -bun create holo-js my-app -cd my-app -bun run dev -``` - ```bash [npm] npm create holo-js@latest my-app cd my-app @@ -48,6 +42,12 @@ cd my-app yarn dev ``` +```bash [Bun] +bun create holo-js my-app +cd my-app +bun run dev +``` + ::: ```ts @@ -109,7 +109,7 @@ If you are contributing to the framework packages inside this repository, use: ## Backend workflow -- `bun create holo-js` scaffolds the project and asks for framework, database, package manager, and storage defaults. +- `npm create holo-js@latest` scaffolds the project and asks for framework, database, package manager, and storage defaults. - `holo prepare` scans Holo-JS-owned directories and regenerates typed registries under `.holo-js/generated`. - `config/queue.ts` is scaffolded by default and starts on the `sync` driver. - `holo install broadcast` scaffolds `config/broadcast.ts`, `server/broadcast`, `server/channels`, and `/broadcasting/auth`. diff --git a/apps/docs/docs/installation.md b/apps/docs/docs/installation.md index 2742b2db..e71d7b5a 100644 --- a/apps/docs/docs/installation.md +++ b/apps/docs/docs/installation.md @@ -7,7 +7,7 @@ files plus Holo-JS-owned server directories. ## Requirements - Node 20 or newer -- Bun or another modern package manager +- a modern package manager (npm, pnpm, yarn, or bun) - one of: Nuxt, Next.js, or SvelteKit - SQLite, Postgres, or MySQL @@ -15,10 +15,6 @@ files plus Holo-JS-owned server directories. ::: code-group -```bash [Bun] -bun create holo-js my-app -``` - ```bash [npm] npm create holo-js@latest my-app ``` @@ -31,18 +27,11 @@ pnpm create holo-js@latest my-app yarn create holo-js my-app ``` -```bash [Direct] -bunx create-holo-js my-app +```bash [Bun] +bun create holo-js my-app ``` ::: - -The interactive flow asks for: - -- project name -- framework: `nuxt`, `next`, or `sveltekit` -- database driver: `sqlite`, `mysql`, or `postgres` -- package manager: `bun`, `npm`, `pnpm`, or `yarn` - storage default disk: `local` or `public` - optional packages: `validation`, `forms`, `security`, `notifications`, `mail`, `storage`, `events`, `queue`, `cache`, `auth`, `authorization`, `broadcast`, or none @@ -50,15 +39,6 @@ The interactive flow asks for: ::: code-group -```bash [Bun] -bun create holo-js my-app \ - --framework next \ - --database sqlite \ - --package-manager bun \ - --storage-default-disk public \ - --package forms,validation,mail -``` - ```bash [npm] npm create holo-js@latest my-app -- \ --framework next \ @@ -86,8 +66,8 @@ yarn create holo-js my-app \ --package forms,validation,mail ``` -```bash [Direct] -bunx create-holo-js my-app \ +```bash [Bun] +bun create holo-js my-app \ --framework next \ --database sqlite \ --package-manager bun \ @@ -97,10 +77,6 @@ bunx create-holo-js my-app \ ::: -Do not use `bunx create holo-js`. -`bunx` treats `create` as the package name in that form, so it installs and runs the npm package named `create` -instead of resolving `create-holo-js`. - Use the non-interactive flags for CI, templates, or internal automation. `validation`, `forms`, `security`, `notifications`, `mail`, `storage`, `events`, `queue`, `cache`, `auth`, `authorization`, and `broadcast` are optional packages. Add them during scaffolding only if the @@ -112,19 +88,19 @@ Example optional package sets include `--package forms,validation,notifications` Authorization can also be installed after scaffolding: ```bash -bunx holo install authorization +npx holo install authorization ``` Broadcast setup is installed after scaffolding: ```bash -bunx holo install broadcast +npx holo install broadcast ``` Cache setup can also be installed after scaffolding: ```bash -bunx holo install cache +npx holo install cache ``` ## What the scaffold writes @@ -153,14 +129,38 @@ to work are: ## First commands -```bash +After scaffolding, install dependencies and start the dev server using the package manager you selected: + +::: code-group + +```bash [npm] +cd my-app +npm install +npm run dev +``` + +```bash [pnpm] +cd my-app +pnpm install +pnpm dev +``` + +```bash [Yarn] +cd my-app +yarn install +yarn dev +``` + +```bash [Bun] cd my-app bun install bun run dev ``` -`bun run dev` already runs discovery first, refreshes `.holo-js/generated`, watches relevant files, and then -starts Nuxt, Next.js, or SvelteKit. Run `holo prepare` directly only when you want to regenerate discovery +::: + +`npm run dev` (or the equivalent for your package manager) already runs discovery first, refreshes `.holo-js/generated`, watches relevant files, and then +starts Nuxt, Next.js, or SvelteKit. Run `npx holo prepare` (or the equivalent exec wrapper for your package manager) only when you want to regenerate discovery artifacts without starting the dev server. ## Running Holo-JS commands inside a project @@ -169,11 +169,6 @@ Use normal package scripts for framework lifecycle commands: ::: code-group -```bash [Bun] -bun run dev -bun run build -``` - ```bash [npm] npm run dev npm run build @@ -189,18 +184,17 @@ yarn dev yarn build ``` +```bash [Bun] +bun run dev +bun run build +``` + ::: Use your package manager's exec wrapper for direct Holo-JS CLI commands: ::: code-group -```bash [Bun] -bunx holo make:model User -bunx holo migrate -bunx holo seed -``` - ```bash [npm] npx holo make:model User npx holo migrate @@ -219,6 +213,12 @@ yarn dlx holo migrate yarn dlx holo seed ``` +```bash [Bun] +bunx holo make:model User +bunx holo migrate +bunx holo seed +``` + ::: `holo ...` by itself is not expected to be on your global shell path unless you install it globally. diff --git a/apps/docs/docs/mail/setup-and-cli.md b/apps/docs/docs/mail/setup-and-cli.md index 415b69e0..c4078772 100644 --- a/apps/docs/docs/mail/setup-and-cli.md +++ b/apps/docs/docs/mail/setup-and-cli.md @@ -8,13 +8,13 @@ an existing app. Use the optional package flag during `create`: ```bash -bun create holo-js my-app --package mail +npm create holo-js@latest my-app -- --package mail ``` Optional packages still compose normally: ```bash -bun create holo-js my-app --package forms,validation,mail +npm create holo-js@latest my-app -- --package forms,validation,mail ``` ## Existing projects @@ -22,7 +22,7 @@ bun create holo-js my-app --package forms,validation,mail Install mail into an existing Holo-JS app with: ```bash -bunx holo install mail +npx holo install mail ``` This adds the `@holo-js/mail` package dependency when needed and scaffolds: @@ -35,13 +35,13 @@ This adds the `@holo-js/mail` package dependency when needed and scaffolds: Generate a mail definition with: ```bash -bunx holo make:mail auth/verify-email +npx holo make:mail auth/verify-email ``` Use `--markdown` to skip the default markdown scaffold explicitly: ```bash -bunx holo make:mail auth/verify-email --markdown +npx holo make:mail auth/verify-email --markdown ``` If the app has a custom `renderView` runtime binding, author `render: { view, props }` mails manually as shown in diff --git a/apps/docs/docs/media.md b/apps/docs/docs/media.md index 5456b674..d496eb3d 100644 --- a/apps/docs/docs/media.md +++ b/apps/docs/docs/media.md @@ -14,7 +14,7 @@ Queued conversions are now backed by the queue subsystem instead of a dormant fl Install the media package alongside DB and storage: ```bash -bun add @holo-js/media +npm install @holo-js/media ``` `@holo-js/media` is not a framework adapter. It builds on top of `@holo-js/db` and `@holo-js/storage`. @@ -275,7 +275,7 @@ Behavior depends on the configured queue driver: Run a worker for async queue drivers: ```bash -bunx holo queue:work --connection redis --queue media +npx holo queue:work --connection redis --queue media ``` ## Clearing and deleting media diff --git a/apps/docs/docs/notifications/setup-and-cli.md b/apps/docs/docs/notifications/setup-and-cli.md index 75b0b208..78ef6c77 100644 --- a/apps/docs/docs/notifications/setup-and-cli.md +++ b/apps/docs/docs/notifications/setup-and-cli.md @@ -8,13 +8,13 @@ install them later into an existing project. Use the optional package flag during `create`: ```bash -bun create holo-js my-app --package notifications +npm create holo-js@latest my-app -- --package notifications ``` Multiple optional packages still compose normally: ```bash -bun create holo-js my-app --package forms,validation,notifications +npm create holo-js@latest my-app -- --package forms,validation,notifications ``` ## Existing projects @@ -22,7 +22,7 @@ bun create holo-js my-app --package forms,validation,notifications Install notifications into an existing Holo-JS app with: ```bash -bunx holo install notifications +npx holo install notifications ``` This adds the `@holo-js/notifications` package dependency when needed and scaffolds: @@ -33,7 +33,7 @@ This adds the `@holo-js/notifications` package dependency when needed and scaffo After install, run the normal migration flow: ```bash -bunx holo migrate +npx holo migrate ``` ## Scaffolded database channel support diff --git a/apps/docs/docs/orm/index.md b/apps/docs/docs/orm/index.md index d7fa46af..14889ecd 100644 --- a/apps/docs/docs/orm/index.md +++ b/apps/docs/docs/orm/index.md @@ -1,7 +1,7 @@ # ORM: Getting Started Holo-JS models are the application-facing record layer. They are directly queryable, relation-aware, and -typed from the generated schema metadata refreshed by `holo migrate`. +typed from the generated schema metadata refreshed by `npx holo migrate`. ## Introduction @@ -19,8 +19,8 @@ server/models/User.ts The fastest way to start is: ```bash -bunx holo make:model User -bunx holo make:model courses/Course --migration --observer --factory --seeder +npx holo make:model User +npx holo make:model courses/Course --migration --observer --factory --seeder ``` Use `make:model` when you want the model scaffold and optional companion files created together. Nested @@ -51,7 +51,7 @@ server/api/users/index.get.ts The flow is: 1. migrations define or change the table -2. `bunx holo migrate` refreshes `server/db/schema.generated.ts` +2. `npx holo migrate` refreshes `server/db/schema.generated.ts` 3. model files define behavior 4. API routes or server services call the model @@ -536,8 +536,8 @@ Put observer classes in a server-side file, usually under `server/db/observers`. server/db/observers/UserObserver.ts ``` -Use `holo make:observer UserObserver` to scaffold the observer file. If you are creating a new model and -want the observer wired automatically, use `holo make:model User --observer`. +Use `npx holo make:observer UserObserver` to scaffold the observer file. If you are creating a new model and +want the observer wired automatically, use `npx holo make:model User --observer`. ```ts class UserObserver { @@ -596,11 +596,11 @@ const deletedCount = await Session.prune() Or run it through the CLI: ```bash -holo prune -holo prune Session +npx holo prune +npx holo prune Session ``` -`holo prune` with no arguments prunes every registered model that defines `prunable`. If you explicitly +`npx holo prune` with no arguments prunes every registered model that defines `prunable`. If you explicitly name a model that does not define `prunable`, the command fails instead of silently skipping it. Use pruning when the cleanup rule belongs to the model itself and should stay repeatable. diff --git a/apps/docs/docs/queue/database.md b/apps/docs/docs/queue/database.md index 5650d293..002f8b90 100644 --- a/apps/docs/docs/queue/database.md +++ b/apps/docs/docs/queue/database.md @@ -7,7 +7,7 @@ Queue tables are app-owned migrations. Holo-JS does not hide them inside a packa Use this when your queue connection uses the `database` driver: ```bash -bunx holo queue:table +npx holo queue:table ``` That creates a normal migration file under `server/db/migrations`. @@ -17,7 +17,7 @@ That creates a normal migration file under `server/db/migrations`. Use this when your queue config keeps failed jobs in the database: ```bash -bunx holo queue:failed-table +npx holo queue:failed-table ``` This is the default failed-job setup that new queue scaffolds write. @@ -27,13 +27,13 @@ This is the default failed-job setup that new queue scaffolds write. After generating the files, migrate normally: ```bash -bunx holo migrate +npx holo migrate ``` Or for a fresh local rebuild: ```bash -bunx holo migrate:fresh --seed --force +npx holo migrate:fresh --seed --force ``` ## Database queue config @@ -69,11 +69,11 @@ The queue layer does not duplicate full DB credentials here. It reuses the named ## Typical setup flow ```bash -bunx holo install queue --driver database -bunx holo queue:table -bunx holo queue:failed-table -bunx holo migrate -bunx holo queue:work --connection database +npx holo install queue --driver database +npx holo queue:table +npx holo queue:failed-table +npx holo migrate +npx holo queue:work --connection database ``` ## Continue diff --git a/apps/docs/docs/queue/failed-jobs.md b/apps/docs/docs/queue/failed-jobs.md index c65ab4ec..b6e00599 100644 --- a/apps/docs/docs/queue/failed-jobs.md +++ b/apps/docs/docs/queue/failed-jobs.md @@ -6,7 +6,7 @@ database-backed failed-job table named `failed_jobs`. ## List failed jobs ```bash -bunx holo queue:failed +npx holo queue:failed ``` Use this to inspect failed jobs and copy the failed-job record ID for retry or deletion. @@ -16,19 +16,19 @@ Use this to inspect failed jobs and copy the failed-job record ID for retry or d Retry one failed job: ```bash -bunx holo queue:retry 01JZ123456789ABCDEFGHJKMNP +npx holo queue:retry 01JZ123456789ABCDEFGHJKMNP ``` Retry every stored failed job: ```bash -bunx holo queue:retry all +npx holo queue:retry all ``` ## Delete one failed job record ```bash -bunx holo queue:forget 01JZ123456789ABCDEFGHJKMNP +npx holo queue:forget 01JZ123456789ABCDEFGHJKMNP ``` This removes the failed-job record without retrying it. @@ -36,7 +36,7 @@ This removes the failed-job record without retrying it. ## Flush the failed-job store ```bash -bunx holo queue:flush +npx holo queue:flush ``` Use this only when you intentionally want to clear every stored failed job record. diff --git a/apps/docs/docs/queue/index.md b/apps/docs/docs/queue/index.md index f6f54eba..bf8e82f3 100644 --- a/apps/docs/docs/queue/index.md +++ b/apps/docs/docs/queue/index.md @@ -8,14 +8,14 @@ Holo-JS ships queue support as a first-class server subsystem. New projects alre Install queue support into an existing Holo-JS app with: ```bash -bunx holo install queue +npx holo install queue ``` Pick a starting driver during install when needed: ```bash -bunx holo install queue --driver redis -bunx holo install queue --driver database +npx holo install queue --driver redis +npx holo install queue --driver database ``` ## What queue owns @@ -133,7 +133,7 @@ See [Configuration](/configuration) for examples of all three connection styles. Run a worker: ```bash -bunx holo queue:work --connection redis +npx holo queue:work --connection redis ``` ### Database @@ -166,15 +166,15 @@ export default defineQueueConfig({ Generate the required tables and migrate: ```bash -bunx holo queue:table -bunx holo queue:failed-table -bunx holo migrate +npx holo queue:table +npx holo queue:failed-table +npx holo migrate ``` Then run a worker: ```bash -bunx holo queue:work --connection database +npx holo queue:work --connection database ``` ## Queue names and connections diff --git a/apps/docs/docs/queue/jobs.md b/apps/docs/docs/queue/jobs.md index b3c2e7ec..33528836 100644 --- a/apps/docs/docs/queue/jobs.md +++ b/apps/docs/docs/queue/jobs.md @@ -7,7 +7,7 @@ Holo-JS discovers jobs from `server/jobs` and all nested subdirectories under it Generate a new job file: ```bash -bunx holo make:job reports/send-digest +npx holo make:job reports/send-digest ``` That creates: @@ -182,11 +182,11 @@ through queue internally while keeping event-first contracts. Holo-JS refreshes the generated job registry during: -- `bun run dev` -- `bun run build` -- `bunx holo prepare` +- `holo dev` +- `holo build` +- `npx holo prepare` -Run `bunx holo prepare` directly when you only want to rebuild discovery output. +Run `npx holo prepare` directly when you only want to rebuild discovery output. ## Continue diff --git a/apps/docs/docs/queue/media.md b/apps/docs/docs/queue/media.md index 6ae1a541..8957080f 100644 --- a/apps/docs/docs/queue/media.md +++ b/apps/docs/docs/queue/media.md @@ -39,7 +39,7 @@ inline. With `redis` or `database`, the job is enqueued and processed by a worker: ```bash -bunx holo queue:work --connection redis --queue media +npx holo queue:work --connection redis --queue media ``` ## Why the payload stays small @@ -60,7 +60,7 @@ The worker reloads the media record and original file from storage when it execu Example dedicated worker: ```bash -bunx holo queue:work --connection redis --queue media +npx holo queue:work --connection redis --queue media ``` ## Continue diff --git a/apps/docs/docs/queue/workers.md b/apps/docs/docs/queue/workers.md index 0c14a86c..52ebfc88 100644 --- a/apps/docs/docs/queue/workers.md +++ b/apps/docs/docs/queue/workers.md @@ -8,14 +8,14 @@ jobs inline and does not need a worker process. Run the queue worker: ```bash -bunx holo queue:work --connection redis +npx holo queue:work --connection redis ``` Filter one or more queue names: ```bash -bunx holo queue:work --connection redis --queue emails -bunx holo queue:work --connection redis --queue emails,media +npx holo queue:work --connection redis --queue emails +npx holo queue:work --connection redis --queue emails,media ``` Useful flags: @@ -31,7 +31,7 @@ Useful flags: Example: ```bash -bunx holo queue:work \ +npx holo queue:work \ --connection database \ --queue default,media \ --sleep 1 \ @@ -47,7 +47,7 @@ bunx holo queue:work \ discovery as needed, and restarts the worker when relevant files change. ```bash -bunx holo queue:listen --connection redis --queue media +npx holo queue:listen --connection redis --queue media ``` This is the right command when you want a queue worker running while editing job files in local @@ -58,7 +58,7 @@ development. Signal long-lived workers to restart after the current job: ```bash -bunx holo queue:restart +npx holo queue:restart ``` Use this after deploying new code when your process manager keeps queue workers alive. @@ -68,8 +68,8 @@ Use this after deploying new code when your process manager keeps queue workers Clear pending jobs from a connection: ```bash -bunx holo queue:clear --connection redis -bunx holo queue:clear --connection redis --queue emails +npx holo queue:clear --connection redis +npx holo queue:clear --connection redis --queue emails ``` This removes pending work from the selected queue names. It is not a failed-job command. @@ -86,8 +86,8 @@ This removes pending work from the selected queue names. It is not a failed-job Running dedicated workers for separate queues is often cleaner than one large worker pool: ```bash -bunx holo queue:work --connection redis --queue emails -bunx holo queue:work --connection redis --queue media +npx holo queue:work --connection redis --queue emails +npx holo queue:work --connection redis --queue media ``` That keeps email and media workloads isolated even when they share one Redis connection. diff --git a/apps/docs/docs/security.md b/apps/docs/docs/security.md index fa14a839..02f39ab9 100644 --- a/apps/docs/docs/security.md +++ b/apps/docs/docs/security.md @@ -5,7 +5,7 @@ Install it only when the app needs browser form protection or named request throttles: ```bash -bunx holo install security +npx holo install security ``` That writes `config/security.ts`, adds `@holo-js/security`, and lets core boot the package lazily only when @@ -388,10 +388,10 @@ await clearRateLimit({ all: true }) CLI helper: ```bash -bunx holo rate-limit:clear --limiter api --key "user:42" -bunx holo rate-limit:clear --limiter api --key "ip:203.0.113.7" -bunx holo rate-limit:clear --limiter login -bunx holo rate-limit:clear --all +npx holo rate-limit:clear --limiter api --key "user:42" +npx holo rate-limit:clear --limiter api --key "ip:203.0.113.7" +npx holo rate-limit:clear --limiter login +npx holo rate-limit:clear --all ``` ## Driver persistence @@ -454,7 +454,7 @@ Examples: Security stays optional: -- install it with `bunx holo install security` +- install it with `npx holo install security` - include it during project creation only if the app needs it - apps that do not install it do not pay dependency or runtime cost - `@holo-js/forms` loads it lazily only when security-aware options are actually used diff --git a/packages/auth/tests/docs-smoke.test.ts b/packages/auth/tests/docs-smoke.test.ts index 885598a7..00422ec9 100644 --- a/packages/auth/tests/docs-smoke.test.ts +++ b/packages/auth/tests/docs-smoke.test.ts @@ -86,7 +86,7 @@ describe('auth documentation smoke checks', () => { expect(verification).toContain('verification.create') expect(verification).toContain('verification.consume') expect(verification).toContain('@holo-js/notifications') - expect(verification).toContain('bunx holo install mail') + expect(verification).toContain('npx holo install mail') expect(verification).toContain('notify(created, verificationCreated(token))') expect(reset).toContain('passwords.request') expect(reset).toContain('passwords.consume') diff --git a/packages/broadcast/tests/docs-smoke.test.ts b/packages/broadcast/tests/docs-smoke.test.ts index 404b8119..05b3b51c 100644 --- a/packages/broadcast/tests/docs-smoke.test.ts +++ b/packages/broadcast/tests/docs-smoke.test.ts @@ -27,7 +27,7 @@ describe('broadcast documentation smoke checks', () => { expect(setup).toContain('holo make:channel orders.{orderId}') expect(setup).toContain('holo broadcast:work') expect(setup).toContain('npx holo broadcast:work') - expect(installation).toContain('bunx holo install broadcast') + expect(installation).toContain('npx holo install broadcast') }) it('covers drivers, auth endpoint, Flux helpers, deployment, and notifications bridge', async () => { diff --git a/packages/cache/tests/docs-smoke.test.ts b/packages/cache/tests/docs-smoke.test.ts index b7320731..a31f13ae 100644 --- a/packages/cache/tests/docs-smoke.test.ts +++ b/packages/cache/tests/docs-smoke.test.ts @@ -19,12 +19,13 @@ describe('cache documentation smoke checks', () => { expect(index).toContain('@holo-js/cache') expect(index).toContain('cache.remember(...)') expect(index).toContain('query.cache(...)') - expect(setup).toContain('bunx holo install cache') - expect(setup).toContain('bunx holo install cache --driver redis') - expect(setup).toContain('bunx holo install cache --driver database') - expect(setup).toContain('bunx holo cache:table') - expect(setup).toContain('bunx holo cache:clear') - expect(setup).toContain('bunx holo cache:forget dashboard.stats') + expect(setup).toContain('npx holo install cache') + expect(setup).toContain('npm create holo-js@latest my-app -- --package cache') + expect(setup).toContain('npx holo install cache --driver redis') + expect(setup).toContain('npx holo install cache --driver database') + expect(setup).toContain('npx holo cache:table') + expect(setup).toContain('npx holo cache:clear') + expect(setup).toContain('npx holo cache:forget dashboard.stats') expect(config).toContain("driver: 'memory'") expect(config).toContain("driver: 'file'") expect(config).toContain("driver: 'redis'") @@ -54,8 +55,8 @@ describe('cache documentation smoke checks', () => { expect(runtime).toContain('automatic invalidation') expect(runtime).toContain('joins') expect(runtime).toContain('subquery predicates') - expect(commands).toContain('bunx holo cache:table') - expect(commands).toContain('bunx holo cache:clear') - expect(commands).toContain('bunx holo cache:forget dashboard.stats') + expect(commands).toContain('npx holo cache:table') + expect(commands).toContain('npx holo cache:clear') + expect(commands).toContain('npx holo cache:forget dashboard.stats') }) }) diff --git a/packages/cli/src/metadata.ts b/packages/cli/src/metadata.ts index 9d58711d..c3545f41 100644 --- a/packages/cli/src/metadata.ts +++ b/packages/cli/src/metadata.ts @@ -5,10 +5,10 @@ export const ESBUILD_PACKAGE_VERSION = '^0.27.4' const HOLO_PACKAGE_RANGE = `^${HOLO_PACKAGE_VERSION}` export const SCAFFOLD_PACKAGE_MANAGER_VERSIONS = Object.freeze({ - bun: 'bun@1.3.9', npm: 'npm@latest', pnpm: 'pnpm@latest', yarn: 'yarn@stable', + bun: 'bun@1.3.9', } as const) export const SCAFFOLD_FRAMEWORK_VERSIONS = Object.freeze({ diff --git a/packages/cli/src/parsing.ts b/packages/cli/src/parsing.ts index 4a0c01cb..c267d4d4 100644 --- a/packages/cli/src/parsing.ts +++ b/packages/cli/src/parsing.ts @@ -4,7 +4,7 @@ import type { IoStreams, RawParsedInput, SupportedScaffoldOptionalPackage, NewPr export const SUPPORTED_NEW_FRAMEWORKS = ['nuxt', 'next', 'sveltekit'] as const export const SUPPORTED_NEW_DATABASE_DRIVERS = ['sqlite', 'mysql', 'postgres'] as const -export const SUPPORTED_NEW_PACKAGE_MANAGERS = ['bun', 'npm', 'pnpm', 'yarn'] as const +export const SUPPORTED_NEW_PACKAGE_MANAGERS = ['npm', 'pnpm', 'yarn', 'bun'] as const export const SUPPORTED_NEW_STORAGE_DISKS = ['local', 'public'] as const export const SUPPORTED_NEW_OPTIONAL_PACKAGES = ['storage', 'events', 'queue', 'validation', 'forms', 'auth', 'authorization', 'notifications', 'mail', 'broadcast', 'security', 'cache'] as const export const SUPPORTED_INSTALL_TARGETS = ['queue', 'events', 'auth', 'authorization', 'notifications', 'mail', 'broadcast', 'security', 'cache'] as const @@ -238,8 +238,8 @@ export async function resolveNewProjectInput( const packageManager = resolveStringFlag(input.flags, 'package-manager') ? normalizeChoice(resolveStringFlag(input.flags, 'package-manager'), SUPPORTED_NEW_PACKAGE_MANAGERS, 'package manager') : interactive - ? await prompts.choose('Package manager', SUPPORTED_NEW_PACKAGE_MANAGERS, 'bun') - : 'bun' + ? await prompts.choose('Package manager', SUPPORTED_NEW_PACKAGE_MANAGERS, 'npm') + : 'npm' const requestedOptionalPackages = collectMultiStringFlag(input.flags, 'package') let optionalPackages: readonly SupportedScaffoldOptionalPackage[] diff --git a/packages/cli/src/project/shared.ts b/packages/cli/src/project/shared.ts index b8193d40..246a4f36 100644 --- a/packages/cli/src/project/shared.ts +++ b/packages/cli/src/project/shared.ts @@ -142,7 +142,7 @@ export type GeneratedProjectRegistry = { export type SupportedScaffoldFramework = 'nuxt' | 'next' | 'sveltekit' -export type SupportedScaffoldPackageManager = 'bun' | 'npm' | 'pnpm' | 'yarn' +export type SupportedScaffoldPackageManager = 'npm' | 'pnpm' | 'yarn' | 'bun' export type SupportedScaffoldStorageDisk = 'local' | 'public' export type SupportedScaffoldOptionalPackage = 'storage' | 'events' | 'queue' | 'validation' | 'forms' | 'auth' | 'authorization' | 'notifications' | 'mail' | 'broadcast' | 'security' | 'cache' @@ -430,7 +430,7 @@ export const GENERATED_SVELTE_SERVER_HOOKS_PATH = join(GENERATED_ROOT, 'hooks.se export const CONFIG_EXTENSION_PRIORITY = ['.ts', '.mts', '.js', '.mjs', '.cts', '.cjs'] as const export const SUPPORTED_CONFIG_EXTENSIONS = new Set(CONFIG_EXTENSION_PRIORITY) export const SUPPORTED_SCAFFOLD_FRAMEWORKS = ['nuxt', 'next', 'sveltekit'] as const -export const SUPPORTED_SCAFFOLD_PACKAGE_MANAGERS = ['bun', 'npm', 'pnpm', 'yarn'] as const +export const SUPPORTED_SCAFFOLD_PACKAGE_MANAGERS = ['npm', 'pnpm', 'yarn', 'bun'] as const export const SUPPORTED_SCAFFOLD_STORAGE_DISKS = ['local', 'public'] as const export const SUPPORTED_SCAFFOLD_OPTIONAL_PACKAGES = ['storage', 'events', 'queue', 'validation', 'forms', 'auth', 'authorization', 'notifications', 'mail', 'broadcast', 'security', 'cache'] as const export const SUPPORTED_QUEUE_INSTALLER_DRIVERS = ['sync', 'redis', 'database'] as const diff --git a/packages/cli/tests/cli.test.ts b/packages/cli/tests/cli.test.ts index 24793290..6d5c33a7 100644 --- a/packages/cli/tests/cli.test.ts +++ b/packages/cli/tests/cli.test.ts @@ -3629,7 +3629,7 @@ export default defineCacheConfig({ projectName: 'optional-array-app', framework: 'nuxt', databaseDriver: 'sqlite', - packageManager: 'bun', + packageManager: 'npm', storageDefaultDisk: 'local', optionalPackages: ['forms', 'validation'], }) @@ -3642,7 +3642,7 @@ export default defineCacheConfig({ projectName: 'forms-app', framework: 'nuxt', databaseDriver: 'sqlite', - packageManager: 'bun', + packageManager: 'npm', storageDefaultDisk: 'local', optionalPackages: ['forms', 'validation'], }) @@ -3654,7 +3654,7 @@ export default defineCacheConfig({ projectName: 'defaults-app', framework: 'nuxt', databaseDriver: 'sqlite', - packageManager: 'bun', + packageManager: 'npm', storageDefaultDisk: 'local', optionalPackages: [], }) diff --git a/packages/mail/tests/docs-smoke.test.ts b/packages/mail/tests/docs-smoke.test.ts index 3728f815..7ddf9350 100644 --- a/packages/mail/tests/docs-smoke.test.ts +++ b/packages/mail/tests/docs-smoke.test.ts @@ -31,15 +31,15 @@ describe('mail documentation smoke checks', () => { const verification = await readFile(resolve(root, 'apps/docs/docs/auth/email-verification.md'), 'utf8') const reset = await readFile(resolve(root, 'apps/docs/docs/auth/password-reset.md'), 'utf8') - expect(setup).toContain('bunx holo install mail') + expect(setup).toContain('npx holo install mail') expect(setup).toContain('config/mail.ts') expect(setup).toContain('server/mail/') - expect(setup).toContain('bunx holo make:mail auth/verify-email') + expect(setup).toContain('npx holo make:mail auth/verify-email') expect(setup).toContain('--markdown') expect(setup).toContain('custom `renderView` runtime binding') expect(installation).toContain('mail') expect(installation).toContain('--package forms,validation,mail') - expect(verification).toContain('bunx holo install mail') + expect(verification).toContain('npx holo install mail') expect(reset).toContain('@holo-js/mail') }) diff --git a/packages/media/package.json b/packages/media/package.json index c2785e32..ec611b4a 100644 --- a/packages/media/package.json +++ b/packages/media/package.json @@ -16,8 +16,8 @@ "dist" ], "scripts": { - "build": "bun x tsup", - "stub": "bun x tsup", + "build": "tsup", + "stub": "tsup", "typecheck": "tsc -p tsconfig.json --noEmit", "test": "vitest --run" }, diff --git a/packages/notifications/tests/docs-smoke.test.ts b/packages/notifications/tests/docs-smoke.test.ts index 11d1f578..771f698f 100644 --- a/packages/notifications/tests/docs-smoke.test.ts +++ b/packages/notifications/tests/docs-smoke.test.ts @@ -29,7 +29,7 @@ describe('notifications documentation smoke checks', () => { const verification = await readFile(resolve(root, 'apps/docs/docs/auth/email-verification.md'), 'utf8') const reset = await readFile(resolve(root, 'apps/docs/docs/auth/password-reset.md'), 'utf8') - expect(setup).toContain('bunx holo install notifications') + expect(setup).toContain('npx holo install notifications') expect(setup).toContain('config/notifications.ts') expect(setup).toContain('create_notifications') expect(setup).toContain('email verification') diff --git a/packages/security/tests/docs-smoke.test.ts b/packages/security/tests/docs-smoke.test.ts index 0813450f..a5063c36 100644 --- a/packages/security/tests/docs-smoke.test.ts +++ b/packages/security/tests/docs-smoke.test.ts @@ -13,7 +13,7 @@ describe('security documentation smoke checks', () => { const security = await readDoc('apps/docs/docs/security.md') const installation = await readDoc('apps/docs/docs/installation.md') - expect(security).toContain('bunx holo install security') + expect(security).toContain('npx holo install security') expect(security).toContain('config/security.ts') expect(security).toContain('defineSecurityConfig') expect(security).toContain('limit.perMinute(5)')