mirror of
https://github.com/jakejarvis/stanza.git
synced 2026-07-16 18:05:58 -04:00
fix: correct npm init / bun create invocations and drop @latest tags from create-style commands
- Replace `npm create stanza@latest` → `npm init stanza` and `bun create stanza@latest` → `bun create stanza` in docs, SKILL.md, and `buildCommand` to match how these package managers actually resolve the initializer - Update the agents.mdx rule to reference `npm init` instead of `npm create` - Derive `init` vs `create` sub-command in `buildCommand` based on the selected package manager so generated install snippets are correct for npm
This commit is contained in:
@@ -26,7 +26,7 @@ That drops the skill into your agent's skill directory; the agent picks it up on
|
||||
A few rules on top of the [CLI surface](/docs/cli) keep agent runs predictable:
|
||||
|
||||
- **Discover before assuming.** The registry evolves — confirm any module id with [`npx -y stanza-cli@latest search`](/docs/cli#search) before passing it to `add`. Use the printed `category/id` value, not the display label.
|
||||
- **Prefer `npx` for automation.** `npx -y stanza-cli@latest <verb>` avoids the package-manager argument-forwarding ambiguity that `pnpm create` / `npm create` / `bun create` introduce.
|
||||
- **Prefer `npx` for automation.** `npx -y stanza-cli@latest <verb>` avoids the package-manager argument-forwarding ambiguity that `pnpm create` / `npm init` / `bun create` introduce.
|
||||
- **Preview with [`--dry-run`](/docs/cli#global-flags)** before mutating commands when you want to show the user what's about to happen.
|
||||
- **Respect the [dirty-worktree refusal](/docs/cli#global-flags).** Commit or stash first. Only reach for `--dangerously-allow-dirty` with the user's explicit approval.
|
||||
- **Pass [`--app=<id>`](/docs/cli#add)** to `add`/`remove` in multi-app projects. Single-app projects auto-target, but if `stanza.json`'s `apps` array has more than one entry, scripts should pass the flag explicitly rather than relying on cwd inference.
|
||||
|
||||
@@ -21,8 +21,8 @@ pnpm create stanza my-app
|
||||
The same command works across package managers:
|
||||
|
||||
```sh
|
||||
npm create stanza@latest -- my-app
|
||||
bun create stanza@latest my-app
|
||||
npm init stanza -- my-app
|
||||
bun create stanza my-app
|
||||
```
|
||||
|
||||
To run it without the wizard — in CI, for example — see [Non-interactive setup](/docs/getting-started#non-interactive-setup) below.
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"@tanstack/react-router-devtools": "^1.167.0",
|
||||
"@tanstack/react-start": "^1.168.14",
|
||||
"@vercel/analytics": "^2.0.1",
|
||||
"@vercel/functions": "^3.6.0",
|
||||
"@vercel/functions": "^3.6.1",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"fumadocs-core": "^16.9.1",
|
||||
|
||||
@@ -89,8 +89,8 @@ function TooltipContent({
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
<Arrow className="z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-none bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" />
|
||||
<Arrow className="size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-none bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" />
|
||||
<div className="relative z-10">{children}</div>
|
||||
</Popup>
|
||||
</Positioner>
|
||||
</Portal>
|
||||
|
||||
@@ -212,13 +212,14 @@ export function buildCommand(input: {
|
||||
pm?: PackageManager;
|
||||
}): string {
|
||||
const pm = input.pm ?? "pnpm";
|
||||
const command = pm === "npm" ? "init" : "create";
|
||||
const flags = categoryOrder
|
||||
.map((category) => {
|
||||
const ids = input.selections[category];
|
||||
return ids && ids.length > 0 ? `--${category}=${ids.join(",")}` : null;
|
||||
})
|
||||
.filter((s): s is string => Boolean(s));
|
||||
const base = `${pm} create stanza ${input.name}`;
|
||||
const base = `${pm} ${command} stanza ${input.name}`;
|
||||
if (flags.length === 0) return base;
|
||||
const separator = pm === "npm" ? " -- " : " ";
|
||||
return `${base}${separator}${flags.join(" ")}`;
|
||||
|
||||
+1
-1
@@ -28,5 +28,5 @@
|
||||
"typescript": "^6.0.3",
|
||||
"vite-plus": "catalog:"
|
||||
},
|
||||
"packageManager": "pnpm@10.33.4"
|
||||
"packageManager": "pnpm@10.34.1"
|
||||
}
|
||||
|
||||
Generated
+106
-16
@@ -141,8 +141,8 @@ importers:
|
||||
specifier: ^2.0.1
|
||||
version: 2.0.1(react@19.2.6)
|
||||
'@vercel/functions':
|
||||
specifier: ^3.6.0
|
||||
version: 3.6.0
|
||||
specifier: ^3.6.1
|
||||
version: 3.6.1
|
||||
class-variance-authority:
|
||||
specifier: ^0.7.1
|
||||
version: 0.7.1
|
||||
@@ -166,7 +166,7 @@ importers:
|
||||
version: 12.40.0(react-dom@19.2.6(react@19.2.6))(react@19.2.6)
|
||||
nitro:
|
||||
specifier: ^3.0.260522-beta
|
||||
version: 3.0.260522-beta(@vercel/functions@3.6.0)(@voidzero-dev/vite-plus-core@0.1.22(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0)(typescript@6.0.3))(chokidar@5.0.0)(dotenv@17.4.2)(jiti@2.7.0)(lru-cache@11.5.1)
|
||||
version: 3.0.260522-beta(@vercel/functions@3.6.1)(@voidzero-dev/vite-plus-core@0.1.22(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0)(typescript@6.0.3))(chokidar@5.0.0)(dotenv@17.4.2)(jiti@2.7.0)(lru-cache@11.5.1)
|
||||
posthog-node:
|
||||
specifier: ^5.35.5
|
||||
version: 5.35.5
|
||||
@@ -245,10 +245,10 @@ importers:
|
||||
version: '@voidzero-dev/vite-plus-core@0.1.22(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0)(typescript@6.0.3)'
|
||||
vite-plus:
|
||||
specifier: 'catalog:'
|
||||
version: 0.1.22(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0)(jsdom@29.1.1(@noble/hashes@1.8.0))(typescript@6.0.3)(vite@8.0.14(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0))
|
||||
version: 0.1.22(@types/node@25.9.1)(@voidzero-dev/vite-plus-core@0.1.22(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0)(typescript@6.0.3))(esbuild@0.28.0)(jiti@2.7.0)(jsdom@29.1.1(@noble/hashes@1.8.0))(typescript@6.0.3)
|
||||
vitest:
|
||||
specifier: npm:@voidzero-dev/vite-plus-test@^0.1.22
|
||||
version: '@voidzero-dev/vite-plus-test@0.1.22(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0)(jsdom@29.1.1(@noble/hashes@1.8.0))(typescript@6.0.3)(vite@8.0.14(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0))'
|
||||
version: '@voidzero-dev/vite-plus-test@0.1.22(@types/node@25.9.1)(@voidzero-dev/vite-plus-core@0.1.22(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0)(typescript@6.0.3))(esbuild@0.28.0)(jiti@2.7.0)(jsdom@29.1.1(@noble/hashes@1.8.0))(typescript@6.0.3)'
|
||||
|
||||
packages/codemods:
|
||||
dependencies:
|
||||
@@ -2472,8 +2472,8 @@ packages:
|
||||
vue-router:
|
||||
optional: true
|
||||
|
||||
'@vercel/functions@3.6.0':
|
||||
resolution: {integrity: sha512-Xj68JYqqJwtqFWJN7EWmFN7MOiUjv5whjw48UEKqQbg8r7hRkhuJhncTU0ba3jJCh/wxEuLWckrtsKcrHQraxw==}
|
||||
'@vercel/functions@3.6.1':
|
||||
resolution: {integrity: sha512-xz+zZvj/XE6KDHZ8kYNO25Axpjng/kTJd/87SwONa6hzlq94K69OdqH1ZC/CehbtwWknpeyHqUHmpnfoaCbLZQ==}
|
||||
engines: {node: '>= 20'}
|
||||
peerDependencies:
|
||||
'@aws-sdk/credential-provider-web-identity': '*'
|
||||
@@ -2481,8 +2481,8 @@ packages:
|
||||
'@aws-sdk/credential-provider-web-identity':
|
||||
optional: true
|
||||
|
||||
'@vercel/oidc@3.4.1':
|
||||
resolution: {integrity: sha512-H6B+/ig/GoahccL3WZjiHayHw1H5KhvTJNceqYulwfK9kkz5iul2hTmYzcJ7tTCQzyd0dutuL9xYFZCyLUqsog==}
|
||||
'@vercel/oidc@3.5.0':
|
||||
resolution: {integrity: sha512-jo7GgeJx2YMkjg9A28pFM5p88n5SnSHvDeNlf9898bRWiG9jPxwedj/gn/2XTw4UOTyQ50uHlrTGSlf/XU5tgw==}
|
||||
engines: {node: '>= 20'}
|
||||
|
||||
'@vitejs/plugin-react@6.0.2':
|
||||
@@ -7304,11 +7304,11 @@ snapshots:
|
||||
optionalDependencies:
|
||||
react: 19.2.6
|
||||
|
||||
'@vercel/functions@3.6.0':
|
||||
'@vercel/functions@3.6.1':
|
||||
dependencies:
|
||||
'@vercel/oidc': 3.4.1
|
||||
'@vercel/oidc': 3.5.0
|
||||
|
||||
'@vercel/oidc@3.4.1': {}
|
||||
'@vercel/oidc@3.5.0': {}
|
||||
|
||||
'@vitejs/plugin-react@6.0.2(@voidzero-dev/vite-plus-core@0.1.22(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0)(typescript@6.0.3))':
|
||||
dependencies:
|
||||
@@ -7360,6 +7360,47 @@ snapshots:
|
||||
'@voidzero-dev/vite-plus-linux-x64-musl@0.1.22':
|
||||
optional: true
|
||||
|
||||
'@voidzero-dev/vite-plus-test@0.1.22(@types/node@25.9.1)(@voidzero-dev/vite-plus-core@0.1.22(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0)(typescript@6.0.3))(esbuild@0.28.0)(jiti@2.7.0)(jsdom@29.1.1(@noble/hashes@1.8.0))(typescript@6.0.3)':
|
||||
dependencies:
|
||||
'@standard-schema/spec': 1.1.0
|
||||
'@types/chai': 5.2.3
|
||||
'@voidzero-dev/vite-plus-core': 0.1.22(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0)(typescript@6.0.3)
|
||||
es-module-lexer: 1.7.0
|
||||
obug: 2.1.1
|
||||
pixelmatch: 7.2.0
|
||||
pngjs: 7.0.0
|
||||
sirv: 3.0.2
|
||||
std-env: 4.1.0
|
||||
tinybench: 2.9.0
|
||||
tinyexec: 1.2.2
|
||||
tinyglobby: 0.2.16
|
||||
vite: '@voidzero-dev/vite-plus-core@0.1.22(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0)(typescript@6.0.3)'
|
||||
ws: 8.21.0
|
||||
optionalDependencies:
|
||||
'@types/node': 25.9.1
|
||||
jsdom: 29.1.1(@noble/hashes@1.8.0)
|
||||
transitivePeerDependencies:
|
||||
- '@arethetypeswrong/core'
|
||||
- '@tsdown/css'
|
||||
- '@tsdown/exe'
|
||||
- '@vitejs/devtools'
|
||||
- bufferutil
|
||||
- esbuild
|
||||
- jiti
|
||||
- less
|
||||
- publint
|
||||
- sass
|
||||
- sass-embedded
|
||||
- stylus
|
||||
- sugarss
|
||||
- terser
|
||||
- tsx
|
||||
- typescript
|
||||
- unplugin-unused
|
||||
- unrun
|
||||
- utf-8-validate
|
||||
- yaml
|
||||
|
||||
'@voidzero-dev/vite-plus-test@0.1.22(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0)(jsdom@29.1.1(@noble/hashes@1.8.0))(typescript@6.0.3)(vite@8.0.14(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0))':
|
||||
dependencies:
|
||||
'@standard-schema/spec': 1.1.0
|
||||
@@ -9203,7 +9244,7 @@ snapshots:
|
||||
|
||||
nf3@0.3.17: {}
|
||||
|
||||
nitro@3.0.260522-beta(@vercel/functions@3.6.0)(@voidzero-dev/vite-plus-core@0.1.22(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0)(typescript@6.0.3))(chokidar@5.0.0)(dotenv@17.4.2)(jiti@2.7.0)(lru-cache@11.5.1):
|
||||
nitro@3.0.260522-beta(@vercel/functions@3.6.1)(@voidzero-dev/vite-plus-core@0.1.22(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0)(typescript@6.0.3))(chokidar@5.0.0)(dotenv@17.4.2)(jiti@2.7.0)(lru-cache@11.5.1):
|
||||
dependencies:
|
||||
consola: 3.4.2
|
||||
crossws: 0.4.5(srvx@0.11.16)
|
||||
@@ -9218,7 +9259,7 @@ snapshots:
|
||||
rolldown: 1.0.3
|
||||
srvx: 0.11.16
|
||||
unenv: 2.0.0-rc.24
|
||||
unstorage: 2.0.0-alpha.7(@vercel/functions@3.6.0)(chokidar@5.0.0)(db0@0.3.4)(lru-cache@11.5.1)(ofetch@2.0.0-alpha.3)
|
||||
unstorage: 2.0.0-alpha.7(@vercel/functions@3.6.1)(chokidar@5.0.0)(db0@0.3.4)(lru-cache@11.5.1)(ofetch@2.0.0-alpha.3)
|
||||
optionalDependencies:
|
||||
dotenv: 17.4.2
|
||||
jiti: 2.7.0
|
||||
@@ -10286,9 +10327,9 @@ snapshots:
|
||||
picomatch: 4.0.4
|
||||
webpack-virtual-modules: 0.6.2
|
||||
|
||||
unstorage@2.0.0-alpha.7(@vercel/functions@3.6.0)(chokidar@5.0.0)(db0@0.3.4)(lru-cache@11.5.1)(ofetch@2.0.0-alpha.3):
|
||||
unstorage@2.0.0-alpha.7(@vercel/functions@3.6.1)(chokidar@5.0.0)(db0@0.3.4)(lru-cache@11.5.1)(ofetch@2.0.0-alpha.3):
|
||||
optionalDependencies:
|
||||
'@vercel/functions': 3.6.0
|
||||
'@vercel/functions': 3.6.1
|
||||
chokidar: 5.0.0
|
||||
db0: 0.3.4
|
||||
lru-cache: 11.5.1
|
||||
@@ -10361,6 +10402,55 @@ snapshots:
|
||||
d3-time: 3.1.0
|
||||
d3-timer: 3.0.1
|
||||
|
||||
vite-plus@0.1.22(@types/node@25.9.1)(@voidzero-dev/vite-plus-core@0.1.22(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0)(typescript@6.0.3))(esbuild@0.28.0)(jiti@2.7.0)(jsdom@29.1.1(@noble/hashes@1.8.0))(typescript@6.0.3):
|
||||
dependencies:
|
||||
'@oxc-project/types': 0.129.0
|
||||
'@oxlint/plugins': 1.61.0
|
||||
'@voidzero-dev/vite-plus-core': 0.1.22(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0)(typescript@6.0.3)
|
||||
'@voidzero-dev/vite-plus-test': 0.1.22(@types/node@25.9.1)(@voidzero-dev/vite-plus-core@0.1.22(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0)(typescript@6.0.3))(esbuild@0.28.0)(jiti@2.7.0)(jsdom@29.1.1(@noble/hashes@1.8.0))(typescript@6.0.3)
|
||||
oxfmt: 0.48.0
|
||||
oxlint: 1.63.0(oxlint-tsgolint@0.22.1)
|
||||
oxlint-tsgolint: 0.22.1
|
||||
optionalDependencies:
|
||||
'@voidzero-dev/vite-plus-darwin-arm64': 0.1.22
|
||||
'@voidzero-dev/vite-plus-darwin-x64': 0.1.22
|
||||
'@voidzero-dev/vite-plus-linux-arm64-gnu': 0.1.22
|
||||
'@voidzero-dev/vite-plus-linux-arm64-musl': 0.1.22
|
||||
'@voidzero-dev/vite-plus-linux-x64-gnu': 0.1.22
|
||||
'@voidzero-dev/vite-plus-linux-x64-musl': 0.1.22
|
||||
'@voidzero-dev/vite-plus-win32-arm64-msvc': 0.1.22
|
||||
'@voidzero-dev/vite-plus-win32-x64-msvc': 0.1.22
|
||||
transitivePeerDependencies:
|
||||
- '@arethetypeswrong/core'
|
||||
- '@edge-runtime/vm'
|
||||
- '@opentelemetry/api'
|
||||
- '@tsdown/css'
|
||||
- '@tsdown/exe'
|
||||
- '@types/node'
|
||||
- '@vitejs/devtools'
|
||||
- '@vitest/coverage-istanbul'
|
||||
- '@vitest/coverage-v8'
|
||||
- '@vitest/ui'
|
||||
- bufferutil
|
||||
- esbuild
|
||||
- happy-dom
|
||||
- jiti
|
||||
- jsdom
|
||||
- less
|
||||
- publint
|
||||
- sass
|
||||
- sass-embedded
|
||||
- stylus
|
||||
- sugarss
|
||||
- terser
|
||||
- tsx
|
||||
- typescript
|
||||
- unplugin-unused
|
||||
- unrun
|
||||
- utf-8-validate
|
||||
- vite
|
||||
- yaml
|
||||
|
||||
vite-plus@0.1.22(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0)(jsdom@29.1.1(@noble/hashes@1.8.0))(typescript@6.0.3)(vite@8.0.14(@types/node@25.9.1)(esbuild@0.28.0)(jiti@2.7.0)):
|
||||
dependencies:
|
||||
'@oxc-project/types': 0.129.0
|
||||
|
||||
@@ -21,9 +21,9 @@ npx -y stanza-cli@latest init my-app --yes --framework=next
|
||||
- If the user wants create-style commands, use the correct separator for their package manager:
|
||||
|
||||
```sh
|
||||
pnpm create stanza@latest my-app --yes --framework=next
|
||||
npm create stanza@latest -- my-app --yes --framework=next
|
||||
bun create stanza@latest my-app --yes --framework=next
|
||||
pnpm create stanza my-app --yes --framework=next
|
||||
npm init stanza -- my-app --yes --framework=next
|
||||
bun create stanza my-app --yes --framework=next
|
||||
```
|
||||
|
||||
## Non-Interactive Workflow
|
||||
|
||||
+1
-2
@@ -3,8 +3,7 @@ import { defineConfig } from "vite-plus";
|
||||
export default defineConfig({
|
||||
run: {
|
||||
cache: {
|
||||
scripts: true,
|
||||
tasks: true,
|
||||
tasks: false,
|
||||
},
|
||||
},
|
||||
staged: {
|
||||
|
||||
Reference in New Issue
Block a user