@decocms/blocks 8.1.0-next.1 → 8.1.0-next.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.
Files changed (384) hide show
  1. package/bin/deco.js +5 -12
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +4 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/protocol/assets.d.ts +46 -0
  7. package/dist/protocol/assets.d.ts.map +1 -0
  8. package/dist/protocol/assets.js +105 -0
  9. package/dist/protocol/assets.js.map +1 -0
  10. package/dist/protocol/canonical.d.ts +8 -0
  11. package/dist/protocol/canonical.d.ts.map +1 -0
  12. package/dist/protocol/canonical.js +8 -0
  13. package/dist/protocol/canonical.js.map +1 -0
  14. package/dist/protocol/ciphertext.d.ts +7 -0
  15. package/dist/protocol/ciphertext.d.ts.map +1 -0
  16. package/dist/protocol/ciphertext.js +7 -0
  17. package/dist/protocol/ciphertext.js.map +1 -0
  18. package/dist/protocol/client.d.ts +54 -0
  19. package/dist/protocol/client.d.ts.map +1 -0
  20. package/dist/protocol/client.js +104 -0
  21. package/dist/protocol/client.js.map +1 -0
  22. package/dist/protocol/conformance/cases/assets.d.ts +3 -0
  23. package/dist/protocol/conformance/cases/assets.d.ts.map +1 -0
  24. package/dist/protocol/conformance/cases/assets.js +71 -0
  25. package/dist/protocol/conformance/cases/assets.js.map +1 -0
  26. package/dist/protocol/conformance/cases/guards.d.ts +3 -0
  27. package/dist/protocol/conformance/cases/guards.d.ts.map +1 -0
  28. package/dist/protocol/conformance/cases/guards.js +265 -0
  29. package/dist/protocol/conformance/cases/guards.js.map +1 -0
  30. package/dist/protocol/conformance/cases/reads.d.ts +3 -0
  31. package/dist/protocol/conformance/cases/reads.d.ts.map +1 -0
  32. package/dist/protocol/conformance/cases/reads.js +140 -0
  33. package/dist/protocol/conformance/cases/reads.js.map +1 -0
  34. package/dist/protocol/conformance/cases/types.d.ts +9 -0
  35. package/dist/protocol/conformance/cases/types.d.ts.map +1 -0
  36. package/dist/protocol/conformance/cases/types.js +2 -0
  37. package/dist/protocol/conformance/cases/types.js.map +1 -0
  38. package/dist/protocol/conformance/cases/wire.d.ts +3 -0
  39. package/dist/protocol/conformance/cases/wire.d.ts.map +1 -0
  40. package/dist/protocol/conformance/cases/wire.js +130 -0
  41. package/dist/protocol/conformance/cases/wire.js.map +1 -0
  42. package/dist/protocol/conformance/cases/writes.d.ts +3 -0
  43. package/dist/protocol/conformance/cases/writes.d.ts.map +1 -0
  44. package/dist/protocol/conformance/cases/writes.js +278 -0
  45. package/dist/protocol/conformance/cases/writes.js.map +1 -0
  46. package/dist/protocol/conformance/contentHashFixtures.d.ts +22 -0
  47. package/dist/protocol/conformance/contentHashFixtures.d.ts.map +1 -0
  48. package/dist/protocol/conformance/contentHashFixtures.js +64 -0
  49. package/dist/protocol/conformance/contentHashFixtures.js.map +1 -0
  50. package/dist/protocol/conformance/context.d.ts +100 -0
  51. package/dist/protocol/conformance/context.d.ts.map +1 -0
  52. package/dist/protocol/conformance/context.js +155 -0
  53. package/dist/protocol/conformance/context.js.map +1 -0
  54. package/dist/protocol/conformance/index.d.ts +32 -0
  55. package/dist/protocol/conformance/index.d.ts.map +1 -0
  56. package/dist/protocol/conformance/index.js +90 -0
  57. package/dist/protocol/conformance/index.js.map +1 -0
  58. package/dist/protocol/errors.d.ts +85 -0
  59. package/dist/protocol/errors.d.ts.map +1 -0
  60. package/dist/protocol/errors.js +62 -0
  61. package/dist/protocol/errors.js.map +1 -0
  62. package/dist/protocol/index.d.ts +25 -0
  63. package/dist/protocol/index.d.ts.map +1 -0
  64. package/dist/protocol/index.js +25 -0
  65. package/dist/protocol/index.js.map +1 -0
  66. package/dist/protocol/keys.d.ts +101 -0
  67. package/dist/protocol/keys.d.ts.map +1 -0
  68. package/dist/protocol/keys.js +223 -0
  69. package/dist/protocol/keys.js.map +1 -0
  70. package/dist/protocol/params.d.ts +10 -0
  71. package/dist/protocol/params.d.ts.map +1 -0
  72. package/dist/protocol/params.js +54 -0
  73. package/dist/protocol/params.js.map +1 -0
  74. package/dist/protocol/secrets.d.ts +22 -0
  75. package/dist/protocol/secrets.d.ts.map +1 -0
  76. package/dist/protocol/secrets.js +200 -0
  77. package/dist/protocol/secrets.js.map +1 -0
  78. package/dist/protocol/server/assets.d.ts +20 -0
  79. package/dist/protocol/server/assets.d.ts.map +1 -0
  80. package/dist/protocol/server/assets.js +77 -0
  81. package/dist/protocol/server/assets.js.map +1 -0
  82. package/dist/protocol/server/auth.d.ts +31 -0
  83. package/dist/protocol/server/auth.d.ts.map +1 -0
  84. package/dist/protocol/server/auth.js +32 -0
  85. package/dist/protocol/server/auth.js.map +1 -0
  86. package/dist/protocol/server/bodyCache.d.ts +28 -0
  87. package/dist/protocol/server/bodyCache.d.ts.map +1 -0
  88. package/dist/protocol/server/bodyCache.js +75 -0
  89. package/dist/protocol/server/bodyCache.js.map +1 -0
  90. package/dist/protocol/server/content.d.ts +44 -0
  91. package/dist/protocol/server/content.d.ts.map +1 -0
  92. package/dist/protocol/server/content.js +132 -0
  93. package/dist/protocol/server/content.js.map +1 -0
  94. package/dist/protocol/server/core.d.ts +63 -0
  95. package/dist/protocol/server/core.d.ts.map +1 -0
  96. package/dist/protocol/server/core.js +77 -0
  97. package/dist/protocol/server/core.js.map +1 -0
  98. package/dist/protocol/server/handler.d.ts +5 -0
  99. package/dist/protocol/server/handler.d.ts.map +1 -0
  100. package/dist/protocol/server/handler.js +70 -0
  101. package/dist/protocol/server/handler.js.map +1 -0
  102. package/dist/protocol/server/http.d.ts +24 -0
  103. package/dist/protocol/server/http.d.ts.map +1 -0
  104. package/dist/protocol/server/http.js +133 -0
  105. package/dist/protocol/server/http.js.map +1 -0
  106. package/dist/protocol/server/index.d.ts +11 -0
  107. package/dist/protocol/server/index.d.ts.map +1 -0
  108. package/dist/protocol/server/index.js +9 -0
  109. package/dist/protocol/server/index.js.map +1 -0
  110. package/dist/protocol/server/methods/apply.d.ts +4 -0
  111. package/dist/protocol/server/methods/apply.d.ts.map +1 -0
  112. package/dist/protocol/server/methods/apply.js +275 -0
  113. package/dist/protocol/server/methods/apply.js.map +1 -0
  114. package/dist/protocol/server/methods/read.d.ts +14 -0
  115. package/dist/protocol/server/methods/read.d.ts.map +1 -0
  116. package/dist/protocol/server/methods/read.js +132 -0
  117. package/dist/protocol/server/methods/read.js.map +1 -0
  118. package/dist/protocol/server/rpc.d.ts +7 -0
  119. package/dist/protocol/server/rpc.d.ts.map +1 -0
  120. package/dist/protocol/server/rpc.js +115 -0
  121. package/dist/protocol/server/rpc.js.map +1 -0
  122. package/dist/protocol/storage/fs/hash.d.ts +8 -0
  123. package/dist/protocol/storage/fs/hash.d.ts.map +1 -0
  124. package/dist/protocol/storage/fs/hash.js +20 -0
  125. package/dist/protocol/storage/fs/hash.js.map +1 -0
  126. package/dist/protocol/storage/fs/index.d.ts +30 -0
  127. package/dist/protocol/storage/fs/index.d.ts.map +1 -0
  128. package/dist/protocol/storage/fs/index.js +301 -0
  129. package/dist/protocol/storage/fs/index.js.map +1 -0
  130. package/dist/protocol/storage/fs/lock.d.ts +8 -0
  131. package/dist/protocol/storage/fs/lock.d.ts.map +1 -0
  132. package/dist/protocol/storage/fs/lock.js +61 -0
  133. package/dist/protocol/storage/fs/lock.js.map +1 -0
  134. package/dist/protocol/storage/fs/transaction.d.ts +19 -0
  135. package/dist/protocol/storage/fs/transaction.d.ts.map +1 -0
  136. package/dist/protocol/storage/fs/transaction.js +174 -0
  137. package/dist/protocol/storage/fs/transaction.js.map +1 -0
  138. package/dist/protocol/storage/fs/unsupported.d.ts +10 -0
  139. package/dist/protocol/storage/fs/unsupported.d.ts.map +1 -0
  140. package/dist/protocol/storage/fs/unsupported.js +4 -0
  141. package/dist/protocol/storage/fs/unsupported.js.map +1 -0
  142. package/dist/protocol/storage/memory.d.ts +40 -0
  143. package/dist/protocol/storage/memory.d.ts.map +1 -0
  144. package/dist/protocol/storage/memory.js +179 -0
  145. package/dist/protocol/storage/memory.js.map +1 -0
  146. package/dist/protocol/storage.d.ts +178 -0
  147. package/dist/protocol/storage.d.ts.map +1 -0
  148. package/dist/protocol/storage.js +29 -0
  149. package/dist/protocol/storage.js.map +1 -0
  150. package/dist/protocol/types.d.ts +194 -0
  151. package/dist/protocol/types.d.ts.map +1 -0
  152. package/dist/protocol/types.js +31 -0
  153. package/dist/protocol/types.js.map +1 -0
  154. package/dist/v8/analytics.d.ts +31 -0
  155. package/dist/v8/analytics.d.ts.map +1 -0
  156. package/dist/v8/analytics.js +46 -0
  157. package/dist/v8/analytics.js.map +1 -0
  158. package/dist/v8/background.d.ts +26 -0
  159. package/dist/v8/background.d.ts.map +1 -0
  160. package/dist/v8/background.js +95 -0
  161. package/dist/v8/background.js.map +1 -0
  162. package/dist/v8/builtins/data.d.ts +15 -0
  163. package/dist/v8/builtins/data.d.ts.map +1 -0
  164. package/dist/v8/builtins/data.js +18 -0
  165. package/dist/v8/builtins/data.js.map +1 -0
  166. package/dist/v8/builtins/index.d.ts +9 -0
  167. package/dist/v8/builtins/index.d.ts.map +1 -0
  168. package/dist/v8/builtins/index.js +24 -0
  169. package/dist/v8/builtins/index.js.map +1 -0
  170. package/dist/v8/builtins/lazy.d.ts +17 -0
  171. package/dist/v8/builtins/lazy.d.ts.map +1 -0
  172. package/dist/v8/builtins/lazy.js +13 -0
  173. package/dist/v8/builtins/lazy.js.map +1 -0
  174. package/dist/v8/builtins/legacy.d.ts +41 -0
  175. package/dist/v8/builtins/legacy.d.ts.map +1 -0
  176. package/dist/v8/builtins/legacy.js +62 -0
  177. package/dist/v8/builtins/legacy.js.map +1 -0
  178. package/dist/v8/builtins/matchers.d.ts +19 -0
  179. package/dist/v8/builtins/matchers.d.ts.map +1 -0
  180. package/dist/v8/builtins/matchers.js +24 -0
  181. package/dist/v8/builtins/matchers.js.map +1 -0
  182. package/dist/v8/builtins/multivariate.d.ts +15 -0
  183. package/dist/v8/builtins/multivariate.d.ts.map +1 -0
  184. package/dist/v8/builtins/multivariate.js +18 -0
  185. package/dist/v8/builtins/multivariate.js.map +1 -0
  186. package/dist/v8/builtins/secret.d.ts +7 -0
  187. package/dist/v8/builtins/secret.d.ts.map +1 -0
  188. package/dist/v8/builtins/secret.js +68 -0
  189. package/dist/v8/builtins/secret.js.map +1 -0
  190. package/dist/v8/canonical.d.ts +42 -0
  191. package/dist/v8/canonical.d.ts.map +1 -0
  192. package/dist/v8/canonical.js +111 -0
  193. package/dist/v8/canonical.js.map +1 -0
  194. package/dist/v8/ciphertext.d.ts +58 -0
  195. package/dist/v8/ciphertext.d.ts.map +1 -0
  196. package/dist/v8/ciphertext.js +134 -0
  197. package/dist/v8/ciphertext.js.map +1 -0
  198. package/dist/v8/cli/builtins.d.ts +11 -0
  199. package/dist/v8/cli/builtins.d.ts.map +1 -0
  200. package/dist/v8/cli/builtins.js +18 -0
  201. package/dist/v8/cli/builtins.js.map +1 -0
  202. package/dist/v8/cli/check/index.d.ts +41 -0
  203. package/dist/v8/cli/check/index.d.ts.map +1 -0
  204. package/dist/v8/cli/check/index.js +713 -0
  205. package/dist/v8/cli/check/index.js.map +1 -0
  206. package/dist/v8/cli/check/messages.d.ts +24 -0
  207. package/dist/v8/cli/check/messages.d.ts.map +1 -0
  208. package/dist/v8/cli/check/messages.js +150 -0
  209. package/dist/v8/cli/check/messages.js.map +1 -0
  210. package/dist/v8/cli/content.d.ts +60 -0
  211. package/dist/v8/cli/content.d.ts.map +1 -0
  212. package/dist/v8/cli/content.js +231 -0
  213. package/dist/v8/cli/content.js.map +1 -0
  214. package/dist/v8/cli/index.d.ts +18 -0
  215. package/dist/v8/cli/index.d.ts.map +1 -0
  216. package/dist/v8/cli/index.js +18 -0
  217. package/dist/v8/cli/index.js.map +1 -0
  218. package/dist/v8/cli/log.d.ts +9 -0
  219. package/dist/v8/cli/log.d.ts.map +1 -0
  220. package/dist/v8/cli/log.js +11 -0
  221. package/dist/v8/cli/log.js.map +1 -0
  222. package/dist/v8/cli/main.d.ts +2 -0
  223. package/dist/v8/cli/main.d.ts.map +1 -0
  224. package/dist/v8/cli/main.js +9 -0
  225. package/dist/v8/cli/main.js.map +1 -0
  226. package/dist/v8/cli/root.d.ts +28 -0
  227. package/dist/v8/cli/root.d.ts.map +1 -0
  228. package/dist/v8/cli/root.js +64 -0
  229. package/dist/v8/cli/root.js.map +1 -0
  230. package/dist/v8/cli/run.d.ts +13 -0
  231. package/dist/v8/cli/run.d.ts.map +1 -0
  232. package/dist/v8/cli/run.js +210 -0
  233. package/dist/v8/cli/run.js.map +1 -0
  234. package/dist/v8/cli/schema/builtinSchemas.d.ts +22 -0
  235. package/dist/v8/cli/schema/builtinSchemas.d.ts.map +1 -0
  236. package/dist/v8/cli/schema/builtinSchemas.js +213 -0
  237. package/dist/v8/cli/schema/builtinSchemas.js.map +1 -0
  238. package/dist/v8/cli/schema/generate.d.ts +50 -0
  239. package/dist/v8/cli/schema/generate.d.ts.map +1 -0
  240. package/dist/v8/cli/schema/generate.js +415 -0
  241. package/dist/v8/cli/schema/generate.js.map +1 -0
  242. package/dist/v8/cli/schema/index.d.ts +21 -0
  243. package/dist/v8/cli/schema/index.d.ts.map +1 -0
  244. package/dist/v8/cli/schema/index.js +51 -0
  245. package/dist/v8/cli/schema/index.js.map +1 -0
  246. package/dist/v8/cli/schema/tsProgram.d.ts +120 -0
  247. package/dist/v8/cli/schema/tsProgram.d.ts.map +1 -0
  248. package/dist/v8/cli/schema/tsProgram.js +418 -0
  249. package/dist/v8/cli/schema/tsProgram.js.map +1 -0
  250. package/dist/v8/cli/schema/typeToSchema.d.ts +81 -0
  251. package/dist/v8/cli/schema/typeToSchema.d.ts.map +1 -0
  252. package/dist/v8/cli/schema/typeToSchema.js +683 -0
  253. package/dist/v8/cli/schema/typeToSchema.js.map +1 -0
  254. package/dist/v8/cli/serve/server.d.ts +31 -0
  255. package/dist/v8/cli/serve/server.d.ts.map +1 -0
  256. package/dist/v8/cli/serve/server.js +247 -0
  257. package/dist/v8/cli/serve/server.js.map +1 -0
  258. package/dist/v8/cli/watch.d.ts +20 -0
  259. package/dist/v8/cli/watch.d.ts.map +1 -0
  260. package/dist/v8/cli/watch.js +79 -0
  261. package/dist/v8/cli/watch.js.map +1 -0
  262. package/dist/v8/client.d.ts +20 -0
  263. package/dist/v8/client.d.ts.map +1 -0
  264. package/dist/v8/client.js +115 -0
  265. package/dist/v8/client.js.map +1 -0
  266. package/dist/v8/cms.d.ts +9 -0
  267. package/dist/v8/cms.d.ts.map +1 -0
  268. package/dist/v8/cms.js +206 -0
  269. package/dist/v8/cms.js.map +1 -0
  270. package/dist/v8/content.d.ts +35 -0
  271. package/dist/v8/content.d.ts.map +1 -0
  272. package/dist/v8/content.js +183 -0
  273. package/dist/v8/content.js.map +1 -0
  274. package/dist/v8/draft.d.ts +44 -0
  275. package/dist/v8/draft.d.ts.map +1 -0
  276. package/dist/v8/draft.js +133 -0
  277. package/dist/v8/draft.js.map +1 -0
  278. package/dist/v8/errors.d.ts +21 -0
  279. package/dist/v8/errors.d.ts.map +1 -0
  280. package/dist/v8/errors.js +39 -0
  281. package/dist/v8/errors.js.map +1 -0
  282. package/dist/v8/fetch.d.ts +26 -0
  283. package/dist/v8/fetch.d.ts.map +1 -0
  284. package/dist/v8/fetch.js +98 -0
  285. package/dist/v8/fetch.js.map +1 -0
  286. package/dist/v8/identity.d.ts +19 -0
  287. package/dist/v8/identity.d.ts.map +1 -0
  288. package/dist/v8/identity.js +54 -0
  289. package/dist/v8/identity.js.map +1 -0
  290. package/dist/v8/index.d.ts +11 -0
  291. package/dist/v8/index.d.ts.map +1 -0
  292. package/dist/v8/index.js +10 -0
  293. package/dist/v8/index.js.map +1 -0
  294. package/dist/v8/json.d.ts +19 -0
  295. package/dist/v8/json.d.ts.map +1 -0
  296. package/dist/v8/json.js +65 -0
  297. package/dist/v8/json.js.map +1 -0
  298. package/dist/v8/matchRoute.d.ts +30 -0
  299. package/dist/v8/matchRoute.d.ts.map +1 -0
  300. package/dist/v8/matchRoute.js +175 -0
  301. package/dist/v8/matchRoute.js.map +1 -0
  302. package/dist/v8/remoteLoader.d.ts +16 -0
  303. package/dist/v8/remoteLoader.d.ts.map +1 -0
  304. package/dist/v8/remoteLoader.js +243 -0
  305. package/dist/v8/remoteLoader.js.map +1 -0
  306. package/dist/v8/resolver.d.ts +34 -0
  307. package/dist/v8/resolver.d.ts.map +1 -0
  308. package/dist/v8/resolver.js +219 -0
  309. package/dist/v8/resolver.js.map +1 -0
  310. package/dist/v8/secrets.d.ts +9 -0
  311. package/dist/v8/secrets.d.ts.map +1 -0
  312. package/dist/v8/secrets.js +14 -0
  313. package/dist/v8/secrets.js.map +1 -0
  314. package/dist/v8/telemetry.d.ts +61 -0
  315. package/dist/v8/telemetry.d.ts.map +1 -0
  316. package/dist/v8/telemetry.js +460 -0
  317. package/dist/v8/telemetry.js.map +1 -0
  318. package/dist/v8/types.d.ts +214 -0
  319. package/dist/v8/types.d.ts.map +1 -0
  320. package/dist/v8/types.js +2 -0
  321. package/dist/v8/types.js.map +1 -0
  322. package/package.json +64 -18
  323. package/src/index.ts +1 -1
  324. package/src/protocol/canonical.ts +1 -1
  325. package/src/protocol/ciphertext.ts +1 -1
  326. package/src/protocol/client.ts +2 -2
  327. package/src/protocol/conformance/cases/assets.ts +3 -3
  328. package/src/protocol/conformance/cases/guards.ts +4 -4
  329. package/src/protocol/conformance/cases/reads.ts +4 -4
  330. package/src/protocol/conformance/cases/types.ts +1 -1
  331. package/src/protocol/conformance/cases/wire.ts +4 -4
  332. package/src/protocol/conformance/cases/writes.ts +4 -4
  333. package/src/protocol/conformance/context.ts +4 -4
  334. package/src/protocol/conformance/index.ts +10 -10
  335. package/src/protocol/index.ts +6 -6
  336. package/src/protocol/params.ts +2 -2
  337. package/src/protocol/secrets.ts +3 -3
  338. package/src/protocol/server/assets.ts +6 -6
  339. package/src/protocol/server/auth.ts +1 -1
  340. package/src/protocol/server/content.ts +5 -5
  341. package/src/protocol/server/core.ts +12 -6
  342. package/src/protocol/server/handler.ts +6 -6
  343. package/src/protocol/server/http.ts +1 -1
  344. package/src/protocol/server/index.ts +3 -3
  345. package/src/protocol/server/methods/apply.ts +9 -9
  346. package/src/protocol/server/methods/read.ts +5 -5
  347. package/src/protocol/server/rpc.ts +6 -6
  348. package/src/protocol/storage/fs/index.ts +7 -7
  349. package/src/protocol/storage/fs/lock.ts +1 -1
  350. package/src/protocol/storage/fs/unsupported.ts +2 -2
  351. package/src/protocol/storage/memory.ts +4 -4
  352. package/src/protocol/storage.ts +1 -1
  353. package/src/v8/analytics.ts +2 -2
  354. package/src/v8/builtins/data.ts +1 -1
  355. package/src/v8/builtins/index.ts +6 -6
  356. package/src/v8/builtins/lazy.ts +1 -1
  357. package/src/v8/builtins/legacy.ts +1 -1
  358. package/src/v8/builtins/multivariate.ts +1 -1
  359. package/src/v8/builtins/secret.ts +2 -2
  360. package/src/v8/cli/builtins.ts +2 -2
  361. package/src/v8/cli/check/index.ts +11 -11
  362. package/src/v8/cli/content.ts +6 -6
  363. package/src/v8/cli/index.ts +7 -7
  364. package/src/v8/cli/main.ts +1 -1
  365. package/src/v8/cli/run.ts +7 -7
  366. package/src/v8/cli/schema/builtinSchemas.ts +1 -1
  367. package/src/v8/cli/schema/generate.ts +6 -6
  368. package/src/v8/cli/schema/index.ts +4 -4
  369. package/src/v8/cli/schema/tsProgram.ts +1 -1
  370. package/src/v8/cli/schema/typeToSchema.ts +24 -2
  371. package/src/v8/cli/serve/server.ts +9 -9
  372. package/src/v8/client.ts +5 -5
  373. package/src/v8/cms.ts +9 -9
  374. package/src/v8/content.ts +4 -4
  375. package/src/v8/draft.ts +1 -1
  376. package/src/v8/errors.ts +1 -1
  377. package/src/v8/fetch.ts +1 -1
  378. package/src/v8/identity.ts +1 -1
  379. package/src/v8/index.ts +5 -5
  380. package/src/v8/matchRoute.ts +1 -1
  381. package/src/v8/remoteLoader.ts +6 -6
  382. package/src/v8/resolver.ts +6 -6
  383. package/src/v8/secrets.ts +1 -1
  384. package/src/v8/telemetry.ts +5 -5
@@ -0,0 +1,178 @@
1
+ /**
2
+ * The storage interface a content-protocol backend implements.
3
+ *
4
+ * A storage is deliberately small: a snapshot of file names and versions,
5
+ * reading file bodies, reading the schema, and one atomic commit attempt.
6
+ * The protocol core (`createContentHandler`) owns everything else: the
7
+ * JSON-RPC layer, validation, the file-name rule, the secret guard, limits and
8
+ * retries. Storages deal in *files* inside `<root>/.deco/blocks`; entry names
9
+ * are the core's business.
10
+ *
11
+ * Browser-safe: types and small error classes only.
12
+ */
13
+ import type { Limits, StorageKind } from "./types.ts";
14
+ /** What a storage tells `describe`. */
15
+ export interface StorageDescription {
16
+ kind: StorageKind;
17
+ /** The app root, relative to the repository root (`"."` when they're the same). */
18
+ root: string;
19
+ readOnly: boolean;
20
+ /** Branch support; `null` when the storage has no refs (`ref` params are then Unsupported). */
21
+ refs: null | {
22
+ default: string;
23
+ autoCreate: boolean;
24
+ };
25
+ /** Where uploads go; `null` when read-only or uploads go elsewhere. */
26
+ assets: null | {
27
+ dir: string;
28
+ maxBytes: number;
29
+ };
30
+ /**
31
+ * Durable request-key receipts. Advertise only when `getReceipt` is
32
+ * implemented and `commit` persists `attempt.receipt` with the mutation.
33
+ */
34
+ idempotency: null | {
35
+ retentionMs: number;
36
+ };
37
+ /** Overrides the poll interval (default: 2000 for a working tree, 30000 for git). */
38
+ pollIntervalMs?: number;
39
+ /** Lowers the protocol's default limits. Higher values are ignored. */
40
+ limits?: Partial<Limits>;
41
+ }
42
+ /** One saved-block file in a snapshot. */
43
+ export interface StorageFile {
44
+ /** The file name inside `.deco/blocks`, such as `pages-Home.json`. */
45
+ file: string;
46
+ /** An opaque version of the file's content, compared only for equality. */
47
+ version: string;
48
+ /** The file's size in bytes, when the storage knows it without reading the body. */
49
+ size?: number;
50
+ }
51
+ /** Every saved-block file at one point in time. */
52
+ export interface StorageSnapshot {
53
+ /** An opaque revision of the whole set, compared only for equality. */
54
+ revision: string;
55
+ /** The ref actually read (it can differ from the requested one); `null` without refs. */
56
+ resolvedRef: string | null;
57
+ files: StorageFile[];
58
+ }
59
+ /** A file body as read, with the version of the bytes actually read. */
60
+ export interface StoredFileBody {
61
+ /** The file's UTF-8 content. */
62
+ text: string;
63
+ /**
64
+ * The version of exactly these bytes, computed the way snapshots compute
65
+ * versions. It differs from the snapshot's when the file changed in between.
66
+ */
67
+ version: string;
68
+ }
69
+ /** The schema file, as stored. */
70
+ export interface StoredSchema {
71
+ /** An opaque version of the schema bytes. */
72
+ version: string;
73
+ /** The raw file content (`schema.gen.json`, else `meta.gen.json`). */
74
+ text: string;
75
+ resolvedRef: string | null;
76
+ }
77
+ /** A durable receipt for one `blocks.apply` request key. */
78
+ export interface StoredReceipt {
79
+ /** The canonical digest of the request the key was first used with. */
80
+ digest: string;
81
+ /** The revision that commit produced. */
82
+ revision: string;
83
+ /** The versions of the files that commit wrote. */
84
+ versions: Record<string, string>;
85
+ /** The files that commit deleted (`attempt.delete`), so a replay reports the same names. */
86
+ deleted?: string[];
87
+ }
88
+ /** One atomic commit attempt. */
89
+ export interface CommitAttempt {
90
+ ref?: string;
91
+ /** The snapshot the core validated against. */
92
+ base: StorageSnapshot;
93
+ /** Files to write, by file name, with their full content. */
94
+ put: Record<string, string>;
95
+ /** Files to delete. A file that's already gone is fine. */
96
+ delete: string[];
97
+ /**
98
+ * Versions the files must still have for the commit to land (`null` = must
99
+ * not exist). A storage MUST reject the attempt as stale when any of them
100
+ * changed, and MAY reject it when anything else changed since `base`.
101
+ */
102
+ expected: Record<string, string | null>;
103
+ /**
104
+ * The schema version the core validated against (`null` = no schema), when
105
+ * the write depends on it (`ifSchemaMatch`, or the secret guard). When set,
106
+ * a storage MUST reject the attempt as stale if the schema's version at
107
+ * commit time differs, checked atomically with `expected`.
108
+ */
109
+ expectedSchemaVersion?: string | null;
110
+ /**
111
+ * Persist this receipt atomically with the mutation (only when idempotency
112
+ * is advertised). The key also reserves the request: a storage MUST reject
113
+ * the attempt as stale when a receipt for `receipt.key` already exists,
114
+ * including one written concurrently by another replica, so two requests
115
+ * with the same key never both commit.
116
+ */
117
+ receipt?: {
118
+ key: string;
119
+ digest: string;
120
+ };
121
+ }
122
+ export type CommitResult = {
123
+ status: "committed";
124
+ revision: string;
125
+ /** The new version of every file in `put`. */
126
+ versions: Record<string, string>;
127
+ } | {
128
+ status: "stale";
129
+ };
130
+ export interface ContentStorage {
131
+ describe(): StorageDescription | Promise<StorageDescription>;
132
+ /**
133
+ * Lists the saved-block files. Throws `StorageNotFoundError` when there's no
134
+ * `.deco` folder at all, or the ref can't be read.
135
+ */
136
+ snapshot(options: {
137
+ ref?: string;
138
+ }): Promise<StorageSnapshot>;
139
+ /**
140
+ * Reads file bodies (UTF-8 text) from a snapshot, each with the version of
141
+ * the bytes read. A file that vanished is left out. A storage that can't
142
+ * read at the snapshot (a working tree) returns current bytes; the core
143
+ * compares versions to notice.
144
+ */
145
+ readFiles(snapshot: StorageSnapshot, files: string[]): Promise<Record<string, StoredFileBody>>;
146
+ /** Reads `schema.gen.json`, falling back to `meta.gen.json`; `null` when neither exists. */
147
+ readSchema(options: {
148
+ ref?: string;
149
+ }): Promise<StoredSchema | null>;
150
+ /** Reads `<root>/.deco/secrets.pub`; `null` without one. */
151
+ readSecretsPublicKey(): Promise<string | null>;
152
+ /** One all-or-nothing commit attempt; durable when it resolves. */
153
+ commit(attempt: CommitAttempt): Promise<CommitResult>;
154
+ /** Looks up a receipt by its scoped key; `null` when unknown or expired. */
155
+ getReceipt?(key: string): Promise<StoredReceipt | null>;
156
+ /** Stores an uploaded file, never overwriting one; returns the stored file name. */
157
+ putAsset?(name: string, body: Uint8Array): Promise<{
158
+ name: string;
159
+ }>;
160
+ }
161
+ /** Thrown by a storage when there's no `.deco` folder, or a ref can't be read or created. */
162
+ export declare class StorageNotFoundError extends Error {
163
+ constructor(message: string);
164
+ }
165
+ /**
166
+ * Thrown by a storage asked to touch a file that can't be a saved block (a
167
+ * dotfile, a path). The core refuses those names first; this is the backstop.
168
+ */
169
+ export declare class StorageInvalidFileError extends Error {
170
+ readonly file: string;
171
+ constructor(file: string);
172
+ }
173
+ /** Thrown by a storage when it failed or is rate-limited. */
174
+ export declare class StorageUnavailableError extends Error {
175
+ readonly retryAfterMs: number | undefined;
176
+ constructor(message: string, retryAfterMs?: number);
177
+ }
178
+ //# sourceMappingURL=storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/protocol/storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEtD,uCAAuC;AACvC,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,WAAW,CAAC;IAClB,mFAAmF;IACnF,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,+FAA+F;IAC/F,IAAI,EAAE,IAAI,GAAG;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC;IACtD,uEAAuE;IACvE,MAAM,EAAE,IAAI,GAAG;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IACjD;;;OAGG;IACH,WAAW,EAAE,IAAI,GAAG;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,qFAAqF;IACrF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uEAAuE;IACvE,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;CAC1B;AAED,0CAA0C;AAC1C,MAAM,WAAW,WAAW;IAC1B,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,2EAA2E;IAC3E,OAAO,EAAE,MAAM,CAAC;IAChB,oFAAoF;IACpF,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,mDAAmD;AACnD,MAAM,WAAW,eAAe;IAC9B,uEAAuE;IACvE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;AAED;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM;IAAjC,YAAqB,IAAI,EAAE,MAAM,EAGhC;CACF;AAED,6DAA6D;AAC7D,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1C,YAAY,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAIjD;CACF"}
@@ -0,0 +1,29 @@
1
+ /** Thrown by a storage when there's no `.deco` folder, or a ref can't be read or created. */
2
+ export class StorageNotFoundError extends Error {
3
+ constructor(message) {
4
+ super(message);
5
+ this.name = "StorageNotFoundError";
6
+ }
7
+ }
8
+ /**
9
+ * Thrown by a storage asked to touch a file that can't be a saved block (a
10
+ * dotfile, a path). The core refuses those names first; this is the backstop.
11
+ */
12
+ export class StorageInvalidFileError extends Error {
13
+ file;
14
+ constructor(file) {
15
+ super(`not a saved-block file name: ${JSON.stringify(file)}`);
16
+ this.file = file;
17
+ this.name = "StorageInvalidFileError";
18
+ }
19
+ }
20
+ /** Thrown by a storage when it failed or is rate-limited. */
21
+ export class StorageUnavailableError extends Error {
22
+ retryAfterMs;
23
+ constructor(message, retryAfterMs) {
24
+ super(message);
25
+ this.name = "StorageUnavailableError";
26
+ this.retryAfterMs = retryAfterMs;
27
+ }
28
+ }
29
+ //# sourceMappingURL=storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.js","sourceRoot":"","sources":["../../src/protocol/storage.ts"],"names":[],"mappings":"AAyJA,6FAA6F;AAC7F,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC7C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAO,uBAAwB,SAAQ,KAAK;IAC3B,IAAI;IAAzB,YAAqB,IAAY;QAC/B,KAAK,CAAC,gCAAgC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;oBAD3C,IAAI;QAEvB,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;IACxC,CAAC;CACF;AAED,6DAA6D;AAC7D,MAAM,OAAO,uBAAwB,SAAQ,KAAK;IACvC,YAAY,CAAqB;IAE1C,YAAY,OAAe,EAAE,YAAqB;QAChD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACtC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;CACF"}
@@ -0,0 +1,194 @@
1
+ /**
2
+ * The content protocol's method types: JSON-RPC 2.0 over one HTTP endpoint,
3
+ * four methods (`describe`, `schema.get`, `blocks.list`, `blocks.apply`).
4
+ */
5
+ export declare const PROTOCOL_NAME = "deco-content";
6
+ /** Minors only add; a client refuses an unknown major. */
7
+ export declare const PROTOCOL_VERSION: {
8
+ readonly major: 1;
9
+ readonly minor: 0;
10
+ };
11
+ export declare const SCHEMA_FORMAT = "deco-meta@1";
12
+ /** The path the local server (`deco serve`) mounts the endpoint at. */
13
+ export declare const RPC_PATH = "/rpc";
14
+ /** The longest batch a request may carry. */
15
+ export declare const MAX_BATCH_CALLS = 10;
16
+ /** The URL prefix every uploaded asset is stored under in a field. */
17
+ export declare const ASSETS_URL_PREFIX = "/assets/";
18
+ export interface Limits {
19
+ /** Names (set plus delete) in one `blocks.apply`. */
20
+ maxOpsPerApply: number;
21
+ /** Bytes of one stored entry. */
22
+ maxBlockBytes: number;
23
+ /** Bytes of one HTTP request body, uncompressed. */
24
+ maxRequestBytes: number;
25
+ /** Uncompressed bytes of the whole block list. */
26
+ maxListBytes: number;
27
+ /** Uncompressed bytes of the schema. */
28
+ maxSchemaBytes: number;
29
+ /** Uncompressed bytes of a whole batch response. */
30
+ maxBatchResponseBytes: number;
31
+ }
32
+ /** The protocol's default limits. A storage or a server can lower them. */
33
+ export declare const DEFAULT_LIMITS: Readonly<Limits>;
34
+ export type StorageKind = "working-tree" | "git";
35
+ export interface DescribeResult {
36
+ protocol: typeof PROTOCOL_NAME;
37
+ version: {
38
+ major: 1;
39
+ minor: number;
40
+ };
41
+ server: {
42
+ name: string;
43
+ version: string;
44
+ };
45
+ /** The site editor hides publish and draft UI for a working tree. */
46
+ kind: StorageKind;
47
+ readOnly: boolean;
48
+ /** The app root: the folder that contains `.deco/`, relative to the repository root. */
49
+ root: string;
50
+ schemaFormat: typeof SCHEMA_FORMAT;
51
+ /** Branches; `null` on the local server. */
52
+ refs: null | {
53
+ default: string;
54
+ autoCreate: boolean;
55
+ };
56
+ writes: {
57
+ idempotency: null | {
58
+ retentionMs: number;
59
+ };
60
+ schemaPreconditions: boolean;
61
+ };
62
+ /** Local: 2000; git: 30000, plus on window focus. */
63
+ pollIntervalMs: number;
64
+ limits: Limits;
65
+ /**
66
+ * The app the site editor shows in its Preview tab (and where "open the real
67
+ * page" points); the local server reports `deco serve --preview`. `null`: no preview.
68
+ */
69
+ preview: null | {
70
+ url: string;
71
+ };
72
+ /** Dir relative to the repository root; `null` when read-only or uploads go to hosted storage. */
73
+ assets: null | {
74
+ dir: string;
75
+ urlPrefix: typeof ASSETS_URL_PREFIX;
76
+ maxBytes: number;
77
+ };
78
+ /** The contents of `<root>/.deco/secrets.pub`; `null` without one. */
79
+ secrets: null | {
80
+ publicKey: string;
81
+ };
82
+ }
83
+ /** The schema file, in the site editor's `deco-meta@1` format. */
84
+ export interface DecoMeta {
85
+ manifest?: {
86
+ blocks?: Record<string, Record<string, unknown>>;
87
+ };
88
+ schema?: {
89
+ definitions?: Record<string, unknown>;
90
+ root?: Record<string, unknown>;
91
+ };
92
+ [key: string]: unknown;
93
+ }
94
+ export interface ReadParams {
95
+ ref?: string;
96
+ ifNoneMatch?: string;
97
+ }
98
+ export type SchemaGetParams = ReadParams;
99
+ export type SchemaGetResult = {
100
+ notModified: true;
101
+ version: string;
102
+ } | {
103
+ notModified: false;
104
+ version: string;
105
+ resolvedRef: string | null;
106
+ schema: DecoMeta;
107
+ };
108
+ export type BlocksListParams = ReadParams;
109
+ /** A file `blocks.list` skipped or shadowed. */
110
+ export interface Diagnostic {
111
+ /** The file name inside `.deco/blocks`. */
112
+ file: string;
113
+ kind: "invalid-json" | "not-an-object" | "too-large" | "shadowed";
114
+ message: string;
115
+ /** For `shadowed`: the entry the file is a spelling of. */
116
+ name?: string;
117
+ /** For `shadowed`: the file that won. */
118
+ winner?: string;
119
+ }
120
+ export type BlocksListResult = {
121
+ notModified: true;
122
+ revision: string;
123
+ resolvedRef: string | null;
124
+ } | {
125
+ notModified: false;
126
+ revision: string;
127
+ resolvedRef: string | null;
128
+ /** Every saved block, by name. */
129
+ blocks: Record<string, Record<string, unknown>>;
130
+ /** One opaque version per entry. */
131
+ versions: Record<string, string>;
132
+ /** Files skipped or shadowed. */
133
+ diagnostics: Diagnostic[];
134
+ };
135
+ export interface BlocksApplyParams {
136
+ ref?: string;
137
+ /** Retry the same logical write; only when advertised. */
138
+ requestKey?: string;
139
+ /** Reject if the schema changed; only when advertised. */
140
+ ifSchemaMatch?: string;
141
+ /** Whole-entry replace (create or update). */
142
+ set?: Record<string, Record<string, unknown>>;
143
+ /** A missing name counts as deleted. */
144
+ delete?: string[];
145
+ /** A version the entry must have; `null` = must not exist. */
146
+ ifMatch?: Record<string, string | null>;
147
+ }
148
+ export interface BlocksApplyResult {
149
+ revision: string;
150
+ versions: Record<string, string | null>;
151
+ }
152
+ /** The four methods, by wire name. */
153
+ export interface Methods {
154
+ describe: {
155
+ params: Record<string, never> | undefined;
156
+ result: DescribeResult;
157
+ };
158
+ "schema.get": {
159
+ params: SchemaGetParams | undefined;
160
+ result: SchemaGetResult;
161
+ };
162
+ "blocks.list": {
163
+ params: BlocksListParams | undefined;
164
+ result: BlocksListResult;
165
+ };
166
+ "blocks.apply": {
167
+ params: BlocksApplyParams;
168
+ result: BlocksApplyResult;
169
+ };
170
+ }
171
+ export type MethodName = keyof Methods;
172
+ export declare const METHOD_NAMES: readonly MethodName[];
173
+ /** A JSON-RPC request id. The protocol requires one on every request. */
174
+ export type RpcId = string | number;
175
+ export interface RpcRequest<M extends MethodName = MethodName> {
176
+ jsonrpc: "2.0";
177
+ id: RpcId;
178
+ method: M;
179
+ params?: Methods[M]["params"];
180
+ }
181
+ export type RpcResponse<R = unknown> = {
182
+ jsonrpc: "2.0";
183
+ id: RpcId | null;
184
+ result: R;
185
+ } | {
186
+ jsonrpc: "2.0";
187
+ id: RpcId | null;
188
+ error: {
189
+ code: number;
190
+ message: string;
191
+ data?: unknown;
192
+ };
193
+ };
194
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/protocol/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAE5C,0DAA0D;AAC1D,eAAO,MAAM,gBAAgB;aAAK,KAAK,EAAE,CAAC;aAAE,KAAK,EAAE,CAAC;CAAW,CAAC;AAEhE,eAAO,MAAM,aAAa,gBAAgB,CAAC;AAE3C,uEAAuE;AACvE,eAAO,MAAM,QAAQ,SAAS,CAAC;AAE/B,6CAA6C;AAC7C,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,sEAAsE;AACtE,eAAO,MAAM,iBAAiB,aAAa,CAAC;AAE5C,MAAM,WAAW,MAAM;IACrB,qDAAqD;IACrD,cAAc,EAAE,MAAM,CAAC;IACvB,iCAAiC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,eAAe,EAAE,MAAM,CAAC;IACxB,kDAAkD;IAClD,YAAY,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC;IACvB,oDAAoD;IACpD,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAID,2EAA2E;AAC3E,eAAO,MAAM,cAAc,EA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B,CAAA;KAAE,CAAC;IAClF,cAAc,EAAE;QAAE,MAAM,EAAE,iBAAiB,CAAC;QAAC,MAAM,EAAE,iBAAiB,CAAA;KAAE,CAAC;CAC1E;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC;AAEvC,eAAO,MAAM,YAAY,EAAE,SAAS,UAAU,EAK7C,CAAC;AAEF,yEAAyE;AACzE,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpC,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU;IAC3D,OAAO,EAAE,KAAK,CAAC;IACf,EAAE,EAAE,KAAK,CAAC;IACV,MAAM,EAAE,CAAC,CAAC;IACV,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;CAC/B;AAED,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,OAAO,IAC/B;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,EAAE,EAAE,KAAK,GAAG,IAAI,CAAC;IAAC,MAAM,EAAE,CAAC,CAAA;CAAE,GAC/C;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,EAAE,EAAE,KAAK,GAAG,IAAI,CAAC;IAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;CAAE,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * The content protocol's method types: JSON-RPC 2.0 over one HTTP endpoint,
3
+ * four methods (`describe`, `schema.get`, `blocks.list`, `blocks.apply`).
4
+ */
5
+ export const PROTOCOL_NAME = "deco-content";
6
+ /** Minors only add; a client refuses an unknown major. */
7
+ export const PROTOCOL_VERSION = { major: 1, minor: 0 };
8
+ export const SCHEMA_FORMAT = "deco-meta@1";
9
+ /** The path the local server (`deco serve`) mounts the endpoint at. */
10
+ export const RPC_PATH = "/rpc";
11
+ /** The longest batch a request may carry. */
12
+ export const MAX_BATCH_CALLS = 10;
13
+ /** The URL prefix every uploaded asset is stored under in a field. */
14
+ export const ASSETS_URL_PREFIX = "/assets/";
15
+ const MiB = 1024 * 1024;
16
+ /** The protocol's default limits. A storage or a server can lower them. */
17
+ export const DEFAULT_LIMITS = Object.freeze({
18
+ maxOpsPerApply: 500,
19
+ maxBlockBytes: 1 * MiB,
20
+ maxRequestBytes: 8 * MiB,
21
+ maxListBytes: 16 * MiB,
22
+ maxSchemaBytes: 16 * MiB,
23
+ maxBatchResponseBytes: 32 * MiB,
24
+ });
25
+ export const METHOD_NAMES = [
26
+ "describe",
27
+ "schema.get",
28
+ "blocks.list",
29
+ "blocks.apply",
30
+ ];
31
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/protocol/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG,cAAc,CAAC;AAE5C,0DAA0D;AAC1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAW,CAAC;AAEhE,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAC;AAE3C,uEAAuE;AACvE,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC;AAE/B,6CAA6C;AAC7C,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAElC,sEAAsE;AACtE,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC;AAiB5C,MAAM,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC;AAExB,2EAA2E;AAC3E,MAAM,CAAC,MAAM,cAAc,GAAqB,MAAM,CAAC,MAAM,CAAC;IAC5D,cAAc,EAAE,GAAG;IACnB,aAAa,EAAE,CAAC,GAAG,GAAG;IACtB,eAAe,EAAE,CAAC,GAAG,GAAG;IACxB,YAAY,EAAE,EAAE,GAAG,GAAG;IACtB,cAAc,EAAE,EAAE,GAAG,GAAG;IACxB,qBAAqB,EAAE,EAAE,GAAG,GAAG;CAChC,CAAC,CAAC;AA0GH,MAAM,CAAC,MAAM,YAAY,GAA0B;IACjD,UAAU;IACV,YAAY;IACZ,aAAa;IACb,cAAc;CACf,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * `@decocms/blocks/analytics`: cookie-free page views in the One Dollar Stats
3
+ * tracker's wire format. See /next/analytics and
4
+ * /next/telemetry-internals#analytics-events.
5
+ *
6
+ * `AnalyticsScript` renders one small inline script with the resolved
7
+ * `analytics` block's settings. In the browser it sends a page view on load
8
+ * (once the page is visible, so prerendered pages don't count) and on every
9
+ * navigation that changes the path, and exposes the sender `track` uses.
10
+ *
11
+ * Wire format (pinned against onedollarstats' stonks.js tracker):
12
+ * `{ u, e: [{ t, h, r, p }], debug }`, where `u` is the page URL without its
13
+ * query string, hash or trailing slash, `t` the event type (`PageView` or a
14
+ * custom name), `h` hash routing (always false), `r` a referrer from another
15
+ * host and `p` the event's properties. Sent as `GET <collector>?data=<base64
16
+ * of the UTF-8 JSON>` when that's at most 1500 characters, otherwise with
17
+ * `navigator.sendBeacon` or a `POST`.
18
+ */
19
+ import { type ReactNode } from "react";
20
+ import type { Analytics } from "./types.ts";
21
+ /**
22
+ * The tracking script. Render it in your root layout with the resolved
23
+ * `analytics` block's settings; renders nothing when `enabled` is false.
24
+ */
25
+ export declare function AnalyticsScript(props?: Analytics): ReactNode | null;
26
+ /**
27
+ * Sends your own event from the browser, through the script `AnalyticsScript`
28
+ * renders. Does nothing without it (and on the server).
29
+ */
30
+ export declare function track(name: string, props?: Record<string, string | number | boolean>): void;
31
+ //# sourceMappingURL=analytics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../src/v8/analytics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAO5C;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,GAAE,SAAc,GAAG,SAAS,GAAG,IAAI,CAMvE;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,IAAI,CAM3F"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * `@decocms/blocks/analytics`: cookie-free page views in the One Dollar Stats
3
+ * tracker's wire format. See /next/analytics and
4
+ * /next/telemetry-internals#analytics-events.
5
+ *
6
+ * `AnalyticsScript` renders one small inline script with the resolved
7
+ * `analytics` block's settings. In the browser it sends a page view on load
8
+ * (once the page is visible, so prerendered pages don't count) and on every
9
+ * navigation that changes the path, and exposes the sender `track` uses.
10
+ *
11
+ * Wire format (pinned against onedollarstats' stonks.js tracker):
12
+ * `{ u, e: [{ t, h, r, p }], debug }`, where `u` is the page URL without its
13
+ * query string, hash or trailing slash, `t` the event type (`PageView` or a
14
+ * custom name), `h` hash routing (always false), `r` a referrer from another
15
+ * host and `p` the event's properties. Sent as `GET <collector>?data=<base64
16
+ * of the UTF-8 JSON>` when that's at most 1500 characters, otherwise with
17
+ * `navigator.sendBeacon` or a `POST`.
18
+ */
19
+ import { createElement } from "react";
20
+ import { HOSTED_ANALYTICS_COLLECTOR } from "./builtins/data.js";
21
+ const GLOBAL = "__decoAnalytics";
22
+ /** The browser tracker. Static: the collector reaches it through `data-url`, never string-built. */
23
+ const TRACKER = `(function(){var s=document.currentScript,c=s&&s.getAttribute("data-url");if(!c||window.${GLOBAL})return;var last;function post(b){if(navigator.sendBeacon&&navigator.sendBeacon(c,b))return;fetch(c,{method:"POST",body:b,headers:{"Content-Type":"application/json"},keepalive:true}).catch(function(){})}function send(t,p){var u=new URL(location.href);u.search="";u.hash="";var r;try{if(document.referrer){var f=new URL(document.referrer);if(f.hostname!==u.hostname){f.search="";f.hash="";r=f.href}}}catch(e){}var b=JSON.stringify({u:u.href.replace(/\\/$/,""),e:[{t:t,h:false,r:r,p:p}],debug:false});var d=btoa(String.fromCharCode.apply(null,Array.from(new TextEncoder().encode(b))));if(d.length<=1500){new Image(1,1).src=c+"?data="+d}else post(b)}function view(){if(location.pathname===last)return;last=location.pathname;send("PageView")}window.${GLOBAL}={track:function(n,p){send(n,p)}};var h=history.pushState;history.pushState=function(){h.apply(this,arguments);requestAnimationFrame(view)};addEventListener("popstate",function(){requestAnimationFrame(view)});if(document.visibilityState==="visible")view();else document.addEventListener("visibilitychange",function v(){if(document.visibilityState==="visible"){document.removeEventListener("visibilitychange",v);view()}})})();`;
24
+ /**
25
+ * The tracking script. Render it in your root layout with the resolved
26
+ * `analytics` block's settings; renders nothing when `enabled` is false.
27
+ */
28
+ export function AnalyticsScript(props = {}) {
29
+ if (props.enabled === false)
30
+ return null;
31
+ return createElement("script", {
32
+ "data-url": props.collector ?? HOSTED_ANALYTICS_COLLECTOR,
33
+ dangerouslySetInnerHTML: { __html: TRACKER },
34
+ });
35
+ }
36
+ /**
37
+ * Sends your own event from the browser, through the script `AnalyticsScript`
38
+ * renders. Does nothing without it (and on the server).
39
+ */
40
+ export function track(name, props) {
41
+ const tracker = typeof window === "undefined"
42
+ ? undefined
43
+ : window[GLOBAL];
44
+ tracker?.track?.(name, props);
45
+ }
46
+ //# sourceMappingURL=analytics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analytics.js","sourceRoot":"","sources":["../../src/v8/analytics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,aAAa,EAAkB,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAGhE,MAAM,MAAM,GAAG,iBAAiB,CAAC;AAEjC,oGAAoG;AACpG,MAAM,OAAO,GAAG,0FAA0F,MAAM,4uBAA4uB,MAAM,2aAA2a,CAAC;AAE9wC;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,KAAK,GAAc,EAAE;IACnD,IAAI,KAAK,CAAC,OAAO,KAAK,KAAK;QAAE,OAAO,IAAI,CAAC;IACzC,OAAO,aAAa,CAAC,QAAQ,EAAE;QAC7B,UAAU,EAAE,KAAK,CAAC,SAAS,IAAI,0BAA0B;QACzD,uBAAuB,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE;KAC7C,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,IAAY,EAAE,KAAiD;IACnF,MAAM,OAAO,GACX,OAAO,MAAM,KAAK,WAAW;QAC3B,CAAC,CAAC,SAAS;QACX,CAAC,CAAE,MAA0E,CAAC,MAAM,CAAC,CAAC;IAC1F,OAAO,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAChC,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Work that runs beside requests, never in front of them: release checks and
3
+ * telemetry batches (see /next/hosted-releases-internals and
4
+ * /next/telemetry-internals#sending-in-the-background).
5
+ *
6
+ * Where it runs, in order:
7
+ * - a hook the host installs under {@link BACKGROUND_HOOK};
8
+ * - on Cloudflare Workers, which run no timers between requests, the
9
+ * platform's `waitUntil` (from `cloudflare:workers`), so the task runs
10
+ * after the response with no binding and no user code: the core installs
11
+ * that hook itself;
12
+ * - `requestIdleCallback` (browsers, React Native);
13
+ * - `scheduler.postTask({ priority: "background" })`;
14
+ * - an unref'd `setTimeout` (so Node never stays alive for it), then
15
+ * `setImmediate` where it exists.
16
+ *
17
+ * A task never throws into its caller: errors and rejections are swallowed.
18
+ */
19
+ type Task = () => unknown;
20
+ export declare function runInBackground(task: Task): void;
21
+ /** `setTimeout` that never keeps a Node process alive. */
22
+ export declare function later(ms: number, callback: () => void): void;
23
+ /** Whether a host installed a background hook (then batches go out after each response). */
24
+ export declare function hasBackgroundHook(): boolean;
25
+ export {};
26
+ //# sourceMappingURL=background.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"background.d.ts","sourceRoot":"","sources":["../../src/v8/background.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,KAAK,IAAI,GAAG,MAAM,OAAO,CAAC;AAoC1B,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAqChD;AAED,0DAA0D;AAC1D,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAG5D;AAED,4FAA4F;AAC5F,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C"}