create-cartwright 2.0.6 → 2.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +19 -3
- package/dist/index.js.map +1 -1
- package/dist/inject.d.ts +21 -0
- package/dist/inject.js +128 -1
- package/dist/inject.js.map +1 -1
- package/dist/skills.d.ts +43 -0
- package/dist/skills.js +97 -0
- package/dist/skills.js.map +1 -0
- package/dist/skills.test.d.ts +1 -0
- package/dist/skills.test.js +117 -0
- package/dist/skills.test.js.map +1 -0
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* [--ref=stable|next|<tag-or-branch>]
|
|
9
9
|
* [--template=website-corporate|coffee|sunglasses|agent-marketplace|generic]
|
|
10
10
|
* [--pm=pnpm|npm|yarn|bun]
|
|
11
|
-
* [--no-install] [--no-git]
|
|
11
|
+
* [--no-install] [--no-git] [--skip-skills]
|
|
12
12
|
*
|
|
13
13
|
* Channels:
|
|
14
14
|
* --ref stable (default) → latest tagged template release
|
|
@@ -37,7 +37,7 @@ const TEMPLATE_REPO = "github:Teloz1870/cartwright-template";
|
|
|
37
37
|
// Bump together with a Changeset whenever a new template tag goes out —
|
|
38
38
|
// .github/workflows/bump-template-ref.yml does this automatically by opening
|
|
39
39
|
// a PR when it sees a newer tag on the public mirror.
|
|
40
|
-
const DEFAULT_REF = "v0.
|
|
40
|
+
const DEFAULT_REF = "v0.8.0";
|
|
41
41
|
// Channel aliases the user can pass via --ref.
|
|
42
42
|
// stable → DEFAULT_REF (latest tag — what default `npx create-cartwright` uses)
|
|
43
43
|
// next → bleeding-edge branch on the mirror, updated on every push to
|
|
@@ -50,7 +50,8 @@ import { TEMPLATE_SLUGS, detectPackageManager, generateAuthSecret, patchEnvLocal
|
|
|
50
50
|
import { resolveKeyMode } from "./key-step.js";
|
|
51
51
|
import { runInterview } from "./interview.js";
|
|
52
52
|
import { summarizeBuild } from "./approve.js";
|
|
53
|
-
import { injectBriefFiles } from "./inject.js";
|
|
53
|
+
import { injectBriefFiles, injectModernWebDoc } from "./inject.js";
|
|
54
|
+
import { installModernWebGuidance } from "./skills.js";
|
|
54
55
|
function exitOnCancel(value) {
|
|
55
56
|
if (isCancel(value)) {
|
|
56
57
|
cancel("Cancelled.");
|
|
@@ -95,6 +96,7 @@ async function run() {
|
|
|
95
96
|
template: { type: "string" },
|
|
96
97
|
"no-install": { type: "boolean" },
|
|
97
98
|
"no-git": { type: "boolean" },
|
|
99
|
+
"skip-skills": { type: "boolean" },
|
|
98
100
|
},
|
|
99
101
|
});
|
|
100
102
|
// Validate --template if provided. Default is "generic" (full webshop
|
|
@@ -189,6 +191,7 @@ async function run() {
|
|
|
189
191
|
const packageManager = values.pm ?? detected;
|
|
190
192
|
const installDeps = !values["no-install"];
|
|
191
193
|
const initGit = !values["no-git"];
|
|
194
|
+
const skipSkills = values["skip-skills"] === true;
|
|
192
195
|
const requestedRef = values.ref ?? "stable";
|
|
193
196
|
const templateRef = REF_ALIASES[requestedRef] ?? requestedRef;
|
|
194
197
|
// ── Pre-flight ──────────────────────────────────────────────────────────
|
|
@@ -233,6 +236,10 @@ async function run() {
|
|
|
233
236
|
// known shape. Always run — for `--template generic` (the default) the
|
|
234
237
|
// patches are no-ops on a generic-defaulted brand.config.
|
|
235
238
|
applyTemplateDefaults(targetDir, templateSlug);
|
|
239
|
+
// Phase D4 — write a customer-facing MODERN_WEB.md inventory listing every
|
|
240
|
+
// modern web platform feature Cartwright wires up out of the box. Doubles
|
|
241
|
+
// as marketing copy for the customer to lift into their own product page.
|
|
242
|
+
injectModernWebDoc(targetDir);
|
|
236
243
|
if (templateSlug !== "generic") {
|
|
237
244
|
note(`Template: ${pc.bold(templateSlug)} — applied mode + features defaults to brand.config.ts`, "info");
|
|
238
245
|
}
|
|
@@ -255,6 +262,15 @@ async function run() {
|
|
|
255
262
|
installSpinner.stop(pc.yellow(`Install failed — run \`${packageManager} install\` in ${projectName} manually.`));
|
|
256
263
|
}
|
|
257
264
|
}
|
|
265
|
+
// ── AI-agent skills ─────────────────────────────────────────────────────
|
|
266
|
+
// Cartwright's own skill (cartwright-guidance) ships in the template under
|
|
267
|
+
// .claude/skills/. This additional step installs Chrome team's upstream
|
|
268
|
+
// modern-web-guidance skill globally on the customer's machine. Best-effort:
|
|
269
|
+
// declines, timeouts, and errors degrade to a note — never block scaffold.
|
|
270
|
+
await installModernWebGuidance(targetDir, {
|
|
271
|
+
skip: skipSkills,
|
|
272
|
+
assumeYes: values.yes === true,
|
|
273
|
+
});
|
|
258
274
|
// ── Next steps ──────────────────────────────────────────────────────────
|
|
259
275
|
const runCmd = packageManager === "npm" ? "npm run" : packageManager;
|
|
260
276
|
const aiHint = withAi
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,MAAM,EACN,OAAO,EACP,MAAM,EACN,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,QAAQ,GACT,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,aAAa,GAAG,sCAAsC,CAAC;AAE7D,+EAA+E;AAC/E,wEAAwE;AACxE,6EAA6E;AAC7E,sDAAsD;AACtD,MAAM,WAAW,GAAG,QAAQ,CAAC;AAE7B,+CAA+C;AAC/C,kFAAkF;AAClF,0EAA0E;AAC1E,gFAA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AC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE;QAC1D,EAAE;QACF,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC;QACtB,QAAQ,SAAS,EAAE;QACnB,iCAAiC,EAAE,CAAC,GAAG,CAAC,+BAA+B,CAAC,EAAE;QAC1E,iCAAiC,EAAE,CAAC,GAAG,CAAC,mCAAmC,CAAC,EAAE;QAC9E,KAAK,MAAM,uBAAuB,EAAE,CAAC,GAAG,CAAC,yBAAyB,CAAC,EAAE;QACrE,EAAE;QACF,YAAY,CAAC,QAAQ,CAAC;QACtB,MAAM;QACN,EAAE;QACF,EAAE,CAAC,IAAI,CAAC,sBAAsB,CAAC;QAC/B,EAAE,CAAC,GAAG,CAAC,sEAAsE,CAAC;QAC9E,EAAE,CAAC,GAAG,CAAC,kDAAkD,CAAC;QAC1D,EAAE;QACF,EAAE,CAAC,GAAG,CAAC,kEAAkE,CAAC;QAC1E,EAAE,CAAC,GAAG,CAAC,2DAA2D,CAAC;KACpE;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,KAAK,CAAC,KAAK,CAAC,CAAC;AACf,CAAC;AAED,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IAClB,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAE,GAAG,CAAC,CAAC;IAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/inject.d.ts
CHANGED
|
@@ -1,2 +1,23 @@
|
|
|
1
1
|
import { type ShopBrief } from "./brief.js";
|
|
2
2
|
export declare function injectBriefFiles(targetDir: string, brief: ShopBrief): void;
|
|
3
|
+
/**
|
|
4
|
+
* Phase D4 — write `MODERN_WEB.md` into the scaffolded project listing
|
|
5
|
+
* every modern web platform feature Cartwright wires up out of the box.
|
|
6
|
+
*
|
|
7
|
+
* The doc is meant for two audiences:
|
|
8
|
+
*
|
|
9
|
+
* 1. The customer's AI coding agent (Claude Code / Cursor / Copilot) —
|
|
10
|
+
* so when the agent reads the project, it has a clear inventory of
|
|
11
|
+
* the platform features available without having to grep the source.
|
|
12
|
+
* 2. The customer's own marketing — every entry here is something the
|
|
13
|
+
* customer can claim about their site, lifted straight into a
|
|
14
|
+
* product page, About section, or developer blurb.
|
|
15
|
+
*
|
|
16
|
+
* Unconditional injection: every scaffold gets the file. Feature flags
|
|
17
|
+
* are listed alongside each entry so the customer can see what is on by
|
|
18
|
+
* default vs opt-in for their template (`brand.features.*`).
|
|
19
|
+
*
|
|
20
|
+
* Idempotent: callers can safely re-run; the file is always overwritten
|
|
21
|
+
* with the current snapshot of features the CLI knows about.
|
|
22
|
+
*/
|
|
23
|
+
export declare function injectModernWebDoc(targetDir: string): void;
|
package/dist/inject.js
CHANGED
|
@@ -15,7 +15,134 @@ export function injectBriefFiles(targetDir, brief) {
|
|
|
15
15
|
writeFileSync(join(cssDir, `${brief.slug}.css`), generateThemeCss(brief));
|
|
16
16
|
writeFileSync(join(promptsDir, `${brief.slug}.ts`), generatePromptModule(brief));
|
|
17
17
|
writeFileSync(join(seedsDir, "seed-data.ts"), generateSeedData(brief));
|
|
18
|
-
// TODO: Opdater industry-templates/index.ts for at registrere den nye seed, men
|
|
18
|
+
// TODO: Opdater industry-templates/index.ts for at registrere den nye seed, men
|
|
19
19
|
// det falder måske under advanced M2 scope, eller vi kan lave et simpelt append her:
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Phase D4 — write `MODERN_WEB.md` into the scaffolded project listing
|
|
23
|
+
* every modern web platform feature Cartwright wires up out of the box.
|
|
24
|
+
*
|
|
25
|
+
* The doc is meant for two audiences:
|
|
26
|
+
*
|
|
27
|
+
* 1. The customer's AI coding agent (Claude Code / Cursor / Copilot) —
|
|
28
|
+
* so when the agent reads the project, it has a clear inventory of
|
|
29
|
+
* the platform features available without having to grep the source.
|
|
30
|
+
* 2. The customer's own marketing — every entry here is something the
|
|
31
|
+
* customer can claim about their site, lifted straight into a
|
|
32
|
+
* product page, About section, or developer blurb.
|
|
33
|
+
*
|
|
34
|
+
* Unconditional injection: every scaffold gets the file. Feature flags
|
|
35
|
+
* are listed alongside each entry so the customer can see what is on by
|
|
36
|
+
* default vs opt-in for their template (`brand.features.*`).
|
|
37
|
+
*
|
|
38
|
+
* Idempotent: callers can safely re-run; the file is always overwritten
|
|
39
|
+
* with the current snapshot of features the CLI knows about.
|
|
40
|
+
*/
|
|
41
|
+
export function injectModernWebDoc(targetDir) {
|
|
42
|
+
writeFileSync(join(targetDir, "MODERN_WEB.md"), MODERN_WEB_MD);
|
|
43
|
+
}
|
|
44
|
+
const MODERN_WEB_MD = `# Cartwright Modern Web Baseline
|
|
45
|
+
|
|
46
|
+
Your Cartwright store ships with these modern web platform features wired up out of the box. Each one is built into Cartwright's default code — you don't need to write the boilerplate. Some are on by default; some are opt-in via \`brand.features.*\` in your \`brand.config.ts\`.
|
|
47
|
+
|
|
48
|
+
**For your AI coding agent:** this file is a directory of capabilities. Whenever you're asked to "add a modal", "speed up the cart", "make the page accessible", reach for the listed primitive first, not a third-party library.
|
|
49
|
+
|
|
50
|
+
**For your marketing:** every line here is a real, shipping feature you can list on your product page.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Structured data (the AI-citation lever)
|
|
55
|
+
|
|
56
|
+
| Feature | Status | Where |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| JSON-LD: \`Organization\` | ✅ on root layout | \`components/JsonLd.tsx\` |
|
|
59
|
+
| JSON-LD: \`Product\` + \`Offer\` | ✅ on every PDP | \`app/[locale]/product/[slug]/page.tsx\` |
|
|
60
|
+
| JSON-LD: \`BreadcrumbList\` | ✅ on PLP + PDP | server-side via JsonLd helper |
|
|
61
|
+
| JSON-LD: \`AggregateRating\` | gated by \`brand.features.reviews\` | rendered on PDP when reviews are on |
|
|
62
|
+
|
|
63
|
+
Schema.org markup is what AI search engines (Google AI Overviews, Perplexity, ChatGPT browse) cite. Cartwright ships all structured data server-side — crawlers and LLM-scrapers see it without executing JS.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Accessibility baseline (Phase B1)
|
|
68
|
+
|
|
69
|
+
| Feature | Status | Where |
|
|
70
|
+
|---|---|---|
|
|
71
|
+
| \`aria-live\` announcements (cart adds, review submits, errors) | ✅ always on | \`components/a11y/LiveRegion.tsx\` |
|
|
72
|
+
| \`prefers-reduced-motion\` respected | ✅ in globals.css + components | \`app/[locale]/globals.css\`, RevealOnScroll |
|
|
73
|
+
| Focus management on modals | gated by \`brand.features.popoverApi\` | native \`<dialog>\` when on |
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Performance baseline (Phase 0 + B2)
|
|
78
|
+
|
|
79
|
+
| Feature | Status | Where |
|
|
80
|
+
|---|---|---|
|
|
81
|
+
| Self-hosted Web Vitals (INP/LCP/CLS/FCP/TTFB) | gated by \`brand.features.webVitals\` | \`/api/vitals\` + \`/admin/performance\` |
|
|
82
|
+
| \`fetchpriority="high"\` on LCP candidates | ✅ via next/image \`priority\` prop | PDP hero, PLP first cards |
|
|
83
|
+
| \`loading="lazy"\` below the fold | ✅ next/image default + manual on raw imgs | every \`<Image>\` below-fold |
|
|
84
|
+
| \`decoding="async"\` on raw imgs | ✅ on case studies + tech badges | various |
|
|
85
|
+
| Save-data respect on heavy assets | ✅ in HeroVideo | \`components/HeroVideo.tsx\` |
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Modern UI primitives (Phase B3 + B4)
|
|
90
|
+
|
|
91
|
+
| Feature | Status | Where |
|
|
92
|
+
|---|---|---|
|
|
93
|
+
| Container queries on ProductCard | gated by \`brand.features.containerQueries\` | \`@sm:\` Tailwind v4 variants |
|
|
94
|
+
| Native \`<dialog>\` + Popover API for modals | gated by \`brand.features.popoverApi\` | \`components/WelcomeGuide.tsx\` |
|
|
95
|
+
| Runtime feature detection (\`<dialog>\`, popover, view transitions) | ✅ always available | \`lib/features.ts\` |
|
|
96
|
+
| CSS \`interpolate-size\` on native \`<details>\` | ✅ Phase 1a | accordion + FAQ sections |
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Navigation (Phase B5)
|
|
101
|
+
|
|
102
|
+
| Feature | Status | Where |
|
|
103
|
+
|---|---|---|
|
|
104
|
+
| View Transitions on PLP → PDP | gated by \`brand.features.viewTransitions\` | \`app/lib/view-transitions.ts\`, \`TransitionLink\` |
|
|
105
|
+
| Shared \`view-transition-name\` on hero image | ✅ when viewTransitions flag is on | PLP card + PDP hero |
|
|
106
|
+
| Graceful fallback in non-supporting browsers (Firefox) | ✅ automatic | wrapNavigation runs nav directly |
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Authentication (Phase 5b)
|
|
111
|
+
|
|
112
|
+
| Feature | Status | Where |
|
|
113
|
+
|---|---|---|
|
|
114
|
+
| Passkey UI scaffolding | gated by \`brand.features.passkeys\` | \`/account/security\`, \`/api/auth/passkey/*\` |
|
|
115
|
+
| Magic-link fallback | ✅ always on | NextAuth + Resend |
|
|
116
|
+
|
|
117
|
+
> WebAuthn ceremony wiring is in progress. Check the \`cartwright-guidance\` skill for current status.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## AI-agent integrations
|
|
122
|
+
|
|
123
|
+
| Feature | Status | Where |
|
|
124
|
+
|---|---|---|
|
|
125
|
+
| Project-level \`CLAUDE.md\` for Claude Code | ✅ shipped in scaffold | \`.claude/CLAUDE.md\` |
|
|
126
|
+
| Project-level Cursor rules | ✅ shipped in scaffold | \`.cursor/rules/cartwright.mdc\` |
|
|
127
|
+
| GitHub Copilot instructions | ✅ shipped in scaffold | \`.github/copilot-instructions.md\` |
|
|
128
|
+
| \`cartwright-guidance\` agent skill | ✅ shipped in scaffold | \`.claude/skills/cartwright-guidance/SKILL.md\` |
|
|
129
|
+
| \`modern-web-guidance\` (Chrome team) skill | installed during scaffold (optional) | global \`~/.agents/skills/\` |
|
|
130
|
+
| MCP server (\`/api/mcp\`) | gated by \`brand.features.mcpPublic\` | exposes tools to AI agents |
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Turning features on
|
|
135
|
+
|
|
136
|
+
Open \`brand.config.ts\`, find the \`features\` object, and flip the flag from \`false\` to \`true\`. Each flag has a JSDoc comment explaining what it switches on and any dependencies.
|
|
137
|
+
|
|
138
|
+
Typical first steps for a fresh shop:
|
|
139
|
+
- \`webshop: true\` — unlock cart, checkout, account routes (set automatically by \`--template coffee\` / \`--template sunglasses\` / \`--template generic\`)
|
|
140
|
+
- \`webVitals: true\` (after \`consentBanner: true\`) — start collecting CWV data on real customer traffic
|
|
141
|
+
- \`reviews: true\` — turn on the moderation flow and \`AggregateRating\` JSON-LD
|
|
142
|
+
- \`containerQueries: true\`, \`popoverApi: true\`, \`viewTransitions: true\` — opt in to the Phase B baseline
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
_Generated by \`create-cartwright\`. Edit freely — Cartwright won't overwrite this file on later runs._
|
|
147
|
+
`;
|
|
21
148
|
//# sourceMappingURL=inject.js.map
|
package/dist/inject.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inject.js","sourceRoot":"","sources":["../src/inject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE/F,MAAM,UAAU,gBAAgB,CAAC,SAAiB,EAAE,KAAgB;IAClE,eAAe;IACf,MAAM,MAAM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 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pinned version of the upstream skill. modern-web-guidance is pre-1.0
|
|
3
|
+
* (last surveyed: 2026-05-26), so an unpinned `@latest` would risk silent
|
|
4
|
+
* API drift between scaffolds. A scheduled workflow in
|
|
5
|
+
* `.github/workflows/bump-modern-web-guidance.yml` opens a PR when a newer
|
|
6
|
+
* version appears upstream; merge gates on manual review of the changelog.
|
|
7
|
+
*
|
|
8
|
+
* Once upstream hits 1.0, switch this to a semver range like "^1.0.0" and
|
|
9
|
+
* retire the bump workflow.
|
|
10
|
+
*/
|
|
11
|
+
export declare const MODERN_WEB_GUIDANCE_VERSION = "0.0.170";
|
|
12
|
+
/**
|
|
13
|
+
* Generous upper bound. modern-web-guidance is ~36 MB; on a typical
|
|
14
|
+
* connection the install finishes in 10–20s. 30s gives slow networks room
|
|
15
|
+
* without making the customer wait forever on a hung registry call.
|
|
16
|
+
*/
|
|
17
|
+
export declare const SKILL_INSTALL_TIMEOUT_MS = 30000;
|
|
18
|
+
export type InstallSkillOpts = {
|
|
19
|
+
/** Skip the prompt entirely (set by --skip-skills). */
|
|
20
|
+
skip?: boolean;
|
|
21
|
+
/** Bypass the prompt and install unconditionally (set by --yes). */
|
|
22
|
+
assumeYes?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export type InstallSkillResult = {
|
|
25
|
+
status: "skipped";
|
|
26
|
+
reason: "flag" | "declined" | "cancelled";
|
|
27
|
+
} | {
|
|
28
|
+
status: "installed";
|
|
29
|
+
version: string;
|
|
30
|
+
} | {
|
|
31
|
+
status: "failed";
|
|
32
|
+
reason: "timeout" | "error";
|
|
33
|
+
error?: Error;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Side-effecting npx install. Separated from the prompt flow so the test
|
|
37
|
+
* suite can stub it directly. Never throws; always returns a result struct.
|
|
38
|
+
*/
|
|
39
|
+
export declare function tryInstallSkill(targetDir: string): InstallSkillResult;
|
|
40
|
+
/**
|
|
41
|
+
* Prompt + install. Best-effort; never blocks scaffold completion.
|
|
42
|
+
*/
|
|
43
|
+
export declare function installModernWebGuidance(targetDir: string, opts?: InstallSkillOpts): Promise<InstallSkillResult>;
|
package/dist/skills.js
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI-agent skills installer.
|
|
3
|
+
*
|
|
4
|
+
* After the template snapshot is downloaded and dependencies installed, the
|
|
5
|
+
* CLI optionally runs Chrome team's `modern-web-guidance` skill installer in
|
|
6
|
+
* the customer's project directory. That places the skill in their machine's
|
|
7
|
+
* agent-skills location (typically `~/.agents/skills/`) so Claude Code,
|
|
8
|
+
* Cursor, and Copilot all see it on first session.
|
|
9
|
+
*
|
|
10
|
+
* The Cartwright-specific skill scaffolding (`.claude/skills/cartwright-guidance/`,
|
|
11
|
+
* `.cursor/rules/`, `.github/copilot-instructions.md`) is part of the template
|
|
12
|
+
* itself and ships unconditionally — this module only handles the upstream
|
|
13
|
+
* Chrome-team install.
|
|
14
|
+
*
|
|
15
|
+
* Best-effort throughout: declines, timeouts, and errors degrade gracefully
|
|
16
|
+
* to a printed note. The scaffold itself never fails because of this step.
|
|
17
|
+
*/
|
|
18
|
+
import { execSync } from "node:child_process";
|
|
19
|
+
import { confirm, isCancel, note, spinner } from "@clack/prompts";
|
|
20
|
+
import pc from "picocolors";
|
|
21
|
+
/**
|
|
22
|
+
* Pinned version of the upstream skill. modern-web-guidance is pre-1.0
|
|
23
|
+
* (last surveyed: 2026-05-26), so an unpinned `@latest` would risk silent
|
|
24
|
+
* API drift between scaffolds. A scheduled workflow in
|
|
25
|
+
* `.github/workflows/bump-modern-web-guidance.yml` opens a PR when a newer
|
|
26
|
+
* version appears upstream; merge gates on manual review of the changelog.
|
|
27
|
+
*
|
|
28
|
+
* Once upstream hits 1.0, switch this to a semver range like "^1.0.0" and
|
|
29
|
+
* retire the bump workflow.
|
|
30
|
+
*/
|
|
31
|
+
export const MODERN_WEB_GUIDANCE_VERSION = "0.0.170";
|
|
32
|
+
/**
|
|
33
|
+
* Generous upper bound. modern-web-guidance is ~36 MB; on a typical
|
|
34
|
+
* connection the install finishes in 10–20s. 30s gives slow networks room
|
|
35
|
+
* without making the customer wait forever on a hung registry call.
|
|
36
|
+
*/
|
|
37
|
+
export const SKILL_INSTALL_TIMEOUT_MS = 30_000;
|
|
38
|
+
/**
|
|
39
|
+
* Side-effecting npx install. Separated from the prompt flow so the test
|
|
40
|
+
* suite can stub it directly. Never throws; always returns a result struct.
|
|
41
|
+
*/
|
|
42
|
+
export function tryInstallSkill(targetDir) {
|
|
43
|
+
try {
|
|
44
|
+
execSync(`npx --yes modern-web-guidance@${MODERN_WEB_GUIDANCE_VERSION} install --yes`, {
|
|
45
|
+
cwd: targetDir,
|
|
46
|
+
stdio: "ignore",
|
|
47
|
+
timeout: SKILL_INSTALL_TIMEOUT_MS,
|
|
48
|
+
});
|
|
49
|
+
return { status: "installed", version: MODERN_WEB_GUIDANCE_VERSION };
|
|
50
|
+
}
|
|
51
|
+
catch (err) {
|
|
52
|
+
const error = err;
|
|
53
|
+
// execSync kills the child with SIGTERM (default `killSignal`) when the
|
|
54
|
+
// timeout fires; some environments also surface ETIMEDOUT.
|
|
55
|
+
if (error.signal === "SIGTERM" || error.code === "ETIMEDOUT") {
|
|
56
|
+
return { status: "failed", reason: "timeout", error };
|
|
57
|
+
}
|
|
58
|
+
return { status: "failed", reason: "error", error };
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Prompt + install. Best-effort; never blocks scaffold completion.
|
|
63
|
+
*/
|
|
64
|
+
export async function installModernWebGuidance(targetDir, opts = {}) {
|
|
65
|
+
if (opts.skip) {
|
|
66
|
+
return { status: "skipped", reason: "flag" };
|
|
67
|
+
}
|
|
68
|
+
let accept = opts.assumeYes === true;
|
|
69
|
+
if (!opts.assumeYes) {
|
|
70
|
+
const answer = await confirm({
|
|
71
|
+
message: "Install Chrome team's Modern Web Guidance skill for your AI coding agent? (recommended)",
|
|
72
|
+
initialValue: true,
|
|
73
|
+
});
|
|
74
|
+
if (isCancel(answer)) {
|
|
75
|
+
return { status: "skipped", reason: "cancelled" };
|
|
76
|
+
}
|
|
77
|
+
accept = answer === true;
|
|
78
|
+
}
|
|
79
|
+
if (!accept) {
|
|
80
|
+
note(pc.dim(`Skipped. Install later with:\n npx modern-web-guidance@${MODERN_WEB_GUIDANCE_VERSION} install`), "info");
|
|
81
|
+
return { status: "skipped", reason: "declined" };
|
|
82
|
+
}
|
|
83
|
+
const sp = spinner();
|
|
84
|
+
sp.start(`Installing modern-web-guidance@${MODERN_WEB_GUIDANCE_VERSION} (Chrome team)…`);
|
|
85
|
+
const result = tryInstallSkill(targetDir);
|
|
86
|
+
if (result.status === "installed") {
|
|
87
|
+
sp.stop(pc.green(`Modern Web Guidance skill installed (v${result.version}).`));
|
|
88
|
+
}
|
|
89
|
+
else if (result.reason === "timeout") {
|
|
90
|
+
sp.stop(pc.yellow(`Modern Web Guidance install timed out after ${SKILL_INSTALL_TIMEOUT_MS / 1000}s — run \`npx modern-web-guidance@${MODERN_WEB_GUIDANCE_VERSION} install\` manually later.`));
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
sp.stop(pc.yellow(`Modern Web Guidance install failed — run \`npx modern-web-guidance@${MODERN_WEB_GUIDANCE_VERSION} install\` manually later.`));
|
|
94
|
+
}
|
|
95
|
+
return result;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=skills.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../src/skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B;;;;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AC,CAAC;QACH,IAAI,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YACrB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;QACpD,CAAC;QACD,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IAC3B,CAAC;IAED,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,IAAI,CACF,EAAE,CAAC,GAAG,CACJ,2DAA2D,2BAA2B,UAAU,CACjG,EACD,MAAM,CACP,CAAC;QACF,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;IACnD,CAAC;IAED,MAAM,EAAE,GAAG,OAAO,EAAE,CAAC;IACrB,EAAE,CAAC,KAAK,CACN,kCAAkC,2BAA2B,iBAAiB,CAC/E,CAAC;IACF,MAAM,MAAM,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;IAE1C,IAAI,MAAM,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,EAAE,CAAC,IAAI,CACL,EAAE,CAAC,KAAK,CAAC,yCAAyC,MAAM,CAAC,OAAO,IAAI,CAAC,CACtE,CAAC;IACJ,CAAC;SAAM,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QACvC,EAAE,CAAC,IAAI,CACL,EAAE,CAAC,MAAM,CACP,+CAA+C,wBAAwB,GAAG,IAAI,qCAAqC,2BAA2B,4BAA4B,CAC3K,CACF,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,EAAE,CAAC,IAAI,CACL,EAAE,CAAC,MAAM,CACP,sEAAsE,2BAA2B,4BAA4B,CAC9H,CACF,CAAC;IACJ,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { describe, it, expect, vi, beforeEach } from "vitest";
|
|
2
|
+
// Mock child_process so we never actually shell out to npx.
|
|
3
|
+
const execSyncMock = vi.fn();
|
|
4
|
+
vi.mock("node:child_process", () => ({
|
|
5
|
+
execSync: (...args) => execSyncMock(...args),
|
|
6
|
+
}));
|
|
7
|
+
// Mock @clack/prompts so we control confirm() answers + silence spinners/notes.
|
|
8
|
+
const confirmMock = vi.fn();
|
|
9
|
+
vi.mock("@clack/prompts", () => ({
|
|
10
|
+
confirm: (...args) => confirmMock(...args),
|
|
11
|
+
isCancel: (v) => typeof v === "symbol",
|
|
12
|
+
note: () => undefined,
|
|
13
|
+
spinner: () => ({
|
|
14
|
+
start: () => undefined,
|
|
15
|
+
stop: () => undefined,
|
|
16
|
+
}),
|
|
17
|
+
}));
|
|
18
|
+
// Import the module under test AFTER the mocks are registered.
|
|
19
|
+
const { installModernWebGuidance, tryInstallSkill, MODERN_WEB_GUIDANCE_VERSION, SKILL_INSTALL_TIMEOUT_MS, } = await import("./skills");
|
|
20
|
+
beforeEach(() => {
|
|
21
|
+
execSyncMock.mockReset();
|
|
22
|
+
confirmMock.mockReset();
|
|
23
|
+
});
|
|
24
|
+
describe("installModernWebGuidance — branches", () => {
|
|
25
|
+
it("--skip-skills flag → no prompt, no install, returns skipped/flag", async () => {
|
|
26
|
+
const result = await installModernWebGuidance("/tmp/x", { skip: true });
|
|
27
|
+
expect(result).toEqual({ status: "skipped", reason: "flag" });
|
|
28
|
+
expect(confirmMock).not.toHaveBeenCalled();
|
|
29
|
+
expect(execSyncMock).not.toHaveBeenCalled();
|
|
30
|
+
});
|
|
31
|
+
it("--yes flag → no prompt, installs unconditionally", async () => {
|
|
32
|
+
execSyncMock.mockReturnValueOnce(Buffer.from(""));
|
|
33
|
+
const result = await installModernWebGuidance("/tmp/x", {
|
|
34
|
+
assumeYes: true,
|
|
35
|
+
});
|
|
36
|
+
expect(confirmMock).not.toHaveBeenCalled();
|
|
37
|
+
expect(execSyncMock).toHaveBeenCalledTimes(1);
|
|
38
|
+
expect(result.status).toBe("installed");
|
|
39
|
+
});
|
|
40
|
+
it("prompt accept → npx invoked with pinned version + cwd=targetDir", async () => {
|
|
41
|
+
confirmMock.mockResolvedValueOnce(true);
|
|
42
|
+
execSyncMock.mockReturnValueOnce(Buffer.from(""));
|
|
43
|
+
const result = await installModernWebGuidance("/tmp/foo");
|
|
44
|
+
expect(confirmMock).toHaveBeenCalledTimes(1);
|
|
45
|
+
expect(execSyncMock).toHaveBeenCalledTimes(1);
|
|
46
|
+
const [cmd, opts] = execSyncMock.mock.calls[0];
|
|
47
|
+
expect(cmd).toContain(`modern-web-guidance@${MODERN_WEB_GUIDANCE_VERSION}`);
|
|
48
|
+
expect(cmd).toContain("install");
|
|
49
|
+
expect(opts).toMatchObject({
|
|
50
|
+
cwd: "/tmp/foo",
|
|
51
|
+
timeout: SKILL_INSTALL_TIMEOUT_MS,
|
|
52
|
+
});
|
|
53
|
+
expect(result).toEqual({
|
|
54
|
+
status: "installed",
|
|
55
|
+
version: MODERN_WEB_GUIDANCE_VERSION,
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
it("prompt decline → no install, returns skipped/declined", async () => {
|
|
59
|
+
confirmMock.mockResolvedValueOnce(false);
|
|
60
|
+
const result = await installModernWebGuidance("/tmp/foo");
|
|
61
|
+
expect(confirmMock).toHaveBeenCalledTimes(1);
|
|
62
|
+
expect(execSyncMock).not.toHaveBeenCalled();
|
|
63
|
+
expect(result).toEqual({ status: "skipped", reason: "declined" });
|
|
64
|
+
});
|
|
65
|
+
it("prompt cancelled (Ctrl+C) → no install, returns skipped/cancelled", async () => {
|
|
66
|
+
confirmMock.mockResolvedValueOnce(Symbol("cancel"));
|
|
67
|
+
const result = await installModernWebGuidance("/tmp/foo");
|
|
68
|
+
expect(execSyncMock).not.toHaveBeenCalled();
|
|
69
|
+
expect(result).toEqual({ status: "skipped", reason: "cancelled" });
|
|
70
|
+
});
|
|
71
|
+
it("install timeout → failed/timeout, scaffold proceeds (no throw)", async () => {
|
|
72
|
+
confirmMock.mockResolvedValueOnce(true);
|
|
73
|
+
const err = Object.assign(new Error("ETIMEDOUT"), {
|
|
74
|
+
signal: "SIGTERM",
|
|
75
|
+
});
|
|
76
|
+
execSyncMock.mockImplementationOnce(() => {
|
|
77
|
+
throw err;
|
|
78
|
+
});
|
|
79
|
+
const result = await installModernWebGuidance("/tmp/foo");
|
|
80
|
+
expect(result.status).toBe("failed");
|
|
81
|
+
if (result.status === "failed") {
|
|
82
|
+
expect(result.reason).toBe("timeout");
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
it("install error (non-timeout) → failed/error, scaffold proceeds", async () => {
|
|
86
|
+
confirmMock.mockResolvedValueOnce(true);
|
|
87
|
+
execSyncMock.mockImplementationOnce(() => {
|
|
88
|
+
throw new Error("network down");
|
|
89
|
+
});
|
|
90
|
+
const result = await installModernWebGuidance("/tmp/foo");
|
|
91
|
+
expect(result.status).toBe("failed");
|
|
92
|
+
if (result.status === "failed") {
|
|
93
|
+
expect(result.reason).toBe("error");
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
describe("tryInstallSkill — pure invocation", () => {
|
|
98
|
+
it("pins to MODERN_WEB_GUIDANCE_VERSION", () => {
|
|
99
|
+
execSyncMock.mockReturnValueOnce(Buffer.from(""));
|
|
100
|
+
tryInstallSkill("/tmp/x");
|
|
101
|
+
const [cmd] = execSyncMock.mock.calls[0];
|
|
102
|
+
expect(cmd).toContain(`@${MODERN_WEB_GUIDANCE_VERSION}`);
|
|
103
|
+
expect(cmd).not.toContain("@latest");
|
|
104
|
+
});
|
|
105
|
+
it("ETIMEDOUT code surfaces as timeout reason", () => {
|
|
106
|
+
const err = Object.assign(new Error("timed out"), { code: "ETIMEDOUT" });
|
|
107
|
+
execSyncMock.mockImplementationOnce(() => {
|
|
108
|
+
throw err;
|
|
109
|
+
});
|
|
110
|
+
const result = tryInstallSkill("/tmp/x");
|
|
111
|
+
expect(result.status).toBe("failed");
|
|
112
|
+
if (result.status === "failed") {
|
|
113
|
+
expect(result.reason).toBe("timeout");
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
//# sourceMappingURL=skills.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.test.js","sourceRoot":"","sources":["../src/skills.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAE9D,4DAA4D;AAC5D,MAAM,YAAY,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;AAC7B,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,GAAG,EAAE,CAAC,CAAC;IACnC,QAAQ,EAAE,CAAC,GAAG,IAAe,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;CACxD,CAAC,CAAC,CAAC;AAEJ,gFAAgF;AAChF,MAAM,WAAW,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;AAC5B,EAAE,CAAC,IAAI,CAAC,gBAAgB,EAAE,GAAG,EAAE,CAAC,CAAC;IAC/B,OAAO,EAAE,CAAC,GAAG,IAAe,EAAE,EAAE,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;IACrD,QAAQ,EAAE,CAAC,CAAU,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ;IAC/C,IAAI,EAAE,GAAG,EAAE,CAAC,SAAS;IACrB,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;QACd,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS;QACtB,IAAI,EAAE,GAAG,EAAE,CAAC,SAAS;KACtB,CAAC;CACH,CAAC,CAAC,CAAC;AAEJ,+DAA+D;AAC/D,MAAM,EACJ,wBAAwB,EACxB,eAAe,EACf,2BAA2B,EAC3B,wBAAwB,GACzB,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC;AAE7B,UAAU,CAAC,GAAG,EAAE;IACd,YAAY,CAAC,SAAS,EAAE,CA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C,SAAS,CAAC,CAAC;QACxC,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cartwright",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "Scaffolder for AI-first webshops powered by Cartwright",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cartwright",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"eslint": "^9.0.0",
|
|
33
33
|
"tsx": "^4.19.0",
|
|
34
34
|
"typescript": "^5.7.0",
|
|
35
|
+
"typescript-eslint": "^8.0.0",
|
|
35
36
|
"vitest": "^4.1.7"
|
|
36
37
|
},
|
|
37
38
|
"engines": {
|