@decocms/blocks 8.1.0-next.1 → 8.1.0-next.3

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 (392) 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 +51 -0
  47. package/dist/protocol/conformance/contentHashFixtures.d.ts.map +1 -0
  48. package/dist/protocol/conformance/contentHashFixtures.js +94 -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 +28 -0
  63. package/dist/protocol/index.d.ts.map +1 -0
  64. package/dist/protocol/index.js +28 -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 +70 -0
  191. package/dist/v8/canonical.d.ts.map +1 -0
  192. package/dist/v8/canonical.js +130 -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 +126 -0
  247. package/dist/v8/cli/schema/tsProgram.d.ts.map +1 -0
  248. package/dist/v8/cli/schema/tsProgram.js +435 -0
  249. package/dist/v8/cli/schema/tsProgram.js.map +1 -0
  250. package/dist/v8/cli/schema/typeToSchema.d.ts +94 -0
  251. package/dist/v8/cli/schema/typeToSchema.d.ts.map +1 -0
  252. package/dist/v8/cli/schema/typeToSchema.js +752 -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 +217 -0
  269. package/dist/v8/cms.js.map +1 -0
  270. package/dist/v8/content.d.ts +51 -0
  271. package/dist/v8/content.d.ts.map +1 -0
  272. package/dist/v8/content.js +218 -0
  273. package/dist/v8/content.js.map +1 -0
  274. package/dist/v8/draft.d.ts +48 -0
  275. package/dist/v8/draft.d.ts.map +1 -0
  276. package/dist/v8/draft.js +195 -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 +427 -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 +226 -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/dist/v8/variants.d.ts +3 -0
  323. package/dist/v8/variants.d.ts.map +1 -0
  324. package/dist/v8/variants.js +65 -0
  325. package/dist/v8/variants.js.map +1 -0
  326. package/package.json +64 -18
  327. package/src/index.ts +1 -1
  328. package/src/protocol/canonical.ts +1 -1
  329. package/src/protocol/ciphertext.ts +1 -1
  330. package/src/protocol/client.ts +2 -2
  331. package/src/protocol/conformance/cases/assets.ts +3 -3
  332. package/src/protocol/conformance/cases/guards.ts +4 -4
  333. package/src/protocol/conformance/cases/reads.ts +4 -4
  334. package/src/protocol/conformance/cases/types.ts +1 -1
  335. package/src/protocol/conformance/cases/wire.ts +4 -4
  336. package/src/protocol/conformance/cases/writes.ts +4 -4
  337. package/src/protocol/conformance/contentHashFixtures.ts +57 -0
  338. package/src/protocol/conformance/context.ts +4 -4
  339. package/src/protocol/conformance/index.ts +15 -10
  340. package/src/protocol/index.ts +14 -7
  341. package/src/protocol/params.ts +2 -2
  342. package/src/protocol/secrets.ts +3 -3
  343. package/src/protocol/server/assets.ts +6 -6
  344. package/src/protocol/server/auth.ts +1 -1
  345. package/src/protocol/server/content.ts +5 -5
  346. package/src/protocol/server/core.ts +12 -6
  347. package/src/protocol/server/handler.ts +6 -6
  348. package/src/protocol/server/http.ts +1 -1
  349. package/src/protocol/server/index.ts +3 -3
  350. package/src/protocol/server/methods/apply.ts +9 -9
  351. package/src/protocol/server/methods/read.ts +5 -5
  352. package/src/protocol/server/rpc.ts +6 -6
  353. package/src/protocol/storage/fs/index.ts +7 -7
  354. package/src/protocol/storage/fs/lock.ts +1 -1
  355. package/src/protocol/storage/fs/unsupported.ts +2 -2
  356. package/src/protocol/storage/memory.ts +4 -4
  357. package/src/protocol/storage.ts +1 -1
  358. package/src/v8/analytics.ts +2 -2
  359. package/src/v8/builtins/data.ts +1 -1
  360. package/src/v8/builtins/index.ts +6 -6
  361. package/src/v8/builtins/lazy.ts +1 -1
  362. package/src/v8/builtins/legacy.ts +1 -1
  363. package/src/v8/builtins/multivariate.ts +1 -1
  364. package/src/v8/builtins/secret.ts +2 -2
  365. package/src/v8/canonical.ts +36 -0
  366. package/src/v8/cli/builtins.ts +2 -2
  367. package/src/v8/cli/check/index.ts +11 -11
  368. package/src/v8/cli/content.ts +6 -6
  369. package/src/v8/cli/index.ts +7 -7
  370. package/src/v8/cli/main.ts +1 -1
  371. package/src/v8/cli/run.ts +7 -7
  372. package/src/v8/cli/schema/builtinSchemas.ts +1 -1
  373. package/src/v8/cli/schema/generate.ts +8 -7
  374. package/src/v8/cli/schema/index.ts +4 -4
  375. package/src/v8/cli/schema/tsProgram.ts +18 -1
  376. package/src/v8/cli/schema/typeToSchema.ts +100 -4
  377. package/src/v8/cli/serve/server.ts +9 -9
  378. package/src/v8/client.ts +5 -5
  379. package/src/v8/cms.ts +23 -11
  380. package/src/v8/content.ts +58 -22
  381. package/src/v8/draft.ts +75 -6
  382. package/src/v8/errors.ts +1 -1
  383. package/src/v8/fetch.ts +1 -1
  384. package/src/v8/identity.ts +1 -1
  385. package/src/v8/index.ts +5 -5
  386. package/src/v8/matchRoute.ts +1 -1
  387. package/src/v8/remoteLoader.ts +246 -26
  388. package/src/v8/resolver.ts +6 -6
  389. package/src/v8/secrets.ts +1 -1
  390. package/src/v8/telemetry.ts +5 -5
  391. package/src/v8/types.ts +14 -1
  392. package/src/v8/variants.ts +61 -0
@@ -19,17 +19,22 @@
19
19
  * don't apply to an endpoint (a read-only one, one without request keys)
20
20
  * skip themselves. Browser-safe: it only needs `fetch`.
21
21
  */
22
- import { assetCases } from "./cases/assets";
23
- import { guardCases } from "./cases/guards";
24
- import { readCases } from "./cases/reads";
25
- import type { ConformanceCase } from "./cases/types";
26
- import { wireCases } from "./cases/wire";
27
- import { writeCases } from "./cases/writes";
28
- import { ConformanceContext, type ConformanceOptions, SkipCase } from "./context";
22
+ import { assetCases } from "./cases/assets.ts";
23
+ import { guardCases } from "./cases/guards.ts";
24
+ import { readCases } from "./cases/reads.ts";
25
+ import type { ConformanceCase } from "./cases/types.ts";
26
+ import { wireCases } from "./cases/wire.ts";
27
+ import { writeCases } from "./cases/writes.ts";
28
+ import { ConformanceContext, type ConformanceOptions, SkipCase } from "./context.ts";
29
29
 
30
- export type { ConformanceCase } from "./cases/types";
31
- export { type ContentHashFixture, contentHashFixtures } from "./contentHashFixtures";
32
- export type { ConformanceOptions } from "./context";
30
+ export type { ConformanceCase } from "./cases/types.ts";
31
+ export {
32
+ type ContentHashFixture,
33
+ contentHashFixtures,
34
+ type DraftOverlayFixture,
35
+ draftOverlayFixtures,
36
+ } from "./contentHashFixtures.ts";
37
+ export type { ConformanceOptions } from "./context.ts";
33
38
 
34
39
  /** Every conformance case, in the order they run. */
35
40
  export const conformanceCases: readonly ConformanceCase[] = [
@@ -14,7 +14,10 @@
14
14
  *
15
15
  * The SDK's runtime never imports the protocol, so it never reaches an app
16
16
  * bundle. The canonical hash it re-exports is the SDK's own dependency-free
17
- * leaf module (see ./canonical.ts).
17
+ * leaf module (see ./canonical.ts), including the draft overlay hashes
18
+ * (`computeBlockHash`, `computeOverlayVersion`). Draft overlays themselves,
19
+ * preview grants and the draft lifecycle are outside the protocol: overlays
20
+ * are delivery assets (see /next/content-delivery#exact-draft-previews).
18
21
  */
19
22
  export {
20
23
  APPLY_DIGEST_DOMAIN,
@@ -22,9 +25,13 @@ export {
22
25
  CanonicalJsonError,
23
26
  CONTENT_HASH_FORMAT,
24
27
  canonicalJson,
28
+ computeBlockHash,
25
29
  computeContentRevision,
30
+ computeOverlayVersion,
31
+ DRAFT_OVERLAY_FORMAT,
32
+ type DraftOverlay,
26
33
  sha256Hex,
27
- } from "./canonical";
34
+ } from "./canonical.ts";
28
35
  export {
29
36
  assertSupportedEndpoint,
30
37
  type BatchCall,
@@ -32,8 +39,8 @@ export {
32
39
  type ContentClient,
33
40
  type ContentClientOptions,
34
41
  createContentClient,
35
- } from "./client";
36
- export * from "./errors";
37
- export * from "./keys";
38
- export * from "./storage";
39
- export * from "./types";
42
+ } from "./client.ts";
43
+ export * from "./errors.ts";
44
+ export * from "./keys.ts";
45
+ export * from "./storage.ts";
46
+ export * from "./types.ts";
@@ -7,8 +7,8 @@
7
7
  * parsed copy of a record would turn an own `__proto__` key into a prototype.
8
8
  */
9
9
  import { z } from "zod";
10
- import { invalidParams } from "./errors";
11
- import type { BlocksApplyParams, MethodName, ReadParams } from "./types";
10
+ import { invalidParams } from "./errors.ts";
11
+ import type { BlocksApplyParams, MethodName, ReadParams } from "./types.ts";
12
12
 
13
13
  const opaque = z.string().min(1).max(1024);
14
14
 
@@ -11,9 +11,9 @@
11
11
  * The schema marks a `Secret` field with `"format": "secret"` — the contract
12
12
  * `deco schema` emits for the `Secret` type. Browser-safe.
13
13
  */
14
- import { parseCiphertext } from "./ciphertext";
15
- import type { BlockViolation } from "./errors";
16
- import type { DecoMeta } from "./types";
14
+ import { parseCiphertext } from "./ciphertext.ts";
15
+ import type { BlockViolation } from "./errors.ts";
16
+ import type { DecoMeta } from "./types.ts";
17
17
 
18
18
  /** The built-in block type that holds an encrypted value. */
19
19
  export const SECRET_BLOCK_TYPE = "secret";
@@ -17,7 +17,7 @@ import {
17
17
  assetNameForType,
18
18
  isAcceptedAssetType,
19
19
  sanitizeAssetName,
20
- } from "../assets";
20
+ } from "../assets.ts";
21
21
  import {
22
22
  type ContentProtocolError,
23
23
  ErrorCode,
@@ -27,11 +27,11 @@ import {
27
27
  readOnly,
28
28
  unauthorized,
29
29
  unsupported,
30
- } from "../errors";
31
- import type { ContentStorage } from "../storage";
32
- import { ASSETS_URL_PREFIX } from "../types";
33
- import { type AuthOptions, assertAuthOptions, authenticate } from "./auth";
34
- import { BodyEncodingError, BodyTooLargeError, jsonResponse, readBody } from "./http";
30
+ } from "../errors.ts";
31
+ import type { ContentStorage } from "../storage.ts";
32
+ import { ASSETS_URL_PREFIX } from "../types.ts";
33
+ import { type AuthOptions, assertAuthOptions, authenticate } from "./auth.ts";
34
+ import { BodyEncodingError, BodyTooLargeError, jsonResponse, readBody } from "./http.ts";
35
35
 
36
36
  const STATUS: Record<number, number> = {
37
37
  [ErrorCode.Unauthorized]: 401,
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Request authorization shared by the content handler and the asset handler.
3
3
  */
4
- import { bearerToken, timingSafeEqualStrings } from "./http";
4
+ import { bearerToken, timingSafeEqualStrings } from "./http.ts";
5
5
 
6
6
  /**
7
7
  * What an `authorize` hook decides:
@@ -4,11 +4,11 @@
4
4
  * Shared by `blocks.list` (which needs every body) and `blocks.apply` (which
5
5
  * needs bodies only to break ties between spellings).
6
6
  */
7
- import { limitExceeded, unavailable } from "../errors";
8
- import { entryHasPath, fullyDecodeFileName, isBlockFileName, resolveSpellings } from "../keys";
9
- import type { ContentStorage, StorageFile, StorageSnapshot } from "../storage";
10
- import type { Diagnostic, Limits } from "../types";
11
- import { type BodyCache, type ParsedBody, parseBody } from "./bodyCache";
7
+ import { limitExceeded, unavailable } from "../errors.ts";
8
+ import { entryHasPath, fullyDecodeFileName, isBlockFileName, resolveSpellings } from "../keys.ts";
9
+ import type { ContentStorage, StorageFile, StorageSnapshot } from "../storage.ts";
10
+ import type { Diagnostic, Limits } from "../types.ts";
11
+ import { type BodyCache, type ParsedBody, parseBody } from "./bodyCache.ts";
12
12
 
13
13
  export interface LoadedEntry {
14
14
  file: string;
@@ -1,18 +1,24 @@
1
1
  /**
2
2
  * The shared state of one content handler: its storage, options and caches.
3
3
  */
4
- import { ContentProtocolError, invalidBlock, notFound, unavailable, unsupported } from "../errors";
5
- import { blockNameFromFile } from "../keys";
4
+ import {
5
+ ContentProtocolError,
6
+ invalidBlock,
7
+ notFound,
8
+ unavailable,
9
+ unsupported,
10
+ } from "../errors.ts";
11
+ import { blockNameFromFile } from "../keys.ts";
6
12
  import {
7
13
  type ContentStorage,
8
14
  type StorageDescription,
9
15
  StorageInvalidFileError,
10
16
  StorageNotFoundError,
11
17
  StorageUnavailableError,
12
- } from "../storage";
13
- import { DEFAULT_LIMITS, type DecoMeta, type Limits } from "../types";
14
- import type { AuthOptions } from "./auth";
15
- import { BodyCache } from "./bodyCache";
18
+ } from "../storage.ts";
19
+ import { DEFAULT_LIMITS, type DecoMeta, type Limits } from "../types.ts";
20
+ import type { AuthOptions } from "./auth.ts";
21
+ import { BodyCache } from "./bodyCache.ts";
16
22
 
17
23
  export interface ContentHandlerOptions extends AuthOptions {
18
24
  /** Reported by `describe`, such as `{ name: "deco-cli", version: "8.0.0" }`. */
@@ -23,18 +23,18 @@ import {
23
23
  limitExceeded,
24
24
  parseError,
25
25
  unauthorized,
26
- } from "../errors";
27
- import type { ContentStorage } from "../storage";
28
- import { assertAuthOptions, authenticate } from "./auth";
29
- import { type ContentHandlerOptions, Core } from "./core";
26
+ } from "../errors.ts";
27
+ import type { ContentStorage } from "../storage.ts";
28
+ import { assertAuthOptions, authenticate } from "./auth.ts";
29
+ import { type ContentHandlerOptions, Core } from "./core.ts";
30
30
  import {
31
31
  BodyEncodingError,
32
32
  BodyTooLargeError,
33
33
  isJsonContentType,
34
34
  jsonResponse,
35
35
  readBody,
36
- } from "./http";
37
- import { dispatch } from "./rpc";
36
+ } from "./http.ts";
37
+ import { dispatch } from "./rpc.ts";
38
38
 
39
39
  export type ContentHandler = (request: Request) => Promise<Response>;
40
40
 
@@ -4,7 +4,7 @@
4
4
  * only (Request, Response, CompressionStream), so it runs on Node, Bun,
5
5
  * Workers and Deno.
6
6
  */
7
- import { sha256Hex } from "../canonical";
7
+ import { sha256Hex } from "../canonical.ts";
8
8
 
9
9
  /** The body was larger than allowed (after decompression). */
10
10
  export class BodyTooLargeError extends Error {
@@ -6,6 +6,6 @@
6
6
  * and Deno. (`deco serve`'s asset uploads use `./assets`, which isn't public.)
7
7
  */
8
8
 
9
- export type { AuthOptions, AuthorizeResult } from "./auth";
10
- export type { ContentHandlerOptions } from "./core";
11
- export { type ContentHandler, createContentHandler } from "./handler";
9
+ export type { AuthOptions, AuthorizeResult } from "./auth.ts";
10
+ export type { ContentHandlerOptions } from "./core.ts";
11
+ export { type ContentHandler, createContentHandler } from "./handler.ts";
@@ -18,7 +18,7 @@
18
18
  * key reserved meanwhile) is retried against a new snapshot after a jittered
19
19
  * backoff, rechecking every guard, up to `maxCommitAttempts` times.
20
20
  */
21
- import { applyRequestDigest, canonicalJson } from "../../canonical";
21
+ import { applyRequestDigest, canonicalJson } from "../../canonical.ts";
22
22
  import {
23
23
  type BlockViolation,
24
24
  conflict,
@@ -29,7 +29,7 @@ import {
29
29
  unavailable,
30
30
  unsupported,
31
31
  type VersionMismatch,
32
- } from "../../errors";
32
+ } from "../../errors.ts";
33
33
  import {
34
34
  blockFileName,
35
35
  blockNameFromFile,
@@ -39,13 +39,13 @@ import {
39
39
  isBlockFileName,
40
40
  serializeBlock,
41
41
  spellingKey,
42
- } from "../../keys";
43
- import { checkSecrets } from "../../secrets";
44
- import type { StorageDescription, StoredReceipt } from "../../storage";
45
- import type { BlocksApplyParams, BlocksApplyResult, DecoMeta, Limits } from "../../types";
46
- import { type LoadedContent, type LoadedEntry, loadCurrentContent } from "../content";
47
- import type { Core } from "../core";
48
- import { parseSchema, readSchema } from "./read";
42
+ } from "../../keys.ts";
43
+ import { checkSecrets } from "../../secrets.ts";
44
+ import type { StorageDescription, StoredReceipt } from "../../storage.ts";
45
+ import type { BlocksApplyParams, BlocksApplyResult, DecoMeta, Limits } from "../../types.ts";
46
+ import { type LoadedContent, type LoadedEntry, loadCurrentContent } from "../content.ts";
47
+ import type { Core } from "../core.ts";
48
+ import { parseSchema, readSchema } from "./read.ts";
49
49
 
50
50
  const utf8 = new TextEncoder();
51
51
 
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * The three read methods: `describe`, `schema.get` and `blocks.list`.
3
3
  */
4
- import { publicKeyDerFromPem } from "../../ciphertext";
5
- import { limitExceeded, notFound, unavailable } from "../../errors";
4
+ import { publicKeyDerFromPem } from "../../ciphertext.ts";
5
+ import { limitExceeded, notFound, unavailable } from "../../errors.ts";
6
6
  import {
7
7
  ASSETS_URL_PREFIX,
8
8
  type BlocksListResult,
@@ -13,9 +13,9 @@ import {
13
13
  type ReadParams,
14
14
  SCHEMA_FORMAT,
15
15
  type SchemaGetResult,
16
- } from "../../types";
17
- import { loadCurrentContent } from "../content";
18
- import type { Core } from "../core";
16
+ } from "../../types.ts";
17
+ import { loadCurrentContent } from "../content.ts";
18
+ import type { Core } from "../core.ts";
19
19
 
20
20
  const DEFAULT_SERVER = { name: "deco-blocks", version: "unknown" };
21
21
 
@@ -15,12 +15,12 @@ import {
15
15
  invalidRequest,
16
16
  limitExceeded,
17
17
  methodNotFound,
18
- } from "../errors";
19
- import { validateParams } from "../params";
20
- import { MAX_BATCH_CALLS, METHOD_NAMES, type MethodName, type RpcId } from "../types";
21
- import { type Core, toProtocolError } from "./core";
22
- import { blocksApply } from "./methods/apply";
23
- import { blocksList, describe, schemaGet } from "./methods/read";
18
+ } from "../errors.ts";
19
+ import { validateParams } from "../params.ts";
20
+ import { MAX_BATCH_CALLS, METHOD_NAMES, type MethodName, type RpcId } from "../types.ts";
21
+ import { type Core, toProtocolError } from "./core.ts";
22
+ import { blocksApply } from "./methods/apply.ts";
23
+ import { blocksList, describe, schemaGet } from "./methods/read.ts";
24
24
 
25
25
  const utf8 = new TextEncoder();
26
26
 
@@ -21,8 +21,8 @@
21
21
  */
22
22
  import { lstat, mkdir, open, readdir, readFile, stat } from "node:fs/promises";
23
23
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
24
- import { suffixedAssetName } from "../../assets";
25
- import { isBlockFileName } from "../../keys";
24
+ import { suffixedAssetName } from "../../assets.ts";
25
+ import { isBlockFileName } from "../../keys.ts";
26
26
  import {
27
27
  type CommitResult,
28
28
  type ContentStorage,
@@ -34,11 +34,11 @@ import {
34
34
  StorageUnavailableError,
35
35
  type StoredFileBody,
36
36
  type StoredSchema,
37
- } from "../../storage";
38
- import type { Limits } from "../../types";
39
- import { gitBlobHash, revisionOf } from "./hash";
40
- import { withCommitLock } from "./lock";
41
- import { applyFileChange, sweepStaleTransactions } from "./transaction";
37
+ } from "../../storage.ts";
38
+ import type { Limits } from "../../types.ts";
39
+ import { gitBlobHash, revisionOf } from "./hash.ts";
40
+ import { withCommitLock } from "./lock.ts";
41
+ import { applyFileChange, sweepStaleTransactions } from "./transaction.ts";
42
42
 
43
43
  export interface FsStorageOptions {
44
44
  /** The app root: the folder that contains `.deco/`. */
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { open, rm, stat } from "node:fs/promises";
7
7
  import { join } from "node:path";
8
- import { StorageUnavailableError } from "../../storage";
8
+ import { StorageUnavailableError } from "../../storage.ts";
9
9
 
10
10
  const LOCK_FILE = ".blocks.lock";
11
11
  const queues = new Map<string, Promise<unknown>>();
@@ -4,9 +4,9 @@
4
4
  * filesystem storage needs `node:fs`; on Workers or in a browser, implement
5
5
  * `ContentStorage` over the storage you have instead.
6
6
  */
7
- import type { createFsStorage as nodeCreateFsStorage } from "./index";
7
+ import type { createFsStorage as nodeCreateFsStorage } from "./index.ts";
8
8
 
9
- export type { FsStorage, FsStorageOptions } from "./index";
9
+ export type { FsStorage, FsStorageOptions } from "./index.ts";
10
10
 
11
11
  export const createFsStorage: typeof nodeCreateFsStorage = () => {
12
12
  throw new Error(
@@ -6,9 +6,9 @@
6
6
  * for tests: its state can be dumped and restored to simulate a restart, and
7
7
  * hooks let a test change files between a snapshot and a commit. Browser-safe.
8
8
  */
9
- import { suffixedAssetName } from "../assets";
10
- import { sha256Hex } from "../canonical";
11
- import { isBlockFileName } from "../keys";
9
+ import { suffixedAssetName } from "../assets.ts";
10
+ import { sha256Hex } from "../canonical.ts";
11
+ import { isBlockFileName } from "../keys.ts";
12
12
  import {
13
13
  type CommitAttempt,
14
14
  type CommitResult,
@@ -20,7 +20,7 @@ import {
20
20
  type StoredFileBody,
21
21
  type StoredReceipt,
22
22
  type StoredSchema,
23
- } from "../storage";
23
+ } from "../storage.ts";
24
24
 
25
25
  const DAY_MS = 24 * 60 * 60 * 1000;
26
26
 
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * Browser-safe: types and small error classes only.
12
12
  */
13
- import type { Limits, StorageKind } from "./types";
13
+ import type { Limits, StorageKind } from "./types.ts";
14
14
 
15
15
  /** What a storage tells `describe`. */
16
16
  export interface StorageDescription {
@@ -17,8 +17,8 @@
17
17
  * `navigator.sendBeacon` or a `POST`.
18
18
  */
19
19
  import { createElement, type ReactNode } from "react";
20
- import { HOSTED_ANALYTICS_COLLECTOR } from "./builtins/data";
21
- import type { Analytics } from "./types";
20
+ import { HOSTED_ANALYTICS_COLLECTOR } from "./builtins/data.ts";
21
+ import type { Analytics } from "./types.ts";
22
22
 
23
23
  const GLOBAL = "__decoAnalytics";
24
24
 
@@ -1,4 +1,4 @@
1
- import type { Analytics, Redirect, Telemetry } from "../types";
1
+ import type { Analytics, Redirect, Telemetry } from "../types.ts";
2
2
 
3
3
  /** The hosted Deco CMS collector: where page views go when `collector` is left out. */
4
4
  export const HOSTED_ANALYTICS_COLLECTOR = "https://d.lilstts.com/events";
@@ -1,9 +1,9 @@
1
- import type { BlockFunction } from "../types";
2
- import { analytics, page, redirect, telemetry } from "./data";
3
- import { lazy } from "./lazy";
4
- import { always, date, never } from "./matchers";
5
- import { multivariate } from "./multivariate";
6
- import { secretBlock } from "./secret";
1
+ import type { BlockFunction } from "../types.ts";
2
+ import { analytics, page, redirect, telemetry } from "./data.ts";
3
+ import { lazy } from "./lazy.ts";
4
+ import { always, date, never } from "./matchers.ts";
5
+ import { multivariate } from "./multivariate.ts";
6
+ import { secretBlock } from "./secret.ts";
7
7
 
8
8
  /**
9
9
  * The built-in blocks every block map gets. `secret` here has no key, so it
@@ -1,4 +1,4 @@
1
- import type { Lazy } from "../types";
1
+ import type { Lazy } from "../types.ts";
2
2
 
3
3
  /** Marks the built-in `lazy` function, the resolver's one special case. */
4
4
  const LAZY_BLOCK: unique symbol = Symbol.for("decocms.blocks.v8.lazy");
@@ -16,7 +16,7 @@
16
16
  * - Legacy variants are saved as plain values; on the way to `multivariate`
17
17
  * each one is wrapped in a `lazy` block, so only the chosen one runs.
18
18
  */
19
- import { isPlainObject, type JsonObject } from "../json";
19
+ import { isPlainObject, type JsonObject } from "../json.ts";
20
20
 
21
21
  /**
22
22
  * Legacy type name → built-in. The one table: the runtime falls back to it,
@@ -1,4 +1,4 @@
1
- import type { Variant } from "../types";
1
+ import type { Variant } from "../types.ts";
2
2
 
3
3
  interface MultivariateProps<T> {
4
4
  variants?: Variant<T>[];
@@ -17,8 +17,8 @@
17
17
  * telemetry). A decrypted value stays on the server because it's resolved
18
18
  * there; tainting it (React's taint API) is up to the site's own code.
19
19
  */
20
- import { parseCiphertext } from "../ciphertext";
21
- import type { BlockFunction } from "../types";
20
+ import { parseCiphertext } from "../ciphertext.ts";
21
+ import type { BlockFunction } from "../types.ts";
22
22
 
23
23
  /** True in a browser, where a secret must never be decrypted. */
24
24
  function inBrowser(): boolean {
@@ -115,3 +115,39 @@ export const APPLY_DIGEST_DOMAIN = "deco-content/blocks.apply@1\n";
115
115
  export function applyRequestDigest(params: object): Promise<string> {
116
116
  return sha256Hex(APPLY_DIGEST_DOMAIN + canonicalJson(params));
117
117
  }
118
+
119
+ /** The version of the draft overlay manifest format below. */
120
+ export const DRAFT_OVERLAY_FORMAT = 1;
121
+
122
+ /**
123
+ * A draft overlay manifest (see /next/content-delivery#exact-draft-previews):
124
+ * the complete, cumulative set of a draft's changes, never a patch over an
125
+ * earlier version. `set` maps each changed entry's name to the block hash of
126
+ * its JSON; `delete` names the entries the draft removed (tombstones). The two
127
+ * are disjoint. There is no base revision: a preview server layers it over the
128
+ * production content it already has.
129
+ */
130
+ export interface DraftOverlay {
131
+ format: typeof DRAFT_OVERLAY_FORMAT;
132
+ set: Record<string, string>;
133
+ delete: string[];
134
+ }
135
+
136
+ /**
137
+ * The block hash of one changed entry: SHA-256 over its canonical JSON,
138
+ * lowercase hex. A draft block asset is stored under it
139
+ * (`/sites/<site>/draft-blocks/<block-hash>.json`), and the SDK checks every
140
+ * asset it downloads hashes to its name.
141
+ */
142
+ export function computeBlockHash(entry: unknown): Promise<string> {
143
+ return sha256Hex(canonicalJson(entry));
144
+ }
145
+
146
+ /**
147
+ * The overlay version: SHA-256 over the manifest's canonical JSON, lowercase
148
+ * hex. The manifest is stored under it (`/sites/<site>/drafts/<version>.json`)
149
+ * and a draft pointer names it after its `@`.
150
+ */
151
+ export function computeOverlayVersion(overlay: DraftOverlay): Promise<string> {
152
+ return sha256Hex(canonicalJson(overlay));
153
+ }
@@ -2,7 +2,7 @@
2
2
  * Names the CLI knows without reading any code: the built-in blocks (the
3
3
  * core's reserved names) and the legacy alias table.
4
4
  */
5
- import { RESERVED_NAMES } from "../builtins";
5
+ import { RESERVED_NAMES } from "../builtins/index.ts";
6
6
 
7
7
  /** Spec: built-in-blocks. Every block map gets these, in this order. */
8
8
  export const BUILT_IN_BLOCKS: readonly string[] = [...RESERVED_NAMES];
@@ -17,4 +17,4 @@ export function isBuiltIn(name: string): boolean {
17
17
  * editor's special screens still look types up by these names (spec:
18
18
  * studio-compatibility › Well-known types and the alias table).
19
19
  */
20
- export { LEGACY_ALIASES, storesPlainVariants } from "../builtins/legacy";
20
+ export { LEGACY_ALIASES, storesPlainVariants } from "../builtins/legacy.ts";
@@ -18,17 +18,17 @@
18
18
  */
19
19
 
20
20
  import fs from "node:fs";
21
- import Ajv, { type ValidateFunction } from "ajv";
22
- import { isWellFormedCiphertext } from "../../../protocol/secrets";
23
- import { isBlock, own } from "../../json";
24
- import { findRouteConflicts } from "../../matchRoute";
25
- import { isBuiltIn, storesPlainVariants } from "../builtins";
26
- import { readSavedBlocks, type SavedBlocks } from "../content";
27
- import { consoleReporter, type Reporter } from "../log";
28
- import { CliError, decoPaths, findDecoRoot } from "../root";
29
- import type { DecoMeta } from "../schema/generate";
30
- import { SECTION_REF_KEY, toBase64 } from "../schema/typeToSchema";
31
- import { BLOCK_DEF, joinPath, rewriteErrors } from "./messages";
21
+ import { Ajv, type ValidateFunction } from "ajv";
22
+ import { isWellFormedCiphertext } from "../../../protocol/secrets.ts";
23
+ import { isBlock, own } from "../../json.ts";
24
+ import { findRouteConflicts } from "../../matchRoute.ts";
25
+ import { isBuiltIn, storesPlainVariants } from "../builtins.ts";
26
+ import { readSavedBlocks, type SavedBlocks } from "../content.ts";
27
+ import { consoleReporter, type Reporter } from "../log.ts";
28
+ import { CliError, decoPaths, findDecoRoot } from "../root.ts";
29
+ import type { DecoMeta } from "../schema/generate.ts";
30
+ import { SECTION_REF_KEY, toBase64 } from "../schema/typeToSchema.ts";
31
+ import { BLOCK_DEF, joinPath, rewriteErrors } from "./messages.ts";
32
32
 
33
33
  export interface Problem {
34
34
  /** The saved block's file, relative to the root: `.deco/blocks/HomePage.json`. */
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import fs from "node:fs";
7
7
  import path from "node:path";
8
- import { computeContentRevision } from "../../protocol/canonical";
8
+ import { computeContentRevision } from "../../protocol/canonical.ts";
9
9
  import {
10
10
  blockNameFromFile,
11
11
  checkBlockName,
@@ -13,11 +13,11 @@ import {
13
13
  isBlockFileName,
14
14
  resolveSpellings,
15
15
  type SpellingCandidate,
16
- } from "../../protocol/keys";
17
- import { isPlainObject } from "../json";
18
- import { LEGACY_ALIASES } from "./builtins";
19
- import { consoleReporter, type Reporter } from "./log";
20
- import { CliError, type DecoPaths, decoPaths, findDecoRoot } from "./root";
16
+ } from "../../protocol/keys.ts";
17
+ import { isPlainObject } from "../json.ts";
18
+ import { LEGACY_ALIASES } from "./builtins.ts";
19
+ import { consoleReporter, type Reporter } from "./log.ts";
20
+ import { CliError, type DecoPaths, decoPaths, findDecoRoot } from "./root.ts";
21
21
 
22
22
  export interface ContentDiagnostic {
23
23
  /** The file name inside `.deco/blocks`. */
@@ -8,10 +8,10 @@
8
8
  * (the `deco-v7-to-v8-migration` skill) reads: the built-in block names, the alias
9
9
  * table and the saved-blocks reader.
10
10
  */
11
- export { BUILT_IN_BLOCKS, LEGACY_ALIASES } from "./builtins";
12
- export { type CheckOptions, check } from "./check/index";
13
- export { type ContentOptions, content, readSavedBlocks, type SavedBlocks } from "./content";
14
- export { type Reporter, silentReporter } from "./log";
15
- export { runCli } from "./run";
16
- export { type SchemaOptions, schema } from "./schema/index";
17
- export { type ServeOptions, serve } from "./serve/server";
11
+ export { BUILT_IN_BLOCKS, LEGACY_ALIASES } from "./builtins.ts";
12
+ export { type CheckOptions, check } from "./check/index.ts";
13
+ export { type ContentOptions, content, readSavedBlocks, type SavedBlocks } from "./content.ts";
14
+ export { type Reporter, silentReporter } from "./log.ts";
15
+ export { runCli } from "./run.ts";
16
+ export { type SchemaOptions, schema } from "./schema/index.ts";
17
+ export { type ServeOptions, serve } from "./serve/server.ts";
@@ -1,5 +1,5 @@
1
1
  /** The `deco` bin's entry: run the command line, then exit with its code. */
2
- import { runCli } from "./run";
2
+ import { runCli } from "./run.ts";
3
3
 
4
4
  runCli(process.argv.slice(2)).then(
5
5
  (code) => {
package/src/v8/cli/run.ts CHANGED
@@ -2,13 +2,13 @@
2
2
  * The `deco` command line: `deco <schema|content|check|serve> [flags]`
3
3
  * (spec: cli). Parses flags, runs one command and returns its exit code.
4
4
  */
5
- import { check } from "./check/index";
6
- import { content, writeContent } from "./content";
7
- import { consoleReporter, type Reporter } from "./log";
8
- import { CliError, decoPaths, findDecoRoot } from "./root";
9
- import { reportSchema, schema, writeSchema } from "./schema/index";
10
- import { serve, startServer } from "./serve/server";
11
- import { watchFiles, watchTree } from "./watch";
5
+ import { check } from "./check/index.ts";
6
+ import { content, writeContent } from "./content.ts";
7
+ import { consoleReporter, type Reporter } from "./log.ts";
8
+ import { CliError, decoPaths, findDecoRoot } from "./root.ts";
9
+ import { reportSchema, schema, writeSchema } from "./schema/index.ts";
10
+ import { serve, startServer } from "./serve/server.ts";
11
+ import { watchFiles, watchTree } from "./watch.ts";
12
12
 
13
13
  type FlagKind = "string" | "boolean" | "list";
14
14