@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.
- 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/tokens.d.ts +4 -4
- 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/api/start-prod/tokens.d.ts +4 -4
- package/lib/builder/webpack/providers/analyze/shared.js +23 -24
- package/lib/builder/webpack/providers/analyze/shared.js.map +1 -1
- package/lib/builder/webpack/tokens.d.ts +18 -18
- 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/index.d.ts +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/di/tokens/analytics.d.ts +3 -3
- package/lib/di/tokens/builder.d.ts +4 -4
- package/lib/di/tokens/command.d.ts +5 -5
- package/lib/di/tokens/config.d.ts +5 -5
- package/lib/di/tokens/logger.d.ts +1 -1
- package/lib/di/tokens/packageManager.d.ts +2 -2
- package/lib/di/tokens/server.d.ts +2 -2
- package/lib/di/tokens/std.d.ts +2 -2
- package/lib/di/tokens/ui.d.ts +3 -3
- package/lib/external/pages.d.ts +3 -5
- package/lib/external/pages.js.map +1 -1
- package/lib/library/babel/plugins/create-token-pure.d.ts +4 -1
- package/lib/library/babel/plugins/create-token-pure.js +5 -3
- package/lib/library/babel/plugins/create-token-pure.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 +89 -86
- 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/generate/generators/action/action.ts.hbs +4 -4
- 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/babel/plugins/__fixtures__/create-token-pure/already-has-comment.ts +5 -0
- package/src/library/babel/plugins/__snapshots__/create-token-pure.spec.ts.snap +18 -0
- package/src/library/babel/plugins/create-token-pure.spec.ts +4 -0
- package/src/library/babel/plugins/create-token-pure.ts +9 -4
- 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
|
@@ -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
|
-
|
|
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
|
-
|
|
121
|
-
name: string;
|
|
122
|
-
root: string;
|
|
123
|
-
type: ProjectType;
|
|
124
|
-
version?: string;
|
|
98
|
+
}
|
|
99
|
+
interface BuildConfig {
|
|
125
100
|
/**
|
|
126
101
|
* @default {}
|
|
127
102
|
*/
|
|
128
|
-
|
|
103
|
+
options?: Record<string, any>;
|
|
104
|
+
/**
|
|
105
|
+
* @default {}
|
|
106
|
+
*/
|
|
107
|
+
configurations?: {
|
|
129
108
|
/**
|
|
130
|
-
* @
|
|
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
|
-
|
|
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
|
-
* @
|
|
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
|
-
* @
|
|
244
|
+
* @title Read pages from file system
|
|
245
|
+
* @default false
|
|
139
246
|
*/
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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,
|
|
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<
|
|
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
|
|
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
|
-
|
|
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,
|
|
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
|
|
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
|
|
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
|
-
|
|
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,
|
|
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;
|
package/lib/utils/npmRequire.js
CHANGED
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npmRequire.js","sourceRoot":"","sources":["../../src/utils/npmRequire.ts"],"names":[],"mappings":";;;;AAAA,oDAAoB;AACpB,wDAAwB;AACxB,sDAAsB;AAGtB,SAAe,qBAAqB,CAAC,EACnC,cAAc,EACd,WAAW,EACX,cAAc,EACd,WAAW,GAAG,2BAA2B,EACzC,QAAQ,EACR,MAAM,GAQP;;QACC,IAAI,MAAM,cAAc,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE;YACtD,OAAO;SACR;QAED,MAAM,OAAO,GAAG,aAAG,CAAC;YAClB,UAAU,EAAE,WAAW;SACxB,CAAC,CAAC,KAAK,EAAE,CAAC;QAEX,IAAI;YACF,MAAM,cAAc,CAAC,OAAO,CAAC;gBAC3B,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,cAAc;gBACvB,QAAQ;gBACR,MAAM;aACP,CAAC,CAAC;SACJ;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,KAAK,CAAC,2BAA2B,WAAW,KAAK,CAAC,EAAE,CAA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,EAAE;gBACrC,cAAc,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC;aAClD;SACF;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,EAAE,CAAC,CAAC;SACnD;QAED,MAAM,qBAAqB,CAAC;YAC1B,cAAc;YACd,WAAW;YACX,cAAc;YACd,WAAW;YACX,QAAQ;YACR,MAAM,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 =
|
|
13
|
-
const hasReact18 =
|
|
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,
|
|
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
|
|
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
|
-
|
|
12
|
-
|
|
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,
|
|
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"}
|