@momentumcms/core 0.5.6 → 0.5.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momentumcms/core",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "description": "Core collection config, fields, hooks, and access control for Momentum CMS",
5
5
  "license": "MIT",
6
6
  "author": "Momentum CMS Contributors",
@@ -41,9 +41,15 @@ export interface DatabaseAdapter {
41
41
  * @returns The restored document
42
42
  */
43
43
  restore?(collection: string, id: string, field?: string): Promise<Record<string, unknown>>;
44
+ /**
45
+ * Register collection metadata (e.g., slug → table name mappings).
46
+ * Always called during server init, even when schema sync is disabled.
47
+ * This ensures CRUD operations resolve the correct table names.
48
+ */
49
+ registerCollections?(collections: CollectionConfig[]): void;
44
50
  /**
45
51
  * Initialize database schema based on collections.
46
- * Called once when the server starts.
52
+ * Called once when the server starts (only when schema sync is enabled).
47
53
  */
48
54
  initialize?(collections: CollectionConfig[]): Promise<void>;
49
55
  /**