@tramvai/cli 2.10.2 → 2.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/lib/api/analyze/index.d.ts +1 -0
- package/lib/api/analyze/index.js.map +1 -1
- package/lib/api/build/index.d.ts +1 -0
- package/lib/api/build/index.js.map +1 -1
- package/lib/api/start/index.d.ts +1 -0
- package/lib/api/start/index.js.map +1 -1
- package/lib/api/start/utils/banner.js +1 -1
- package/lib/api/start/utils/banner.js.map +1 -1
- package/lib/api/start-prod/index.d.ts +1 -0
- package/lib/api/start-prod/index.js.map +1 -1
- package/lib/builder/webpack/providers/analyze/shared.js +23 -24
- package/lib/builder/webpack/providers/analyze/shared.js.map +1 -1
- package/lib/commands/analyze/command.d.ts +8 -0
- package/lib/commands/analyze/command.js +6 -0
- package/lib/commands/analyze/command.js.map +1 -1
- package/lib/commands/build/command.js +6 -0
- package/lib/commands/build/command.js.map +1 -1
- package/lib/commands/new/steps/initializationGit.js +2 -2
- package/lib/commands/new/steps/initializationGit.js.map +1 -1
- package/lib/commands/new/steps/installDependencies.js +10 -6
- package/lib/commands/new/steps/installDependencies.js.map +1 -1
- package/lib/commands/new/steps/renderTemplate.js +1 -1
- package/lib/commands/new/steps/renderTemplate.js.map +1 -1
- package/lib/commands/new/utils/applyTemplate.js +1 -1
- package/lib/commands/new/utils/applyTemplate.js.map +1 -1
- package/lib/commands/start/command.js +6 -0
- package/lib/commands/start/command.js.map +1 -1
- package/lib/commands/start-prod/command.js +6 -0
- package/lib/commands/start-prod/command.js.map +1 -1
- package/lib/commands/static/command.d.ts +6 -0
- package/lib/commands/static/command.js +6 -0
- package/lib/commands/static/command.js.map +1 -1
- package/lib/commands/update/dependantLibs.d.ts +2 -0
- package/lib/commands/update/dependantLibs.js +43 -0
- package/lib/commands/update/dependantLibs.js.map +1 -0
- package/lib/commands/update/updatePackageJson.js +7 -24
- package/lib/commands/update/updatePackageJson.js.map +1 -1
- package/lib/config/configManager.d.ts +3 -0
- package/lib/config/configManager.js +10 -7
- package/lib/config/configManager.js.map +1 -1
- package/lib/external/pages.d.ts +3 -5
- package/lib/external/pages.js.map +1 -1
- package/lib/library/webpack/application/client/common.js +1 -1
- package/lib/library/webpack/application/client/common.js.map +1 -1
- package/lib/library/webpack/application/server/common.js +1 -1
- package/lib/library/webpack/application/server/common.js.map +1 -1
- package/lib/library/webpack/blocks/configToEnv.js +1 -1
- package/lib/library/webpack/blocks/configToEnv.js.map +1 -1
- package/lib/library/webpack/blocks/filesClient.js +5 -2
- package/lib/library/webpack/blocks/filesClient.js.map +1 -1
- package/lib/library/webpack/blocks/filesServer.js +9 -5
- package/lib/library/webpack/blocks/filesServer.js.map +1 -1
- package/lib/library/webpack/blocks/pagesResolve.js +1 -1
- package/lib/library/webpack/blocks/pagesResolve.js.map +1 -1
- package/lib/library/webpack/common/main.js +17 -16
- package/lib/library/webpack/common/main.js.map +1 -1
- package/lib/library/webpack/loaders/image-loader/index.d.ts +5 -0
- package/lib/library/webpack/loaders/image-loader/index.js +25 -0
- package/lib/library/webpack/loaders/image-loader/index.js.map +1 -0
- package/lib/schema/autogeneratedSchema.json +165 -294
- package/lib/typings/configEntry/common.d.ts +169 -175
- package/lib/utils/commands/dependencies/checkVersions.js +3 -11
- package/lib/utils/commands/dependencies/checkVersions.js.map +1 -1
- package/lib/utils/commands/dependencies/getLatestPackageVersion.d.ts +1 -1
- package/lib/utils/commands/dependencies/getLatestPackageVersion.js +2 -6
- package/lib/utils/commands/dependencies/getLatestPackageVersion.js.map +1 -1
- package/lib/utils/commands/dependencies/getPackageInfo.d.ts +1 -0
- package/lib/utils/commands/dependencies/getPackageInfo.js +13 -0
- package/lib/utils/commands/dependencies/getPackageInfo.js.map +1 -0
- package/lib/utils/commands/dependencies/migrate.js +3 -11
- package/lib/utils/commands/dependencies/migrate.js.map +1 -1
- package/lib/utils/npmRequire.d.ts +15 -0
- package/lib/utils/npmRequire.js +15 -0
- package/lib/utils/npmRequire.js.map +1 -1
- package/lib/utils/shouldUseReactRoot.js +3 -3
- package/lib/utils/shouldUseReactRoot.js.map +1 -1
- package/lib/validators/commands/runMigrationsAndCheckVersions.js +3 -7
- package/lib/validators/commands/runMigrationsAndCheckVersions.js.map +1 -1
- package/package.json +88 -85
- package/schema.json +165 -294
- package/src/api/analyze/index.ts +1 -0
- package/src/api/build/__integration__/__fixtures__/tramvai.json +3 -0
- package/src/api/build/__integration__/build.test.ts +1 -0
- package/src/api/build/index.ts +1 -0
- package/src/api/start/__integration__/__fixtures__/tramvai.json +2 -4
- package/src/api/start/index.ts +1 -0
- package/src/api/start/utils/banner.ts +1 -1
- package/src/api/start-prod/index.ts +1 -0
- package/src/builder/webpack/providers/analyze/shared.ts +1 -1
- package/src/commands/analyze/command.ts +6 -0
- package/src/commands/build/command.ts +6 -0
- package/src/commands/new/steps/initializationGit.ts +3 -2
- package/src/commands/new/steps/installDependencies.ts +15 -8
- package/src/commands/new/steps/renderTemplate.ts +1 -1
- package/src/commands/new/templates/app/monorepo/tramvai.json.hbs +2 -4
- package/src/commands/new/templates/app/multirepo/tramvai.json.hbs +2 -4
- package/src/commands/new/templates/shared/_npmrc.hbs +0 -1
- package/src/commands/new/utils/applyTemplate.ts +5 -1
- package/src/commands/start/command.ts +6 -0
- package/src/commands/start-prod/command.ts +6 -0
- package/src/commands/static/command.ts +6 -0
- package/src/commands/update/dependantLibs.ts +49 -0
- package/src/commands/update/updatePackageJson.spec.ts +99 -0
- package/src/commands/update/updatePackageJson.ts +7 -25
- package/src/config/configManager.ts +9 -3
- package/src/external/pages.ts +3 -5
- package/src/library/webpack/application/client/common.ts +1 -3
- package/src/library/webpack/application/server/common.ts +1 -3
- package/src/library/webpack/blocks/configToEnv.ts +1 -1
- package/src/library/webpack/blocks/filesClient.ts +5 -2
- package/src/library/webpack/blocks/filesServer.ts +8 -5
- package/src/library/webpack/blocks/pagesResolve.ts +1 -1
- package/src/library/webpack/common/main.ts +19 -18
- package/src/library/webpack/loaders/image-loader/index.ts +26 -0
- package/src/schema/autogeneratedSchema.json +165 -294
- package/src/schema/tramvai.spec.ts +146 -148
- package/src/typings/configEntry/common.ts +171 -175
- package/src/utils/commands/dependencies/checkVersions.ts +3 -13
- package/src/utils/commands/dependencies/getLatestPackageVersion.ts +2 -7
- package/src/utils/commands/dependencies/getPackageInfo.ts +10 -0
- package/src/utils/commands/dependencies/migrate.ts +3 -13
- package/src/utils/npmRequire.ts +15 -0
- package/src/utils/shouldUseReactRoot.ts +4 -4
- package/src/validators/commands/runMigrationsAndCheckVersions.ts +3 -8
- package/lib/utils/commands/dependencies/update.d.ts +0 -7
- package/lib/utils/commands/dependencies/update.js +0 -19
- package/lib/utils/commands/dependencies/update.js.map +0 -1
- package/lib/utils/commands/dependencies/updatePackageJson.d.ts +0 -1
- package/lib/utils/commands/dependencies/updatePackageJson.js +0 -57
- package/lib/utils/commands/dependencies/updatePackageJson.js.map +0 -1
- package/src/utils/commands/dependencies/update.ts +0 -31
- package/src/utils/commands/dependencies/updatePackageJson.ts +0 -63
|
@@ -87,168 +87,166 @@ describe('JSON schema для tramvai.json', () => {
|
|
|
87
87
|
expect(valid).toBe(true);
|
|
88
88
|
expect(config).not.toEqual(originalConfig);
|
|
89
89
|
|
|
90
|
-
expect(config).
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
90
|
+
expect(config).toMatchInlineSnapshot(`
|
|
91
|
+
Object {
|
|
92
|
+
"projects": Object {
|
|
93
|
+
"app": Object {
|
|
94
|
+
"commands": Object {
|
|
95
|
+
"build": Object {
|
|
96
|
+
"configurations": Object {
|
|
97
|
+
"checkAsyncTs": false,
|
|
98
|
+
"commonChunk": true,
|
|
99
|
+
"commonChunkSplitNumber": 3,
|
|
100
|
+
"dedupe": "equality",
|
|
101
|
+
"definePlugin": Object {
|
|
102
|
+
"dev": Object {},
|
|
103
|
+
"prod": Object {},
|
|
104
|
+
},
|
|
105
|
+
"enableFillActionNamePlugin": false,
|
|
106
|
+
"experiments": Object {
|
|
107
|
+
"minicss": Object {
|
|
108
|
+
"useImportModule": true,
|
|
109
|
+
},
|
|
110
|
+
"transpilation": Object {
|
|
111
|
+
"loader": "babel",
|
|
112
|
+
},
|
|
113
|
+
"webpack": Object {
|
|
114
|
+
"backCompat": false,
|
|
115
|
+
"cacheUnaffected": true,
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
"externals": Array [],
|
|
119
|
+
"fileSystemPages": Object {
|
|
120
|
+
"enable": false,
|
|
121
|
+
"pagesDir": "pages",
|
|
122
|
+
"routesDir": "routes",
|
|
123
|
+
},
|
|
124
|
+
"generateDataQaTag": false,
|
|
125
|
+
"granularChunks": false,
|
|
126
|
+
"granularChunksMinSize": 20000,
|
|
127
|
+
"granularChunksSplitNumber": 2,
|
|
128
|
+
"modern": true,
|
|
129
|
+
"postcss": Object {
|
|
130
|
+
"config": "postcss.config",
|
|
131
|
+
},
|
|
132
|
+
"removeTypeofWindow": true,
|
|
133
|
+
"sourceMap": false,
|
|
134
|
+
"sourceMapServer": false,
|
|
135
|
+
"terserParallel": true,
|
|
136
|
+
"transpileOnlyModernLibs": true,
|
|
123
137
|
},
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
webpack: {
|
|
132
|
-
cacheUnaffected: true,
|
|
133
|
-
backCompat: false,
|
|
134
|
-
},
|
|
135
|
-
minicss: {
|
|
136
|
-
useImportModule: true,
|
|
137
|
-
},
|
|
138
|
-
fileSystemPages: {
|
|
139
|
-
enable: false,
|
|
140
|
-
routesDir: 'routes',
|
|
141
|
-
pagesDir: 'pages',
|
|
142
|
-
},
|
|
143
|
-
transpilation: {
|
|
144
|
-
loader: 'babel',
|
|
145
|
-
},
|
|
138
|
+
"options": Object {
|
|
139
|
+
"outputClient": "dist/client",
|
|
140
|
+
"outputServer": "dist/server",
|
|
141
|
+
"outputStatic": "dist/static",
|
|
142
|
+
"polyfill": "",
|
|
143
|
+
"server": "src/server",
|
|
144
|
+
"serverApiDir": "src/api",
|
|
146
145
|
},
|
|
147
146
|
},
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
147
|
+
"serve": Object {
|
|
148
|
+
"configurations": Object {
|
|
149
|
+
"experiments": Object {
|
|
150
|
+
"minicss": Object {
|
|
151
|
+
"useImportModule": true,
|
|
152
|
+
},
|
|
153
|
+
"serverRunner": "process",
|
|
154
|
+
"transpilation": Object {
|
|
155
|
+
"loader": "babel",
|
|
156
|
+
},
|
|
157
|
+
"webpack": Object {
|
|
158
|
+
"backCompat": false,
|
|
159
|
+
"cacheUnaffected": true,
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
"externals": Array [
|
|
163
|
+
"react$",
|
|
164
|
+
"react-dom",
|
|
165
|
+
"prop-types",
|
|
166
|
+
"express",
|
|
167
|
+
"core-js",
|
|
168
|
+
],
|
|
169
|
+
"hotRefresh": false,
|
|
170
|
+
"modern": false,
|
|
171
|
+
"sourceMap": false,
|
|
172
172
|
},
|
|
173
|
+
"notifications": Object {},
|
|
173
174
|
},
|
|
174
|
-
notifications: {},
|
|
175
175
|
},
|
|
176
|
+
"name": "test-app",
|
|
177
|
+
"root": "src/app",
|
|
178
|
+
"type": "application",
|
|
176
179
|
},
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
180
|
+
"module": Object {
|
|
181
|
+
"commands": Object {
|
|
182
|
+
"build": Object {
|
|
183
|
+
"configurations": Object {
|
|
184
|
+
"dedupe": "equality",
|
|
185
|
+
"definePlugin": Object {
|
|
186
|
+
"dev": Object {},
|
|
187
|
+
"prod": Object {},
|
|
188
|
+
},
|
|
189
|
+
"enableFillActionNamePlugin": false,
|
|
190
|
+
"experiments": Object {
|
|
191
|
+
"minicss": Object {
|
|
192
|
+
"useImportModule": true,
|
|
193
|
+
},
|
|
194
|
+
"transpilation": Object {
|
|
195
|
+
"loader": "babel",
|
|
196
|
+
},
|
|
197
|
+
"webpack": Object {
|
|
198
|
+
"backCompat": false,
|
|
199
|
+
"cacheUnaffected": true,
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
"fileSystemPages": Object {
|
|
203
|
+
"enable": false,
|
|
204
|
+
"pagesDir": "pages",
|
|
205
|
+
"routesDir": "routes",
|
|
206
|
+
},
|
|
207
|
+
"generateDataQaTag": false,
|
|
208
|
+
"modern": true,
|
|
209
|
+
"postcss": Object {
|
|
210
|
+
"config": "postcss.config",
|
|
211
|
+
"cssLocalIdentName": "[hash:base64:5]",
|
|
212
|
+
},
|
|
213
|
+
"removeTypeofWindow": true,
|
|
214
|
+
"sourceMap": false,
|
|
215
|
+
"sourceMapServer": false,
|
|
216
|
+
"terserParallel": true,
|
|
217
|
+
"transpileOnlyModernLibs": true,
|
|
200
218
|
},
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
webpack: {
|
|
204
|
-
cacheUnaffected: true,
|
|
205
|
-
backCompat: false,
|
|
206
|
-
},
|
|
207
|
-
minicss: {
|
|
208
|
-
useImportModule: true,
|
|
209
|
-
},
|
|
210
|
-
fileSystemPages: {
|
|
211
|
-
enable: false,
|
|
212
|
-
routesDir: 'routes',
|
|
213
|
-
pagesDir: 'pages',
|
|
214
|
-
},
|
|
215
|
-
transpilation: {
|
|
216
|
-
loader: 'babel',
|
|
217
|
-
},
|
|
219
|
+
"options": Object {
|
|
220
|
+
"output": "dist/modules",
|
|
218
221
|
},
|
|
219
222
|
},
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
},
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
fileSystemPages: {
|
|
238
|
-
enable: false,
|
|
239
|
-
routesDir: 'routes',
|
|
240
|
-
pagesDir: 'pages',
|
|
241
|
-
},
|
|
242
|
-
transpilation: {
|
|
243
|
-
loader: 'babel',
|
|
244
|
-
},
|
|
223
|
+
"serve": Object {
|
|
224
|
+
"configurations": Object {
|
|
225
|
+
"experiments": Object {
|
|
226
|
+
"minicss": Object {
|
|
227
|
+
"useImportModule": true,
|
|
228
|
+
},
|
|
229
|
+
"transpilation": Object {
|
|
230
|
+
"loader": "babel",
|
|
231
|
+
},
|
|
232
|
+
"webpack": Object {
|
|
233
|
+
"backCompat": false,
|
|
234
|
+
"cacheUnaffected": true,
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
"hotRefresh": false,
|
|
238
|
+
"modern": false,
|
|
239
|
+
"sourceMap": false,
|
|
245
240
|
},
|
|
241
|
+
"notifications": Object {},
|
|
246
242
|
},
|
|
247
|
-
notifications: {},
|
|
248
243
|
},
|
|
244
|
+
"name": "test-module",
|
|
245
|
+
"root": "src/module",
|
|
246
|
+
"type": "module",
|
|
249
247
|
},
|
|
250
248
|
},
|
|
251
|
-
}
|
|
252
|
-
|
|
249
|
+
}
|
|
250
|
+
`);
|
|
253
251
|
});
|
|
254
252
|
});
|