bearminion 1.9.1 → 1.9.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # bearminion
2
2
 
3
+ ## 1.9.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 9c0466c: `npx bearminion add form resend --host netlify` and `--host cloudflare` write the Netlify Function (`netlify/functions/contact.mts`) and a Cloudflare Worker (`worker.ts`, plus a `wrangler.jsonc` when the site has no Wrangler config) next to the handler. A real message has gone through Resend on Vercel, Netlify and Cloudflare. A failed handler now logs its message as text, which Cloudflare's logs had dropped. `.env.example` no longer spells out Cloudflare's test keys, which made Netlify's secrets scan fail a build that used them, and the Forms guide says how to keep the public site key out of that scan.
8
+ - 6fb095f: The Contact form's Turnstile check turns on by itself when `TURNSTILE_SECRET_KEY` is in the environment, so the widget on the page can no longer sit in front of a server that checks nothing. `turnstile: true` still requires it and `turnstile: false` turns it off. A genuine token is also refused when Cloudflare says the widget was served on a host other than the one the function runs on; `turnstile: { hostnames }` lists others. The visitor address sent to Turnstile now comes from the host's own header, or the last `x-forwarded-for` entry, not the first, which the visitor can set. A site that had the secret key set and no option now checks tokens: if its page has no site key, the form refuses every message until the site key is set.
9
+
3
10
  ## 1.9.1
4
11
 
5
12
  ### Patch Changes
package/dist/astro.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as SectionRegistry, J as SiteDefinition, Y as SiteOf, Yt as ContentMigrator, k as ContentModel, t as Page, u as SectionOf } from "./page-CA4iyFDS.js";
2
- import { a as StoreKeyError, c as createFileStore, i as FileStoreOptions, n as EditorContext, o as StoreOperation, r as ContentStore, s as UploadStore, t as BearminionOptions } from "./options-4HWVEj9O.js";
1
+ import { A as SectionRegistry, J as SiteDefinition, Y as SiteOf, Yt as ContentMigrator, k as ContentModel, t as Page, u as SectionOf } from "./page-BfI9cD8g.js";
2
+ import { a as StoreKeyError, c as createFileStore, i as FileStoreOptions, n as EditorContext, o as StoreOperation, r as ContentStore, s as UploadStore, t as BearminionOptions } from "./options-gXystJjG.js";
3
3
  import { AstroIntegration } from "astro";
4
4
  //#region src/integration.d.ts
5
5
  interface BearminionIntegration extends AstroIntegration {
package/dist/cli.js CHANGED
@@ -162,17 +162,76 @@ export default defineForm(async (submission, { env }) => {
162
162
  })
163
163
  `
164
164
  }];
165
- const GLUE = [{
166
- name: "vercel",
167
- description: "A Vercel Function",
168
- path: "api/contact.ts",
169
- source: `// The ".js" is needed: Vercel runs this as an ES module, which does not guess file extensions. The file is contact.ts.
165
+ const GLUE = [
166
+ {
167
+ name: "vercel",
168
+ description: "A Vercel Function",
169
+ verified: true,
170
+ files: [{
171
+ path: "api/contact.ts",
172
+ source: `// The ".js" is needed: Vercel runs this as an ES module, which does not guess file extensions. The file is contact.ts.
170
173
  import form from '../src/forms/contact.js'
171
174
 
172
175
  export const POST = (request: Request) => form.fetch(request, process.env)
173
176
  export const OPTIONS = POST
174
177
  `
175
- }];
178
+ }]
179
+ },
180
+ {
181
+ name: "netlify",
182
+ description: "A Netlify Function",
183
+ verified: true,
184
+ files: [{
185
+ path: "netlify/functions/contact.mts",
186
+ source: `import form from '../../src/forms/contact.js'
187
+
188
+ export default (request: Request) => form.fetch(request, process.env)
189
+
190
+ export const config = { path: '/api/contact' }
191
+ `
192
+ }]
193
+ },
194
+ {
195
+ name: "cloudflare",
196
+ description: "A Cloudflare Worker that serves the site and answers /api/contact",
197
+ verified: true,
198
+ files: [{
199
+ path: "worker.ts",
200
+ source: `import form from './src/forms/contact.js'
201
+
202
+ type Env = Record<string, string> & { ASSETS: { fetch: (request: Request) => Promise<Response> } }
203
+
204
+ export default {
205
+ fetch(request: Request, env: Env): Promise<Response> {
206
+ if (new URL(request.url).pathname === '/api/contact') return form.fetch(request, env)
207
+ return env.ASSETS.fetch(request)
208
+ },
209
+ }
210
+ `
211
+ }, {
212
+ path: "wrangler.jsonc",
213
+ skipWhenAny: [
214
+ "wrangler.jsonc",
215
+ "wrangler.json",
216
+ "wrangler.toml"
217
+ ],
218
+ skipNote: "This site already has a Wrangler config, so it was left alone. It needs \"main\": \"./worker.ts\", \"assets\" with \"binding\": \"ASSETS\" and \"run_worker_first\": true, and CONTACT_FROM and CONTACT_TO under \"vars\". See the Forms guide.",
219
+ source: `// "name" has to be the name of your Worker in Cloudflare.
220
+ // RESEND_API_KEY is a secret: set it in the Worker's Settings, not here. CONTACT_FROM and CONTACT_TO are plain values and
221
+ // live under "vars", because a deploy replaces variables that exist only in the dashboard. Fill them in, and keep this
222
+ // repository private if the addresses should not be public.
223
+ {
224
+ "name": "my-site",
225
+ "compatibility_date": "2026-10-27",
226
+ "main": "./worker.ts",
227
+ "assets": { "directory": "./dist", "binding": "ASSETS", "run_worker_first": true },
228
+ "observability": { "logs": { "enabled": true, "invocation_logs": true, "persist": true } },
229
+ "vars": { "CONTACT_FROM": "", "CONTACT_TO": "" }
230
+ }
231
+ `
232
+ }]
233
+ }
234
+ ];
176
235
  /**
177
236
  * Which host a site deploys to, from the files that name one. A site with config for two hosts, or for none, answers
178
237
  * undefined and the person says it with `--host`. An Astro adapter in `package.json` means the site already runs a
@@ -215,12 +274,20 @@ function planForm(root, handler, glue, overwrite) {
215
274
  source
216
275
  });
217
276
  };
277
+ const notes = [];
218
278
  if (handler) add(HANDLER_PATH, handler.source);
219
- if (glue) add(glue.path, glue.source);
279
+ for (const file of glue?.files ?? []) {
280
+ if (file.skipWhenAny?.some((existing) => fs.existsSync(path.join(root, existing)))) {
281
+ if (file.skipNote) notes.push(file.skipNote);
282
+ continue;
283
+ }
284
+ add(file.path, file.source);
285
+ }
220
286
  return {
221
287
  files,
222
288
  env: handler?.env ?? [],
223
- needs: glue?.needs
289
+ needs: glue?.needs,
290
+ notes
224
291
  };
225
292
  }
226
293
  /** Writes the files that need writing and records every file of the plan in the lock. Returns the paths written. */
@@ -690,10 +757,11 @@ async function runAddForm(root, names, values, io) {
690
757
  description,
691
758
  env
692
759
  })),
693
- hosts: GLUE.map(({ name, description, path: file }) => ({
760
+ hosts: GLUE.map(({ name, description, files, verified }) => ({
694
761
  name,
695
762
  description,
696
- path: file
763
+ paths: files.map((file) => file.path),
764
+ verified
697
765
  }))
698
766
  }, null, 2));
699
767
  return 0;
@@ -702,7 +770,7 @@ async function runAddForm(root, names, values, io) {
702
770
  for (const handler of HANDLERS) log(` ${handler.name.padEnd(10)} ${handler.description}`);
703
771
  log("");
704
772
  log("Hosts (the glue that hands the request to the handler):");
705
- for (const glue of GLUE) log(` ${glue.name.padEnd(10)} ${glue.description}, ${glue.path}`);
773
+ for (const glue of GLUE) log(` ${glue.name.padEnd(10)} ${glue.description}, ${glue.files.map((file) => file.path).join(" + ")}${glue.verified ? "" : " (not tried on a real deploy yet)"}`);
706
774
  return 0;
707
775
  }
708
776
  if (names.length > 1) return fail("Name one service: npx bearminion add form <service> --host <host>. Use --list to see them.", 2);
@@ -793,8 +861,10 @@ async function runAddForm(root, names, values, io) {
793
861
  log(`Set ${plan.env.join(", ")} in your host's settings, and in .env for \`astro dev\`.`);
794
862
  if (plan.env.includes("CONTACT_FROM")) log("CONTACT_FROM has to be an address on a domain you verified with Resend; CONTACT_TO is where the messages arrive. Until both are set the form refuses to send.");
795
863
  }
864
+ for (const note of plan.notes) log(note);
796
865
  if (plan.needs && Object.keys(missingPackages(root, { [plan.needs]: "latest" })).length > 0) log(`The glue imports types from ${plan.needs}. Install it: ${formatCommand(installCommand(detectPackageManager(root), { [plan.needs]: "latest" }))}`);
797
- if (glue === void 0) log(detected !== void 0 ? `This project deploys to ${detected}, and \`add form\` has no tested glue for it yet. The glue for each host is in the Forms guide: https://docs.bearminion.com/forms` : `No host found in this project, so no glue was written. Add it with: npx bearminion add form --host <${GLUE.map((candidate) => candidate.name).join("|")}>`);
866
+ if (glue !== void 0 && !glue.verified) log(`The ${glue.name} glue has not been tried on a real deploy yet. Send one message from the deployed site and tell us how it went: https://github.com/langehelp-software/bearminion/issues`);
867
+ if (glue === void 0) log(detected !== void 0 ? `This project deploys to ${detected}, and \`add form\` has no glue for it. The glue for each host is in the Forms guide: https://docs.bearminion.com/forms` : `No host found in this project, so no glue was written. Add it with: npx bearminion add form --host <${GLUE.map((candidate) => candidate.name).join("|")}>`);
798
868
  if (handler === void 0) log(`The glue calls ${HANDLER_PATH}. Add it with: npx bearminion add form <service>`);
799
869
  return 0;
800
870
  }
package/dist/content.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { k as ContentModel, t as Page, u as SectionOf } from "./page-CA4iyFDS.js";
1
+ import { k as ContentModel, t as Page, u as SectionOf } from "./page-BfI9cD8g.js";
2
2
  import { z } from "zod";
3
3
  //#region src/content.d.ts
4
4
  export interface ContentCollectionsOptions {
package/dist/forms.d.ts CHANGED
@@ -19,12 +19,15 @@ type FormHandlerResult = void | FormResult;
19
19
  type FormHandler = (submission: FormSubmission, context: FormContext) => FormHandlerResult | Promise<FormHandlerResult>;
20
20
  interface FormOptions {
21
21
  /**
22
- * Check a Cloudflare Turnstile token before the handler runs. `true` reads the secret key from the environment
23
- * variable `TURNSTILE_SECRET_KEY`; `{ secretEnv }` names another one. The page needs the matching site key in the
24
- * Contact section's settings.
22
+ * Check a Cloudflare Turnstile token before the handler runs. Left out, the check runs whenever the environment has
23
+ * `TURNSTILE_SECRET_KEY`, so setting the secret is the whole switch. `true` requires it (a missing secret refuses every
24
+ * message), `false` turns the check off, and `{ secretEnv }` names another variable. The page needs the matching site
25
+ * key at build time (`PUBLIC_TURNSTILE_SITE_KEY`). A genuine token must also come from your own site: its hostname has
26
+ * to be the function's host, and `hostnames` adds others.
25
27
  */
26
28
  turnstile?: boolean | {
27
29
  secretEnv?: string;
30
+ hostnames?: readonly string[];
28
31
  };
29
32
  /**
30
33
  * Other sites allowed to post here, such as `https://www.example.com`, or `'*'` for any. Posts from the form's own
@@ -95,9 +98,10 @@ export declare class TurnstileUnavailableError extends Error {
95
98
  });
96
99
  }
97
100
  type TurnstileOutcome =
98
- /** The token is genuine. */
101
+ /** The token is genuine. `hostname` is where Cloudflare says the widget was served, when it says. */
99
102
  {
100
103
  success: true;
104
+ hostname?: string;
101
105
  } |
102
106
  /** `misconfigured` is true when the secret key is missing or wrong: a mistake on your side, not the visitor's. */
103
107
  {
package/dist/forms.js CHANGED
@@ -101,7 +101,10 @@ async function verifyTurnstile({ secret, token, remoteIp, fetch: send = fetch })
101
101
  }
102
102
  if (typeof answer !== "object" || answer === null) throw new TurnstileUnavailableError("Turnstile answered something unreadable.");
103
103
  const record = answer;
104
- if (record.success === true) return { success: true };
104
+ if (record.success === true) return typeof record.hostname === "string" && record.hostname !== "" ? {
105
+ success: true,
106
+ hostname: record.hostname
107
+ } : { success: true };
105
108
  const codes = Array.isArray(record["error-codes"]) ? record["error-codes"].filter((code) => typeof code === "string") : [];
106
109
  return {
107
110
  success: false,
@@ -195,9 +198,16 @@ const CORS_METHODS = {
195
198
  "access-control-allow-headers": "Content-Type",
196
199
  "access-control-max-age": "86400"
197
200
  };
201
+ /**
202
+ * The visitor's address, as a hint for Turnstile. The host's own headers come first. In `x-forwarded-for` the first
203
+ * entry is whatever the visitor sent, and the last is what the nearest proxy saw, so the last is the one to use.
204
+ */
198
205
  function remoteIp(headers) {
199
- return headers.get("cf-connecting-ip") ?? headers.get("x-forwarded-for")?.split(",")[0]?.trim() ?? headers.get("x-real-ip") ?? void 0;
206
+ const forwarded = headers.get("x-forwarded-for")?.split(",");
207
+ return headers.get("cf-connecting-ip") ?? headers.get("x-nf-client-connection-ip") ?? headers.get("x-real-ip") ?? forwarded?.[forwarded.length - 1]?.trim() ?? void 0;
200
208
  }
209
+ /** Cloudflare's test secrets begin like this. They are for trying the widget, so the hostname check does not apply to them. */
210
+ const TEST_SECRET = /^[123]x0{10}/;
201
211
  /**
202
212
  * Puts your function behind a form. It runs on your server with your keys, so a service's token never reaches the
203
213
  * browser. It gets the message the Contact form sent and returns what the visitor should see.
@@ -226,7 +236,18 @@ function defineForm(handler, options = {}) {
226
236
  if (typeof handler !== "function") throw new TypeError("defineForm needs a function: defineForm(async (submission, { env }) => { ... }).");
227
237
  const maxBytes = options.maxBytes ?? 65536;
228
238
  const allowed = options.origins ?? [];
229
- const secretEnv = options.turnstile === true ? "TURNSTILE_SECRET_KEY" : options.turnstile ? options.turnstile.secretEnv ?? "TURNSTILE_SECRET_KEY" : void 0;
239
+ /**
240
+ * The variable that holds the secret, or undefined when this request is not checked. Asked for in the options, a missing
241
+ * secret is an error; left to the default, a missing secret means the check is off.
242
+ */
243
+ const secretVariable = (env) => {
244
+ const given = options.turnstile;
245
+ if (given === false) return void 0;
246
+ if (given === true) return "TURNSTILE_SECRET_KEY";
247
+ if (typeof given === "object") return given.secretEnv ?? "TURNSTILE_SECRET_KEY";
248
+ return env.TURNSTILE_SECRET_KEY ? "TURNSTILE_SECRET_KEY" : void 0;
249
+ };
250
+ const extraHostnames = (typeof options.turnstile === "object" ? options.turnstile.hostnames ?? [] : []).map((name) => name.toLowerCase());
230
251
  async function answer(request, env, run, seen) {
231
252
  const cors = originHeaders(request, allowed);
232
253
  if (cors === null) return refuse(403, "This site is not allowed to send to this form.");
@@ -264,6 +285,7 @@ function defineForm(handler, options = {}) {
264
285
  run.dryRun(submission);
265
286
  return reply(200, { ok: true }, cors);
266
287
  }
288
+ const secretEnv = secretVariable(env);
267
289
  if (secretEnv !== void 0) {
268
290
  const secret = env[secretEnv];
269
291
  if (!secret) {
@@ -278,7 +300,14 @@ function defineForm(handler, options = {}) {
278
300
  token,
279
301
  ...ip ? { remoteIp: ip } : {}
280
302
  });
281
- if (!outcome.success) {
303
+ if (outcome.success) {
304
+ const hostname = outcome.hostname?.toLowerCase();
305
+ const ownHost = new URL(request.url).hostname.toLowerCase();
306
+ if (hostname !== void 0 && !TEST_SECRET.test(secret) && hostname !== ownHost && !extraHostnames.includes(hostname)) {
307
+ console.error(`[bearminion] Turnstile says the widget was served on ${hostname}, but this form runs on ${ownHost}. If that site is yours, list it: turnstile: { hostnames: ['${hostname}'] }.`);
308
+ return refuse(422, SPAM_CHECK_FAILED, cors);
309
+ }
310
+ } else {
282
311
  if (outcome.misconfigured) {
283
312
  console.error(`[bearminion] Turnstile refused the secret key in ${secretEnv} (${outcome.codes.join(", ")}). Check it in the Cloudflare dashboard.`);
284
313
  return refuse(500, NOT_SET_UP, cors);
@@ -313,7 +342,7 @@ function defineForm(handler, options = {}) {
313
342
  ok: false,
314
343
  error: error.message
315
344
  }, cors);
316
- console.error("[bearminion] The form handler failed:", error);
345
+ console.error("[bearminion] The form handler failed:", error instanceof Error ? `${error.name}: ${error.message}` : error);
317
346
  return refuse(502, UNDELIVERED, cors);
318
347
  }
319
348
  if (outcome === void 0) return reply(200, { ok: true }, cors);
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { $ as brandLogoSchema, $t as createMigrator, A as SectionRegistry, At as wireframeIssues, B as FooterColumn, Bt as themeModes, C as jsonLdWarnings, Ct as SectionDefinition, D as upsertJsonLd, Dt as Wireframe, E as siteJsonLdIds, Et as WireRect, F as defineTheme, Ft as NumberOption, G as SiteAnalytics, Gt as FieldIcons, H as Header, Ht as tones, I as BRAND_LOGO_HEIGHT, It as Option, J as SiteDefinition, Jt as ContentMigration, K as SiteConfig, Kt as ShowCondition, L as DEFAULT_MAX_FOOTER_COLUMNS, Lt as StringOption, M as ThemeDefinition, Mt as BooleanOption, N as ThemeFont, Nt as CountRule, O as API_PREFIX, Ot as defineWireframe, P as defaultTheme, Pt as EnumOption, Q as Theme, Qt as SCHEMA_VERSION_KEY, R as DEFAULT_MAX_HEADER_ACTIONS, Rt as buttonStyles, S as jsonLdSchema, St as SectionConfig, T as parseJsonLdInput, Tt as WireKind, U as HeaderConfig, Ut as variantOption, V as FooterConfig, Vt as toneOption, W as Site, Wt as FieldChoices, X as SiteSeo, Xt as ContentVersioning, Y as SiteOf, Yt as ContentMigrator, Z as SiteWith, Zt as DocumentKind, _ as SiteJsonLdSource, _t as textMarkSchema, a as isSystemPage, at as themeSchema, b as hasJsonLdId, bt as trackingIdSchema, c as BaseSection, ct as Link, d as anchorSchema, dt as Text, et as defineSite, f as createSectionSchema, ft as Tone, g as SiteJsonLdIds, gt as richTextSchema, h as JsonLdResult, ht as linkSchema, i as createPageSchema, it as themeColorsSchema, j as ThemeConfig, jt as OptionalContent, k as ContentModel, kt as wireKinds, l as PropsOf, lt as MAX_NAV_DEPTH, m as JsonLdBlock, mt as imageSchema, n as SYSTEM_PAGES, nt as siteConsentSchema, o as seoSchema, ot as ButtonStyle, p as sectionIdSchema, pt as htmlIdSchema, q as SiteConsent, qt as ShowWhen, r as Seo, rt as siteSeoSchema, s as withoutOrphanSections, st as Image, t as Page, tt as siteAnalyticsSchema, u as SectionOf, ut as RichText, v as formatJsonLd, vt as textSchema, w as mergeJsonLd, wt as defineSection, x as isPlaceholderSiteUrl, xt as withEmphasis, y as generateSiteJsonLd, yt as toneSchema, z as Footer, zt as motionOption } from "./page-CA4iyFDS.js";
1
+ import { $ as brandLogoSchema, $t as createMigrator, A as SectionRegistry, At as wireframeIssues, B as FooterColumn, Bt as themeModes, C as jsonLdWarnings, Ct as SectionDefinition, D as upsertJsonLd, Dt as Wireframe, E as siteJsonLdIds, Et as WireRect, F as defineTheme, Ft as NumberOption, G as SiteAnalytics, Gt as FieldIcons, H as Header, Ht as tones, I as BRAND_LOGO_HEIGHT, It as Option, J as SiteDefinition, Jt as ContentMigration, K as SiteConfig, Kt as ShowCondition, L as DEFAULT_MAX_FOOTER_COLUMNS, Lt as StringOption, M as ThemeDefinition, Mt as BooleanOption, N as ThemeFont, Nt as CountRule, O as API_PREFIX, Ot as defineWireframe, P as defaultTheme, Pt as EnumOption, Q as Theme, Qt as SCHEMA_VERSION_KEY, R as DEFAULT_MAX_HEADER_ACTIONS, Rt as buttonStyles, S as jsonLdSchema, St as SectionConfig, T as parseJsonLdInput, Tt as WireKind, U as HeaderConfig, Ut as variantOption, V as FooterConfig, Vt as toneOption, W as Site, Wt as FieldChoices, X as SiteSeo, Xt as ContentVersioning, Y as SiteOf, Yt as ContentMigrator, Z as SiteWith, Zt as DocumentKind, _ as SiteJsonLdSource, _t as textMarkSchema, a as isSystemPage, at as themeSchema, b as hasJsonLdId, bt as trackingIdSchema, c as BaseSection, ct as Link, d as anchorSchema, dt as Text, et as defineSite, f as createSectionSchema, ft as Tone, g as SiteJsonLdIds, gt as richTextSchema, h as JsonLdResult, ht as linkSchema, i as createPageSchema, it as themeColorsSchema, j as ThemeConfig, jt as OptionalContent, k as ContentModel, kt as wireKinds, l as PropsOf, lt as MAX_NAV_DEPTH, m as JsonLdBlock, mt as imageSchema, n as SYSTEM_PAGES, nt as siteConsentSchema, o as seoSchema, ot as ButtonStyle, p as sectionIdSchema, pt as htmlIdSchema, q as SiteConsent, qt as ShowWhen, r as Seo, rt as siteSeoSchema, s as withoutOrphanSections, st as Image, t as Page, tt as siteAnalyticsSchema, u as SectionOf, ut as RichText, v as formatJsonLd, vt as textSchema, w as mergeJsonLd, wt as defineSection, x as isPlaceholderSiteUrl, xt as withEmphasis, y as generateSiteJsonLd, yt as toneSchema, z as Footer, zt as motionOption } from "./page-BfI9cD8g.js";
2
2
  import { _ as renderMarkedHtml, a as WeightMark, f as markClass, g as reconcileMarks, i as TextRun, l as fontMarks, m as marksFromEmphasis, o as applyTextMark, r as TextMark, t as FontMark, v as splitMarkedText, y as weightMarks } from "./marks-BzLa48Y9.js";
3
- import "./options-4HWVEj9O.js";
3
+ import "./options-gXystJjG.js";
4
4
  import { a as TURNSTILE_FIELD, i as HONEYPOT_FIELD, n as FormResult, r as FormSubmission, t as FormFieldErrors } from "./form-contract-BURSJP3Y.js";
5
5
  //#region src/errors.d.ts
6
6
  /** One schema problem, addressed by a dot path such as `sections.0.props.heading`. */
@@ -1,4 +1,4 @@
1
- import { A as SectionRegistry, J as SiteDefinition, M as ThemeDefinition, Yt as ContentMigrator, k as ContentModel } from "./page-CA4iyFDS.js";
1
+ import { A as SectionRegistry, J as SiteDefinition, M as ThemeDefinition, Yt as ContentMigrator, k as ContentModel } from "./page-BfI9cD8g.js";
2
2
  //#region src/images.d.ts
3
3
  type ImageKind = 'png' | 'jpeg' | 'webp' | 'gif' | 'avif';
4
4
  interface SavedImage {
@@ -275,10 +275,10 @@ declare const textMarkSchema: z.ZodObject<{
275
275
  start: z.ZodNumber;
276
276
  end: z.ZodNumber;
277
277
  weight: z.ZodOptional<z.ZodEnum<{
278
- bold: "bold";
279
278
  regular: "regular";
280
279
  medium: "medium";
281
280
  semibold: "semibold";
281
+ bold: "bold";
282
282
  }>>;
283
283
  italic: z.ZodOptional<z.ZodBoolean>;
284
284
  font: z.ZodOptional<z.ZodEnum<{
@@ -319,10 +319,10 @@ declare function withEmphasis<T extends z.ZodRawShape>(shape: T): z.ZodPipe<z.Zo
319
319
  start: z.ZodNumber;
320
320
  end: z.ZodNumber;
321
321
  weight: z.ZodOptional<z.ZodEnum<{
322
- bold: "bold";
323
322
  regular: "regular";
324
323
  medium: "medium";
325
324
  semibold: "semibold";
325
+ bold: "bold";
326
326
  }>>;
327
327
  italic: z.ZodOptional<z.ZodBoolean>;
328
328
  font: z.ZodOptional<z.ZodEnum<{
@@ -337,10 +337,10 @@ declare function withEmphasis<T extends z.ZodRawShape>(shape: T): z.ZodPipe<z.Zo
337
337
  start: z.ZodNumber;
338
338
  end: z.ZodNumber;
339
339
  weight: z.ZodOptional<z.ZodEnum<{
340
- bold: "bold";
341
340
  regular: "regular";
342
341
  medium: "medium";
343
342
  semibold: "semibold";
343
+ bold: "bold";
344
344
  }>>;
345
345
  italic: z.ZodOptional<z.ZodBoolean>;
346
346
  font: z.ZodOptional<z.ZodEnum<{
@@ -357,10 +357,10 @@ declare function withEmphasis<T extends z.ZodRawShape>(shape: T): z.ZodPipe<z.Zo
357
357
  start: z.ZodNumber;
358
358
  end: z.ZodNumber;
359
359
  weight: z.ZodOptional<z.ZodEnum<{
360
- bold: "bold";
361
360
  regular: "regular";
362
361
  medium: "medium";
363
362
  semibold: "semibold";
363
+ bold: "bold";
364
364
  }>>;
365
365
  italic: z.ZodOptional<z.ZodBoolean>;
366
366
  font: z.ZodOptional<z.ZodEnum<{
@@ -617,10 +617,10 @@ declare function createSiteSchema(header: HeaderParts, footer: FooterParts): z.Z
617
617
  start: z.ZodNumber;
618
618
  end: z.ZodNumber;
619
619
  weight: z.ZodOptional<z.ZodEnum<{
620
- bold: "bold";
621
620
  regular: "regular";
622
621
  medium: "medium";
623
622
  semibold: "semibold";
623
+ bold: "bold";
624
624
  }>>;
625
625
  italic: z.ZodOptional<z.ZodBoolean>;
626
626
  font: z.ZodOptional<z.ZodEnum<{
@@ -852,7 +852,7 @@ declare function createSiteSchema(header: HeaderParts, footer: FooterParts): z.Z
852
852
  nameMarks: {
853
853
  start: number;
854
854
  end: number;
855
- weight?: "bold" | "regular" | "medium" | "semibold" | undefined;
855
+ weight?: "regular" | "medium" | "semibold" | "bold" | undefined;
856
856
  italic?: boolean | undefined;
857
857
  font?: "sans" | "serif" | "mono" | undefined;
858
858
  }[] | undefined;
@@ -1110,7 +1110,7 @@ declare function createSiteSchema(header: HeaderParts, footer: FooterParts): z.Z
1110
1110
  nameMarks?: {
1111
1111
  start: number;
1112
1112
  end: number;
1113
- weight?: "bold" | "regular" | "medium" | "semibold" | undefined;
1113
+ weight?: "regular" | "medium" | "semibold" | "bold" | undefined;
1114
1114
  italic?: boolean | undefined;
1115
1115
  font?: "sans" | "serif" | "mono" | undefined;
1116
1116
  }[] | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bearminion",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "description": "A git-based CMS for Astro with no database and no server: JSON content in your repo, edited by clicking on the page during astro dev.",
5
5
  "license": "MIT",
6
6
  "author": "Jakub Lange",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "template": "default",
4
- "version": "1.9.1",
4
+ "version": "1.9.2",
5
5
  "files": {
6
6
  "src/components/atoms/Button.astro": {
7
7
  "hash": "7be42b3dc3a3b59bec169de32a9d801904689e2705473d1945724658dc799043",