@blinkk/root-cms 2.5.1 → 2.5.3

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/dist/project.d.ts CHANGED
@@ -16,11 +16,16 @@ declare const SCHEMA_MODULES: Record<string, SchemaModule>;
16
16
  * fileId => schema. This is used by `generate-types.ts` to build the
17
17
  * `root-cms.d.ts` file.
18
18
  */
19
- declare function getProjectSchemas(): Promise<Record<string, Schema>>;
19
+ declare function getProjectSchemas(): Record<string, Schema>;
20
+ /**
21
+ * Resolves SchemaPattern objects in oneOf fields to arrays of Schema objects.
22
+ * This is needed for type generation which expects `field.types` to be an array.
23
+ */
24
+ declare function resolveOneOfPatterns(schemaObj: Schema): Schema;
20
25
  /**
21
26
  * Returns a collection's schema definition as defined in
22
27
  * `/collections/<id>.schema.ts`.
23
28
  */
24
- declare function getCollectionSchema(collectionId: string): Promise<Collection | null>;
29
+ declare function getCollectionSchema(collectionId: string): Collection | null;
25
30
 
26
- export { SCHEMA_MODULES, type SchemaModule, getCollectionSchema, getProjectSchemas };
31
+ export { SCHEMA_MODULES, type SchemaModule, getCollectionSchema, getProjectSchemas, resolveOneOfPatterns };
package/dist/project.js CHANGED
@@ -1,11 +1,13 @@
1
1
  import {
2
2
  SCHEMA_MODULES,
3
3
  getCollectionSchema,
4
- getProjectSchemas
5
- } from "./chunk-RNDSZKAW.js";
4
+ getProjectSchemas,
5
+ resolveOneOfPatterns
6
+ } from "./chunk-MSJGHSR6.js";
6
7
  import "./chunk-MLKGABMK.js";
7
8
  export {
8
9
  SCHEMA_MODULES,
9
10
  getCollectionSchema,
10
- getProjectSchemas
11
+ getProjectSchemas,
12
+ resolveOneOfPatterns
11
13
  };