@mapled/cli 0.1.0 → 0.2.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/dist/schema.d.ts CHANGED
@@ -28,6 +28,9 @@ export type SchemaField = {
28
28
  repeatable: boolean;
29
29
  maxItems?: number;
30
30
  } | null;
31
+ /** Rules and default (§33) — kept in the schema pin, not read by the generator. */
32
+ validation?: unknown;
33
+ defaultValue?: unknown;
31
34
  };
32
35
  export type SchemaCollection = {
33
36
  key: string;
package/dist/types.js CHANGED
@@ -194,6 +194,8 @@ export function generateTypes(schema, opts = {}) {
194
194
  `export interface MapledSingles ${mapOf(singles)}`,
195
195
  "export type MapledCollectionKey = keyof MapledCollections;",
196
196
  "export type MapledSingleKey = keyof MapledSingles;",
197
+ '/** Both maps together — createClient<MapledSchema>({ key }) types every read by its key. */',
198
+ "export type MapledSchema = { collections: MapledCollections; singles: MapledSingles };",
197
199
  ].join("\n"));
198
200
  const body = blocks.join("\n\n") + "\n";
199
201
  const header = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapled/cli",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Mapled CLI — sign in, link a project, generate TypeScript types for its content and check the site's integration.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://mapled.io",
@@ -31,6 +31,6 @@
31
31
  "devDependencies": {
32
32
  "@types/node": "^24.0.0",
33
33
  "typescript": "^5.9.0",
34
- "vitest": "^3.2.0"
34
+ "vitest": "^4.1.11"
35
35
  }
36
36
  }