prestruct 0.0.0-stage → 1.0.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.
@@ -0,0 +1,32 @@
1
+ # wrangler.toml
2
+ # =============
3
+ # Cloudflare Worker configuration for the Prestruct render proxy.
4
+ # Copy to your Worker project root and fill in the blanks.
5
+ #
6
+ # Required steps:
7
+ # 1. Replace "your-kv-namespace-id" below (run `wrangler kv namespace create CACHE`).
8
+ # 2. Set your target site URL in [vars].
9
+ # 3. Run `wrangler secret put PRESTRUCT_SECRET` to set the cache-refresh secret.
10
+ # 4. Run `wrangler deploy`.
11
+
12
+ name = "prestruct-proxy"
13
+ main = "scripts/proxy.worker.js"
14
+ compatibility_date = "2024-09-23"
15
+
16
+ [[browser]]
17
+ binding = "BROWSER"
18
+
19
+ [[kv_namespaces]]
20
+ binding = "CACHE"
21
+ id = "your-kv-namespace-id"
22
+
23
+ [vars]
24
+ # URL of the site the proxy renders. No trailing slash.
25
+ # Can be your CF Pages URL, a WordPress origin, localhost tunnel, etc.
26
+ PRESTRUCT_TARGET_URL = "https://yoursite.com"
27
+
28
+ # Cache TTL in seconds. 86400 = 24 hours.
29
+ CACHE_TTL_SECONDS = "86400"
30
+
31
+ # PRESTRUCT_SECRET is set via `wrangler secret put PRESTRUCT_SECRET`
32
+ # and is never stored in this file.
package/package.json CHANGED
@@ -1,6 +1,72 @@
1
1
  {
2
2
  "name": "prestruct",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "AI-first SEO prerender for Vite + React apps. Drop in, config, build.",
5
+ "type": "module",
6
+ "license": "SEE LICENSE IN LICENSE",
7
+ "main": "engine/scripts/prerender.js",
8
+ "bin": {
9
+ "prestruct": "bin/cli.mjs"
10
+ },
11
+ "exports": {
12
+ ".": "./engine/scripts/prerender.js",
13
+ "./bin": "./bin/cli.mjs",
14
+ "./prerender": "./engine/scripts/prerender.js",
15
+ "./inject-brand": "./engine/scripts/inject-brand.js",
16
+ "./validate-config": "./engine/scripts/validate-config.js",
17
+ "./package.json": "./package.json"
18
+ },
19
+ "files": [
20
+ "bin/",
21
+ "engine/",
22
+ "init/",
23
+ "!init/node_modules",
24
+ "!init/dist",
25
+ "!init/.prestruct"
26
+ ],
27
+ "scripts": {
28
+ "test": "vitest",
29
+ "test:run": "vitest run",
30
+ "sync": "node scripts/sync-engine.mjs",
31
+ "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",
33
+ "lint:claims": "node scripts/check-fiction-signatures.cjs",
34
+ "e2e": "node tests/e2e-fixture.mjs"
35
+ },
36
+ "engines": {
37
+ "node": ">=18"
38
+ },
39
+ "peerDependencies": {
40
+ "react": ">=18",
41
+ "react-dom": ">=18",
42
+ "react-router-dom": ">=6",
43
+ "vite": ">=5"
44
+ },
45
+ "devDependencies": {
46
+ "express": "^4.22.3",
47
+ "happy-dom": "^21.0.4",
48
+ "puppeteer": "^22.15.0",
49
+ "react": "^18.3.1",
50
+ "react-dom": "^18.3.1",
51
+ "react-router-dom": "^6.30.1",
52
+ "vite": "^5.4.0",
53
+ "vitest": "^2.1.0"
54
+ },
55
+ "repository": {
56
+ "type": "git",
57
+ "url": "git+https://github.com/dhaupin/prestruct.git"
58
+ },
59
+ "keywords": [
60
+ "seo",
61
+ "prerender",
62
+ "vite",
63
+ "react",
64
+ "ssr",
65
+ "static-site-generation",
66
+ "cloudflare-pages"
67
+ ],
68
+ "bugs": {
69
+ "url": "https://github.com/dhaupin/prestruct/issues"
70
+ },
71
+ "homepage": "https://github.com/dhaupin/prestruct#readme"
72
+ }