@tramvai/cli 2.7.1 → 2.20.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 (154) hide show
  1. package/README.md +12 -0
  2. package/lib/api/analyze/index.d.ts +1 -0
  3. package/lib/api/analyze/index.js.map +1 -1
  4. package/lib/api/build/index.d.ts +1 -0
  5. package/lib/api/build/index.js.map +1 -1
  6. package/lib/api/start/index.d.ts +1 -0
  7. package/lib/api/start/index.js.map +1 -1
  8. package/lib/api/start/tokens.d.ts +4 -4
  9. package/lib/api/start/utils/banner.js +1 -1
  10. package/lib/api/start/utils/banner.js.map +1 -1
  11. package/lib/api/start-prod/index.d.ts +1 -0
  12. package/lib/api/start-prod/index.js.map +1 -1
  13. package/lib/api/start-prod/tokens.d.ts +4 -4
  14. package/lib/builder/webpack/providers/analyze/shared.js +23 -24
  15. package/lib/builder/webpack/providers/analyze/shared.js.map +1 -1
  16. package/lib/builder/webpack/tokens.d.ts +18 -18
  17. package/lib/commands/analyze/command.d.ts +8 -0
  18. package/lib/commands/analyze/command.js +6 -0
  19. package/lib/commands/analyze/command.js.map +1 -1
  20. package/lib/commands/build/command.js +6 -0
  21. package/lib/commands/build/command.js.map +1 -1
  22. package/lib/commands/index.d.ts +1 -1
  23. package/lib/commands/new/steps/initializationGit.js +2 -2
  24. package/lib/commands/new/steps/initializationGit.js.map +1 -1
  25. package/lib/commands/new/steps/installDependencies.js +10 -6
  26. package/lib/commands/new/steps/installDependencies.js.map +1 -1
  27. package/lib/commands/new/steps/renderTemplate.js +1 -1
  28. package/lib/commands/new/steps/renderTemplate.js.map +1 -1
  29. package/lib/commands/new/utils/applyTemplate.js +1 -1
  30. package/lib/commands/new/utils/applyTemplate.js.map +1 -1
  31. package/lib/commands/start/command.js +6 -0
  32. package/lib/commands/start/command.js.map +1 -1
  33. package/lib/commands/start-prod/command.js +6 -0
  34. package/lib/commands/start-prod/command.js.map +1 -1
  35. package/lib/commands/static/command.d.ts +6 -0
  36. package/lib/commands/static/command.js +6 -0
  37. package/lib/commands/static/command.js.map +1 -1
  38. package/lib/commands/update/dependantLibs.d.ts +2 -0
  39. package/lib/commands/update/dependantLibs.js +43 -0
  40. package/lib/commands/update/dependantLibs.js.map +1 -0
  41. package/lib/commands/update/updatePackageJson.js +7 -24
  42. package/lib/commands/update/updatePackageJson.js.map +1 -1
  43. package/lib/config/configManager.d.ts +3 -0
  44. package/lib/config/configManager.js +10 -7
  45. package/lib/config/configManager.js.map +1 -1
  46. package/lib/di/tokens/analytics.d.ts +3 -3
  47. package/lib/di/tokens/builder.d.ts +4 -4
  48. package/lib/di/tokens/command.d.ts +5 -5
  49. package/lib/di/tokens/config.d.ts +5 -5
  50. package/lib/di/tokens/logger.d.ts +1 -1
  51. package/lib/di/tokens/packageManager.d.ts +2 -2
  52. package/lib/di/tokens/server.d.ts +2 -2
  53. package/lib/di/tokens/std.d.ts +2 -2
  54. package/lib/di/tokens/ui.d.ts +3 -3
  55. package/lib/external/pages.d.ts +3 -5
  56. package/lib/external/pages.js.map +1 -1
  57. package/lib/library/babel/plugins/create-token-pure.d.ts +4 -1
  58. package/lib/library/babel/plugins/create-token-pure.js +5 -3
  59. package/lib/library/babel/plugins/create-token-pure.js.map +1 -1
  60. package/lib/library/webpack/application/client/common.js +1 -1
  61. package/lib/library/webpack/application/client/common.js.map +1 -1
  62. package/lib/library/webpack/application/server/common.js +1 -1
  63. package/lib/library/webpack/application/server/common.js.map +1 -1
  64. package/lib/library/webpack/blocks/configToEnv.js +1 -1
  65. package/lib/library/webpack/blocks/configToEnv.js.map +1 -1
  66. package/lib/library/webpack/blocks/filesClient.js +5 -2
  67. package/lib/library/webpack/blocks/filesClient.js.map +1 -1
  68. package/lib/library/webpack/blocks/filesServer.js +9 -5
  69. package/lib/library/webpack/blocks/filesServer.js.map +1 -1
  70. package/lib/library/webpack/blocks/pagesResolve.js +1 -1
  71. package/lib/library/webpack/blocks/pagesResolve.js.map +1 -1
  72. package/lib/library/webpack/common/main.js +17 -16
  73. package/lib/library/webpack/common/main.js.map +1 -1
  74. package/lib/library/webpack/loaders/image-loader/index.d.ts +5 -0
  75. package/lib/library/webpack/loaders/image-loader/index.js +25 -0
  76. package/lib/library/webpack/loaders/image-loader/index.js.map +1 -0
  77. package/lib/schema/autogeneratedSchema.json +165 -294
  78. package/lib/typings/configEntry/common.d.ts +169 -175
  79. package/lib/utils/commands/dependencies/checkVersions.js +3 -11
  80. package/lib/utils/commands/dependencies/checkVersions.js.map +1 -1
  81. package/lib/utils/commands/dependencies/getLatestPackageVersion.d.ts +1 -1
  82. package/lib/utils/commands/dependencies/getLatestPackageVersion.js +2 -6
  83. package/lib/utils/commands/dependencies/getLatestPackageVersion.js.map +1 -1
  84. package/lib/utils/commands/dependencies/getPackageInfo.d.ts +1 -0
  85. package/lib/utils/commands/dependencies/getPackageInfo.js +13 -0
  86. package/lib/utils/commands/dependencies/getPackageInfo.js.map +1 -0
  87. package/lib/utils/commands/dependencies/migrate.js +3 -11
  88. package/lib/utils/commands/dependencies/migrate.js.map +1 -1
  89. package/lib/utils/npmRequire.d.ts +15 -0
  90. package/lib/utils/npmRequire.js +15 -0
  91. package/lib/utils/npmRequire.js.map +1 -1
  92. package/lib/utils/shouldUseReactRoot.js +3 -3
  93. package/lib/utils/shouldUseReactRoot.js.map +1 -1
  94. package/lib/validators/commands/runMigrationsAndCheckVersions.js +3 -7
  95. package/lib/validators/commands/runMigrationsAndCheckVersions.js.map +1 -1
  96. package/package.json +89 -86
  97. package/schema.json +165 -294
  98. package/src/api/analyze/index.ts +1 -0
  99. package/src/api/build/__integration__/__fixtures__/tramvai.json +3 -0
  100. package/src/api/build/__integration__/build.test.ts +1 -0
  101. package/src/api/build/index.ts +1 -0
  102. package/src/api/start/__integration__/__fixtures__/tramvai.json +2 -4
  103. package/src/api/start/index.ts +1 -0
  104. package/src/api/start/utils/banner.ts +1 -1
  105. package/src/api/start-prod/index.ts +1 -0
  106. package/src/builder/webpack/providers/analyze/shared.ts +1 -1
  107. package/src/commands/analyze/command.ts +6 -0
  108. package/src/commands/build/command.ts +6 -0
  109. package/src/commands/generate/generators/action/action.ts.hbs +4 -4
  110. package/src/commands/new/steps/initializationGit.ts +3 -2
  111. package/src/commands/new/steps/installDependencies.ts +15 -8
  112. package/src/commands/new/steps/renderTemplate.ts +1 -1
  113. package/src/commands/new/templates/app/monorepo/tramvai.json.hbs +2 -4
  114. package/src/commands/new/templates/app/multirepo/tramvai.json.hbs +2 -4
  115. package/src/commands/new/templates/shared/_npmrc.hbs +0 -1
  116. package/src/commands/new/utils/applyTemplate.ts +5 -1
  117. package/src/commands/start/command.ts +6 -0
  118. package/src/commands/start-prod/command.ts +6 -0
  119. package/src/commands/static/command.ts +6 -0
  120. package/src/commands/update/dependantLibs.ts +49 -0
  121. package/src/commands/update/updatePackageJson.spec.ts +99 -0
  122. package/src/commands/update/updatePackageJson.ts +7 -25
  123. package/src/config/configManager.ts +9 -3
  124. package/src/external/pages.ts +3 -5
  125. package/src/library/babel/plugins/__fixtures__/create-token-pure/already-has-comment.ts +5 -0
  126. package/src/library/babel/plugins/__snapshots__/create-token-pure.spec.ts.snap +18 -0
  127. package/src/library/babel/plugins/create-token-pure.spec.ts +4 -0
  128. package/src/library/babel/plugins/create-token-pure.ts +9 -4
  129. package/src/library/webpack/application/client/common.ts +1 -3
  130. package/src/library/webpack/application/server/common.ts +1 -3
  131. package/src/library/webpack/blocks/configToEnv.ts +1 -1
  132. package/src/library/webpack/blocks/filesClient.ts +5 -2
  133. package/src/library/webpack/blocks/filesServer.ts +8 -5
  134. package/src/library/webpack/blocks/pagesResolve.ts +1 -1
  135. package/src/library/webpack/common/main.ts +19 -18
  136. package/src/library/webpack/loaders/image-loader/index.ts +26 -0
  137. package/src/schema/autogeneratedSchema.json +165 -294
  138. package/src/schema/tramvai.spec.ts +146 -148
  139. package/src/typings/configEntry/common.ts +171 -175
  140. package/src/utils/commands/dependencies/checkVersions.ts +3 -13
  141. package/src/utils/commands/dependencies/getLatestPackageVersion.ts +2 -7
  142. package/src/utils/commands/dependencies/getPackageInfo.ts +10 -0
  143. package/src/utils/commands/dependencies/migrate.ts +3 -13
  144. package/src/utils/npmRequire.ts +15 -0
  145. package/src/utils/shouldUseReactRoot.ts +4 -4
  146. package/src/validators/commands/runMigrationsAndCheckVersions.ts +3 -8
  147. package/lib/utils/commands/dependencies/update.d.ts +0 -7
  148. package/lib/utils/commands/dependencies/update.js +0 -19
  149. package/lib/utils/commands/dependencies/update.js.map +0 -1
  150. package/lib/utils/commands/dependencies/updatePackageJson.d.ts +0 -1
  151. package/lib/utils/commands/dependencies/updatePackageJson.js +0 -57
  152. package/lib/utils/commands/dependencies/updatePackageJson.js.map +0 -1
  153. package/src/utils/commands/dependencies/update.ts +0 -31
  154. package/src/utils/commands/dependencies/updatePackageJson.ts +0 -63
@@ -43,27 +43,6 @@ export interface Experiments {
43
43
  */
44
44
  useImportModule?: boolean;
45
45
  };
46
- /**
47
- * @title experimental settings for File-System Routing feature
48
- * @default {}
49
- */
50
- fileSystemPages?: {
51
- /**
52
- * @title Read pages from file system
53
- * @default false
54
- */
55
- enable?: boolean;
56
- /**
57
- * @title Folder with pages from which static routers are generated
58
- * @default "routes"
59
- */
60
- routesDir?: string | false;
61
- /**
62
- * @title Folder with components which can be manually added to static routers
63
- * @default "pages"
64
- */
65
- pagesDir?: string | false;
66
- };
67
46
  /**
68
47
  * @title experimental settings for code transpilation
69
48
  * @default {}
@@ -76,7 +55,7 @@ export interface Experiments {
76
55
  loader?: 'babel' | 'swc';
77
56
  };
78
57
  }
79
- declare type serveConfig = {
58
+ interface ServeConfig {
80
59
  /**
81
60
  * @default {}
82
61
  */
@@ -116,176 +95,191 @@ declare type serveConfig = {
116
95
  */
117
96
  experiments?: Experiments;
118
97
  };
119
- };
120
- export interface ConfigEntry {
121
- name: string;
122
- root: string;
123
- type: ProjectType;
124
- version?: string;
98
+ }
99
+ interface BuildConfig {
125
100
  /**
126
101
  * @default {}
127
102
  */
128
- commands?: {
103
+ options?: Record<string, any>;
104
+ /**
105
+ * @default {}
106
+ */
107
+ configurations?: {
129
108
  /**
130
- * @default {}
109
+ * @title Enable production build for modern browsers
110
+ * @default true
111
+ */
112
+ modern?: boolean;
113
+ /**
114
+ * @title Enable DedupePlugin
115
+ * @default "equality"
116
+ */
117
+ dedupe?: DeduplicateStrategy | false;
118
+ /**
119
+ * @title Sets ignore to DedupePlugin
120
+ */
121
+ dedupeIgnore?: string[];
122
+ /**
123
+ * @title Enable replacing `typeof window` expression
124
+ * @default true
125
+ */
126
+ removeTypeofWindow?: boolean;
127
+ /**
128
+ * @title Enable source maps in production build
129
+ * @default false
130
+ */
131
+ sourceMap?: boolean;
132
+ /**
133
+ * @title Enable source maps for server assets in production build
134
+ * @default false
135
+ */
136
+ sourceMapServer?: boolean;
137
+ /**
138
+ * @title Configuration for enabling parallel compression for terser plugin
139
+ * @default true
140
+ */
141
+ terserParallel?: boolean;
142
+ /**
143
+ * @title List of modules to exclude from @babel/preset-env
144
+ */
145
+ excludesPresetEnv?: string[];
146
+ /**
147
+ * @title thread-loader config
148
+ * @additionalProperties true
149
+ */
150
+ threadLoader?: Record<string, any>;
151
+ /**
152
+ * @title Define plugin config
153
+ * @default {"prod": {}, "dev": {}}
154
+ * @additionalProperties true
155
+ */
156
+ definePlugin?: Record<string, any>;
157
+ /**
158
+ * @deprecated
159
+ *
160
+ * @default false
161
+ */
162
+ generateDataQaTag?: boolean;
163
+ /**
164
+ * @deprecated включает использование плагина fill-action-name
165
+ *
166
+ * @default false
131
167
  */
132
- build?: {
168
+ enableFillActionNamePlugin?: boolean;
169
+ /**
170
+ * @title Set minimizer for css
171
+ */
172
+ cssMinimize?: 'csso';
173
+ postcss?: {
174
+ /**
175
+ * @title Path to postcss config file
176
+ */
177
+ config?: string;
178
+ /**
179
+ * @title CSS identifiers build algorythm
180
+ */
181
+ cssLocalIdentName?: string;
182
+ /**
183
+ * @title CSS identifiers build algorythm for development buld
184
+ */
185
+ cssLocalIdentNameDev?: string;
186
+ /**
187
+ * @title CSS identifiers build algorythm for production build
188
+ */
189
+ cssLocalIdentNameProd?: string;
190
+ /**
191
+ * @title Path to postcss config file for assets
192
+ */
193
+ assetsConfig?: string;
194
+ };
195
+ /**
196
+ * @title Aliases for project imports
197
+ * @additionalProperties true
198
+ */
199
+ alias?: Record<string, any>;
200
+ /**
201
+ * @title svgo-loader options
202
+ */
203
+ svgo?: {
204
+ /**
205
+ * @title svgo plugins
206
+ */
207
+ plugins?: Record<string, any>[];
208
+ };
209
+ /**
210
+ * @title Settings for image-webpack-loader
211
+ */
212
+ imageOptimization?: {
213
+ /**
214
+ * @title Enable image-webpack-loader
215
+ */
216
+ enabled?: boolean;
133
217
  /**
134
- * @default {}
218
+ * @title Pass options to image-webpack-loader
219
+ * @additionalProperties true
135
220
  */
136
221
  options?: Record<string, any>;
222
+ };
223
+ /**
224
+ * @title transpile libs based only on %40tinkoff/is-modern-lib
225
+ * @default true
226
+ */
227
+ transpileOnlyModernLibs?: boolean;
228
+ /**
229
+ * @title Browser package resolve aliases. E.g. { "stream": "stream-browserify" }
230
+ * @additionalProperties true
231
+ */
232
+ webpackResolveAlias?: Record<string, string>;
233
+ /**
234
+ * @title Browser packages to provide with ProvidePlugin. E.g. { "Buffer": ["buffer", "Buffer"] }
235
+ * @additionalProperties true
236
+ */
237
+ webpackProvide?: Record<string, any>;
238
+ /**
239
+ * @title experimental settings for File-System Routing feature
240
+ * @default {}
241
+ */
242
+ fileSystemPages?: {
137
243
  /**
138
- * @default {}
244
+ * @title Read pages from file system
245
+ * @default false
139
246
  */
140
- configurations?: {
141
- /**
142
- * @title Enable production build for modern browsers
143
- * @default false
144
- */
145
- modern?: boolean;
146
- /**
147
- * @title Enable DedupePlugin
148
- * @default false
149
- */
150
- dedupe?: DeduplicateStrategy | false;
151
- /**
152
- * @title Sets ignore to DedupePlugin
153
- */
154
- dedupeIgnore?: string[];
155
- /**
156
- * @title Enable replacing `typeof window` expression
157
- * @default true
158
- */
159
- removeTypeofWindow?: boolean;
160
- /**
161
- * @title Enable source maps in production build
162
- * @default false
163
- */
164
- sourceMap?: boolean;
165
- /**
166
- * @title Enable source maps for server assets in production build
167
- * @default false
168
- */
169
- sourceMapServer?: boolean;
170
- /**
171
- * @title Configuration for enabling parallel compression for terser plugin
172
- * @default true
173
- */
174
- terserParallel?: boolean;
175
- /**
176
- * @title List of modules to exclude from @babel/preset-env
177
- */
178
- excludesPresetEnv?: string[];
179
- /**
180
- * @title thread-loader config
181
- * @additionalProperties true
182
- */
183
- threadLoader?: Record<string, any>;
184
- /**
185
- * @title Define plugin config
186
- * @default {"prod": {}, "dev": {}}
187
- * @additionalProperties true
188
- */
189
- definePlugin?: Record<string, any>;
190
- /**
191
- * @deprecated
192
- *
193
- * @default false
194
- */
195
- generateDataQaTag?: boolean;
196
- /**
197
- * @deprecated включает использование плагина fill-action-name
198
- *
199
- * @default false
200
- */
201
- enableFillActionNamePlugin?: boolean;
202
- /**
203
- * @title Set minimizer for css
204
- */
205
- cssMinimize?: 'csso';
206
- postcss?: {
207
- /**
208
- * @title Path to postcss config file
209
- */
210
- config?: string;
211
- /**
212
- * @title CSS identifiers build algorythm
213
- */
214
- cssLocalIdentName?: string;
215
- /**
216
- * @title CSS identifiers build algorythm for development buld
217
- */
218
- cssLocalIdentNameDev?: string;
219
- /**
220
- * @title CSS identifiers build algorythm for production build
221
- */
222
- cssLocalIdentNameProd?: string;
223
- /**
224
- * @title Path to postcss config file for assets
225
- */
226
- assetsConfig?: string;
227
- };
228
- /**
229
- * @title Aliases for project imports
230
- * @additionalProperties true
231
- */
232
- alias?: Record<string, any>;
233
- /**
234
- * @title svgo-loader options
235
- */
236
- svgo?: {
237
- /**
238
- * @title svgo plugins
239
- */
240
- plugins?: Record<string, any>[];
241
- };
242
- /**
243
- * @title Settings for image-webpack-loader
244
- */
245
- imageOptimization?: {
246
- /**
247
- * @title Enable image-webpack-loader
248
- */
249
- enabled?: boolean;
250
- /**
251
- * @title Pass options to image-webpack-loader
252
- * @additionalProperties true
253
- */
254
- options?: Record<string, any>;
255
- };
256
- /**
257
- * @title transpile libs based only on %40tinkoff/is-modern-lib
258
- * @default true
259
- */
260
- transpileOnlyModernLibs?: boolean;
261
- /**
262
- * @title Experimental settings
263
- * @default {}
264
- */
265
- experiments?: Experiments;
266
- /**
267
- * @title Browser package resolve aliases. E.g. { "stream": "stream-browserify" }
268
- * @additionalProperties true
269
- */
270
- webpackResolveAlias?: Record<string, string>;
271
- /**
272
- * @title Browser packages to provide with ProvidePlugin. E.g. { "Buffer": ["buffer", "Buffer"] }
273
- * @additionalProperties true
274
- */
275
- webpackProvide?: Record<string, any>;
276
- };
247
+ enable?: boolean;
248
+ /**
249
+ * @title Folder with pages from which static routers are generated
250
+ * @default "routes"
251
+ */
252
+ routesDir?: string | false;
253
+ /**
254
+ * @title Folder with components which can be manually added to static routers
255
+ * @default "pages"
256
+ */
257
+ pagesDir?: string | false;
277
258
  };
278
259
  /**
260
+ * @title Experimental settings
279
261
  * @default {}
280
262
  */
281
- serve?: serveConfig;
263
+ experiments?: Experiments;
282
264
  };
265
+ }
266
+ export interface ConfigEntry {
267
+ name: string;
268
+ root: string;
269
+ type: ProjectType;
270
+ version?: string;
283
271
  /**
284
- * @deprecated move serveConfig to commands.serve
285
- *
286
272
  * @default {}
287
- * @ignore true
288
273
  */
289
- serve?: serveConfig;
274
+ commands?: {
275
+ /**
276
+ * @default {}
277
+ */
278
+ build?: BuildConfig;
279
+ /**
280
+ * @default {}
281
+ */
282
+ serve?: ServeConfig;
283
+ };
290
284
  }
291
285
  export {};
@@ -2,21 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.checkVersions = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const ora_1 = tslib_1.__importDefault(require("ora"));
6
- const util_1 = tslib_1.__importDefault(require("util"));
7
- const child_process_1 = tslib_1.__importDefault(require("child_process"));
8
- const exec = util_1.default.promisify(child_process_1.default.exec);
5
+ const execa_1 = require("execa");
9
6
  const checkVersions = (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
10
- const spinner = ora_1.default('Check tramvai versions').start();
11
7
  try {
12
- yield exec(`npx tramvai-check-versions`);
13
- spinner.stop();
14
- console.log('Versions check completed');
8
+ yield execa_1.command(`npx tramvai-check-versions`, { stdio: 'inherit' });
15
9
  }
16
10
  catch (e) {
17
- spinner.stop();
18
- console.error('Versions check error:');
19
- throw e;
11
+ throw new Error('Versions check failed');
20
12
  }
21
13
  });
22
14
  exports.checkVersions = checkVersions;
@@ -1 +1 @@
1
- {"version":3,"file":"checkVersions.js","sourceRoot":"","sources":["../../../../src/utils/commands/dependencies/checkVersions.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AACtB,wDAAwB;AACxB,0EAAyC;AAGzC,MAAM,IAAI,GAAG,cAAI,CAAC,SAAS,CAAC,uBAAY,CAAC,IAAI,CAAC,CAAC;AAExC,MAAM,aAAa,GAAG,CAAO,OAAgB,EAAE,EAAE;IACtD,MAAM,OAAO,GAAG,aAAG,CAAC,wBAAwB,CAAC,CAAC,KAAK,EAAE,CAAC;IAEtD,IAAI;QACF,MAAM,IAAI,CAAC,4BAA4B,CAAC,CAAC;QACzC,OAAO,CAAC,IAAI,EAAE,CAAC;QACf,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;KACzC;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,IAAI,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;QACvC,MAAM,CAAC,CAAC;KACT;AACH,CAAC,CAAA,CAAC;AAZW,QAAA,aAAa,iBAYxB"}
1
+ {"version":3,"file":"checkVersions.js","sourceRoot":"","sources":["../../../../src/utils/commands/dependencies/checkVersions.ts"],"names":[],"mappings":";;;;AAAA,iCAAgC;AAGzB,MAAM,aAAa,GAAG,CAAO,OAAgB,EAAE,EAAE;IACtD,IAAI;QACF,MAAM,eAAO,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;KACnE;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;KAC1C;AACH,CAAC,CAAA,CAAC;AANW,QAAA,aAAa,iBAMxB"}
@@ -1 +1 @@
1
- export declare const getLatestPackageVersion: (packageName: string, distTag?: string) => Promise<string>;
1
+ export declare const getLatestPackageVersion: (packageName: string, distTag?: string) => Promise<any>;
@@ -2,13 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getLatestPackageVersion = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const util_1 = tslib_1.__importDefault(require("util"));
6
- const child_process_1 = tslib_1.__importDefault(require("child_process"));
7
- const exec = util_1.default.promisify(child_process_1.default.exec);
5
+ const getPackageInfo_1 = require("./getPackageInfo");
8
6
  const getLatestPackageVersion = (packageName, distTag = 'latest') => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
9
- const { stdout } = yield exec(`npm view ${packageName}@${distTag} version`);
10
- const version = stdout.replace('\n', '');
11
- return version;
7
+ return getPackageInfo_1.getPackageInfo(`${packageName}@${distTag}`, 'version');
12
8
  });
13
9
  exports.getLatestPackageVersion = getLatestPackageVersion;
14
10
  //# sourceMappingURL=getLatestPackageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getLatestPackageVersion.js","sourceRoot":"","sources":["../../../../src/utils/commands/dependencies/getLatestPackageVersion.ts"],"names":[],"mappings":";;;;AAAA,wDAAwB;AACxB,0EAAyC;AAEzC,MAAM,IAAI,GAAG,cAAI,CAAC,SAAS,CAAC,uBAAY,CAAC,IAAI,CAAC,CAAC;AAExC,MAAM,uBAAuB,GAAG,CAAO,WAAmB,EAAE,OAAO,GAAG,QAAQ,EAAE,EAAE;IACvF,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,YAAY,WAAW,IAAI,OAAO,UAAU,CAAC,CAAC;IAC5E,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACzC,OAAO,OAAO,CAAC;AACjB,CAAC,CAAA,CAAC;AAJW,QAAA,uBAAuB,2BAIlC"}
1
+ {"version":3,"file":"getLatestPackageVersion.js","sourceRoot":"","sources":["../../../../src/utils/commands/dependencies/getLatestPackageVersion.ts"],"names":[],"mappings":";;;;AAAA,qDAAkD;AAE3C,MAAM,uBAAuB,GAAG,CAAO,WAAmB,EAAE,OAAO,GAAG,QAAQ,EAAE,EAAE;IACvF,OAAO,+BAAc,CAAC,GAAG,WAAW,IAAI,OAAO,EAAE,EAAE,SAAS,CAAC,CAAC;AAChE,CAAC,CAAA,CAAC;AAFW,QAAA,uBAAuB,2BAElC"}
@@ -0,0 +1 @@
1
+ export declare const getPackageInfo: (packageName: string, field?: string) => Promise<any>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getPackageInfo = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const util_1 = tslib_1.__importDefault(require("util"));
6
+ const child_process_1 = tslib_1.__importDefault(require("child_process"));
7
+ const exec = util_1.default.promisify(child_process_1.default.exec);
8
+ const getPackageInfo = (packageName, field) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
9
+ const { stdout } = yield exec(`npm view ${packageName} --json ${field !== null && field !== void 0 ? field : ''}`);
10
+ return JSON.parse(stdout);
11
+ });
12
+ exports.getPackageInfo = getPackageInfo;
13
+ //# sourceMappingURL=getPackageInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPackageInfo.js","sourceRoot":"","sources":["../../../../src/utils/commands/dependencies/getPackageInfo.ts"],"names":[],"mappings":";;;;AAAA,wDAAwB;AACxB,0EAAyC;AAEzC,MAAM,IAAI,GAAG,cAAI,CAAC,SAAS,CAAC,uBAAY,CAAC,IAAI,CAAC,CAAC;AAExC,MAAM,cAAc,GAAG,CAAO,WAAmB,EAAE,KAAc,EAAE,EAAE;IAC1E,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,YAAY,WAAW,WAAW,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,EAAE,CAAC,CAAC;IAE/E,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC,CAAA,CAAC;AAJW,QAAA,cAAc,kBAIzB"}
@@ -2,21 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.migrate = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const ora_1 = tslib_1.__importDefault(require("ora"));
6
- const util_1 = tslib_1.__importDefault(require("util"));
7
- const child_process_1 = tslib_1.__importDefault(require("child_process"));
8
- const exec = util_1.default.promisify(child_process_1.default.exec);
5
+ const execa_1 = require("execa");
9
6
  const migrate = (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
10
- const spinner = ora_1.default('Migrations start').start();
11
7
  try {
12
- yield exec(`npx tramvai-migrate`);
13
- spinner.stop();
14
- console.log('Migrations completed');
8
+ yield execa_1.command(`npx tramvai-migrate`, { stdio: 'inherit' });
15
9
  }
16
10
  catch (e) {
17
- spinner.stop();
18
- console.error('Migrations error:');
19
- throw e;
11
+ throw new Error('Migrations failed');
20
12
  }
21
13
  });
22
14
  exports.migrate = migrate;
@@ -1 +1 @@
1
- {"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../../../src/utils/commands/dependencies/migrate.ts"],"names":[],"mappings":";;;;AAAA,sDAAsB;AACtB,wDAAwB;AACxB,0EAAyC;AAGzC,MAAM,IAAI,GAAG,cAAI,CAAC,SAAS,CAAC,uBAAY,CAAC,IAAI,CAAC,CAAC;AAExC,MAAM,OAAO,GAAG,CAAO,OAAgB,EAAE,EAAE;IAChD,MAAM,OAAO,GAAG,aAAG,CAAC,kBAAkB,CAAC,CAAC,KAAK,EAAE,CAAC;IAEhD,IAAI;QACF,MAAM,IAAI,CAAC,qBAAqB,CAAC,CAAC;QAClC,OAAO,CAAC,IAAI,EAAE,CAAC;QACf,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;KACrC;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,IAAI,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;QACnC,MAAM,CAAC,CAAC;KACT;AACH,CAAC,CAAA,CAAC;AAZW,QAAA,OAAO,WAYlB"}
1
+ {"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../../../src/utils/commands/dependencies/migrate.ts"],"names":[],"mappings":";;;;AAAA,iCAAgC;AAGzB,MAAM,OAAO,GAAG,CAAO,OAAgB,EAAE,EAAE;IAChD,IAAI;QACF,MAAM,eAAO,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;KAC5D;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;KACtC;AACH,CAAC,CAAA,CAAC;AANW,QAAA,OAAO,WAMlB"}
@@ -1,10 +1,25 @@
1
1
  import type { CLI_PACKAGE_MANAGER, CLI_ROOT_DIR_TOKEN } from '../di/tokens';
2
+ /**
3
+ * @deprecated Better do not use this function as it has some problems with npm@>=7
4
+ * This function only used by @tramvai/cli mostly to install optional dependencies during usage and meant to install
5
+ * single package in @tramvai/cli/node_modules dir. Before npm@7 it works just fine and there was only single package was installed.
6
+ * But starting with npm@7 it now installs all of the dependencies tree (see [issue](https://github.com/npm/cli/issues/3023)) that leads
7
+ * to very long installs and additional separate dependencies tree inside @tramvai/cli
8
+ *
9
+ * To mitigate this issue:
10
+ * - wait to [rfc](https://github.com/npm/rfcs/pull/364) be implemented
11
+ * - try [hack](https://github.com/npm/rfcs/pull/364#issuecomment-823637315) with internal workspace suggested in rfc from above
12
+ * - use specific npm version by calling explicitly `npx -q npm@^6`
13
+ */
2
14
  declare function npmRequire({ cliRootDir, packageManager, packageName, description, }: {
3
15
  cliRootDir: typeof CLI_ROOT_DIR_TOKEN;
4
16
  packageManager: typeof CLI_PACKAGE_MANAGER;
5
17
  packageName: string;
6
18
  description?: string;
7
19
  }): Promise<any>;
20
+ /**
21
+ * @deprecated Better do not use it, see deprecation notes for the npmRequire
22
+ */
8
23
  declare function npmRequireList({ cliRootDir, packageManager, dependencies, description, }: {
9
24
  cliRootDir: typeof CLI_ROOT_DIR_TOKEN;
10
25
  packageManager: typeof CLI_PACKAGE_MANAGER;
@@ -27,6 +27,18 @@ function runtimeInstallPackage({ packageManager, packageName, packageVersion, de
27
27
  spinner.stop();
28
28
  });
29
29
  }
30
+ /**
31
+ * @deprecated Better do not use this function as it has some problems with npm@>=7
32
+ * This function only used by @tramvai/cli mostly to install optional dependencies during usage and meant to install
33
+ * single package in @tramvai/cli/node_modules dir. Before npm@7 it works just fine and there was only single package was installed.
34
+ * But starting with npm@7 it now installs all of the dependencies tree (see [issue](https://github.com/npm/cli/issues/3023)) that leads
35
+ * to very long installs and additional separate dependencies tree inside @tramvai/cli
36
+ *
37
+ * To mitigate this issue:
38
+ * - wait to [rfc](https://github.com/npm/rfcs/pull/364) be implemented
39
+ * - try [hack](https://github.com/npm/rfcs/pull/364#issuecomment-823637315) with internal workspace suggested in rfc from above
40
+ * - use specific npm version by calling explicitly `npx -q npm@^6`
41
+ */
30
42
  function npmRequire({ cliRootDir, packageManager, packageName, description, }) {
31
43
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
32
44
  const cliPackageJsonFile = path_1.default.resolve(cliRootDir, 'package.json');
@@ -78,6 +90,9 @@ function npmRequire({ cliRootDir, packageManager, packageName, description, }) {
78
90
  });
79
91
  }
80
92
  exports.npmRequire = npmRequire;
93
+ /**
94
+ * @deprecated Better do not use it, see deprecation notes for the npmRequire
95
+ */
81
96
  function npmRequireList({ cliRootDir, packageManager, dependencies, description, }) {
82
97
  return Promise.all(dependencies.map((dependency) => npmRequire({
83
98
  cliRootDir,
@@ -1 +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M,EAAE,IAAI;SACb,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC,WAAW,CAAC,CAAC;IAC9B,CAAC;CAAA;AA4BQ,gCAAU;AA1BnB;;GAEG;AACH,SAAS,cAAc,CAAC,EACtB,UAAU,EACV,cAAc,EACd,YAAY,EACZ,WAAW,GAMZ;IACC,OAAO,OAAO,CAAC,GAAG,CAChB,YAAY,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAC9B,UAAU,CAAC;QACT,UAAU;QACV,cAAc;QACd,WAAW,EAAE,UAAU;QACvB,WAAW;KACZ,CAAC,CACH,CACF,CAAC;AACJ,CAAC;AAEoB,wCAAc"}
@@ -9,9 +9,9 @@ exports.shouldUseReactRoot = once_1.default(() => {
9
9
  var _a;
10
10
  // eslint-disable-next-line import/no-extraneous-dependencies
11
11
  const reactVersion = require('react').version;
12
- const isReactExperimental = Boolean(reactVersion && /0\.0\.0-experimental/.test(reactVersion));
13
- const hasReact18 = Boolean(reactVersion) &&
12
+ const isReactExperimental = reactVersion && /0\.0\.0-experimental/.test(reactVersion);
13
+ const hasReact18 = reactVersion &&
14
14
  (semver_1.default.gte(reactVersion, '18.0.0') || ((_a = semver_1.default.coerce(reactVersion)) === null || _a === void 0 ? void 0 : _a.version) === '18.0.0');
15
- return hasReact18 || isReactExperimental;
15
+ return Boolean(hasReact18 || isReactExperimental);
16
16
  });
17
17
  //# sourceMappingURL=shouldUseReactRoot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shouldUseReactRoot.js","sourceRoot":"","sources":["../../src/utils/shouldUseReactRoot.ts"],"names":[],"mappings":";;;;AAAA,gFAAgD;AAChD,4DAA4B;AAE5B,8FAA8F;AACjF,QAAA,kBAAkB,GAAG,cAAI,CAAC,GAAG,EAAE;;IAC1C,6DAA6D;IAC7D,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;IAC9C,MAAM,mBAAmB,GAAG,OAAO,CAAC,YAAY,IAAI,sBAAsB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAC/F,MAAM,UAAU,GACd,OAAO,CAAC,YAAY,CAAC;QACrB,CAAC,gBAAM,CAAC,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAA,MAAA,gBAAM,CAAC,MAAM,CAAC,YAAY,CAAC,0CAAE,OAAO,MAAK,QAAQ,CAAC,CAAC;IAE5F,OAAO,UAAU,IAAI,mBAAmB,CAAC;AAC3C,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"shouldUseReactRoot.js","sourceRoot":"","sources":["../../src/utils/shouldUseReactRoot.ts"],"names":[],"mappings":";;;;AAAA,gFAAgD;AAChD,4DAA4B;AAE5B,8FAA8F;AACjF,QAAA,kBAAkB,GAAG,cAAI,CAAC,GAAG,EAAE;;IAC1C,6DAA6D;IAC7D,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;IAC9C,MAAM,mBAAmB,GAAG,YAAY,IAAI,sBAAsB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACtF,MAAM,UAAU,GACd,YAAY;QACZ,CAAC,gBAAM,CAAC,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAA,MAAA,gBAAM,CAAC,MAAM,CAAC,YAAY,CAAC,0CAAE,OAAO,MAAK,QAAQ,CAAC,CAAC;IAE5F,OAAO,OAAO,CAAC,UAAU,IAAI,mBAAmB,CAAC,CAAC;AACpD,CAAC,CAAC,CAAC"}
@@ -2,16 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.runMigrationsAndCheckVersions = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const util_1 = tslib_1.__importDefault(require("util"));
6
- const child_process_1 = tslib_1.__importDefault(require("child_process"));
5
+ const execa_1 = require("execa");
7
6
  const lockfileHash_1 = require("../../utils/lockfileHash");
8
- const exec = util_1.default.promisify(child_process_1.default.exec);
9
7
  const runMigrationsAndCheckVersions = (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
10
8
  if (lockfileHash_1.isLockfileChanged(context)) {
11
- const { stdout: migrateLog } = yield exec(`npx tramvai-migrate`);
12
- console.log(migrateLog);
13
- const { stdout: checkLog } = yield exec(`npx tramvai-check-versions`);
14
- console.log(checkLog);
9
+ yield execa_1.command(`npx tramvai-migrate`, { stdio: 'inherit' });
10
+ yield execa_1.command(`npx tramvai-check-versions`, { stdio: 'inherit' });
15
11
  }
16
12
  return { name: 'runMigrationsAndCheckVersions', status: 'ok' };
17
13
  });
@@ -1 +1 @@
1
- {"version":3,"file":"runMigrationsAndCheckVersions.js","sourceRoot":"","sources":["../../../src/validators/commands/runMigrationsAndCheckVersions.ts"],"names":[],"mappings":";;;;AAAA,wDAAwB;AACxB,0EAAyC;AACzC,2DAA6D;AAG7D,MAAM,IAAI,GAAG,cAAI,CAAC,SAAS,CAAC,uBAAY,CAAC,IAAI,CAAC,CAAC;AAExC,MAAM,6BAA6B,GAAc,CAAO,OAAO,EAAE,EAAE;IACxE,IAAI,gCAAiB,CAAC,OAAO,CAAC,EAAE;QAC9B,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,CAAC;QACjE,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACxB,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,4BAA4B,CAAC,CAAC;QACtE,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;KACvB;IAED,OAAO,EAAE,IAAI,EAAE,+BAA+B,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AACjE,CAAC,CAAA,CAAC;AATW,QAAA,6BAA6B,iCASxC"}
1
+ {"version":3,"file":"runMigrationsAndCheckVersions.js","sourceRoot":"","sources":["../../../src/validators/commands/runMigrationsAndCheckVersions.ts"],"names":[],"mappings":";;;;AAAA,iCAAgC;AAChC,2DAA6D;AAGtD,MAAM,6BAA6B,GAAc,CAAO,OAAO,EAAE,EAAE;IACxE,IAAI,gCAAiB,CAAC,OAAO,CAAC,EAAE;QAC9B,MAAM,eAAO,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC3D,MAAM,eAAO,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;KACnE;IAED,OAAO,EAAE,IAAI,EAAE,+BAA+B,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AACjE,CAAC,CAAA,CAAC;AAPW,QAAA,6BAA6B,iCAOxC"}