prestruct 1.0.0 → 1.2.0

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.
@@ -46,6 +46,14 @@ export default {
46
46
  // robots: true, // minimal block (all agents + Sitemap line)
47
47
  // robots: "User-agent: *\nDisallow: /private", // custom body; sitemap auto-appended
48
48
  // robots: { body: "...", sitemap: false }, // custom body, no sitemap line
49
+ //
50
+ // AEO preset -- per-bot crawl policy from the 2026 vendor docs:
51
+ // robots: { aeo: true }, // search AI bots Allow, training crawls Disallow
52
+ // robots: { aeo: { aiBots: 'allow' } }, // same, but also allow training crawls
53
+ // Search group: OAI-SearchBot, PerplexityBot, Claude-SearchBot, Applebot,
54
+ // Googlebot, Bingbot. Training group: GPTBot, ClaudeBot, Google-Extended,
55
+ // Applebot-Extended, CCBot. Search access and training/data-use are separate
56
+ // choices; the Sitemap line is appended as usual.
49
57
 
50
58
  // === Routes ===
51
59
  // Each route gets prerendered to static HTML at build time.
@@ -119,6 +127,43 @@ export default {
119
127
  // ]
120
128
  // },
121
129
 
130
+ // === Family ride-alongs (2026-10 issue walk) ===
131
+ // All optional; every block is missing-only and config-gated. Full
132
+ // semantics: docs/guides/config.md#family-ride-alongs.
133
+
134
+ // Config-driven structured-data defaults (#30): without buildJsonLd the
135
+ // engine emits Organization + WebSite from siteName/siteUrl/author.
136
+ // jsonLdDefaults: false, // skip the defaults
137
+
138
+ // Per-route schema: route.jsonLd (object or array) ships on that page only
139
+ // (FAQPage on the FAQ page, Article on the article). Feed discovery,
140
+ // hreflang alternates (route.alternates overrides the site-wide set),
141
+ // search-console verification metas, and a SearchAction on the home route:
142
+ // feed: { url: 'https://example.com/feed.xml', title: 'Feed' },
143
+ // searchUrl: 'https://example.com/search?q={query}',
144
+ // alternates: [{ hreflang: 'en', href: 'https://example.com' }],
145
+ // verification: { 'google-site-verification': 'token-here' },
146
+
147
+ // llms.txt (AI-consumable site summary from the baked route set),
148
+ // generated-only (a hand-rolled file is never touched). Opt-out:
149
+ // llms: false,
150
+
151
+ // IndexNow (#36): a 32-char lowercase-hex key string (or true = persisted
152
+ // auto-key in .prestruct/). build writes <key>.txt into dist/; `prestruct
153
+ // indexnow --dry-run` prints the submission payload.
154
+ // indexNow: 'replacewithyour32lowercasehexkey',
155
+
156
+ // postBuild hooks (#41): shell commands run BY the build after prerender
157
+ // (npm-chain scripts can be retired). Opt-in execution gate:
158
+ // runHooks: true,
159
+ // hooks: { postBuild: ['node scripts/inject-faq-schema.mjs'] },
160
+
161
+ // Branded per-route OG images (#43): render a 1200x630 PNG per route from
162
+ // a 1200x630 SVG template ({{ogTitle}}/{{ogDescription}}/{{ogUrl}} slots).
163
+ // Rasterizer is the optional dev dep @resvg/resvg-js - without it the
164
+ // generation skips loudly (build stays green, audit flags the head).
165
+ // ogImageGeneration: { template: 'og-template.svg', font: './brand/bold.ttf' },
166
+
122
167
  // === 404 Page ===
123
168
  // Custom 404 page content. Prerendered with noindex meta.
124
169
  notFound: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prestruct",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "AI-first SEO prerender for Vite + React apps. Drop in, config, build.",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -13,7 +13,11 @@
13
13
  "./bin": "./bin/cli.mjs",
14
14
  "./prerender": "./engine/scripts/prerender.js",
15
15
  "./inject-brand": "./engine/scripts/inject-brand.js",
16
+ "./audit": "./engine/scripts/audit.js",
16
17
  "./validate-config": "./engine/scripts/validate-config.js",
18
+ "./hooks": "./engine/src/hooks/usePageMeta.js",
19
+ "./islands": "./engine/src/islands.js",
20
+ "./engine/*": "./engine/*",
17
21
  "./package.json": "./package.json"
18
22
  },
19
23
  "files": [
@@ -27,30 +31,40 @@
27
31
  "scripts": {
28
32
  "test": "vitest",
29
33
  "test:run": "vitest run",
34
+ "prepublishOnly": "npm run gate",
35
+ "gate": "npm run sync:check && npm run lint:packs && npm run lint:docs && npm run lint:claims && npm --prefix init run lint && npm run test:run",
30
36
  "sync": "node scripts/sync-engine.mjs",
31
37
  "sync:check": "node scripts/sync-engine.mjs check",
32
- "lint:docs": "node scripts/check-docs-style.cjs && node scripts/check-docs-links.cjs && node scripts/check-docs-frontmatter.cjs && node scripts/check-language.cjs && node scripts/check-docs-truthfulness.cjs",
38
+ "lint:packs": "packstruct lint packs/ --deep",
39
+ "crashtest:bump": "node scripts/crashtest-bump.mjs",
40
+ "lint:docs": "node scripts/run-docs-audit.cjs",
33
41
  "lint:claims": "node scripts/check-fiction-signatures.cjs",
34
42
  "e2e": "node tests/e2e-fixture.mjs"
35
43
  },
36
44
  "engines": {
37
- "node": ">=18"
45
+ "node": ">=20"
46
+ },
47
+ "overrides": {
48
+ "tinypool": "^2.2.0"
38
49
  },
39
50
  "peerDependencies": {
40
- "react": ">=18",
41
- "react-dom": ">=18",
42
- "react-router-dom": ">=6",
43
- "vite": ">=5"
51
+ "react": ">=18 <19",
52
+ "react-dom": ">=18 <19",
53
+ "react-router-dom": ">=6 <8",
54
+ "vite": ">=5 <8"
44
55
  },
45
56
  "devDependencies": {
57
+ "crashtest": "1.1.0",
46
58
  "express": "^4.22.3",
59
+ "freestruct": "^1.1.0",
47
60
  "happy-dom": "^21.0.4",
48
- "puppeteer": "^22.15.0",
61
+ "packstruct": "1.0.0",
49
62
  "react": "^18.3.1",
50
63
  "react-dom": "^18.3.1",
51
64
  "react-router-dom": "^6.30.1",
52
- "vite": "^5.4.0",
53
- "vitest": "^2.1.0"
65
+ "react-router-dom-v7": "npm:react-router-dom@^7.18.5",
66
+ "vite": "^6.4.5",
67
+ "vitest": "^5.0.5"
54
68
  },
55
69
  "repository": {
56
70
  "type": "git",