@tramvai/cli 5.53.80 → 5.53.94

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 (153) hide show
  1. package/README.md +1 -1
  2. package/lib/api/analyze/index.d.ts.map +1 -1
  3. package/lib/api/analyze/index.js +1 -13
  4. package/lib/api/analyze/index.js.map +1 -1
  5. package/lib/api/benchmark/build.d.ts +1 -6
  6. package/lib/api/benchmark/build.d.ts.map +1 -1
  7. package/lib/api/benchmark/build.js +59 -23
  8. package/lib/api/benchmark/build.js.map +1 -1
  9. package/lib/api/benchmark/const.d.ts +2 -0
  10. package/lib/api/benchmark/const.d.ts.map +1 -0
  11. package/lib/api/benchmark/const.js +5 -0
  12. package/lib/api/benchmark/const.js.map +1 -0
  13. package/lib/api/benchmark/index.d.ts +4 -6
  14. package/lib/api/benchmark/index.d.ts.map +1 -1
  15. package/lib/api/benchmark/index.js.map +1 -1
  16. package/lib/api/benchmark/start.d.ts +1 -7
  17. package/lib/api/benchmark/start.d.ts.map +1 -1
  18. package/lib/api/benchmark/start.js +56 -49
  19. package/lib/api/benchmark/start.js.map +1 -1
  20. package/lib/api/benchmark/types.d.ts +76 -12
  21. package/lib/api/benchmark/types.d.ts.map +1 -1
  22. package/lib/api/benchmark/utils/compilationUtils.d.ts +4 -0
  23. package/lib/api/benchmark/utils/compilationUtils.d.ts.map +1 -0
  24. package/lib/api/benchmark/utils/compilationUtils.js +157 -0
  25. package/lib/api/benchmark/utils/compilationUtils.js.map +1 -0
  26. package/lib/api/benchmark/utils/stats.d.ts +2 -7
  27. package/lib/api/benchmark/utils/stats.d.ts.map +1 -1
  28. package/lib/api/benchmark/utils/stats.js +36 -22
  29. package/lib/api/benchmark/utils/stats.js.map +1 -1
  30. package/lib/api/build/index.d.ts +1 -0
  31. package/lib/api/build/index.d.ts.map +1 -1
  32. package/lib/api/build/index.js.map +1 -1
  33. package/lib/api/index.js +1 -1
  34. package/lib/api/index.js.map +1 -1
  35. package/lib/api/start/index.d.ts +1 -0
  36. package/lib/api/start/index.d.ts.map +1 -1
  37. package/lib/api/start/index.js.map +1 -1
  38. package/lib/builder/webpack/analyzePlugins/rsdoctor.d.ts +5 -5
  39. package/lib/builder/webpack/analyzePlugins/rsdoctor.d.ts.map +1 -1
  40. package/lib/builder/webpack/analyzePlugins/rsdoctor.js +7 -9
  41. package/lib/builder/webpack/analyzePlugins/rsdoctor.js.map +1 -1
  42. package/lib/builder/webpack/index.d.ts.map +1 -1
  43. package/lib/builder/webpack/index.js +14 -12
  44. package/lib/builder/webpack/index.js.map +1 -1
  45. package/lib/builder/webpack/providers/build/client.d.ts.map +1 -1
  46. package/lib/builder/webpack/providers/build/client.js +3 -2
  47. package/lib/builder/webpack/providers/build/client.js.map +1 -1
  48. package/lib/builder/webpack/providers/build/server.d.ts.map +1 -1
  49. package/lib/builder/webpack/providers/build/server.js +3 -2
  50. package/lib/builder/webpack/providers/build/server.js.map +1 -1
  51. package/lib/builder/webpack/providers/shared.d.ts.map +1 -1
  52. package/lib/builder/webpack/providers/shared.js +39 -5
  53. package/lib/builder/webpack/providers/shared.js.map +1 -1
  54. package/lib/builder/webpack/providers/start/shared.d.ts.map +1 -1
  55. package/lib/builder/webpack/providers/start/shared.js +6 -2
  56. package/lib/builder/webpack/providers/start/shared.js.map +1 -1
  57. package/lib/builder/webpack/tokens.d.ts +8 -16
  58. package/lib/builder/webpack/tokens.d.ts.map +1 -1
  59. package/lib/cli/index.d.ts.map +1 -1
  60. package/lib/cli/index.js +12 -12
  61. package/lib/cli/index.js.map +1 -1
  62. package/lib/commands/analyze/command.d.ts +1 -1
  63. package/lib/commands/analyze/command.d.ts.map +1 -1
  64. package/lib/commands/benchmark/benchmark.d.ts +3 -1
  65. package/lib/commands/benchmark/benchmark.d.ts.map +1 -1
  66. package/lib/commands/benchmark/benchmark.js +130 -31
  67. package/lib/commands/benchmark/benchmark.js.map +1 -1
  68. package/lib/commands/benchmark/command.d.ts +9 -0
  69. package/lib/commands/benchmark/command.d.ts.map +1 -1
  70. package/lib/commands/benchmark/command.js +12 -0
  71. package/lib/commands/benchmark/command.js.map +1 -1
  72. package/lib/commands/build/command.d.ts.map +1 -1
  73. package/lib/commands/build/command.js +5 -0
  74. package/lib/commands/build/command.js.map +1 -1
  75. package/lib/commands/new/steps/installDependencies.js +1 -1
  76. package/lib/commands/new/steps/installDependencies.js.map +1 -1
  77. package/lib/commands/start/command.d.ts.map +1 -1
  78. package/lib/commands/start/command.js +5 -0
  79. package/lib/commands/start/command.js.map +1 -1
  80. package/lib/config/configManager.d.ts +2 -0
  81. package/lib/config/configManager.d.ts.map +1 -1
  82. package/lib/config/configManager.js +2 -0
  83. package/lib/config/configManager.js.map +1 -1
  84. package/lib/di/tokens/config.d.ts +4 -8
  85. package/lib/di/tokens/config.d.ts.map +1 -1
  86. package/lib/library/webpack/blocks/js.d.ts.map +1 -1
  87. package/lib/library/webpack/blocks/js.js +57 -11
  88. package/lib/library/webpack/blocks/js.js.map +1 -1
  89. package/lib/library/webpack/common/main.d.ts.map +1 -1
  90. package/lib/library/webpack/common/main.js +7 -0
  91. package/lib/library/webpack/common/main.js.map +1 -1
  92. package/lib/library/webpack/utils/rsdoctor.d.ts +2 -0
  93. package/lib/library/webpack/utils/rsdoctor.d.ts.map +1 -0
  94. package/lib/library/webpack/utils/rsdoctor.js +27 -0
  95. package/lib/library/webpack/utils/rsdoctor.js.map +1 -0
  96. package/lib/library/webpack/utils/threadLoader.d.ts.map +1 -1
  97. package/lib/library/webpack/utils/threadLoader.js +3 -3
  98. package/lib/library/webpack/utils/threadLoader.js.map +1 -1
  99. package/lib/schema/autogeneratedSchema.json +228 -120
  100. package/lib/typings/build/Builder.d.ts +6 -2
  101. package/lib/typings/build/Builder.d.ts.map +1 -1
  102. package/lib/typings/configEntry/cli.d.ts +5 -0
  103. package/lib/typings/configEntry/cli.d.ts.map +1 -1
  104. package/package.json +16 -17
  105. package/schema.json +228 -120
  106. package/src/api/analyze/index.ts +3 -16
  107. package/src/api/benchmark/__integration__/start.test.ts +10 -12
  108. package/src/api/benchmark/build.ts +75 -30
  109. package/src/api/benchmark/const.ts +1 -0
  110. package/src/api/benchmark/index.ts +4 -6
  111. package/src/api/benchmark/start.ts +69 -65
  112. package/src/api/benchmark/types.ts +82 -14
  113. package/src/api/benchmark/utils/compilationUtils.ts +213 -0
  114. package/src/api/benchmark/utils/stats.ts +45 -28
  115. package/src/api/build/index.ts +1 -0
  116. package/src/api/index.ts +1 -1
  117. package/src/api/start/index.ts +1 -0
  118. package/src/builder/webpack/analyzePlugins/rsdoctor.ts +11 -14
  119. package/src/builder/webpack/index.ts +16 -21
  120. package/src/builder/webpack/providers/build/client.ts +7 -2
  121. package/src/builder/webpack/providers/build/server.ts +7 -2
  122. package/src/builder/webpack/providers/shared.ts +53 -5
  123. package/src/builder/webpack/providers/start/shared.ts +7 -2
  124. package/src/cli/index.ts +3 -2
  125. package/src/commands/analyze/command.ts +1 -1
  126. package/src/commands/benchmark/benchmark.ts +168 -33
  127. package/src/commands/benchmark/command.ts +12 -0
  128. package/src/commands/build/command.ts +6 -0
  129. package/src/commands/new/steps/installDependencies.ts +1 -1
  130. package/src/commands/new/templates/shared/_prettierrc.js.hbs +1 -1
  131. package/src/commands/new/templates/shared/package.json.hbs +1 -1
  132. package/src/commands/start/command.ts +6 -0
  133. package/src/config/configManager.ts +4 -0
  134. package/src/library/webpack/blocks/js.ts +61 -12
  135. package/src/library/webpack/common/main.ts +8 -0
  136. package/src/library/webpack/utils/rsdoctor.ts +26 -0
  137. package/src/library/webpack/utils/threadLoader.ts +1 -0
  138. package/src/models/config.spec.ts +4 -0
  139. package/src/schema/autogeneratedSchema.json +228 -120
  140. package/src/schema/tramvai.spec.ts +2 -0
  141. package/src/typings/build/Builder.ts +7 -2
  142. package/src/typings/configEntry/cli.ts +6 -0
  143. package/lib/api/analyze/providers/shared.d.ts +0 -3
  144. package/lib/api/analyze/providers/shared.d.ts.map +0 -1
  145. package/lib/api/analyze/providers/shared.js +0 -23
  146. package/lib/api/analyze/providers/shared.js.map +0 -1
  147. package/lib/builder/webpack/providers/analyze/shared.d.ts +0 -3
  148. package/lib/builder/webpack/providers/analyze/shared.d.ts.map +0 -1
  149. package/lib/builder/webpack/providers/analyze/shared.js +0 -141
  150. package/lib/builder/webpack/providers/analyze/shared.js.map +0 -1
  151. package/src/api/analyze/providers/shared.ts +0 -26
  152. package/src/api/benchmark/utils/stats.spec.ts +0 -36
  153. package/src/builder/webpack/providers/analyze/shared.ts +0 -160
package/schema.json CHANGED
@@ -821,49 +821,22 @@
821
821
  "title": "experiments configuration for [webpack](https://webpack.js.org/configuration/experiments/)",
822
822
  "default": {},
823
823
  "type": "object",
824
+ "additionalProperties": false,
825
+ "patternProperties": {
826
+ "^[0-9]+$": {}
827
+ },
824
828
  "properties": {
825
- "asyncWebAssembly": {
826
- "description": "Support WebAssembly as asynchronous EcmaScript Module.",
827
- "type": "boolean"
828
- },
829
- "backCompat": {
830
- "description": "Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.",
831
- "title": "Enable backward compatibility with webpack previous major versions",
832
- "default": false,
833
- "type": "boolean"
834
- },
835
829
  "cacheUnaffected": {
836
- "description": "Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.",
837
830
  "title": "Enable additional in-memory caching of modules which are unchanged and reference only unchanged modules.",
838
831
  "default": true,
839
832
  "type": "boolean"
840
833
  },
841
- "futureDefaults": {
842
- "description": "Apply defaults of next major version.",
843
- "type": "boolean"
844
- },
845
- "layers": {
846
- "description": "Enable module layers.",
847
- "type": "boolean"
848
- },
849
- "outputModule": {
850
- "description": "Allow output javascript files as module source type.",
851
- "type": "boolean"
852
- },
853
- "syncWebAssembly": {
854
- "description": "Support WebAssembly as synchronous EcmaScript Module (outdated).",
855
- "type": "boolean"
856
- },
857
- "topLevelAwait": {
858
- "description": "Allow using top-level-await in EcmaScript Modules.",
859
- "type": "boolean"
860
- },
861
- "deferImport": {
862
- "description": "Enable experimental tc39 proposal https://github.com/tc39/proposal-defer-import-eval. This allows to defer execution of a module until it's first use.",
834
+ "backCompat": {
835
+ "title": "Enable backward compatibility with webpack previous major versions",
836
+ "default": false,
863
837
  "type": "boolean"
864
838
  }
865
- },
866
- "additionalProperties": false
839
+ }
867
840
  },
868
841
  "minicss": {
869
842
  "title": "experimental settings for [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin)",
@@ -933,6 +906,69 @@
933
906
  "type": "string"
934
907
  }
935
908
  ]
909
+ },
910
+ "include": {
911
+ "cli_overridable": "",
912
+ "title": "customize transpiling of node_modules in prod/dev environments",
913
+ "default": "only-modern",
914
+ "anyOf": [
915
+ {
916
+ "type": "array",
917
+ "items": {
918
+ "type": "string"
919
+ }
920
+ },
921
+ {
922
+ "type": "object",
923
+ "properties": {
924
+ "development": {
925
+ "anyOf": [
926
+ {
927
+ "type": "array",
928
+ "items": {
929
+ "type": "string"
930
+ }
931
+ },
932
+ {
933
+ "enum": [
934
+ "all",
935
+ "none",
936
+ "only-modern"
937
+ ],
938
+ "type": "string"
939
+ }
940
+ ]
941
+ },
942
+ "production": {
943
+ "anyOf": [
944
+ {
945
+ "type": "array",
946
+ "items": {
947
+ "type": "string"
948
+ }
949
+ },
950
+ {
951
+ "enum": [
952
+ "all",
953
+ "none",
954
+ "only-modern"
955
+ ],
956
+ "type": "string"
957
+ }
958
+ ]
959
+ }
960
+ },
961
+ "additionalProperties": false
962
+ },
963
+ {
964
+ "enum": [
965
+ "all",
966
+ "none",
967
+ "only-modern"
968
+ ],
969
+ "type": "string"
970
+ }
971
+ ]
936
972
  }
937
973
  },
938
974
  "additionalProperties": false
@@ -1311,23 +1347,23 @@
1311
1347
  "dotAll": {
1312
1348
  "type": "boolean"
1313
1349
  },
1314
- "__@match@8074": {
1350
+ "__@match@8175": {
1315
1351
  "type": "object",
1316
1352
  "additionalProperties": false
1317
1353
  },
1318
- "__@replace@8076": {
1354
+ "__@replace@8177": {
1319
1355
  "type": "object",
1320
1356
  "additionalProperties": false
1321
1357
  },
1322
- "__@search@8079": {
1358
+ "__@search@8180": {
1323
1359
  "type": "object",
1324
1360
  "additionalProperties": false
1325
1361
  },
1326
- "__@split@8081": {
1362
+ "__@split@8182": {
1327
1363
  "type": "object",
1328
1364
  "additionalProperties": false
1329
1365
  },
1330
- "__@matchAll@8083": {
1366
+ "__@matchAll@8184": {
1331
1367
  "type": "object",
1332
1368
  "additionalProperties": false
1333
1369
  }
@@ -1732,49 +1768,22 @@
1732
1768
  "title": "experiments configuration for [webpack](https://webpack.js.org/configuration/experiments/)",
1733
1769
  "default": {},
1734
1770
  "type": "object",
1771
+ "additionalProperties": false,
1772
+ "patternProperties": {
1773
+ "^[0-9]+$": {}
1774
+ },
1735
1775
  "properties": {
1736
- "asyncWebAssembly": {
1737
- "description": "Support WebAssembly as asynchronous EcmaScript Module.",
1738
- "type": "boolean"
1739
- },
1740
- "backCompat": {
1741
- "description": "Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.",
1742
- "title": "Enable backward compatibility with webpack previous major versions",
1743
- "default": false,
1744
- "type": "boolean"
1745
- },
1746
1776
  "cacheUnaffected": {
1747
- "description": "Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.",
1748
1777
  "title": "Enable additional in-memory caching of modules which are unchanged and reference only unchanged modules.",
1749
1778
  "default": true,
1750
1779
  "type": "boolean"
1751
1780
  },
1752
- "futureDefaults": {
1753
- "description": "Apply defaults of next major version.",
1754
- "type": "boolean"
1755
- },
1756
- "layers": {
1757
- "description": "Enable module layers.",
1758
- "type": "boolean"
1759
- },
1760
- "outputModule": {
1761
- "description": "Allow output javascript files as module source type.",
1762
- "type": "boolean"
1763
- },
1764
- "syncWebAssembly": {
1765
- "description": "Support WebAssembly as synchronous EcmaScript Module (outdated).",
1766
- "type": "boolean"
1767
- },
1768
- "topLevelAwait": {
1769
- "description": "Allow using top-level-await in EcmaScript Modules.",
1770
- "type": "boolean"
1771
- },
1772
- "deferImport": {
1773
- "description": "Enable experimental tc39 proposal https://github.com/tc39/proposal-defer-import-eval. This allows to defer execution of a module until it's first use.",
1781
+ "backCompat": {
1782
+ "title": "Enable backward compatibility with webpack previous major versions",
1783
+ "default": false,
1774
1784
  "type": "boolean"
1775
1785
  }
1776
- },
1777
- "additionalProperties": false
1786
+ }
1778
1787
  },
1779
1788
  "minicss": {
1780
1789
  "title": "experimental settings for [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin)",
@@ -1844,6 +1853,69 @@
1844
1853
  "type": "string"
1845
1854
  }
1846
1855
  ]
1856
+ },
1857
+ "include": {
1858
+ "cli_overridable": "",
1859
+ "title": "customize transpiling of node_modules in prod/dev environments",
1860
+ "default": "only-modern",
1861
+ "anyOf": [
1862
+ {
1863
+ "type": "array",
1864
+ "items": {
1865
+ "type": "string"
1866
+ }
1867
+ },
1868
+ {
1869
+ "type": "object",
1870
+ "properties": {
1871
+ "development": {
1872
+ "anyOf": [
1873
+ {
1874
+ "type": "array",
1875
+ "items": {
1876
+ "type": "string"
1877
+ }
1878
+ },
1879
+ {
1880
+ "enum": [
1881
+ "all",
1882
+ "none",
1883
+ "only-modern"
1884
+ ],
1885
+ "type": "string"
1886
+ }
1887
+ ]
1888
+ },
1889
+ "production": {
1890
+ "anyOf": [
1891
+ {
1892
+ "type": "array",
1893
+ "items": {
1894
+ "type": "string"
1895
+ }
1896
+ },
1897
+ {
1898
+ "enum": [
1899
+ "all",
1900
+ "none",
1901
+ "only-modern"
1902
+ ],
1903
+ "type": "string"
1904
+ }
1905
+ ]
1906
+ }
1907
+ },
1908
+ "additionalProperties": false
1909
+ },
1910
+ {
1911
+ "enum": [
1912
+ "all",
1913
+ "none",
1914
+ "only-modern"
1915
+ ],
1916
+ "type": "string"
1917
+ }
1918
+ ]
1847
1919
  }
1848
1920
  },
1849
1921
  "additionalProperties": false
@@ -2115,23 +2187,23 @@
2115
2187
  "dotAll": {
2116
2188
  "type": "boolean"
2117
2189
  },
2118
- "__@match@8074": {
2190
+ "__@match@8175": {
2119
2191
  "type": "object",
2120
2192
  "additionalProperties": false
2121
2193
  },
2122
- "__@replace@8076": {
2194
+ "__@replace@8177": {
2123
2195
  "type": "object",
2124
2196
  "additionalProperties": false
2125
2197
  },
2126
- "__@search@8079": {
2198
+ "__@search@8180": {
2127
2199
  "type": "object",
2128
2200
  "additionalProperties": false
2129
2201
  },
2130
- "__@split@8081": {
2202
+ "__@split@8182": {
2131
2203
  "type": "object",
2132
2204
  "additionalProperties": false
2133
2205
  },
2134
- "__@matchAll@8083": {
2206
+ "__@matchAll@8184": {
2135
2207
  "type": "object",
2136
2208
  "additionalProperties": false
2137
2209
  }
@@ -2536,49 +2608,22 @@
2536
2608
  "title": "experiments configuration for [webpack](https://webpack.js.org/configuration/experiments/)",
2537
2609
  "default": {},
2538
2610
  "type": "object",
2611
+ "additionalProperties": false,
2612
+ "patternProperties": {
2613
+ "^[0-9]+$": {}
2614
+ },
2539
2615
  "properties": {
2540
- "asyncWebAssembly": {
2541
- "description": "Support WebAssembly as asynchronous EcmaScript Module.",
2542
- "type": "boolean"
2543
- },
2544
- "backCompat": {
2545
- "description": "Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.",
2546
- "title": "Enable backward compatibility with webpack previous major versions",
2547
- "default": false,
2548
- "type": "boolean"
2549
- },
2550
2616
  "cacheUnaffected": {
2551
- "description": "Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.",
2552
2617
  "title": "Enable additional in-memory caching of modules which are unchanged and reference only unchanged modules.",
2553
2618
  "default": true,
2554
2619
  "type": "boolean"
2555
2620
  },
2556
- "futureDefaults": {
2557
- "description": "Apply defaults of next major version.",
2558
- "type": "boolean"
2559
- },
2560
- "layers": {
2561
- "description": "Enable module layers.",
2562
- "type": "boolean"
2563
- },
2564
- "outputModule": {
2565
- "description": "Allow output javascript files as module source type.",
2566
- "type": "boolean"
2567
- },
2568
- "syncWebAssembly": {
2569
- "description": "Support WebAssembly as synchronous EcmaScript Module (outdated).",
2570
- "type": "boolean"
2571
- },
2572
- "topLevelAwait": {
2573
- "description": "Allow using top-level-await in EcmaScript Modules.",
2574
- "type": "boolean"
2575
- },
2576
- "deferImport": {
2577
- "description": "Enable experimental tc39 proposal https://github.com/tc39/proposal-defer-import-eval. This allows to defer execution of a module until it's first use.",
2621
+ "backCompat": {
2622
+ "title": "Enable backward compatibility with webpack previous major versions",
2623
+ "default": false,
2578
2624
  "type": "boolean"
2579
2625
  }
2580
- },
2581
- "additionalProperties": false
2626
+ }
2582
2627
  },
2583
2628
  "minicss": {
2584
2629
  "title": "experimental settings for [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin)",
@@ -2648,6 +2693,69 @@
2648
2693
  "type": "string"
2649
2694
  }
2650
2695
  ]
2696
+ },
2697
+ "include": {
2698
+ "cli_overridable": "",
2699
+ "title": "customize transpiling of node_modules in prod/dev environments",
2700
+ "default": "only-modern",
2701
+ "anyOf": [
2702
+ {
2703
+ "type": "array",
2704
+ "items": {
2705
+ "type": "string"
2706
+ }
2707
+ },
2708
+ {
2709
+ "type": "object",
2710
+ "properties": {
2711
+ "development": {
2712
+ "anyOf": [
2713
+ {
2714
+ "type": "array",
2715
+ "items": {
2716
+ "type": "string"
2717
+ }
2718
+ },
2719
+ {
2720
+ "enum": [
2721
+ "all",
2722
+ "none",
2723
+ "only-modern"
2724
+ ],
2725
+ "type": "string"
2726
+ }
2727
+ ]
2728
+ },
2729
+ "production": {
2730
+ "anyOf": [
2731
+ {
2732
+ "type": "array",
2733
+ "items": {
2734
+ "type": "string"
2735
+ }
2736
+ },
2737
+ {
2738
+ "enum": [
2739
+ "all",
2740
+ "none",
2741
+ "only-modern"
2742
+ ],
2743
+ "type": "string"
2744
+ }
2745
+ ]
2746
+ }
2747
+ },
2748
+ "additionalProperties": false
2749
+ },
2750
+ {
2751
+ "enum": [
2752
+ "all",
2753
+ "none",
2754
+ "only-modern"
2755
+ ],
2756
+ "type": "string"
2757
+ }
2758
+ ]
2651
2759
  }
2652
2760
  },
2653
2761
  "additionalProperties": false
@@ -2919,23 +3027,23 @@
2919
3027
  "dotAll": {
2920
3028
  "type": "boolean"
2921
3029
  },
2922
- "__@match@8074": {
3030
+ "__@match@8175": {
2923
3031
  "type": "object",
2924
3032
  "additionalProperties": false
2925
3033
  },
2926
- "__@replace@8076": {
3034
+ "__@replace@8177": {
2927
3035
  "type": "object",
2928
3036
  "additionalProperties": false
2929
3037
  },
2930
- "__@search@8079": {
3038
+ "__@search@8180": {
2931
3039
  "type": "object",
2932
3040
  "additionalProperties": false
2933
3041
  },
2934
- "__@split@8081": {
3042
+ "__@split@8182": {
2935
3043
  "type": "object",
2936
3044
  "additionalProperties": false
2937
3045
  },
2938
- "__@matchAll@8083": {
3046
+ "__@matchAll@8184": {
2939
3047
  "type": "object",
2940
3048
  "additionalProperties": false
2941
3049
  }
@@ -1,8 +1,5 @@
1
1
  import type { Provider } from '@tinkoff/dippy';
2
2
  import { createCommand } from '../../commands/createCommand';
3
- import { ABSTRACT_BUILDER_FACTORY_TOKEN, COMMAND_PARAMETERS_TOKEN } from '../../di/tokens';
4
- import { registerProviders } from '../../utils/di';
5
- import { sharedProviders } from './providers/shared';
6
3
 
7
4
  export interface Params {
8
5
  target: string;
@@ -17,18 +14,8 @@ export type AnalyzeCommand = (params: Params, providers?: Provider[]) => Promise
17
14
  export default createCommand({
18
15
  name: 'analyze',
19
16
  command: async (di): Promise<void> => {
20
- const { plugin } = di.get(COMMAND_PARAMETERS_TOKEN) as Params;
21
-
22
- registerProviders(di, sharedProviders);
23
-
24
- const builderFactory = di.get(ABSTRACT_BUILDER_FACTORY_TOKEN);
25
- const builder = await builderFactory.createBuilder('webpack', {
26
- options: {
27
- shouldBuildClient: true,
28
- shouldBuildServer: false,
29
- },
30
- });
31
-
32
- await builder.analyze({ plugin });
17
+ throw new Error(
18
+ 'tramvai analyze is deprecated, please use `tramvai start|build --analyze=pluginName`\n'
19
+ );
33
20
  },
34
21
  });
@@ -6,15 +6,11 @@ const FIXTURES_DIR = resolve(__dirname, '__fixtures__');
6
6
  jest.useRealTimers();
7
7
  jest.setTimeout(120000);
8
8
 
9
- const matchStats = {
10
- samples: expect.any(Array),
11
- mean: expect.any(Number),
12
- std: expect.any(Number),
13
- variance: expect.any(Number),
14
- };
15
- const matchFullStats = {
16
- client: matchStats,
17
- server: matchStats,
9
+ const compilationStats = {
10
+ // TODO: not working in CI, loaders field in report is empty: TCORE-5363
11
+ // loaderBuildCosts: expect.any(Object),
12
+ totalBuildCosts: expect.any(Object),
13
+ pluginBuildCosts: expect.any(Object),
18
14
  };
19
15
 
20
16
  describe('@tramvai/cli benchmark command', () => {
@@ -31,9 +27,11 @@ describe('@tramvai/cli benchmark command', () => {
31
27
  });
32
28
 
33
29
  expect(result).toMatchObject({
34
- cache: matchFullStats,
35
- noCache: matchFullStats,
36
- rebuild: matchFullStats,
30
+ clientBuildTime: expect.any(Number),
31
+ serverBuildTime: expect.any(Number),
32
+ clientCompilationStats: compilationStats,
33
+ serverCompilationStats: compilationStats,
34
+ maxMemoryRss: expect.any(Number),
37
35
  });
38
36
  });
39
37
  });