@velora-cms/server 0.11.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.
- package/LICENSE +202 -0
- package/README.md +65 -0
- package/dist/admin-bundle/assets/__virtual_mf___mfe_internal__velora_admin__mf_owner__1__loadShare__react__loadShare__.js_commonjs-proxy-Ng0fOpdU.js +1 -0
- package/dist/admin-bundle/assets/__virtual_mf___mfe_internal__velora_admin__mf_owner__1__loadShare__react_mf_2_dom__loadShare__.js_commonjs-proxy-oc1i_iBU.js +9 -0
- package/dist/admin-bundle/assets/_virtual_mf-localSharedImportMap___mfe_internal__velora_admin__mf_owner__1-DOKdWYyj.js +1 -0
- package/dist/admin-bundle/assets/_virtual_mf___mfe_internal__velora_admin__mf_owner__1__loadShare___mf_0_velora_mf_2_cms_mf_1_plugin_mf_2_sdk__loadShare__.js-C1-ZAxwO.js +2 -0
- package/dist/admin-bundle/assets/_virtual_mf___mfe_internal__velora_admin__mf_owner__1__loadShare__react__loadShare__.js-BuUBskgj.js +9 -0
- package/dist/admin-bundle/assets/_virtual_mf___mfe_internal__velora_admin__mf_owner__1__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DMaku-HC.js +9 -0
- package/dist/admin-bundle/assets/_virtual_mf___mfe_internal__velora_admin__mf_owner__1__loadShare__react_mf_2_dom__loadShare__.js-DYfqn12F.js +1 -0
- package/dist/admin-bundle/assets/_virtual_mf___mfe_internal__velora_admin__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-BPoj3DC9.js +25 -0
- package/dist/admin-bundle/assets/content-trash.schema-DfXHkC-w.js +72 -0
- package/dist/admin-bundle/assets/hostInit--C4xK6nj.js +1 -0
- package/dist/admin-bundle/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-arabic-arabic-400-normal-CyU-ddYS.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-arabic-arabic-400-normal-EA1o-u_Q.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-arabic-arabic-500-normal-C4MQITzh.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-arabic-arabic-500-normal-DPXcppbm.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-arabic-arabic-600-normal-0pRdybE_.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-arabic-arabic-600-normal-MJZ0liF5.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-arabic-latin-400-normal-Bo5KPYvw.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-arabic-latin-400-normal-CFZh1unN.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-arabic-latin-500-normal-BletK1Hp.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-arabic-latin-500-normal-Cd6jVIg7.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-arabic-latin-600-normal-Dk5eISD_.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-arabic-latin-600-normal-KrqB56Mw.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-arabic-latin-ext-400-normal-BeVLg08x.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-arabic-latin-ext-400-normal-BpLfq-63.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-arabic-latin-ext-500-normal-Ck_W4G78.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-arabic-latin-ext-500-normal-eJxPnL1P.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-arabic-latin-ext-600-normal-DT29Q8HW.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-arabic-latin-ext-600-normal-DjDAeNQD.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-cyrillic-400-normal-BTotfTJu.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-cyrillic-400-normal-DZqxrq2p.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-cyrillic-500-normal-ByOcLdNv.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-cyrillic-500-normal-CocWQlwt.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-cyrillic-600-normal-71GNu3SW.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-cyrillic-600-normal-BGq0mW3O.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-cyrillic-ext-400-normal-Dsrv2Tcn.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-cyrillic-ext-400-normal-g30qAdWV.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-cyrillic-ext-500-normal-Cs5J6C77.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-cyrillic-ext-500-normal-DB5PtV2g.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-cyrillic-ext-600-normal-Bz0x94Yp.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-cyrillic-ext-600-normal-DUMzJB7m.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-greek-400-normal-D9ESIMu3.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-greek-400-normal-_efipK4i.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-greek-500-normal-CuWXN6rf.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-greek-500-normal-JMMifIXV.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-greek-600-normal-D-CqTdkO.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-greek-600-normal-DzTrcv_p.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-latin-400-normal-CDDApCn2.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-latin-400-normal-CYLoc0-x.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-latin-500-normal-6ng42L7E.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-latin-500-normal-BgVn5rGT.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-latin-600-normal-Cu4Hd6ag.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-latin-600-normal-CuJfVYMP.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-latin-ext-400-normal-C5H60-Va.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-latin-ext-400-normal-RBey6euL.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-latin-ext-500-normal-D0aIdm-b.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-latin-ext-500-normal-DakdToA3.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-latin-ext-600-normal-DIrixKbi.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-latin-ext-600-normal-DOrvGEcy.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-vietnamese-400-normal-DG4YqDda.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-vietnamese-400-normal-fK1oJ5dG.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-vietnamese-500-normal-BEb3_waV.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-vietnamese-500-normal-e4dixQRQ.woff2 +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-vietnamese-600-normal-DgdngZtN.woff +0 -0
- package/dist/admin-bundle/assets/ibm-plex-sans-vietnamese-600-normal-DpPYBSTl.woff2 +0 -0
- package/dist/admin-bundle/assets/index-BIAF0ShP.js +542 -0
- package/dist/admin-bundle/assets/index-DhMY-0sC.js +148 -0
- package/dist/admin-bundle/assets/index-DnZV_gsg.css +1 -0
- package/dist/admin-bundle/assets/index-Do71v6NZ.js +7 -0
- package/dist/admin-bundle/assets/literata-cyrillic-ext-opsz-italic-5yUt4G_9.woff2 +0 -0
- package/dist/admin-bundle/assets/literata-cyrillic-ext-opsz-normal-C5tfwALZ.woff2 +0 -0
- package/dist/admin-bundle/assets/literata-cyrillic-opsz-italic-Bj0ndbyp.woff2 +0 -0
- package/dist/admin-bundle/assets/literata-cyrillic-opsz-normal-DgmypKXX.woff2 +0 -0
- package/dist/admin-bundle/assets/literata-greek-ext-opsz-italic-DFpO5j-Z.woff2 +0 -0
- package/dist/admin-bundle/assets/literata-greek-ext-opsz-normal-DGm64vGR.woff2 +0 -0
- package/dist/admin-bundle/assets/literata-greek-opsz-italic-CHERNRFq.woff2 +0 -0
- package/dist/admin-bundle/assets/literata-greek-opsz-normal-DFglUmAd.woff2 +0 -0
- package/dist/admin-bundle/assets/literata-latin-ext-opsz-italic-4y8iAqqs.woff2 +0 -0
- package/dist/admin-bundle/assets/literata-latin-ext-opsz-normal-STiTPs0F.woff2 +0 -0
- package/dist/admin-bundle/assets/literata-latin-opsz-italic-CJ93D38p.woff2 +0 -0
- package/dist/admin-bundle/assets/literata-latin-opsz-normal-BHZsWIlc.woff2 +0 -0
- package/dist/admin-bundle/assets/literata-vietnamese-opsz-italic-BdcrZMcO.woff2 +0 -0
- package/dist/admin-bundle/assets/literata-vietnamese-opsz-normal-Gqw5JQlq.woff2 +0 -0
- package/dist/admin-bundle/assets/mf-entry-bootstrap-0-aef015cd.js +41 -0
- package/dist/admin-bundle/assets/remoteEntry-CNyN68bc.js +14 -0
- package/dist/admin-bundle/assets/virtualExposes-BDCSo5OS.js +1 -0
- package/dist/admin-bundle/assets/vite-preload-helper-Cgledu0r.js +1 -0
- package/dist/admin-bundle/index.html +16 -0
- package/dist/app.d.ts +8 -0
- package/dist/app.js +252 -0
- package/dist/auth/api-content-author.d.ts +2 -0
- package/dist/auth/api-content-author.js +27 -0
- package/dist/auth/api-keys.d.ts +7 -0
- package/dist/auth/api-keys.js +85 -0
- package/dist/auth/jwt-payload.d.ts +16 -0
- package/dist/auth/jwt-payload.js +1 -0
- package/dist/auth/preview-tokens.d.ts +7 -0
- package/dist/auth/preview-tokens.js +76 -0
- package/dist/auth/rate-limit.d.ts +16 -0
- package/dist/auth/rate-limit.js +283 -0
- package/dist/auth/require-auth.d.ts +4 -0
- package/dist/auth/require-auth.js +28 -0
- package/dist/auth/route-rate-limits.d.ts +31 -0
- package/dist/auth/route-rate-limits.js +155 -0
- package/dist/auth/tokens.d.ts +15 -0
- package/dist/auth/tokens.js +38 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +6 -0
- package/dist/boot/core-migration-gate.d.ts +12 -0
- package/dist/boot/core-migration-gate.js +52 -0
- package/dist/boot/resolve-boot-mode.d.ts +6 -0
- package/dist/boot/resolve-boot-mode.js +206 -0
- package/dist/bundled-templates/com.velora.blog/manifest.json +39 -0
- package/dist/bundled-templates/com.velora.blog/package.tar.gz +0 -0
- package/dist/bundled-templates/com.velora.blog/sample-content.json +14 -0
- package/dist/config/admin-ui.d.ts +1 -0
- package/dist/config/admin-ui.js +10 -0
- package/dist/config/cors.d.ts +7 -0
- package/dist/config/cors.js +53 -0
- package/dist/config/env-file-path.d.ts +2 -0
- package/dist/config/env-file-path.js +22 -0
- package/dist/config/graphql-limits.d.ts +2 -0
- package/dist/config/graphql-limits.js +26 -0
- package/dist/config/headless.d.ts +1 -0
- package/dist/config/headless.js +8 -0
- package/dist/config/license-revalidation.d.ts +2 -0
- package/dist/config/license-revalidation.js +16 -0
- package/dist/config/load-env.d.ts +1 -0
- package/dist/config/load-env.js +53 -0
- package/dist/config/marketplace.d.ts +11 -0
- package/dist/config/marketplace.js +19 -0
- package/dist/config/preview.d.ts +3 -0
- package/dist/config/preview.js +39 -0
- package/dist/config/public-docs.d.ts +1 -0
- package/dist/config/public-docs.js +9 -0
- package/dist/config/site.d.ts +7 -0
- package/dist/config/site.js +12 -0
- package/dist/config/trust-proxy.d.ts +2 -0
- package/dist/config/trust-proxy.js +42 -0
- package/dist/data-types/validate-data-type-settings.d.ts +1 -0
- package/dist/data-types/validate-data-type-settings.js +33 -0
- package/dist/db/content-db.d.ts +16 -0
- package/dist/db/content-db.js +109 -0
- package/dist/db/core-migrations/index.d.ts +14 -0
- package/dist/db/core-migrations/index.js +184 -0
- package/dist/db/core-migrations/steps.d.ts +4 -0
- package/dist/db/core-migrations/steps.js +66 -0
- package/dist/db/load-prisma-client.d.ts +2 -0
- package/dist/db/load-prisma-client.js +44 -0
- package/dist/db/prisma.d.ts +3 -0
- package/dist/db/prisma.js +67 -0
- package/dist/db/resolve-client-dir.d.ts +2 -0
- package/dist/db/resolve-client-dir.js +83 -0
- package/dist/docs/filter-public-api-spec.d.ts +2 -0
- package/dist/docs/filter-public-api-spec.js +52 -0
- package/dist/docs-bundle/404.html +41 -0
- package/dist/docs-bundle/_astro/MobileTableOfContents.astro_astro_type_script_index_0_lang.BcSo_yiZ.js +1 -0
- package/dist/docs-bundle/_astro/Search.astro_astro_type_script_index_0_lang.CavldbAs.js +1 -0
- package/dist/docs-bundle/_astro/TableOfContents.astro_astro_type_script_index_0_lang.Csloo1VZ.js +1 -0
- package/dist/docs-bundle/_astro/common.DTXA7sXM.css +3 -0
- package/dist/docs-bundle/_astro/ec.0vx5m.js +3 -0
- package/dist/docs-bundle/_astro/ec.w36nc.css +1 -0
- package/dist/docs-bundle/_astro/page.Dwipeu-R.js +1 -0
- package/dist/docs-bundle/_astro/print.ehPL0gv-.css +1 -0
- package/dist/docs-bundle/_astro/starlight-toc.CTCQXEge.js +1 -0
- package/dist/docs-bundle/_astro/ui-core.D-7Scnhs.js +2 -0
- package/dist/docs-bundle/favicon.svg +1 -0
- package/dist/docs-bundle/index.html +1 -0
- package/dist/docs-bundle/pagefind/fragment/en_18a36d7.pf_fragment +0 -0
- package/dist/docs-bundle/pagefind/fragment/en_1d9eb24.pf_fragment +0 -0
- package/dist/docs-bundle/pagefind/fragment/en_1ef320c.pf_fragment +0 -0
- package/dist/docs-bundle/pagefind/fragment/en_3099406.pf_fragment +0 -0
- package/dist/docs-bundle/pagefind/fragment/en_4a5b6fe.pf_fragment +0 -0
- package/dist/docs-bundle/pagefind/fragment/en_9aa652e.pf_fragment +0 -0
- package/dist/docs-bundle/pagefind/fragment/en_baccdf6.pf_fragment +0 -0
- package/dist/docs-bundle/pagefind/fragment/en_d81f3fe.pf_fragment +0 -0
- package/dist/docs-bundle/pagefind/fragment/en_d855550.pf_fragment +0 -0
- package/dist/docs-bundle/pagefind/fragment/en_e6d88d8.pf_fragment +0 -0
- package/dist/docs-bundle/pagefind/fragment/en_e9d3189.pf_fragment +0 -0
- package/dist/docs-bundle/pagefind/index/en_5feeed7.pf_index +0 -0
- package/dist/docs-bundle/pagefind/index/en_c6981f9.pf_index +0 -0
- package/dist/docs-bundle/pagefind/index/en_ce4f6bf.pf_index +0 -0
- package/dist/docs-bundle/pagefind/pagefind-component-ui.css +1509 -0
- package/dist/docs-bundle/pagefind/pagefind-component-ui.js +56 -0
- package/dist/docs-bundle/pagefind/pagefind-entry.json +1 -0
- package/dist/docs-bundle/pagefind/pagefind-highlight.js +1070 -0
- package/dist/docs-bundle/pagefind/pagefind-modular-ui.css +214 -0
- package/dist/docs-bundle/pagefind/pagefind-modular-ui.js +8 -0
- package/dist/docs-bundle/pagefind/pagefind-ui.css +1 -0
- package/dist/docs-bundle/pagefind/pagefind-ui.js +2 -0
- package/dist/docs-bundle/pagefind/pagefind-worker.js +6 -0
- package/dist/docs-bundle/pagefind/pagefind.en_1e94abd852.pf_meta +0 -0
- package/dist/docs-bundle/pagefind/pagefind.js +6 -0
- package/dist/docs-bundle/pagefind/wasm.en.pagefind +0 -0
- package/dist/docs-bundle/pagefind/wasm.unknown.pagefind +0 -0
- package/dist/docs-bundle/v1/index.html +86 -0
- package/dist/docs-bundle/v1/using-velora/build-a-headless-frontend/index.html +413 -0
- package/dist/docs-bundle/v1/using-velora/content-model/index.html +858 -0
- package/dist/docs-bundle/v1/using-velora/editing/index.html +748 -0
- package/dist/docs-bundle/v1/using-velora/getting-started/index.html +588 -0
- package/dist/docs-bundle/v1/using-velora/headless-api/index.html +1620 -0
- package/dist/docs-bundle/v1/using-velora/index.html +215 -0
- package/dist/docs-bundle/v1/using-velora/installation/index.html +886 -0
- package/dist/docs-bundle/v1/using-velora/installing-plugins/index.html +836 -0
- package/dist/docs-bundle/v1/using-velora/media/index.html +468 -0
- package/dist/docs-bundle/v1/using-velora/users-and-roles/index.html +561 -0
- package/dist/graphql/field-count-rule.d.ts +5 -0
- package/dist/graphql/field-count-rule.js +59 -0
- package/dist/graphql/schema.d.ts +12 -0
- package/dist/graphql/schema.js +330 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +180 -0
- package/dist/lib.d.ts +2 -0
- package/dist/lib.js +39 -0
- package/dist/marketplace/install-bundle-members.d.ts +33 -0
- package/dist/marketplace/install-bundle-members.js +137 -0
- package/dist/marketplace/install-from-marketplace.d.ts +60 -0
- package/dist/marketplace/install-from-marketplace.js +581 -0
- package/dist/marketplace/license-revalidation-job.d.ts +38 -0
- package/dist/marketplace/license-revalidation-job.js +139 -0
- package/dist/marketplace/marketplace-client.d.ts +43 -0
- package/dist/marketplace/marketplace-client.js +228 -0
- package/dist/marketplace/revalidate-license.d.ts +39 -0
- package/dist/marketplace/revalidate-license.js +103 -0
- package/dist/media/media-service.d.ts +36 -0
- package/dist/media/media-service.js +162 -0
- package/dist/plugins/boot-plugin-loader.d.ts +32 -0
- package/dist/plugins/boot-plugin-loader.js +57 -0
- package/dist/plugins/hook-dispatcher.d.ts +13 -0
- package/dist/plugins/hook-dispatcher.js +68 -0
- package/dist/plugins/install-built-package.d.ts +36 -0
- package/dist/plugins/install-built-package.js +199 -0
- package/dist/plugins/install-package-tarball.d.ts +25 -0
- package/dist/plugins/install-package-tarball.js +73 -0
- package/dist/plugins/plugin-context.d.ts +5 -0
- package/dist/plugins/plugin-context.js +26 -0
- package/dist/plugins/plugin-package-store.d.ts +31 -0
- package/dist/plugins/plugin-package-store.js +64 -0
- package/dist/plugins/plugin-registry-service.d.ts +227 -0
- package/dist/plugins/plugin-registry-service.js +636 -0
- package/dist/plugins/seed-template-content.d.ts +23 -0
- package/dist/plugins/seed-template-content.js +198 -0
- package/dist/plugins/server-serializers.d.ts +3 -0
- package/dist/plugins/server-serializers.js +16 -0
- package/dist/plugins/simple-storage-api.d.ts +9 -0
- package/dist/plugins/simple-storage-api.js +26 -0
- package/dist/plugins/snapshot-groups.d.ts +16 -0
- package/dist/plugins/snapshot-groups.js +81 -0
- package/dist/plugins/structured-query-builder.d.ts +21 -0
- package/dist/plugins/structured-query-builder.js +60 -0
- package/dist/plugins/structured-snapshot-service.d.ts +16 -0
- package/dist/plugins/structured-snapshot-service.js +286 -0
- package/dist/plugins/structured-storage-api.d.ts +22 -0
- package/dist/plugins/structured-storage-api.js +91 -0
- package/dist/plugins/structured-storage-transaction.d.ts +22 -0
- package/dist/plugins/structured-storage-transaction.js +63 -0
- package/dist/plugins/structured-table-naming.d.ts +1 -0
- package/dist/plugins/structured-table-naming.js +18 -0
- package/dist/plugins/trusted-keys.d.ts +11 -0
- package/dist/plugins/trusted-keys.js +67 -0
- package/dist/plugins/trusted-signing-keys.d.ts +27 -0
- package/dist/plugins/trusted-signing-keys.js +40 -0
- package/dist/plugins/uninstall-bundle.d.ts +29 -0
- package/dist/plugins/uninstall-bundle.js +150 -0
- package/dist/plugins/verify-package.d.ts +36 -0
- package/dist/plugins/verify-package.js +121 -0
- package/dist/routes/admin-static.d.ts +8 -0
- package/dist/routes/admin-static.js +196 -0
- package/dist/routes/api-keys.d.ts +2 -0
- package/dist/routes/api-keys.js +95 -0
- package/dist/routes/api-playground.d.ts +2 -0
- package/dist/routes/api-playground.js +21 -0
- package/dist/routes/auth.d.ts +2 -0
- package/dist/routes/auth.js +102 -0
- package/dist/routes/content.d.ts +3 -0
- package/dist/routes/content.js +471 -0
- package/dist/routes/data-types.d.ts +3 -0
- package/dist/routes/data-types.js +100 -0
- package/dist/routes/docs-static.d.ts +8 -0
- package/dist/routes/docs-static.js +137 -0
- package/dist/routes/document-types.d.ts +3 -0
- package/dist/routes/document-types.js +149 -0
- package/dist/routes/headless-bridge.d.ts +10 -0
- package/dist/routes/headless-bridge.js +207 -0
- package/dist/routes/health.d.ts +2 -0
- package/dist/routes/health.js +15 -0
- package/dist/routes/marketplace-proxy.d.ts +8 -0
- package/dist/routes/marketplace-proxy.js +135 -0
- package/dist/routes/media.d.ts +6 -0
- package/dist/routes/media.js +93 -0
- package/dist/routes/plugin-api-routes.d.ts +12 -0
- package/dist/routes/plugin-api-routes.js +224 -0
- package/dist/routes/plugin-assets.d.ts +8 -0
- package/dist/routes/plugin-assets.js +51 -0
- package/dist/routes/plugin-management.d.ts +7 -0
- package/dist/routes/plugin-management.js +525 -0
- package/dist/routes/plugin-storage.d.ts +8 -0
- package/dist/routes/plugin-storage.js +104 -0
- package/dist/routes/plugins.d.ts +2 -0
- package/dist/routes/plugins.js +36 -0
- package/dist/routes/public-api.d.ts +9 -0
- package/dist/routes/public-api.js +545 -0
- package/dist/routes/published-item.d.ts +57 -0
- package/dist/routes/published-item.js +236 -0
- package/dist/routes/setup.d.ts +9 -0
- package/dist/routes/setup.js +477 -0
- package/dist/routes/snapshots.d.ts +3 -0
- package/dist/routes/snapshots.js +65 -0
- package/dist/routes/templates.d.ts +3 -0
- package/dist/routes/templates.js +37 -0
- package/dist/routes/themes.d.ts +2 -0
- package/dist/routes/themes.js +30 -0
- package/dist/routes/users.d.ts +2 -0
- package/dist/routes/users.js +113 -0
- package/dist/sandbox/register-local-plugin.d.ts +36 -0
- package/dist/sandbox/register-local-plugin.js +108 -0
- package/dist/sandbox/seed-sandbox.d.ts +20 -0
- package/dist/sandbox/seed-sandbox.js +122 -0
- package/dist/scripts/copy-admin-bundle.d.ts +1 -0
- package/dist/scripts/copy-admin-bundle.js +24 -0
- package/dist/scripts/copy-docs-bundle.d.ts +1 -0
- package/dist/scripts/copy-docs-bundle.js +22 -0
- package/dist/scripts/create-api-key.d.ts +5 -0
- package/dist/scripts/create-api-key.js +56 -0
- package/dist/scripts/generate-prisma-clients.d.ts +6 -0
- package/dist/scripts/generate-prisma-clients.js +125 -0
- package/dist/scripts/pack-bundled-templates.d.ts +1 -0
- package/dist/scripts/pack-bundled-templates.js +87 -0
- package/dist/setup/build-connection-string.d.ts +19 -0
- package/dist/setup/build-connection-string.js +14 -0
- package/dist/setup/bundled-templates.d.ts +19 -0
- package/dist/setup/bundled-templates.js +121 -0
- package/dist/setup/ensure-prisma-client.d.ts +3 -0
- package/dist/setup/ensure-prisma-client.js +23 -0
- package/dist/setup/install-starter.d.ts +14 -0
- package/dist/setup/install-starter.js +76 -0
- package/dist/setup/normalize-database-url.d.ts +2 -0
- package/dist/setup/normalize-database-url.js +35 -0
- package/dist/setup/persist-env-config.d.ts +2 -0
- package/dist/setup/persist-env-config.js +63 -0
- package/dist/setup/provision-database.d.ts +2 -0
- package/dist/setup/provision-database.js +89 -0
- package/dist/setup-app.d.ts +4 -0
- package/dist/setup-app.js +43 -0
- package/package.json +96 -0
- package/prisma/schema.prisma +303 -0
package/package.json
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@velora-cms/server",
|
|
3
|
+
"version": "0.11.0",
|
|
4
|
+
"engines": {
|
|
5
|
+
"node": ">=22.12"
|
|
6
|
+
},
|
|
7
|
+
"private": false,
|
|
8
|
+
"description": "Velora CMS server — API, admin UI at /velora, browser setup wizard",
|
|
9
|
+
"license": "Apache-2.0",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"bin": {
|
|
12
|
+
"velora-server": "./dist/bin.js"
|
|
13
|
+
},
|
|
14
|
+
"main": "./dist/lib.js",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": "./dist/lib.js",
|
|
17
|
+
"./package.json": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"!dist/prisma-clients",
|
|
22
|
+
"!dist/**/*.test.*",
|
|
23
|
+
"prisma/schema.prisma",
|
|
24
|
+
"README.md"
|
|
25
|
+
],
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/velora-cms/velora.git",
|
|
29
|
+
"directory": "apps/server"
|
|
30
|
+
},
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://github.com/velora-cms/velora/issues"
|
|
33
|
+
},
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@aws-sdk/client-s3": "3.1079.0",
|
|
39
|
+
"@aws-sdk/s3-request-presigner": "3.1079.0",
|
|
40
|
+
"@fastify/cookie": "11.0.2",
|
|
41
|
+
"@fastify/cors": "11.1.0",
|
|
42
|
+
"@fastify/jwt": "10.1.0",
|
|
43
|
+
"@fastify/multipart": "10.0.0",
|
|
44
|
+
"@fastify/rate-limit": "10.3.0",
|
|
45
|
+
"@fastify/static": "10.1.3",
|
|
46
|
+
"@fastify/swagger": "9.7.0",
|
|
47
|
+
"@fastify/swagger-ui": "6.1.1",
|
|
48
|
+
"@lukeed/ms": "2.0.2",
|
|
49
|
+
"@pothos/core": "4.13.1",
|
|
50
|
+
"@prisma/client": "6.19.3",
|
|
51
|
+
"ajv": "8.20.0",
|
|
52
|
+
"bcrypt": "6.0.0",
|
|
53
|
+
"dotenv": "17.2.3",
|
|
54
|
+
"fastify": "5.8.5",
|
|
55
|
+
"fastify-type-provider-zod": "6.1.0",
|
|
56
|
+
"graphql": "16.14.2",
|
|
57
|
+
"graphql-scalars": "1.25.0",
|
|
58
|
+
"mercurius": "16.10.0",
|
|
59
|
+
"prisma": "6.19.3",
|
|
60
|
+
"zod": "4.4.3",
|
|
61
|
+
"@velora-cms/content-service": "0.11.0",
|
|
62
|
+
"@velora-cms/api-schemas": "0.11.0",
|
|
63
|
+
"@velora-cms/db-adapter": "0.11.0",
|
|
64
|
+
"@velora-cms/design-tokens": "0.11.0",
|
|
65
|
+
"@velora-cms/plugin-package": "0.11.0",
|
|
66
|
+
"@velora-cms/plugin-sdk": "0.11.0",
|
|
67
|
+
"@velora-cms/prisma-variants": "0.11.0"
|
|
68
|
+
},
|
|
69
|
+
"devDependencies": {
|
|
70
|
+
"@types/autocannon": "7.12.7",
|
|
71
|
+
"@types/bcrypt": "6.0.0",
|
|
72
|
+
"@types/node": "20.19.43",
|
|
73
|
+
"autocannon": "8.0.0",
|
|
74
|
+
"dotenv-cli": "11.0.0",
|
|
75
|
+
"form-data": "4.0.6",
|
|
76
|
+
"tar": "^7.5.22",
|
|
77
|
+
"tsx": "4.22.4",
|
|
78
|
+
"@velora-cms/docs": "0.1.0",
|
|
79
|
+
"create-velora-plugin": "0.11.0",
|
|
80
|
+
"@velora-cms/admin-ui": "0.1.0",
|
|
81
|
+
"@velora-cms/google-maps": "0.1.0",
|
|
82
|
+
"velora-plugin": "0.11.0",
|
|
83
|
+
"@velora-cms/reading-time": "0.1.0"
|
|
84
|
+
},
|
|
85
|
+
"scripts": {
|
|
86
|
+
"build": "prisma generate && tsc -p . && node dist/scripts/generate-prisma-clients.js && node dist/scripts/copy-docs-bundle.js && node dist/scripts/copy-admin-bundle.js && node dist/scripts/pack-bundled-templates.js",
|
|
87
|
+
"pack-templates": "tsx src/scripts/pack-bundled-templates.ts",
|
|
88
|
+
"start": "node dist/index.js",
|
|
89
|
+
"dev": "dotenv -e ../../.env -- tsx watch src/index.ts",
|
|
90
|
+
"test": "dotenv -e ../../.env -- vitest run",
|
|
91
|
+
"prisma:generate": "dotenv -e ../../.env -- prisma generate",
|
|
92
|
+
"prisma:migrate:dev": "dotenv -e ../../.env -- prisma migrate dev",
|
|
93
|
+
"perf:seed": "dotenv -e ../../.env -- tsx perf/seed-perf.ts",
|
|
94
|
+
"bench": "dotenv -e ../../.env -- tsx perf/bench.ts"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
// Prisma covers only the standard, non-performance-critical tables
|
|
2
|
+
// (the Two-Tier ORM Strategy). Content nodes and
|
|
3
|
+
// anything tree/versioning related go through the custom DatabaseAdapter
|
|
4
|
+
// in packages/db-adapter instead — never through this schema.
|
|
5
|
+
|
|
6
|
+
generator client {
|
|
7
|
+
provider = "prisma-client-js"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
datasource db {
|
|
11
|
+
provider = "postgresql"
|
|
12
|
+
url = env("DATABASE_URL")
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Lowercase enum values on purpose — they match the API wire format
|
|
16
|
+
// ('admin' | 'editor', UserRoleSchema in @velora/api-schemas) so no
|
|
17
|
+
// mapping layer is needed anywhere.
|
|
18
|
+
enum Role {
|
|
19
|
+
admin
|
|
20
|
+
editor
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
model User {
|
|
24
|
+
id String @id @default(uuid())
|
|
25
|
+
email String @unique
|
|
26
|
+
passwordHash String @map("password_hash")
|
|
27
|
+
name String?
|
|
28
|
+
role Role @default(editor)
|
|
29
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
30
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
31
|
+
sessions Session[]
|
|
32
|
+
mediaFiles MediaFile[]
|
|
33
|
+
|
|
34
|
+
@@map("users")
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
model Session {
|
|
38
|
+
id String @id @default(uuid())
|
|
39
|
+
userId String @map("user_id")
|
|
40
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
41
|
+
refreshTokenHash String @unique @map("refresh_token_hash")
|
|
42
|
+
expiresAt DateTime @map("expires_at")
|
|
43
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
44
|
+
revokedAt DateTime? @map("revoked_at")
|
|
45
|
+
|
|
46
|
+
@@index([userId])
|
|
47
|
+
@@map("sessions")
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
model Setting {
|
|
51
|
+
key String @id
|
|
52
|
+
value Json
|
|
53
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
54
|
+
|
|
55
|
+
@@map("settings")
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
model MediaFile {
|
|
59
|
+
id String @id @default(uuid())
|
|
60
|
+
filename String
|
|
61
|
+
mimeType String @map("mime_type")
|
|
62
|
+
size Int
|
|
63
|
+
// Object key inside the S3 bucket — what upload/download/delete address.
|
|
64
|
+
// `url` is the canonical object URL persisted for API responses; actual
|
|
65
|
+
// downloads go through presigned URLs generated from the key.
|
|
66
|
+
storageKey String @unique @map("storage_key")
|
|
67
|
+
url String
|
|
68
|
+
uploadedBy String @map("uploaded_by")
|
|
69
|
+
uploader User @relation(fields: [uploadedBy], references: [id])
|
|
70
|
+
uploadedAt DateTime @default(now()) @map("uploaded_at")
|
|
71
|
+
|
|
72
|
+
@@index([uploadedBy])
|
|
73
|
+
@@map("media_files")
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
model PluginRegistry {
|
|
77
|
+
id String @id @default(uuid())
|
|
78
|
+
pluginId String @unique @map("plugin_id")
|
|
79
|
+
name String
|
|
80
|
+
type String
|
|
81
|
+
version String
|
|
82
|
+
// 'verified' | 'unverified' — the Trust model's two tiers. Real
|
|
83
|
+
// signature verification arrives with the Month 11 marketplace; until
|
|
84
|
+
// then every install records 'unverified' (also correct for local/dev
|
|
85
|
+
// plugins, which are unsigned by definition).
|
|
86
|
+
trustTier String @default("unverified") @map("trust_tier")
|
|
87
|
+
// 'simple' | 'structured' — persisted at install because uninstall only
|
|
88
|
+
// has this row, and the snapshot-before-uninstall rule (database.md)
|
|
89
|
+
// must be answerable without the manifest object.
|
|
90
|
+
storageType String @map("storage_type")
|
|
91
|
+
enabled Boolean @default(false)
|
|
92
|
+
settings Json?
|
|
93
|
+
// Dev-mode/sideloaded plugins' Module Federation remoteEntry.js URL —
|
|
94
|
+
// set by the local-plugin register script (velora-dev, Session 79).
|
|
95
|
+
// Marketplace-installed plugins will get their own remote-hosting story
|
|
96
|
+
// later; null here just means "no known remote to boot-load."
|
|
97
|
+
remoteUrl String? @map("remote_url")
|
|
98
|
+
// Where the installed package lives in the managed plugin store
|
|
99
|
+
// (Session 122) — the boot loader imports server/plugin.js from here
|
|
100
|
+
// on every restart. Null = no stored package: velora-dev live-source
|
|
101
|
+
// plugins, which the sandbox re-registers on each start.
|
|
102
|
+
packagePath String? @map("package_path")
|
|
103
|
+
installedAt DateTime @default(now()) @map("installed_at")
|
|
104
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
105
|
+
|
|
106
|
+
@@map("plugin_registry")
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Tracks which of a plugin's declared migrations have been applied, so
|
|
110
|
+
// uninstall (which only has the PluginRegistry row's storageType, not
|
|
111
|
+
// necessarily the manifest — see attachManifest) can look up rollback
|
|
112
|
+
// targets by id even across a server restart. No @relation to
|
|
113
|
+
// PluginRegistry: migrations run and get recorded BEFORE the
|
|
114
|
+
// PluginRegistry row exists (install() runs them as the last gate
|
|
115
|
+
// before row creation), so a DB-level FK would fail at write time.
|
|
116
|
+
model PluginMigrationRecord {
|
|
117
|
+
id String @id @default(uuid())
|
|
118
|
+
pluginId String @map("plugin_id")
|
|
119
|
+
migrationId String @map("migration_id")
|
|
120
|
+
appliedAt DateTime @default(now()) @map("applied_at")
|
|
121
|
+
|
|
122
|
+
@@unique([pluginId, migrationId])
|
|
123
|
+
@@index([pluginId])
|
|
124
|
+
@@map("plugin_migration_records")
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Tracks which structured-storage tables (StructuredStorageAPI.defineTable,
|
|
128
|
+
// Month 8 Session 85) belong to which plugin — physicalTableName is the
|
|
129
|
+
// namespaced/hashed name actually created via DatabaseAdapter.createTable,
|
|
130
|
+
// distinct from tableName (the logical name the plugin itself declared).
|
|
131
|
+
// Session 87's snapshot-before-uninstall reads this to know what to
|
|
132
|
+
// snapshot. No @relation to PluginRegistry, same reasoning as
|
|
133
|
+
// PluginMigrationRecord above.
|
|
134
|
+
model PluginStructuredTable {
|
|
135
|
+
id String @id @default(uuid())
|
|
136
|
+
pluginId String @map("plugin_id")
|
|
137
|
+
tableName String @map("table_name")
|
|
138
|
+
physicalTableName String @unique @map("physical_table_name")
|
|
139
|
+
schema Json
|
|
140
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
141
|
+
|
|
142
|
+
@@unique([pluginId, tableName])
|
|
143
|
+
@@index([pluginId])
|
|
144
|
+
@@map("plugin_structured_tables")
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Schema + full row dump of a structured-storage plugin's table, taken
|
|
148
|
+
// before PluginRegistryService.uninstall() does anything destructive
|
|
149
|
+
// (Month 8, Session 87). All of a plugin's tables snapshotted together
|
|
150
|
+
// in one uninstall event share one snapshotGroupId. Distinct from the
|
|
151
|
+
// content-tree Snapshot in packages/content-service — that one is a
|
|
152
|
+
// version POINTER (content is immutable, nothing is ever really at
|
|
153
|
+
// risk); structured-storage rows are genuinely mutable, so this has to
|
|
154
|
+
// be a real data dump.
|
|
155
|
+
model PluginStructuredSnapshot {
|
|
156
|
+
id String @id @default(uuid())
|
|
157
|
+
snapshotGroupId String @map("snapshot_group_id")
|
|
158
|
+
pluginId String @map("plugin_id")
|
|
159
|
+
tableName String @map("table_name")
|
|
160
|
+
physicalTableName String @map("physical_table_name")
|
|
161
|
+
schema Json
|
|
162
|
+
rows Json
|
|
163
|
+
// Mapped to a non-reserved column name: TRIGGER is a reserved keyword in
|
|
164
|
+
// MySQL, and @map keeps the Prisma field name idiomatic while dodging
|
|
165
|
+
// that collision across all three prisma-variants dialects.
|
|
166
|
+
trigger String? @map("snapshot_trigger")
|
|
167
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
168
|
+
|
|
169
|
+
@@index([pluginId])
|
|
170
|
+
@@index([snapshotGroupId])
|
|
171
|
+
@@map("plugin_structured_snapshots")
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Tracks which document types (created via DocumentTypeService during
|
|
175
|
+
// PluginRegistryService.install(), Month 8 Session 88) belong to which
|
|
176
|
+
// plugin. Pure Prisma-side ownership tracking, same reasoning as
|
|
177
|
+
// PluginStructuredTable/PluginMigrationRecord: document types themselves
|
|
178
|
+
// live in the raw DatabaseAdapter's document_types table, which has no
|
|
179
|
+
// plugin_id column and would need a cross-dialect migration to gain one.
|
|
180
|
+
// No @relation to PluginRegistry — document types are created before the
|
|
181
|
+
// PluginRegistry row exists (install()'s sequencing), same reasoning as
|
|
182
|
+
// PluginMigrationRecord.
|
|
183
|
+
model PluginDocumentType {
|
|
184
|
+
id String @id @default(uuid())
|
|
185
|
+
pluginId String @map("plugin_id")
|
|
186
|
+
documentTypeId String @unique @map("document_type_id")
|
|
187
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
188
|
+
|
|
189
|
+
@@index([pluginId])
|
|
190
|
+
@@map("plugin_document_types")
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// Tracks which members a BUNDLE plugin's install fan-out actually
|
|
194
|
+
// installed (Session 152). A member that was already installed
|
|
195
|
+
// independently gets NO row — the recorded decision is "skip, don't
|
|
196
|
+
// claim" — so bundle uninstall's cascade (and S153's revocation
|
|
197
|
+
// semantics later) only ever touch what the bundle itself brought in.
|
|
198
|
+
// `position` preserves install order so the cascade can walk it in
|
|
199
|
+
// reverse (rows are written in one createMany, so installedAt cannot
|
|
200
|
+
// order them). No @relation to PluginRegistry, same reasoning as
|
|
201
|
+
// PluginMigrationRecord above.
|
|
202
|
+
model PluginBundleMember {
|
|
203
|
+
id String @id @default(uuid())
|
|
204
|
+
bundlePluginId String @map("bundle_plugin_id")
|
|
205
|
+
memberPluginId String @map("member_plugin_id")
|
|
206
|
+
position Int
|
|
207
|
+
installedAt DateTime @default(now()) @map("installed_at")
|
|
208
|
+
|
|
209
|
+
@@unique([bundlePluginId, memberPluginId])
|
|
210
|
+
@@index([bundlePluginId])
|
|
211
|
+
@@map("plugin_bundle_members")
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Public Content API keys (Month 9, Session 101). Only the SHA-256 hash
|
|
215
|
+
// of a key is ever stored — the plaintext is shown once at creation and
|
|
216
|
+
// unrecoverable after (`vk_...`, generated in src/auth/api-keys.ts).
|
|
217
|
+
// revokedAt doubles as the revoked flag, matching Session.revokedAt.
|
|
218
|
+
model ApiKey {
|
|
219
|
+
id String @id @default(uuid())
|
|
220
|
+
name String
|
|
221
|
+
keyHash String @unique @map("key_hash")
|
|
222
|
+
// read | write — write implies read. Every key created before S182 was
|
|
223
|
+
// migrated to "read" (secure default); write access is opt-in per key.
|
|
224
|
+
scope String @default("read")
|
|
225
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
226
|
+
lastUsedAt DateTime? @map("last_used_at")
|
|
227
|
+
revokedAt DateTime? @map("revoked_at")
|
|
228
|
+
|
|
229
|
+
@@map("api_keys")
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// F3 (fix wave 2, S164 review): a fixed-PK singleton row that turns "has
|
|
233
|
+
// setup already completed a create" into a real INSERT-time unique-
|
|
234
|
+
// constraint check instead of a COUNT-then-CREATE race. A plain
|
|
235
|
+
// `$transaction(count, create)` does NOT serialize two genuinely
|
|
236
|
+
// concurrent completions on separate connections — a COUNT inside a
|
|
237
|
+
// Prisma interactive transaction is a non-locking snapshot read under
|
|
238
|
+
// both Postgres's default READ COMMITTED and MySQL's default REPEATABLE
|
|
239
|
+
// READ, with no phantom protection for a later INSERT in the same
|
|
240
|
+
// transaction. Verified live: two concurrent createFirstAdmin-shaped
|
|
241
|
+
// transactions on separate connections both committed a create on both
|
|
242
|
+
// postgresql and mysql. Only SQLite hid this, because Prisma's
|
|
243
|
+
// single-connection pool serializes ALL writes there regardless of
|
|
244
|
+
// isolation level — the one dialect the pre-existing test exercised.
|
|
245
|
+
// A unique-constraint violation on a fixed primary key, by contrast, is
|
|
246
|
+
// enforced by the storage engine itself at INSERT time on every Tier 1
|
|
247
|
+
// dialect: a second concurrent INSERT of the same key value waits for
|
|
248
|
+
// the first inserting transaction to resolve, then fails with P2002 if
|
|
249
|
+
// it committed. createFirstAdmin (routes/setup.ts) inserts this row
|
|
250
|
+
// unconditionally, inside the same transaction as the admin count/create
|
|
251
|
+
// — the loser's P2002 is mapped to the same 409 an existing admin gets.
|
|
252
|
+
// This also closes M-3 (an unrelated race between two concurrent
|
|
253
|
+
// setup-FULL completions, which has no pre-existing admin to count):
|
|
254
|
+
// unconditional means both modes get the same guarantee.
|
|
255
|
+
model SetupLock {
|
|
256
|
+
id Int @id
|
|
257
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
258
|
+
|
|
259
|
+
@@map("setup_lock")
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// The core-migration ledger (apps/server/src/db/core-migrations/). Declared
|
|
263
|
+
// here so `prisma db push` treats it as schema-owned and never a drop
|
|
264
|
+
// candidate — the runner itself only ever INSERTs rows / CREATEs IF NOT
|
|
265
|
+
// EXISTS. Nothing accesses this model through the Prisma client.
|
|
266
|
+
model CoreMigration {
|
|
267
|
+
id String @id
|
|
268
|
+
appliedAt String @map("applied_at")
|
|
269
|
+
|
|
270
|
+
@@map("velora_core_migrations")
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
model PluginLicense {
|
|
274
|
+
id String @id @default(uuid())
|
|
275
|
+
// One license per installed plugin. Tracked by pluginId rather than a
|
|
276
|
+
// relation, matching PluginMigrationRecord's convention — rows can
|
|
277
|
+
// outlive a registry row's lifecycle transitions.
|
|
278
|
+
pluginId String @unique @map("plugin_id")
|
|
279
|
+
// PLAINTEXT by necessity: S139's re-validation ping must replay this
|
|
280
|
+
// exact key to the license server on every check. Hashing it would
|
|
281
|
+
// make the CMS unable to prove its own license.
|
|
282
|
+
key String
|
|
283
|
+
boundDomain String? @map("bound_domain")
|
|
284
|
+
// "valid" | "revoked" | "domain_mismatch" | "unknown" — the last verdict
|
|
285
|
+
// the license server gave for this key. domain_mismatch is deliberately
|
|
286
|
+
// distinct from revoked: a key running on a domain other than its
|
|
287
|
+
// boundDomain warns the admin but does not deactivate the plugin,
|
|
288
|
+
// whereas revoked does.
|
|
289
|
+
status String @default("valid")
|
|
290
|
+
lastReason String? @map("last_reason")
|
|
291
|
+
lastValidatedAt DateTime? @map("last_validated_at")
|
|
292
|
+
// When a re-validation was last ATTEMPTED (successful or not) and why the
|
|
293
|
+
// last attempt failed to reach a verdict. With lastValidatedAt (the last
|
|
294
|
+
// SUCCESSFUL verdict) these make "unreachable since" computable without a
|
|
295
|
+
// third column: the stale warning fires when the last attempt errored AND
|
|
296
|
+
// lastValidatedAt is older than the threshold.
|
|
297
|
+
lastAttemptAt DateTime? @map("last_attempt_at")
|
|
298
|
+
lastAttemptError String? @map("last_attempt_error")
|
|
299
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
300
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
301
|
+
|
|
302
|
+
@@map("plugin_licenses")
|
|
303
|
+
}
|