@contember/cli 1.4.0-alpha.1 → 1.4.0-alpha.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.
Files changed (143) hide show
  1. package/Dockerfile +2 -2
  2. package/dist/src/commands/deploy/DeployCommand.d.ts +1 -1
  3. package/dist/src/commands/deploy/DeployCommand.d.ts.map +1 -1
  4. package/dist/src/commands/deploy/DeployCommand.js +8 -3
  5. package/dist/src/commands/deploy/DeployCommand.js.map +1 -1
  6. package/dist/src/commands/migrations/MigrationAmendCommand.d.ts.map +1 -1
  7. package/dist/src/commands/migrations/MigrationAmendCommand.js +6 -6
  8. package/dist/src/commands/migrations/MigrationAmendCommand.js.map +1 -1
  9. package/dist/src/commands/migrations/MigrationBlankCommand.d.ts +15 -0
  10. package/dist/src/commands/migrations/MigrationBlankCommand.d.ts.map +1 -0
  11. package/dist/src/commands/migrations/MigrationBlankCommand.js +29 -0
  12. package/dist/src/commands/migrations/MigrationBlankCommand.js.map +1 -0
  13. package/dist/src/commands/migrations/MigrationDescribeCommand.d.ts.map +1 -1
  14. package/dist/src/commands/migrations/MigrationDescribeCommand.js +5 -5
  15. package/dist/src/commands/migrations/MigrationDescribeCommand.js.map +1 -1
  16. package/dist/src/commands/migrations/MigrationDiffCommand.d.ts.map +1 -1
  17. package/dist/src/commands/migrations/MigrationDiffCommand.js +8 -3
  18. package/dist/src/commands/migrations/MigrationDiffCommand.js.map +1 -1
  19. package/dist/src/commands/migrations/MigrationExecuteCommand.d.ts +1 -1
  20. package/dist/src/commands/migrations/MigrationExecuteCommand.d.ts.map +1 -1
  21. package/dist/src/commands/migrations/MigrationExecuteCommand.js +8 -3
  22. package/dist/src/commands/migrations/MigrationExecuteCommand.js.map +1 -1
  23. package/dist/src/commands/migrations/MigrationRebaseCommand.d.ts.map +1 -1
  24. package/dist/src/commands/migrations/MigrationRebaseCommand.js +2 -3
  25. package/dist/src/commands/migrations/MigrationRebaseCommand.js.map +1 -1
  26. package/dist/src/commands/migrations/MigrationStatusCommand.d.ts +1 -2
  27. package/dist/src/commands/migrations/MigrationStatusCommand.d.ts.map +1 -1
  28. package/dist/src/commands/migrations/MigrationStatusCommand.js +5 -7
  29. package/dist/src/commands/migrations/MigrationStatusCommand.js.map +1 -1
  30. package/dist/src/commands/migrations/index.d.ts +1 -0
  31. package/dist/src/commands/migrations/index.d.ts.map +1 -1
  32. package/dist/src/commands/migrations/index.js +1 -0
  33. package/dist/src/commands/migrations/index.js.map +1 -1
  34. package/dist/src/commands/project/ProjectValidateCommand.js +2 -2
  35. package/dist/src/commands/project/ProjectValidateCommand.js.map +1 -1
  36. package/dist/src/run.js +1 -0
  37. package/dist/src/run.js.map +1 -1
  38. package/dist/src/tsconfig.tsbuildinfo +1 -1
  39. package/dist/src/utils/admin.d.ts.map +1 -1
  40. package/dist/src/utils/admin.js +1 -5
  41. package/dist/src/utils/admin.js.map +1 -1
  42. package/dist/src/utils/esbuild.d.ts +2 -0
  43. package/dist/src/utils/esbuild.d.ts.map +1 -0
  44. package/dist/src/utils/esbuild.js +41 -0
  45. package/dist/src/utils/esbuild.js.map +1 -0
  46. package/dist/src/utils/migrations/JsLoader.d.ts +9 -0
  47. package/dist/src/utils/migrations/JsLoader.d.ts.map +1 -0
  48. package/dist/src/utils/migrations/JsLoader.js +33 -0
  49. package/dist/src/utils/migrations/JsLoader.js.map +1 -0
  50. package/dist/src/utils/migrations/JsonLoader.d.ts +9 -0
  51. package/dist/src/utils/migrations/JsonLoader.d.ts.map +1 -0
  52. package/dist/src/utils/migrations/JsonLoader.js +17 -0
  53. package/dist/src/utils/migrations/JsonLoader.js.map +1 -0
  54. package/dist/src/{commands → utils}/migrations/MigrationCreateHelper.d.ts +6 -3
  55. package/dist/src/utils/migrations/MigrationCreateHelper.d.ts.map +1 -0
  56. package/dist/src/{commands → utils}/migrations/MigrationCreateHelper.js +1 -1
  57. package/dist/src/utils/migrations/MigrationCreateHelper.js.map +1 -0
  58. package/dist/src/utils/migrations/MigrationCreator.d.ts +21 -0
  59. package/dist/src/utils/migrations/MigrationCreator.d.ts.map +1 -0
  60. package/dist/src/utils/migrations/MigrationCreator.js +47 -0
  61. package/dist/src/utils/migrations/MigrationCreator.js.map +1 -0
  62. package/dist/src/{commands → utils}/migrations/MigrationExecuteHelper.d.ts +8 -4
  63. package/dist/src/utils/migrations/MigrationExecuteHelper.d.ts.map +1 -0
  64. package/dist/src/{commands → utils}/migrations/MigrationExecuteHelper.js +57 -5
  65. package/dist/src/utils/migrations/MigrationExecuteHelper.js.map +1 -0
  66. package/dist/src/utils/migrations/MigrationFile.d.ts +36 -0
  67. package/dist/src/utils/migrations/MigrationFile.d.ts.map +1 -0
  68. package/dist/src/utils/migrations/MigrationFile.js +6 -0
  69. package/dist/src/utils/migrations/MigrationFile.js.map +1 -0
  70. package/dist/src/utils/migrations/MigrationFileLoader.d.ts +5 -0
  71. package/dist/src/utils/migrations/MigrationFileLoader.d.ts.map +1 -0
  72. package/dist/src/utils/migrations/MigrationFileLoader.js +3 -0
  73. package/dist/src/utils/migrations/MigrationFileLoader.js.map +1 -0
  74. package/dist/src/utils/migrations/MigrationFilesManager.d.ts +18 -0
  75. package/dist/src/utils/migrations/MigrationFilesManager.d.ts.map +1 -0
  76. package/dist/src/utils/migrations/MigrationFilesManager.js +114 -0
  77. package/dist/src/utils/migrations/MigrationFilesManager.js.map +1 -0
  78. package/dist/src/utils/migrations/MigrationParser.d.ts +6 -0
  79. package/dist/src/utils/migrations/MigrationParser.d.ts.map +1 -0
  80. package/dist/src/utils/migrations/MigrationParser.js +33 -0
  81. package/dist/src/utils/migrations/MigrationParser.js.map +1 -0
  82. package/dist/src/{MigrationsContainer.d.ts → utils/migrations/MigrationsContainer.d.ts} +5 -1
  83. package/dist/src/utils/migrations/MigrationsContainer.d.ts.map +1 -0
  84. package/dist/src/utils/migrations/MigrationsContainer.js +50 -0
  85. package/dist/src/utils/migrations/MigrationsContainer.js.map +1 -0
  86. package/dist/src/utils/migrations/MigrationsResolver.d.ts +14 -0
  87. package/dist/src/utils/migrations/MigrationsResolver.d.ts.map +1 -0
  88. package/dist/src/utils/migrations/MigrationsResolver.js +37 -0
  89. package/dist/src/utils/migrations/MigrationsResolver.js.map +1 -0
  90. package/dist/src/utils/migrations/SchemaVersionBuilder.d.ts +13 -0
  91. package/dist/src/utils/migrations/SchemaVersionBuilder.d.ts.map +1 -0
  92. package/dist/src/utils/migrations/SchemaVersionBuilder.js +26 -0
  93. package/dist/src/utils/migrations/SchemaVersionBuilder.js.map +1 -0
  94. package/dist/src/utils/{migrations.d.ts → migrations/migrations.d.ts} +18 -22
  95. package/dist/src/utils/migrations/migrations.d.ts.map +1 -0
  96. package/dist/src/utils/{migrations.js → migrations/migrations.js} +13 -28
  97. package/dist/src/utils/migrations/migrations.js.map +1 -0
  98. package/dist/src/utils/project/loadSchema.d.ts.map +1 -1
  99. package/dist/src/utils/project/loadSchema.js +5 -44
  100. package/dist/src/utils/project/loadSchema.js.map +1 -1
  101. package/dist/src/utils/project/resources/out.css +106 -124
  102. package/dist/src/utils/system/index.d.ts +3 -4
  103. package/dist/src/utils/system/index.d.ts.map +1 -1
  104. package/dist/src/utils/system/index.js.map +1 -1
  105. package/package.json +26 -27
  106. package/src/commands/deploy/DeployCommand.ts +9 -4
  107. package/src/commands/migrations/MigrationAmendCommand.ts +7 -11
  108. package/src/commands/migrations/MigrationBlankCommand.ts +46 -0
  109. package/src/commands/migrations/MigrationDescribeCommand.ts +7 -5
  110. package/src/commands/migrations/MigrationDiffCommand.ts +8 -3
  111. package/src/commands/migrations/MigrationExecuteCommand.ts +8 -3
  112. package/src/commands/migrations/MigrationRebaseCommand.ts +2 -3
  113. package/src/commands/migrations/MigrationStatusCommand.ts +6 -9
  114. package/src/commands/migrations/index.ts +1 -0
  115. package/src/commands/project/ProjectValidateCommand.ts +2 -2
  116. package/src/run.ts +2 -0
  117. package/src/tsconfig.json +1 -0
  118. package/src/utils/admin.ts +0 -1
  119. package/src/utils/esbuild.ts +14 -0
  120. package/src/utils/migrations/JsLoader.ts +37 -0
  121. package/src/utils/migrations/JsonLoader.ts +18 -0
  122. package/src/{commands → utils}/migrations/MigrationCreateHelper.ts +7 -11
  123. package/src/utils/migrations/MigrationCreator.ts +60 -0
  124. package/src/{commands → utils}/migrations/MigrationExecuteHelper.ts +68 -9
  125. package/src/utils/migrations/MigrationFile.ts +52 -0
  126. package/src/utils/migrations/MigrationFileLoader.ts +5 -0
  127. package/src/utils/migrations/MigrationFilesManager.ts +102 -0
  128. package/src/utils/migrations/MigrationParser.ts +32 -0
  129. package/src/{MigrationsContainer.ts → utils/migrations/MigrationsContainer.ts} +29 -12
  130. package/src/utils/migrations/MigrationsResolver.ts +44 -0
  131. package/src/utils/migrations/SchemaVersionBuilder.ts +33 -0
  132. package/src/utils/{migrations.ts → migrations/migrations.ts} +33 -57
  133. package/src/utils/project/loadSchema.ts +7 -21
  134. package/src/utils/system/index.ts +3 -4
  135. package/dist/src/MigrationsContainer.d.ts.map +0 -1
  136. package/dist/src/MigrationsContainer.js +0 -25
  137. package/dist/src/MigrationsContainer.js.map +0 -1
  138. package/dist/src/commands/migrations/MigrationCreateHelper.d.ts.map +0 -1
  139. package/dist/src/commands/migrations/MigrationCreateHelper.js.map +0 -1
  140. package/dist/src/commands/migrations/MigrationExecuteHelper.d.ts.map +0 -1
  141. package/dist/src/commands/migrations/MigrationExecuteHelper.js.map +0 -1
  142. package/dist/src/utils/migrations.d.ts.map +0 -1
  143. package/dist/src/utils/migrations.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- ! tailwindcss v3.1.8 | MIT License | https://tailwindcss.com
2
+ ! tailwindcss v3.3.5 | MIT License | https://tailwindcss.com
3
3
  */
4
4
 
5
5
  /*
@@ -30,6 +30,8 @@
30
30
  2. Prevent adjustments of font size after orientation changes in iOS.
31
31
  3. Use a more readable tab size.
32
32
  4. Use the user's configured `sans` font-family by default.
33
+ 5. Use the user's configured `sans` font-feature-settings by default.
34
+ 6. Use the user's configured `sans` font-variation-settings by default.
33
35
  */
34
36
 
35
37
  html {
@@ -44,6 +46,10 @@ html {
44
46
  /* 3 */
45
47
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
46
48
  /* 4 */
49
+ font-feature-settings: normal;
50
+ /* 5 */
51
+ font-variation-settings: normal;
52
+ /* 6 */
47
53
  }
48
54
 
49
55
  /*
@@ -185,6 +191,10 @@ select,
185
191
  textarea {
186
192
  font-family: inherit;
187
193
  /* 1 */
194
+ font-feature-settings: inherit;
195
+ /* 1 */
196
+ font-variation-settings: inherit;
197
+ /* 1 */
188
198
  font-size: 100%;
189
199
  /* 1 */
190
200
  font-weight: inherit;
@@ -335,6 +345,14 @@ menu {
335
345
  padding: 0;
336
346
  }
337
347
 
348
+ /*
349
+ Reset default styling for dialogs.
350
+ */
351
+
352
+ dialog {
353
+ padding: 0;
354
+ }
355
+
338
356
  /*
339
357
  Prevent resizing textareas horizontally by default.
340
358
  */
@@ -410,54 +428,13 @@ video {
410
428
  height: auto;
411
429
  }
412
430
 
413
- *, ::before, ::after {
414
- --tw-border-spacing-x: 0;
415
- --tw-border-spacing-y: 0;
416
- --tw-translate-x: 0;
417
- --tw-translate-y: 0;
418
- --tw-rotate: 0;
419
- --tw-skew-x: 0;
420
- --tw-skew-y: 0;
421
- --tw-scale-x: 1;
422
- --tw-scale-y: 1;
423
- --tw-pan-x: ;
424
- --tw-pan-y: ;
425
- --tw-pinch-zoom: ;
426
- --tw-scroll-snap-strictness: proximity;
427
- --tw-ordinal: ;
428
- --tw-slashed-zero: ;
429
- --tw-numeric-figure: ;
430
- --tw-numeric-spacing: ;
431
- --tw-numeric-fraction: ;
432
- --tw-ring-inset: ;
433
- --tw-ring-offset-width: 0px;
434
- --tw-ring-offset-color: #fff;
435
- --tw-ring-color: rgb(59 130 246 / 0.5);
436
- --tw-ring-offset-shadow: 0 0 #0000;
437
- --tw-ring-shadow: 0 0 #0000;
438
- --tw-shadow: 0 0 #0000;
439
- --tw-shadow-colored: 0 0 #0000;
440
- --tw-blur: ;
441
- --tw-brightness: ;
442
- --tw-contrast: ;
443
- --tw-grayscale: ;
444
- --tw-hue-rotate: ;
445
- --tw-invert: ;
446
- --tw-saturate: ;
447
- --tw-sepia: ;
448
- --tw-drop-shadow: ;
449
- --tw-backdrop-blur: ;
450
- --tw-backdrop-brightness: ;
451
- --tw-backdrop-contrast: ;
452
- --tw-backdrop-grayscale: ;
453
- --tw-backdrop-hue-rotate: ;
454
- --tw-backdrop-invert: ;
455
- --tw-backdrop-opacity: ;
456
- --tw-backdrop-saturate: ;
457
- --tw-backdrop-sepia: ;
431
+ /* Make elements with the HTML hidden attribute stay hidden by default */
432
+
433
+ [hidden] {
434
+ display: none;
458
435
  }
459
436
 
460
- ::-webkit-backdrop {
437
+ *, ::before, ::after {
461
438
  --tw-border-spacing-x: 0;
462
439
  --tw-border-spacing-y: 0;
463
440
  --tw-translate-x: 0;
@@ -471,6 +448,9 @@ video {
471
448
  --tw-pan-y: ;
472
449
  --tw-pinch-zoom: ;
473
450
  --tw-scroll-snap-strictness: proximity;
451
+ --tw-gradient-from-position: ;
452
+ --tw-gradient-via-position: ;
453
+ --tw-gradient-to-position: ;
474
454
  --tw-ordinal: ;
475
455
  --tw-slashed-zero: ;
476
456
  --tw-numeric-figure: ;
@@ -518,6 +498,9 @@ video {
518
498
  --tw-pan-y: ;
519
499
  --tw-pinch-zoom: ;
520
500
  --tw-scroll-snap-strictness: proximity;
501
+ --tw-gradient-from-position: ;
502
+ --tw-gradient-via-position: ;
503
+ --tw-gradient-to-position: ;
521
504
  --tw-ordinal: ;
522
505
  --tw-slashed-zero: ;
523
506
  --tw-numeric-figure: ;
@@ -555,14 +538,6 @@ video {
555
538
  margin: 1rem;
556
539
  }
557
540
 
558
- .mt-2 {
559
- margin-top: 0.5rem;
560
- }
561
-
562
- .ml-4 {
563
- margin-left: 1rem;
564
- }
565
-
566
541
  .mb-1 {
567
542
  margin-bottom: 0.25rem;
568
543
  }
@@ -571,6 +546,14 @@ video {
571
546
  margin-bottom: 0.5rem;
572
547
  }
573
548
 
549
+ .ml-4 {
550
+ margin-left: 1rem;
551
+ }
552
+
553
+ .mt-2 {
554
+ margin-top: 0.5rem;
555
+ }
556
+
574
557
  .flex {
575
558
  display: flex;
576
559
  }
@@ -579,6 +562,14 @@ video {
579
562
  display: table;
580
563
  }
581
564
 
565
+ .w-1\/2 {
566
+ width: 50%;
567
+ }
568
+
569
+ .w-\[120px\] {
570
+ width: 120px;
571
+ }
572
+
582
573
  .w-\[180px\] {
583
574
  width: 180px;
584
575
  }
@@ -587,22 +578,18 @@ video {
587
578
  width: 340px;
588
579
  }
589
580
 
590
- .w-\[120px\] {
591
- width: 120px;
592
- }
593
-
594
581
  .w-\[420px\] {
595
582
  width: 420px;
596
583
  }
597
584
 
598
- .w-1\/2 {
599
- width: 50%;
600
- }
601
-
602
585
  .w-full {
603
586
  width: 100%;
604
587
  }
605
588
 
589
+ .max-w-\[120px\] {
590
+ max-width: 120px;
591
+ }
592
+
606
593
  .max-w-\[180px\] {
607
594
  max-width: 180px;
608
595
  }
@@ -611,10 +598,6 @@ video {
611
598
  max-width: 340px;
612
599
  }
613
600
 
614
- .max-w-\[120px\] {
615
- max-width: 120px;
616
- }
617
-
618
601
  .max-w-\[420px\] {
619
602
  max-width: 420px;
620
603
  }
@@ -633,14 +616,14 @@ video {
633
616
  white-space: nowrap;
634
617
  }
635
618
 
636
- .rounded-lg {
637
- border-radius: 0.5rem;
638
- }
639
-
640
619
  .rounded {
641
620
  border-radius: 0.25rem;
642
621
  }
643
622
 
623
+ .rounded-lg {
624
+ border-radius: 0.5rem;
625
+ }
626
+
644
627
  .rounded-t-lg {
645
628
  border-top-left-radius: 0.5rem;
646
629
  border-top-right-radius: 0.5rem;
@@ -659,11 +642,6 @@ video {
659
642
  border-color: rgb(156 163 175 / var(--tw-border-opacity));
660
643
  }
661
644
 
662
- .bg-green-200 {
663
- --tw-bg-opacity: 1;
664
- background-color: rgb(187 247 208 / var(--tw-bg-opacity));
665
- }
666
-
667
645
  .bg-black {
668
646
  --tw-bg-opacity: 1;
669
647
  background-color: rgb(0 0 0 / var(--tw-bg-opacity));
@@ -674,19 +652,14 @@ video {
674
652
  background-color: rgb(96 165 250 / var(--tw-bg-opacity));
675
653
  }
676
654
 
677
- .bg-red-400 {
678
- --tw-bg-opacity: 1;
679
- background-color: rgb(248 113 113 / var(--tw-bg-opacity));
680
- }
681
-
682
655
  .bg-gray-100 {
683
656
  --tw-bg-opacity: 1;
684
657
  background-color: rgb(243 244 246 / var(--tw-bg-opacity));
685
658
  }
686
659
 
687
- .bg-red-500 {
660
+ .bg-green-200 {
688
661
  --tw-bg-opacity: 1;
689
- background-color: rgb(239 68 68 / var(--tw-bg-opacity));
662
+ background-color: rgb(187 247 208 / var(--tw-bg-opacity));
690
663
  }
691
664
 
692
665
  .bg-green-600 {
@@ -694,6 +667,16 @@ video {
694
667
  background-color: rgb(22 163 74 / var(--tw-bg-opacity));
695
668
  }
696
669
 
670
+ .bg-red-400 {
671
+ --tw-bg-opacity: 1;
672
+ background-color: rgb(248 113 113 / var(--tw-bg-opacity));
673
+ }
674
+
675
+ .bg-red-500 {
676
+ --tw-bg-opacity: 1;
677
+ background-color: rgb(239 68 68 / var(--tw-bg-opacity));
678
+ }
679
+
697
680
  .bg-yellow-400 {
698
681
  --tw-bg-opacity: 1;
699
682
  background-color: rgb(250 204 21 / var(--tw-bg-opacity));
@@ -707,19 +690,14 @@ video {
707
690
  padding: 1.5rem;
708
691
  }
709
692
 
710
- .py-2 {
711
- padding-top: 0.5rem;
712
- padding-bottom: 0.5rem;
713
- }
714
-
715
- .px-4 {
716
- padding-left: 1rem;
717
- padding-right: 1rem;
693
+ .px-0 {
694
+ padding-left: 0px;
695
+ padding-right: 0px;
718
696
  }
719
697
 
720
- .px-2 {
721
- padding-left: 0.5rem;
722
- padding-right: 0.5rem;
698
+ .px-0\.5 {
699
+ padding-left: 0.125rem;
700
+ padding-right: 0.125rem;
723
701
  }
724
702
 
725
703
  .px-1 {
@@ -727,14 +705,19 @@ video {
727
705
  padding-right: 0.25rem;
728
706
  }
729
707
 
730
- .px-0\.5 {
731
- padding-left: 0.125rem;
732
- padding-right: 0.125rem;
708
+ .px-2 {
709
+ padding-left: 0.5rem;
710
+ padding-right: 0.5rem;
733
711
  }
734
712
 
735
- .px-0 {
736
- padding-left: 0px;
737
- padding-right: 0px;
713
+ .px-4 {
714
+ padding-left: 1rem;
715
+ padding-right: 1rem;
716
+ }
717
+
718
+ .py-2 {
719
+ padding-top: 0.5rem;
720
+ padding-bottom: 0.5rem;
738
721
  }
739
722
 
740
723
  .text-left {
@@ -745,9 +728,9 @@ video {
745
728
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
746
729
  }
747
730
 
748
- .text-xs {
749
- font-size: 0.75rem;
750
- line-height: 1rem;
731
+ .text-lg {
732
+ font-size: 1.125rem;
733
+ line-height: 1.75rem;
751
734
  }
752
735
 
753
736
  .text-sm {
@@ -755,16 +738,16 @@ video {
755
738
  line-height: 1.25rem;
756
739
  }
757
740
 
758
- .text-lg {
759
- font-size: 1.125rem;
760
- line-height: 1.75rem;
761
- }
762
-
763
741
  .text-xl {
764
742
  font-size: 1.25rem;
765
743
  line-height: 1.75rem;
766
744
  }
767
745
 
746
+ .text-xs {
747
+ font-size: 0.75rem;
748
+ line-height: 1rem;
749
+ }
750
+
768
751
  .font-bold {
769
752
  font-weight: 700;
770
753
  }
@@ -781,19 +764,19 @@ video {
781
764
  font-style: italic;
782
765
  }
783
766
 
784
- .text-gray-900 {
767
+ .text-black {
785
768
  --tw-text-opacity: 1;
786
- color: rgb(17 24 39 / var(--tw-text-opacity));
769
+ color: rgb(0 0 0 / var(--tw-text-opacity));
787
770
  }
788
771
 
789
- .text-gray-500 {
772
+ .text-blue-500 {
790
773
  --tw-text-opacity: 1;
791
- color: rgb(107 114 128 / var(--tw-text-opacity));
774
+ color: rgb(59 130 246 / var(--tw-text-opacity));
792
775
  }
793
776
 
794
- .text-gray-800 {
777
+ .text-gray-500 {
795
778
  --tw-text-opacity: 1;
796
- color: rgb(31 41 55 / var(--tw-text-opacity));
779
+ color: rgb(107 114 128 / var(--tw-text-opacity));
797
780
  }
798
781
 
799
782
  .text-gray-600 {
@@ -801,24 +784,24 @@ video {
801
784
  color: rgb(75 85 99 / var(--tw-text-opacity));
802
785
  }
803
786
 
804
- .text-blue-500 {
787
+ .text-gray-700 {
805
788
  --tw-text-opacity: 1;
806
- color: rgb(59 130 246 / var(--tw-text-opacity));
789
+ color: rgb(55 65 81 / var(--tw-text-opacity));
807
790
  }
808
791
 
809
- .text-white {
792
+ .text-gray-800 {
810
793
  --tw-text-opacity: 1;
811
- color: rgb(255 255 255 / var(--tw-text-opacity));
794
+ color: rgb(31 41 55 / var(--tw-text-opacity));
812
795
  }
813
796
 
814
- .text-gray-700 {
797
+ .text-gray-900 {
815
798
  --tw-text-opacity: 1;
816
- color: rgb(55 65 81 / var(--tw-text-opacity));
799
+ color: rgb(17 24 39 / var(--tw-text-opacity));
817
800
  }
818
801
 
819
- .text-black {
802
+ .text-white {
820
803
  --tw-text-opacity: 1;
821
- color: rgb(0 0 0 / var(--tw-text-opacity));
804
+ color: rgb(255 255 255 / var(--tw-text-opacity));
822
805
  }
823
806
 
824
807
  .even\:bg-gray-100:nth-child(even) {
@@ -832,8 +815,7 @@ video {
832
815
  }
833
816
 
834
817
  .hover\:underline:hover {
835
- -webkit-text-decoration-line: underline;
836
- text-decoration-line: underline;
818
+ text-decoration-line: underline;
837
819
  }
838
820
 
839
821
  .group:target .group-target\:bg-yellow-100 {
@@ -1,6 +1,5 @@
1
1
  import { GraphQLClient } from 'graphql-request';
2
- import { Migration } from '@contember/schema-migrations';
3
- import { ExecutedMigration, ExecutedMigrationInfo } from '../migrations';
2
+ import { ExecutedMigration, ExecutedMigrationInfo } from '../migrations/migrations';
4
3
  export type MigrateError = {
5
4
  readonly code: MigrateErrorCode;
6
5
  readonly migration: string;
@@ -22,9 +21,9 @@ export declare class SystemClient {
22
21
  private readonly apiClient;
23
22
  constructor(apiClient: GraphQLClient);
24
23
  static create(baseUrl: string, projectName: string, apiToken: string): SystemClient;
25
- migrate(migrations: Migration[], force?: boolean): Promise<void>;
24
+ migrate(migrations: any[], force?: boolean): Promise<void>;
26
25
  migrationDelete(version: string): Promise<void>;
27
- migrationModify(version: string, modification: Partial<Migration>): Promise<void>;
26
+ migrationModify(version: string, modification: Partial<any>): Promise<void>;
28
27
  listExecutedMigrations(): Promise<ExecutedMigrationInfo[]>;
29
28
  getExecutedMigration(version: string): Promise<ExecutedMigration>;
30
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/system/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAExE,MAAM,MAAM,YAAY,GAAG;IAC1B,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAA;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,oBAAY,gBAAgB;IAC3B,gBAAgB,uBAAuB;IACvC,eAAe,qBAAqB;IACpC,aAAa,mBAAmB;IAChC,aAAa,mBAAmB;IAChC,eAAe,qBAAqB;CACpC;AAED,MAAM,MAAM,eAAe,GAAG;IAC7B,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,MAAM,EAAE,YAAY,EAAE,CAAA;CAC/B,CAAA;AAED,eAAO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AU,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAC3F,CAAA;IACF,CAAC;CACD;AAxHD,oCAwHC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contember/cli",
3
- "version": "1.4.0-alpha.1",
3
+ "version": "1.4.0-alpha.3",
4
4
  "license": "Apache-2.0",
5
5
  "bin": {
6
6
  "contember": "./dist/src/run.js"
@@ -10,38 +10,37 @@
10
10
  "test": "echo 'No tests'"
11
11
  },
12
12
  "devDependencies": {
13
- "@types/fs-extra": "^9.0.3",
14
- "@types/js-yaml": "^4.0.1",
15
- "@types/node": "^18",
16
- "@types/prompts": "^2.0.1",
17
- "@types/semver": "^7.5.0",
18
- "autoprefixer": "^10.4.5",
19
- "postcss": "^8.4.12",
20
- "tailwindcss": "^3.0.24"
13
+ "@types/fs-extra": "^11.0.4",
14
+ "@types/js-yaml": "^4.0.9",
15
+ "@types/node": "^20.9.0",
16
+ "@types/prompts": "^2.4.8",
17
+ "@types/semver": "^7.5.5",
18
+ "autoprefixer": "^10.4.16",
19
+ "postcss": "^8.4.31",
20
+ "tailwindcss": "^3.3.5"
21
21
  },
22
22
  "dependencies": {
23
- "@contember/cli-common": "1.4.0-alpha.1",
24
- "@contember/config-loader": "1.4.0-alpha.1",
25
- "@contember/database": "1.4.0-alpha.1",
26
- "@contember/dic": "1.4.0-alpha.1",
27
- "@contember/engine-content-api": "1.4.0-alpha.1",
28
- "@contember/schema": "1.4.0-alpha.1",
29
- "@contember/schema-migrations": "1.4.0-alpha.1",
30
- "@contember/schema-utils": "1.4.0-alpha.1",
23
+ "@contember/cli-common": "1.4.0-alpha.3",
24
+ "@contember/config-loader": "1.4.0-alpha.3",
25
+ "@contember/database": "1.4.0-alpha.3",
26
+ "@contember/dic": "1.4.0-alpha.3",
27
+ "@contember/engine-common": "1.4.0-alpha.3",
28
+ "@contember/engine-content-api": "1.4.0-alpha.3",
29
+ "@contember/schema": "1.4.0-alpha.3",
30
+ "@contember/schema-migrations": "1.4.0-alpha.3",
31
+ "@contember/schema-utils": "1.4.0-alpha.3",
31
32
  "@graphql-tools/schema": "^10.0.0",
32
33
  "chalk": "^4.1.2",
33
34
  "chalk-table": "^1.0.2",
34
- "esbuild": "^0.17.5",
35
- "graphql": "^16.5.0",
36
- "graphql-request": "^4.3.0",
35
+ "esbuild": "^0.18.20",
36
+ "graphql": "^16.8.1",
37
+ "graphql-request": "^6.1.0",
37
38
  "js-yaml": "^4.1.0",
38
- "node-fetch": "^2.0",
39
- "pg": "^8.9.0",
40
- "preact": "^10.7.1",
41
- "preact-render-to-string": "^5.2.0",
42
- "prompts": "^2.2.1",
43
- "semver": "^7.5.1",
44
- "vm2": "^3.9.9",
39
+ "pg": "^8.11.3",
40
+ "preact": "^10.19.2",
41
+ "preact-render-to-string": "^6.3.1",
42
+ "prompts": "^2.4.2",
43
+ "semver": "^7.5.4",
45
44
  "yawn-yaml": "^1.5.0"
46
45
  }
47
46
  }
@@ -4,14 +4,14 @@ import {
4
4
  ExecuteMigrationOptions,
5
5
  executeMigrations,
6
6
  resolveMigrationStatus,
7
- } from '../migrations/MigrationExecuteHelper'
7
+ } from '../../utils/migrations/MigrationExecuteHelper'
8
8
  import { interactiveResolveApiToken, TenantClient } from '../../utils/tenant'
9
9
  import { interactiveResolveInstanceEnvironmentFromInput } from '../../utils/instance'
10
- import { SystemClient } from '../../utils/system'
11
- import { MigrationsContainerFactory } from '../../MigrationsContainer'
10
+ import { createSystemUrl, SystemClient } from '../../utils/system'
11
+ import { MigrationsContainerFactory } from '../../utils/migrations/MigrationsContainer'
12
12
  import { AdminClient, readAdminFiles } from '../../utils/admin'
13
13
  import prompts from 'prompts'
14
- import { createMigrationStatusTable } from '../../utils/migrations'
14
+ import { createMigrationStatusTable } from '../../utils/migrations/migrations'
15
15
  import { maskToken } from '../../utils/token'
16
16
  import { parseDsn } from '../../utils/dsn'
17
17
 
@@ -129,6 +129,11 @@ export class DeployCommand extends Command<Args, Options> {
129
129
  migrations: status.migrationsToExecute,
130
130
  requireConfirmation: false,
131
131
  force: false,
132
+ contentMigrationFactoryArgs: {
133
+ apiToken,
134
+ apiBaseUrl: instance.baseUrl.replace(/\/$/, ''),
135
+ projectName: remoteProject,
136
+ },
132
137
  })
133
138
 
134
139
  if (migrationExitCode !== 0) {
@@ -1,14 +1,9 @@
1
1
  import { Command, CommandConfiguration, Input, Workspace } from '@contember/cli-common'
2
2
  import { printValidationErrors } from '../../utils/schema'
3
3
  import { InvalidSchemaException } from '@contember/schema-migrations'
4
- import { executeCreateMigrationCommand } from './MigrationCreateHelper'
5
- import {
6
- createMigrationStatusTable,
7
- getLatestMigration,
8
- getMigrationByName,
9
- printMigrationDescription,
10
- } from '../../utils/migrations'
11
- import { resolveMigrationStatus } from './MigrationExecuteHelper'
4
+ import { executeCreateMigrationCommand } from '../../utils/migrations/MigrationCreateHelper'
5
+ import { createMigrationStatusTable, printMigrationDescription } from '../../utils/migrations/migrations'
6
+ import { resolveMigrationStatus } from '../../utils/migrations/MigrationExecuteHelper'
12
7
  import { resolveSystemApiClient } from './SystemApiClientResolver'
13
8
  import prompts from 'prompts'
14
9
  import { emptySchema } from '@contember/schema-utils'
@@ -60,8 +55,9 @@ export class MigrationAmendCommand extends Command<Args, Options> {
60
55
  }) => {
61
56
  const migrationName = input.getArgument('migration')
62
57
  const amendMigration = migrationName
63
- ? await getMigrationByName(migrationsResolver, migrationName)
64
- : await getLatestMigration(migrationsResolver)
58
+ ? await migrationsResolver.findSchemaMigrationByVersion(migrationName)
59
+ : await migrationsResolver.findLatestSchemaMigration()
60
+
65
61
  if (!amendMigration) {
66
62
  throw 'No migration to amend'
67
63
  }
@@ -98,7 +94,7 @@ export class MigrationAmendCommand extends Command<Args, Options> {
98
94
  amendMigration.formatVersion,
99
95
  )
100
96
  const newMigrationResult = await migrationCreator.prepareMigration(prevSchema, newSchema, '')
101
- const followingMigrations = (await migrationsResolver.getMigrations()).filter(
97
+ const followingMigrations = (await migrationsResolver.getSchemaMigrations()).filter(
102
98
  it => it.version > amendMigration.version,
103
99
  )
104
100
 
@@ -0,0 +1,46 @@
1
+ import { Command, CommandConfiguration, Input, Workspace } from '@contember/cli-common'
2
+ import { executeCreateMigrationCommand } from '../../utils/migrations/MigrationCreateHelper'
3
+
4
+ type Args = {
5
+ project?: string
6
+ migrationName: string
7
+ format?: string
8
+ }
9
+
10
+ type Options = {
11
+ }
12
+
13
+ export class MigrationBlankCommand extends Command<Args, Options> {
14
+ constructor(
15
+ private readonly workspace: Workspace,
16
+ ) {
17
+ super()
18
+ }
19
+
20
+ protected configure(configuration: CommandConfiguration<Args, Options>): void {
21
+ configuration.description('Creates new blank migration file')
22
+ if (!this.workspace.isSingleProjectMode()) {
23
+ configuration.argument('project')
24
+
25
+ }
26
+ configuration.argument('migrationName')
27
+ configuration.argument('format').optional().validator(it => !it || ['js', 'ts', 'json'].includes(it))
28
+ .description('Migration file format (js, ts, json), default is ts.')
29
+ }
30
+
31
+ protected async execute(input: Input<Args, Options>): Promise<number> {
32
+ return await executeCreateMigrationCommand(
33
+ input,
34
+ { workspace: this.workspace },
35
+ async ({
36
+ migrationCreator,
37
+ }) => {
38
+ const filename = await migrationCreator.createEmptyMigrationFile(input.getArgument('migrationName'), input.getArgument('format') || 'ts')
39
+ console.log(`${filename} created`)
40
+
41
+ return 0
42
+ },
43
+ )
44
+ }
45
+ }
46
+
@@ -1,6 +1,6 @@
1
1
  import { Command, CommandConfiguration, Input, Workspace } from '@contember/cli-common'
2
- import { MigrationsContainerFactory } from '../../MigrationsContainer'
3
- import { getLatestMigration, getMigrationByName, printMigrationDescription } from '../../utils/migrations'
2
+ import { MigrationsContainerFactory } from '../../utils/migrations/MigrationsContainer'
3
+ import { printMigrationDescription } from '../../utils/migrations/migrations'
4
4
 
5
5
  type Args = {
6
6
  project?: string
@@ -40,9 +40,11 @@ export class MigrationDescribeCommand extends Command<Args, Options> {
40
40
 
41
41
  const migrationArg = input.getArgument('migration')
42
42
  const migrationsResolver = container.migrationsResolver
43
- const migration = await (migrationArg
44
- ? getMigrationByName(migrationsResolver, migrationArg)
45
- : getLatestMigration(migrationsResolver))
43
+
44
+ const migration = migrationArg
45
+ ? await migrationsResolver.findSchemaMigrationByVersion(migrationArg)
46
+ : await migrationsResolver.findLatestSchemaMigration()
47
+
46
48
  if (!migration) {
47
49
  throw 'Undefined migration'
48
50
  }