@tramvai/cli 5.49.1 → 6.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (656) hide show
  1. package/__migrations__/d2023-02-01b-tramvai-config-refactoring.js +78 -80
  2. package/__migrations__/d2025-04-11b-tramvai-config-remove-modern.js +13 -0
  3. package/bin/spawn.js +76 -4
  4. package/lib/api/analyze/index.d.ts +0 -1
  5. package/lib/api/analyze/index.d.ts.map +1 -1
  6. package/lib/api/analyze/index.js +2 -2
  7. package/lib/api/analyze/index.js.map +1 -1
  8. package/lib/api/build/application.d.ts.map +1 -1
  9. package/lib/api/build/application.js +2 -5
  10. package/lib/api/build/application.js.map +1 -1
  11. package/lib/api/build/child-app.d.ts.map +1 -1
  12. package/lib/api/build/child-app.js +1 -5
  13. package/lib/api/build/child-app.js.map +1 -1
  14. package/lib/api/build/index.d.ts +0 -2
  15. package/lib/api/build/index.d.ts.map +1 -1
  16. package/lib/api/build/index.js.map +1 -1
  17. package/lib/api/build/module.d.ts.map +1 -1
  18. package/lib/api/build/module.js +1 -3
  19. package/lib/api/build/module.js.map +1 -1
  20. package/lib/api/index.d.ts.map +1 -1
  21. package/lib/api/index.js +0 -4
  22. package/lib/api/index.js.map +1 -1
  23. package/lib/api/start/application.experimental.d.ts +7 -0
  24. package/lib/api/start/application.experimental.d.ts.map +1 -0
  25. package/lib/api/start/application.experimental.js +275 -0
  26. package/lib/api/start/application.experimental.js.map +1 -0
  27. package/lib/api/start/index.d.ts +1 -1
  28. package/lib/api/start/index.d.ts.map +1 -1
  29. package/lib/api/start/index.js +17 -6
  30. package/lib/api/start/index.js.map +1 -1
  31. package/lib/api/start/utils/banner.d.ts.map +1 -1
  32. package/lib/api/start/utils/banner.js +0 -1
  33. package/lib/api/start/utils/banner.js.map +1 -1
  34. package/lib/api/start/utils/tips/tips.d.ts.map +1 -1
  35. package/lib/api/start/utils/tips/tips.js +0 -8
  36. package/lib/api/start/utils/tips/tips.js.map +1 -1
  37. package/lib/builder/webpack/devServer/pool/process/pool.d.ts.map +1 -1
  38. package/lib/builder/webpack/devServer/pool/process/pool.js +0 -2
  39. package/lib/builder/webpack/devServer/pool/process/pool.js.map +1 -1
  40. package/lib/builder/webpack/devServer/server.d.ts.map +1 -1
  41. package/lib/builder/webpack/devServer/server.js +4 -0
  42. package/lib/builder/webpack/devServer/server.js.map +1 -1
  43. package/lib/builder/webpack/devServer/setup.d.ts.map +1 -1
  44. package/lib/builder/webpack/devServer/setup.js +3 -1
  45. package/lib/builder/webpack/devServer/setup.js.map +1 -1
  46. package/lib/builder/webpack/index.d.ts.map +1 -1
  47. package/lib/builder/webpack/index.js +3 -5
  48. package/lib/builder/webpack/index.js.map +1 -1
  49. package/lib/builder/webpack/providers/analyze/shared.d.ts.map +1 -1
  50. package/lib/builder/webpack/providers/analyze/shared.js +5 -9
  51. package/lib/builder/webpack/providers/analyze/shared.js.map +1 -1
  52. package/lib/builder/webpack/providers/build/client.d.ts.map +1 -1
  53. package/lib/builder/webpack/providers/build/client.js +0 -1
  54. package/lib/builder/webpack/providers/build/client.js.map +1 -1
  55. package/lib/builder/webpack/providers/build/clientShared.d.ts.map +1 -1
  56. package/lib/builder/webpack/providers/build/clientShared.js +4 -6
  57. package/lib/builder/webpack/providers/build/clientShared.js.map +1 -1
  58. package/lib/builder/webpack/providers/client.d.ts.map +1 -1
  59. package/lib/builder/webpack/providers/client.js +10 -22
  60. package/lib/builder/webpack/providers/client.js.map +1 -1
  61. package/lib/builder/webpack/providers/server.d.ts.map +1 -1
  62. package/lib/builder/webpack/providers/server.js +10 -9
  63. package/lib/builder/webpack/providers/server.js.map +1 -1
  64. package/lib/builder/webpack/providers/shared.d.ts.map +1 -1
  65. package/lib/builder/webpack/providers/shared.js +2 -8
  66. package/lib/builder/webpack/providers/shared.js.map +1 -1
  67. package/lib/builder/webpack/tokens.d.ts +4 -139
  68. package/lib/builder/webpack/tokens.d.ts.map +1 -1
  69. package/lib/builder/webpack/tokens.js +1 -4
  70. package/lib/builder/webpack/tokens.js.map +1 -1
  71. package/lib/builder/webpack/utils/copyStatsJsonFile.d.ts.map +1 -1
  72. package/lib/builder/webpack/utils/copyStatsJsonFile.js +0 -11
  73. package/lib/builder/webpack/utils/copyStatsJsonFile.js.map +1 -1
  74. package/lib/cli/CLI.d.ts +2 -2
  75. package/lib/cli/CLI.d.ts.map +1 -1
  76. package/lib/cli/CLI.js +2 -2
  77. package/lib/cli/CLI.js.map +1 -1
  78. package/lib/cli/bin-init.js +0 -2
  79. package/lib/cli/bin-init.js.map +1 -1
  80. package/lib/cli/index.d.ts.map +1 -1
  81. package/lib/cli/index.js +28 -18
  82. package/lib/cli/index.js.map +1 -1
  83. package/lib/cli/runCLI.d.ts +3 -0
  84. package/lib/cli/runCLI.d.ts.map +1 -1
  85. package/lib/cli/runCLI.js +18 -6
  86. package/lib/cli/runCLI.js.map +1 -1
  87. package/lib/commands/add/command.d.ts +1 -4
  88. package/lib/commands/add/command.d.ts.map +1 -1
  89. package/lib/commands/add/command.js +3 -2
  90. package/lib/commands/add/command.js.map +1 -1
  91. package/lib/commands/analyze/command.d.ts +1 -1
  92. package/lib/commands/analyze/command.d.ts.map +1 -1
  93. package/lib/commands/analyze/command.js +11 -13
  94. package/lib/commands/analyze/command.js.map +1 -1
  95. package/lib/commands/benchmark/command.d.ts +1 -1
  96. package/lib/commands/benchmark/command.d.ts.map +1 -1
  97. package/lib/commands/benchmark/command.js +8 -9
  98. package/lib/commands/benchmark/command.js.map +1 -1
  99. package/lib/commands/build/build.d.ts.map +1 -1
  100. package/lib/commands/build/build.js +1 -0
  101. package/lib/commands/build/build.js.map +1 -1
  102. package/lib/commands/build/command.d.ts +2 -2
  103. package/lib/commands/build/command.d.ts.map +1 -1
  104. package/lib/commands/build/command.js +53 -28
  105. package/lib/commands/build/command.js.map +1 -1
  106. package/lib/commands/createApp.d.ts.map +1 -1
  107. package/lib/commands/createApp.js +0 -1
  108. package/lib/commands/createApp.js.map +1 -1
  109. package/lib/commands/generate/command.d.ts +1 -1
  110. package/lib/commands/generate/command.d.ts.map +1 -1
  111. package/lib/commands/generate/command.js +3 -2
  112. package/lib/commands/generate/command.js.map +1 -1
  113. package/lib/commands/lint/command.d.ts +1 -1
  114. package/lib/commands/lint/command.d.ts.map +1 -1
  115. package/lib/commands/lint/command.js +3 -2
  116. package/lib/commands/lint/command.js.map +1 -1
  117. package/lib/commands/new/command.d.ts +0 -1
  118. package/lib/commands/new/command.d.ts.map +1 -1
  119. package/lib/commands/new/command.js +0 -1
  120. package/lib/commands/new/command.js.map +1 -1
  121. package/lib/commands/new/new.d.ts.map +1 -1
  122. package/lib/commands/new/new.js +28 -3
  123. package/lib/commands/new/new.js.map +1 -1
  124. package/lib/commands/new/steps/installDependencies.js +3 -3
  125. package/lib/commands/new/steps/installDependencies.js.map +1 -1
  126. package/lib/commands/start/command.d.ts +2 -2
  127. package/lib/commands/start/command.d.ts.map +1 -1
  128. package/lib/commands/start/command.js +57 -22
  129. package/lib/commands/start/command.js.map +1 -1
  130. package/lib/commands/start/start.d.ts +1 -1
  131. package/lib/commands/start/start.d.ts.map +1 -1
  132. package/lib/commands/start/start.js +2 -1
  133. package/lib/commands/start/start.js.map +1 -1
  134. package/lib/commands/start-prod/command.d.ts +1 -1
  135. package/lib/commands/start-prod/command.d.ts.map +1 -1
  136. package/lib/commands/start-prod/command.js +11 -13
  137. package/lib/commands/start-prod/command.js.map +1 -1
  138. package/lib/commands/static/application.d.ts.map +1 -1
  139. package/lib/commands/static/application.js +0 -1
  140. package/lib/commands/static/application.js.map +1 -1
  141. package/lib/commands/static/command.d.ts +1 -1
  142. package/lib/commands/static/command.d.ts.map +1 -1
  143. package/lib/commands/static/command.js +7 -3
  144. package/lib/commands/static/command.js.map +1 -1
  145. package/lib/commands/update/command.d.ts +7 -5
  146. package/lib/commands/update/command.d.ts.map +1 -1
  147. package/lib/commands/update/command.js +11 -3
  148. package/lib/commands/update/command.js.map +1 -1
  149. package/lib/commands/update/dependantLibs.d.ts +2 -1
  150. package/lib/commands/update/dependantLibs.d.ts.map +1 -1
  151. package/lib/commands/update/dependantLibs.js +17 -4
  152. package/lib/commands/update/dependantLibs.js.map +1 -1
  153. package/lib/commands/update/update.d.ts +2 -1
  154. package/lib/commands/update/update.d.ts.map +1 -1
  155. package/lib/commands/update/update.js +6 -6
  156. package/lib/commands/update/update.js.map +1 -1
  157. package/lib/commands/update/updatePackageJson.d.ts +1 -1
  158. package/lib/commands/update/updatePackageJson.d.ts.map +1 -1
  159. package/lib/commands/update/updatePackageJson.js +10 -14
  160. package/lib/commands/update/updatePackageJson.js.map +1 -1
  161. package/lib/config/configManager.d.ts +0 -1
  162. package/lib/config/configManager.d.ts.map +1 -1
  163. package/lib/config/configManager.js +2 -17
  164. package/lib/config/configManager.js.map +1 -1
  165. package/lib/config/validate.d.ts.map +1 -1
  166. package/lib/config/validate.js +8 -1
  167. package/lib/config/validate.js.map +1 -1
  168. package/lib/di/providers/index.d.ts +0 -1
  169. package/lib/di/providers/index.d.ts.map +1 -1
  170. package/lib/di/providers/index.js +0 -1
  171. package/lib/di/providers/index.js.map +1 -1
  172. package/lib/di/tokens/config.d.ts +2 -0
  173. package/lib/di/tokens/config.d.ts.map +1 -1
  174. package/lib/di/tokens/index.d.ts +0 -1
  175. package/lib/di/tokens/index.d.ts.map +1 -1
  176. package/lib/di/tokens/index.js +0 -1
  177. package/lib/di/tokens/index.js.map +1 -1
  178. package/lib/external/config.d.ts.map +1 -1
  179. package/lib/external/config.js.map +1 -1
  180. package/lib/library/babel/index.d.ts +3 -53
  181. package/lib/library/babel/index.d.ts.map +1 -1
  182. package/lib/library/babel/index.js +3 -139
  183. package/lib/library/babel/index.js.map +1 -1
  184. package/lib/library/swc/index.d.ts +3 -3
  185. package/lib/library/swc/index.d.ts.map +1 -1
  186. package/lib/library/swc/index.js +4 -114
  187. package/lib/library/swc/index.js.map +1 -1
  188. package/lib/library/typescript/index.d.ts +0 -23
  189. package/lib/library/typescript/index.d.ts.map +1 -1
  190. package/lib/library/typescript/index.js +1 -2
  191. package/lib/library/typescript/index.js.map +1 -1
  192. package/lib/library/webpack/application/client/common.d.ts.map +1 -1
  193. package/lib/library/webpack/application/client/common.js +45 -10
  194. package/lib/library/webpack/application/client/common.js.map +1 -1
  195. package/lib/library/webpack/application/client/dev.js +2 -2
  196. package/lib/library/webpack/application/client/dev.js.map +1 -1
  197. package/lib/library/webpack/application/client/prod.d.ts.map +1 -1
  198. package/lib/library/webpack/application/client/prod.js +1 -2
  199. package/lib/library/webpack/application/client/prod.js.map +1 -1
  200. package/lib/library/webpack/application/common.d.ts.map +1 -1
  201. package/lib/library/webpack/application/common.js +4 -5
  202. package/lib/library/webpack/application/common.js.map +1 -1
  203. package/lib/library/webpack/application/server/common.js +1 -1
  204. package/lib/library/webpack/application/server/common.js.map +1 -1
  205. package/lib/library/webpack/application/server/dev.js +1 -1
  206. package/lib/library/webpack/application/server/dev.js.map +1 -1
  207. package/lib/library/webpack/application/server/prod.js +1 -1
  208. package/lib/library/webpack/application/server/prod.js.map +1 -1
  209. package/lib/library/webpack/blocks/css.d.ts.map +1 -1
  210. package/lib/library/webpack/blocks/css.js +15 -11
  211. package/lib/library/webpack/blocks/css.js.map +1 -1
  212. package/lib/library/webpack/blocks/optimize.js +2 -2
  213. package/lib/library/webpack/blocks/optimize.js.map +1 -1
  214. package/lib/library/webpack/blocks/pwa/client.d.ts.map +1 -1
  215. package/lib/library/webpack/blocks/pwa/client.js +11 -63
  216. package/lib/library/webpack/blocks/pwa/client.js.map +1 -1
  217. package/lib/library/webpack/blocks/pwa/shared.d.ts.map +1 -1
  218. package/lib/library/webpack/blocks/pwa/shared.js +2 -3
  219. package/lib/library/webpack/blocks/pwa/shared.js.map +1 -1
  220. package/lib/library/webpack/blocks/resolve.d.ts.map +1 -1
  221. package/lib/library/webpack/blocks/resolve.js +3 -2
  222. package/lib/library/webpack/blocks/resolve.js.map +1 -1
  223. package/lib/library/webpack/blocks/serverInline.d.ts.map +1 -1
  224. package/lib/library/webpack/blocks/serverInline.js +1 -2
  225. package/lib/library/webpack/blocks/serverInline.js.map +1 -1
  226. package/lib/library/webpack/blocks/sourcemaps.d.ts +1 -1
  227. package/lib/library/webpack/blocks/sourcemaps.d.ts.map +1 -1
  228. package/lib/library/webpack/blocks/sourcemaps.js +4 -2
  229. package/lib/library/webpack/blocks/sourcemaps.js.map +1 -1
  230. package/lib/library/webpack/child-app/client/common.d.ts.map +1 -1
  231. package/lib/library/webpack/child-app/client/common.js +8 -3
  232. package/lib/library/webpack/child-app/client/common.js.map +1 -1
  233. package/lib/library/webpack/child-app/client/dev.d.ts.map +1 -1
  234. package/lib/library/webpack/child-app/client/dev.js +5 -1
  235. package/lib/library/webpack/child-app/client/dev.js.map +1 -1
  236. package/lib/library/webpack/child-app/client/prod.d.ts.map +1 -1
  237. package/lib/library/webpack/child-app/client/prod.js +4 -0
  238. package/lib/library/webpack/child-app/client/prod.js.map +1 -1
  239. package/lib/library/webpack/child-app/common.d.ts.map +1 -1
  240. package/lib/library/webpack/child-app/common.js +4 -9
  241. package/lib/library/webpack/child-app/common.js.map +1 -1
  242. package/lib/library/webpack/child-app/server/dev.d.ts.map +1 -1
  243. package/lib/library/webpack/child-app/server/dev.js +4 -0
  244. package/lib/library/webpack/child-app/server/dev.js.map +1 -1
  245. package/lib/library/webpack/child-app/server/prod.d.ts.map +1 -1
  246. package/lib/library/webpack/child-app/server/prod.js +4 -0
  247. package/lib/library/webpack/child-app/server/prod.js.map +1 -1
  248. package/lib/library/webpack/common/client/prod.js +1 -1
  249. package/lib/library/webpack/common/client/prod.js.map +1 -1
  250. package/lib/library/webpack/common/main.d.ts.map +1 -1
  251. package/lib/library/webpack/common/main.js +1 -2
  252. package/lib/library/webpack/common/main.js.map +1 -1
  253. package/lib/library/webpack/constants/stats.d.ts.map +1 -1
  254. package/lib/library/webpack/constants/stats.js +2 -0
  255. package/lib/library/webpack/constants/stats.js.map +1 -1
  256. package/lib/library/webpack/loaders/image-loader/getImageMiniatureURL.js +1 -1
  257. package/lib/library/webpack/loaders/image-loader/getImageMiniatureURL.js.map +1 -1
  258. package/lib/library/webpack/module/client/common.js +1 -1
  259. package/lib/library/webpack/module/client/common.js.map +1 -1
  260. package/lib/library/webpack/module/externals.js +1 -1
  261. package/lib/library/webpack/module/externals.js.map +1 -1
  262. package/lib/library/webpack/module/server/common.js +1 -1
  263. package/lib/library/webpack/module/server/common.js.map +1 -1
  264. package/lib/library/webpack/plugins/RuntimePathPlugin.d.ts.map +1 -1
  265. package/lib/library/webpack/plugins/RuntimePathPlugin.js +7 -3
  266. package/lib/library/webpack/plugins/RuntimePathPlugin.js.map +1 -1
  267. package/lib/library/webpack/utils/threadLoader.d.ts.map +1 -1
  268. package/lib/library/webpack/utils/threadLoader.js +20 -3
  269. package/lib/library/webpack/utils/threadLoader.js.map +1 -1
  270. package/lib/library/webpack/utils/transpiler.d.ts +0 -1
  271. package/lib/library/webpack/utils/transpiler.d.ts.map +1 -1
  272. package/lib/library/webpack/utils/transpiler.js +2 -6
  273. package/lib/library/webpack/utils/transpiler.js.map +1 -1
  274. package/lib/models/analytics/utils.d.ts +16 -0
  275. package/lib/models/analytics/utils.d.ts.map +1 -0
  276. package/lib/models/analytics/utils.js +88 -0
  277. package/lib/models/analytics/utils.js.map +1 -0
  278. package/lib/models/command.d.ts +1 -1
  279. package/lib/models/command.d.ts.map +1 -1
  280. package/lib/models/command.js +2 -8
  281. package/lib/models/command.js.map +1 -1
  282. package/lib/models/context.d.ts +4 -4
  283. package/lib/models/context.d.ts.map +1 -1
  284. package/lib/models/context.js +3 -2
  285. package/lib/models/context.js.map +1 -1
  286. package/lib/models/logger.js +1 -1
  287. package/lib/models/logger.js.map +1 -1
  288. package/lib/models/task.d.ts.map +1 -1
  289. package/lib/models/task.js +1 -7
  290. package/lib/models/task.js.map +1 -1
  291. package/lib/schema/autogeneratedSchema.json +161 -20
  292. package/lib/schema/topLevelSchema.d.ts +14 -0
  293. package/lib/schema/topLevelSchema.d.ts.map +1 -1
  294. package/lib/schema/topLevelSchema.js +14 -0
  295. package/lib/schema/topLevelSchema.js.map +1 -1
  296. package/lib/typings/build/Builder.d.ts +2 -6
  297. package/lib/typings/build/Builder.d.ts.map +1 -1
  298. package/lib/typings/configEntry/application.d.ts +11 -6
  299. package/lib/typings/configEntry/application.d.ts.map +1 -1
  300. package/lib/typings/configEntry/cli.d.ts +13 -0
  301. package/lib/typings/configEntry/cli.d.ts.map +1 -1
  302. package/lib/typings/projectType.d.ts +5 -0
  303. package/lib/typings/projectType.d.ts.map +1 -1
  304. package/lib/typings/public.d.ts +0 -1
  305. package/lib/typings/public.d.ts.map +1 -1
  306. package/lib/typings/public.js +0 -2
  307. package/lib/typings/public.js.map +1 -1
  308. package/lib/typings/target.d.ts +1 -1
  309. package/lib/typings/target.d.ts.map +1 -1
  310. package/lib/utils/commands/dependencies/findTramvaiVersion.d.ts +1 -1
  311. package/lib/utils/commands/dependencies/findTramvaiVersion.d.ts.map +1 -1
  312. package/lib/utils/commands/dependencies/findTramvaiVersion.js +4 -11
  313. package/lib/utils/commands/dependencies/findTramvaiVersion.js.map +1 -1
  314. package/lib/utils/commands/dependencies/getLatestPackageVersion.d.ts +1 -1
  315. package/lib/utils/commands/dependencies/getLatestPackageVersion.d.ts.map +1 -1
  316. package/lib/utils/commands/dependencies/getLatestPackageVersion.js +7 -3
  317. package/lib/utils/commands/dependencies/getLatestPackageVersion.js.map +1 -1
  318. package/lib/utils/cpu-profile.d.ts +3 -0
  319. package/lib/utils/cpu-profile.d.ts.map +1 -1
  320. package/lib/utils/cpu-profile.js +8 -4
  321. package/lib/utils/cpu-profile.js.map +1 -1
  322. package/lib/utils/safeRequire.d.ts +1 -1
  323. package/lib/utils/safeRequire.d.ts.map +1 -1
  324. package/lib/utils/safeRequire.js +13 -3
  325. package/lib/utils/safeRequire.js.map +1 -1
  326. package/package.json +26 -32
  327. package/schema.json +175 -20
  328. package/src/api/analyze/index.ts +2 -3
  329. package/src/api/benchmark/__integration__/__fixtures__/tramvai.json +3 -0
  330. package/src/api/build/__integration__/__fixtures__/tramvai.json +4 -2
  331. package/src/api/build/__integration__/build.test.ts +0 -1
  332. package/src/api/build/application.ts +2 -5
  333. package/src/api/build/child-app.ts +1 -5
  334. package/src/api/build/index.ts +0 -2
  335. package/src/api/build/module.ts +1 -3
  336. package/src/api/index.ts +1 -10
  337. package/src/api/start/__integration__/__fixtures__/app/server.tsx +1 -0
  338. package/src/api/start/__integration__/__fixtures__/package.json +0 -3
  339. package/src/api/start/__integration__/__fixtures__/tramvai.json +3 -0
  340. package/src/api/start/__integration__/start.test.ts +10 -1
  341. package/src/api/start/application.experimental.ts +305 -0
  342. package/src/api/start/index.ts +20 -5
  343. package/src/api/start/utils/banner.ts +0 -1
  344. package/src/api/start/utils/tips/tips.ts +0 -9
  345. package/src/builder/webpack/devServer/pool/process/pool.ts +0 -2
  346. package/src/builder/webpack/devServer/server.ts +5 -0
  347. package/src/builder/webpack/devServer/setup.ts +1 -0
  348. package/src/builder/webpack/index.ts +3 -5
  349. package/src/builder/webpack/providers/analyze/shared.ts +6 -10
  350. package/src/builder/webpack/providers/build/client.ts +0 -1
  351. package/src/builder/webpack/providers/build/clientShared.ts +5 -11
  352. package/src/builder/webpack/providers/client.ts +16 -29
  353. package/src/builder/webpack/providers/server.ts +15 -10
  354. package/src/builder/webpack/providers/shared.ts +2 -9
  355. package/src/builder/webpack/tokens.ts +0 -9
  356. package/src/builder/webpack/utils/copyStatsJsonFile.ts +0 -17
  357. package/src/cli/CLI.ts +6 -4
  358. package/src/cli/bin-init.ts +0 -2
  359. package/src/cli/index.ts +36 -18
  360. package/src/cli/runCLI.ts +26 -6
  361. package/src/commands/add/command.ts +3 -2
  362. package/src/commands/analyze/command.ts +12 -14
  363. package/src/commands/benchmark/command.ts +9 -10
  364. package/src/commands/build/build.ts +2 -0
  365. package/src/commands/build/command.ts +58 -29
  366. package/src/commands/createApp.ts +0 -2
  367. package/src/commands/generate/command.ts +3 -2
  368. package/src/commands/lint/command.ts +3 -2
  369. package/src/commands/new/command.ts +0 -2
  370. package/src/commands/new/new.ts +39 -7
  371. package/src/commands/new/steps/installDependencies.ts +3 -3
  372. package/src/commands/new/templates/packageManagerConfig/yarnPackageManagerConfig/_yarnrc.yml.hbs +9 -0
  373. package/src/commands/new/templates/shared/_gitignore.hbs +10 -0
  374. package/src/commands/new/templates/shared/_prettierrc.js.hbs +1 -1
  375. package/src/commands/new/templates/shared/package.json.hbs +5 -1
  376. package/src/commands/start/command.ts +62 -23
  377. package/src/commands/start/start.ts +7 -1
  378. package/src/commands/start-prod/command.ts +12 -14
  379. package/src/commands/static/application.ts +0 -1
  380. package/src/commands/static/command.ts +7 -3
  381. package/src/commands/update/command.ts +12 -3
  382. package/src/commands/update/dependantLibs.ts +23 -8
  383. package/src/commands/update/update.ts +7 -6
  384. package/src/commands/update/updatePackageJson.spec.ts +66 -3
  385. package/src/commands/update/updatePackageJson.ts +28 -16
  386. package/src/config/__integration__/__fixtures__/relative/src/index.ts +0 -0
  387. package/src/config/__integration__/__fixtures__/relative/src/polyfill.ts +0 -0
  388. package/src/config/__integration__/validate.test.ts +94 -0
  389. package/src/config/configManager.ts +2 -19
  390. package/src/config/validate.ts +8 -1
  391. package/src/di/providers/index.ts +0 -1
  392. package/src/di/tokens/index.ts +0 -1
  393. package/src/external/config.ts +1 -0
  394. package/src/library/babel/index.ts +3 -166
  395. package/src/library/swc/__integration__/__snapshots__/swc.build.test.ts.snap +61 -236
  396. package/src/library/swc/__integration__/__snapshots__/swc.start.test.ts.snap +19 -18
  397. package/src/library/swc/__integration__/swc.build.test.ts +1 -13
  398. package/src/library/swc/__integration__/swc.start.test.ts +4 -1
  399. package/src/library/swc/index.ts +3 -139
  400. package/src/library/typescript/index.ts +1 -3
  401. package/src/library/webpack/application/client/common.ts +71 -9
  402. package/src/library/webpack/application/client/dev.ts +2 -2
  403. package/src/library/webpack/application/client/prod.ts +1 -2
  404. package/src/library/webpack/application/common.ts +9 -5
  405. package/src/library/webpack/application/server/common.ts +1 -1
  406. package/src/library/webpack/application/server/dev.ts +1 -1
  407. package/src/library/webpack/application/server/prod.ts +1 -1
  408. package/src/library/webpack/blocks/css.ts +17 -11
  409. package/src/library/webpack/blocks/optimize.ts +2 -2
  410. package/src/library/webpack/blocks/pwa/client.ts +14 -70
  411. package/src/library/webpack/blocks/pwa/shared.ts +1 -3
  412. package/src/library/webpack/blocks/resolve.ts +3 -2
  413. package/src/library/webpack/blocks/serverInline.ts +1 -2
  414. package/src/library/webpack/blocks/sourcemaps.ts +4 -2
  415. package/src/library/webpack/child-app/client/common.ts +9 -3
  416. package/src/library/webpack/child-app/client/dev.ts +6 -1
  417. package/src/library/webpack/child-app/client/prod.ts +5 -0
  418. package/src/library/webpack/child-app/common.ts +8 -12
  419. package/src/library/webpack/child-app/server/dev.ts +5 -0
  420. package/src/library/webpack/child-app/server/prod.ts +5 -0
  421. package/src/library/webpack/common/client/prod.ts +1 -1
  422. package/src/library/webpack/common/main.ts +1 -5
  423. package/src/library/webpack/constants/stats.ts +2 -0
  424. package/src/library/webpack/loaders/image-loader/getImageMiniatureURL.ts +1 -1
  425. package/src/library/webpack/module/client/common.ts +1 -1
  426. package/src/library/webpack/module/externals.ts +1 -1
  427. package/src/library/webpack/module/server/common.ts +1 -1
  428. package/src/library/webpack/plugins/RuntimePathPlugin.ts +8 -3
  429. package/src/library/webpack/utils/threadLoader.ts +21 -0
  430. package/src/library/webpack/utils/transpiler.ts +3 -7
  431. package/src/models/analytics/utils.ts +126 -0
  432. package/src/models/command.ts +4 -12
  433. package/src/models/config.spec.ts +6 -2
  434. package/src/models/context.ts +4 -5
  435. package/src/models/logger.ts +1 -1
  436. package/src/models/task.ts +1 -7
  437. package/src/schema/autogeneratedSchema.json +161 -20
  438. package/src/schema/topLevelSchema.js +14 -0
  439. package/src/schema/tramvai.spec.ts +3 -1
  440. package/src/typings/build/Builder.ts +3 -8
  441. package/src/typings/configEntry/application.ts +16 -7
  442. package/src/typings/configEntry/cli.ts +14 -0
  443. package/src/typings/projectType.ts +5 -0
  444. package/src/typings/public.ts +0 -2
  445. package/src/typings/target.ts +1 -1
  446. package/src/utils/commands/dependencies/findTramvaiVersion.ts +5 -12
  447. package/src/utils/commands/dependencies/getLatestPackageVersion.ts +11 -3
  448. package/src/utils/cpu-profile.ts +14 -4
  449. package/src/utils/safeRequire.spec.ts +36 -0
  450. package/src/utils/safeRequire.ts +12 -3
  451. package/lib/builder/webpack/providers/build/clientModern.d.ts +0 -3
  452. package/lib/builder/webpack/providers/build/clientModern.d.ts.map +0 -1
  453. package/lib/builder/webpack/providers/build/clientModern.js +0 -60
  454. package/lib/builder/webpack/providers/build/clientModern.js.map +0 -1
  455. package/lib/di/providers/analytics.d.ts +0 -3
  456. package/lib/di/providers/analytics.d.ts.map +0 -1
  457. package/lib/di/providers/analytics.js +0 -20
  458. package/lib/di/providers/analytics.js.map +0 -1
  459. package/lib/di/tokens/analytics.d.ts +0 -14
  460. package/lib/di/tokens/analytics.d.ts.map +0 -1
  461. package/lib/di/tokens/analytics.js +0 -8
  462. package/lib/di/tokens/analytics.js.map +0 -1
  463. package/lib/library/babel/plugins/create-token-pure.d.ts +0 -7
  464. package/lib/library/babel/plugins/create-token-pure.d.ts.map +0 -1
  465. package/lib/library/babel/plugins/create-token-pure.js +0 -39
  466. package/lib/library/babel/plugins/create-token-pure.js.map +0 -1
  467. package/lib/library/babel/plugins/fill-action-name.d.ts +0 -3
  468. package/lib/library/babel/plugins/fill-action-name.d.ts.map +0 -1
  469. package/lib/library/babel/plugins/fill-action-name.js +0 -107
  470. package/lib/library/babel/plugins/fill-action-name.js.map +0 -1
  471. package/lib/library/babel/plugins/fill-declare-action-name.d.ts +0 -6
  472. package/lib/library/babel/plugins/fill-declare-action-name.d.ts.map +0 -1
  473. package/lib/library/babel/plugins/fill-declare-action-name.js +0 -94
  474. package/lib/library/babel/plugins/fill-declare-action-name.js.map +0 -1
  475. package/lib/library/babel/plugins/lazy-component/lazy-component.d.ts +0 -7
  476. package/lib/library/babel/plugins/lazy-component/lazy-component.d.ts.map +0 -1
  477. package/lib/library/babel/plugins/lazy-component/lazy-component.js +0 -75
  478. package/lib/library/babel/plugins/lazy-component/lazy-component.js.map +0 -1
  479. package/lib/library/babel/plugins/lazy-component/legacy-universal-replace.d.ts +0 -14
  480. package/lib/library/babel/plugins/lazy-component/legacy-universal-replace.d.ts.map +0 -1
  481. package/lib/library/babel/plugins/lazy-component/legacy-universal-replace.js +0 -53
  482. package/lib/library/babel/plugins/lazy-component/legacy-universal-replace.js.map +0 -1
  483. package/lib/library/babel/plugins/lazy-component/properties/chunkName.d.ts +0 -3
  484. package/lib/library/babel/plugins/lazy-component/properties/chunkName.d.ts.map +0 -1
  485. package/lib/library/babel/plugins/lazy-component/properties/chunkName.js +0 -133
  486. package/lib/library/babel/plugins/lazy-component/properties/chunkName.js.map +0 -1
  487. package/lib/library/babel/plugins/lazy-component/properties/importAsync.d.ts +0 -3
  488. package/lib/library/babel/plugins/lazy-component/properties/importAsync.d.ts.map +0 -1
  489. package/lib/library/babel/plugins/lazy-component/properties/importAsync.js +0 -11
  490. package/lib/library/babel/plugins/lazy-component/properties/importAsync.js.map +0 -1
  491. package/lib/library/babel/plugins/lazy-component/properties/isReady.d.ts +0 -3
  492. package/lib/library/babel/plugins/lazy-component/properties/isReady.d.ts.map +0 -1
  493. package/lib/library/babel/plugins/lazy-component/properties/isReady.js +0 -14
  494. package/lib/library/babel/plugins/lazy-component/properties/isReady.js.map +0 -1
  495. package/lib/library/babel/plugins/lazy-component/properties/requireAsync.d.ts +0 -3
  496. package/lib/library/babel/plugins/lazy-component/properties/requireAsync.d.ts.map +0 -1
  497. package/lib/library/babel/plugins/lazy-component/properties/requireAsync.js +0 -15
  498. package/lib/library/babel/plugins/lazy-component/properties/requireAsync.js.map +0 -1
  499. package/lib/library/babel/plugins/lazy-component/properties/requireSync.d.ts +0 -3
  500. package/lib/library/babel/plugins/lazy-component/properties/requireSync.d.ts.map +0 -1
  501. package/lib/library/babel/plugins/lazy-component/properties/requireSync.js +0 -16
  502. package/lib/library/babel/plugins/lazy-component/properties/requireSync.js.map +0 -1
  503. package/lib/library/babel/plugins/lazy-component/properties/resolve.d.ts +0 -3
  504. package/lib/library/babel/plugins/lazy-component/properties/resolve.d.ts.map +0 -1
  505. package/lib/library/babel/plugins/lazy-component/properties/resolve.js +0 -14
  506. package/lib/library/babel/plugins/lazy-component/properties/resolve.js.map +0 -1
  507. package/lib/library/babel/plugins/lazy-component/properties/types.d.ts +0 -14
  508. package/lib/library/babel/plugins/lazy-component/properties/types.d.ts.map +0 -1
  509. package/lib/library/babel/plugins/lazy-component/properties/types.js +0 -3
  510. package/lib/library/babel/plugins/lazy-component/properties/types.js.map +0 -1
  511. package/lib/library/babel/plugins/lazy-component/properties/utils/webpackComments.d.ts +0 -14
  512. package/lib/library/babel/plugins/lazy-component/properties/utils/webpackComments.d.ts.map +0 -1
  513. package/lib/library/babel/plugins/lazy-component/properties/utils/webpackComments.js +0 -57
  514. package/lib/library/babel/plugins/lazy-component/properties/utils/webpackComments.js.map +0 -1
  515. package/lib/library/babel/plugins/provider-stack.d.ts +0 -4
  516. package/lib/library/babel/plugins/provider-stack.d.ts.map +0 -1
  517. package/lib/library/babel/plugins/provider-stack.js +0 -63
  518. package/lib/library/babel/plugins/provider-stack.js.map +0 -1
  519. package/lib/library/babel/plugins/react-compiler.d.ts +0 -13
  520. package/lib/library/babel/plugins/react-compiler.d.ts.map +0 -1
  521. package/lib/library/babel/plugins/react-compiler.js +0 -27
  522. package/lib/library/babel/plugins/react-compiler.js.map +0 -1
  523. package/lib/library/babel/plugins/react-element-info-unique.d.ts +0 -26
  524. package/lib/library/babel/plugins/react-element-info-unique.d.ts.map +0 -1
  525. package/lib/library/babel/plugins/react-element-info-unique.js +0 -112
  526. package/lib/library/babel/plugins/react-element-info-unique.js.map +0 -1
  527. package/lib/library/babel/plugins/types.h.d.ts +0 -7
  528. package/lib/library/babel/plugins/types.h.d.ts.map +0 -1
  529. package/lib/library/babel/plugins/types.h.js +0 -3
  530. package/lib/library/babel/plugins/types.h.js.map +0 -1
  531. package/lib/library/webpack/plugins/AutoPublicPathPlugin.d.ts +0 -4
  532. package/lib/library/webpack/plugins/AutoPublicPathPlugin.d.ts.map +0 -1
  533. package/lib/library/webpack/plugins/AutoPublicPathPlugin.js +0 -23
  534. package/lib/library/webpack/plugins/AutoPublicPathPlugin.js.map +0 -1
  535. package/lib/library/webpack/plugins/ModuleFederationFixRange.d.ts +0 -24
  536. package/lib/library/webpack/plugins/ModuleFederationFixRange.d.ts.map +0 -1
  537. package/lib/library/webpack/plugins/ModuleFederationFixRange.js +0 -127
  538. package/lib/library/webpack/plugins/ModuleFederationFixRange.js.map +0 -1
  539. package/lib/library/webpack/plugins/ModuleFederationIgnoreEntries.d.ts +0 -15
  540. package/lib/library/webpack/plugins/ModuleFederationIgnoreEntries.d.ts.map +0 -1
  541. package/lib/library/webpack/plugins/ModuleFederationIgnoreEntries.js +0 -49
  542. package/lib/library/webpack/plugins/ModuleFederationIgnoreEntries.js.map +0 -1
  543. package/lib/library/webpack/plugins/PolyfillCondition.d.ts +0 -8
  544. package/lib/library/webpack/plugins/PolyfillCondition.d.ts.map +0 -1
  545. package/lib/library/webpack/plugins/PolyfillCondition.js +0 -46
  546. package/lib/library/webpack/plugins/PolyfillCondition.js.map +0 -1
  547. package/lib/library/webpack/plugins/PwaIconsPlugin.d.ts +0 -12
  548. package/lib/library/webpack/plugins/PwaIconsPlugin.d.ts.map +0 -1
  549. package/lib/library/webpack/plugins/PwaIconsPlugin.js +0 -78
  550. package/lib/library/webpack/plugins/PwaIconsPlugin.js.map +0 -1
  551. package/lib/library/webpack/plugins/WebManifestPlugin.d.ts +0 -13
  552. package/lib/library/webpack/plugins/WebManifestPlugin.d.ts.map +0 -1
  553. package/lib/library/webpack/plugins/WebManifestPlugin.js +0 -47
  554. package/lib/library/webpack/plugins/WebManifestPlugin.js.map +0 -1
  555. package/lib/library/webpack/utils/polyfills/const.d.ts +0 -3
  556. package/lib/library/webpack/utils/polyfills/const.d.ts.map +0 -1
  557. package/lib/library/webpack/utils/polyfills/const.js +0 -49
  558. package/lib/library/webpack/utils/polyfills/const.js.map +0 -1
  559. package/lib/library/webpack/utils/polyfills/polyfillCondition.d.ts +0 -8
  560. package/lib/library/webpack/utils/polyfills/polyfillCondition.d.ts.map +0 -1
  561. package/lib/library/webpack/utils/polyfills/polyfillCondition.js +0 -51
  562. package/lib/library/webpack/utils/polyfills/polyfillCondition.js.map +0 -1
  563. package/lib/library/webpack/utils/polyfills/specToFeature.d.ts +0 -7
  564. package/lib/library/webpack/utils/polyfills/specToFeature.d.ts.map +0 -1
  565. package/lib/library/webpack/utils/polyfills/specToFeature.js +0 -207
  566. package/lib/library/webpack/utils/polyfills/specToFeature.js.map +0 -1
  567. package/lib/models/analytics.d.ts +0 -31
  568. package/lib/models/analytics.d.ts.map +0 -1
  569. package/lib/models/analytics.js +0 -79
  570. package/lib/models/analytics.js.map +0 -1
  571. package/lib/typings/pwa/index.d.ts +0 -80
  572. package/lib/typings/pwa/index.d.ts.map +0 -1
  573. package/lib/typings/pwa/index.js +0 -3
  574. package/lib/typings/pwa/index.js.map +0 -1
  575. package/lib/utils/sentry.d.ts +0 -2
  576. package/lib/utils/sentry.d.ts.map +0 -1
  577. package/lib/utils/sentry.js +0 -27
  578. package/lib/utils/sentry.js.map +0 -1
  579. package/src/builder/webpack/providers/build/clientModern.ts +0 -64
  580. package/src/di/providers/analytics.ts +0 -22
  581. package/src/di/tokens/analytics.ts +0 -8
  582. package/src/library/babel/plugins/__fixtures__/create-token-pure/already-has-comment.ts +0 -5
  583. package/src/library/babel/plugins/__fixtures__/create-token-pure/do-nothing.ts +0 -10
  584. package/src/library/babel/plugins/__fixtures__/create-token-pure/from-core.ts +0 -5
  585. package/src/library/babel/plugins/__fixtures__/create-token-pure/from-dippy.ts +0 -5
  586. package/src/library/babel/plugins/__fixtures__/create-token-pure/many-imports.ts +0 -9
  587. package/src/library/babel/plugins/__fixtures__/fill-declare-action-name/import-mixed.ts +0 -17
  588. package/src/library/babel/plugins/__fixtures__/fill-declare-action-name/import-with-name.ts +0 -28
  589. package/src/library/babel/plugins/__fixtures__/fill-declare-action-name/import-without-name.ts +0 -25
  590. package/src/library/babel/plugins/__fixtures__/fill-declare-action-name/require-with-name.ts +0 -21
  591. package/src/library/babel/plugins/__fixtures__/fill-declare-action-name/require-without-name.ts +0 -19
  592. package/src/library/babel/plugins/__fixtures__/lazy-component/base.ts +0 -3
  593. package/src/library/babel/plugins/__fixtures__/lazy-component/cmp.tsx +0 -7
  594. package/src/library/babel/plugins/__fixtures__/lazy-component/comments.ts +0 -7
  595. package/src/library/babel/plugins/__fixtures__/lazy-component/dynamic.ts +0 -3
  596. package/src/library/babel/plugins/__fixtures__/lazy-component/inner/first.tsx +0 -7
  597. package/src/library/babel/plugins/__fixtures__/lazy-component/inner/path/cmp.tsx +0 -7
  598. package/src/library/babel/plugins/__fixtures__/lazy-component/inner/second.tsx +0 -7
  599. package/src/library/babel/plugins/__fixtures__/lazy-component/inner/third.tsx +0 -7
  600. package/src/library/babel/plugins/__fixtures__/lazy-component/lazy+hmr.ts +0 -3
  601. package/src/library/babel/plugins/__fixtures__/lazy-component/long-import.ts +0 -3
  602. package/src/library/babel/plugins/__fixtures__/lazy-component/not-lazy-import.ts +0 -7
  603. package/src/library/babel/plugins/__fixtures__/lazy-component/not-lazy.ts +0 -8
  604. package/src/library/babel/plugins/__fixtures__/legacy-universal-replace/cmp.tsx +0 -7
  605. package/src/library/babel/plugins/__fixtures__/legacy-universal-replace/not-universal.ts +0 -8
  606. package/src/library/babel/plugins/__fixtures__/legacy-universal-replace/platform-legacy.ts +0 -5
  607. package/src/library/babel/plugins/__fixtures__/legacy-universal-replace/react-universal.ts +0 -3
  608. package/src/library/babel/plugins/__fixtures__/legacy-universal-replace/tramvai/react/index.es.ts +0 -3
  609. package/src/library/babel/plugins/__fixtures__/provider-stack/add-stack.ts +0 -22
  610. package/src/library/babel/plugins/__fixtures__/provider-stack/check-function-name.ts +0 -10
  611. package/src/library/babel/plugins/__fixtures__/provider-stack/do-nothing.ts +0 -16
  612. package/src/library/babel/plugins/__fixtures__/provider-stack/error-in-scope.ts +0 -24
  613. package/src/library/babel/plugins/__fixtures__/provider-stack/inside-await.ts +0 -12
  614. package/src/library/babel/plugins/__fixtures__/provider-stack/module-decorator.ts +0 -27
  615. package/src/library/babel/plugins/__snapshots__/create-token-pure.spec.ts.snap +0 -108
  616. package/src/library/babel/plugins/__snapshots__/fill-declare-action-name.spec.ts.snap +0 -266
  617. package/src/library/babel/plugins/__snapshots__/provider-stack.spec.ts.snap +0 -381
  618. package/src/library/babel/plugins/create-token-pure.spec.ts +0 -39
  619. package/src/library/babel/plugins/create-token-pure.ts +0 -47
  620. package/src/library/babel/plugins/fill-action-name.ts +0 -126
  621. package/src/library/babel/plugins/fill-declare-action-name.spec.ts +0 -37
  622. package/src/library/babel/plugins/fill-declare-action-name.ts +0 -110
  623. package/src/library/babel/plugins/lazy-component/__snapshots__/lazy-component.spec.ts.snap +0 -313
  624. package/src/library/babel/plugins/lazy-component/__snapshots__/legacy-universal-replace.spec.ts.snap +0 -114
  625. package/src/library/babel/plugins/lazy-component/lazy-component.spec.ts +0 -47
  626. package/src/library/babel/plugins/lazy-component/lazy-component.ts +0 -91
  627. package/src/library/babel/plugins/lazy-component/legacy-universal-replace.spec.ts +0 -34
  628. package/src/library/babel/plugins/lazy-component/legacy-universal-replace.ts +0 -88
  629. package/src/library/babel/plugins/lazy-component/properties/chunkName.ts +0 -185
  630. package/src/library/babel/plugins/lazy-component/properties/importAsync.ts +0 -8
  631. package/src/library/babel/plugins/lazy-component/properties/isReady.ts +0 -19
  632. package/src/library/babel/plugins/lazy-component/properties/requireAsync.ts +0 -20
  633. package/src/library/babel/plugins/lazy-component/properties/requireSync.ts +0 -21
  634. package/src/library/babel/plugins/lazy-component/properties/resolve.ts +0 -21
  635. package/src/library/babel/plugins/lazy-component/properties/types.ts +0 -20
  636. package/src/library/babel/plugins/lazy-component/properties/utils/webpackComments.ts +0 -61
  637. package/src/library/babel/plugins/provider-stack.spec.ts +0 -55
  638. package/src/library/babel/plugins/provider-stack.ts +0 -88
  639. package/src/library/babel/plugins/react-compiler.ts +0 -39
  640. package/src/library/babel/plugins/react-element-info-unique.ts +0 -144
  641. package/src/library/babel/plugins/types.h.ts +0 -8
  642. package/src/library/webpack/plugins/AutoPublicPathPlugin.ts +0 -23
  643. package/src/library/webpack/plugins/ModuleFederationFixRange.ts +0 -181
  644. package/src/library/webpack/plugins/ModuleFederationIgnoreEntries.ts +0 -59
  645. package/src/library/webpack/plugins/PolyfillCondition.ts +0 -62
  646. package/src/library/webpack/plugins/PwaIconsPlugin.ts +0 -94
  647. package/src/library/webpack/plugins/WebManifestPlugin.ts +0 -62
  648. package/src/library/webpack/utils/polyfills/__integration__/__snapshots__/condition.test.ts.snap +0 -1348
  649. package/src/library/webpack/utils/polyfills/__integration__/condition.test.ts +0 -128
  650. package/src/library/webpack/utils/polyfills/const.ts +0 -46
  651. package/src/library/webpack/utils/polyfills/polyfillCondition.ts +0 -63
  652. package/src/library/webpack/utils/polyfills/specToFeature.ts +0 -243
  653. package/src/models/analytics.ts +0 -116
  654. package/src/typings/pwa/index.ts +0 -83
  655. package/src/utils/sentry.ts +0 -25
  656. /package/src/commands/new/templates/{shared → packageManagerConfig/defaultPackageManagerConfig}/_npmrc.hbs +0 -0
@@ -9,7 +9,6 @@ import {
9
9
  GET_BUILD_STATS_TOKEN,
10
10
  INIT_HANDLER_TOKEN,
11
11
  WEBPACK_CLIENT_COMPILER_TOKEN,
12
- WEBPACK_CLIENT_MODERN_COMPILER_TOKEN,
13
12
  WEBPACK_SERVER_COMPILER_TOKEN,
14
13
  } from '../tokens';
15
14
  import { calculateBuildTime } from '../utils/calculateBuildTime';
@@ -19,7 +18,7 @@ import { maxMemoryRss } from '../utils/maxMemoryRss';
19
18
  export const sharedProviders: Provider[] = [
20
19
  provide({
21
20
  provide: GET_BUILD_STATS_TOKEN,
22
- useFactory: ({ withBuildStats, clientCompiler, clientModernCompiler, serverCompiler }) => {
21
+ useFactory: ({ withBuildStats, clientCompiler, serverCompiler }) => {
23
22
  if (!withBuildStats) {
24
23
  return () => {
25
24
  return {};
@@ -27,14 +26,12 @@ export const sharedProviders: Provider[] = [
27
26
  }
28
27
 
29
28
  const getClientTime = clientCompiler && calculateBuildTime(clientCompiler);
30
- const getClientModernTime = clientModernCompiler && calculateBuildTime(clientModernCompiler);
31
29
  const getServerTime = serverCompiler && calculateBuildTime(serverCompiler);
32
30
 
33
31
  const getMaxMemoryRss = maxMemoryRss();
34
32
  return () => {
35
33
  return {
36
34
  clientBuildTime: getClientTime?.(),
37
- clientModernBuildTime: getClientModernTime?.(),
38
35
  serverBuildTime: getServerTime?.(),
39
36
  maxMemoryRss: getMaxMemoryRss?.(),
40
37
  };
@@ -43,7 +40,6 @@ export const sharedProviders: Provider[] = [
43
40
  deps: {
44
41
  withBuildStats: { token: WITH_BUILD_STATS_TOKEN, optional: true },
45
42
  clientCompiler: { token: WEBPACK_CLIENT_COMPILER_TOKEN, optional: true },
46
- clientModernCompiler: { token: WEBPACK_CLIENT_MODERN_COMPILER_TOKEN, optional: true },
47
43
  serverCompiler: { token: WEBPACK_SERVER_COMPILER_TOKEN, optional: true },
48
44
  },
49
45
  }),
@@ -54,18 +50,15 @@ export const sharedProviders: Provider[] = [
54
50
  provide({
55
51
  provide: INIT_HANDLER_TOKEN,
56
52
  multi: true,
57
- useFactory: ({ eventEmitter, clientCompiler, clientModernCompiler, serverCompiler }) => {
53
+ useFactory: ({ eventEmitter, clientCompiler, serverCompiler }) => {
58
54
  return () => {
59
55
  clientCompiler && emitWebpackEvents(clientCompiler, eventEmitter, 'client');
60
- clientModernCompiler &&
61
- emitWebpackEvents(clientModernCompiler, eventEmitter, 'clientModern');
62
56
  serverCompiler && emitWebpackEvents(serverCompiler, eventEmitter, 'server');
63
57
  };
64
58
  },
65
59
  deps: {
66
60
  eventEmitter: EVENT_EMITTER_TOKEN,
67
61
  clientCompiler: { token: WEBPACK_CLIENT_COMPILER_TOKEN, optional: true },
68
- clientModernCompiler: { token: WEBPACK_CLIENT_MODERN_COMPILER_TOKEN, optional: true },
69
62
  serverCompiler: { token: WEBPACK_SERVER_COMPILER_TOKEN, optional: true },
70
63
  },
71
64
  }),
@@ -10,17 +10,11 @@ import type { CliConfigEntry } from '../../typings/configEntry/cli';
10
10
  export const CLIENT_CONFIG_MANAGER_TOKEN = createToken<ConfigManager<CliConfigEntry>>(
11
11
  'builder-webpack clientConfigManager'
12
12
  );
13
- export const CLIENT_MODERN_CONFIG_MANAGER_TOKEN = createToken<ConfigManager<CliConfigEntry>>(
14
- 'builder-webpack clientModernConfigManager'
15
- );
16
13
  export const SERVER_CONFIG_MANAGER_TOKEN = createToken<ConfigManager<CliConfigEntry>>(
17
14
  'builder-webpack serverConfigManager'
18
15
  );
19
16
  export const WEBPACK_CLIENT_CONFIG_TOKEN = createToken<Config>('builder-webpack clientConfig');
20
17
 
21
- export const WEBPACK_CLIENT_MODERN_CONFIG_TOKEN = createToken<Config>(
22
- 'builder-webpack clientModernConfig'
23
- );
24
18
  export const WEBPACK_SERVER_CONFIG_TOKEN = createToken<Config>('builder-webpack serverConfig');
25
19
 
26
20
  export const WEBPACK_COMPILER_TOKEN = createToken<MultiCompiler>('builder-webpack webpackCompiler');
@@ -29,9 +23,6 @@ export const WEBPACK_CLIENT_COMPILER_TOKEN = createToken<Compiler>(
29
23
  'builder-webpack webpackClientCompiler'
30
24
  );
31
25
 
32
- export const WEBPACK_CLIENT_MODERN_COMPILER_TOKEN = createToken<Compiler>(
33
- 'builder-webpack webpackClientModernCompiler'
34
- );
35
26
  export const WEBPACK_SERVER_COMPILER_TOKEN = createToken<Compiler>(
36
27
  'builder-webpack webpackServerCompiler'
37
28
  );
@@ -8,7 +8,6 @@ export const copyStatsJsonFileToServerDirectory = async (
8
8
  clientConfigManager: ConfigManager<ApplicationConfigEntry>
9
9
  ) => {
10
10
  const STATS_JSON_FILE_NAME = 'stats.json';
11
- const STATS_JSON_FILE_NAME_MODERN = 'stats.modern.json';
12
11
 
13
12
  const statsJsonFileDirectoryPath = clientConfigManager.output.client;
14
13
 
@@ -18,14 +17,7 @@ export const copyStatsJsonFileToServerDirectory = async (
18
17
  STATS_JSON_FILE_NAME
19
18
  );
20
19
 
21
- const statsJsonFilePathModern = path.resolve(
22
- clientConfigManager.rootDir,
23
- statsJsonFileDirectoryPath,
24
- STATS_JSON_FILE_NAME_MODERN
25
- );
26
-
27
20
  const isExistStatsJsonFilePath = fs.existsSync(statsJsonFilePath);
28
- const isExistStatsJsonFilePathModern = fs.existsSync(statsJsonFilePathModern);
29
21
 
30
22
  // TODO: Необходимо вынести все локальные константы обозначающие тип сборки
31
23
  // ('client' | 'server' | 'all') в отдельный enum и переиспользовать по всему коду @tramvai/cli
@@ -41,13 +33,4 @@ export const copyStatsJsonFileToServerDirectory = async (
41
33
  fileName: STATS_JSON_FILE_NAME,
42
34
  });
43
35
  }
44
-
45
- if (isExistStatsJsonFilePathModern && clientConfigManager.modern) {
46
- await copyBuildFile({
47
- config: clientConfigManager,
48
- inputPath: statsJsonFileDirectoryPath,
49
- fromType: FROM_BUILD_DIRECTORY_TYPE,
50
- fileName: STATS_JSON_FILE_NAME_MODERN,
51
- });
52
- }
53
36
  };
package/src/cli/CLI.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import type { PackageManager } from '@tinkoff/package-manager-wrapper';
2
+ import { AnalyticsService } from '@tramvai/api/lib/services/analytics';
2
3
  import { commander } from '../ui/commander';
3
4
  import { Context } from '../models/context';
4
5
  import type { Command, CommandMap, CommandResult } from '../models/command';
5
6
  import type { Logger } from '../models/logger';
6
7
  import type { Task, TaskMap } from '../models/task';
7
8
  import type { ConfigManager } from '../models/config';
8
- import type { Analytics } from '../models/analytics';
9
9
 
10
10
  export class CLI {
11
11
  context: Context;
@@ -47,16 +47,18 @@ export class CLI {
47
47
  tasksMap: TaskMap,
48
48
  logger: Logger,
49
49
  config: ConfigManager,
50
- analytics: Analytics,
51
50
  cliRootDir: string,
52
- cliPackageManager: PackageManager
51
+ cliPackageManager: PackageManager,
52
+ packageManager: PackageManager,
53
+ analytics: AnalyticsService
53
54
  ) {
54
55
  this.context = new Context(
55
56
  config,
56
57
  logger,
57
- analytics,
58
58
  cliRootDir,
59
59
  cliPackageManager,
60
+ packageManager,
61
+ analytics,
60
62
  this.runTask,
61
63
  this.runCommand,
62
64
  this.getTasks,
@@ -1,9 +1,7 @@
1
1
  import resolve from 'resolve';
2
2
  import { clearExecArgv } from '../utils/clearExecArgv';
3
- import { initSentry } from '../utils/sentry';
4
3
 
5
4
  clearExecArgv();
6
- initSentry();
7
5
 
8
6
  resolve(
9
7
  '@tramvai/cli/lib/cli',
package/src/cli/index.ts CHANGED
@@ -1,10 +1,12 @@
1
1
  import path from 'path';
2
2
  import { resolvePackageManager, NpmPackageManager } from '@tinkoff/package-manager-wrapper';
3
+ import {
4
+ AnalyticsService,
5
+ resolveDependenciesProperties,
6
+ } from '@tramvai/api/lib/services/analytics';
3
7
  import { CLI } from './CLI';
4
- import { Analytics } from '../models/analytics';
5
8
  import { Logger } from '../models/logger';
6
9
  import { ConfigManager } from '../models/config';
7
- import { initSentry } from '../utils/sentry';
8
10
 
9
11
  import type { CommandMap } from '../models/command';
10
12
 
@@ -53,14 +55,9 @@ const defaultPackageInfo = { name: 'init app', version: '0.0.1' };
53
55
 
54
56
  export async function cliInitialized(cliArgs = process.argv) {
55
57
  const logger = new Logger();
56
- const sentry = initSentry();
58
+ let analytics: AnalyticsService;
57
59
 
58
60
  try {
59
- const commandContext = {
60
- command: cliArgs[2] || '',
61
- argv: cliArgs,
62
- };
63
- sentry.setContext('command', commandContext);
64
61
  const commandsMap = await loadCommands();
65
62
  const tasksMap = await loadTasks();
66
63
 
@@ -70,41 +67,62 @@ export async function cliInitialized(cliArgs = process.argv) {
70
67
  }>('package.json');
71
68
  const { content: config } = getTramvaiConfig();
72
69
 
73
- const analytic = new Analytics({
74
- packageInfo,
75
- trackingCode: 'UA-122261674-1',
76
- enabled: process.env.TRAMVAI_ENABLE_ANALYTICS === 'true',
70
+ const configManager = new ConfigManager({ config, syncConfigFile: syncJsonFile });
71
+ const packageManager = resolvePackageManager({ rootDir: process.cwd() });
72
+
73
+ analytics = new AnalyticsService({
74
+ logger,
75
+ packageManager,
76
+ enabled: configManager.config?.analytics?.enabled,
77
+ endpoint: configManager.config?.analytics?.endpoint,
78
+ system: configManager.config?.analytics?.system,
77
79
  });
78
80
 
79
- const configManager = new ConfigManager({ config, syncConfigFile: syncJsonFile });
81
+ await analytics.init();
80
82
 
81
83
  const cliRootDir = path.resolve(__dirname, '../', '../');
82
84
  const cliPackageManager = new NpmPackageManager({
83
85
  rootDir: cliRootDir,
84
86
  });
85
87
 
88
+ await analytics.send({
89
+ event: 'cli:init',
90
+ message: '@tramvai/cli initialized',
91
+ level: 'INFO',
92
+ arguments: cliArgs.slice(2),
93
+ uptime: performance.now(),
94
+ dependencies: resolveDependenciesProperties(),
95
+ });
96
+
86
97
  const cliInstance = new CLI(
87
98
  commandsMap,
88
99
  tasksMap,
89
100
  logger,
90
101
  configManager,
91
- analytic,
92
102
  cliRootDir,
93
- cliPackageManager
103
+ cliPackageManager,
104
+ packageManager,
105
+ analytics
94
106
  );
95
107
 
96
108
  return await cliInstance.run(cliArgs);
97
109
  } catch (e: any) {
110
+ await analytics?.send({
111
+ event: 'cli:error',
112
+ message: '@tramvai/cli run failed',
113
+ level: 'ERROR',
114
+ arguments: cliArgs.slice(2),
115
+ error: e,
116
+ uptime: performance.now(),
117
+ });
118
+
98
119
  logger.event({
99
120
  type: 'error',
100
121
  event: 'GLOBAL:ERROR',
101
122
  message: e.message || e,
102
123
  payload: e.details || e.stack,
103
124
  });
104
- sentry.captureException(e);
105
125
 
106
126
  throw e;
107
- } finally {
108
- await sentry.close();
109
127
  }
110
128
  }
package/src/cli/runCLI.ts CHANGED
@@ -1,8 +1,11 @@
1
1
  import exit from 'exit';
2
-
3
2
  import { fixYarnSettingsOverride } from '../utils/fixYarnSettingsOverride';
4
3
  import { handleErrors } from '../utils/handleErrors';
5
- import { enableCpuProfile } from '../utils/cpu-profile';
4
+
5
+ declare global {
6
+ // eslint-disable-next-line no-var, vars-on-top
7
+ var __TRAMVAI_EXIT_HANDLERS__: Array<() => Promise<any>>;
8
+ }
6
9
 
7
10
  // to use V8's code cache to speed up instantiation time
8
11
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
@@ -12,17 +15,34 @@ handleErrors();
12
15
  fixYarnSettingsOverride();
13
16
 
14
17
  if (process.env.TRAMVAI_CPU_PROFILE) {
18
+ const { enableCpuProfile } = require('../utils/cpu-profile');
15
19
  enableCpuProfile('tramvai-cli');
16
20
  }
17
21
 
18
22
  export default (pathCli: string) => {
19
23
  const cli = require(pathCli).cliInitialized;
20
24
 
25
+ async function runExitHandlersAndQuit(code: number) {
26
+ if (global.__TRAMVAI_EXIT_HANDLERS__) {
27
+ const handlers = [...global.__TRAMVAI_EXIT_HANDLERS__];
28
+ const promise = Promise.allSettled(handlers.map((handler) => handler()));
29
+
30
+ // prevent multiple calls to exit handlers, wait the same handlers if they are already running
31
+ global.__TRAMVAI_EXIT_HANDLERS__ = [() => promise];
32
+
33
+ await promise;
34
+ }
35
+ exit(code);
36
+ }
37
+
38
+ process.on('SIGINT', async () => runExitHandlersAndQuit(0));
39
+ process.on('SIGTERM', async () => runExitHandlersAndQuit(0));
40
+
21
41
  return cli()
22
- .then(() => {
23
- exit(0);
42
+ .then(async () => {
43
+ await runExitHandlersAndQuit(0);
24
44
  })
25
- .catch(() => {
26
- exit(1);
45
+ .catch(async () => {
46
+ await runExitHandlersAndQuit(1);
27
47
  });
28
48
  };
@@ -1,5 +1,4 @@
1
1
  import { CLICommand } from '../../models/command';
2
- import { checkPackage } from './checkPackageValidator';
3
2
  import type { Params } from './add';
4
3
 
5
4
  class AddCommand extends CLICommand {
@@ -23,7 +22,9 @@ class AddCommand extends CLICommand {
23
22
 
24
23
  alias = '';
25
24
 
26
- validators = [checkPackage];
25
+ validators() {
26
+ return [require('./checkPackageValidator').checkPackage];
27
+ }
27
28
 
28
29
  async action(parameters: Params) {
29
30
  // used require for lazy code execution
@@ -1,10 +1,4 @@
1
1
  import { CLICommand } from '../../models/command';
2
- import { checkApplication } from '../../validators/commands/checkBuild';
3
- import { checkConfigExists } from '../../validators/commands/checkConfigExists';
4
- import { checkPwaDependencies } from '../../validators/commands/checkPwaDependencies';
5
- import { runMigrationsAndCheckVersions } from '../../validators/commands/runMigrationsAndCheckVersions';
6
- import { checkSwcDependencies } from '../../validators/commands/checkSwcDependencies';
7
- import { checkReactCompilerDependencies } from '../../validators/commands/checkReactCompilerDependencies';
8
2
 
9
3
  export type Params = {
10
4
  target: string;
@@ -46,14 +40,18 @@ class AnalyzeCommand extends CLICommand<Params> {
46
40
 
47
41
  alias = 'a';
48
42
 
49
- validators = [
50
- checkConfigExists,
51
- checkApplication,
52
- runMigrationsAndCheckVersions,
53
- checkPwaDependencies,
54
- checkSwcDependencies,
55
- checkReactCompilerDependencies,
56
- ];
43
+ validators() {
44
+ return [
45
+ require('../../validators/commands/checkConfigExists').checkConfigExists,
46
+ require('../../validators/commands/checkBuild').checkApplication,
47
+ require('../../validators/commands/runMigrationsAndCheckVersions')
48
+ .runMigrationsAndCheckVersions,
49
+ require('../../validators/commands/checkPwaDependencies').checkPwaDependencies,
50
+ require('../../validators/commands/checkSwcDependencies').checkSwcDependencies,
51
+ require('../../validators/commands/checkReactCompilerDependencies')
52
+ .checkReactCompilerDependencies,
53
+ ];
54
+ }
57
55
 
58
56
  action(parameters: Params) {
59
57
  // used require for lazy code execution
@@ -1,8 +1,4 @@
1
1
  import { CLICommand } from '../../models/command';
2
- import { checkApplication } from '../../validators/commands/checkBuild';
3
- import { checkConfigExists } from '../../validators/commands/checkConfigExists';
4
- import { checkDependencies } from '../../validators/commands/checkDependencies';
5
- import { runMigrationsAndCheckVersions } from '../../validators/commands/runMigrationsAndCheckVersions';
6
2
  import type { Params as StartParams } from '../start/command';
7
3
 
8
4
  export type Params = StartParams & {
@@ -45,12 +41,15 @@ export class BenchmarkCommand extends CLICommand<Params> {
45
41
 
46
42
  alias = 'bench';
47
43
 
48
- validators = [
49
- checkConfigExists,
50
- checkApplication,
51
- runMigrationsAndCheckVersions,
52
- checkDependencies,
53
- ];
44
+ validators() {
45
+ return [
46
+ require('../../validators/commands/checkConfigExists').checkConfigExists,
47
+ require('../../validators/commands/checkBuild').checkApplication,
48
+ require('../../validators/commands/runMigrationsAndCheckVersions')
49
+ .runMigrationsAndCheckVersions,
50
+ require('../../validators/commands/checkDependencies').checkDependencies,
51
+ ];
52
+ }
54
53
 
55
54
  action(parameters) {
56
55
  // used require for lazy code execution
@@ -5,6 +5,8 @@ import { app } from '../index';
5
5
  export default async (context: Context, parameters): Promise<CommandResult> => {
6
6
  await app.run('build', parameters);
7
7
 
8
+ // todo builder.getBuildStats and send analytics event "cli:command:build:stats"
9
+
8
10
  return Promise.resolve({
9
11
  status: 'ok',
10
12
  });
@@ -1,12 +1,6 @@
1
1
  import { CLICommand } from '../../models/command';
2
- import { checkApplication } from '../../validators/commands/checkBuild';
3
- import { checkConfigExists } from '../../validators/commands/checkConfigExists';
4
- import { checkDependencies } from '../../validators/commands/checkDependencies';
5
- import { runMigrationsAndCheckVersions } from '../../validators/commands/runMigrationsAndCheckVersions';
6
2
  import type { BuildCommand as BuildCommandType } from '../../api/build';
7
- import { checkPwaDependencies } from '../../validators/commands/checkPwaDependencies';
8
- import { checkSwcDependencies } from '../../validators/commands/checkSwcDependencies';
9
- import { checkReactCompilerDependencies } from '../../validators/commands/checkReactCompilerDependencies';
3
+ import { getFeaturesProperties, getProjectProperties } from '../../models/analytics/utils';
10
4
 
11
5
  export type Params = Parameters<BuildCommandType>[0] & {
12
6
  target: string;
@@ -59,17 +53,6 @@ class BuildCommand extends CLICommand<Params> {
59
53
  transformer: (value: string) => value !== 'false',
60
54
  description: 'Enable/disable persistent file cache for used cli builder',
61
55
  },
62
- {
63
- name: '--modern',
64
- value: '[modern]',
65
- description: 'modern compilation code with es2015+',
66
- },
67
- {
68
- name: '--onlyModern',
69
- value: '[onlyModern]',
70
- transformer: (value: string) => value !== 'false',
71
- description: 'Emit only modern build from client compilation',
72
- },
73
56
  {
74
57
  name: '--verboseWebpack',
75
58
  value: '[verboseWebpack]',
@@ -79,19 +62,65 @@ class BuildCommand extends CLICommand<Params> {
79
62
 
80
63
  alias = 'b';
81
64
 
82
- validators = [
83
- checkConfigExists,
84
- checkApplication,
85
- runMigrationsAndCheckVersions,
86
- checkDependencies,
87
- checkPwaDependencies,
88
- checkSwcDependencies,
89
- checkReactCompilerDependencies,
90
- ];
65
+ validators() {
66
+ return [
67
+ require('../../validators/commands/checkConfigExists').checkConfigExists,
68
+ require('../../validators/commands/checkBuild').checkApplication,
69
+ require('../../validators/commands/runMigrationsAndCheckVersions')
70
+ .runMigrationsAndCheckVersions,
71
+ require('../../validators/commands/checkDependencies').checkDependencies,
72
+ require('../../validators/commands/checkPwaDependencies').checkPwaDependencies,
73
+ require('../../validators/commands/checkSwcDependencies').checkSwcDependencies,
74
+ require('../../validators/commands/checkReactCompilerDependencies')
75
+ .checkReactCompilerDependencies,
76
+ ];
77
+ }
78
+
79
+ async action(parameters: Params) {
80
+ const start = Date.now();
81
+
82
+ await this.context.analytics.send({
83
+ event: 'cli:command:start',
84
+ message: '@tramvai/cli production build started',
85
+ level: 'INFO',
86
+ command: 'build',
87
+ parameters,
88
+ project: getProjectProperties({ parameters, configManager: this.context.config }),
89
+ features: getFeaturesProperties({ parameters, configManager: this.context.config }),
90
+ });
91
91
 
92
- action(parameters: Params) {
93
92
  // used require for lazy code execution
94
- return require('./build').default(this.context, parameters);
93
+ return require('./build')
94
+ .default(this.context, parameters)
95
+ .then(async (result) => {
96
+ await this.context.analytics.send({
97
+ event: 'cli:command:end',
98
+ message: '@tramvai/cli production build finished',
99
+ level: 'INFO',
100
+ command: 'build',
101
+ parameters,
102
+ duration: Date.now() - start,
103
+ project: getProjectProperties({ parameters, configManager: this.context.config }),
104
+ memoryUsage: this.context.analytics.memoryMonitor.read(),
105
+ });
106
+
107
+ return result;
108
+ })
109
+ .catch(async (error) => {
110
+ await this.context.analytics.send({
111
+ event: 'cli:command:error',
112
+ message: '@tramvai/cli production build failed',
113
+ level: 'ERROR',
114
+ command: 'build',
115
+ parameters,
116
+ duration: Date.now() - start,
117
+ error,
118
+ project: getProjectProperties({ parameters, configManager: this.context.config }),
119
+ memoryUsage: this.context.analytics.memoryMonitor.read(),
120
+ });
121
+
122
+ throw error;
123
+ });
95
124
  }
96
125
  }
97
126
 
@@ -2,7 +2,6 @@ import type { Provider } from '@tinkoff/dippy';
2
2
  import { createChildContainer } from '@tinkoff/dippy';
3
3
  import { initRootContainer } from '../di/root';
4
4
  import {
5
- analyticsProviders,
6
5
  builderProviders,
7
6
  commandsProviders,
8
7
  configProviders,
@@ -20,7 +19,6 @@ export const createApp = ({
20
19
  providers: Provider[];
21
20
  }): typeof COMMAND_RUNNER_TOKEN => {
22
21
  const rootContainer = initRootContainer([
23
- ...analyticsProviders,
24
22
  ...stdProviders,
25
23
  ...configProviders,
26
24
  ...commandsProviders,
@@ -1,5 +1,4 @@
1
1
  import { CLICommand } from '../../models/command';
2
- import { checkConfigExists } from '../../validators/commands/checkConfigExists';
3
2
 
4
3
  export type GeneratorName = 'action' | 'reducer' | 'component' | 'page' | 'bundle' | 'module';
5
4
  export type Params = {
@@ -21,7 +20,9 @@ class GenerateCommand extends CLICommand<Params> {
21
20
 
22
21
  alias = 'g';
23
22
 
24
- validators = [checkConfigExists];
23
+ validators() {
24
+ return [require('../../validators/commands/checkConfigExists').checkConfigExists];
25
+ }
25
26
 
26
27
  action(parameters: Params) {
27
28
  // used require for lazy code execution
@@ -1,5 +1,4 @@
1
1
  import { CLICommand } from '../../models/command';
2
- import { checkApplication } from '../../validators/commands/checkBuild';
3
2
 
4
3
  class LintCommand extends CLICommand {
5
4
  name = 'lint';
@@ -12,7 +11,9 @@ class LintCommand extends CLICommand {
12
11
 
13
12
  alias = 'l';
14
13
 
15
- validators = [checkApplication];
14
+ validators() {
15
+ return [require('../../validators/commands/checkBuild').checkApplication];
16
+ }
16
17
 
17
18
  action() {
18
19
  return Promise.resolve({
@@ -33,8 +33,6 @@ class NewCommand extends CLICommand<Params> {
33
33
 
34
34
  alias = 'n';
35
35
 
36
- validators = [];
37
-
38
36
  action(parameters: Params) {
39
37
  // used require for lazy code execution
40
38
  return require('./new').default(this.context, parameters);