@currentjs/gen 0.3.2 → 0.5.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 (60) hide show
  1. package/CHANGELOG.md +18 -609
  2. package/README.md +623 -427
  3. package/dist/cli.js +2 -1
  4. package/dist/commands/commit.js +25 -42
  5. package/dist/commands/createApp.js +1 -0
  6. package/dist/commands/createModule.js +151 -45
  7. package/dist/commands/diff.js +27 -40
  8. package/dist/commands/generateAll.js +141 -291
  9. package/dist/commands/migrateCommit.js +6 -18
  10. package/dist/generators/controllerGenerator.d.ts +50 -19
  11. package/dist/generators/controllerGenerator.js +588 -331
  12. package/dist/generators/domainLayerGenerator.d.ts +21 -0
  13. package/dist/generators/domainLayerGenerator.js +286 -0
  14. package/dist/generators/dtoGenerator.d.ts +21 -0
  15. package/dist/generators/dtoGenerator.js +523 -0
  16. package/dist/generators/serviceGenerator.d.ts +22 -51
  17. package/dist/generators/serviceGenerator.js +345 -568
  18. package/dist/generators/storeGenerator.d.ts +39 -32
  19. package/dist/generators/storeGenerator.js +396 -236
  20. package/dist/generators/templateGenerator.d.ts +21 -21
  21. package/dist/generators/templateGenerator.js +393 -268
  22. package/dist/generators/templates/appTemplates.d.ts +3 -1
  23. package/dist/generators/templates/appTemplates.js +16 -11
  24. package/dist/generators/templates/data/appYamlTemplate +5 -2
  25. package/dist/generators/templates/data/cursorRulesTemplate +315 -221
  26. package/dist/generators/templates/data/frontendScriptTemplate +56 -15
  27. package/dist/generators/templates/data/mainViewTemplate +2 -1
  28. package/dist/generators/templates/data/systemTsTemplate +5 -0
  29. package/dist/generators/templates/index.d.ts +0 -3
  30. package/dist/generators/templates/index.js +0 -3
  31. package/dist/generators/templates/storeTemplates.d.ts +1 -5
  32. package/dist/generators/templates/storeTemplates.js +84 -224
  33. package/dist/generators/useCaseGenerator.d.ts +13 -0
  34. package/dist/generators/useCaseGenerator.js +191 -0
  35. package/dist/types/configTypes.d.ts +149 -0
  36. package/dist/types/configTypes.js +10 -0
  37. package/dist/utils/childEntityUtils.d.ts +18 -0
  38. package/dist/utils/childEntityUtils.js +78 -0
  39. package/dist/utils/commandUtils.d.ts +43 -0
  40. package/dist/utils/commandUtils.js +124 -0
  41. package/dist/utils/commitUtils.d.ts +4 -1
  42. package/dist/utils/constants.d.ts +10 -0
  43. package/dist/utils/constants.js +13 -1
  44. package/dist/utils/diResolver.d.ts +32 -0
  45. package/dist/utils/diResolver.js +204 -0
  46. package/dist/utils/typeUtils.d.ts +23 -0
  47. package/dist/utils/typeUtils.js +77 -0
  48. package/package.json +7 -3
  49. package/dist/generators/domainModelGenerator.d.ts +0 -41
  50. package/dist/generators/domainModelGenerator.js +0 -242
  51. package/dist/generators/templates/controllerTemplates.d.ts +0 -43
  52. package/dist/generators/templates/controllerTemplates.js +0 -82
  53. package/dist/generators/templates/serviceTemplates.d.ts +0 -16
  54. package/dist/generators/templates/serviceTemplates.js +0 -59
  55. package/dist/generators/templates/validationTemplates.d.ts +0 -25
  56. package/dist/generators/templates/validationTemplates.js +0 -66
  57. package/dist/generators/templates/viewTemplates.d.ts +0 -25
  58. package/dist/generators/templates/viewTemplates.js +0 -491
  59. package/dist/generators/validationGenerator.d.ts +0 -29
  60. package/dist/generators/validationGenerator.js +0 -250
package/CHANGELOG.md CHANGED
@@ -1,429 +1,22 @@
1
1
  # Changelog
2
2
 
3
- All notable changes to this project will be documented in this file.
3
+ ## [0.5.1] - 2026-02-28
4
4
 
5
+ - fixes pack:
6
+ - aggregate references
7
+ - layout setting in module config
8
+ - SPA layout mismatch bug (if a page uses other layout, its loaded inside current one)
9
+ - local provider imports bug
10
+ - types in generated services (was any)
11
+ - access control issues
5
12
 
13
+ ## [0.5.0] – 2026-02-26
6
14
 
7
-
8
-
9
-
10
-
11
- ## [0.3.2] - 2025-12-28
12
-
13
- fixed an issue 6
14
-
15
- ## [0.3.1] - 2025-10-03
16
-
17
- bug fixed with overwriting committed changes
18
-
19
-
20
- ## [0.3.2] - 2025-12-28
21
-
22
- fixed an issue 6
23
-
24
- ## [0.3.0] - 2025-10-03
25
-
26
- - model relationship (between each other); - frontend script cleanup; - new command: migrate commit; - small refactoring.
27
-
28
-
29
-
30
- ## [0.3.2] - 2025-12-28
31
-
32
- fixed an issue 6
33
-
34
- ## [0.3.1] - 2025-10-03
35
-
36
- bug fixed with overwriting committed changes
37
-
38
-
39
- ## [0.3.2] - 2025-12-28
40
-
41
- fixed an issue 6
42
-
43
- ## [0.2.2] - 2025-10-02
44
-
45
- fix bug: required params after optional in the generated models; fix: views(templates) are not stored in the registry and being regenerated (overwritten); small readme fix; running 'npm i' on 'create app' and 'npm run build' on 'generate'
46
-
47
-
48
-
49
-
50
- ## [0.3.2] - 2025-12-28
51
-
52
- fixed an issue 6
53
-
54
- ## [0.3.1] - 2025-10-03
55
-
56
- bug fixed with overwriting committed changes
57
-
58
-
59
- ## [0.3.2] - 2025-12-28
60
-
61
- fixed an issue 6
62
-
63
- ## [0.3.0] - 2025-10-03
64
-
65
- - model relationship (between each other); - frontend script cleanup; - new command: migrate commit; - small refactoring.
66
-
67
-
68
-
69
- ## [0.3.2] - 2025-12-28
70
-
71
- fixed an issue 6
72
-
73
- ## [0.3.1] - 2025-10-03
74
-
75
- bug fixed with overwriting committed changes
76
-
77
-
78
- ## [0.3.2] - 2025-12-28
79
-
80
- fixed an issue 6
81
-
82
- ## [0.2.1] - 2025-09-18
83
-
84
- Improve generated package.json
85
-
86
-
87
-
88
-
89
-
90
- ## [0.3.2] - 2025-12-28
91
-
92
- fixed an issue 6
93
-
94
- ## [0.3.1] - 2025-10-03
95
-
96
- bug fixed with overwriting committed changes
97
-
98
-
99
- ## [0.3.2] - 2025-12-28
100
-
101
- fixed an issue 6
102
-
103
- ## [0.3.0] - 2025-10-03
104
-
105
- - model relationship (between each other); - frontend script cleanup; - new command: migrate commit; - small refactoring.
106
-
107
-
108
-
109
- ## [0.3.2] - 2025-12-28
110
-
111
- fixed an issue 6
112
-
113
- ## [0.3.1] - 2025-10-03
114
-
115
- bug fixed with overwriting committed changes
116
-
117
-
118
- ## [0.3.2] - 2025-12-28
119
-
120
- fixed an issue 6
121
-
122
- ## [0.2.2] - 2025-10-02
123
-
124
- fix bug: required params after optional in the generated models; fix: views(templates) are not stored in the registry and being regenerated (overwritten); small readme fix; running 'npm i' on 'create app' and 'npm run build' on 'generate'
125
-
126
-
127
-
128
-
129
- ## [0.3.2] - 2025-12-28
130
-
131
- fixed an issue 6
132
-
133
- ## [0.3.1] - 2025-10-03
134
-
135
- bug fixed with overwriting committed changes
136
-
137
-
138
- ## [0.3.2] - 2025-12-28
139
-
140
- fixed an issue 6
141
-
142
- ## [0.3.0] - 2025-10-03
143
-
144
- - model relationship (between each other); - frontend script cleanup; - new command: migrate commit; - small refactoring.
145
-
146
-
147
-
148
- ## [0.3.2] - 2025-12-28
149
-
150
- fixed an issue 6
151
-
152
- ## [0.3.1] - 2025-10-03
153
-
154
- bug fixed with overwriting committed changes
155
-
156
-
157
- ## [0.3.2] - 2025-12-28
158
-
159
- fixed an issue 6
160
-
161
- ## [0.2.0] - 2025-09-18
162
-
163
- implement multi-model generation (controllers, services); fix service-controller interaction; update documentation: more clear & reflect important things
164
-
165
-
166
-
167
-
168
-
169
-
170
- ## [0.3.2] - 2025-12-28
171
-
172
- fixed an issue 6
173
-
174
- ## [0.3.1] - 2025-10-03
175
-
176
- bug fixed with overwriting committed changes
177
-
178
-
179
- ## [0.3.2] - 2025-12-28
180
-
181
- fixed an issue 6
182
-
183
- ## [0.3.0] - 2025-10-03
184
-
185
- - model relationship (between each other); - frontend script cleanup; - new command: migrate commit; - small refactoring.
186
-
187
-
188
-
189
- ## [0.3.2] - 2025-12-28
190
-
191
- fixed an issue 6
192
-
193
- ## [0.3.1] - 2025-10-03
194
-
195
- bug fixed with overwriting committed changes
196
-
197
-
198
- ## [0.3.2] - 2025-12-28
199
-
200
- fixed an issue 6
201
-
202
- ## [0.2.2] - 2025-10-02
203
-
204
- fix bug: required params after optional in the generated models; fix: views(templates) are not stored in the registry and being regenerated (overwritten); small readme fix; running 'npm i' on 'create app' and 'npm run build' on 'generate'
205
-
206
-
207
-
208
-
209
- ## [0.3.2] - 2025-12-28
210
-
211
- fixed an issue 6
212
-
213
- ## [0.3.1] - 2025-10-03
214
-
215
- bug fixed with overwriting committed changes
216
-
217
-
218
- ## [0.3.2] - 2025-12-28
219
-
220
- fixed an issue 6
221
-
222
- ## [0.3.0] - 2025-10-03
223
-
224
- - model relationship (between each other); - frontend script cleanup; - new command: migrate commit; - small refactoring.
225
-
226
-
227
-
228
- ## [0.3.2] - 2025-12-28
229
-
230
- fixed an issue 6
231
-
232
- ## [0.3.1] - 2025-10-03
233
-
234
- bug fixed with overwriting committed changes
235
-
236
-
237
- ## [0.3.2] - 2025-12-28
238
-
239
- fixed an issue 6
240
-
241
- ## [0.2.1] - 2025-09-18
242
-
243
- Improve generated package.json
244
-
245
-
246
-
247
-
248
-
249
- ## [0.3.2] - 2025-12-28
250
-
251
- fixed an issue 6
252
-
253
- ## [0.3.1] - 2025-10-03
254
-
255
- bug fixed with overwriting committed changes
256
-
257
-
258
- ## [0.3.2] - 2025-12-28
259
-
260
- fixed an issue 6
261
-
262
- ## [0.3.0] - 2025-10-03
263
-
264
- - model relationship (between each other); - frontend script cleanup; - new command: migrate commit; - small refactoring.
265
-
266
-
267
-
268
- ## [0.3.2] - 2025-12-28
269
-
270
- fixed an issue 6
271
-
272
- ## [0.3.1] - 2025-10-03
273
-
274
- bug fixed with overwriting committed changes
275
-
276
-
277
- ## [0.3.2] - 2025-12-28
278
-
279
- fixed an issue 6
280
-
281
- ## [0.2.2] - 2025-10-02
282
-
283
- fix bug: required params after optional in the generated models; fix: views(templates) are not stored in the registry and being regenerated (overwritten); small readme fix; running 'npm i' on 'create app' and 'npm run build' on 'generate'
284
-
285
-
286
-
287
-
288
- ## [0.3.2] - 2025-12-28
289
-
290
- fixed an issue 6
291
-
292
- ## [0.3.1] - 2025-10-03
293
-
294
- bug fixed with overwriting committed changes
295
-
296
-
297
- ## [0.3.2] - 2025-12-28
298
-
299
- fixed an issue 6
300
-
301
- ## [0.3.0] - 2025-10-03
302
-
303
- - model relationship (between each other); - frontend script cleanup; - new command: migrate commit; - small refactoring.
304
-
305
-
306
-
307
- ## [0.3.2] - 2025-12-28
308
-
309
- fixed an issue 6
310
-
311
- ## [0.3.1] - 2025-10-03
312
-
313
- bug fixed with overwriting committed changes
314
-
315
-
316
- ## [0.3.2] - 2025-12-28
317
-
318
- fixed an issue 6
319
-
320
- ## [0.1.2] - 2025-09-18
321
-
322
- fix: failed to generate with empty permissions actions
323
-
324
-
325
-
326
-
327
-
328
-
329
-
330
- ## [0.3.2] - 2025-12-28
331
-
332
- fixed an issue 6
333
-
334
- ## [0.3.1] - 2025-10-03
335
-
336
- bug fixed with overwriting committed changes
337
-
338
-
339
- ## [0.3.2] - 2025-12-28
340
-
341
- fixed an issue 6
342
-
343
- ## [0.3.0] - 2025-10-03
344
-
345
- - model relationship (between each other); - frontend script cleanup; - new command: migrate commit; - small refactoring.
346
-
347
-
348
-
349
- ## [0.3.2] - 2025-12-28
350
-
351
- fixed an issue 6
352
-
353
- ## [0.3.1] - 2025-10-03
354
-
355
- bug fixed with overwriting committed changes
356
-
357
-
358
- ## [0.3.2] - 2025-12-28
359
-
360
- fixed an issue 6
361
-
362
- ## [0.2.2] - 2025-10-02
363
-
364
- fix bug: required params after optional in the generated models; fix: views(templates) are not stored in the registry and being regenerated (overwritten); small readme fix; running 'npm i' on 'create app' and 'npm run build' on 'generate'
365
-
366
-
367
-
368
-
369
- ## [0.3.2] - 2025-12-28
370
-
371
- fixed an issue 6
372
-
373
- ## [0.3.1] - 2025-10-03
374
-
375
- bug fixed with overwriting committed changes
376
-
377
-
378
- ## [0.3.2] - 2025-12-28
379
-
380
- fixed an issue 6
381
-
382
- ## [0.3.0] - 2025-10-03
383
-
384
- - model relationship (between each other); - frontend script cleanup; - new command: migrate commit; - small refactoring.
385
-
386
-
387
-
388
- ## [0.3.2] - 2025-12-28
389
-
390
- fixed an issue 6
391
-
392
- ## [0.3.1] - 2025-10-03
393
-
394
- bug fixed with overwriting committed changes
395
-
396
-
397
- ## [0.3.2] - 2025-12-28
398
-
399
- fixed an issue 6
400
-
401
- ## [0.2.1] - 2025-09-18
402
-
403
- Improve generated package.json
404
-
405
-
406
-
407
-
408
-
409
- ## [0.3.2] - 2025-12-28
410
-
411
- fixed an issue 6
412
-
413
- ## [0.3.1] - 2025-10-03
414
-
415
- bug fixed with overwriting committed changes
416
-
417
-
418
- ## [0.3.2] - 2025-12-28
419
-
420
- fixed an issue 6
421
-
422
- ## [0.3.0] - 2025-10-03
423
-
424
- - model relationship (between each other); - frontend script cleanup; - new command: migrate commit; - small refactoring.
425
-
426
-
15
+ So many changes were made that we skipped version 0.4:
16
+ - Rethought YAML structures entirely
17
+ - Implemented DI wiring during the build process
18
+ - Internals: Added comprehensive testing
19
+ - Internals: Completed a full refactoring of the codebase
427
20
 
428
21
  ## [0.3.2] - 2025-12-28
429
22
 
@@ -433,210 +26,26 @@ fixed an issue 6
433
26
 
434
27
  bug fixed with overwriting committed changes
435
28
 
436
-
437
- ## [0.3.2] - 2025-12-28
438
-
439
- fixed an issue 6
440
-
441
- ## [0.2.2] - 2025-10-02
442
-
443
- fix bug: required params after optional in the generated models; fix: views(templates) are not stored in the registry and being regenerated (overwritten); small readme fix; running 'npm i' on 'create app' and 'npm run build' on 'generate'
444
-
445
-
446
-
447
-
448
- ## [0.3.2] - 2025-12-28
449
-
450
- fixed an issue 6
451
-
452
- ## [0.3.1] - 2025-10-03
453
-
454
- bug fixed with overwriting committed changes
455
-
456
-
457
- ## [0.3.2] - 2025-12-28
458
-
459
- fixed an issue 6
460
-
461
- ## [0.3.0] - 2025-10-03
462
-
463
- - model relationship (between each other); - frontend script cleanup; - new command: migrate commit; - small refactoring.
464
-
465
-
466
-
467
- ## [0.3.2] - 2025-12-28
468
-
469
- fixed an issue 6
470
-
471
- ## [0.3.1] - 2025-10-03
472
-
473
- bug fixed with overwriting committed changes
474
-
475
-
476
- ## [0.3.2] - 2025-12-28
477
-
478
- fixed an issue 6
479
-
480
- ## [0.2.0] - 2025-09-18
481
-
482
- implement multi-model generation (controllers, services); fix service-controller interaction; update documentation: more clear & reflect important things
483
-
484
-
485
-
486
-
487
-
488
-
489
- ## [0.3.2] - 2025-12-28
490
-
491
- fixed an issue 6
492
-
493
- ## [0.3.1] - 2025-10-03
494
-
495
- bug fixed with overwriting committed changes
496
-
497
-
498
- ## [0.3.2] - 2025-12-28
499
-
500
- fixed an issue 6
501
-
502
29
  ## [0.3.0] - 2025-10-03
503
30
 
504
31
  - model relationship (between each other); - frontend script cleanup; - new command: migrate commit; - small refactoring.
505
32
 
506
-
507
-
508
- ## [0.3.2] - 2025-12-28
509
-
510
- fixed an issue 6
511
-
512
- ## [0.3.1] - 2025-10-03
513
-
514
- bug fixed with overwriting committed changes
515
-
516
-
517
- ## [0.3.2] - 2025-12-28
518
-
519
- fixed an issue 6
520
-
521
33
  ## [0.2.2] - 2025-10-02
522
34
 
523
35
  fix bug: required params after optional in the generated models; fix: views(templates) are not stored in the registry and being regenerated (overwritten); small readme fix; running 'npm i' on 'create app' and 'npm run build' on 'generate'
524
36
 
525
-
526
-
527
-
528
- ## [0.3.2] - 2025-12-28
529
-
530
- fixed an issue 6
531
-
532
- ## [0.3.1] - 2025-10-03
533
-
534
- bug fixed with overwriting committed changes
535
-
536
-
537
- ## [0.3.2] - 2025-12-28
538
-
539
- fixed an issue 6
540
-
541
- ## [0.3.0] - 2025-10-03
542
-
543
- - model relationship (between each other); - frontend script cleanup; - new command: migrate commit; - small refactoring.
544
-
545
-
546
-
547
- ## [0.3.2] - 2025-12-28
548
-
549
- fixed an issue 6
550
-
551
- ## [0.3.1] - 2025-10-03
552
-
553
- bug fixed with overwriting committed changes
554
-
555
-
556
- ## [0.3.2] - 2025-12-28
557
-
558
- fixed an issue 6
559
-
560
37
  ## [0.2.1] - 2025-09-18
561
38
 
562
39
  Improve generated package.json
563
40
 
41
+ ## [0.2.0] - 2025-09-18
564
42
 
43
+ implement multi-model generation (controllers, services); fix service-controller interaction; update documentation: more clear & reflect important things
565
44
 
45
+ ## [0.1.2] - 2025-09-18
566
46
 
567
-
568
- ## [0.3.2] - 2025-12-28
569
-
570
- fixed an issue 6
571
-
572
- ## [0.3.1] - 2025-10-03
573
-
574
- bug fixed with overwriting committed changes
575
-
576
-
577
- ## [0.3.2] - 2025-12-28
578
-
579
- fixed an issue 6
580
-
581
- ## [0.3.0] - 2025-10-03
582
-
583
- - model relationship (between each other); - frontend script cleanup; - new command: migrate commit; - small refactoring.
584
-
585
-
586
-
587
- ## [0.3.2] - 2025-12-28
588
-
589
- fixed an issue 6
590
-
591
- ## [0.3.1] - 2025-10-03
592
-
593
- bug fixed with overwriting committed changes
594
-
595
-
596
- ## [0.3.2] - 2025-12-28
597
-
598
- fixed an issue 6
599
-
600
- ## [0.2.2] - 2025-10-02
601
-
602
- fix bug: required params after optional in the generated models; fix: views(templates) are not stored in the registry and being regenerated (overwritten); small readme fix; running 'npm i' on 'create app' and 'npm run build' on 'generate'
603
-
604
-
605
-
606
-
607
- ## [0.3.2] - 2025-12-28
608
-
609
- fixed an issue 6
610
-
611
- ## [0.3.1] - 2025-10-03
612
-
613
- bug fixed with overwriting committed changes
614
-
615
-
616
- ## [0.3.2] - 2025-12-28
617
-
618
- fixed an issue 6
619
-
620
- ## [0.3.0] - 2025-10-03
621
-
622
- - model relationship (between each other); - frontend script cleanup; - new command: migrate commit; - small refactoring.
623
-
624
-
625
-
626
- ## [0.3.2] - 2025-12-28
627
-
628
- fixed an issue 6
629
-
630
- ## [0.3.1] - 2025-10-03
631
-
632
- bug fixed with overwriting committed changes
633
-
634
-
635
- ## [0.3.2] - 2025-12-28
636
-
637
- fixed an issue 6
47
+ fix: failed to generate with empty permissions actions
638
48
 
639
49
  ## [0.1.1] - 2025-09-17
640
50
 
641
51
  Initial release
642
-