@getvitops/create 0.8.0-alpha.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.
@@ -14,11 +14,17 @@ import Layout from '../layouts/Layout.astro';
14
14
  // shows up without a redeploy. Add `getStaticPaths()` + `prerender = true`
15
15
  // here only if this site's home page genuinely doesn't need that.
16
16
  const { entry: page } = await getEmDashEntry('pages', 'home');
17
+
18
+ // `page.data` is typed `unknown` until `.emdash/types.ts` is generated from a
19
+ // running site (`pnpm dev`, then `emdash types`), so a fresh scaffold would fail
20
+ // `astro check`; the cast keeps it passing both before and after, where the
21
+ // generated type is already `string`.
22
+ const title = page?.data.title as string | undefined;
17
23
  ---
18
24
 
19
- <Layout description={page?.data.title}>
25
+ <Layout description={title}>
20
26
  <section class="rhythm">
21
- <h1>{page?.data.title ?? 'Welcome'}</h1>
27
+ <h1>{title ?? 'Welcome'}</h1>
22
28
  {
23
29
  page?.data.content ? (
24
30
  <PortableText value={page.data.content} />
@@ -30,6 +30,10 @@
30
30
  "bucket_name": "my-emdash-site-media",
31
31
  },
32
32
  ],
33
+ // Outbound mail for EmDash's magic-link sign-in, invites and recovery
34
+ // (cloudflareEmail() in astro.config.mjs). The binding does nothing until the
35
+ // sender domain is onboarded: `npx vitops email setup send.<your-domain>`.
36
+ "send_email": [{ "name": "EMAIL" }],
33
37
  // Drives scheduled publishing, plugin cron, and maintenance (see
34
38
  // src/worker.ts). Without it, content scheduled in the admin never
35
39
  // publishes on Cloudflare Workers. Local `astro dev` doesn't need it.
@@ -0,0 +1,18 @@
1
+ # Carry changes made directly on `main` (a hotfix) back into `dev`, so the
2
+ # integration branch doesn't silently drift from what is live. Runs on every
3
+ # push to `main`, including each promotion, and opens a PR only when merging
4
+ # main into dev would actually change dev.
5
+ #
6
+ # Deploys via the vitops toolchain's reusable workflow — see
7
+ # https://github.com/getvitops/design-system/blob/main/.github/workflows/site-backmerge.yml
8
+ # for why the PR is left for a human unless BACKMERGE_TOKEN is set.
9
+ name: Back-merge main → dev
10
+
11
+ on:
12
+ push:
13
+ branches: [main]
14
+
15
+ jobs:
16
+ backmerge:
17
+ uses: getvitops/design-system/.github/workflows/site-backmerge.yml@v1
18
+ secrets: inherit
@@ -0,0 +1 @@
1
+ 24
@@ -18,15 +18,15 @@ as Cloudflare Workers static assets (no server runtime, no database).
18
18
  full generated class-vocabulary reference to this file.
19
19
  - **Layout foundations — these are the answer, not a starting point.** Six
20
20
  substitutions carry the structure of nearly every page:
21
- | About to write… | Write instead |
22
- | --- | --- |
23
- | a `wrap`/`wrapper`/`container`/`inner` class | **`centered`** |
24
- | `max-width` + `margin-inline: auto` | **`centered`** |
25
- | `padding-block` on a section | **`region`** |
26
- | margins between headings/paragraphs/lists | **`rhythm`** |
27
- | `display: grid` + `grid-template-columns: repeat(n, …)` | **`subgrid`** |
28
- | `repeat(auto-fit, minmax(…))` | **`grid-auto`** |
29
- | `display: flex` + `gap` for a row of controls | **`cluster`** |
21
+ | About to write… | Write instead |
22
+ | ------------------------------------------------------- | --------------- |
23
+ | a `wrap`/`wrapper`/`container`/`inner` class | **`centered`** |
24
+ | `max-width` + `margin-inline: auto` | **`centered`** |
25
+ | `padding-block` on a section | **`region`** |
26
+ | margins between headings/paragraphs/lists | **`rhythm`** |
27
+ | `display: grid` + `grid-template-columns: repeat(n, …)` | **`subgrid`** |
28
+ | `repeat(auto-fit, minmax(…))` | **`grid-auto`** |
29
+ | `display: flex` + `gap` for a row of controls | **`cluster`** |
30
30
  - Every page is prerendered by default (`output: 'static'`) — there is no
31
31
  server to fall back to, so nothing here can read request-time data
32
32
  (cookies, headers, query params) at render time. If a page genuinely needs
@@ -194,6 +194,59 @@
194
194
  so.
195
195
  </span>
196
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>
197
250
  </div>
198
251
  </details>
199
252
 
@@ -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",