@velora-cms/server 0.11.0 → 0.12.1

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 (79) hide show
  1. package/README.md +6 -0
  2. package/dist/admin/sync-admin-bundle.d.ts +9 -0
  3. package/dist/admin/sync-admin-bundle.js +120 -0
  4. package/dist/admin-bundle/.velora-version +1 -0
  5. package/dist/admin-bundle/assets/{_virtual_mf-localSharedImportMap___mfe_internal__velora_admin__mf_owner__1-DOKdWYyj.js → _virtual_mf-localSharedImportMap___mfe_internal__velora_admin__mf_owner__1-DlIgIuFP.js} +1 -1
  6. 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 → _virtual_mf___mfe_internal__velora_admin__mf_owner__1__loadShare___mf_0_velora_mf_2_cms_mf_1_plugin_mf_2_sdk__loadShare__.js-Bm9EahCG.js} +2 -2
  7. package/dist/admin-bundle/assets/{content-trash.schema-DfXHkC-w.js → content-trash.schema-tvJ4Lbos.js} +5 -5
  8. package/dist/admin-bundle/assets/{hostInit--C4xK6nj.js → hostInit-B-6-34XY.js} +1 -1
  9. package/dist/admin-bundle/assets/{index-DhMY-0sC.js → index-CHCGuSbb.js} +1 -1
  10. package/dist/admin-bundle/assets/{index-BIAF0ShP.js → index-DYO7-IK8.js} +33 -33
  11. package/dist/admin-bundle/assets/{mf-entry-bootstrap-0-aef015cd.js → mf-entry-bootstrap-0-7b0ce2fe.js} +2 -2
  12. package/dist/admin-bundle/assets/{remoteEntry-CNyN68bc.js → remoteEntry-J2yJXsGB.js} +2 -2
  13. package/dist/admin-bundle/index.html +4 -4
  14. package/dist/app.d.ts +16 -1
  15. package/dist/app.js +63 -4
  16. package/dist/auth/api-keys.d.ts +1 -0
  17. package/dist/auth/api-keys.js +5 -1
  18. package/dist/auth/route-rate-limits.d.ts +4 -0
  19. package/dist/auth/route-rate-limits.js +13 -0
  20. package/dist/bin-sync-admin.d.ts +2 -0
  21. package/dist/bin-sync-admin.js +39 -0
  22. package/dist/bundled-templates/com.velora.blog/package.tar.gz +0 -0
  23. package/dist/config/public-url.d.ts +3 -0
  24. package/dist/config/public-url.js +45 -0
  25. package/dist/db/core-migrations/steps.js +95 -16
  26. package/dist/docs-bundle/pagefind/fragment/en_42f5356.pf_fragment +0 -0
  27. package/dist/docs-bundle/pagefind/fragment/en_6c5ee82.pf_fragment +0 -0
  28. package/dist/docs-bundle/pagefind/fragment/en_80941b8.pf_fragment +0 -0
  29. package/dist/docs-bundle/pagefind/fragment/en_a64440b.pf_fragment +0 -0
  30. package/dist/docs-bundle/pagefind/fragment/en_eb168aa.pf_fragment +0 -0
  31. package/dist/docs-bundle/pagefind/fragment/en_f053753.pf_fragment +0 -0
  32. package/dist/docs-bundle/pagefind/index/en_33ea61e.pf_index +0 -0
  33. package/dist/docs-bundle/pagefind/index/en_bb7c383.pf_index +0 -0
  34. package/dist/docs-bundle/pagefind/index/en_ff6eddf.pf_index +0 -0
  35. package/dist/docs-bundle/pagefind/pagefind-entry.json +1 -1
  36. package/dist/docs-bundle/pagefind/pagefind.en_6bbff64ea9.pf_meta +0 -0
  37. package/dist/docs-bundle/v1/index.html +4 -4
  38. package/dist/docs-bundle/v1/using-velora/getting-started/index.html +5 -3
  39. package/dist/docs-bundle/v1/using-velora/headless-api/index.html +10 -4
  40. package/dist/docs-bundle/v1/using-velora/index.html +6 -4
  41. package/dist/docs-bundle/v1/using-velora/installation/index.html +73 -15
  42. package/dist/docs-bundle/v1/using-velora/media/index.html +118 -34
  43. package/dist/graphql/schema.d.ts +1 -0
  44. package/dist/graphql/schema.js +5 -2
  45. package/dist/lib.d.ts +1 -0
  46. package/dist/lib.js +45 -11
  47. package/dist/media/media-service.d.ts +14 -15
  48. package/dist/media/media-service.js +121 -59
  49. package/dist/media/media-tokens.d.ts +6 -0
  50. package/dist/media/media-tokens.js +88 -0
  51. package/dist/media/storage/local.d.ts +16 -0
  52. package/dist/media/storage/local.js +99 -0
  53. package/dist/media/storage/s3.d.ts +25 -0
  54. package/dist/media/storage/s3.js +134 -0
  55. package/dist/media/storage/types.d.ts +21 -0
  56. package/dist/media/storage/types.js +44 -0
  57. package/dist/routes/admin-static.d.ts +2 -0
  58. package/dist/routes/admin-static.js +42 -4
  59. package/dist/routes/media-public.d.ts +6 -0
  60. package/dist/routes/media-public.js +265 -0
  61. package/dist/routes/media.d.ts +2 -1
  62. package/dist/routes/media.js +95 -5
  63. package/dist/routes/plugin-storage.js +5 -1
  64. package/dist/routes/public-api.js +5 -3
  65. package/dist/routes/published-item.d.ts +2 -1
  66. package/dist/routes/published-item.js +28 -5
  67. package/dist/scripts/copy-admin-bundle.js +9 -1
  68. package/package.json +12 -11
  69. package/prisma/schema.prisma +16 -3
  70. package/dist/docs-bundle/pagefind/fragment/en_1d9eb24.pf_fragment +0 -0
  71. package/dist/docs-bundle/pagefind/fragment/en_1ef320c.pf_fragment +0 -0
  72. package/dist/docs-bundle/pagefind/fragment/en_3099406.pf_fragment +0 -0
  73. package/dist/docs-bundle/pagefind/fragment/en_9aa652e.pf_fragment +0 -0
  74. package/dist/docs-bundle/pagefind/fragment/en_d855550.pf_fragment +0 -0
  75. package/dist/docs-bundle/pagefind/fragment/en_e6d88d8.pf_fragment +0 -0
  76. package/dist/docs-bundle/pagefind/index/en_5feeed7.pf_index +0 -0
  77. package/dist/docs-bundle/pagefind/index/en_c6981f9.pf_index +0 -0
  78. package/dist/docs-bundle/pagefind/index/en_ce4f6bf.pf_index +0 -0
  79. package/dist/docs-bundle/pagefind/pagefind.en_1e94abd852.pf_meta +0 -0
package/README.md CHANGED
@@ -63,3 +63,9 @@ endpoint — `S3_ENDPOINT` (defaults to `http://localhost:9000`),
63
63
 
64
64
  Full documentation, guides, and the API reference live at
65
65
  [docs.velora-cms.com](https://docs.velora-cms.com).
66
+
67
+ ## Source & support
68
+
69
+ Velora's source is not public. Questions and bug reports:
70
+ [velora-starter](https://github.com/velora-cms/velora-starter).
71
+ Docs at https://docs.velora-cms.com. Licensed Apache-2.0.
@@ -0,0 +1,9 @@
1
+ export declare function serverVersion(): string;
2
+ export declare function readBundleStamp(dir: string): string | null;
3
+ export declare function syncAdminBundle(targetDir: string, opts?: {
4
+ sourceDir?: string;
5
+ force?: boolean;
6
+ }): Promise<{
7
+ copied: number;
8
+ version: string;
9
+ }>;
@@ -0,0 +1,120 @@
1
+ import { cpSync, existsSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync, } from "node:fs";
2
+ import { dirname, join, resolve } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ // S186b (visible scaffold): a scaffolded site copies the installed admin
5
+ // bundle out to its own public/velora/admin instead of serving it straight
6
+ // out of node_modules, so it needs a way to re-copy after
7
+ // `npm update @velora-cms/server`. This is that machinery — wrapped by the
8
+ // velora-sync-admin bin (../bin-sync-admin.ts) and consulted (read-only, via
9
+ // readBundleStamp + serverVersion) by admin-static.ts's boot drift warning.
10
+ // Both callers run with cwd set to the USER's project, never this package,
11
+ // so every path here is resolved relative to this module (dirname-based),
12
+ // same as copy-admin-bundle.ts, never relative to cwd.
13
+ const STAMP_FILE = ".velora-version";
14
+ function packageJsonPath() {
15
+ const here = dirname(fileURLToPath(import.meta.url)); // <server>/dist/admin or src/admin
16
+ return join(here, "..", "..", "package.json");
17
+ }
18
+ // Exported so bin-sync-admin.ts and admin-static.ts's boot warning read the
19
+ // exact same version copy-admin-bundle.ts stamped the installed bundle
20
+ // with, resolved the same dirname-relative way.
21
+ export function serverVersion() {
22
+ const pkg = JSON.parse(readFileSync(packageJsonPath(), "utf8"));
23
+ return pkg.version;
24
+ }
25
+ // The stamp a copied-out bundle carries, or null when there isn't one —
26
+ // pre-S186b copies and the packaged/dev fallback candidates never have a
27
+ // stamp, and that must stay a quiet, non-throwing case, not an error.
28
+ export function readBundleStamp(dir) {
29
+ try {
30
+ return readFileSync(join(dir, STAMP_FILE), "utf8").trim();
31
+ }
32
+ catch {
33
+ return null;
34
+ }
35
+ }
36
+ function countFiles(dir) {
37
+ let count = 0;
38
+ for (const entry of readdirSync(dir, { withFileTypes: true })) {
39
+ const full = join(dir, entry.name);
40
+ count += entry.isDirectory() ? countFiles(full) : 1;
41
+ }
42
+ return count;
43
+ }
44
+ // Review finding C1 (demonstrated data loss): syncAdminBundle used to
45
+ // rm-rf whatever targetDir resolved to, no questions asked. A reviewer
46
+ // pointed VELORA_ADMIN_DIR at a user's `public/` and it wiped it. This is
47
+ // the guard that runs before ANY destructive step: a target is safe to
48
+ // replace only when it doesn't exist yet, is empty, or already looks like
49
+ // an admin bundle (carries our own stamp, or an index.html — the two
50
+ // things an admin bundle always has). Anything else — a directory with
51
+ // unrelated content — is refused unless the caller explicitly overrides
52
+ // with --force (bin-sync-admin.ts) / { force: true } (this function).
53
+ function looksLikeAdminTarget(dir) {
54
+ if (!existsSync(dir))
55
+ return true;
56
+ let entries;
57
+ try {
58
+ entries = readdirSync(dir);
59
+ }
60
+ catch {
61
+ // Exists but isn't a readable directory (e.g. a plain file sitting at
62
+ // that path) — never safe to treat as an admin bundle.
63
+ return false;
64
+ }
65
+ if (entries.length === 0)
66
+ return true;
67
+ return entries.includes(STAMP_FILE) || entries.includes("index.html");
68
+ }
69
+ // Replaces targetDir (resolved against cwd — the caller's project, not this
70
+ // package) with a fresh copy of the installed admin bundle. Nothing outside
71
+ // targetDir is ever touched, and — per review finding M4 — targetDir itself
72
+ // is never left in a half-replaced state: the new bundle is fully staged
73
+ // in a sibling directory first, and only once that staging copy is
74
+ // complete (files copied, stamp written) does the old target get removed
75
+ // and the staging directory renamed into place. A crash or throw before
76
+ // the rename leaves the OLD target untouched and the new bundle sitting,
77
+ // intact, in the staging directory — never a target that is neither the
78
+ // old bundle nor the new one.
79
+ export async function syncAdminBundle(targetDir, opts) {
80
+ const here = dirname(fileURLToPath(import.meta.url));
81
+ const sourceDir = opts?.sourceDir ?? join(here, "..", "admin-bundle");
82
+ const resolvedTarget = resolve(targetDir);
83
+ if (!existsSync(sourceDir)) {
84
+ throw new Error(`No admin bundle found at ${sourceDir} — is @velora-cms/server installed correctly? ` +
85
+ "Reinstall the package, or rebuild it, and try again.");
86
+ }
87
+ if (!opts?.force && !looksLikeAdminTarget(resolvedTarget)) {
88
+ throw new Error(`${resolvedTarget} doesn't look like an admin bundle — refusing to replace it (pass --force to override)`);
89
+ }
90
+ // Sibling of the target, never inside it — same directory so the final
91
+ // rename is same-volume (atomic-ish) rather than a cross-device move.
92
+ const stagingDir = `${resolvedTarget}.staging-${process.pid}`;
93
+ // Clear out any leftover from a previous run that crashed before renaming
94
+ // (see the throw below) — this run's staging copy must start clean.
95
+ rmSync(stagingDir, { recursive: true, force: true });
96
+ cpSync(sourceDir, stagingDir, { recursive: true });
97
+ const version = serverVersion();
98
+ // Counted BEFORE the stamp is written (review finding M6): the reported
99
+ // count is the asset count copied from the source bundle, not inflated
100
+ // by our own bookkeeping file.
101
+ const copied = countFiles(stagingDir);
102
+ writeFileSync(join(stagingDir, STAMP_FILE), version);
103
+ // maxRetries/retryDelay: Windows can hold a brief EBUSY/EPERM lock on a
104
+ // just-closed file handle (AV scanners, indexers) — retrying beats
105
+ // failing a sync that would otherwise succeed a moment later.
106
+ rmSync(resolvedTarget, { recursive: true, force: true, maxRetries: 3, retryDelay: 100 });
107
+ try {
108
+ renameSync(stagingDir, resolvedTarget);
109
+ }
110
+ catch (err) {
111
+ // The old target is already gone (removed above) and the rename
112
+ // failed, so there's no "restore the old copy" move available. Nothing
113
+ // is lost, though: the fully-synced new bundle is still sitting at
114
+ // stagingDir. Name both paths so the caller can recover by hand.
115
+ throw new Error(`Synced the admin UI into ${stagingDir} but could not move it into place at ${resolvedTarget}: ` +
116
+ `${err instanceof Error ? err.message : String(err)}. The new bundle is intact at ${stagingDir} — ` +
117
+ "move it to the target path manually, or re-run the sync.");
118
+ }
119
+ return { copied, version };
120
+ }
@@ -0,0 +1 @@
1
+ 0.12.1
@@ -1 +1 @@
1
- import{_ as a}from"./vite-preload-helper-Cgledu0r.js";import"./index-Do71v6NZ.js";const n={react:async()=>await a(()=>import("./_virtual_mf___mfe_internal__velora_admin__mf_owner__1__loadShare__react__loadShare__.js-BuUBskgj.js").then(t=>t.x),[]),"react/jsx-runtime":async()=>await a(()=>import("./_virtual_mf___mfe_internal__velora_admin__mf_owner__1__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DMaku-HC.js").then(t=>t.c),[]),"react-dom":async()=>await a(()=>import("./_virtual_mf___mfe_internal__velora_admin__mf_owner__1__loadShare__react_mf_2_dom__loadShare__.js-DYfqn12F.js").then(t=>t.d),[]),"react-dom/client":async()=>await a(()=>import("./_virtual_mf___mfe_internal__velora_admin__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-BPoj3DC9.js").then(t=>t.a),[]),"@velora-cms/plugin-sdk":async()=>await a(()=>import("./index-DhMY-0sC.js"),[])},o={react:{name:"react",version:"19.2.7",scope:["default"],loaded:!1,materialize:!0,eager:!1,from:"velora_admin",canLiveRebind:!0,async get(){o.react.loaded=!0;const{react:r}=n,e={...await r()};return e.__esModule!==!0&&Object.defineProperty(e,"__esModule",{value:!0,enumerable:!1}),function(){return e}},shareConfig:{singleton:!0,requiredVersion:"^19.2.7",strictVersion:!1,eager:!1}},"react/jsx-runtime":{name:"react/jsx-runtime",version:"19.2.7",scope:["default"],loaded:!1,materialize:!0,eager:!1,from:"velora_admin",canLiveRebind:!0,async get(){o["react/jsx-runtime"].loaded=!0;const{"react/jsx-runtime":r}=n,e={...await r()};return e.__esModule!==!0&&Object.defineProperty(e,"__esModule",{value:!0,enumerable:!1}),function(){return e}},shareConfig:{singleton:!0,requiredVersion:"^19.2.7",strictVersion:!1,eager:!1}},"react-dom":{name:"react-dom",version:"19.2.7",scope:["default"],loaded:!1,materialize:!0,eager:!1,from:"velora_admin",canLiveRebind:!0,async get(){o["react-dom"].loaded=!0;const{"react-dom":r}=n,e={...await r()};return e.__esModule!==!0&&Object.defineProperty(e,"__esModule",{value:!0,enumerable:!1}),function(){return e}},shareConfig:{singleton:!0,requiredVersion:"^19.2.7",strictVersion:!1,eager:!1}},"react-dom/client":{name:"react-dom/client",version:"19.2.7",scope:["default"],loaded:!1,materialize:!0,eager:!1,from:"velora_admin",canLiveRebind:!0,async get(){o["react-dom/client"].loaded=!0;const{"react-dom/client":r}=n,e={...await r()};return e.__esModule!==!0&&Object.defineProperty(e,"__esModule",{value:!0,enumerable:!1}),function(){return e}},shareConfig:{singleton:!0,requiredVersion:"^19.2.7",strictVersion:!1,eager:!1}},"@velora-cms/plugin-sdk":{name:"@velora-cms/plugin-sdk",version:"0.11.0",scope:["default"],loaded:!1,materialize:!0,eager:!1,from:"velora_admin",canLiveRebind:!0,async get(){o["@velora-cms/plugin-sdk"].loaded=!0;const{"@velora-cms/plugin-sdk":r}=n,e={...await r()};return e.__esModule!==!0&&Object.defineProperty(e,"__esModule",{value:!0,enumerable:!1}),function(){return e}},shareConfig:{singleton:!0,requiredVersion:"*",strictVersion:!1,eager:!1}}},u=[];export{u as usedRemotes,o as usedShared};
1
+ import{_ as a}from"./vite-preload-helper-Cgledu0r.js";import"./index-Do71v6NZ.js";const n={react:async()=>await a(()=>import("./_virtual_mf___mfe_internal__velora_admin__mf_owner__1__loadShare__react__loadShare__.js-BuUBskgj.js").then(t=>t.x),[]),"react/jsx-runtime":async()=>await a(()=>import("./_virtual_mf___mfe_internal__velora_admin__mf_owner__1__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DMaku-HC.js").then(t=>t.c),[]),"react-dom":async()=>await a(()=>import("./_virtual_mf___mfe_internal__velora_admin__mf_owner__1__loadShare__react_mf_2_dom__loadShare__.js-DYfqn12F.js").then(t=>t.d),[]),"react-dom/client":async()=>await a(()=>import("./_virtual_mf___mfe_internal__velora_admin__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-BPoj3DC9.js").then(t=>t.a),[]),"@velora-cms/plugin-sdk":async()=>await a(()=>import("./index-CHCGuSbb.js"),[])},o={react:{name:"react",version:"19.2.7",scope:["default"],loaded:!1,materialize:!0,eager:!1,from:"velora_admin",canLiveRebind:!0,async get(){o.react.loaded=!0;const{react:r}=n,e={...await r()};return e.__esModule!==!0&&Object.defineProperty(e,"__esModule",{value:!0,enumerable:!1}),function(){return e}},shareConfig:{singleton:!0,requiredVersion:"^19.2.7",strictVersion:!1,eager:!1}},"react/jsx-runtime":{name:"react/jsx-runtime",version:"19.2.7",scope:["default"],loaded:!1,materialize:!0,eager:!1,from:"velora_admin",canLiveRebind:!0,async get(){o["react/jsx-runtime"].loaded=!0;const{"react/jsx-runtime":r}=n,e={...await r()};return e.__esModule!==!0&&Object.defineProperty(e,"__esModule",{value:!0,enumerable:!1}),function(){return e}},shareConfig:{singleton:!0,requiredVersion:"^19.2.7",strictVersion:!1,eager:!1}},"react-dom":{name:"react-dom",version:"19.2.7",scope:["default"],loaded:!1,materialize:!0,eager:!1,from:"velora_admin",canLiveRebind:!0,async get(){o["react-dom"].loaded=!0;const{"react-dom":r}=n,e={...await r()};return e.__esModule!==!0&&Object.defineProperty(e,"__esModule",{value:!0,enumerable:!1}),function(){return e}},shareConfig:{singleton:!0,requiredVersion:"^19.2.7",strictVersion:!1,eager:!1}},"react-dom/client":{name:"react-dom/client",version:"19.2.7",scope:["default"],loaded:!1,materialize:!0,eager:!1,from:"velora_admin",canLiveRebind:!0,async get(){o["react-dom/client"].loaded=!0;const{"react-dom/client":r}=n,e={...await r()};return e.__esModule!==!0&&Object.defineProperty(e,"__esModule",{value:!0,enumerable:!1}),function(){return e}},shareConfig:{singleton:!0,requiredVersion:"^19.2.7",strictVersion:!1,eager:!1}},"@velora-cms/plugin-sdk":{name:"@velora-cms/plugin-sdk",version:"0.11.0",scope:["default"],loaded:!1,materialize:!0,eager:!1,from:"velora_admin",canLiveRebind:!0,async get(){o["@velora-cms/plugin-sdk"].loaded=!0;const{"@velora-cms/plugin-sdk":r}=n,e={...await r()};return e.__esModule!==!0&&Object.defineProperty(e,"__esModule",{value:!0,enumerable:!1}),function(){return e}},shareConfig:{singleton:!0,requiredVersion:"*",strictVersion:!1,eager:!1}}},u=[];export{u as usedRemotes,o as usedShared};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DhMY-0sC.js","assets/content-trash.schema-DfXHkC-w.js"])))=>i.map(i=>d[i]);
2
- import{_ as b}from"./vite-preload-helper-Cgledu0r.js";const g="__mf_init__virtual:mf:__mfe_internal__velora_admin__mf_owner__1__mf_v__runtimeInit__mf_v__.js__";let c=globalThis[g];if(!c){let e,a;const t=new Promise((i,s)=>{e=i,a=s});c=globalThis[g]={initPromise:t,initResolve:e,initReject:a}}const P=c.initPromise,_="__mf_module_cache__";globalThis[_]||={share:{},remote:{}};globalThis[_].share||={};globalThis[_].remote||={};const l=globalThis[_];for(const e of Object.keys(l.share))if(e.startsWith("default:")){const a=e.slice(8);l.share[a]===void 0&&(l.share[a]=l.share[e])}else if(!e.includes(":")){const a="default:"+e;l.share[a]===void 0&&(l.share[a]=l.share[e])}const d=(e,a)=>{const t=e[a.canonical];if(t!==void 0)return t;const i=a.aliases||[];for(const s of i){if(!Object.prototype.hasOwnProperty.call(e,s))continue;const n=e[s];if(n!==void 0)return e[a.canonical]=n,n}},u=Symbol.for("module-federation.shared-cache-listeners"),p=e=>{let a=e[u];return a===void 0&&(a=Object.create(null),Object.defineProperty(e,u,{value:a,enumerable:!1,configurable:!1,writable:!1})),a},v=(e,a,t)=>{const i=p(e);(i[a.canonical]||=new Set).add(t)},h=Symbol.for("module-federation.shared-cache-owners"),S=e=>{let a=e[h];return a===void 0&&(a=Object.create(null),Object.defineProperty(e,h,{value:a,enumerable:!1,configurable:!1,writable:!1})),a},y=(e,a,t,i)=>{var r;e[a.canonical]=t;const s=a.aliases||[];for(const f of s)Object.defineProperty(e,f,{value:t,enumerable:!0,configurable:!0,writable:!0});e[h],S(e)[a.canonical]=i;const n=(r=e[u])==null?void 0:r[a.canonical];if(n)for(const f of n)f(t);return t},O=e=>{const a=(()=>{let t=e;for(let i=0;i<5;i++){const s=t==null?void 0:t.default;if(!s||typeof s!="object")break;const n=Object.keys(t).filter(r=>r!=="default").map(r=>t[r]);if(n.length>0&&n.some(r=>r!==void 0))break;t=s}return t})();return a&&Object.getPrototypeOf(a)===null?Object.assign({},a):a};let j,w,C,T,k,A,D,K,V,E;const m=e=>{e.CMSPluginSchema,e.DataTypePluginSchema,e.validatePluginManifest,j=e.definePlugin,e.PluginDefinitionError,w=e.registerDataType,C=e.getDataType,T=e.listDataTypes,k=e.registerAdminSection,A=e.getAdminSection,D=e.listAdminSections,K=e.PluginValueProvider,V=e.PluginSettingsProvider,E=e.PluginApiProvider,e.usePluginValue,e.usePluginSettings,e.usePluginSettingsValue,e.usePluginApi,e.SimpleStorageValueProvider,e.Panel,e.PropertyField,e.COMPONENT,e.usePropertyFieldControl,e.Input,e.Button,e.Switch,e.Badge,e.cn,e.default};v(l.share,{canonical:"default:@velora-cms/plugin-sdk"},m);let o=d(l.share,{canonical:"default:@velora-cms/plugin-sdk",aliases:["@velora-cms/plugin-sdk"]});o===void 0?(l.pendingShareLoads||=[]).push(P.then(()=>{if(o=d(l.share,{canonical:"default:@velora-cms/plugin-sdk",aliases:["@velora-cms/plugin-sdk"]}),o!==void 0){m(o);return}return b(()=>import("./index-DhMY-0sC.js"),__vite__mapDeps([0,1])).then(e=>{o=O(e),y(l.share,{canonical:"default:@velora-cms/plugin-sdk",aliases:["@velora-cms/plugin-sdk"]},o,"velora_admin")})})):m(o);export{j as _,C as a,w as b,A as c,k as d,E as e,K as f,V as g,D as h,T as i};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CHCGuSbb.js","assets/content-trash.schema-tvJ4Lbos.js"])))=>i.map(i=>d[i]);
2
+ import{_ as b}from"./vite-preload-helper-Cgledu0r.js";const g="__mf_init__virtual:mf:__mfe_internal__velora_admin__mf_owner__1__mf_v__runtimeInit__mf_v__.js__";let c=globalThis[g];if(!c){let e,a;const t=new Promise((i,s)=>{e=i,a=s});c=globalThis[g]={initPromise:t,initResolve:e,initReject:a}}const P=c.initPromise,_="__mf_module_cache__";globalThis[_]||={share:{},remote:{}};globalThis[_].share||={};globalThis[_].remote||={};const l=globalThis[_];for(const e of Object.keys(l.share))if(e.startsWith("default:")){const a=e.slice(8);l.share[a]===void 0&&(l.share[a]=l.share[e])}else if(!e.includes(":")){const a="default:"+e;l.share[a]===void 0&&(l.share[a]=l.share[e])}const d=(e,a)=>{const t=e[a.canonical];if(t!==void 0)return t;const i=a.aliases||[];for(const s of i){if(!Object.prototype.hasOwnProperty.call(e,s))continue;const n=e[s];if(n!==void 0)return e[a.canonical]=n,n}},u=Symbol.for("module-federation.shared-cache-listeners"),p=e=>{let a=e[u];return a===void 0&&(a=Object.create(null),Object.defineProperty(e,u,{value:a,enumerable:!1,configurable:!1,writable:!1})),a},v=(e,a,t)=>{const i=p(e);(i[a.canonical]||=new Set).add(t)},h=Symbol.for("module-federation.shared-cache-owners"),S=e=>{let a=e[h];return a===void 0&&(a=Object.create(null),Object.defineProperty(e,h,{value:a,enumerable:!1,configurable:!1,writable:!1})),a},y=(e,a,t,i)=>{var r;e[a.canonical]=t;const s=a.aliases||[];for(const f of s)Object.defineProperty(e,f,{value:t,enumerable:!0,configurable:!0,writable:!0});e[h],S(e)[a.canonical]=i;const n=(r=e[u])==null?void 0:r[a.canonical];if(n)for(const f of n)f(t);return t},O=e=>{const a=(()=>{let t=e;for(let i=0;i<5;i++){const s=t==null?void 0:t.default;if(!s||typeof s!="object")break;const n=Object.keys(t).filter(r=>r!=="default").map(r=>t[r]);if(n.length>0&&n.some(r=>r!==void 0))break;t=s}return t})();return a&&Object.getPrototypeOf(a)===null?Object.assign({},a):a};let j,w,C,T,k,A,D,K,V,E;const m=e=>{e.CMSPluginSchema,e.DataTypePluginSchema,e.validatePluginManifest,j=e.definePlugin,e.PluginDefinitionError,w=e.registerDataType,C=e.getDataType,T=e.listDataTypes,k=e.registerAdminSection,A=e.getAdminSection,D=e.listAdminSections,K=e.PluginValueProvider,V=e.PluginSettingsProvider,E=e.PluginApiProvider,e.usePluginValue,e.usePluginSettings,e.usePluginSettingsValue,e.usePluginApi,e.SimpleStorageValueProvider,e.Panel,e.PropertyField,e.COMPONENT,e.usePropertyFieldControl,e.Input,e.Button,e.Switch,e.Badge,e.cn,e.default};v(l.share,{canonical:"default:@velora-cms/plugin-sdk"},m);let o=d(l.share,{canonical:"default:@velora-cms/plugin-sdk",aliases:["@velora-cms/plugin-sdk"]});o===void 0?(l.pendingShareLoads||=[]).push(P.then(()=>{if(o=d(l.share,{canonical:"default:@velora-cms/plugin-sdk",aliases:["@velora-cms/plugin-sdk"]}),o!==void 0){m(o);return}return b(()=>import("./index-CHCGuSbb.js"),__vite__mapDeps([0,1])).then(e=>{o=O(e),y(l.share,{canonical:"default:@velora-cms/plugin-sdk",aliases:["@velora-cms/plugin-sdk"]},o,"velora_admin")})})):m(o);export{j as _,C as a,w as b,A as c,k as d,E as e,K as f,V as g,D as h,T as i};