Skip to content

Commit 37b2883

Browse files
committed
fix(ci): conditional ogImage strict mode + restore lunaria format
- Only enable security.strict when NUXT_IMAGE_PROXY_SECRET is set so CI builds (which have no secret) don't fail at install time. Prod and local dev (with .env) keep strict mode. - Revert lunaria/ to autofix.ci's format (oxfmt 0.1.16); local oxfmt 0.1.12 disagreed and caused a format-check drift loop.
1 parent 809c97a commit 37b2883

File tree

3 files changed

+12
-17
lines changed

3 files changed

+12
-17
lines changed

lunaria/components.ts

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,9 @@ const LocaleDetails = (status: I18nStatus, locale: Locale): string => {
135135
)}
136136
<br />
137137
<br />
138-
${
139-
missingKeys.length > 0
140-
? html`${MissingKeysList(missingKeys)}`
141-
: html`
142-
<p>This translation is complete, amazing job! 🎉</p>
143-
`
144-
}
138+
${missingKeys.length > 0
139+
? html`${MissingKeysList(missingKeys)}`
140+
: html` <p>This translation is complete, amazing job! 🎉</p> `}
145141
</details>
146142
`
147143
}
@@ -368,12 +364,10 @@ function SvgLocaleSummary(
368364
>${label} (${lang})</text
369365
>
370366
<text x="0" y="26" font-size="9" fill="#999">
371-
${
372-
missingFiles.length == 0 && outdatedFiles.length == 0
373-
? '100% complete, amazing job! 🎉'
374-
: html`${doneLength} done, ${outdatedFiles.length} outdated, ${missingFiles.length}
375-
missing`
376-
}
367+
${missingFiles.length == 0 && outdatedFiles.length == 0
368+
? '100% complete, amazing job! 🎉'
369+
: html`${doneLength} done, ${outdatedFiles.length} outdated, ${missingFiles.length}
370+
missing`}
377371
</text>
378372
<rect x="0" y="34" width="${barWidth}" height="8" fill="#999" opacity="0.25"></rect>
379373
<rect x="0" y="34" width="${outdatedWidth}" height="8" fill="#fb923c"></rect>

lunaria/styles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ export const BaseStyles = html`
55
:root {
66
/** Fonts */
77
--ln-font-fallback:
8-
-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji,
9-
Segoe UI Emoji;
8+
-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif,
9+
Apple Color Emoji, Segoe UI Emoji;
1010
--ln-font-body: 'Geist', 'IBM Plex Sans Arabic', var(--ln-font-fallback);
1111
--ln-font-mono: 'Geist Mono', 'IBM Plex Sans Arabic', monospace;
1212

nuxt.config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,9 @@ export default defineNuxtConfig({
296296
ogImage: {
297297
enabled: !isStorybook,
298298
security: {
299-
strict: true,
300-
// Reuse image-proxy HMAC secret to avoid managing a second secret
299+
// Reuse image-proxy HMAC secret to avoid managing a second secret.
300+
// Strict mode only activates when a secret is present (CI builds without one).
301+
strict: !!process.env.NUXT_IMAGE_PROXY_SECRET,
301302
secret: process.env.NUXT_IMAGE_PROXY_SECRET,
302303
},
303304
},

0 commit comments

Comments
 (0)