@htmless/core 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (435) hide show
  1. package/dist/ai/content-operations.d.ts +26 -0
  2. package/dist/ai/content-operations.d.ts.map +1 -0
  3. package/dist/ai/content-operations.js +75 -0
  4. package/dist/ai/content-operations.js.map +1 -0
  5. package/dist/ai/image-analyzer.d.ts +18 -0
  6. package/dist/ai/image-analyzer.d.ts.map +1 -0
  7. package/dist/ai/image-analyzer.js +457 -0
  8. package/dist/ai/image-analyzer.js.map +1 -0
  9. package/dist/ai/json-to-schema.d.ts +6 -0
  10. package/dist/ai/json-to-schema.d.ts.map +1 -0
  11. package/dist/ai/json-to-schema.js +155 -0
  12. package/dist/ai/json-to-schema.js.map +1 -0
  13. package/dist/ai/schema-generator.d.ts +34 -0
  14. package/dist/ai/schema-generator.d.ts.map +1 -0
  15. package/dist/ai/schema-generator.js +307 -0
  16. package/dist/ai/schema-generator.js.map +1 -0
  17. package/dist/api/cda/assets.d.ts +4 -0
  18. package/dist/api/cda/assets.d.ts.map +1 -0
  19. package/dist/api/cda/assets.js +82 -0
  20. package/dist/api/cda/assets.js.map +1 -0
  21. package/dist/api/cda/blocks.d.ts +4 -0
  22. package/dist/api/cda/blocks.d.ts.map +1 -0
  23. package/dist/api/cda/blocks.js +92 -0
  24. package/dist/api/cda/blocks.js.map +1 -0
  25. package/dist/api/cda/content.d.ts +4 -0
  26. package/dist/api/cda/content.d.ts.map +1 -0
  27. package/dist/api/cda/content.js +192 -0
  28. package/dist/api/cda/content.js.map +1 -0
  29. package/dist/api/cda/index.d.ts +4 -0
  30. package/dist/api/cda/index.d.ts.map +1 -0
  31. package/dist/api/cda/index.js +21 -0
  32. package/dist/api/cda/index.js.map +1 -0
  33. package/dist/api/cda/media.d.ts +4 -0
  34. package/dist/api/cda/media.d.ts.map +1 -0
  35. package/dist/api/cda/media.js +114 -0
  36. package/dist/api/cda/media.js.map +1 -0
  37. package/dist/api/cda/redirects.d.ts +4 -0
  38. package/dist/api/cda/redirects.d.ts.map +1 -0
  39. package/dist/api/cda/redirects.js +69 -0
  40. package/dist/api/cda/redirects.js.map +1 -0
  41. package/dist/api/cda/schemas.d.ts +4 -0
  42. package/dist/api/cda/schemas.d.ts.map +1 -0
  43. package/dist/api/cda/schemas.js +113 -0
  44. package/dist/api/cda/schemas.js.map +1 -0
  45. package/dist/api/cda/taxonomies.d.ts +4 -0
  46. package/dist/api/cda/taxonomies.d.ts.map +1 -0
  47. package/dist/api/cda/taxonomies.js +79 -0
  48. package/dist/api/cda/taxonomies.js.map +1 -0
  49. package/dist/api/cma/ai.d.ts +4 -0
  50. package/dist/api/cma/ai.d.ts.map +1 -0
  51. package/dist/api/cma/ai.js +458 -0
  52. package/dist/api/cma/ai.js.map +1 -0
  53. package/dist/api/cma/assets.d.ts +4 -0
  54. package/dist/api/cma/assets.d.ts.map +1 -0
  55. package/dist/api/cma/assets.js +166 -0
  56. package/dist/api/cma/assets.js.map +1 -0
  57. package/dist/api/cma/audit.d.ts +4 -0
  58. package/dist/api/cma/audit.d.ts.map +1 -0
  59. package/dist/api/cma/audit.js +74 -0
  60. package/dist/api/cma/audit.js.map +1 -0
  61. package/dist/api/cma/auth.d.ts +4 -0
  62. package/dist/api/cma/auth.d.ts.map +1 -0
  63. package/dist/api/cma/auth.js +123 -0
  64. package/dist/api/cma/auth.js.map +1 -0
  65. package/dist/api/cma/blocks.d.ts +4 -0
  66. package/dist/api/cma/blocks.d.ts.map +1 -0
  67. package/dist/api/cma/blocks.js +249 -0
  68. package/dist/api/cma/blocks.js.map +1 -0
  69. package/dist/api/cma/bulk.d.ts +4 -0
  70. package/dist/api/cma/bulk.d.ts.map +1 -0
  71. package/dist/api/cma/bulk.js +258 -0
  72. package/dist/api/cma/bulk.js.map +1 -0
  73. package/dist/api/cma/cache.d.ts +4 -0
  74. package/dist/api/cma/cache.d.ts.map +1 -0
  75. package/dist/api/cma/cache.js +99 -0
  76. package/dist/api/cma/cache.js.map +1 -0
  77. package/dist/api/cma/codegen.d.ts +4 -0
  78. package/dist/api/cma/codegen.d.ts.map +1 -0
  79. package/dist/api/cma/codegen.js +22 -0
  80. package/dist/api/cma/codegen.js.map +1 -0
  81. package/dist/api/cma/comments.d.ts +4 -0
  82. package/dist/api/cma/comments.d.ts.map +1 -0
  83. package/dist/api/cma/comments.js +164 -0
  84. package/dist/api/cma/comments.js.map +1 -0
  85. package/dist/api/cma/diff.d.ts +4 -0
  86. package/dist/api/cma/diff.d.ts.map +1 -0
  87. package/dist/api/cma/diff.js +88 -0
  88. package/dist/api/cma/diff.js.map +1 -0
  89. package/dist/api/cma/entries.d.ts +4 -0
  90. package/dist/api/cma/entries.d.ts.map +1 -0
  91. package/dist/api/cma/entries.js +736 -0
  92. package/dist/api/cma/entries.js.map +1 -0
  93. package/dist/api/cma/environments.d.ts +4 -0
  94. package/dist/api/cma/environments.d.ts.map +1 -0
  95. package/dist/api/cma/environments.js +160 -0
  96. package/dist/api/cma/environments.js.map +1 -0
  97. package/dist/api/cma/extensions.d.ts +4 -0
  98. package/dist/api/cma/extensions.d.ts.map +1 -0
  99. package/dist/api/cma/extensions.js +82 -0
  100. package/dist/api/cma/extensions.js.map +1 -0
  101. package/dist/api/cma/importexport.d.ts +4 -0
  102. package/dist/api/cma/importexport.d.ts.map +1 -0
  103. package/dist/api/cma/importexport.js +496 -0
  104. package/dist/api/cma/importexport.js.map +1 -0
  105. package/dist/api/cma/index.d.ts +4 -0
  106. package/dist/api/cma/index.d.ts.map +1 -0
  107. package/dist/api/cma/index.js +69 -0
  108. package/dist/api/cma/index.js.map +1 -0
  109. package/dist/api/cma/live.d.ts +4 -0
  110. package/dist/api/cma/live.d.ts.map +1 -0
  111. package/dist/api/cma/live.js +64 -0
  112. package/dist/api/cma/live.js.map +1 -0
  113. package/dist/api/cma/locales.d.ts +4 -0
  114. package/dist/api/cma/locales.d.ts.map +1 -0
  115. package/dist/api/cma/locales.js +117 -0
  116. package/dist/api/cma/locales.js.map +1 -0
  117. package/dist/api/cma/marketplace.d.ts +4 -0
  118. package/dist/api/cma/marketplace.d.ts.map +1 -0
  119. package/dist/api/cma/marketplace.js +550 -0
  120. package/dist/api/cma/marketplace.js.map +1 -0
  121. package/dist/api/cma/redirects.d.ts +4 -0
  122. package/dist/api/cma/redirects.d.ts.map +1 -0
  123. package/dist/api/cma/redirects.js +120 -0
  124. package/dist/api/cma/redirects.js.map +1 -0
  125. package/dist/api/cma/relationships.d.ts +4 -0
  126. package/dist/api/cma/relationships.d.ts.map +1 -0
  127. package/dist/api/cma/relationships.js +47 -0
  128. package/dist/api/cma/relationships.js.map +1 -0
  129. package/dist/api/cma/schemas.d.ts +4 -0
  130. package/dist/api/cma/schemas.d.ts.map +1 -0
  131. package/dist/api/cma/schemas.js +248 -0
  132. package/dist/api/cma/schemas.js.map +1 -0
  133. package/dist/api/cma/search.d.ts +4 -0
  134. package/dist/api/cma/search.d.ts.map +1 -0
  135. package/dist/api/cma/search.js +149 -0
  136. package/dist/api/cma/search.js.map +1 -0
  137. package/dist/api/cma/spaces.d.ts +4 -0
  138. package/dist/api/cma/spaces.d.ts.map +1 -0
  139. package/dist/api/cma/spaces.js +119 -0
  140. package/dist/api/cma/spaces.js.map +1 -0
  141. package/dist/api/cma/taxonomies.d.ts +4 -0
  142. package/dist/api/cma/taxonomies.d.ts.map +1 -0
  143. package/dist/api/cma/taxonomies.js +296 -0
  144. package/dist/api/cma/taxonomies.js.map +1 -0
  145. package/dist/api/cma/templates.d.ts +13 -0
  146. package/dist/api/cma/templates.d.ts.map +1 -0
  147. package/dist/api/cma/templates.js +312 -0
  148. package/dist/api/cma/templates.js.map +1 -0
  149. package/dist/api/cma/uploads.d.ts +4 -0
  150. package/dist/api/cma/uploads.d.ts.map +1 -0
  151. package/dist/api/cma/uploads.js +148 -0
  152. package/dist/api/cma/uploads.js.map +1 -0
  153. package/dist/api/cma/webhooks.d.ts +4 -0
  154. package/dist/api/cma/webhooks.d.ts.map +1 -0
  155. package/dist/api/cma/webhooks.js +175 -0
  156. package/dist/api/cma/webhooks.js.map +1 -0
  157. package/dist/api/cma/white-label.d.ts +4 -0
  158. package/dist/api/cma/white-label.d.ts.map +1 -0
  159. package/dist/api/cma/white-label.js +47 -0
  160. package/dist/api/cma/white-label.js.map +1 -0
  161. package/dist/api/graphql/index.d.ts +4 -0
  162. package/dist/api/graphql/index.d.ts.map +1 -0
  163. package/dist/api/graphql/index.js +57 -0
  164. package/dist/api/graphql/index.js.map +1 -0
  165. package/dist/api/graphql/introspection.d.ts +31 -0
  166. package/dist/api/graphql/introspection.d.ts.map +1 -0
  167. package/dist/api/graphql/introspection.js +90 -0
  168. package/dist/api/graphql/introspection.js.map +1 -0
  169. package/dist/api/graphql/parser.d.ts +14 -0
  170. package/dist/api/graphql/parser.d.ts.map +1 -0
  171. package/dist/api/graphql/parser.js +140 -0
  172. package/dist/api/graphql/parser.js.map +1 -0
  173. package/dist/api/graphql/resolver.d.ts +3 -0
  174. package/dist/api/graphql/resolver.d.ts.map +1 -0
  175. package/dist/api/graphql/resolver.js +138 -0
  176. package/dist/api/graphql/resolver.js.map +1 -0
  177. package/dist/api/preview/content.d.ts +4 -0
  178. package/dist/api/preview/content.d.ts.map +1 -0
  179. package/dist/api/preview/content.js +207 -0
  180. package/dist/api/preview/content.js.map +1 -0
  181. package/dist/api/preview/index.d.ts +4 -0
  182. package/dist/api/preview/index.d.ts.map +1 -0
  183. package/dist/api/preview/index.js +11 -0
  184. package/dist/api/preview/index.js.map +1 -0
  185. package/dist/api/preview/live.d.ts +4 -0
  186. package/dist/api/preview/live.d.ts.map +1 -0
  187. package/dist/api/preview/live.js +41 -0
  188. package/dist/api/preview/live.js.map +1 -0
  189. package/dist/audit/logger.d.ts +13 -0
  190. package/dist/audit/logger.d.ts.map +1 -0
  191. package/dist/audit/logger.js +21 -0
  192. package/dist/audit/logger.js.map +1 -0
  193. package/dist/audit/middleware.d.ts +7 -0
  194. package/dist/audit/middleware.d.ts.map +1 -0
  195. package/dist/audit/middleware.js +39 -0
  196. package/dist/audit/middleware.js.map +1 -0
  197. package/dist/auth/jwt.d.ts +9 -0
  198. package/dist/auth/jwt.d.ts.map +1 -0
  199. package/dist/auth/jwt.js +15 -0
  200. package/dist/auth/jwt.js.map +1 -0
  201. package/dist/auth/middleware.d.ts +24 -0
  202. package/dist/auth/middleware.d.ts.map +1 -0
  203. package/dist/auth/middleware.js +99 -0
  204. package/dist/auth/middleware.js.map +1 -0
  205. package/dist/auth/password.d.ts +3 -0
  206. package/dist/auth/password.d.ts.map +1 -0
  207. package/dist/auth/password.js +9 -0
  208. package/dist/auth/password.js.map +1 -0
  209. package/dist/auth/rate-limit.d.ts +19 -0
  210. package/dist/auth/rate-limit.d.ts.map +1 -0
  211. package/dist/auth/rate-limit.js +77 -0
  212. package/dist/auth/rate-limit.js.map +1 -0
  213. package/dist/auth/rbac.d.ts +10 -0
  214. package/dist/auth/rbac.d.ts.map +1 -0
  215. package/dist/auth/rbac.js +61 -0
  216. package/dist/auth/rbac.js.map +1 -0
  217. package/dist/blocks/core-blocks.d.ts +13 -0
  218. package/dist/blocks/core-blocks.d.ts.map +1 -0
  219. package/dist/blocks/core-blocks.js +113 -0
  220. package/dist/blocks/core-blocks.js.map +1 -0
  221. package/dist/blocks/renderer-sdk.d.ts +75 -0
  222. package/dist/blocks/renderer-sdk.d.ts.map +1 -0
  223. package/dist/blocks/renderer-sdk.js +112 -0
  224. package/dist/blocks/renderer-sdk.js.map +1 -0
  225. package/dist/blocks/seed-core-blocks.d.ts +6 -0
  226. package/dist/blocks/seed-core-blocks.d.ts.map +1 -0
  227. package/dist/blocks/seed-core-blocks.js +37 -0
  228. package/dist/blocks/seed-core-blocks.js.map +1 -0
  229. package/dist/blocks/validator.d.ts +10 -0
  230. package/dist/blocks/validator.d.ts.map +1 -0
  231. package/dist/blocks/validator.js +111 -0
  232. package/dist/blocks/validator.js.map +1 -0
  233. package/dist/cache/cdn-purge.d.ts +41 -0
  234. package/dist/cache/cdn-purge.d.ts.map +1 -0
  235. package/dist/cache/cdn-purge.js +180 -0
  236. package/dist/cache/cdn-purge.js.map +1 -0
  237. package/dist/cache/observability.d.ts +36 -0
  238. package/dist/cache/observability.d.ts.map +1 -0
  239. package/dist/cache/observability.js +110 -0
  240. package/dist/cache/observability.js.map +1 -0
  241. package/dist/cache/tags.d.ts +28 -0
  242. package/dist/cache/tags.d.ts.map +1 -0
  243. package/dist/cache/tags.js +94 -0
  244. package/dist/cache/tags.js.map +1 -0
  245. package/dist/cli/commands/codegen.d.ts +2 -0
  246. package/dist/cli/commands/codegen.d.ts.map +1 -0
  247. package/dist/cli/commands/codegen.js +73 -0
  248. package/dist/cli/commands/codegen.js.map +1 -0
  249. package/dist/cli/commands/dev.d.ts +2 -0
  250. package/dist/cli/commands/dev.d.ts.map +1 -0
  251. package/dist/cli/commands/dev.js +60 -0
  252. package/dist/cli/commands/dev.js.map +1 -0
  253. package/dist/cli/commands/help.d.ts +2 -0
  254. package/dist/cli/commands/help.d.ts.map +1 -0
  255. package/dist/cli/commands/help.js +32 -0
  256. package/dist/cli/commands/help.js.map +1 -0
  257. package/dist/cli/commands/init.d.ts +2 -0
  258. package/dist/cli/commands/init.d.ts.map +1 -0
  259. package/dist/cli/commands/init.js +90 -0
  260. package/dist/cli/commands/init.js.map +1 -0
  261. package/dist/cli/commands/migrate.d.ts +2 -0
  262. package/dist/cli/commands/migrate.d.ts.map +1 -0
  263. package/dist/cli/commands/migrate.js +27 -0
  264. package/dist/cli/commands/migrate.js.map +1 -0
  265. package/dist/cli/commands/seed.d.ts +2 -0
  266. package/dist/cli/commands/seed.d.ts.map +1 -0
  267. package/dist/cli/commands/seed.js +28 -0
  268. package/dist/cli/commands/seed.js.map +1 -0
  269. package/dist/cli/index.d.ts +16 -0
  270. package/dist/cli/index.d.ts.map +1 -0
  271. package/dist/cli/index.js +120 -0
  272. package/dist/cli/index.js.map +1 -0
  273. package/dist/config.d.ts +11 -0
  274. package/dist/config.d.ts.map +1 -0
  275. package/dist/config.js +11 -0
  276. package/dist/config.js.map +1 -0
  277. package/dist/content/advanced-query.d.ts +37 -0
  278. package/dist/content/advanced-query.d.ts.map +1 -0
  279. package/dist/content/advanced-query.js +162 -0
  280. package/dist/content/advanced-query.js.map +1 -0
  281. package/dist/content/cache.d.ts +27 -0
  282. package/dist/content/cache.d.ts.map +1 -0
  283. package/dist/content/cache.js +100 -0
  284. package/dist/content/cache.js.map +1 -0
  285. package/dist/content/diff.d.ts +13 -0
  286. package/dist/content/diff.d.ts.map +1 -0
  287. package/dist/content/diff.js +80 -0
  288. package/dist/content/diff.js.map +1 -0
  289. package/dist/content/localization.d.ts +13 -0
  290. package/dist/content/localization.d.ts.map +1 -0
  291. package/dist/content/localization.js +42 -0
  292. package/dist/content/localization.js.map +1 -0
  293. package/dist/content/materializer.d.ts +26 -0
  294. package/dist/content/materializer.d.ts.map +1 -0
  295. package/dist/content/materializer.js +175 -0
  296. package/dist/content/materializer.js.map +1 -0
  297. package/dist/content/relationships.d.ts +30 -0
  298. package/dist/content/relationships.d.ts.map +1 -0
  299. package/dist/content/relationships.js +123 -0
  300. package/dist/content/relationships.js.map +1 -0
  301. package/dist/db.d.ts +5 -0
  302. package/dist/db.d.ts.map +1 -0
  303. package/dist/db.js +5 -0
  304. package/dist/db.js.map +1 -0
  305. package/dist/events/emitter.d.ts +16 -0
  306. package/dist/events/emitter.d.ts.map +1 -0
  307. package/dist/events/emitter.js +15 -0
  308. package/dist/events/emitter.js.map +1 -0
  309. package/dist/events/sse.d.ts +16 -0
  310. package/dist/events/sse.d.ts.map +1 -0
  311. package/dist/events/sse.js +37 -0
  312. package/dist/events/sse.js.map +1 -0
  313. package/dist/events/wire.d.ts +2 -0
  314. package/dist/events/wire.d.ts.map +1 -0
  315. package/dist/events/wire.js +27 -0
  316. package/dist/events/wire.js.map +1 -0
  317. package/dist/extensions/billing.d.ts +60 -0
  318. package/dist/extensions/billing.d.ts.map +1 -0
  319. package/dist/extensions/billing.js +98 -0
  320. package/dist/extensions/billing.js.map +1 -0
  321. package/dist/extensions/manifest.d.ts +43 -0
  322. package/dist/extensions/manifest.d.ts.map +1 -0
  323. package/dist/extensions/manifest.js +66 -0
  324. package/dist/extensions/manifest.js.map +1 -0
  325. package/dist/extensions/marketplace.d.ts +50 -0
  326. package/dist/extensions/marketplace.d.ts.map +1 -0
  327. package/dist/extensions/marketplace.js +676 -0
  328. package/dist/extensions/marketplace.js.map +1 -0
  329. package/dist/extensions/router.d.ts +4 -0
  330. package/dist/extensions/router.d.ts.map +1 -0
  331. package/dist/extensions/router.js +50 -0
  332. package/dist/extensions/router.js.map +1 -0
  333. package/dist/extensions/runtime.d.ts +29 -0
  334. package/dist/extensions/runtime.d.ts.map +1 -0
  335. package/dist/extensions/runtime.js +201 -0
  336. package/dist/extensions/runtime.js.map +1 -0
  337. package/dist/extensions/sdk.d.ts +146 -0
  338. package/dist/extensions/sdk.d.ts.map +1 -0
  339. package/dist/extensions/sdk.js +114 -0
  340. package/dist/extensions/sdk.js.map +1 -0
  341. package/dist/integrations/sheets.d.ts +41 -0
  342. package/dist/integrations/sheets.d.ts.map +1 -0
  343. package/dist/integrations/sheets.js +230 -0
  344. package/dist/integrations/sheets.js.map +1 -0
  345. package/dist/media/metadata.d.ts +9 -0
  346. package/dist/media/metadata.d.ts.map +1 -0
  347. package/dist/media/metadata.js +84 -0
  348. package/dist/media/metadata.js.map +1 -0
  349. package/dist/media/presets.d.ts +17 -0
  350. package/dist/media/presets.d.ts.map +1 -0
  351. package/dist/media/presets.js +21 -0
  352. package/dist/media/presets.js.map +1 -0
  353. package/dist/media/storage.d.ts +16 -0
  354. package/dist/media/storage.d.ts.map +1 -0
  355. package/dist/media/storage.js +39 -0
  356. package/dist/media/storage.js.map +1 -0
  357. package/dist/media/transforms-engine.d.ts +46 -0
  358. package/dist/media/transforms-engine.d.ts.map +1 -0
  359. package/dist/media/transforms-engine.js +91 -0
  360. package/dist/media/transforms-engine.js.map +1 -0
  361. package/dist/media/transforms.d.ts +15 -0
  362. package/dist/media/transforms.d.ts.map +1 -0
  363. package/dist/media/transforms.js +22 -0
  364. package/dist/media/transforms.js.map +1 -0
  365. package/dist/media/usage.d.ts +21 -0
  366. package/dist/media/usage.d.ts.map +1 -0
  367. package/dist/media/usage.js +105 -0
  368. package/dist/media/usage.js.map +1 -0
  369. package/dist/redis.d.ts +2 -0
  370. package/dist/redis.d.ts.map +1 -0
  371. package/dist/redis.js +9 -0
  372. package/dist/redis.js.map +1 -0
  373. package/dist/schema/codegen.d.ts +6 -0
  374. package/dist/schema/codegen.d.ts.map +1 -0
  375. package/dist/schema/codegen.js +95 -0
  376. package/dist/schema/codegen.js.map +1 -0
  377. package/dist/schema/json-schema.d.ts +42 -0
  378. package/dist/schema/json-schema.d.ts.map +1 -0
  379. package/dist/schema/json-schema.js +68 -0
  380. package/dist/schema/json-schema.js.map +1 -0
  381. package/dist/schema/validator.d.ts +14 -0
  382. package/dist/schema/validator.d.ts.map +1 -0
  383. package/dist/schema/validator.js +103 -0
  384. package/dist/schema/validator.js.map +1 -0
  385. package/dist/sdk/client.d.ts +86 -0
  386. package/dist/sdk/client.d.ts.map +1 -0
  387. package/dist/sdk/client.js +117 -0
  388. package/dist/sdk/client.js.map +1 -0
  389. package/dist/server.d.ts +2 -0
  390. package/dist/server.d.ts.map +1 -0
  391. package/dist/server.js +59 -0
  392. package/dist/server.js.map +1 -0
  393. package/dist/spaces/premium-templates.d.ts +37 -0
  394. package/dist/spaces/premium-templates.d.ts.map +1 -0
  395. package/dist/spaces/premium-templates.js +1603 -0
  396. package/dist/spaces/premium-templates.js.map +1 -0
  397. package/dist/spaces/provisioner.d.ts +16 -0
  398. package/dist/spaces/provisioner.d.ts.map +1 -0
  399. package/dist/spaces/provisioner.js +143 -0
  400. package/dist/spaces/provisioner.js.map +1 -0
  401. package/dist/spaces/template-registry.d.ts +34 -0
  402. package/dist/spaces/template-registry.d.ts.map +1 -0
  403. package/dist/spaces/template-registry.js +55 -0
  404. package/dist/spaces/template-registry.js.map +1 -0
  405. package/dist/spaces/templates.d.ts +44 -0
  406. package/dist/spaces/templates.d.ts.map +1 -0
  407. package/dist/spaces/templates.js +201 -0
  408. package/dist/spaces/templates.js.map +1 -0
  409. package/dist/spaces/white-label.d.ts +20 -0
  410. package/dist/spaces/white-label.d.ts.map +1 -0
  411. package/dist/spaces/white-label.js +32 -0
  412. package/dist/spaces/white-label.js.map +1 -0
  413. package/dist/utils/query-shaping.d.ts +27 -0
  414. package/dist/utils/query-shaping.d.ts.map +1 -0
  415. package/dist/utils/query-shaping.js +69 -0
  416. package/dist/utils/query-shaping.js.map +1 -0
  417. package/dist/utils/space.d.ts +4 -0
  418. package/dist/utils/space.d.ts.map +1 -0
  419. package/dist/utils/space.js +17 -0
  420. package/dist/utils/space.js.map +1 -0
  421. package/dist/webhooks/dispatcher.d.ts +9 -0
  422. package/dist/webhooks/dispatcher.d.ts.map +1 -0
  423. package/dist/webhooks/dispatcher.js +102 -0
  424. package/dist/webhooks/dispatcher.js.map +1 -0
  425. package/package.json +84 -0
  426. package/prisma/migrations/20260403025542_init/migration.sql +315 -0
  427. package/prisma/migrations/20260403034855_add_blocks_and_patterns/migration.sql +40 -0
  428. package/prisma/migrations/20260403041936_add_published_documents/migration.sql +30 -0
  429. package/prisma/migrations/20260403042809_add_locales_and_taxonomies/migration.sql +58 -0
  430. package/prisma/migrations/20260403043033_add_scheduled_unpublish_at/migration.sql +2 -0
  431. package/prisma/migrations/20260403052801_add_environments_and_whitelabel/migration.sql +65 -0
  432. package/prisma/migrations/20260403055920_add_marketplace_and_extension_config/migration.sql +73 -0
  433. package/prisma/migrations/migration_lock.toml +3 -0
  434. package/prisma/schema.prisma +530 -0
  435. package/prisma/seed.ts +154 -0
@@ -0,0 +1,676 @@
1
+ // ─── Marketplace Extension Model ────────────────────────────────────
2
+ // Types, registry, and lifecycle for discoverable/installable extensions.
3
+ import { loadExtension, removeExtension, getExtension } from './manifest.js';
4
+ // ─── In-memory Catalog ──────────────────────────────────────────────
5
+ const catalog = new Map();
6
+ // Track which extensions are installed per space
7
+ const installations = new Map();
8
+ // ─── Built-in Sample Extensions ─────────────────────────────────────
9
+ const builtInExtensions = [
10
+ // ── SEO (2) ──────────────────────────────────────────────────────
11
+ {
12
+ key: 'seo-meta',
13
+ name: 'SEO Meta Fields',
14
+ version: '1.0.0',
15
+ author: 'HTMLess Team',
16
+ description: 'Adds SEO fields (meta title, meta description, og:image) to any content type. ' +
17
+ 'Automatically generates Open Graph and Twitter Card metadata for published entries.',
18
+ repository: 'https://github.com/htmless/ext-seo-meta',
19
+ homepage: 'https://htmless.io/marketplace/seo-meta',
20
+ license: 'MIT',
21
+ pricing: 'free',
22
+ category: 'seo',
23
+ permissions: ['schema.admin', 'entry.read'],
24
+ manifest: {
25
+ key: 'seo-meta',
26
+ name: 'SEO Meta Fields',
27
+ version: '1.0.0',
28
+ description: 'Adds SEO fields to content types',
29
+ fields: [
30
+ {
31
+ contentTypeKey: '*',
32
+ fieldKey: 'seo_title',
33
+ type: 'text',
34
+ config: { maxLength: 60, helpText: 'SEO title (max 60 characters)' },
35
+ },
36
+ {
37
+ contentTypeKey: '*',
38
+ fieldKey: 'seo_description',
39
+ type: 'text',
40
+ config: { maxLength: 160, helpText: 'Meta description (max 160 characters)' },
41
+ },
42
+ {
43
+ contentTypeKey: '*',
44
+ fieldKey: 'seo_og_image',
45
+ type: 'media',
46
+ config: { accept: 'image/*', helpText: 'Open Graph image (1200x630 recommended)' },
47
+ },
48
+ ],
49
+ hooks: [
50
+ {
51
+ event: 'entry.published',
52
+ handler: 'seo-meta:validate-seo',
53
+ },
54
+ ],
55
+ },
56
+ },
57
+ {
58
+ key: 'sitemap-generator',
59
+ name: 'Sitemap Generator',
60
+ version: '1.0.0',
61
+ author: 'HTMLess Team',
62
+ description: 'Automatically generates an XML sitemap from all published entries. Updates on publish/unpublish events and serves at /sitemap.xml via the CDA.',
63
+ repository: 'https://github.com/htmless/ext-sitemap-generator',
64
+ homepage: 'https://htmless.io/marketplace/sitemap-generator',
65
+ license: 'MIT',
66
+ pricing: 'free',
67
+ category: 'seo',
68
+ permissions: ['entry.read'],
69
+ manifest: {
70
+ key: 'sitemap-generator',
71
+ name: 'Sitemap Generator',
72
+ version: '1.0.0',
73
+ description: 'Auto-generates XML sitemap from published content',
74
+ hooks: [
75
+ { event: 'entry.published', handler: 'sitemap-generator:rebuild' },
76
+ { event: 'entry.unpublished', handler: 'sitemap-generator:rebuild' },
77
+ ],
78
+ routes: [
79
+ { method: 'GET', path: '/sitemap.xml', handler: 'sitemap-generator:serve' },
80
+ { method: 'POST', path: '/sitemap/rebuild', handler: 'sitemap-generator:force-rebuild' },
81
+ ],
82
+ },
83
+ },
84
+ {
85
+ key: 'structured-data',
86
+ name: 'Structured Data (JSON-LD)',
87
+ version: '1.0.0',
88
+ author: 'HTMLess Team',
89
+ description: 'Injects Schema.org JSON-LD structured data into published entries. Supports Article, Product, FAQ, and BreadcrumbList schemas. Configurable per content type.',
90
+ repository: 'https://github.com/htmless/ext-structured-data',
91
+ homepage: 'https://htmless.io/marketplace/structured-data',
92
+ license: 'MIT',
93
+ pricing: 'free',
94
+ category: 'seo',
95
+ permissions: ['entry.read', 'schema.admin'],
96
+ manifest: {
97
+ key: 'structured-data',
98
+ name: 'Structured Data (JSON-LD)',
99
+ version: '1.0.0',
100
+ description: 'Adds Schema.org JSON-LD to published entries',
101
+ hooks: [
102
+ { event: 'entry.published', handler: 'structured-data:generate-ld' },
103
+ ],
104
+ routes: [
105
+ { method: 'GET', path: '/structured-data/preview', handler: 'structured-data:preview' },
106
+ ],
107
+ fields: [
108
+ {
109
+ contentTypeKey: '*',
110
+ fieldKey: 'jsonld_type',
111
+ type: 'text',
112
+ config: { helpText: 'Schema.org type: Article, Product, FAQ, etc.' },
113
+ },
114
+ ],
115
+ },
116
+ },
117
+ // ── Analytics (3) ────────────────────────────────────────────────
118
+ {
119
+ key: 'analytics-tracker',
120
+ name: 'Analytics Tracker',
121
+ version: '1.0.0',
122
+ author: 'HTMLess Team',
123
+ description: 'Subscribes to content lifecycle webhooks and logs content views, publishes, and ' +
124
+ 'engagement metrics. Provides a simple analytics dashboard overlay in the admin.',
125
+ repository: 'https://github.com/htmless/ext-analytics-tracker',
126
+ homepage: 'https://htmless.io/marketplace/analytics-tracker',
127
+ license: 'MIT',
128
+ pricing: 'free',
129
+ category: 'analytics',
130
+ permissions: ['entry.read', 'webhook.manage'],
131
+ manifest: {
132
+ key: 'analytics-tracker',
133
+ name: 'Analytics Tracker',
134
+ version: '1.0.0',
135
+ description: 'Webhook subscriber that logs content views and engagement',
136
+ hooks: [
137
+ { event: 'entry.published', handler: 'analytics-tracker:log-publish' },
138
+ { event: 'entry.unpublished', handler: 'analytics-tracker:log-unpublish' },
139
+ ],
140
+ routes: [
141
+ { method: 'GET', path: '/analytics/views', handler: 'analytics-tracker:get-views' },
142
+ { method: 'POST', path: '/analytics/track', handler: 'analytics-tracker:track-view' },
143
+ ],
144
+ },
145
+ },
146
+ {
147
+ key: 'page-views',
148
+ name: 'Page Views Tracker',
149
+ version: '1.0.0',
150
+ author: 'HTMLess Team',
151
+ description: 'Tracks CDA read requests per entry and provides page view counts, trending content, and historical view data. Lightweight alternative to full analytics.',
152
+ repository: 'https://github.com/htmless/ext-page-views',
153
+ homepage: 'https://htmless.io/marketplace/page-views',
154
+ license: 'MIT',
155
+ pricing: 'free',
156
+ category: 'analytics',
157
+ permissions: ['entry.read'],
158
+ manifest: {
159
+ key: 'page-views',
160
+ name: 'Page Views Tracker',
161
+ version: '1.0.0',
162
+ description: 'Tracks CDA read requests and provides page view counts',
163
+ hooks: [
164
+ { event: 'entry.read', handler: 'page-views:increment' },
165
+ ],
166
+ routes: [
167
+ { method: 'GET', path: '/views/top', handler: 'page-views:top-pages' },
168
+ { method: 'GET', path: '/views/entry', handler: 'page-views:entry-views' },
169
+ { method: 'GET', path: '/views/history', handler: 'page-views:history' },
170
+ ],
171
+ },
172
+ },
173
+ {
174
+ key: 'content-performance',
175
+ name: 'Content Performance',
176
+ version: '1.0.0',
177
+ author: 'HTMLess Team',
178
+ description: 'Advanced content engagement metrics: time-on-page estimates, scroll depth, bounce rate, and conversion tracking. Dashboard widget shows top-performing content.',
179
+ repository: 'https://github.com/htmless/ext-content-performance',
180
+ homepage: 'https://htmless.io/marketplace/content-performance',
181
+ license: 'MIT',
182
+ pricing: 'paid',
183
+ price: 999,
184
+ category: 'analytics',
185
+ permissions: ['entry.read', 'webhook.manage'],
186
+ manifest: {
187
+ key: 'content-performance',
188
+ name: 'Content Performance',
189
+ version: '1.0.0',
190
+ description: 'Advanced engagement metrics and content performance dashboard',
191
+ hooks: [
192
+ { event: 'entry.published', handler: 'content-performance:track-publish' },
193
+ { event: 'entry.read', handler: 'content-performance:track-read' },
194
+ ],
195
+ routes: [
196
+ { method: 'GET', path: '/performance/dashboard', handler: 'content-performance:dashboard' },
197
+ { method: 'GET', path: '/performance/report', handler: 'content-performance:report' },
198
+ { method: 'POST', path: '/performance/event', handler: 'content-performance:track-event' },
199
+ ],
200
+ },
201
+ },
202
+ // ── AI (3) ───────────────────────────────────────────────────────
203
+ {
204
+ key: 'ai-alt-text',
205
+ name: 'AI Alt Text Generator',
206
+ version: '1.0.0',
207
+ author: 'HTMLess Team',
208
+ description: 'Automatically generates descriptive alt text for uploaded images using AI vision models. ' +
209
+ 'Runs on asset.created events and populates the alt field when empty.',
210
+ repository: 'https://github.com/htmless/ext-ai-alt-text',
211
+ homepage: 'https://htmless.io/marketplace/ai-alt-text',
212
+ license: 'MIT',
213
+ pricing: 'free',
214
+ category: 'ai',
215
+ permissions: ['asset.upload', 'entry.read'],
216
+ manifest: {
217
+ key: 'ai-alt-text',
218
+ name: 'AI Alt Text Generator',
219
+ version: '1.0.0',
220
+ description: 'Auto-generates alt text for uploaded images using AI',
221
+ hooks: [
222
+ { event: 'asset.created', handler: 'ai-alt-text:generate-alt' },
223
+ { event: 'asset.updated', handler: 'ai-alt-text:regenerate-alt' },
224
+ ],
225
+ routes: [
226
+ { method: 'POST', path: '/ai-alt-text/generate', handler: 'ai-alt-text:manual-generate' },
227
+ ],
228
+ },
229
+ },
230
+ {
231
+ key: 'ai-content-writer',
232
+ name: 'AI Content Writer',
233
+ version: '1.0.0',
234
+ author: 'HTMLess Team',
235
+ description: 'Generates draft content using large language models. Provide a topic, tone, and target length; the extension creates a structured draft with headings, body text, and suggested images.',
236
+ repository: 'https://github.com/htmless/ext-ai-content-writer',
237
+ homepage: 'https://htmless.io/marketplace/ai-content-writer',
238
+ license: 'MIT',
239
+ pricing: 'freemium',
240
+ price: 1499,
241
+ category: 'ai',
242
+ permissions: ['entry.create', 'entry.read'],
243
+ manifest: {
244
+ key: 'ai-content-writer',
245
+ name: 'AI Content Writer',
246
+ version: '1.0.0',
247
+ description: 'Generates draft content using AI language models',
248
+ routes: [
249
+ { method: 'POST', path: '/ai-writer/generate', handler: 'ai-content-writer:generate' },
250
+ { method: 'POST', path: '/ai-writer/outline', handler: 'ai-content-writer:outline' },
251
+ { method: 'POST', path: '/ai-writer/improve', handler: 'ai-content-writer:improve' },
252
+ ],
253
+ },
254
+ },
255
+ {
256
+ key: 'ai-translator',
257
+ name: 'AI Translator',
258
+ version: '1.0.0',
259
+ author: 'HTMLess Team',
260
+ description: 'Automatically translates localized fields into target languages using AI translation. Supports 50+ languages, preserves rich text formatting, and handles pluralization rules.',
261
+ repository: 'https://github.com/htmless/ext-ai-translator',
262
+ homepage: 'https://htmless.io/marketplace/ai-translator',
263
+ license: 'MIT',
264
+ pricing: 'paid',
265
+ price: 1999,
266
+ category: 'ai',
267
+ permissions: ['entry.read', 'entry.create'],
268
+ manifest: {
269
+ key: 'ai-translator',
270
+ name: 'AI Translator',
271
+ version: '1.0.0',
272
+ description: 'Auto-translate localized fields using AI',
273
+ hooks: [
274
+ { event: 'entry.published', handler: 'ai-translator:auto-translate' },
275
+ ],
276
+ routes: [
277
+ { method: 'POST', path: '/translate/entry', handler: 'ai-translator:translate-entry' },
278
+ { method: 'POST', path: '/translate/field', handler: 'ai-translator:translate-field' },
279
+ { method: 'GET', path: '/translate/languages', handler: 'ai-translator:list-languages' },
280
+ ],
281
+ },
282
+ },
283
+ // ── Commerce (2) ─────────────────────────────────────────────────
284
+ {
285
+ key: 'stripe-checkout',
286
+ name: 'Stripe Checkout',
287
+ version: '1.0.0',
288
+ author: 'HTMLess Team',
289
+ description: 'Embeds Stripe payment links in content entries. Create product entries with pricing, generate checkout sessions, and track payments. Supports one-time and recurring billing.',
290
+ repository: 'https://github.com/htmless/ext-stripe-checkout',
291
+ homepage: 'https://htmless.io/marketplace/stripe-checkout',
292
+ license: 'MIT',
293
+ pricing: 'free',
294
+ category: 'commerce',
295
+ permissions: ['entry.read', 'entry.create'],
296
+ manifest: {
297
+ key: 'stripe-checkout',
298
+ name: 'Stripe Checkout',
299
+ version: '1.0.0',
300
+ description: 'Stripe payment links for content entries',
301
+ routes: [
302
+ { method: 'POST', path: '/checkout/create', handler: 'stripe-checkout:create-session' },
303
+ { method: 'GET', path: '/checkout/status', handler: 'stripe-checkout:check-status' },
304
+ { method: 'POST', path: '/checkout/webhook', handler: 'stripe-checkout:handle-webhook' },
305
+ ],
306
+ fields: [
307
+ {
308
+ contentTypeKey: '*',
309
+ fieldKey: 'stripe_price_id',
310
+ type: 'text',
311
+ config: { helpText: 'Stripe Price ID for this entry' },
312
+ },
313
+ {
314
+ contentTypeKey: '*',
315
+ fieldKey: 'stripe_payment_mode',
316
+ type: 'text',
317
+ config: { helpText: 'payment or subscription' },
318
+ },
319
+ ],
320
+ },
321
+ },
322
+ {
323
+ key: 'inventory-sync',
324
+ name: 'Inventory Sync',
325
+ version: '1.0.0',
326
+ author: 'HTMLess Team',
327
+ description: 'Real-time stock tracking for product content types. Syncs inventory levels across channels, sends low-stock alerts, and auto-updates entry status when out of stock.',
328
+ repository: 'https://github.com/htmless/ext-inventory-sync',
329
+ homepage: 'https://htmless.io/marketplace/inventory-sync',
330
+ license: 'MIT',
331
+ pricing: 'paid',
332
+ price: 2499,
333
+ category: 'commerce',
334
+ permissions: ['entry.read', 'entry.create', 'webhook.manage'],
335
+ manifest: {
336
+ key: 'inventory-sync',
337
+ name: 'Inventory Sync',
338
+ version: '1.0.0',
339
+ description: 'Real-time stock tracking and inventory management',
340
+ hooks: [
341
+ { event: 'entry.updated', handler: 'inventory-sync:check-stock' },
342
+ ],
343
+ routes: [
344
+ { method: 'GET', path: '/inventory/levels', handler: 'inventory-sync:get-levels' },
345
+ { method: 'POST', path: '/inventory/adjust', handler: 'inventory-sync:adjust-stock' },
346
+ { method: 'POST', path: '/inventory/webhook', handler: 'inventory-sync:external-webhook' },
347
+ ],
348
+ fields: [
349
+ {
350
+ contentTypeKey: '*',
351
+ fieldKey: 'stock_quantity',
352
+ type: 'number',
353
+ config: { helpText: 'Current stock quantity' },
354
+ },
355
+ {
356
+ contentTypeKey: '*',
357
+ fieldKey: 'low_stock_threshold',
358
+ type: 'number',
359
+ config: { helpText: 'Alert when stock drops below this number' },
360
+ },
361
+ ],
362
+ },
363
+ },
364
+ // ── Media (2) ────────────────────────────────────────────────────
365
+ {
366
+ key: 'image-optimizer',
367
+ name: 'Image Optimizer',
368
+ version: '1.0.0',
369
+ author: 'HTMLess Team',
370
+ description: 'Automatically compresses and optimizes uploaded images. Supports WebP/AVIF conversion, configurable quality presets, and responsive image variant generation.',
371
+ repository: 'https://github.com/htmless/ext-image-optimizer',
372
+ homepage: 'https://htmless.io/marketplace/image-optimizer',
373
+ license: 'MIT',
374
+ pricing: 'free',
375
+ category: 'media',
376
+ permissions: ['asset.upload'],
377
+ manifest: {
378
+ key: 'image-optimizer',
379
+ name: 'Image Optimizer',
380
+ version: '1.0.0',
381
+ description: 'Auto-compress and optimize uploaded images',
382
+ hooks: [
383
+ { event: 'asset.created', handler: 'image-optimizer:optimize' },
384
+ ],
385
+ routes: [
386
+ { method: 'POST', path: '/optimize/run', handler: 'image-optimizer:manual-optimize' },
387
+ { method: 'GET', path: '/optimize/stats', handler: 'image-optimizer:savings-stats' },
388
+ ],
389
+ },
390
+ },
391
+ {
392
+ key: 'watermark',
393
+ name: 'Watermark',
394
+ version: '1.0.0',
395
+ author: 'HTMLess Team',
396
+ description: 'Adds configurable watermarks to uploaded images. Supports text and image overlays, position control, opacity settings, and batch processing of existing assets.',
397
+ repository: 'https://github.com/htmless/ext-watermark',
398
+ homepage: 'https://htmless.io/marketplace/watermark',
399
+ license: 'MIT',
400
+ pricing: 'free',
401
+ category: 'media',
402
+ permissions: ['asset.upload'],
403
+ manifest: {
404
+ key: 'watermark',
405
+ name: 'Watermark',
406
+ version: '1.0.0',
407
+ description: 'Add watermarks to uploaded images',
408
+ hooks: [
409
+ { event: 'asset.created', handler: 'watermark:apply' },
410
+ ],
411
+ routes: [
412
+ { method: 'POST', path: '/watermark/apply', handler: 'watermark:manual-apply' },
413
+ { method: 'POST', path: '/watermark/batch', handler: 'watermark:batch-apply' },
414
+ { method: 'GET', path: '/watermark/preview', handler: 'watermark:preview' },
415
+ ],
416
+ },
417
+ },
418
+ // ── Notifications (2) ────────────────────────────────────────────
419
+ {
420
+ key: 'slack-notifier',
421
+ name: 'Slack Notifier',
422
+ version: '1.0.0',
423
+ author: 'HTMLess Team',
424
+ description: 'Sends real-time notifications to Slack channels when content is created, published, or updated. Configurable per content type with rich message formatting and thread support.',
425
+ repository: 'https://github.com/htmless/ext-slack-notifier',
426
+ homepage: 'https://htmless.io/marketplace/slack-notifier',
427
+ license: 'MIT',
428
+ pricing: 'free',
429
+ category: 'notifications',
430
+ permissions: ['entry.read', 'webhook.manage'],
431
+ manifest: {
432
+ key: 'slack-notifier',
433
+ name: 'Slack Notifier',
434
+ version: '1.0.0',
435
+ description: 'Send Slack notifications on content changes',
436
+ hooks: [
437
+ { event: 'entry.created', handler: 'slack-notifier:notify-created' },
438
+ { event: 'entry.published', handler: 'slack-notifier:notify-published' },
439
+ { event: 'entry.updated', handler: 'slack-notifier:notify-updated' },
440
+ ],
441
+ routes: [
442
+ { method: 'POST', path: '/slack/test', handler: 'slack-notifier:send-test' },
443
+ { method: 'GET', path: '/slack/channels', handler: 'slack-notifier:list-channels' },
444
+ ],
445
+ },
446
+ },
447
+ {
448
+ key: 'email-digest',
449
+ name: 'Email Digest',
450
+ version: '1.0.0',
451
+ author: 'HTMLess Team',
452
+ description: 'Sends daily or weekly email summaries of content activity. Includes new entries, upcoming scheduled publishes, recent comments, and content status overview.',
453
+ repository: 'https://github.com/htmless/ext-email-digest',
454
+ homepage: 'https://htmless.io/marketplace/email-digest',
455
+ license: 'MIT',
456
+ pricing: 'free',
457
+ category: 'notifications',
458
+ permissions: ['entry.read'],
459
+ manifest: {
460
+ key: 'email-digest',
461
+ name: 'Email Digest',
462
+ version: '1.0.0',
463
+ description: 'Daily/weekly email summaries of content activity',
464
+ routes: [
465
+ { method: 'POST', path: '/digest/send', handler: 'email-digest:send-now' },
466
+ { method: 'GET', path: '/digest/preview', handler: 'email-digest:preview' },
467
+ { method: 'POST', path: '/digest/subscribe', handler: 'email-digest:subscribe' },
468
+ { method: 'POST', path: '/digest/unsubscribe', handler: 'email-digest:unsubscribe' },
469
+ ],
470
+ },
471
+ },
472
+ // ── Integration (2) ──────────────────────────────────────────────
473
+ {
474
+ key: 'github-sync',
475
+ name: 'GitHub Sync',
476
+ version: '1.0.0',
477
+ author: 'HTMLess Team',
478
+ description: 'Two-way sync between HTMLess content and GitHub markdown files. Push published entries as .md files to a repo, or pull markdown changes back into HTMLess. Supports frontmatter mapping.',
479
+ repository: 'https://github.com/htmless/ext-github-sync',
480
+ homepage: 'https://htmless.io/marketplace/github-sync',
481
+ license: 'MIT',
482
+ pricing: 'free',
483
+ category: 'integration',
484
+ permissions: ['entry.read', 'entry.create'],
485
+ manifest: {
486
+ key: 'github-sync',
487
+ name: 'GitHub Sync',
488
+ version: '1.0.0',
489
+ description: 'Two-way sync between content and GitHub markdown files',
490
+ hooks: [
491
+ { event: 'entry.published', handler: 'github-sync:push-to-github' },
492
+ ],
493
+ routes: [
494
+ { method: 'POST', path: '/github/sync', handler: 'github-sync:full-sync' },
495
+ { method: 'POST', path: '/github/pull', handler: 'github-sync:pull-from-github' },
496
+ { method: 'POST', path: '/github/webhook', handler: 'github-sync:handle-webhook' },
497
+ { method: 'GET', path: '/github/status', handler: 'github-sync:sync-status' },
498
+ ],
499
+ },
500
+ },
501
+ {
502
+ key: 'wordpress-import',
503
+ name: 'WordPress Import',
504
+ version: '1.0.0',
505
+ author: 'HTMLess Team',
506
+ description: 'One-click migration from WordPress. Imports posts, pages, categories, tags, media, and users from a WP XML export or live WP REST API. Maps WordPress blocks to HTMLess blocks.',
507
+ repository: 'https://github.com/htmless/ext-wordpress-import',
508
+ homepage: 'https://htmless.io/marketplace/wordpress-import',
509
+ license: 'MIT',
510
+ pricing: 'free',
511
+ category: 'integration',
512
+ permissions: ['entry.create', 'asset.upload', 'schema.admin'],
513
+ manifest: {
514
+ key: 'wordpress-import',
515
+ name: 'WordPress Import',
516
+ version: '1.0.0',
517
+ description: 'One-click migration from WordPress',
518
+ routes: [
519
+ { method: 'POST', path: '/wp-import/xml', handler: 'wordpress-import:import-xml' },
520
+ { method: 'POST', path: '/wp-import/api', handler: 'wordpress-import:import-api' },
521
+ { method: 'GET', path: '/wp-import/status', handler: 'wordpress-import:import-status' },
522
+ { method: 'GET', path: '/wp-import/preview', handler: 'wordpress-import:preview-import' },
523
+ ],
524
+ },
525
+ },
526
+ // ── Utility (2) ──────────────────────────────────────────────────
527
+ {
528
+ key: 'backup-scheduler',
529
+ name: 'Backup Scheduler',
530
+ version: '1.0.0',
531
+ author: 'HTMLess Team',
532
+ description: 'Automated content backups on a configurable schedule. Exports all entries, schemas, and assets to JSON/ZIP, stores in S3-compatible storage, and supports point-in-time restore.',
533
+ repository: 'https://github.com/htmless/ext-backup-scheduler',
534
+ homepage: 'https://htmless.io/marketplace/backup-scheduler',
535
+ license: 'MIT',
536
+ pricing: 'freemium',
537
+ price: 499,
538
+ category: 'utility',
539
+ permissions: ['entry.read', 'asset.upload', 'schema.admin'],
540
+ manifest: {
541
+ key: 'backup-scheduler',
542
+ name: 'Backup Scheduler',
543
+ version: '1.0.0',
544
+ description: 'Automated content backups and point-in-time restore',
545
+ routes: [
546
+ { method: 'POST', path: '/backup/run', handler: 'backup-scheduler:run-backup' },
547
+ { method: 'GET', path: '/backup/list', handler: 'backup-scheduler:list-backups' },
548
+ { method: 'POST', path: '/backup/restore', handler: 'backup-scheduler:restore' },
549
+ { method: 'GET', path: '/backup/status', handler: 'backup-scheduler:status' },
550
+ ],
551
+ },
552
+ },
553
+ {
554
+ key: 'content-linter',
555
+ name: 'Content Linter',
556
+ version: '1.0.0',
557
+ author: 'HTMLess Team',
558
+ description: 'Checks content for style, grammar, and consistency issues before publishing. Configurable rulesets for tone, reading level, prohibited words, and brand guidelines.',
559
+ repository: 'https://github.com/htmless/ext-content-linter',
560
+ homepage: 'https://htmless.io/marketplace/content-linter',
561
+ license: 'MIT',
562
+ pricing: 'free',
563
+ category: 'utility',
564
+ permissions: ['entry.read'],
565
+ manifest: {
566
+ key: 'content-linter',
567
+ name: 'Content Linter',
568
+ version: '1.0.0',
569
+ description: 'Style, grammar, and consistency checks for content',
570
+ hooks: [
571
+ { event: 'entry.updated', handler: 'content-linter:lint-on-save' },
572
+ ],
573
+ routes: [
574
+ { method: 'POST', path: '/lint/check', handler: 'content-linter:check' },
575
+ { method: 'GET', path: '/lint/rules', handler: 'content-linter:list-rules' },
576
+ { method: 'POST', path: '/lint/configure', handler: 'content-linter:configure-rules' },
577
+ ],
578
+ },
579
+ },
580
+ ];
581
+ // Seed the catalog with built-in extensions
582
+ for (const ext of builtInExtensions) {
583
+ catalog.set(ext.key, ext);
584
+ }
585
+ // ─── Catalog API ────────────────────────────────────────────────────
586
+ /**
587
+ * List all available marketplace extensions, optionally filtered by category.
588
+ */
589
+ export function listAvailable(category) {
590
+ const all = Array.from(catalog.values());
591
+ if (!category)
592
+ return all;
593
+ return all.filter((ext) => ext.category === category);
594
+ }
595
+ /**
596
+ * Get a single marketplace extension by key.
597
+ */
598
+ export function getMarketplaceExtension(key) {
599
+ return catalog.get(key);
600
+ }
601
+ /**
602
+ * Register a new extension in the marketplace catalog.
603
+ */
604
+ export function registerMarketplaceExtension(extension) {
605
+ catalog.set(extension.key, extension);
606
+ }
607
+ // ─── Installation Lifecycle ─────────────────────────────────────────
608
+ /**
609
+ * Get the set of installed extension keys for a space.
610
+ */
611
+ function getSpaceInstallations(spaceId) {
612
+ let set = installations.get(spaceId);
613
+ if (!set) {
614
+ set = new Set();
615
+ installations.set(spaceId, set);
616
+ }
617
+ return set;
618
+ }
619
+ /**
620
+ * Check if an extension is installed for a space.
621
+ */
622
+ export function isInstalled(spaceId, extensionKey) {
623
+ return getSpaceInstallations(spaceId).has(extensionKey);
624
+ }
625
+ /**
626
+ * List installed extension keys for a space.
627
+ */
628
+ export function listInstalled(spaceId) {
629
+ return Array.from(getSpaceInstallations(spaceId));
630
+ }
631
+ /**
632
+ * Install a marketplace extension into a space.
633
+ * Validates the extension exists in the catalog, checks permissions,
634
+ * and loads its manifest into the extension runtime.
635
+ */
636
+ export async function installExtension(spaceId, extensionKey) {
637
+ const extension = catalog.get(extensionKey);
638
+ if (!extension) {
639
+ throw new Error(`Extension "${extensionKey}" not found in the marketplace`);
640
+ }
641
+ const installed = getSpaceInstallations(spaceId);
642
+ if (installed.has(extensionKey)) {
643
+ throw new Error(`Extension "${extensionKey}" is already installed in space "${spaceId}"`);
644
+ }
645
+ // Load the extension manifest into the runtime registry
646
+ // (only if not already registered globally — multiple spaces can share one manifest)
647
+ if (!getExtension(extensionKey)) {
648
+ loadExtension(extension.manifest);
649
+ }
650
+ installed.add(extensionKey);
651
+ }
652
+ /**
653
+ * Uninstall a marketplace extension from a space.
654
+ * Removes the extension from the space's installation set and, if no
655
+ * other spaces are using it, removes from the runtime registry.
656
+ */
657
+ export async function uninstallExtension(spaceId, extensionKey) {
658
+ const installed = getSpaceInstallations(spaceId);
659
+ if (!installed.has(extensionKey)) {
660
+ throw new Error(`Extension "${extensionKey}" is not installed in space "${spaceId}"`);
661
+ }
662
+ installed.delete(extensionKey);
663
+ // Check if any other space still uses this extension
664
+ let stillUsed = false;
665
+ for (const [, set] of installations) {
666
+ if (set.has(extensionKey)) {
667
+ stillUsed = true;
668
+ break;
669
+ }
670
+ }
671
+ // If no space is using it, remove from the runtime registry
672
+ if (!stillUsed) {
673
+ removeExtension(extensionKey);
674
+ }
675
+ }
676
+ //# sourceMappingURL=marketplace.js.map