@getvitops/create 0.7.0 → 0.8.1

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +443 -6
  2. package/package.json +2 -3
  3. package/templates/emdash/.agents/skills/promote/SKILL.md +24 -7
  4. package/templates/emdash/.astro/types.d.ts +3 -0
  5. package/templates/emdash/.claude/hooks/session-start.sh +0 -0
  6. package/templates/emdash/.github/workflows/backmerge.yml +18 -0
  7. package/templates/emdash/.github/workflows/deploy-prod.yml +1 -1
  8. package/templates/emdash/.github/workflows/refresh-dev.yml +25 -0
  9. package/templates/emdash/.node-version +1 -0
  10. package/templates/emdash/AGENTS.md +51 -9
  11. package/templates/emdash/README.md +15 -4
  12. package/templates/emdash/SETUP.html +103 -0
  13. package/templates/emdash/astro.config.mjs +47 -4
  14. package/templates/emdash/package.json +15 -11
  15. package/templates/emdash/pnpm-lock.yaml +183 -0
  16. package/templates/emdash/pnpm-workspace.yaml +1 -1
  17. package/templates/emdash/public/_headers +10 -0
  18. package/templates/emdash/scripts/build-dev-wrangler.mjs +6 -0
  19. package/templates/emdash/scripts/refresh-dev.mjs +182 -0
  20. package/templates/emdash/seed/seed.json +104 -5
  21. package/templates/emdash/site.json +77 -2
  22. package/templates/emdash/src/layouts/Layout.astro +7 -1
  23. package/templates/emdash/src/pages/404.astro +5 -0
  24. package/templates/emdash/src/pages/[...slug].astro +15 -2
  25. package/templates/emdash/src/pages/index.astro +15 -2
  26. package/templates/emdash/vite.config.ts +18 -4
  27. package/templates/emdash/wrangler.jsonc +4 -0
  28. package/templates/static/.github/workflows/backmerge.yml +18 -0
  29. package/templates/static/.github/workflows/deploy-prod.yml +1 -1
  30. package/templates/static/.node-version +1 -0
  31. package/templates/static/AGENTS.md +9 -9
  32. package/templates/static/SETUP.html +103 -0
  33. package/templates/static/package.json +6 -6
  34. package/templates/static/pnpm-workspace.yaml +21 -0
  35. package/templates/static/public/_headers +10 -0
  36. package/templates/static/site.json +2 -2
@@ -159,6 +159,94 @@
159
159
  this exists.
160
160
  </span>
161
161
  </label>
162
+ <label class="custom-check">
163
+ <input type="checkbox" data-sop="hosting.emdash-fingerprint" />
164
+ <span class="custom-check__box"
165
+ ><span class="custom-check__indicator custom-check__indicator--check"></span
166
+ ></span>
167
+ <span>
168
+ <strong>(EmDash template)</strong> After the first deploy to each environment, run
169
+ <code>npx emdash migrate --status</code> locally against that environment's real
170
+ database, review the printed account/database identity, and set the reviewed
171
+ fingerprint:
172
+ <code
173
+ >gh variable set EMDASH_TARGET_FINGERPRINT --env dev --body &lt;value&gt;</code
174
+ >
175
+ and again with <code>--env production</code>. No command can do this for you — it's
176
+ the human review the fingerprint guard exists for. Deploys fail clearly on the
177
+ migration-apply step until it's set for that environment.
178
+ </span>
179
+ </label>
180
+ <label class="custom-check">
181
+ <input type="checkbox" data-sop="hosting.design-system-editor-token" />
182
+ <span class="custom-check__box"
183
+ ><span class="custom-check__indicator custom-check__indicator--check"></span
184
+ ></span>
185
+ <span>
186
+ <strong>(EmDash template, only if <code>designSystemEditor</code> is on)</strong>
187
+ Create a fine-grained GitHub PAT scoped to this one repository,
188
+ <code>Contents: Read and write</code> only — no <code>admin</code> scope, no access
189
+ to any other repo — then <code>gh secret set VITOPS_GITHUB_TOKEN</code>. Also set
190
+ <code>site.deployment.repo</code> (<code>"owner/name"</code>) and
191
+ <code>site.deployment.branch</code> (default <code>"dev"</code>) in
192
+ <code>site.json</code>. Without these the live design-system editor still works —
193
+ only the auto-commit-to-source half is skipped, and the admin page's response says
194
+ so.
195
+ </span>
196
+ </label>
197
+ <label class="custom-check">
198
+ <input type="checkbox" data-sop="hosting.content-in-prod" />
199
+ <span class="custom-check__box"
200
+ ><span class="custom-check__indicator custom-check__indicator--check"></span
201
+ ></span>
202
+ <span>
203
+ <strong>Know where content is edited (EmDash template).</strong> Editors work on the
204
+ <em>production</em> site — drafts, "Publish changes" and preview links are the
205
+ staging step. The dev site holds a disposable copy of production's database; it is
206
+ refreshed from prod and never promoted back. Code, pages and
207
+ <code>site.json</code> still go dev → main.
208
+ </span>
209
+ </label>
210
+ <label class="custom-check">
211
+ <input type="checkbox" data-sop="hosting.refresh-dev" />
212
+ <span class="custom-check__box"
213
+ ><span class="custom-check__indicator custom-check__indicator--check"></span
214
+ ></span>
215
+ <span>
216
+ EmDash template: run <strong>Refresh dev from prod</strong> (Actions tab) once the
217
+ prod site has content, and again before rehearsing a schema change. It runs weekly
218
+ on its own. To copy media as well, set <code>R2_ACCESS_KEY_ID</code> and
219
+ <code>R2_SECRET_ACCESS_KEY</code> (an R2 API token's S3 credentials) as repo
220
+ secrets; without them only the database is refreshed.
221
+ </span>
222
+ </label>
223
+ <label class="custom-check">
224
+ <input type="checkbox" data-sop="hosting.magic-link" />
225
+ <span class="custom-check__box"
226
+ ><span class="custom-check__indicator custom-check__indicator--check"></span
227
+ ></span>
228
+ <span>
229
+ EmDash template: onboard the sender domain for sign-in email —
230
+ <code>npx vitops email setup send.&lt;your-domain&gt;</code>, then put that address
231
+ in <code>cloudflareEmail({ from })</code> in <code>astro.config.mjs</code> (it ships
232
+ a placeholder). Editors sign in with a magic link ("Sign in with email" on the login
233
+ page) because a passkey only works at the origin it was registered on, so a
234
+ refreshed dev site has no other way in. Check <strong>Settings → Email</strong> and
235
+ send the test email on both prod and dev.
236
+ </span>
237
+ </label>
238
+ <label class="custom-check">
239
+ <input type="checkbox" data-sop="hosting.preview-secret" />
240
+ <span class="custom-check__box"
241
+ ><span class="custom-check__indicator custom-check__indicator--check"></span
242
+ ></span>
243
+ <span>
244
+ EmDash template: set a different <code>EMDASH_PREVIEW_SECRET</code> on the dev
245
+ worker (<code>wrangler secret put EMDASH_PREVIEW_SECRET</code>). The secret lives in
246
+ the database, so a refresh copies prod's — and prod preview links would then open
247
+ drafts on dev.
248
+ </span>
249
+ </label>
162
250
  </div>
163
251
  </details>
164
252
 
@@ -326,6 +414,21 @@
326
414
  <code>npx vitops setup ads</code>.
327
415
  </span>
328
416
  </label>
417
+ <label class="custom-check">
418
+ <input type="checkbox" data-sop="connections.email" />
419
+ <span class="custom-check__box"
420
+ ><span class="custom-check__indicator custom-check__indicator--check"></span
421
+ ></span>
422
+ <span>
423
+ If <code>site.notifications.email</code> sends mail, onboard its sender domain:
424
+ <code>npx vitops email setup --dry</code>, then <code>npx vitops email setup</code>.
425
+ Cloudflare onboards an exact name — usually a subdomain like
426
+ <code>send.&lt;domain&gt;</code>, not the apex — so a mismatch here is silent at
427
+ build time and only fails when a form is actually submitted in production. Both
428
+ templates' <code>deploy</code> script already runs
429
+ <code>vitops email check</code> first as a non-blocking warning.
430
+ </span>
431
+ </label>
329
432
  <label class="custom-check">
330
433
  <input type="checkbox" data-sop="connections.manual" />
331
434
  <span class="custom-check__box"
@@ -7,8 +7,8 @@
7
7
  "dev": "astro dev",
8
8
  "build": "astro build",
9
9
  "preview": "astro preview",
10
- "deploy": "astro build && wrangler deploy",
11
- "deploy:dev": "astro build && node scripts/dev-wrangler-config.mjs && wrangler deploy --config .wrangler.dev.json",
10
+ "deploy": "vitops email check && astro build && wrangler deploy",
11
+ "deploy:dev": "vitops email check && astro build && node scripts/dev-wrangler-config.mjs && wrangler deploy --config .wrangler.dev.json",
12
12
  "init:github": "vitops setup repo",
13
13
  "init:hosting": "vitops setup hosting --no-dev-resources",
14
14
  "setup": "vitops setup repo && vitops setup hosting --no-dev-resources",
@@ -20,10 +20,10 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@getvitops/astro": "latest",
23
- "astro": "^7.1.2"
23
+ "astro": "^7.4.4"
24
24
  },
25
25
  "devDependencies": {
26
- "@astrojs/check": "^0.9.7",
26
+ "@astrojs/check": "^0.9.12",
27
27
  "@getvitops/cli": "latest",
28
28
  "typescript": "^6.0.3",
29
29
  "vite": "latest",
@@ -33,9 +33,9 @@
33
33
  "devEngines": {
34
34
  "runtime": {
35
35
  "name": "node",
36
- "version": "24.18.0",
36
+ "version": "24",
37
37
  "onFail": "download"
38
38
  }
39
39
  },
40
- "packageManager": "pnpm@11.17.0"
40
+ "packageManager": "pnpm@12.16.1"
41
41
  }
@@ -0,0 +1,21 @@
1
+ # Build scripts: allow only what each runtime needs; rest false so
2
+ # strictDepBuilds (pnpm >=10.26 / 11) passes.
3
+ allowBuilds:
4
+ esbuild: true
5
+ workerd: true
6
+ sharp: false
7
+
8
+ # Supply-chain hardening: nothing installs within 3 days of its publish
9
+ # (toolchain exempt), and no non-registry transitive sources.
10
+ minimumReleaseAge: 4320
11
+ minimumReleaseAgeExclude:
12
+ - '@getvitops/*'
13
+ - vite-plus
14
+ - '@voidzero-dev/*'
15
+ - oxlint
16
+ - '@oxlint/*'
17
+ - oxlint-tsgolint
18
+ - '@oxlint-tsgolint/*'
19
+ - oxfmt
20
+ - '@oxfmt/*'
21
+ blockExoticSubdeps: true
@@ -0,0 +1,10 @@
1
+ # Cloudflare Workers static assets apply this file to every asset response.
2
+ #
3
+ # A baseline that cannot break a page. No Content-Security-Policy on purpose: <Head /> emits
4
+ # inline scripts (the consent stub, the colour-scheme bootstrap), so a strict policy needs
5
+ # per-site nonces or hashes — add one deliberately once you know which third-party tags you load.
6
+ /*
7
+ X-Content-Type-Options: nosniff
8
+ Referrer-Policy: strict-origin-when-cross-origin
9
+ Permissions-Policy: camera=(), microphone=(), geolocation=(), payment=()
10
+ X-Frame-Options: SAMEORIGIN
@@ -23,8 +23,8 @@
23
23
  }
24
24
  },
25
25
  "roles": {
26
- "neutral": "ink",
27
- "surface": "ink",
26
+ "neutral": { "hue": "ink", "kind": "surface" },
27
+ "surface": { "hue": "ink", "kind": "surface" },
28
28
  "ui-primary": "brand",
29
29
  "brand-primary": "brand",
30
30
  "info": "sky",