@cms0/cms0 0.0.1 → 0.0.4

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.
@@ -1,520 +1,5 @@
1
1
  export declare const schemaDescriptor: {
2
- readonly models: {
3
- readonly BlogPost: {
4
- readonly kind: "model";
5
- readonly properties: {
6
- readonly title: {
7
- readonly kind: "primitive";
8
- readonly type: "string";
9
- readonly optional: false;
10
- readonly nullable: false;
11
- };
12
- readonly description: {
13
- readonly kind: "primitive";
14
- readonly type: "string";
15
- readonly optional: false;
16
- readonly nullable: false;
17
- };
18
- readonly content: {
19
- readonly kind: "primitive";
20
- readonly type: "string";
21
- readonly optional: false;
22
- readonly nullable: false;
23
- };
24
- };
25
- };
26
- readonly Author: {
27
- readonly kind: "model";
28
- readonly properties: {
29
- readonly profile: {
30
- readonly kind: "primitive";
31
- readonly type: "string";
32
- readonly optional: false;
33
- readonly nullable: false;
34
- };
35
- readonly name: {
36
- readonly kind: "primitive";
37
- readonly type: "string";
38
- readonly optional: false;
39
- readonly nullable: false;
40
- };
41
- };
42
- };
43
- readonly Testimonial: {
44
- readonly kind: "model";
45
- readonly properties: {
46
- readonly content: {
47
- readonly kind: "primitive";
48
- readonly type: "string";
49
- readonly optional: false;
50
- readonly nullable: false;
51
- };
52
- readonly author: {
53
- readonly kind: "modelRef";
54
- readonly model: "Author";
55
- readonly optional: false;
56
- readonly nullable: false;
57
- };
58
- readonly companies: {
59
- readonly type: "array";
60
- readonly items: {
61
- readonly type: "object";
62
- readonly properties: {
63
- readonly name: {
64
- readonly kind: "primitive";
65
- readonly type: "string";
66
- readonly optional: false;
67
- readonly nullable: false;
68
- };
69
- readonly value: {
70
- readonly kind: "primitive";
71
- readonly type: "number";
72
- readonly optional: false;
73
- readonly nullable: false;
74
- };
75
- };
76
- readonly optional: false;
77
- readonly nullable: false;
78
- };
79
- readonly optional: false;
80
- readonly nullable: false;
81
- };
82
- };
83
- };
84
- };
85
- readonly roots: {
86
- readonly blogsPage: {
87
- readonly type: "object";
88
- readonly properties: {
89
- readonly headline: {
90
- readonly kind: "primitive";
91
- readonly type: "string";
92
- readonly optional: false;
93
- readonly nullable: false;
94
- };
95
- readonly blogs: {
96
- readonly type: "array";
97
- readonly items: {
98
- readonly kind: "modelRef";
99
- readonly model: "BlogPost";
100
- readonly optional: false;
101
- readonly nullable: false;
102
- };
103
- readonly optional: false;
104
- readonly nullable: false;
105
- };
106
- readonly links: {
107
- readonly type: "array";
108
- readonly items: {
109
- readonly type: "object";
110
- readonly properties: {
111
- readonly url: {
112
- readonly kind: "primitive";
113
- readonly type: "string";
114
- readonly optional: false;
115
- readonly nullable: false;
116
- };
117
- readonly text: {
118
- readonly kind: "primitive";
119
- readonly type: "string";
120
- readonly optional: false;
121
- readonly nullable: false;
122
- };
123
- readonly images: {
124
- readonly type: "array";
125
- readonly items: {
126
- readonly type: "object";
127
- readonly properties: {
128
- readonly url: {
129
- readonly kind: "primitive";
130
- readonly type: "string";
131
- readonly optional: false;
132
- readonly nullable: false;
133
- };
134
- readonly alt: {
135
- readonly kind: "primitive";
136
- readonly type: "string";
137
- readonly optional: false;
138
- readonly nullable: false;
139
- };
140
- };
141
- readonly optional: false;
142
- readonly nullable: false;
143
- };
144
- readonly optional: false;
145
- readonly nullable: false;
146
- };
147
- };
148
- readonly optional: false;
149
- readonly nullable: false;
150
- };
151
- readonly optional: false;
152
- readonly nullable: false;
153
- };
154
- };
155
- readonly optional: false;
156
- readonly nullable: false;
157
- };
158
- readonly homePage: {
159
- readonly type: "object";
160
- readonly properties: {
161
- readonly headline: {
162
- readonly kind: "primitive";
163
- readonly type: "string";
164
- readonly optional: false;
165
- readonly nullable: false;
166
- };
167
- readonly numberOfProjects: {
168
- readonly type: "array";
169
- readonly items: {
170
- readonly kind: "primitive";
171
- readonly type: "number";
172
- readonly optional: false;
173
- readonly nullable: false;
174
- };
175
- readonly optional: false;
176
- readonly nullable: false;
177
- };
178
- readonly numberOfView: {
179
- readonly kind: "primitive";
180
- readonly type: "number";
181
- readonly optional: false;
182
- readonly nullable: false;
183
- };
184
- readonly section1: {
185
- readonly type: "object";
186
- readonly properties: {
187
- readonly title: {
188
- readonly kind: "primitive";
189
- readonly type: "string";
190
- readonly optional: false;
191
- readonly nullable: false;
192
- };
193
- readonly subtitle: {
194
- readonly kind: "primitive";
195
- readonly type: "string";
196
- readonly optional: false;
197
- readonly nullable: false;
198
- };
199
- readonly mentor: {
200
- readonly kind: "modelRef";
201
- readonly model: "Author";
202
- readonly optional: false;
203
- readonly nullable: false;
204
- };
205
- readonly features: {
206
- readonly type: "array";
207
- readonly items: {
208
- readonly type: "object";
209
- readonly properties: {
210
- readonly headline: {
211
- readonly kind: "primitive";
212
- readonly type: "string";
213
- readonly optional: false;
214
- readonly nullable: false;
215
- };
216
- readonly images: {
217
- readonly type: "array";
218
- readonly items: {
219
- readonly kind: "primitive";
220
- readonly type: "string";
221
- readonly optional: false;
222
- readonly nullable: false;
223
- };
224
- readonly optional: false;
225
- readonly nullable: false;
226
- };
227
- };
228
- readonly optional: false;
229
- readonly nullable: false;
230
- };
231
- readonly optional: false;
232
- readonly nullable: false;
233
- };
234
- readonly link: {
235
- readonly type: "object";
236
- readonly properties: {
237
- readonly text: {
238
- readonly kind: "primitive";
239
- readonly type: "string";
240
- readonly optional: false;
241
- readonly nullable: false;
242
- };
243
- readonly url: {
244
- readonly kind: "primitive";
245
- readonly type: "string";
246
- readonly optional: false;
247
- readonly nullable: false;
248
- };
249
- readonly image: {
250
- readonly type: "object";
251
- readonly properties: {
252
- readonly type: {
253
- readonly kind: "primitive";
254
- readonly type: "string";
255
- readonly optional: false;
256
- readonly nullable: false;
257
- };
258
- readonly name: {
259
- readonly kind: "primitive";
260
- readonly type: "string";
261
- readonly optional: false;
262
- readonly nullable: false;
263
- };
264
- };
265
- readonly optional: false;
266
- readonly nullable: false;
267
- };
268
- };
269
- readonly optional: false;
270
- readonly nullable: false;
271
- };
272
- };
273
- readonly optional: false;
274
- readonly nullable: false;
275
- };
276
- readonly mentor: {
277
- readonly kind: "modelRef";
278
- readonly model: "Author";
279
- readonly optional: false;
280
- readonly nullable: false;
281
- };
282
- readonly isActive: {
283
- readonly kind: "primitive";
284
- readonly type: "boolean";
285
- readonly optional: false;
286
- readonly nullable: false;
287
- };
288
- readonly age: {
289
- readonly kind: "primitive";
290
- readonly type: "number";
291
- readonly optional: false;
292
- readonly nullable: false;
293
- };
294
- readonly testimonials: {
295
- readonly type: "array";
296
- readonly items: {
297
- readonly kind: "modelRef";
298
- readonly model: "Testimonial";
299
- readonly optional: false;
300
- readonly nullable: false;
301
- };
302
- readonly optional: false;
303
- readonly nullable: false;
304
- };
305
- readonly links: {
306
- readonly type: "array";
307
- readonly items: {
308
- readonly type: "object";
309
- readonly properties: {
310
- readonly text: {
311
- readonly kind: "primitive";
312
- readonly type: "string";
313
- readonly optional: false;
314
- readonly nullable: false;
315
- };
316
- readonly url: {
317
- readonly kind: "primitive";
318
- readonly type: "string";
319
- readonly optional: false;
320
- readonly nullable: false;
321
- };
322
- readonly author: {
323
- readonly kind: "modelRef";
324
- readonly model: "Author";
325
- readonly optional: false;
326
- readonly nullable: false;
327
- };
328
- readonly foods: {
329
- readonly type: "array";
330
- readonly items: {
331
- readonly type: "object";
332
- readonly properties: {
333
- readonly name: {
334
- readonly kind: "primitive";
335
- readonly type: "string";
336
- readonly optional: false;
337
- readonly nullable: false;
338
- };
339
- readonly cost: {
340
- readonly kind: "primitive";
341
- readonly type: "number";
342
- readonly optional: false;
343
- readonly nullable: false;
344
- };
345
- };
346
- readonly optional: false;
347
- readonly nullable: false;
348
- };
349
- readonly optional: false;
350
- readonly nullable: false;
351
- };
352
- readonly section: {
353
- readonly type: "object";
354
- readonly properties: {
355
- readonly name: {
356
- readonly kind: "primitive";
357
- readonly type: "string";
358
- readonly optional: false;
359
- readonly nullable: false;
360
- };
361
- readonly description: {
362
- readonly kind: "primitive";
363
- readonly type: "string";
364
- readonly optional: false;
365
- readonly nullable: false;
366
- };
367
- readonly drinks: {
368
- readonly type: "array";
369
- readonly items: {
370
- readonly type: "object";
371
- readonly properties: {
372
- readonly name: {
373
- readonly kind: "primitive";
374
- readonly type: "string";
375
- readonly optional: false;
376
- readonly nullable: false;
377
- };
378
- readonly filled: {
379
- readonly kind: "primitive";
380
- readonly type: "boolean";
381
- readonly optional: false;
382
- readonly nullable: false;
383
- };
384
- };
385
- readonly optional: false;
386
- readonly nullable: false;
387
- };
388
- readonly optional: false;
389
- readonly nullable: false;
390
- };
391
- };
392
- readonly optional: false;
393
- readonly nullable: false;
394
- };
395
- };
396
- readonly optional: false;
397
- readonly nullable: false;
398
- };
399
- readonly optional: false;
400
- readonly nullable: false;
401
- };
402
- };
403
- readonly optional: false;
404
- readonly nullable: false;
405
- };
406
- readonly blogPosts: {
407
- readonly type: "array";
408
- readonly items: {
409
- readonly kind: "modelRef";
410
- readonly model: "BlogPost";
411
- readonly optional: false;
412
- readonly nullable: false;
413
- };
414
- readonly optional: false;
415
- readonly nullable: false;
416
- };
417
- readonly links: {
418
- readonly type: "array";
419
- readonly items: {
420
- readonly type: "object";
421
- readonly properties: {
422
- readonly text: {
423
- readonly kind: "primitive";
424
- readonly type: "string";
425
- readonly optional: false;
426
- readonly nullable: false;
427
- };
428
- readonly url: {
429
- readonly kind: "primitive";
430
- readonly type: "string";
431
- readonly optional: false;
432
- readonly nullable: false;
433
- };
434
- };
435
- readonly optional: false;
436
- readonly nullable: false;
437
- };
438
- readonly optional: false;
439
- readonly nullable: false;
440
- };
441
- readonly images: {
442
- readonly type: "array";
443
- readonly items: {
444
- readonly kind: "primitive";
445
- readonly type: "string";
446
- readonly optional: false;
447
- readonly nullable: false;
448
- };
449
- readonly optional: false;
450
- readonly nullable: false;
451
- };
452
- readonly aboutUsPage: {
453
- readonly type: "object";
454
- readonly properties: {
455
- readonly headline: {
456
- readonly kind: "primitive";
457
- readonly type: "string";
458
- readonly optional: false;
459
- readonly nullable: false;
460
- };
461
- readonly description: {
462
- readonly kind: "primitive";
463
- readonly type: "string";
464
- readonly optional: false;
465
- readonly nullable: false;
466
- };
467
- readonly title: {
468
- readonly kind: "primitive";
469
- readonly type: "string";
470
- readonly optional: false;
471
- readonly nullable: false;
472
- };
473
- readonly numberOfEmployees: {
474
- readonly kind: "primitive";
475
- readonly type: "number";
476
- readonly optional: false;
477
- readonly nullable: false;
478
- };
479
- readonly blogs: {
480
- readonly type: "array";
481
- readonly items: {
482
- readonly kind: "modelRef";
483
- readonly model: "BlogPost";
484
- readonly optional: false;
485
- readonly nullable: false;
486
- };
487
- readonly optional: false;
488
- readonly nullable: false;
489
- };
490
- readonly employees: {
491
- readonly type: "array";
492
- readonly items: {
493
- readonly type: "object";
494
- readonly properties: {
495
- readonly name: {
496
- readonly kind: "primitive";
497
- readonly type: "string";
498
- readonly optional: false;
499
- readonly nullable: false;
500
- };
501
- readonly salary: {
502
- readonly kind: "primitive";
503
- readonly type: "number";
504
- readonly optional: false;
505
- readonly nullable: false;
506
- };
507
- };
508
- readonly optional: false;
509
- readonly nullable: false;
510
- };
511
- readonly optional: false;
512
- readonly nullable: false;
513
- };
514
- };
515
- readonly optional: false;
516
- readonly nullable: false;
517
- };
518
- };
2
+ readonly models: {};
3
+ readonly roots: {};
519
4
  };
520
5
  //# sourceMappingURL=schema-descriptor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema-descriptor.d.ts","sourceRoot":"","sources":["../../../src/generated/schema-descriptor.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsgBnB,CAAC"}
1
+ {"version":3,"file":"schema-descriptor.d.ts","sourceRoot":"","sources":["../../../src/generated/schema-descriptor.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC"}
@@ -4,6 +4,8 @@ export type CmsInstance<Schema> = {
4
4
  };
5
5
  export interface Cms0Options {
6
6
  apiConfig: Cms0APIConfig;
7
+ locales?: string[];
8
+ defaultLocale?: string;
7
9
  }
8
10
  /**
9
11
  * Initializes the CMS SDK for a given schema.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAOlD,MAAM,MAAM,WAAW,CAAC,MAAM,IAAI;KAC/B,CAAC,IAAI,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CAC9C,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,aAAa,CAAC;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC,CAoDrE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIlD,MAAM,MAAM,WAAW,CAAC,MAAM,IAAI;KAC/B,CAAC,IAAI,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CAC9C,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,aAAa,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC,CAoDrE"}
@@ -1 +1 @@
1
- {"version":3,"file":"descriptor-builder-alt.d.ts","sourceRoot":"","sources":["../../../../src/libs/cli/descriptor-builder-alt.ts"],"names":[],"mappings":"AAWA,OAAO,EAEL,cAAc,EAGf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAsM5C,iBAAS,kBAAkB,CAAC,QAAQ,EAAE,cAAc,GAAG,cAAc,CA0EpE;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"descriptor-builder-alt.d.ts","sourceRoot":"","sources":["../../../../src/libs/cli/descriptor-builder-alt.ts"],"names":[],"mappings":"AAaA,OAAO,EAEL,cAAc,EAGf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAiV5C,iBAAS,kBAAkB,CAAC,QAAQ,EAAE,cAAc,GAAG,cAAc,CAwIpE;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"descriptor-builder.d.ts","sourceRoot":"","sources":["../../../../src/libs/cli/descriptor-builder.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAIL,cAAc,EACf,MAAM,cAAc,CAAC;AAoKtB,iBAAS,eAAe,CAAC,QAAQ,EAAE,cAAc,GAAG,cAAc,CAgHjE;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"descriptor-builder.d.ts","sourceRoot":"","sources":["../../../../src/libs/cli/descriptor-builder.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAIL,cAAc,EACf,MAAM,cAAc,CAAC;AA8MtB,iBAAS,eAAe,CAAC,QAAQ,EAAE,cAAc,GAAG,cAAc,CA8HjE;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cms0/cms0",
3
- "version": "0.0.1",
3
+ "version": "0.0.4",
4
4
  "description": "",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
@@ -14,28 +14,33 @@
14
14
  },
15
15
  "exports": {
16
16
  ".": {
17
- "types": "./src/index.ts",
18
- "import": "./src/index.ts",
17
+ "types": "./dist/types/index.d.ts",
18
+ "import": "./dist/esm/index.js",
19
19
  "require": "./dist/cjs/index.cjs"
20
20
  },
21
21
  "./config": {
22
- "types": "./src/config.ts",
22
+ "types": "./dist/types/config.d.ts",
23
23
  "import": "./dist/esm/config.js",
24
24
  "require": "./dist/cjs/config.cjs"
25
25
  },
26
26
  "./libs/cli": {
27
- "types": "./src/cli/index.ts",
28
- "import": "./src/cli/index.ts",
27
+ "types": "./dist/types/libs/cli/index.d.ts",
28
+ "import": "./dist/esm/libs/cli/index.js",
29
29
  "require": "./dist/cjs/libs/cli/index.cjs"
30
30
  },
31
31
  "./schema-descriptors": {
32
- "types": "./src/schema-descriptors.ts",
33
- "import": "./src/schema-descriptors.ts",
32
+ "types": "./dist/types/schema-descriptors.d.ts",
33
+ "import": "./dist/esm/schema-descriptors.js",
34
34
  "require": "./dist/cjs/schema-descriptors.cjs"
35
35
  },
36
+ "./custom-types": {
37
+ "types": "./dist/types/custom-types/index.d.ts",
38
+ "import": "./dist/esm/custom-types/index.js",
39
+ "require": "./dist/cjs/custom-types/index.cjs"
40
+ },
36
41
  "./generated/schema-descriptor": {
37
- "types": "./src/generated/schema-descriptor.ts",
38
- "import": "./src/generated/schema-descriptor.ts",
42
+ "types": "./dist/types/generated/schema-descriptor.d.ts",
43
+ "import": "./dist/esm/generated/schema-descriptor.js",
39
44
  "require": "./dist/cjs/generated/schema-descriptor.cjs"
40
45
  }
41
46
  },
@@ -52,7 +57,7 @@
52
57
  "ts-node": "^10.9.2",
53
58
  "typescript": "^5.9.3",
54
59
  "zod": "^4.1.12",
55
- "@cms0/shared": "0.0.1"
60
+ "@cms0/shared": "0.0.2"
56
61
  },
57
62
  "devDependencies": {
58
63
  "@types/lodash": "^4.17.21",
@@ -65,8 +70,9 @@
65
70
  "cms0:build": "tsx src/cli.ts build",
66
71
  "cms0:watch": "tsx src/cli.ts watch",
67
72
  "watch:types": "tsc --watch -p tsconfig.json",
68
- "build": "pnpm run build:clean && pnpm run build:esm && pnpm run build:cjs && pnpm run build:finalize",
73
+ "build": "pnpm run build:clean && pnpm run build:prepare && pnpm run build:esm && pnpm run build:cjs && pnpm run build:finalize",
69
74
  "build:clean": "node -e \"require('fs').rmSync('dist', { recursive: true, force: true });\"",
75
+ "build:prepare": "node ./scripts/ensure-generated-schema-descriptor.cjs",
70
76
  "build:esm": "tsc -p tsconfig.json",
71
77
  "build:cjs": "tsc -p tsconfig.cjs.json",
72
78
  "build:finalize": "node ./finalize-build.cjs"