emdash 0.7.0 → 0.9.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 (354) hide show
  1. package/dist/{adapters-Di31kZ28.d.mts → adapters-DoNJiveC.d.mts} +1 -1
  2. package/dist/{adapters-Di31kZ28.d.mts.map → adapters-DoNJiveC.d.mts.map} +1 -1
  3. package/dist/{apply-5uslYdUu.mjs → apply-BzltprvY.mjs} +90 -139
  4. package/dist/apply-BzltprvY.mjs.map +1 -0
  5. package/dist/astro/index.d.mts +6 -6
  6. package/dist/astro/index.d.mts.map +1 -1
  7. package/dist/astro/index.mjs +194 -17
  8. package/dist/astro/index.mjs.map +1 -1
  9. package/dist/astro/middleware/auth.d.mts +6 -7
  10. package/dist/astro/middleware/auth.d.mts.map +1 -1
  11. package/dist/astro/middleware/auth.mjs +34 -57
  12. package/dist/astro/middleware/auth.mjs.map +1 -1
  13. package/dist/astro/middleware/redirect.d.mts.map +1 -1
  14. package/dist/astro/middleware/redirect.mjs +17 -12
  15. package/dist/astro/middleware/redirect.mjs.map +1 -1
  16. package/dist/astro/middleware/request-context.d.mts.map +1 -1
  17. package/dist/astro/middleware/request-context.mjs +9 -6
  18. package/dist/astro/middleware/request-context.mjs.map +1 -1
  19. package/dist/astro/middleware/setup.mjs +1 -1
  20. package/dist/astro/middleware.d.mts.map +1 -1
  21. package/dist/astro/middleware.mjs +301 -165
  22. package/dist/astro/middleware.mjs.map +1 -1
  23. package/dist/astro/types.d.mts +34 -10
  24. package/dist/astro/types.d.mts.map +1 -1
  25. package/dist/{base64-MBPo9ozB.mjs → base64-BRICGH2l.mjs} +1 -1
  26. package/dist/{base64-MBPo9ozB.mjs.map → base64-BRICGH2l.mjs.map} +1 -1
  27. package/dist/{byline-C4OVd8b3.mjs → byline-BSaNL1w7.mjs} +5 -5
  28. package/dist/byline-BSaNL1w7.mjs.map +1 -0
  29. package/dist/bylines-CvJ3PYz2.mjs +113 -0
  30. package/dist/bylines-CvJ3PYz2.mjs.map +1 -0
  31. package/dist/cache-C6N_hhN7.mjs +65 -0
  32. package/dist/cache-C6N_hhN7.mjs.map +1 -0
  33. package/dist/{chunks-HGz06Soa.mjs → chunks-NBQVDOci.mjs} +8 -2
  34. package/dist/{chunks-HGz06Soa.mjs.map → chunks-NBQVDOci.mjs.map} +1 -1
  35. package/dist/cli/index.mjs +229 -31
  36. package/dist/cli/index.mjs.map +1 -1
  37. package/dist/client/cf-access.d.mts +1 -1
  38. package/dist/client/index.d.mts +1 -1
  39. package/dist/client/index.mjs +3 -3
  40. package/dist/client/index.mjs.map +1 -1
  41. package/dist/{config-BXwuX8Bx.mjs → config-BI0V3ICQ.mjs} +1 -1
  42. package/dist/{config-BXwuX8Bx.mjs.map → config-BI0V3ICQ.mjs.map} +1 -1
  43. package/dist/{content-D7J5y73J.mjs → content-8lOYF0pr.mjs} +43 -28
  44. package/dist/content-8lOYF0pr.mjs.map +1 -0
  45. package/dist/db/index.d.mts +3 -3
  46. package/dist/db/index.mjs +2 -2
  47. package/dist/db/libsql.d.mts +1 -1
  48. package/dist/db/libsql.d.mts.map +1 -1
  49. package/dist/db/libsql.mjs +7 -2
  50. package/dist/db/libsql.mjs.map +1 -1
  51. package/dist/db/postgres.d.mts +1 -1
  52. package/dist/db/sqlite.d.mts +1 -1
  53. package/dist/db/sqlite.d.mts.map +1 -1
  54. package/dist/db/sqlite.mjs +8 -3
  55. package/dist/db/sqlite.mjs.map +1 -1
  56. package/dist/{db-errors-D0UT85nC.mjs → db-errors-WRezodiz.mjs} +1 -1
  57. package/dist/{db-errors-D0UT85nC.mjs.map → db-errors-WRezodiz.mjs.map} +1 -1
  58. package/dist/{default-CME5YdZ3.mjs → default-D8ksjWhO.mjs} +1 -1
  59. package/dist/{default-CME5YdZ3.mjs.map → default-D8ksjWhO.mjs.map} +1 -1
  60. package/dist/{dialect-helpers-DhTzaUxP.mjs → dialect-helpers-BKCvISIQ.mjs} +19 -2
  61. package/dist/dialect-helpers-BKCvISIQ.mjs.map +1 -0
  62. package/dist/{error-CiYn9yDu.mjs → error-D_-tqP-I.mjs} +1 -1
  63. package/dist/error-D_-tqP-I.mjs.map +1 -0
  64. package/dist/{index-De6_Xv3v.d.mts → index-BFRaVcD6.d.mts} +243 -40
  65. package/dist/index-BFRaVcD6.d.mts.map +1 -0
  66. package/dist/index.d.mts +11 -11
  67. package/dist/index.mjs +29 -25
  68. package/dist/{load-CBcmDIot.mjs → load-DDqMMvZL.mjs} +2 -2
  69. package/dist/{load-CBcmDIot.mjs.map → load-DDqMMvZL.mjs.map} +1 -1
  70. package/dist/{loader-DeiBJEMe.mjs → loader-CKLbBnhK.mjs} +32 -10
  71. package/dist/loader-CKLbBnhK.mjs.map +1 -0
  72. package/dist/{manifest-schema-V30qsMft.mjs → manifest-schema-DqWNC3lM.mjs} +45 -3
  73. package/dist/manifest-schema-DqWNC3lM.mjs.map +1 -0
  74. package/dist/media/index.d.mts +1 -1
  75. package/dist/media/index.mjs +1 -1
  76. package/dist/media/local-runtime.d.mts +7 -7
  77. package/dist/media/local-runtime.mjs +3 -3
  78. package/dist/{media-DqHVh136.mjs → media-BW32b4gi.mjs} +4 -7
  79. package/dist/media-BW32b4gi.mjs.map +1 -0
  80. package/dist/{mode-CpNnGkPz.mjs → mode-ier8jbBk.mjs} +1 -1
  81. package/dist/mode-ier8jbBk.mjs.map +1 -0
  82. package/dist/options-BVp3UsTS.mjs +117 -0
  83. package/dist/options-BVp3UsTS.mjs.map +1 -0
  84. package/dist/page/index.d.mts +2 -2
  85. package/dist/{placeholder-tzpqGWII.d.mts → placeholder-BE4o_2dc.d.mts} +1 -1
  86. package/dist/{placeholder-tzpqGWII.d.mts.map → placeholder-BE4o_2dc.d.mts.map} +1 -1
  87. package/dist/{placeholder-C-fk5hYI.mjs → placeholder-CIJejMlK.mjs} +1 -1
  88. package/dist/placeholder-CIJejMlK.mjs.map +1 -0
  89. package/dist/plugins/adapt-sandbox-entry.d.mts +5 -5
  90. package/dist/plugins/adapt-sandbox-entry.d.mts.map +1 -1
  91. package/dist/plugins/adapt-sandbox-entry.mjs +6 -5
  92. package/dist/plugins/adapt-sandbox-entry.mjs.map +1 -1
  93. package/dist/public-url-DByxYjUw.mjs +51 -0
  94. package/dist/public-url-DByxYjUw.mjs.map +1 -0
  95. package/dist/{query-g4Ug-9j9.mjs → query-Cg9ZKRQ0.mjs} +114 -16
  96. package/dist/query-Cg9ZKRQ0.mjs.map +1 -0
  97. package/dist/{redirect-CN0Rt9Ob.mjs → redirect-BhUBKRc1.mjs} +13 -8
  98. package/dist/redirect-BhUBKRc1.mjs.map +1 -0
  99. package/dist/{registry-Ci3WxVAr.mjs → registry-Dw70ChxB.mjs} +69 -11
  100. package/dist/registry-Dw70ChxB.mjs.map +1 -0
  101. package/dist/{request-cache-DiR961CV.mjs → request-cache-B-bmkipQ.mjs} +1 -1
  102. package/dist/request-cache-B-bmkipQ.mjs.map +1 -0
  103. package/dist/runner-Bnoj7vjK.d.mts +44 -0
  104. package/dist/runner-Bnoj7vjK.d.mts.map +1 -0
  105. package/dist/{runner-tQ7BJ4T7.mjs → runner-C7ADox5q.mjs} +185 -55
  106. package/dist/{runner-tQ7BJ4T7.mjs.map → runner-C7ADox5q.mjs.map} +1 -1
  107. package/dist/runtime.d.mts +6 -6
  108. package/dist/runtime.mjs +4 -4
  109. package/dist/{search-B0effn3j.mjs → search-dOGEccMa.mjs} +341 -152
  110. package/dist/search-dOGEccMa.mjs.map +1 -0
  111. package/dist/secrets-CW3reAnU.mjs +314 -0
  112. package/dist/secrets-CW3reAnU.mjs.map +1 -0
  113. package/dist/seed/index.d.mts +2 -2
  114. package/dist/seed/index.mjs +15 -14
  115. package/dist/seo/index.d.mts +1 -1
  116. package/dist/storage/local.d.mts +1 -1
  117. package/dist/storage/local.mjs +1 -1
  118. package/dist/storage/s3.d.mts +1 -1
  119. package/dist/storage/s3.d.mts.map +1 -1
  120. package/dist/storage/s3.mjs +4 -4
  121. package/dist/storage/s3.mjs.map +1 -1
  122. package/dist/{taxonomies-K2z0Uhnj.mjs → taxonomies-ZlRtD6AG.mjs} +14 -7
  123. package/dist/taxonomies-ZlRtD6AG.mjs.map +1 -0
  124. package/dist/{tokens-BFPFx3CA.mjs → tokens-D7zMmWi2.mjs} +2 -2
  125. package/dist/{tokens-BFPFx3CA.mjs.map → tokens-D7zMmWi2.mjs.map} +1 -1
  126. package/dist/{transport-BykRfpyy.mjs → transport-BeMCmin1.mjs} +6 -5
  127. package/dist/{transport-BykRfpyy.mjs.map → transport-BeMCmin1.mjs.map} +1 -1
  128. package/dist/{transport-H4Iwx7tC.d.mts → transport-DNEfeMaU.d.mts} +1 -1
  129. package/dist/{transport-H4Iwx7tC.d.mts.map → transport-DNEfeMaU.d.mts.map} +1 -1
  130. package/dist/types-4fVtCIm0.mjs +68 -0
  131. package/dist/types-4fVtCIm0.mjs.map +1 -0
  132. package/dist/{types-CnZYHyLW.d.mts → types-BSyXeCFW.d.mts} +24 -2
  133. package/dist/{types-CnZYHyLW.d.mts.map → types-BSyXeCFW.d.mts.map} +1 -1
  134. package/dist/{types-DgrIP0tF.d.mts → types-BuBIptGk.d.mts} +80 -106
  135. package/dist/types-BuBIptGk.d.mts.map +1 -0
  136. package/dist/{types-BH2L167P.mjs → types-CDbKp7ND.mjs} +1 -1
  137. package/dist/{types-BH2L167P.mjs.map → types-CDbKp7ND.mjs.map} +1 -1
  138. package/dist/{types-DDS4MxsT.mjs → types-CIOg5AR8.mjs} +1 -1
  139. package/dist/{types-DDS4MxsT.mjs.map → types-CIOg5AR8.mjs.map} +1 -1
  140. package/dist/{types-6CUZRrZP.d.mts → types-CJsYGpco.d.mts} +24 -2
  141. package/dist/{types-6CUZRrZP.d.mts.map → types-CJsYGpco.d.mts.map} +1 -1
  142. package/dist/types-CRxNbK-Z.mjs +68 -0
  143. package/dist/types-CRxNbK-Z.mjs.map +1 -0
  144. package/dist/{types-C2v0c34j.d.mts → types-CrtWgIvl.d.mts} +1 -1
  145. package/dist/{types-C2v0c34j.d.mts.map → types-CrtWgIvl.d.mts.map} +1 -1
  146. package/dist/{types-CFWjXmus.d.mts → types-M78DQ1lx.d.mts} +1 -1
  147. package/dist/{types-CFWjXmus.d.mts.map → types-M78DQ1lx.d.mts.map} +1 -1
  148. package/dist/{validate-CqsNItbt.mjs → validate-Baqf0slj.mjs} +3 -3
  149. package/dist/{validate-CqsNItbt.mjs.map → validate-Baqf0slj.mjs.map} +1 -1
  150. package/dist/{validate-kM8Pjuf7.d.mts → validate-BfQh_C_y.d.mts} +4 -4
  151. package/dist/{validate-kM8Pjuf7.d.mts.map → validate-BfQh_C_y.d.mts.map} +1 -1
  152. package/dist/validation-BfEI7tNe.mjs +144 -0
  153. package/dist/validation-BfEI7tNe.mjs.map +1 -0
  154. package/dist/version-DoxrVdYf.mjs +7 -0
  155. package/dist/{version-BnTKdfam.mjs.map → version-DoxrVdYf.mjs.map} +1 -1
  156. package/dist/zod-generator-CC0xNe_K.mjs +132 -0
  157. package/dist/zod-generator-CC0xNe_K.mjs.map +1 -0
  158. package/locals.d.ts +1 -6
  159. package/package.json +21 -7
  160. package/src/api/auth-storage.ts +37 -0
  161. package/src/api/error.ts +6 -0
  162. package/src/api/errors.ts +8 -0
  163. package/src/api/handlers/comments.ts +19 -4
  164. package/src/api/handlers/content.ts +151 -4
  165. package/src/api/handlers/device-flow.ts +5 -0
  166. package/src/api/handlers/index.ts +2 -0
  167. package/src/api/handlers/marketplace.ts +11 -4
  168. package/src/api/handlers/media.ts +8 -1
  169. package/src/api/handlers/menus.ts +160 -21
  170. package/src/api/handlers/oauth-authorization.ts +72 -33
  171. package/src/api/handlers/redirects.ts +16 -3
  172. package/src/api/handlers/revision.ts +23 -14
  173. package/src/api/handlers/sections.ts +8 -1
  174. package/src/api/handlers/taxonomies.ts +131 -22
  175. package/src/api/handlers/validation.ts +212 -0
  176. package/src/api/openapi/document.ts +4 -1
  177. package/src/api/public-url.ts +54 -5
  178. package/src/api/route-utils.ts +14 -0
  179. package/src/api/schemas/comments.ts +2 -2
  180. package/src/api/schemas/common.ts +1 -1
  181. package/src/api/schemas/content.ts +17 -0
  182. package/src/api/schemas/sections.ts +3 -3
  183. package/src/api/schemas/setup.ts +8 -0
  184. package/src/api/schemas/users.ts +1 -1
  185. package/src/api/schemas/widgets.ts +12 -10
  186. package/src/api/setup-complete.ts +40 -0
  187. package/src/api/types.ts +5 -1
  188. package/src/astro/integration/index.ts +30 -2
  189. package/src/astro/integration/routes.ts +28 -0
  190. package/src/astro/integration/runtime.ts +49 -1
  191. package/src/astro/integration/virtual-modules.ts +73 -2
  192. package/src/astro/integration/vite-config.ts +49 -13
  193. package/src/astro/middleware/auth.ts +34 -6
  194. package/src/astro/middleware/redirect.ts +29 -16
  195. package/src/astro/middleware/request-context.ts +15 -5
  196. package/src/astro/middleware.ts +41 -10
  197. package/src/astro/routes/PluginRegistry.tsx +10 -1
  198. package/src/astro/routes/api/auth/invite/complete.ts +6 -1
  199. package/src/astro/routes/api/auth/mode.ts +57 -0
  200. package/src/astro/routes/api/auth/oauth/[provider]/callback.ts +23 -3
  201. package/src/astro/routes/api/auth/oauth/[provider].ts +10 -4
  202. package/src/astro/routes/api/auth/passkey/register/verify.ts +6 -1
  203. package/src/astro/routes/api/auth/passkey/verify.ts +6 -1
  204. package/src/astro/routes/api/auth/signup/complete.ts +6 -1
  205. package/src/astro/routes/api/comments/[collection]/[contentId]/index.ts +2 -2
  206. package/src/astro/routes/api/content/[collection]/[id]/discard-draft.ts +4 -2
  207. package/src/astro/routes/api/content/[collection]/[id]/preview-url.ts +34 -12
  208. package/src/astro/routes/api/content/[collection]/[id]/publish.ts +32 -2
  209. package/src/astro/routes/api/content/[collection]/[id]/restore.ts +4 -2
  210. package/src/astro/routes/api/content/[collection]/[id]/revisions.ts +3 -2
  211. package/src/astro/routes/api/content/[collection]/[id]/terms/[taxonomy].ts +8 -4
  212. package/src/astro/routes/api/content/[collection]/[id]/translations.ts +1 -1
  213. package/src/astro/routes/api/content/[collection]/[id].ts +12 -0
  214. package/src/astro/routes/api/content/[collection]/index.ts +1 -9
  215. package/src/astro/routes/api/import/wordpress/execute.ts +3 -1
  216. package/src/astro/routes/api/import/wordpress/media.ts +2 -7
  217. package/src/astro/routes/api/import/wordpress/prepare.ts +9 -0
  218. package/src/astro/routes/api/import/wordpress-plugin/execute.ts +3 -1
  219. package/src/astro/routes/api/manifest.ts +62 -45
  220. package/src/astro/routes/api/media/[id]/confirm.ts +10 -1
  221. package/src/astro/routes/api/media/providers/[providerId]/index.ts +12 -3
  222. package/src/astro/routes/api/openapi.json.ts +27 -10
  223. package/src/astro/routes/api/redirects/404s/index.ts +10 -4
  224. package/src/astro/routes/api/redirects/404s/summary.ts +4 -2
  225. package/src/astro/routes/api/redirects/[id].ts +10 -4
  226. package/src/astro/routes/api/redirects/index.ts +7 -3
  227. package/src/astro/routes/api/revisions/[revisionId]/index.ts +1 -1
  228. package/src/astro/routes/api/schema/collections/[slug]/fields/[fieldSlug].ts +0 -2
  229. package/src/astro/routes/api/schema/collections/[slug]/fields/index.ts +0 -1
  230. package/src/astro/routes/api/schema/collections/[slug]/fields/reorder.ts +0 -1
  231. package/src/astro/routes/api/schema/collections/[slug]/index.ts +2 -2
  232. package/src/astro/routes/api/schema/collections/index.ts +1 -1
  233. package/src/astro/routes/api/search/index.ts +10 -2
  234. package/src/astro/routes/api/sections/[slug].ts +10 -4
  235. package/src/astro/routes/api/sections/index.ts +7 -3
  236. package/src/astro/routes/api/settings/email.ts +4 -9
  237. package/src/astro/routes/api/setup/admin-verify.ts +6 -1
  238. package/src/astro/routes/api/setup/admin.ts +8 -2
  239. package/src/astro/routes/api/setup/index.ts +2 -2
  240. package/src/astro/routes/api/setup/status.ts +3 -1
  241. package/src/astro/routes/api/snapshot.ts +44 -18
  242. package/src/astro/routes/api/taxonomies/index.ts +0 -1
  243. package/src/astro/routes/api/themes/preview.ts +11 -5
  244. package/src/astro/routes/api/widget-areas/[name]/widgets/[id].ts +4 -1
  245. package/src/astro/routes/api/widget-areas/[name]/widgets.ts +4 -1
  246. package/src/astro/routes/api/widget-areas/[name].ts +4 -1
  247. package/src/astro/routes/api/widget-areas/index.ts +4 -1
  248. package/src/astro/types.ts +32 -3
  249. package/src/auth/allowed-origins.ts +168 -0
  250. package/src/auth/mode.ts +15 -3
  251. package/src/auth/passkey-config.ts +35 -13
  252. package/src/auth/providers/github-admin.tsx +29 -0
  253. package/src/auth/providers/github.ts +31 -0
  254. package/src/auth/providers/google-admin.tsx +44 -0
  255. package/src/auth/providers/google.ts +31 -0
  256. package/src/auth/types.ts +114 -4
  257. package/src/bylines/index.ts +37 -88
  258. package/src/cli/commands/auth.ts +28 -6
  259. package/src/cli/commands/bundle-utils.ts +11 -2
  260. package/src/cli/commands/bundle.ts +31 -9
  261. package/src/cli/commands/content.ts +13 -0
  262. package/src/cli/commands/login.ts +8 -1
  263. package/src/cli/commands/publish.ts +24 -0
  264. package/src/cli/commands/secrets.ts +183 -0
  265. package/src/cli/credentials.ts +1 -1
  266. package/src/cli/index.ts +5 -1
  267. package/src/client/index.ts +4 -4
  268. package/src/client/transport.ts +17 -7
  269. package/src/components/Break.astro +2 -2
  270. package/src/components/EmDashHead.astro +18 -13
  271. package/src/components/EmDashImage.astro +7 -6
  272. package/src/components/Embed.astro +1 -1
  273. package/src/components/Gallery.astro +6 -4
  274. package/src/components/Image.astro +9 -4
  275. package/src/components/InlinePortableTextEditor.tsx +106 -19
  276. package/src/components/LiveSearch.astro +5 -14
  277. package/src/config/secrets.ts +528 -0
  278. package/src/database/dialect-helpers.ts +50 -0
  279. package/src/database/migrations/034_published_at_index.ts +1 -1
  280. package/src/database/migrations/035_bounded_404_log.ts +56 -39
  281. package/src/database/migrations/runner.ts +156 -23
  282. package/src/database/repositories/audit.ts +6 -8
  283. package/src/database/repositories/byline.ts +6 -8
  284. package/src/database/repositories/comment.ts +12 -16
  285. package/src/database/repositories/content.ts +76 -52
  286. package/src/database/repositories/index.ts +1 -1
  287. package/src/database/repositories/media.ts +10 -13
  288. package/src/database/repositories/plugin-storage.ts +4 -6
  289. package/src/database/repositories/redirect.ts +26 -19
  290. package/src/database/repositories/taxonomy.ts +40 -3
  291. package/src/database/repositories/types.ts +57 -8
  292. package/src/database/repositories/user.ts +6 -8
  293. package/src/db/libsql.ts +1 -3
  294. package/src/db/sqlite.ts +2 -5
  295. package/src/emdash-runtime.ts +388 -247
  296. package/src/index.ts +14 -1
  297. package/src/loader.ts +30 -6
  298. package/src/mcp/server.ts +781 -141
  299. package/src/media/normalize.ts +1 -1
  300. package/src/media/url.ts +78 -0
  301. package/src/page/site-identity.ts +58 -0
  302. package/src/plugins/adapt-sandbox-entry.ts +22 -10
  303. package/src/plugins/context.ts +13 -10
  304. package/src/plugins/define-plugin.ts +40 -12
  305. package/src/plugins/email-console.ts +10 -3
  306. package/src/plugins/hooks.ts +34 -19
  307. package/src/plugins/index.ts +9 -0
  308. package/src/plugins/manifest-schema.ts +49 -2
  309. package/src/plugins/types.ts +174 -13
  310. package/src/preview/urls.ts +23 -3
  311. package/src/query.ts +149 -6
  312. package/src/redirects/cache.ts +38 -18
  313. package/src/request-cache.ts +3 -0
  314. package/src/schema/registry.ts +97 -5
  315. package/src/schema/zod-generator.ts +27 -5
  316. package/src/search/fts-manager.ts +0 -2
  317. package/src/search/query.ts +111 -26
  318. package/src/search/types.ts +8 -1
  319. package/src/sections/index.ts +7 -9
  320. package/src/seed/apply.ts +2 -0
  321. package/src/settings/index.ts +80 -6
  322. package/src/settings/types.ts +23 -1
  323. package/src/storage/s3.ts +12 -6
  324. package/src/taxonomies/index.ts +11 -1
  325. package/src/virtual-modules.d.ts +21 -1
  326. package/src/widgets/index.ts +1 -1
  327. package/dist/apply-5uslYdUu.mjs.map +0 -1
  328. package/dist/byline-C4OVd8b3.mjs.map +0 -1
  329. package/dist/bylines-hPTW79hw.mjs +0 -157
  330. package/dist/bylines-hPTW79hw.mjs.map +0 -1
  331. package/dist/cache-BkKBuIvS.mjs +0 -56
  332. package/dist/cache-BkKBuIvS.mjs.map +0 -1
  333. package/dist/chunk-ClPoSABd.mjs +0 -21
  334. package/dist/content-D7J5y73J.mjs.map +0 -1
  335. package/dist/dialect-helpers-DhTzaUxP.mjs.map +0 -1
  336. package/dist/error-CiYn9yDu.mjs.map +0 -1
  337. package/dist/index-De6_Xv3v.d.mts.map +0 -1
  338. package/dist/loader-DeiBJEMe.mjs.map +0 -1
  339. package/dist/manifest-schema-V30qsMft.mjs.map +0 -1
  340. package/dist/media-DqHVh136.mjs.map +0 -1
  341. package/dist/mode-CpNnGkPz.mjs.map +0 -1
  342. package/dist/placeholder-C-fk5hYI.mjs.map +0 -1
  343. package/dist/query-g4Ug-9j9.mjs.map +0 -1
  344. package/dist/redirect-CN0Rt9Ob.mjs.map +0 -1
  345. package/dist/registry-Ci3WxVAr.mjs.map +0 -1
  346. package/dist/request-cache-DiR961CV.mjs.map +0 -1
  347. package/dist/runner-BR2xKwhn.d.mts +0 -34
  348. package/dist/runner-BR2xKwhn.d.mts.map +0 -1
  349. package/dist/search-B0effn3j.mjs.map +0 -1
  350. package/dist/taxonomies-K2z0Uhnj.mjs.map +0 -1
  351. package/dist/types-CMMN0pNg.mjs +0 -31
  352. package/dist/types-CMMN0pNg.mjs.map +0 -1
  353. package/dist/types-DgrIP0tF.d.mts.map +0 -1
  354. package/dist/version-BnTKdfam.mjs +0 -7
@@ -1,22 +1,25 @@
1
1
  #!/usr/bin/env node
2
- import { t as __exportAll } from "../chunk-ClPoSABd.mjs";
2
+ import { i as __exportAll, r as runMigrations, t as getMigrationStatus } from "../runner-C7ADox5q.mjs";
3
3
  import { n as createDatabase } from "../connection-2igzM-AT.mjs";
4
- import { s as listTablesLike } from "../dialect-helpers-DhTzaUxP.mjs";
5
- import { r as runMigrations, t as getMigrationStatus } from "../runner-tQ7BJ4T7.mjs";
6
- import { t as ContentRepository } from "../content-D7J5y73J.mjs";
7
- import { i as encodeBase64url } from "../base64-MBPo9ozB.mjs";
8
- import "../types-CMMN0pNg.mjs";
9
- import { t as MediaRepository } from "../media-DqHVh136.mjs";
10
- import { m as TaxonomyRepository, p as OptionsRepository, t as applySeed } from "../apply-5uslYdUu.mjs";
11
- import "../redirect-CN0Rt9Ob.mjs";
12
- import "../byline-C4OVd8b3.mjs";
13
- import { r as isI18nEnabled } from "../config-BXwuX8Bx.mjs";
14
- import { n as SchemaRegistry } from "../registry-Ci3WxVAr.mjs";
15
- import "../loader-DeiBJEMe.mjs";
16
- import "../request-cache-DiR961CV.mjs";
17
- import { i as pluginManifestSchema } from "../manifest-schema-V30qsMft.mjs";
18
- import { t as validateSeed } from "../validate-CqsNItbt.mjs";
4
+ import { c as listTablesLike } from "../dialect-helpers-BKCvISIQ.mjs";
5
+ import { t as ContentRepository } from "../content-8lOYF0pr.mjs";
6
+ import { i as encodeBase64url } from "../base64-BRICGH2l.mjs";
7
+ import "../types-CRxNbK-Z.mjs";
8
+ import { t as MediaRepository } from "../media-BW32b4gi.mjs";
9
+ import { p as TaxonomyRepository, t as applySeed } from "../apply-BzltprvY.mjs";
10
+ import { t as OptionsRepository } from "../options-BVp3UsTS.mjs";
11
+ import "../redirect-BhUBKRc1.mjs";
12
+ import "../byline-BSaNL1w7.mjs";
13
+ import { r as isI18nEnabled } from "../config-BI0V3ICQ.mjs";
14
+ import { n as SchemaRegistry } from "../registry-Dw70ChxB.mjs";
15
+ import "../loader-CKLbBnhK.mjs";
16
+ import "../request-cache-B-bmkipQ.mjs";
17
+ import { i as pluginManifestSchema } from "../manifest-schema-DqWNC3lM.mjs";
18
+ import { n as isDeprecatedCapability, t as CAPABILITY_RENAMES } from "../types-4fVtCIm0.mjs";
19
+ import { t as validateSeed } from "../validate-Baqf0slj.mjs";
20
+ import { n as fingerprintKey, r as generateEncryptionKey, t as EmDashSecretsError } from "../secrets-CW3reAnU.mjs";
19
21
  import { LocalStorage } from "../storage/local.mjs";
22
+ import { o as convertDataForRead } from "../transport-BeMCmin1.mjs";
20
23
  import { createHeaderAwareFetch, customHeadersInterceptor, getCachedAccessToken, isAccessRedirect, resolveCustomHeaders, runCloudflaredLogin } from "../client/cf-access.mjs";
21
24
  import { EmDashClient } from "../client/index.mjs";
22
25
  import { imageSize } from "image-size";
@@ -35,10 +38,24 @@ import { packTar } from "modern-tar/fs";
35
38
 
36
39
  //#region src/cli/commands/auth.ts
37
40
  /**
38
- * Auth CLI commands
39
- */
40
- /**
41
- * Generate a cryptographically secure auth secret
41
+ * Auth CLI commands (deprecated)
42
+ *
43
+ * Kept as a deprecated alias for backwards compatibility. The original
44
+ * `emdash auth secret` was documented in published docs and is plausibly
45
+ * scripted in user CI (e.g. `npx emdash auth secret >> .env`). Removing
46
+ * it outright would break those scripts on minor-version upgrade.
47
+ *
48
+ * The command still emits an `EMDASH_AUTH_SECRET=<32-byte-base64url>`
49
+ * line, unchanged. `EMDASH_AUTH_SECRET` itself is now legacy: it's only
50
+ * read as a fallback source for the commenter-IP hash salt so installs
51
+ * upgrading from a prior version keep stable IP hashes (and therefore
52
+ * stable rate-limit buckets). New installs don't need to set it.
53
+ *
54
+ * The deprecation note steers users toward `emdash secrets generate`
55
+ * (which emits a different, versioned `emdash_enc_v1_*` value for
56
+ * `EMDASH_ENCRYPTION_KEY` — used to encrypt plugin secrets at rest).
57
+ *
58
+ * Will be removed in a future minor.
42
59
  */
43
60
  function generateAuthSecret() {
44
61
  const bytes = new Uint8Array(32);
@@ -48,7 +65,7 @@ function generateAuthSecret() {
48
65
  const secretCommand = defineCommand({
49
66
  meta: {
50
67
  name: "secret",
51
- description: "Generate a secure auth secret"
68
+ description: "[DEPRECATED] Generate a value for legacy EMDASH_AUTH_SECRET"
52
69
  },
53
70
  run() {
54
71
  const secret = generateAuthSecret();
@@ -59,12 +76,13 @@ const secretCommand = defineCommand({
59
76
  consola$1.log("");
60
77
  consola$1.log(pc.dim("Add this to your environment variables."));
61
78
  consola$1.log("");
79
+ process.stderr.write(`${pc.yellow("Note:")} ${pc.bold("emdash auth secret")} is deprecated and will be removed in a future minor. ${pc.cyan("EMDASH_AUTH_SECRET")} itself is now optional — it's only used as a legacy fallback for the commenter-IP hash salt. For encrypting plugin secrets at rest, use ${pc.bold("emdash secrets generate")} (a different secret: ${pc.cyan("EMDASH_ENCRYPTION_KEY")}).\n`);
62
80
  }
63
81
  });
64
82
  const authCommand = defineCommand({
65
83
  meta: {
66
84
  name: "auth",
67
- description: "Authentication utilities"
85
+ description: "[DEPRECATED] Authentication utilities (use `emdash secrets` for new flows)"
68
86
  },
69
87
  subCommands: { secret: secretCommand }
70
88
  });
@@ -134,7 +152,10 @@ function readStore() {
134
152
  return {};
135
153
  }
136
154
  function writeStore(store) {
137
- mkdirSync(getConfigDir(), { recursive: true });
155
+ mkdirSync(getConfigDir(), {
156
+ recursive: true,
157
+ mode: 448
158
+ });
138
159
  writeFileSync(getCredentialPath(), JSON.stringify(store, null, " "), {
139
160
  encoding: "utf-8",
140
161
  mode: 384
@@ -483,7 +504,16 @@ const getCommand$3 = defineCommand({
483
504
  });
484
505
  if (!args.published && item.draftRevisionId) {
485
506
  const comparison = await client.compare(args.collection, args.id);
486
- if (comparison.hasChanges && comparison.draft) item.data = comparison.draft;
507
+ if (comparison.hasChanges && comparison.draft) {
508
+ item.data = comparison.draft;
509
+ if (!args.raw && item.data) {
510
+ const fields = (await client.collection(args.collection)).fields.map((f) => ({
511
+ slug: f.slug,
512
+ type: f.type
513
+ }));
514
+ item.data = convertDataForRead(item.data, fields, false);
515
+ }
516
+ }
487
517
  }
488
518
  output(item, args);
489
519
  } catch (error) {
@@ -626,6 +656,7 @@ const deleteCommand$2 = defineCommand({
626
656
  configureOutputMode(args);
627
657
  try {
628
658
  await createClientFromArgs(args).delete(args.collection, args.id);
659
+ output({ success: true }, args);
629
660
  consola$1.success(`Deleted ${args.collection}/${args.id}`);
630
661
  } catch (error) {
631
662
  consola$1.error(error instanceof Error ? error.message : "Unknown error");
@@ -655,6 +686,7 @@ const publishCommand$1 = defineCommand({
655
686
  configureOutputMode(args);
656
687
  try {
657
688
  await createClientFromArgs(args).publish(args.collection, args.id);
689
+ output({ success: true }, args);
658
690
  consola$1.success(`Published ${args.collection}/${args.id}`);
659
691
  } catch (error) {
660
692
  consola$1.error(error instanceof Error ? error.message : "Unknown error");
@@ -684,6 +716,7 @@ const unpublishCommand = defineCommand({
684
716
  configureOutputMode(args);
685
717
  try {
686
718
  await createClientFromArgs(args).unpublish(args.collection, args.id);
719
+ output({ success: true }, args);
687
720
  consola$1.success(`Unpublished ${args.collection}/${args.id}`);
688
721
  } catch (error) {
689
722
  consola$1.error(error instanceof Error ? error.message : "Unknown error");
@@ -718,6 +751,7 @@ const scheduleCommand = defineCommand({
718
751
  configureOutputMode(args);
719
752
  try {
720
753
  await createClientFromArgs(args).schedule(args.collection, args.id, { at: args.at });
754
+ output({ success: true }, args);
721
755
  consola$1.success(`Scheduled ${args.collection}/${args.id} for ${args.at}`);
722
756
  } catch (error) {
723
757
  consola$1.error(error instanceof Error ? error.message : "Unknown error");
@@ -747,6 +781,7 @@ const restoreCommand = defineCommand({
747
781
  configureOutputMode(args);
748
782
  try {
749
783
  await createClientFromArgs(args).restore(args.collection, args.id);
784
+ output({ success: true }, args);
750
785
  consola$1.success(`Restored ${args.collection}/${args.id}`);
751
786
  } catch (error) {
752
787
  consola$1.error(error instanceof Error ? error.message : "Unknown error");
@@ -1841,7 +1876,8 @@ const whoamiCommand = defineCommand({
1841
1876
  })
1842
1877
  });
1843
1878
  if (refreshRes.ok) {
1844
- const refreshed = await refreshRes.json();
1879
+ const json = await refreshRes.json();
1880
+ const refreshed = json.data && typeof json.data === "object" && "access_token" in json.data ? json.data : json;
1845
1881
  token = refreshed.access_token;
1846
1882
  saveCredentials(baseUrl, {
1847
1883
  ...cred,
@@ -2125,8 +2161,16 @@ const MAX_SCREENSHOTS = 5;
2125
2161
  const MAX_SCREENSHOT_WIDTH = 1920;
2126
2162
  const MAX_SCREENSHOT_HEIGHT = 1080;
2127
2163
  const ICON_SIZE = 256;
2128
- /** Matches require("node:xxx") / require("xxx") / import("node:xxx") in bundled output */
2129
- const NODE_BUILTIN_IMPORT_RE = /(?:import|require)\s*\(?["'](?:node:)?([a-z_]+)["']\)?/g;
2164
+ /**
2165
+ * Matches Node.js built-in imports in bundled output:
2166
+ * - require("node:xxx") / require("xxx")
2167
+ * - import("node:xxx") / import("xxx")
2168
+ * - import X from "node:xxx" / import { X } from "node:xxx"
2169
+ * - import * as X from "node:xxx"
2170
+ * - export { X } from "node:xxx"
2171
+ * Captures the base module name (e.g. "fs" from "node:fs/promises").
2172
+ */
2173
+ const NODE_BUILTIN_IMPORT_RE = /(?:import|export|require)\s*(?:\(|[^(]*?\bfrom\s+)["'](?:node:)?([a-z_]+)(?:\/[^"']*)?\s*["']\)?/g;
2130
2174
  const LEADING_DOT_SLASH_RE = /^\.\//;
2131
2175
  const DIST_PREFIX_RE = /^dist\//;
2132
2176
  const MJS_EXT_RE = /\.m?js$/;
@@ -2324,7 +2368,7 @@ async function createTarball(sourceDir, outputPath) {
2324
2368
  * 7. Create tarball ({id}-{version}.tar.gz)
2325
2369
  */
2326
2370
  var bundle_exports = /* @__PURE__ */ __exportAll({ bundleCommand: () => bundleCommand });
2327
- const TS_EXT_RE = /\.tsx?$/;
2371
+ const TS_EXT_RE = /\.(tsx?|[mc]?js)$/;
2328
2372
  const SLASH_RE = /\//g;
2329
2373
  const LEADING_AT_RE = /^@/;
2330
2374
  const emdash_SCOPE_RE = /^@emdash-cms\//;
@@ -2398,6 +2442,10 @@ const bundleCommand = defineCommand({
2398
2442
  const { build } = await import("tsdown");
2399
2443
  const tmpDir = join(pluginDir, ".emdash-bundle-tmp");
2400
2444
  try {
2445
+ await rm(tmpDir, {
2446
+ recursive: true,
2447
+ force: true
2448
+ });
2401
2449
  await mkdir(tmpDir, { recursive: true });
2402
2450
  const mainOutDir = join(tmpDir, "main");
2403
2451
  await build({
@@ -2615,8 +2663,18 @@ const bundleCommand = defineCommand({
2615
2663
  hasErrors = true;
2616
2664
  }
2617
2665
  }
2618
- if (manifest.capabilities.includes("network:fetch:any")) consola.warn("Plugin declares unrestricted network access (network:fetch:any) — it can make requests to any host");
2619
- else if (manifest.capabilities.includes("network:fetch") && manifest.allowedHosts.length === 0) consola.warn("Plugin declares network:fetch capability but no allowedHosts — all fetch requests will be blocked");
2666
+ const declaresUnrestricted = manifest.capabilities.includes("network:request:unrestricted") || manifest.capabilities.includes("network:fetch:any");
2667
+ const declaresHostRestricted = manifest.capabilities.includes("network:request") || manifest.capabilities.includes("network:fetch");
2668
+ if (declaresUnrestricted) consola.warn("Plugin declares unrestricted network access (network:request:unrestricted) — it can make requests to any host");
2669
+ else if (declaresHostRestricted && manifest.allowedHosts.length === 0) consola.warn("Plugin declares network:request capability but no allowedHosts — all requests will be blocked");
2670
+ const deprecatedCaps = manifest.capabilities.filter(isDeprecatedCapability);
2671
+ if (deprecatedCaps.length > 0) {
2672
+ consola.warn("Plugin uses deprecated capability names. Rename them before publishing:");
2673
+ for (const cap of deprecatedCaps) {
2674
+ const replacement = CAPABILITY_RENAMES[cap];
2675
+ consola.warn(` ${cap} → ${replacement}`);
2676
+ }
2677
+ }
2620
2678
  if (resolvedPlugin.admin?.portableTextBlocks && resolvedPlugin.admin.portableTextBlocks.length > 0) consola.warn("Plugin declares portableTextBlocks — these require trusted mode and will be ignored in sandboxed plugins");
2621
2679
  if (resolvedPlugin.admin?.entry) consola.warn("Plugin declares admin.entry — custom React components require trusted mode. Use Block Kit for sandboxed admin pages");
2622
2680
  if (resolvedPlugin.hooks["page:fragments"]) consola.warn("Plugin declares page:fragments hook — this is trusted-only and will not work in sandboxed mode");
@@ -3111,6 +3169,16 @@ const publishCommand = defineCommand({
3111
3169
  if (manifest.capabilities.length > 0) consola.info(`Capabilities: ${manifest.capabilities.join(", ")}`);
3112
3170
  if (manifest.allowedHosts?.length) consola.info(`Allowed hosts: ${manifest.allowedHosts.join(", ")}`);
3113
3171
  console.log();
3172
+ const deprecatedCaps = manifest.capabilities.filter(isDeprecatedCapability);
3173
+ if (deprecatedCaps.length > 0) {
3174
+ consola.error("Plugin declares deprecated capability names. Rename them and re-bundle before publishing:");
3175
+ for (const cap of deprecatedCaps) {
3176
+ const replacement = CAPABILITY_RENAMES[cap];
3177
+ consola.error(` ${cap} → ${replacement}`);
3178
+ }
3179
+ consola.error("See https://emdashcms.com/docs/plugins/overview#capabilities for the full rename table.");
3180
+ process.exit(1);
3181
+ }
3114
3182
  let token;
3115
3183
  const envToken = process.env.EMDASH_MARKETPLACE_TOKEN;
3116
3184
  const stored = !envToken ? getMarketplaceCredential(registryUrl) : null;
@@ -3568,6 +3636,134 @@ const searchCommand = defineCommand({
3568
3636
  }
3569
3637
  });
3570
3638
 
3639
+ //#endregion
3640
+ //#region src/cli/commands/secrets.ts
3641
+ /**
3642
+ * Secrets CLI commands
3643
+ *
3644
+ * Pure (no-DB) commands for working with EmDash secrets:
3645
+ *
3646
+ * - `emdash secrets generate` — emits a fresh `EMDASH_ENCRYPTION_KEY`.
3647
+ * Optionally writes it to `.dev.vars` (Workers) or `.env` (Node).
3648
+ * - `emdash secrets fingerprint <key>` — prints the kid for a key,
3649
+ * useful in CI for verifying what's been deployed without exposing
3650
+ * the raw value.
3651
+ *
3652
+ * DB-touching commands (`status`, `migrate`, `rotate`) live elsewhere:
3653
+ * the CLI process can't open the production D1/Postgres binding from
3654
+ * the operator's machine, so those operations ship as admin HTTP
3655
+ * endpoints in a later PR. A thin `--site <url>` wrapper for those
3656
+ * endpoints can land alongside.
3657
+ */
3658
+ const KEY_VAR_NAME = "EMDASH_ENCRYPTION_KEY";
3659
+ /** Matches a populated entry — `KEY=<at least one char>`. */
3660
+ const POPULATED_KEY_LINE_PATTERN = /^EMDASH_ENCRYPTION_KEY=.+$/m;
3661
+ /**
3662
+ * Matches any line starting `KEY=` including `KEY=` with empty value.
3663
+ * Used for in-place replacement when the entry exists but has no value.
3664
+ */
3665
+ const ANY_KEY_LINE_PATTERN = /^EMDASH_ENCRYPTION_KEY=.*$/m;
3666
+ /**
3667
+ * Append (or replace) `EMDASH_ENCRYPTION_KEY` in a dotenv-style file.
3668
+ *
3669
+ * Idempotent: if the entry exists with a populated value, leaves it alone
3670
+ * (returns `"skipped"`) unless `force` is set. An entry with an empty
3671
+ * value (`EMDASH_ENCRYPTION_KEY=`) is treated as "not set" and gets
3672
+ * replaced — placeholder lines aren't a reason to refuse.
3673
+ *
3674
+ * Always ends the resulting file with a trailing newline. Doesn't touch
3675
+ * other variables.
3676
+ *
3677
+ * Exported for tests.
3678
+ */
3679
+ function writeEncryptionKeyToFile(targetPath, value, force) {
3680
+ const existing = existsSync(targetPath) ? readFileSync(targetPath, "utf-8") : "";
3681
+ if (POPULATED_KEY_LINE_PATTERN.test(existing) && !force) return "skipped";
3682
+ const newLine = `${KEY_VAR_NAME}=${value}`;
3683
+ let next;
3684
+ if (ANY_KEY_LINE_PATTERN.test(existing)) {
3685
+ next = existing.replace(ANY_KEY_LINE_PATTERN, newLine);
3686
+ if (!next.endsWith("\n")) next += "\n";
3687
+ } else next = `${existing}${existing.length === 0 ? "" : existing.endsWith("\n") ? "" : "\n"}${newLine}\n`;
3688
+ writeFileSync(targetPath, next);
3689
+ return "wrote";
3690
+ }
3691
+ const generateCommand = defineCommand({
3692
+ meta: {
3693
+ name: "generate",
3694
+ description: "Generate a new EmDash encryption key"
3695
+ },
3696
+ args: {
3697
+ write: {
3698
+ type: "string",
3699
+ description: "Optional path to write the key to (e.g. .dev.vars or .env). Won't overwrite an existing entry without --force."
3700
+ },
3701
+ force: {
3702
+ type: "boolean",
3703
+ description: "When used with --write, overwrite an existing entry",
3704
+ default: false
3705
+ }
3706
+ },
3707
+ run({ args }) {
3708
+ const value = generateEncryptionKey();
3709
+ if (args.write) {
3710
+ if (writeEncryptionKeyToFile(resolve(process.cwd(), args.write), value, args.force) === "skipped") {
3711
+ consola$1.info(`${KEY_VAR_NAME} already set in ${pc.cyan(args.write)}; leaving it alone. Pass ${pc.bold("--force")} to replace it.`);
3712
+ return;
3713
+ }
3714
+ consola$1.log("");
3715
+ consola$1.log(`${pc.bold("Wrote")} ${pc.cyan(KEY_VAR_NAME)} to ${pc.cyan(args.write)}`);
3716
+ consola$1.log("");
3717
+ consola$1.log(pc.yellow("Keep this file out of version control. Losing the key means losing every secret encrypted with it."));
3718
+ consola$1.log("");
3719
+ return;
3720
+ }
3721
+ process.stdout.write(`${value}\n`);
3722
+ const guidance = [
3723
+ "",
3724
+ pc.bold("EmDash encryption key generated."),
3725
+ "",
3726
+ `Set ${pc.cyan(KEY_VAR_NAME)} in your environment.`,
3727
+ "For Cloudflare deployments, push it to your Worker's secrets.",
3728
+ "For Node deployments, add it to your process environment or .env file.",
3729
+ "",
3730
+ pc.yellow("Keep this value secret. Losing it means losing every secret encrypted with it."),
3731
+ ""
3732
+ ].join("\n");
3733
+ process.stderr.write(`${guidance}\n`);
3734
+ }
3735
+ });
3736
+ const fingerprintCommand = defineCommand({
3737
+ meta: {
3738
+ name: "fingerprint",
3739
+ description: "Print the kid (8-char fingerprint) for an encryption key"
3740
+ },
3741
+ args: { key: {
3742
+ type: "positional",
3743
+ description: "The full key value (with the emdash_enc_v1_ prefix)",
3744
+ required: true
3745
+ } },
3746
+ async run({ args }) {
3747
+ try {
3748
+ const kid = await fingerprintKey(args.key);
3749
+ process.stdout.write(`${kid}\n`);
3750
+ } catch (error) {
3751
+ consola$1.error(error instanceof EmDashSecretsError ? error.message : "Failed to fingerprint key");
3752
+ process.exit(1);
3753
+ }
3754
+ }
3755
+ });
3756
+ const secretsCommand = defineCommand({
3757
+ meta: {
3758
+ name: "secrets",
3759
+ description: "Manage EmDash secrets (generate, inspect)"
3760
+ },
3761
+ subCommands: {
3762
+ generate: generateCommand,
3763
+ fingerprint: fingerprintCommand
3764
+ }
3765
+ });
3766
+
3571
3767
  //#endregion
3572
3768
  //#region src/cli/commands/seed.ts
3573
3769
  /**
@@ -3930,7 +4126,8 @@ const typesCommand = defineCommand({
3930
4126
  * - dev: Run dev server with local D1
3931
4127
  * - seed: Apply a seed file to the database
3932
4128
  * - export-seed: Export database schema and content as a seed file
3933
- * - auth: Authentication utilities (secret generation)
4129
+ * - secrets: Generate and inspect EmDash secrets (encryption keys, etc.)
4130
+ * - auth: [DEPRECATED] Generate auth secret (use `secrets` instead)
3934
4131
  * - login/logout/whoami: Session management
3935
4132
  * - content: Create, read, update, delete content
3936
4133
  * - schema: Manage collections and fields
@@ -3953,6 +4150,7 @@ runMain(defineCommand({
3953
4150
  doctor: doctorCommand,
3954
4151
  seed: seedCommand,
3955
4152
  "export-seed": exportSeedCommand,
4153
+ secrets: secretsCommand,
3956
4154
  auth: authCommand,
3957
4155
  login: loginCommand,
3958
4156
  logout: logoutCommand,