@drupflare/spool 0.4.0 → 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.
Files changed (162) hide show
  1. package/README.md +206 -1756
  2. package/dist/angular/index.d.ts +13 -0
  3. package/dist/angular/index.js +25 -0
  4. package/dist/angular/pages.d.ts +28 -0
  5. package/dist/angular/pages.js +85 -0
  6. package/dist/cdn/client.js +1 -1
  7. package/dist/cdn/location.d.ts +6 -0
  8. package/dist/cdn/location.js +8 -0
  9. package/dist/cdn/manifest.json +7 -7
  10. package/dist/cdn/spool-sw.js +1 -1
  11. package/dist/client/bootstrap.d.ts +57 -0
  12. package/dist/client/bootstrap.js +307 -0
  13. package/dist/client/contact.d.ts +24 -0
  14. package/dist/client/contact.js +66 -0
  15. package/dist/client/declared.d.ts +23 -0
  16. package/dist/client/declared.js +68 -0
  17. package/dist/client/entry.js +91 -2
  18. package/dist/client/gate.d.ts +1 -0
  19. package/dist/client/gate.js +148 -0
  20. package/dist/client/index.d.ts +25 -0
  21. package/dist/client/index.js +1 -0
  22. package/dist/client/live.d.ts +66 -0
  23. package/dist/client/live.js +225 -0
  24. package/dist/client/navigate-entry.d.ts +1 -0
  25. package/dist/client/navigate-entry.js +4 -0
  26. package/dist/client/navigate.d.ts +54 -0
  27. package/dist/client/navigate.js +272 -0
  28. package/dist/client/persist.d.ts +2 -0
  29. package/dist/client/persist.js +9 -0
  30. package/dist/client/register.d.ts +11 -1
  31. package/dist/client/register.js +19 -8
  32. package/dist/express/index.d.ts +11 -0
  33. package/dist/express/index.js +209 -0
  34. package/dist/hono/index.d.ts +19 -0
  35. package/dist/hono/index.js +49 -0
  36. package/dist/next/index.d.ts +33 -0
  37. package/dist/next/index.js +41 -0
  38. package/dist/next/pages.d.ts +22 -0
  39. package/dist/next/pages.js +39 -0
  40. package/dist/node/listener.d.ts +3 -0
  41. package/dist/node/listener.js +57 -2
  42. package/dist/nuxt/index.d.ts +22 -0
  43. package/dist/nuxt/index.js +104 -0
  44. package/dist/nuxt/pages.d.ts +26 -0
  45. package/dist/nuxt/pages.js +48 -0
  46. package/dist/nuxt/runtime/index.d.ts +24 -0
  47. package/dist/nuxt/runtime/index.js +58 -0
  48. package/dist/plugins/coverage.d.ts +14 -0
  49. package/dist/plugins/coverage.js +27 -0
  50. package/dist/plugins/mode.d.ts +19 -0
  51. package/dist/plugins/mode.js +20 -0
  52. package/dist/plugins/path.d.ts +16 -0
  53. package/dist/plugins/path.js +139 -0
  54. package/dist/plugins/report.d.ts +22 -0
  55. package/dist/plugins/report.js +18 -0
  56. package/dist/plugins/routes.d.ts +38 -0
  57. package/dist/plugins/routes.js +52 -0
  58. package/dist/plugins/static.d.ts +42 -0
  59. package/dist/plugins/static.js +97 -0
  60. package/dist/protocol/bundle.d.ts +111 -0
  61. package/dist/protocol/bundle.js +428 -0
  62. package/dist/protocol/config.d.ts +65 -1
  63. package/dist/protocol/config.js +28 -0
  64. package/dist/protocol/dataset.d.ts +6 -0
  65. package/dist/protocol/dataset.js +6 -0
  66. package/dist/protocol/envelope.d.ts +33 -1
  67. package/dist/protocol/envelope.js +15 -1
  68. package/dist/protocol/errors.d.ts +1 -1
  69. package/dist/protocol/index-rows.d.ts +22 -0
  70. package/dist/protocol/index-rows.js +53 -0
  71. package/dist/protocol/index.d.ts +2 -0
  72. package/dist/protocol/index.js +2 -0
  73. package/dist/protocol/normalise.d.ts +4 -4
  74. package/dist/protocol/normalise.js +9 -5
  75. package/dist/protocol/ring.d.ts +58 -0
  76. package/dist/protocol/ring.js +6 -0
  77. package/dist/protocol/route.d.ts +57 -11
  78. package/dist/protocol/route.js +95 -3
  79. package/dist/protocol/tag.d.ts +22 -2
  80. package/dist/protocol/tag.js +25 -4
  81. package/dist/protocol/view.d.ts +2 -0
  82. package/dist/protocol/view.js +8 -2
  83. package/dist/protocol/views.d.ts +6 -0
  84. package/dist/protocol/views.js +15 -0
  85. package/dist/protocol/write.d.ts +92 -4
  86. package/dist/protocol/write.js +251 -9
  87. package/dist/proxy/eligible.d.ts +22 -1
  88. package/dist/proxy/eligible.js +62 -15
  89. package/dist/proxy/proxy.js +28 -18
  90. package/dist/react-router/index.d.ts +20 -0
  91. package/dist/react-router/index.js +60 -0
  92. package/dist/react-router/pages.d.ts +34 -0
  93. package/dist/react-router/pages.js +83 -0
  94. package/dist/report/demand.d.ts +49 -0
  95. package/dist/report/demand.js +60 -0
  96. package/dist/report/economics.d.ts +55 -0
  97. package/dist/report/economics.js +189 -0
  98. package/dist/report/headline.d.ts +158 -0
  99. package/dist/report/headline.js +473 -0
  100. package/dist/report/index.d.ts +2 -0
  101. package/dist/report/index.js +2 -0
  102. package/dist/report/inputs.d.ts +79 -0
  103. package/dist/report/inputs.js +115 -0
  104. package/dist/report/measurement.d.ts +1 -1
  105. package/dist/report/measurement.js +5 -1
  106. package/dist/report/traffic.d.ts +8 -0
  107. package/dist/report/traffic.js +7 -0
  108. package/dist/server/bundle.d.ts +55 -0
  109. package/dist/server/bundle.js +172 -0
  110. package/dist/server/dataset.d.ts +8 -2
  111. package/dist/server/dataset.js +51 -4
  112. package/dist/server/embedded.d.ts +7 -3
  113. package/dist/server/embedded.js +7 -3
  114. package/dist/server/index.d.ts +5 -1
  115. package/dist/server/index.js +5 -1
  116. package/dist/server/live-sockets.d.ts +54 -0
  117. package/dist/server/live-sockets.js +131 -0
  118. package/dist/server/live.d.ts +146 -0
  119. package/dist/server/live.js +228 -0
  120. package/dist/server/ring.d.ts +77 -0
  121. package/dist/server/ring.js +311 -0
  122. package/dist/server/spool.d.ts +139 -4
  123. package/dist/server/spool.js +457 -28
  124. package/dist/server/static.d.ts +42 -0
  125. package/dist/server/static.js +29 -0
  126. package/dist/server/stub.d.ts +43 -5
  127. package/dist/server/stub.js +126 -8
  128. package/dist/server/write.d.ts +23 -1
  129. package/dist/server/write.js +96 -0
  130. package/dist/stores/durable-object.d.ts +46 -0
  131. package/dist/stores/durable-object.js +114 -0
  132. package/dist/sw/analytics.d.ts +1 -1
  133. package/dist/sw/analytics.js +2 -2
  134. package/dist/sw/coverage.d.ts +6 -0
  135. package/dist/sw/coverage.js +34 -0
  136. package/dist/sw/family.d.ts +15 -0
  137. package/dist/sw/family.js +48 -0
  138. package/dist/sw/idb.d.ts +2 -0
  139. package/dist/sw/idb.js +2 -2
  140. package/dist/sw/index.d.ts +2 -0
  141. package/dist/sw/index.js +1 -0
  142. package/dist/sw/pack/store.d.ts +128 -0
  143. package/dist/sw/pack/store.js +737 -0
  144. package/dist/sw/policy.d.ts +2 -0
  145. package/dist/sw/policy.js +11 -0
  146. package/dist/sw/probe.d.ts +16 -0
  147. package/dist/sw/probe.js +25 -0
  148. package/dist/sw/router.d.ts +3 -2
  149. package/dist/sw/router.js +15 -2
  150. package/dist/sw/runtime.d.ts +48 -1
  151. package/dist/sw/runtime.js +548 -68
  152. package/dist/sw/scheduler.d.ts +6 -1
  153. package/dist/sw/scheduler.js +22 -5
  154. package/dist/sw/write.d.ts +41 -1
  155. package/dist/sw/write.js +188 -5
  156. package/dist/version.d.ts +1 -1
  157. package/dist/version.js +1 -2
  158. package/dist/vite/index.d.ts +26 -0
  159. package/dist/vite/index.js +66 -0
  160. package/dist/vue/index.d.ts +36 -0
  161. package/dist/vue/index.js +53 -0
  162. package/package.json +64 -4
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@drupflare/spool",
3
3
  "description": "Client-Side Page Rendering and Execution Framework",
4
- "version": "0.4.0",
4
+ "version": "1.0.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -22,6 +22,14 @@
22
22
  "types": "./dist/node/listener.d.ts",
23
23
  "default": "./dist/node/listener.js"
24
24
  },
25
+ "./express": {
26
+ "types": "./dist/express/index.d.ts",
27
+ "default": "./dist/express/index.js"
28
+ },
29
+ "./hono": {
30
+ "types": "./dist/hono/index.d.ts",
31
+ "default": "./dist/hono/index.js"
32
+ },
25
33
  "./proxy": {
26
34
  "types": "./dist/proxy/index.d.ts",
27
35
  "default": "./dist/proxy/index.js"
@@ -54,6 +62,30 @@
54
62
  "types": "./dist/trim/index.d.ts",
55
63
  "default": "./dist/trim/index.js"
56
64
  },
65
+ "./nuxt": {
66
+ "types": "./dist/nuxt/index.d.ts",
67
+ "default": "./dist/nuxt/index.js"
68
+ },
69
+ "./vite": {
70
+ "types": "./dist/vite/index.d.ts",
71
+ "default": "./dist/vite/index.js"
72
+ },
73
+ "./react-router": {
74
+ "types": "./dist/react-router/index.d.ts",
75
+ "default": "./dist/react-router/index.js"
76
+ },
77
+ "./next": {
78
+ "types": "./dist/next/index.d.ts",
79
+ "default": "./dist/next/index.js"
80
+ },
81
+ "./vue": {
82
+ "types": "./dist/vue/index.d.ts",
83
+ "default": "./dist/vue/index.js"
84
+ },
85
+ "./angular": {
86
+ "types": "./dist/angular/index.d.ts",
87
+ "default": "./dist/angular/index.js"
88
+ },
57
89
  "./package.json": "./package.json"
58
90
  },
59
91
  "files": [
@@ -62,10 +94,11 @@
62
94
  "README.md"
63
95
  ],
64
96
  "scripts": {
65
- "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.dom.json --noEmit && tsc -p tests/node/tsconfig.json --noEmit && tsc -p tests/browser/tsconfig.json --noEmit && tsc -p scripts/tsconfig.json --noEmit",
97
+ "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.dom.json --noEmit && tsc -p tests/node/tsconfig.json --noEmit && tsc -p tests/browser/tsconfig.json --noEmit && tsc -p scripts/tsconfig.json --noEmit && bun scripts/docs/fences.ts",
66
98
  "build": "tsc -p tsconfig.build.json && tsc -p tsconfig.build.dom.json",
67
99
  "prepublishOnly": "bun run build && bun run build:cdn",
68
100
  "build:sw": "bun scripts/build-sw.ts",
101
+ "smoke:examples": "bun scripts/smoke-examples.ts",
69
102
  "build:cdn": "bun scripts/build-cdn.ts",
70
103
  "publish:cdn": "bun scripts/publish-cdn.ts",
71
104
  "test": "vitest run --project=unit --project=node",
@@ -75,10 +108,14 @@
75
108
  "prettier": "prettier --write .",
76
109
  "prettier:check": "prettier --check .",
77
110
  "prepare": "husky",
78
- "docs:build": "typedoc",
111
+ "docs:build": "typedoc && bun scripts/docs/nav.ts",
112
+ "docs:check": "bun scripts/docs/check.ts",
79
113
  "docs:serve": "typedoc --watch",
80
114
  "impact": "bun scripts/impact.ts",
81
115
  "impact:check": "bun scripts/impact.ts --check",
116
+ "economics": "bun scripts/economics.ts",
117
+ "economics:check": "bun scripts/economics.ts --check",
118
+ "conformance": "bun scripts/conformance.ts",
82
119
  "measure:repeat-nav": "bun scripts/measure/repeat-nav.ts",
83
120
  "measure:zero-network": "bun scripts/measure/zero-network.ts",
84
121
  "measure:device-cpu": "bun scripts/measure/device-cpu.ts",
@@ -90,7 +127,10 @@
90
127
  "measure:trim": "bun scripts/measure/trim.ts",
91
128
  "measure:nav-replay": "bun scripts/measure/nav-replay.ts",
92
129
  "measure:embed-markup": "bun scripts/measure/embed-markup.ts",
93
- "measure:avoidable-loops": "bun scripts/measure/avoidable-loops.ts"
130
+ "measure:avoidable-loops": "bun scripts/measure/avoidable-loops.ts",
131
+ "measure:examples": "bun scripts/measure/examples.ts",
132
+ "measure:demand": "bun scripts/measure/demand.ts",
133
+ "measure:storage": "bun scripts/measure/storage.ts"
94
134
  },
95
135
  "devDependencies": {
96
136
  "@azure/functions": "^4.16.5",
@@ -98,11 +138,14 @@
98
138
  "@cloudflare/workers-types": "^5.20260811.1",
99
139
  "@google-cloud/functions-framework": "^5.0.5",
100
140
  "@hapi/hapi": "^21.4.10",
141
+ "@hono/aws-lambda": "^1.0.1",
142
+ "@hono/node-server": "^2.1.9",
101
143
  "@nestjs/common": "^12.1.3",
102
144
  "@nestjs/core": "^12.1.3",
103
145
  "@nestjs/platform-express": "^12.1.3",
104
146
  "@netlify/edge-functions": "^4.0.2",
105
147
  "@netlify/functions": "^6.0.2",
148
+ "@nuxt/kit": "4.6.4",
106
149
  "@playwright/test": "^1.62.1",
107
150
  "@types/bun": "^1.4.3",
108
151
  "@types/express": "^5.0.6",
@@ -119,6 +162,7 @@
119
162
  "itty-router": "^5.0.24",
120
163
  "koa": "^3.2.1",
121
164
  "lint-staged": "^17.3.0",
165
+ "nuxt": "4.6.4",
122
166
  "prettier": "^3.9.10",
123
167
  "prettier-plugin-organize-imports": "^4.3.0",
124
168
  "prettier-plugin-sh": "^0.20.2",
@@ -129,6 +173,22 @@
129
173
  "vitest": "^4.1.0",
130
174
  "wrangler": "^4.20.0"
131
175
  },
176
+ "peerDependencies": {
177
+ "@nuxt/kit": "^4.6.0",
178
+ "nuxt": "^4.6.0",
179
+ "vite": "^7.0.0 || ^8.0.0"
180
+ },
181
+ "peerDependenciesMeta": {
182
+ "@nuxt/kit": {
183
+ "optional": true
184
+ },
185
+ "nuxt": {
186
+ "optional": true
187
+ },
188
+ "vite": {
189
+ "optional": true
190
+ }
191
+ },
132
192
  "license": "MIT",
133
193
  "author": "Gregory Mitchell <me@gmitch215.xyz>",
134
194
  "homepage": "https://github.com/drupflare/spool",