@decocms/blocks 8.1.0-next.0 → 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 (490) 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 +65 -105
  323. package/src/index.ts +3 -13
  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 +5 -5
  352. package/src/protocol/storage.ts +1 -1
  353. package/src/v8/analytics.ts +2 -2
  354. package/src/v8/background.ts +3 -3
  355. package/src/v8/builtins/data.ts +1 -1
  356. package/src/v8/builtins/index.ts +6 -6
  357. package/src/v8/builtins/lazy.ts +1 -1
  358. package/src/v8/builtins/legacy.ts +2 -2
  359. package/src/v8/builtins/multivariate.ts +1 -1
  360. package/src/v8/builtins/secret.ts +2 -2
  361. package/src/v8/cli/builtins.ts +2 -2
  362. package/src/v8/cli/check/index.ts +11 -11
  363. package/src/v8/cli/content.ts +6 -6
  364. package/src/v8/cli/index.ts +8 -8
  365. package/src/v8/cli/main.ts +1 -1
  366. package/src/v8/cli/run.ts +7 -7
  367. package/src/v8/cli/schema/builtinSchemas.ts +1 -1
  368. package/src/v8/cli/schema/generate.ts +6 -6
  369. package/src/v8/cli/schema/index.ts +4 -4
  370. package/src/v8/cli/schema/tsProgram.ts +1 -1
  371. package/src/v8/cli/schema/typeToSchema.ts +24 -2
  372. package/src/v8/cli/serve/server.ts +9 -9
  373. package/src/v8/client.ts +5 -5
  374. package/src/v8/cms.ts +9 -9
  375. package/src/v8/content.ts +4 -4
  376. package/src/v8/draft.ts +1 -1
  377. package/src/v8/errors.ts +1 -1
  378. package/src/v8/fetch.ts +9 -28
  379. package/src/v8/identity.ts +1 -1
  380. package/src/v8/index.ts +5 -5
  381. package/src/v8/matchRoute.ts +1 -1
  382. package/src/v8/remoteLoader.ts +7 -7
  383. package/src/v8/resolver.ts +6 -6
  384. package/src/v8/secrets.ts +1 -1
  385. package/src/v8/telemetry.ts +6 -6
  386. package/src/cms/applySectionConventions.ts +0 -148
  387. package/src/cms/blockSource.ts +0 -228
  388. package/src/cms/client.ts +0 -85
  389. package/src/cms/deferredTrigger.ts +0 -58
  390. package/src/cms/draftSource.ts +0 -476
  391. package/src/cms/index.ts +0 -180
  392. package/src/cms/loadDecofileDirectory.ts +0 -89
  393. package/src/cms/loader.ts +0 -563
  394. package/src/cms/registry.ts +0 -264
  395. package/src/cms/renderJson.ts +0 -179
  396. package/src/cms/resolve.ts +0 -2583
  397. package/src/cms/schema.ts +0 -1219
  398. package/src/cms/sectionLoaderContext.ts +0 -113
  399. package/src/cms/sectionLoaders.ts +0 -686
  400. package/src/cms/sectionMixins.ts +0 -153
  401. package/src/flags/audience.ts +0 -56
  402. package/src/flags/everyone.ts +0 -29
  403. package/src/flags/flag.ts +0 -15
  404. package/src/flags/multivariate/image.ts +0 -11
  405. package/src/flags/multivariate/message.ts +0 -11
  406. package/src/flags/multivariate/page.ts +0 -16
  407. package/src/flags/multivariate/section.ts +0 -16
  408. package/src/flags/multivariate.ts +0 -1
  409. package/src/flags/types.ts +0 -59
  410. package/src/flags/utils/multivariate.ts +0 -20
  411. package/src/hooks/Image.tsx +0 -314
  412. package/src/hooks/JsonLd.tsx +0 -353
  413. package/src/hooks/LazySection.tsx +0 -121
  414. package/src/hooks/LiveControls.tsx +0 -144
  415. package/src/hooks/Picture.tsx +0 -127
  416. package/src/hooks/RenderSection.tsx +0 -91
  417. package/src/hooks/SectionErrorFallback.tsx +0 -97
  418. package/src/hooks/Stats.tsx +0 -134
  419. package/src/hooks/index.ts +0 -35
  420. package/src/hooks/useLoadMore.ts +0 -100
  421. package/src/matchers/builtins.ts +0 -459
  422. package/src/matchers/countryNames.ts +0 -104
  423. package/src/matchers/override.ts +0 -136
  424. package/src/matchers/posthog.ts +0 -154
  425. package/src/middleware/decoState.ts +0 -55
  426. package/src/middleware/healthMetrics.ts +0 -133
  427. package/src/middleware/hydrationContext.ts +0 -79
  428. package/src/middleware/index.ts +0 -88
  429. package/src/middleware/liveness.ts +0 -21
  430. package/src/middleware/observability.ts +0 -800
  431. package/src/middleware/validateSection.ts +0 -100
  432. package/src/preview/DraftPreviewBadge.tsx +0 -306
  433. package/src/preview/decoMark.ts +0 -11
  434. package/src/preview/index.ts +0 -8
  435. package/src/sdk/abTesting.ts +0 -556
  436. package/src/sdk/analytics.ts +0 -147
  437. package/src/sdk/cacheHeaders.ts +0 -633
  438. package/src/sdk/cacheStorage.ts +0 -287
  439. package/src/sdk/cachedLoader.ts +0 -556
  440. package/src/sdk/clx.ts +0 -5
  441. package/src/sdk/cn.ts +0 -28
  442. package/src/sdk/composite.ts +0 -114
  443. package/src/sdk/cookie.ts +0 -129
  444. package/src/sdk/crypto.ts +0 -199
  445. package/src/sdk/csp.ts +0 -59
  446. package/src/sdk/deepOmit.ts +0 -52
  447. package/src/sdk/detectDevice.ts +0 -45
  448. package/src/sdk/djb2.ts +0 -20
  449. package/src/sdk/encoding.ts +0 -44
  450. package/src/sdk/env.ts +0 -54
  451. package/src/sdk/experiments.ts +0 -314
  452. package/src/sdk/fetchCache.ts +0 -269
  453. package/src/sdk/fetchTimeout.ts +0 -58
  454. package/src/sdk/flags.ts +0 -138
  455. package/src/sdk/http.ts +0 -124
  456. package/src/sdk/index.ts +0 -97
  457. package/src/sdk/inflightTimeout.ts +0 -53
  458. package/src/sdk/instrumentedFetch.ts +0 -362
  459. package/src/sdk/invoke.ts +0 -298
  460. package/src/sdk/logger.ts +0 -304
  461. package/src/sdk/mergeCacheControl.ts +0 -150
  462. package/src/sdk/nonce.ts +0 -46
  463. package/src/sdk/normalizeUrls.ts +0 -91
  464. package/src/sdk/observability.ts +0 -116
  465. package/src/sdk/otel.ts +0 -1118
  466. package/src/sdk/otelAdapters/clickhouseCollector.ts +0 -65
  467. package/src/sdk/otelAdapters.ts +0 -144
  468. package/src/sdk/otelHttpLog.ts +0 -419
  469. package/src/sdk/otelHttpMeter.ts +0 -532
  470. package/src/sdk/otelHttpTracer.ts +0 -543
  471. package/src/sdk/redirects.ts +0 -336
  472. package/src/sdk/requestContext.ts +0 -281
  473. package/src/sdk/requestContextStorage.browser.ts +0 -43
  474. package/src/sdk/requestContextStorage.ts +0 -35
  475. package/src/sdk/responseCache.ts +0 -82
  476. package/src/sdk/retry.ts +0 -45
  477. package/src/sdk/serverTimings.ts +0 -68
  478. package/src/sdk/signal.ts +0 -42
  479. package/src/sdk/sitemap.ts +0 -160
  480. package/src/sdk/urlRedaction.ts +0 -82
  481. package/src/sdk/urlUtils.ts +0 -183
  482. package/src/sdk/useDevice.ts +0 -89
  483. package/src/sdk/useDeviceContext.tsx +0 -108
  484. package/src/sdk/useId.ts +0 -7
  485. package/src/sdk/useScript.ts +0 -210
  486. package/src/sdk/useSuggestions.ts +0 -188
  487. package/src/sdk/wrapCaughtErrors.ts +0 -107
  488. package/src/setup.ts +0 -120
  489. package/src/types/index.ts +0 -53
  490. package/src/types/widgets.ts +0 -14
@@ -24,7 +24,7 @@ export {
24
24
  canonicalJson,
25
25
  computeContentRevision,
26
26
  sha256Hex,
27
- } from "./canonical";
27
+ } from "./canonical.ts";
28
28
  export {
29
29
  assertSupportedEndpoint,
30
30
  type BatchCall,
@@ -32,8 +32,8 @@ export {
32
32
  type ContentClient,
33
33
  type ContentClientOptions,
34
34
  createContentClient,
35
- } from "./client";
36
- export * from "./errors";
37
- export * from "./keys";
38
- export * from "./storage";
39
- export * from "./types";
35
+ } from "./client.ts";
36
+ export * from "./errors.ts";
37
+ export * from "./keys.ts";
38
+ export * from "./storage.ts";
39
+ 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(
@@ -1,14 +1,14 @@
1
1
  /**
2
- * `@decocms/blocks/protocol/storage/memory`: an in-memory `ContentStorage`.
2
+ * An in-memory `ContentStorage` (internal; not a package subpath).
3
3
  *
4
4
  * A reference implementation of the storage contract, including durable
5
5
  * request-key receipts persisted atomically with each commit, and a fixture
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
 
@@ -4,7 +4,7 @@
4
4
  * /next/telemetry-internals#sending-in-the-background).
5
5
  *
6
6
  * Where it runs, in order:
7
- * - a host hook a framework binding installs under {@link BACKGROUND_HOOK};
7
+ * - a hook the host installs under {@link BACKGROUND_HOOK};
8
8
  * - on Cloudflare Workers, which run no timers between requests, the
9
9
  * platform's `waitUntil` (from `cloudflare:workers`), so the task runs
10
10
  * after the response with no binding and no user code: the core installs
@@ -17,7 +17,7 @@
17
17
  * A task never throws into its caller: errors and rejections are swallowed.
18
18
  */
19
19
 
20
- /** Where a binding installs `(task) => void` to run background work its own way. */
20
+ /** Where a host installs `(task) => void` to run background work its own way. */
21
21
  const BACKGROUND_HOOK = Symbol.for("decocms.blocks.background");
22
22
 
23
23
  type Task = () => unknown;
@@ -101,7 +101,7 @@ export function later(ms: number, callback: () => void): void {
101
101
  timer?.unref?.();
102
102
  }
103
103
 
104
- /** Whether a binding installed a background hook (then batches go out after each response). */
104
+ /** Whether a host installed a background hook (then batches go out after each response). */
105
105
  export function hasBackgroundHook(): boolean {
106
106
  return typeof (globalThis as BackgroundGlobals)[BACKGROUND_HOOK] === "function";
107
107
  }
@@ -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,
@@ -25,7 +25,7 @@ import { isPlainObject, type JsonObject } from "../json";
25
25
  * (/next/studio-compatibility#well-known-types-and-the-alias-table); other
26
26
  * legacy names (`$live/…`, the per-kind multivariate files, the date
27
27
  * matcher) are rewritten to these by the one-time migration
28
- * (`@decocms/blocks-migrate`), and types with no built-in counterpart are
28
+ * (the `deco-v7-to-v8-migration` skill), and types with no built-in counterpart are
29
29
  * left to the site's block map.
30
30
  */
31
31
  export const LEGACY_ALIASES: Readonly<Record<string, string>> = Object.freeze({
@@ -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 {
@@ -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`. */
@@ -5,13 +5,13 @@
5
5
  * reaches an app bundle.
6
6
  *
7
7
  * The four commands and their options, plus what the one-time migration
8
- * (`@decocms/blocks-migrate`) reads: the built-in block names, the alias
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
 
@@ -3,7 +3,7 @@
3
3
  * in api-reference › Types). They're always in the schema, unless the block
4
4
  * map declares the same key, which replaces the built-in.
5
5
  */
6
- import { lazySchema, resolvableRef, sectionRef } from "./typeToSchema";
6
+ import { lazySchema, resolvableRef, sectionRef } from "./typeToSchema.ts";
7
7
 
8
8
  export type ManifestGroup = "sections" | "matchers" | "loaders" | "pages" | "redirects" | "content";
9
9
 
@@ -12,17 +12,17 @@
12
12
  */
13
13
  import fs from "node:fs";
14
14
  import path from "node:path";
15
- import { SCHEMA_FORMAT } from "../../../protocol/types";
16
- import { BUILT_IN_BLOCKS, LEGACY_ALIASES } from "../builtins";
17
- import { CliError, type DecoPaths, packageVersion } from "../root";
15
+ import { SCHEMA_FORMAT } from "../../../protocol/types.ts";
16
+ import { BUILT_IN_BLOCKS, LEGACY_ALIASES } from "../builtins.ts";
17
+ import { CliError, type DecoPaths, packageVersion } from "../root.ts";
18
18
  import {
19
19
  BUILT_IN_GROUPS,
20
20
  builtInDefinition,
21
21
  flatDefinition,
22
22
  legacyMultivariateValue,
23
23
  type ManifestGroup,
24
- } from "./builtinSchemas";
25
- import { createTsProject, type TsNode as Node, type TsType as Type } from "./tsProgram";
24
+ } from "./builtinSchemas.ts";
25
+ import { createTsProject, type TsNode as Node, type TsType as Type } from "./tsProgram.ts";
26
26
  import {
27
27
  awaitedOf,
28
28
  getJsDocTags,
@@ -35,7 +35,7 @@ import {
35
35
  stableFileId,
36
36
  toBase64,
37
37
  typeToJsonSchema,
38
- } from "./typeToSchema";
38
+ } from "./typeToSchema.ts";
39
39
 
40
40
  const MANIFEST_GROUPS: ManifestGroup[] = [
41
41
  "sections",