@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.
- package/__migrations__/d2023-02-01b-tramvai-config-refactoring.js +78 -80
- package/__migrations__/d2025-04-11b-tramvai-config-remove-modern.js +13 -0
- package/bin/spawn.js +76 -4
- package/lib/api/analyze/index.d.ts +0 -1
- package/lib/api/analyze/index.d.ts.map +1 -1
- package/lib/api/analyze/index.js +2 -2
- package/lib/api/analyze/index.js.map +1 -1
- package/lib/api/build/application.d.ts.map +1 -1
- package/lib/api/build/application.js +2 -5
- package/lib/api/build/application.js.map +1 -1
- package/lib/api/build/child-app.d.ts.map +1 -1
- package/lib/api/build/child-app.js +1 -5
- package/lib/api/build/child-app.js.map +1 -1
- package/lib/api/build/index.d.ts +0 -2
- package/lib/api/build/index.d.ts.map +1 -1
- package/lib/api/build/index.js.map +1 -1
- package/lib/api/build/module.d.ts.map +1 -1
- package/lib/api/build/module.js +1 -3
- package/lib/api/build/module.js.map +1 -1
- package/lib/api/index.d.ts.map +1 -1
- package/lib/api/index.js +0 -4
- package/lib/api/index.js.map +1 -1
- package/lib/api/start/application.experimental.d.ts +7 -0
- package/lib/api/start/application.experimental.d.ts.map +1 -0
- package/lib/api/start/application.experimental.js +275 -0
- package/lib/api/start/application.experimental.js.map +1 -0
- package/lib/api/start/index.d.ts +1 -1
- package/lib/api/start/index.d.ts.map +1 -1
- package/lib/api/start/index.js +17 -6
- package/lib/api/start/index.js.map +1 -1
- package/lib/api/start/utils/banner.d.ts.map +1 -1
- package/lib/api/start/utils/banner.js +0 -1
- package/lib/api/start/utils/banner.js.map +1 -1
- package/lib/api/start/utils/tips/tips.d.ts.map +1 -1
- package/lib/api/start/utils/tips/tips.js +0 -8
- package/lib/api/start/utils/tips/tips.js.map +1 -1
- package/lib/builder/webpack/devServer/pool/process/pool.d.ts.map +1 -1
- package/lib/builder/webpack/devServer/pool/process/pool.js +0 -2
- package/lib/builder/webpack/devServer/pool/process/pool.js.map +1 -1
- package/lib/builder/webpack/devServer/server.d.ts.map +1 -1
- package/lib/builder/webpack/devServer/server.js +4 -0
- package/lib/builder/webpack/devServer/server.js.map +1 -1
- package/lib/builder/webpack/devServer/setup.d.ts.map +1 -1
- package/lib/builder/webpack/devServer/setup.js +3 -1
- package/lib/builder/webpack/devServer/setup.js.map +1 -1
- package/lib/builder/webpack/index.d.ts.map +1 -1
- package/lib/builder/webpack/index.js +3 -5
- package/lib/builder/webpack/index.js.map +1 -1
- package/lib/builder/webpack/providers/analyze/shared.d.ts.map +1 -1
- package/lib/builder/webpack/providers/analyze/shared.js +5 -9
- package/lib/builder/webpack/providers/analyze/shared.js.map +1 -1
- package/lib/builder/webpack/providers/build/client.d.ts.map +1 -1
- package/lib/builder/webpack/providers/build/client.js +0 -1
- package/lib/builder/webpack/providers/build/client.js.map +1 -1
- package/lib/builder/webpack/providers/build/clientShared.d.ts.map +1 -1
- package/lib/builder/webpack/providers/build/clientShared.js +4 -6
- package/lib/builder/webpack/providers/build/clientShared.js.map +1 -1
- package/lib/builder/webpack/providers/client.d.ts.map +1 -1
- package/lib/builder/webpack/providers/client.js +10 -22
- package/lib/builder/webpack/providers/client.js.map +1 -1
- package/lib/builder/webpack/providers/server.d.ts.map +1 -1
- package/lib/builder/webpack/providers/server.js +10 -9
- package/lib/builder/webpack/providers/server.js.map +1 -1
- package/lib/builder/webpack/providers/shared.d.ts.map +1 -1
- package/lib/builder/webpack/providers/shared.js +2 -8
- package/lib/builder/webpack/providers/shared.js.map +1 -1
- package/lib/builder/webpack/tokens.d.ts +4 -139
- package/lib/builder/webpack/tokens.d.ts.map +1 -1
- package/lib/builder/webpack/tokens.js +1 -4
- package/lib/builder/webpack/tokens.js.map +1 -1
- package/lib/builder/webpack/utils/copyStatsJsonFile.d.ts.map +1 -1
- package/lib/builder/webpack/utils/copyStatsJsonFile.js +0 -11
- package/lib/builder/webpack/utils/copyStatsJsonFile.js.map +1 -1
- package/lib/cli/CLI.d.ts +2 -2
- package/lib/cli/CLI.d.ts.map +1 -1
- package/lib/cli/CLI.js +2 -2
- package/lib/cli/CLI.js.map +1 -1
- package/lib/cli/bin-init.js +0 -2
- package/lib/cli/bin-init.js.map +1 -1
- package/lib/cli/index.d.ts.map +1 -1
- package/lib/cli/index.js +28 -18
- package/lib/cli/index.js.map +1 -1
- package/lib/cli/runCLI.d.ts +3 -0
- package/lib/cli/runCLI.d.ts.map +1 -1
- package/lib/cli/runCLI.js +18 -6
- package/lib/cli/runCLI.js.map +1 -1
- package/lib/commands/add/command.d.ts +1 -4
- package/lib/commands/add/command.d.ts.map +1 -1
- package/lib/commands/add/command.js +3 -2
- package/lib/commands/add/command.js.map +1 -1
- package/lib/commands/analyze/command.d.ts +1 -1
- package/lib/commands/analyze/command.d.ts.map +1 -1
- package/lib/commands/analyze/command.js +11 -13
- package/lib/commands/analyze/command.js.map +1 -1
- package/lib/commands/benchmark/command.d.ts +1 -1
- package/lib/commands/benchmark/command.d.ts.map +1 -1
- package/lib/commands/benchmark/command.js +8 -9
- package/lib/commands/benchmark/command.js.map +1 -1
- package/lib/commands/build/build.d.ts.map +1 -1
- package/lib/commands/build/build.js +1 -0
- package/lib/commands/build/build.js.map +1 -1
- package/lib/commands/build/command.d.ts +2 -2
- package/lib/commands/build/command.d.ts.map +1 -1
- package/lib/commands/build/command.js +53 -28
- package/lib/commands/build/command.js.map +1 -1
- package/lib/commands/createApp.d.ts.map +1 -1
- package/lib/commands/createApp.js +0 -1
- package/lib/commands/createApp.js.map +1 -1
- package/lib/commands/generate/command.d.ts +1 -1
- package/lib/commands/generate/command.d.ts.map +1 -1
- package/lib/commands/generate/command.js +3 -2
- package/lib/commands/generate/command.js.map +1 -1
- package/lib/commands/lint/command.d.ts +1 -1
- package/lib/commands/lint/command.d.ts.map +1 -1
- package/lib/commands/lint/command.js +3 -2
- package/lib/commands/lint/command.js.map +1 -1
- package/lib/commands/new/command.d.ts +0 -1
- package/lib/commands/new/command.d.ts.map +1 -1
- package/lib/commands/new/command.js +0 -1
- package/lib/commands/new/command.js.map +1 -1
- package/lib/commands/new/new.d.ts.map +1 -1
- package/lib/commands/new/new.js +28 -3
- package/lib/commands/new/new.js.map +1 -1
- package/lib/commands/new/steps/installDependencies.js +3 -3
- package/lib/commands/new/steps/installDependencies.js.map +1 -1
- package/lib/commands/start/command.d.ts +2 -2
- package/lib/commands/start/command.d.ts.map +1 -1
- package/lib/commands/start/command.js +57 -22
- package/lib/commands/start/command.js.map +1 -1
- package/lib/commands/start/start.d.ts +1 -1
- package/lib/commands/start/start.d.ts.map +1 -1
- package/lib/commands/start/start.js +2 -1
- package/lib/commands/start/start.js.map +1 -1
- package/lib/commands/start-prod/command.d.ts +1 -1
- package/lib/commands/start-prod/command.d.ts.map +1 -1
- package/lib/commands/start-prod/command.js +11 -13
- package/lib/commands/start-prod/command.js.map +1 -1
- package/lib/commands/static/application.d.ts.map +1 -1
- package/lib/commands/static/application.js +0 -1
- package/lib/commands/static/application.js.map +1 -1
- package/lib/commands/static/command.d.ts +1 -1
- package/lib/commands/static/command.d.ts.map +1 -1
- package/lib/commands/static/command.js +7 -3
- package/lib/commands/static/command.js.map +1 -1
- package/lib/commands/update/command.d.ts +7 -5
- package/lib/commands/update/command.d.ts.map +1 -1
- package/lib/commands/update/command.js +11 -3
- package/lib/commands/update/command.js.map +1 -1
- package/lib/commands/update/dependantLibs.d.ts +2 -1
- package/lib/commands/update/dependantLibs.d.ts.map +1 -1
- package/lib/commands/update/dependantLibs.js +17 -4
- package/lib/commands/update/dependantLibs.js.map +1 -1
- package/lib/commands/update/update.d.ts +2 -1
- package/lib/commands/update/update.d.ts.map +1 -1
- package/lib/commands/update/update.js +6 -6
- package/lib/commands/update/update.js.map +1 -1
- package/lib/commands/update/updatePackageJson.d.ts +1 -1
- package/lib/commands/update/updatePackageJson.d.ts.map +1 -1
- package/lib/commands/update/updatePackageJson.js +10 -14
- package/lib/commands/update/updatePackageJson.js.map +1 -1
- package/lib/config/configManager.d.ts +0 -1
- package/lib/config/configManager.d.ts.map +1 -1
- package/lib/config/configManager.js +2 -17
- package/lib/config/configManager.js.map +1 -1
- package/lib/config/validate.d.ts.map +1 -1
- package/lib/config/validate.js +8 -1
- package/lib/config/validate.js.map +1 -1
- package/lib/di/providers/index.d.ts +0 -1
- package/lib/di/providers/index.d.ts.map +1 -1
- package/lib/di/providers/index.js +0 -1
- package/lib/di/providers/index.js.map +1 -1
- package/lib/di/tokens/config.d.ts +2 -0
- package/lib/di/tokens/config.d.ts.map +1 -1
- package/lib/di/tokens/index.d.ts +0 -1
- package/lib/di/tokens/index.d.ts.map +1 -1
- package/lib/di/tokens/index.js +0 -1
- package/lib/di/tokens/index.js.map +1 -1
- package/lib/external/config.d.ts.map +1 -1
- package/lib/external/config.js.map +1 -1
- package/lib/library/babel/index.d.ts +3 -53
- package/lib/library/babel/index.d.ts.map +1 -1
- package/lib/library/babel/index.js +3 -139
- package/lib/library/babel/index.js.map +1 -1
- package/lib/library/swc/index.d.ts +3 -3
- package/lib/library/swc/index.d.ts.map +1 -1
- package/lib/library/swc/index.js +4 -114
- package/lib/library/swc/index.js.map +1 -1
- package/lib/library/typescript/index.d.ts +0 -23
- package/lib/library/typescript/index.d.ts.map +1 -1
- package/lib/library/typescript/index.js +1 -2
- package/lib/library/typescript/index.js.map +1 -1
- package/lib/library/webpack/application/client/common.d.ts.map +1 -1
- package/lib/library/webpack/application/client/common.js +45 -10
- package/lib/library/webpack/application/client/common.js.map +1 -1
- package/lib/library/webpack/application/client/dev.js +2 -2
- package/lib/library/webpack/application/client/dev.js.map +1 -1
- package/lib/library/webpack/application/client/prod.d.ts.map +1 -1
- package/lib/library/webpack/application/client/prod.js +1 -2
- package/lib/library/webpack/application/client/prod.js.map +1 -1
- package/lib/library/webpack/application/common.d.ts.map +1 -1
- package/lib/library/webpack/application/common.js +4 -5
- package/lib/library/webpack/application/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/application/server/dev.js +1 -1
- package/lib/library/webpack/application/server/dev.js.map +1 -1
- package/lib/library/webpack/application/server/prod.js +1 -1
- package/lib/library/webpack/application/server/prod.js.map +1 -1
- package/lib/library/webpack/blocks/css.d.ts.map +1 -1
- package/lib/library/webpack/blocks/css.js +15 -11
- package/lib/library/webpack/blocks/css.js.map +1 -1
- package/lib/library/webpack/blocks/optimize.js +2 -2
- package/lib/library/webpack/blocks/optimize.js.map +1 -1
- package/lib/library/webpack/blocks/pwa/client.d.ts.map +1 -1
- package/lib/library/webpack/blocks/pwa/client.js +11 -63
- package/lib/library/webpack/blocks/pwa/client.js.map +1 -1
- package/lib/library/webpack/blocks/pwa/shared.d.ts.map +1 -1
- package/lib/library/webpack/blocks/pwa/shared.js +2 -3
- package/lib/library/webpack/blocks/pwa/shared.js.map +1 -1
- package/lib/library/webpack/blocks/resolve.d.ts.map +1 -1
- package/lib/library/webpack/blocks/resolve.js +3 -2
- package/lib/library/webpack/blocks/resolve.js.map +1 -1
- package/lib/library/webpack/blocks/serverInline.d.ts.map +1 -1
- package/lib/library/webpack/blocks/serverInline.js +1 -2
- package/lib/library/webpack/blocks/serverInline.js.map +1 -1
- package/lib/library/webpack/blocks/sourcemaps.d.ts +1 -1
- package/lib/library/webpack/blocks/sourcemaps.d.ts.map +1 -1
- package/lib/library/webpack/blocks/sourcemaps.js +4 -2
- package/lib/library/webpack/blocks/sourcemaps.js.map +1 -1
- package/lib/library/webpack/child-app/client/common.d.ts.map +1 -1
- package/lib/library/webpack/child-app/client/common.js +8 -3
- package/lib/library/webpack/child-app/client/common.js.map +1 -1
- package/lib/library/webpack/child-app/client/dev.d.ts.map +1 -1
- package/lib/library/webpack/child-app/client/dev.js +5 -1
- package/lib/library/webpack/child-app/client/dev.js.map +1 -1
- package/lib/library/webpack/child-app/client/prod.d.ts.map +1 -1
- package/lib/library/webpack/child-app/client/prod.js +4 -0
- package/lib/library/webpack/child-app/client/prod.js.map +1 -1
- package/lib/library/webpack/child-app/common.d.ts.map +1 -1
- package/lib/library/webpack/child-app/common.js +4 -9
- package/lib/library/webpack/child-app/common.js.map +1 -1
- package/lib/library/webpack/child-app/server/dev.d.ts.map +1 -1
- package/lib/library/webpack/child-app/server/dev.js +4 -0
- package/lib/library/webpack/child-app/server/dev.js.map +1 -1
- package/lib/library/webpack/child-app/server/prod.d.ts.map +1 -1
- package/lib/library/webpack/child-app/server/prod.js +4 -0
- package/lib/library/webpack/child-app/server/prod.js.map +1 -1
- package/lib/library/webpack/common/client/prod.js +1 -1
- package/lib/library/webpack/common/client/prod.js.map +1 -1
- package/lib/library/webpack/common/main.d.ts.map +1 -1
- package/lib/library/webpack/common/main.js +1 -2
- package/lib/library/webpack/common/main.js.map +1 -1
- package/lib/library/webpack/constants/stats.d.ts.map +1 -1
- package/lib/library/webpack/constants/stats.js +2 -0
- package/lib/library/webpack/constants/stats.js.map +1 -1
- package/lib/library/webpack/loaders/image-loader/getImageMiniatureURL.js +1 -1
- package/lib/library/webpack/loaders/image-loader/getImageMiniatureURL.js.map +1 -1
- package/lib/library/webpack/module/client/common.js +1 -1
- package/lib/library/webpack/module/client/common.js.map +1 -1
- package/lib/library/webpack/module/externals.js +1 -1
- package/lib/library/webpack/module/externals.js.map +1 -1
- package/lib/library/webpack/module/server/common.js +1 -1
- package/lib/library/webpack/module/server/common.js.map +1 -1
- package/lib/library/webpack/plugins/RuntimePathPlugin.d.ts.map +1 -1
- package/lib/library/webpack/plugins/RuntimePathPlugin.js +7 -3
- package/lib/library/webpack/plugins/RuntimePathPlugin.js.map +1 -1
- package/lib/library/webpack/utils/threadLoader.d.ts.map +1 -1
- package/lib/library/webpack/utils/threadLoader.js +20 -3
- package/lib/library/webpack/utils/threadLoader.js.map +1 -1
- package/lib/library/webpack/utils/transpiler.d.ts +0 -1
- package/lib/library/webpack/utils/transpiler.d.ts.map +1 -1
- package/lib/library/webpack/utils/transpiler.js +2 -6
- package/lib/library/webpack/utils/transpiler.js.map +1 -1
- package/lib/models/analytics/utils.d.ts +16 -0
- package/lib/models/analytics/utils.d.ts.map +1 -0
- package/lib/models/analytics/utils.js +88 -0
- package/lib/models/analytics/utils.js.map +1 -0
- package/lib/models/command.d.ts +1 -1
- package/lib/models/command.d.ts.map +1 -1
- package/lib/models/command.js +2 -8
- package/lib/models/command.js.map +1 -1
- package/lib/models/context.d.ts +4 -4
- package/lib/models/context.d.ts.map +1 -1
- package/lib/models/context.js +3 -2
- package/lib/models/context.js.map +1 -1
- package/lib/models/logger.js +1 -1
- package/lib/models/logger.js.map +1 -1
- package/lib/models/task.d.ts.map +1 -1
- package/lib/models/task.js +1 -7
- package/lib/models/task.js.map +1 -1
- package/lib/schema/autogeneratedSchema.json +161 -20
- package/lib/schema/topLevelSchema.d.ts +14 -0
- package/lib/schema/topLevelSchema.d.ts.map +1 -1
- package/lib/schema/topLevelSchema.js +14 -0
- package/lib/schema/topLevelSchema.js.map +1 -1
- package/lib/typings/build/Builder.d.ts +2 -6
- package/lib/typings/build/Builder.d.ts.map +1 -1
- package/lib/typings/configEntry/application.d.ts +11 -6
- package/lib/typings/configEntry/application.d.ts.map +1 -1
- package/lib/typings/configEntry/cli.d.ts +13 -0
- package/lib/typings/configEntry/cli.d.ts.map +1 -1
- package/lib/typings/projectType.d.ts +5 -0
- package/lib/typings/projectType.d.ts.map +1 -1
- package/lib/typings/public.d.ts +0 -1
- package/lib/typings/public.d.ts.map +1 -1
- package/lib/typings/public.js +0 -2
- package/lib/typings/public.js.map +1 -1
- package/lib/typings/target.d.ts +1 -1
- package/lib/typings/target.d.ts.map +1 -1
- package/lib/utils/commands/dependencies/findTramvaiVersion.d.ts +1 -1
- package/lib/utils/commands/dependencies/findTramvaiVersion.d.ts.map +1 -1
- package/lib/utils/commands/dependencies/findTramvaiVersion.js +4 -11
- package/lib/utils/commands/dependencies/findTramvaiVersion.js.map +1 -1
- package/lib/utils/commands/dependencies/getLatestPackageVersion.d.ts +1 -1
- package/lib/utils/commands/dependencies/getLatestPackageVersion.d.ts.map +1 -1
- package/lib/utils/commands/dependencies/getLatestPackageVersion.js +7 -3
- package/lib/utils/commands/dependencies/getLatestPackageVersion.js.map +1 -1
- package/lib/utils/cpu-profile.d.ts +3 -0
- package/lib/utils/cpu-profile.d.ts.map +1 -1
- package/lib/utils/cpu-profile.js +8 -4
- package/lib/utils/cpu-profile.js.map +1 -1
- package/lib/utils/safeRequire.d.ts +1 -1
- package/lib/utils/safeRequire.d.ts.map +1 -1
- package/lib/utils/safeRequire.js +13 -3
- package/lib/utils/safeRequire.js.map +1 -1
- package/package.json +26 -32
- package/schema.json +175 -20
- package/src/api/analyze/index.ts +2 -3
- package/src/api/benchmark/__integration__/__fixtures__/tramvai.json +3 -0
- package/src/api/build/__integration__/__fixtures__/tramvai.json +4 -2
- package/src/api/build/__integration__/build.test.ts +0 -1
- package/src/api/build/application.ts +2 -5
- package/src/api/build/child-app.ts +1 -5
- package/src/api/build/index.ts +0 -2
- package/src/api/build/module.ts +1 -3
- package/src/api/index.ts +1 -10
- package/src/api/start/__integration__/__fixtures__/app/server.tsx +1 -0
- package/src/api/start/__integration__/__fixtures__/package.json +0 -3
- package/src/api/start/__integration__/__fixtures__/tramvai.json +3 -0
- package/src/api/start/__integration__/start.test.ts +10 -1
- package/src/api/start/application.experimental.ts +305 -0
- package/src/api/start/index.ts +20 -5
- package/src/api/start/utils/banner.ts +0 -1
- package/src/api/start/utils/tips/tips.ts +0 -9
- package/src/builder/webpack/devServer/pool/process/pool.ts +0 -2
- package/src/builder/webpack/devServer/server.ts +5 -0
- package/src/builder/webpack/devServer/setup.ts +1 -0
- package/src/builder/webpack/index.ts +3 -5
- package/src/builder/webpack/providers/analyze/shared.ts +6 -10
- package/src/builder/webpack/providers/build/client.ts +0 -1
- package/src/builder/webpack/providers/build/clientShared.ts +5 -11
- package/src/builder/webpack/providers/client.ts +16 -29
- package/src/builder/webpack/providers/server.ts +15 -10
- package/src/builder/webpack/providers/shared.ts +2 -9
- package/src/builder/webpack/tokens.ts +0 -9
- package/src/builder/webpack/utils/copyStatsJsonFile.ts +0 -17
- package/src/cli/CLI.ts +6 -4
- package/src/cli/bin-init.ts +0 -2
- package/src/cli/index.ts +36 -18
- package/src/cli/runCLI.ts +26 -6
- package/src/commands/add/command.ts +3 -2
- package/src/commands/analyze/command.ts +12 -14
- package/src/commands/benchmark/command.ts +9 -10
- package/src/commands/build/build.ts +2 -0
- package/src/commands/build/command.ts +58 -29
- package/src/commands/createApp.ts +0 -2
- package/src/commands/generate/command.ts +3 -2
- package/src/commands/lint/command.ts +3 -2
- package/src/commands/new/command.ts +0 -2
- package/src/commands/new/new.ts +39 -7
- package/src/commands/new/steps/installDependencies.ts +3 -3
- package/src/commands/new/templates/packageManagerConfig/yarnPackageManagerConfig/_yarnrc.yml.hbs +9 -0
- package/src/commands/new/templates/shared/_gitignore.hbs +10 -0
- package/src/commands/new/templates/shared/_prettierrc.js.hbs +1 -1
- package/src/commands/new/templates/shared/package.json.hbs +5 -1
- package/src/commands/start/command.ts +62 -23
- package/src/commands/start/start.ts +7 -1
- package/src/commands/start-prod/command.ts +12 -14
- package/src/commands/static/application.ts +0 -1
- package/src/commands/static/command.ts +7 -3
- package/src/commands/update/command.ts +12 -3
- package/src/commands/update/dependantLibs.ts +23 -8
- package/src/commands/update/update.ts +7 -6
- package/src/commands/update/updatePackageJson.spec.ts +66 -3
- package/src/commands/update/updatePackageJson.ts +28 -16
- package/src/config/__integration__/__fixtures__/relative/src/index.ts +0 -0
- package/src/config/__integration__/__fixtures__/relative/src/polyfill.ts +0 -0
- package/src/config/__integration__/validate.test.ts +94 -0
- package/src/config/configManager.ts +2 -19
- package/src/config/validate.ts +8 -1
- package/src/di/providers/index.ts +0 -1
- package/src/di/tokens/index.ts +0 -1
- package/src/external/config.ts +1 -0
- package/src/library/babel/index.ts +3 -166
- package/src/library/swc/__integration__/__snapshots__/swc.build.test.ts.snap +61 -236
- package/src/library/swc/__integration__/__snapshots__/swc.start.test.ts.snap +19 -18
- package/src/library/swc/__integration__/swc.build.test.ts +1 -13
- package/src/library/swc/__integration__/swc.start.test.ts +4 -1
- package/src/library/swc/index.ts +3 -139
- package/src/library/typescript/index.ts +1 -3
- package/src/library/webpack/application/client/common.ts +71 -9
- package/src/library/webpack/application/client/dev.ts +2 -2
- package/src/library/webpack/application/client/prod.ts +1 -2
- package/src/library/webpack/application/common.ts +9 -5
- package/src/library/webpack/application/server/common.ts +1 -1
- package/src/library/webpack/application/server/dev.ts +1 -1
- package/src/library/webpack/application/server/prod.ts +1 -1
- package/src/library/webpack/blocks/css.ts +17 -11
- package/src/library/webpack/blocks/optimize.ts +2 -2
- package/src/library/webpack/blocks/pwa/client.ts +14 -70
- package/src/library/webpack/blocks/pwa/shared.ts +1 -3
- package/src/library/webpack/blocks/resolve.ts +3 -2
- package/src/library/webpack/blocks/serverInline.ts +1 -2
- package/src/library/webpack/blocks/sourcemaps.ts +4 -2
- package/src/library/webpack/child-app/client/common.ts +9 -3
- package/src/library/webpack/child-app/client/dev.ts +6 -1
- package/src/library/webpack/child-app/client/prod.ts +5 -0
- package/src/library/webpack/child-app/common.ts +8 -12
- package/src/library/webpack/child-app/server/dev.ts +5 -0
- package/src/library/webpack/child-app/server/prod.ts +5 -0
- package/src/library/webpack/common/client/prod.ts +1 -1
- package/src/library/webpack/common/main.ts +1 -5
- package/src/library/webpack/constants/stats.ts +2 -0
- package/src/library/webpack/loaders/image-loader/getImageMiniatureURL.ts +1 -1
- package/src/library/webpack/module/client/common.ts +1 -1
- package/src/library/webpack/module/externals.ts +1 -1
- package/src/library/webpack/module/server/common.ts +1 -1
- package/src/library/webpack/plugins/RuntimePathPlugin.ts +8 -3
- package/src/library/webpack/utils/threadLoader.ts +21 -0
- package/src/library/webpack/utils/transpiler.ts +3 -7
- package/src/models/analytics/utils.ts +126 -0
- package/src/models/command.ts +4 -12
- package/src/models/config.spec.ts +6 -2
- package/src/models/context.ts +4 -5
- package/src/models/logger.ts +1 -1
- package/src/models/task.ts +1 -7
- package/src/schema/autogeneratedSchema.json +161 -20
- package/src/schema/topLevelSchema.js +14 -0
- package/src/schema/tramvai.spec.ts +3 -1
- package/src/typings/build/Builder.ts +3 -8
- package/src/typings/configEntry/application.ts +16 -7
- package/src/typings/configEntry/cli.ts +14 -0
- package/src/typings/projectType.ts +5 -0
- package/src/typings/public.ts +0 -2
- package/src/typings/target.ts +1 -1
- package/src/utils/commands/dependencies/findTramvaiVersion.ts +5 -12
- package/src/utils/commands/dependencies/getLatestPackageVersion.ts +11 -3
- package/src/utils/cpu-profile.ts +14 -4
- package/src/utils/safeRequire.spec.ts +36 -0
- package/src/utils/safeRequire.ts +12 -3
- package/lib/builder/webpack/providers/build/clientModern.d.ts +0 -3
- package/lib/builder/webpack/providers/build/clientModern.d.ts.map +0 -1
- package/lib/builder/webpack/providers/build/clientModern.js +0 -60
- package/lib/builder/webpack/providers/build/clientModern.js.map +0 -1
- package/lib/di/providers/analytics.d.ts +0 -3
- package/lib/di/providers/analytics.d.ts.map +0 -1
- package/lib/di/providers/analytics.js +0 -20
- package/lib/di/providers/analytics.js.map +0 -1
- package/lib/di/tokens/analytics.d.ts +0 -14
- package/lib/di/tokens/analytics.d.ts.map +0 -1
- package/lib/di/tokens/analytics.js +0 -8
- package/lib/di/tokens/analytics.js.map +0 -1
- package/lib/library/babel/plugins/create-token-pure.d.ts +0 -7
- package/lib/library/babel/plugins/create-token-pure.d.ts.map +0 -1
- package/lib/library/babel/plugins/create-token-pure.js +0 -39
- package/lib/library/babel/plugins/create-token-pure.js.map +0 -1
- package/lib/library/babel/plugins/fill-action-name.d.ts +0 -3
- package/lib/library/babel/plugins/fill-action-name.d.ts.map +0 -1
- package/lib/library/babel/plugins/fill-action-name.js +0 -107
- package/lib/library/babel/plugins/fill-action-name.js.map +0 -1
- package/lib/library/babel/plugins/fill-declare-action-name.d.ts +0 -6
- package/lib/library/babel/plugins/fill-declare-action-name.d.ts.map +0 -1
- package/lib/library/babel/plugins/fill-declare-action-name.js +0 -94
- package/lib/library/babel/plugins/fill-declare-action-name.js.map +0 -1
- package/lib/library/babel/plugins/lazy-component/lazy-component.d.ts +0 -7
- package/lib/library/babel/plugins/lazy-component/lazy-component.d.ts.map +0 -1
- package/lib/library/babel/plugins/lazy-component/lazy-component.js +0 -75
- package/lib/library/babel/plugins/lazy-component/lazy-component.js.map +0 -1
- package/lib/library/babel/plugins/lazy-component/legacy-universal-replace.d.ts +0 -14
- package/lib/library/babel/plugins/lazy-component/legacy-universal-replace.d.ts.map +0 -1
- package/lib/library/babel/plugins/lazy-component/legacy-universal-replace.js +0 -53
- package/lib/library/babel/plugins/lazy-component/legacy-universal-replace.js.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/chunkName.d.ts +0 -3
- package/lib/library/babel/plugins/lazy-component/properties/chunkName.d.ts.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/chunkName.js +0 -133
- package/lib/library/babel/plugins/lazy-component/properties/chunkName.js.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/importAsync.d.ts +0 -3
- package/lib/library/babel/plugins/lazy-component/properties/importAsync.d.ts.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/importAsync.js +0 -11
- package/lib/library/babel/plugins/lazy-component/properties/importAsync.js.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/isReady.d.ts +0 -3
- package/lib/library/babel/plugins/lazy-component/properties/isReady.d.ts.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/isReady.js +0 -14
- package/lib/library/babel/plugins/lazy-component/properties/isReady.js.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/requireAsync.d.ts +0 -3
- package/lib/library/babel/plugins/lazy-component/properties/requireAsync.d.ts.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/requireAsync.js +0 -15
- package/lib/library/babel/plugins/lazy-component/properties/requireAsync.js.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/requireSync.d.ts +0 -3
- package/lib/library/babel/plugins/lazy-component/properties/requireSync.d.ts.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/requireSync.js +0 -16
- package/lib/library/babel/plugins/lazy-component/properties/requireSync.js.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/resolve.d.ts +0 -3
- package/lib/library/babel/plugins/lazy-component/properties/resolve.d.ts.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/resolve.js +0 -14
- package/lib/library/babel/plugins/lazy-component/properties/resolve.js.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/types.d.ts +0 -14
- package/lib/library/babel/plugins/lazy-component/properties/types.d.ts.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/types.js +0 -3
- package/lib/library/babel/plugins/lazy-component/properties/types.js.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/utils/webpackComments.d.ts +0 -14
- package/lib/library/babel/plugins/lazy-component/properties/utils/webpackComments.d.ts.map +0 -1
- package/lib/library/babel/plugins/lazy-component/properties/utils/webpackComments.js +0 -57
- package/lib/library/babel/plugins/lazy-component/properties/utils/webpackComments.js.map +0 -1
- package/lib/library/babel/plugins/provider-stack.d.ts +0 -4
- package/lib/library/babel/plugins/provider-stack.d.ts.map +0 -1
- package/lib/library/babel/plugins/provider-stack.js +0 -63
- package/lib/library/babel/plugins/provider-stack.js.map +0 -1
- package/lib/library/babel/plugins/react-compiler.d.ts +0 -13
- package/lib/library/babel/plugins/react-compiler.d.ts.map +0 -1
- package/lib/library/babel/plugins/react-compiler.js +0 -27
- package/lib/library/babel/plugins/react-compiler.js.map +0 -1
- package/lib/library/babel/plugins/react-element-info-unique.d.ts +0 -26
- package/lib/library/babel/plugins/react-element-info-unique.d.ts.map +0 -1
- package/lib/library/babel/plugins/react-element-info-unique.js +0 -112
- package/lib/library/babel/plugins/react-element-info-unique.js.map +0 -1
- package/lib/library/babel/plugins/types.h.d.ts +0 -7
- package/lib/library/babel/plugins/types.h.d.ts.map +0 -1
- package/lib/library/babel/plugins/types.h.js +0 -3
- package/lib/library/babel/plugins/types.h.js.map +0 -1
- package/lib/library/webpack/plugins/AutoPublicPathPlugin.d.ts +0 -4
- package/lib/library/webpack/plugins/AutoPublicPathPlugin.d.ts.map +0 -1
- package/lib/library/webpack/plugins/AutoPublicPathPlugin.js +0 -23
- package/lib/library/webpack/plugins/AutoPublicPathPlugin.js.map +0 -1
- package/lib/library/webpack/plugins/ModuleFederationFixRange.d.ts +0 -24
- package/lib/library/webpack/plugins/ModuleFederationFixRange.d.ts.map +0 -1
- package/lib/library/webpack/plugins/ModuleFederationFixRange.js +0 -127
- package/lib/library/webpack/plugins/ModuleFederationFixRange.js.map +0 -1
- package/lib/library/webpack/plugins/ModuleFederationIgnoreEntries.d.ts +0 -15
- package/lib/library/webpack/plugins/ModuleFederationIgnoreEntries.d.ts.map +0 -1
- package/lib/library/webpack/plugins/ModuleFederationIgnoreEntries.js +0 -49
- package/lib/library/webpack/plugins/ModuleFederationIgnoreEntries.js.map +0 -1
- package/lib/library/webpack/plugins/PolyfillCondition.d.ts +0 -8
- package/lib/library/webpack/plugins/PolyfillCondition.d.ts.map +0 -1
- package/lib/library/webpack/plugins/PolyfillCondition.js +0 -46
- package/lib/library/webpack/plugins/PolyfillCondition.js.map +0 -1
- package/lib/library/webpack/plugins/PwaIconsPlugin.d.ts +0 -12
- package/lib/library/webpack/plugins/PwaIconsPlugin.d.ts.map +0 -1
- package/lib/library/webpack/plugins/PwaIconsPlugin.js +0 -78
- package/lib/library/webpack/plugins/PwaIconsPlugin.js.map +0 -1
- package/lib/library/webpack/plugins/WebManifestPlugin.d.ts +0 -13
- package/lib/library/webpack/plugins/WebManifestPlugin.d.ts.map +0 -1
- package/lib/library/webpack/plugins/WebManifestPlugin.js +0 -47
- package/lib/library/webpack/plugins/WebManifestPlugin.js.map +0 -1
- package/lib/library/webpack/utils/polyfills/const.d.ts +0 -3
- package/lib/library/webpack/utils/polyfills/const.d.ts.map +0 -1
- package/lib/library/webpack/utils/polyfills/const.js +0 -49
- package/lib/library/webpack/utils/polyfills/const.js.map +0 -1
- package/lib/library/webpack/utils/polyfills/polyfillCondition.d.ts +0 -8
- package/lib/library/webpack/utils/polyfills/polyfillCondition.d.ts.map +0 -1
- package/lib/library/webpack/utils/polyfills/polyfillCondition.js +0 -51
- package/lib/library/webpack/utils/polyfills/polyfillCondition.js.map +0 -1
- package/lib/library/webpack/utils/polyfills/specToFeature.d.ts +0 -7
- package/lib/library/webpack/utils/polyfills/specToFeature.d.ts.map +0 -1
- package/lib/library/webpack/utils/polyfills/specToFeature.js +0 -207
- package/lib/library/webpack/utils/polyfills/specToFeature.js.map +0 -1
- package/lib/models/analytics.d.ts +0 -31
- package/lib/models/analytics.d.ts.map +0 -1
- package/lib/models/analytics.js +0 -79
- package/lib/models/analytics.js.map +0 -1
- package/lib/typings/pwa/index.d.ts +0 -80
- package/lib/typings/pwa/index.d.ts.map +0 -1
- package/lib/typings/pwa/index.js +0 -3
- package/lib/typings/pwa/index.js.map +0 -1
- package/lib/utils/sentry.d.ts +0 -2
- package/lib/utils/sentry.d.ts.map +0 -1
- package/lib/utils/sentry.js +0 -27
- package/lib/utils/sentry.js.map +0 -1
- package/src/builder/webpack/providers/build/clientModern.ts +0 -64
- package/src/di/providers/analytics.ts +0 -22
- package/src/di/tokens/analytics.ts +0 -8
- package/src/library/babel/plugins/__fixtures__/create-token-pure/already-has-comment.ts +0 -5
- package/src/library/babel/plugins/__fixtures__/create-token-pure/do-nothing.ts +0 -10
- package/src/library/babel/plugins/__fixtures__/create-token-pure/from-core.ts +0 -5
- package/src/library/babel/plugins/__fixtures__/create-token-pure/from-dippy.ts +0 -5
- package/src/library/babel/plugins/__fixtures__/create-token-pure/many-imports.ts +0 -9
- package/src/library/babel/plugins/__fixtures__/fill-declare-action-name/import-mixed.ts +0 -17
- package/src/library/babel/plugins/__fixtures__/fill-declare-action-name/import-with-name.ts +0 -28
- package/src/library/babel/plugins/__fixtures__/fill-declare-action-name/import-without-name.ts +0 -25
- package/src/library/babel/plugins/__fixtures__/fill-declare-action-name/require-with-name.ts +0 -21
- package/src/library/babel/plugins/__fixtures__/fill-declare-action-name/require-without-name.ts +0 -19
- package/src/library/babel/plugins/__fixtures__/lazy-component/base.ts +0 -3
- package/src/library/babel/plugins/__fixtures__/lazy-component/cmp.tsx +0 -7
- package/src/library/babel/plugins/__fixtures__/lazy-component/comments.ts +0 -7
- package/src/library/babel/plugins/__fixtures__/lazy-component/dynamic.ts +0 -3
- package/src/library/babel/plugins/__fixtures__/lazy-component/inner/first.tsx +0 -7
- package/src/library/babel/plugins/__fixtures__/lazy-component/inner/path/cmp.tsx +0 -7
- package/src/library/babel/plugins/__fixtures__/lazy-component/inner/second.tsx +0 -7
- package/src/library/babel/plugins/__fixtures__/lazy-component/inner/third.tsx +0 -7
- package/src/library/babel/plugins/__fixtures__/lazy-component/lazy+hmr.ts +0 -3
- package/src/library/babel/plugins/__fixtures__/lazy-component/long-import.ts +0 -3
- package/src/library/babel/plugins/__fixtures__/lazy-component/not-lazy-import.ts +0 -7
- package/src/library/babel/plugins/__fixtures__/lazy-component/not-lazy.ts +0 -8
- package/src/library/babel/plugins/__fixtures__/legacy-universal-replace/cmp.tsx +0 -7
- package/src/library/babel/plugins/__fixtures__/legacy-universal-replace/not-universal.ts +0 -8
- package/src/library/babel/plugins/__fixtures__/legacy-universal-replace/platform-legacy.ts +0 -5
- package/src/library/babel/plugins/__fixtures__/legacy-universal-replace/react-universal.ts +0 -3
- package/src/library/babel/plugins/__fixtures__/legacy-universal-replace/tramvai/react/index.es.ts +0 -3
- package/src/library/babel/plugins/__fixtures__/provider-stack/add-stack.ts +0 -22
- package/src/library/babel/plugins/__fixtures__/provider-stack/check-function-name.ts +0 -10
- package/src/library/babel/plugins/__fixtures__/provider-stack/do-nothing.ts +0 -16
- package/src/library/babel/plugins/__fixtures__/provider-stack/error-in-scope.ts +0 -24
- package/src/library/babel/plugins/__fixtures__/provider-stack/inside-await.ts +0 -12
- package/src/library/babel/plugins/__fixtures__/provider-stack/module-decorator.ts +0 -27
- package/src/library/babel/plugins/__snapshots__/create-token-pure.spec.ts.snap +0 -108
- package/src/library/babel/plugins/__snapshots__/fill-declare-action-name.spec.ts.snap +0 -266
- package/src/library/babel/plugins/__snapshots__/provider-stack.spec.ts.snap +0 -381
- package/src/library/babel/plugins/create-token-pure.spec.ts +0 -39
- package/src/library/babel/plugins/create-token-pure.ts +0 -47
- package/src/library/babel/plugins/fill-action-name.ts +0 -126
- package/src/library/babel/plugins/fill-declare-action-name.spec.ts +0 -37
- package/src/library/babel/plugins/fill-declare-action-name.ts +0 -110
- package/src/library/babel/plugins/lazy-component/__snapshots__/lazy-component.spec.ts.snap +0 -313
- package/src/library/babel/plugins/lazy-component/__snapshots__/legacy-universal-replace.spec.ts.snap +0 -114
- package/src/library/babel/plugins/lazy-component/lazy-component.spec.ts +0 -47
- package/src/library/babel/plugins/lazy-component/lazy-component.ts +0 -91
- package/src/library/babel/plugins/lazy-component/legacy-universal-replace.spec.ts +0 -34
- package/src/library/babel/plugins/lazy-component/legacy-universal-replace.ts +0 -88
- package/src/library/babel/plugins/lazy-component/properties/chunkName.ts +0 -185
- package/src/library/babel/plugins/lazy-component/properties/importAsync.ts +0 -8
- package/src/library/babel/plugins/lazy-component/properties/isReady.ts +0 -19
- package/src/library/babel/plugins/lazy-component/properties/requireAsync.ts +0 -20
- package/src/library/babel/plugins/lazy-component/properties/requireSync.ts +0 -21
- package/src/library/babel/plugins/lazy-component/properties/resolve.ts +0 -21
- package/src/library/babel/plugins/lazy-component/properties/types.ts +0 -20
- package/src/library/babel/plugins/lazy-component/properties/utils/webpackComments.ts +0 -61
- package/src/library/babel/plugins/provider-stack.spec.ts +0 -55
- package/src/library/babel/plugins/provider-stack.ts +0 -88
- package/src/library/babel/plugins/react-compiler.ts +0 -39
- package/src/library/babel/plugins/react-element-info-unique.ts +0 -144
- package/src/library/babel/plugins/types.h.ts +0 -8
- package/src/library/webpack/plugins/AutoPublicPathPlugin.ts +0 -23
- package/src/library/webpack/plugins/ModuleFederationFixRange.ts +0 -181
- package/src/library/webpack/plugins/ModuleFederationIgnoreEntries.ts +0 -59
- package/src/library/webpack/plugins/PolyfillCondition.ts +0 -62
- package/src/library/webpack/plugins/PwaIconsPlugin.ts +0 -94
- package/src/library/webpack/plugins/WebManifestPlugin.ts +0 -62
- package/src/library/webpack/utils/polyfills/__integration__/__snapshots__/condition.test.ts.snap +0 -1348
- package/src/library/webpack/utils/polyfills/__integration__/condition.test.ts +0 -128
- package/src/library/webpack/utils/polyfills/const.ts +0 -46
- package/src/library/webpack/utils/polyfills/polyfillCondition.ts +0 -63
- package/src/library/webpack/utils/polyfills/specToFeature.ts +0 -243
- package/src/models/analytics.ts +0 -116
- package/src/typings/pwa/index.ts +0 -83
- package/src/utils/sentry.ts +0 -25
- /package/src/commands/new/templates/{shared → packageManagerConfig/defaultPackageManagerConfig}/_npmrc.hbs +0 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { FeaturesProperties, ProjectProperties } from '@tramvai/api/lib/services/analytics';
|
|
2
|
+
import { ConfigEntry } from '../../typings/configEntry/common';
|
|
3
|
+
import { ConfigManager } from '../config';
|
|
4
|
+
import { ApplicationConfigEntry, ChildAppConfigEntry } from '../../api';
|
|
5
|
+
|
|
6
|
+
const projectCache: { [key: string]: ProjectProperties } = {};
|
|
7
|
+
const featuresCache: { [key: string]: FeaturesProperties } = {};
|
|
8
|
+
|
|
9
|
+
const safeRequireResolve = (path: string) => {
|
|
10
|
+
try {
|
|
11
|
+
return require.resolve(path);
|
|
12
|
+
} catch (error) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export function getProjectProperties({
|
|
18
|
+
parameters,
|
|
19
|
+
configManager,
|
|
20
|
+
}: {
|
|
21
|
+
parameters: { target?: string };
|
|
22
|
+
configManager: ConfigManager;
|
|
23
|
+
}): ProjectProperties {
|
|
24
|
+
const projectName = parameters.target ?? 'unknown';
|
|
25
|
+
let project: ConfigEntry;
|
|
26
|
+
|
|
27
|
+
if (projectCache[projectName]) {
|
|
28
|
+
return projectCache[projectName];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
project = configManager.getProject(projectName);
|
|
33
|
+
} catch (error) {
|
|
34
|
+
// do nothing
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
projectCache[projectName] = {
|
|
38
|
+
name: project.name,
|
|
39
|
+
type: project?.type ?? 'unknown',
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
return projectCache[projectName];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// eslint-disable-next-line max-statements
|
|
46
|
+
export function getFeaturesProperties({
|
|
47
|
+
parameters,
|
|
48
|
+
configManager,
|
|
49
|
+
}: {
|
|
50
|
+
parameters: { target?: string; experimentalWebpackWorkerThreads?: boolean };
|
|
51
|
+
configManager: ConfigManager;
|
|
52
|
+
}): FeaturesProperties {
|
|
53
|
+
const projectName = parameters.target ?? 'unknown';
|
|
54
|
+
let project: ConfigEntry;
|
|
55
|
+
|
|
56
|
+
if (featuresCache[projectName]) {
|
|
57
|
+
return featuresCache[projectName];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
try {
|
|
61
|
+
project = configManager.getProject(projectName);
|
|
62
|
+
} catch (error) {
|
|
63
|
+
// do nothing
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
featuresCache[projectName] = {};
|
|
67
|
+
|
|
68
|
+
if (project) {
|
|
69
|
+
if (project.type === 'application') {
|
|
70
|
+
const applicationProject = project as ApplicationConfigEntry;
|
|
71
|
+
const transpilationLoader = applicationProject.experiments?.transpilation?.loader;
|
|
72
|
+
|
|
73
|
+
featuresCache[projectName].swc =
|
|
74
|
+
// @ts-expect-error incorrect branded type
|
|
75
|
+
(transpilationLoader === 'swc' ||
|
|
76
|
+
transpilationLoader?.development === 'swc' ||
|
|
77
|
+
transpilationLoader?.production === 'swc') ??
|
|
78
|
+
false;
|
|
79
|
+
|
|
80
|
+
featuresCache[projectName].fileSystemRouting =
|
|
81
|
+
applicationProject.fileSystemPages?.enabled ?? false;
|
|
82
|
+
|
|
83
|
+
featuresCache[projectName].reactCompiler =
|
|
84
|
+
!!applicationProject.experiments?.reactCompiler ?? false;
|
|
85
|
+
|
|
86
|
+
featuresCache[projectName].devTools = !!safeRequireResolve('@tramvai/module-dev-tools');
|
|
87
|
+
|
|
88
|
+
featuresCache[projectName].moduleImage = !!safeRequireResolve(
|
|
89
|
+
'@tramvai-tinkoff/module-image'
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
featuresCache[projectName].modulePwa = !!safeRequireResolve(
|
|
93
|
+
'@tramvai/module-progressive-web-app'
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
featuresCache[projectName].viewTransitions =
|
|
97
|
+
!!applicationProject.experiments?.viewTransitions ?? false;
|
|
98
|
+
|
|
99
|
+
featuresCache[projectName].transitionsRouterProvider =
|
|
100
|
+
!!(
|
|
101
|
+
applicationProject.experiments?.viewTransitions ||
|
|
102
|
+
applicationProject.experiments?.reactTransitions
|
|
103
|
+
) ?? false;
|
|
104
|
+
|
|
105
|
+
featuresCache[projectName].experimentalWebpackWorkerThreads =
|
|
106
|
+
parameters.experimentalWebpackWorkerThreads;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (project.type === 'child-app') {
|
|
110
|
+
const childAppProject = project as ChildAppConfigEntry;
|
|
111
|
+
const transpilationLoader = childAppProject.experiments?.transpilation?.loader;
|
|
112
|
+
|
|
113
|
+
featuresCache[projectName].swc =
|
|
114
|
+
// @ts-expect-error incorrect branded type
|
|
115
|
+
(transpilationLoader === 'swc' ||
|
|
116
|
+
transpilationLoader?.development === 'swc' ||
|
|
117
|
+
transpilationLoader?.production === 'swc') ??
|
|
118
|
+
false;
|
|
119
|
+
|
|
120
|
+
featuresCache[projectName].reactCompiler =
|
|
121
|
+
!!childAppProject.experiments?.reactCompiler ?? false;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return featuresCache[projectName];
|
|
126
|
+
}
|
package/src/models/command.ts
CHANGED
|
@@ -23,8 +23,6 @@ type validator<TParams> = (
|
|
|
23
23
|
) => Promise<{ name: string; status: string; message?: string }>;
|
|
24
24
|
|
|
25
25
|
export abstract class Command<TParams = any> {
|
|
26
|
-
readonly validators?: validator<TParams>[];
|
|
27
|
-
|
|
28
26
|
abstract readonly name: string;
|
|
29
27
|
|
|
30
28
|
abstract readonly description: string;
|
|
@@ -39,6 +37,8 @@ export abstract class Command<TParams = any> {
|
|
|
39
37
|
|
|
40
38
|
help?(): string[];
|
|
41
39
|
|
|
40
|
+
validators?(): validator<TParams>[];
|
|
41
|
+
|
|
42
42
|
protected abstract action(parameters: TParams): Promise<CommandResult>;
|
|
43
43
|
|
|
44
44
|
protected abstract analyticEventLabel?(parameters: TParams): string;
|
|
@@ -65,15 +65,7 @@ export abstract class CLICommand<
|
|
|
65
65
|
});
|
|
66
66
|
|
|
67
67
|
await this.validator(parameters);
|
|
68
|
-
|
|
69
|
-
const trackAfter = this.context.analytics.trackAfter({
|
|
70
|
-
name: this.name,
|
|
71
|
-
parameters: this.analyticEventLabel(parameters),
|
|
72
|
-
label: this.analyticCommandUsageLabel(parameters),
|
|
73
|
-
category: 'command',
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
return trackAfter(this.action(parameters));
|
|
68
|
+
return this.action(parameters);
|
|
77
69
|
}
|
|
78
70
|
|
|
79
71
|
protected async validator(parameters: TParams): Promise<void> {
|
|
@@ -81,7 +73,7 @@ export abstract class CLICommand<
|
|
|
81
73
|
return;
|
|
82
74
|
}
|
|
83
75
|
|
|
84
|
-
const result = await Promise.all(this.validators.map((fn) => fn(this.context, parameters)));
|
|
76
|
+
const result = await Promise.all(this.validators().map((fn) => fn(this.context, parameters)));
|
|
85
77
|
|
|
86
78
|
result.forEach((item) => {
|
|
87
79
|
if (item.message) {
|
|
@@ -73,6 +73,7 @@ it('should populate defaults for config', () => {
|
|
|
73
73
|
},
|
|
74
74
|
"reactCompiler": false,
|
|
75
75
|
"reactTransitions": false,
|
|
76
|
+
"runtimeChunk": false,
|
|
76
77
|
"serverRunner": "thread",
|
|
77
78
|
"transpilation": {
|
|
78
79
|
"loader": "babel",
|
|
@@ -97,7 +98,7 @@ it('should populate defaults for config', () => {
|
|
|
97
98
|
"overlay": false,
|
|
98
99
|
},
|
|
99
100
|
},
|
|
100
|
-
"
|
|
101
|
+
"integrity": false,
|
|
101
102
|
"name": "test-app",
|
|
102
103
|
"notifications": {},
|
|
103
104
|
"output": {
|
|
@@ -165,6 +166,7 @@ it('should populate defaults for config', () => {
|
|
|
165
166
|
"overlay": false,
|
|
166
167
|
},
|
|
167
168
|
},
|
|
169
|
+
"integrity": false,
|
|
168
170
|
"name": "test-child-app",
|
|
169
171
|
"notifications": {},
|
|
170
172
|
"output": "dist/child-app",
|
|
@@ -320,6 +322,7 @@ it('should populate defaults for overridable options', () => {
|
|
|
320
322
|
},
|
|
321
323
|
"reactCompiler": false,
|
|
322
324
|
"reactTransitions": false,
|
|
325
|
+
"runtimeChunk": false,
|
|
323
326
|
"serverRunner": "thread",
|
|
324
327
|
"transpilation": {
|
|
325
328
|
"loader": {
|
|
@@ -349,7 +352,7 @@ it('should populate defaults for overridable options', () => {
|
|
|
349
352
|
"overlay": false,
|
|
350
353
|
},
|
|
351
354
|
},
|
|
352
|
-
"
|
|
355
|
+
"integrity": false,
|
|
353
356
|
"name": "test-app",
|
|
354
357
|
"notifications": {},
|
|
355
358
|
"output": {
|
|
@@ -433,6 +436,7 @@ it('should populate defaults for overridable options', () => {
|
|
|
433
436
|
"overlay": false,
|
|
434
437
|
},
|
|
435
438
|
},
|
|
439
|
+
"integrity": false,
|
|
436
440
|
"name": "test-child-app",
|
|
437
441
|
"notifications": {},
|
|
438
442
|
"output": "dist/child-app",
|
package/src/models/context.ts
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type PackageManager } from '@tinkoff/package-manager-wrapper';
|
|
2
|
+
import { AnalyticsService } from '@tramvai/api/lib/services/analytics';
|
|
2
3
|
import type { Logger } from './logger';
|
|
3
4
|
import type { Command, CommandResult } from './command';
|
|
4
5
|
import type { Task, TaskResult } from './task';
|
|
5
6
|
import type { ConfigManager } from './config';
|
|
6
|
-
import type { Analytics } from './analytics';
|
|
7
7
|
|
|
8
8
|
export class Context {
|
|
9
|
-
public packageManager: PackageManager;
|
|
10
|
-
|
|
11
9
|
constructor(
|
|
12
10
|
public config: ConfigManager,
|
|
13
11
|
public logger: Logger,
|
|
14
|
-
public analytics: Analytics,
|
|
15
12
|
public cliRootDir: string,
|
|
16
13
|
public cliPackageManager: PackageManager,
|
|
14
|
+
public packageManager: PackageManager,
|
|
15
|
+
public analytics: AnalyticsService,
|
|
17
16
|
public runTask: (name, params?) => Promise<TaskResult>,
|
|
18
17
|
public runCommand: (name, params?) => Promise<CommandResult>,
|
|
19
18
|
public getTasks: () => Task[],
|
package/src/models/logger.ts
CHANGED
|
@@ -30,7 +30,7 @@ export class Logger {
|
|
|
30
30
|
event.message,
|
|
31
31
|
event.payload ?? ''
|
|
32
32
|
);
|
|
33
|
-
} else if (event.type === 'info' || process.env.
|
|
33
|
+
} else if (event.type === 'info' || process.env.TRAMVAI_LOG_LEVEL === 'debug') {
|
|
34
34
|
console.log(
|
|
35
35
|
chalk.bgMagenta(event.type),
|
|
36
36
|
chalk.magenta(event.event),
|
package/src/models/task.ts
CHANGED
|
@@ -36,14 +36,8 @@ export abstract class Task {
|
|
|
36
36
|
});
|
|
37
37
|
const args = [...this.arguments, ...(parameters.arguments || [])];
|
|
38
38
|
const options = { ...this.options, ...parameters.options };
|
|
39
|
-
const trackAfter = this.context.analytics.trackAfter({
|
|
40
|
-
name: this.name,
|
|
41
|
-
category: 'task',
|
|
42
|
-
parameters: args,
|
|
43
|
-
label: this.analyticTaskUsageLabel(args),
|
|
44
|
-
});
|
|
45
39
|
|
|
46
|
-
return
|
|
40
|
+
return this.execute(this.command, args, options)
|
|
47
41
|
.then((result) => ({
|
|
48
42
|
status: 'ok',
|
|
49
43
|
code: result.exitCode,
|
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
"title": "Path to polyfill file. By default, looks for the `src/polyfill`",
|
|
23
23
|
"type": "string"
|
|
24
24
|
},
|
|
25
|
+
"modernPolyfill": {
|
|
26
|
+
"title": "Path to modern polyfill file. By default, looks for the `src/modern-polyfill`",
|
|
27
|
+
"type": "string"
|
|
28
|
+
},
|
|
25
29
|
"serverApiDir": {
|
|
26
30
|
"title": "Path to folder with papi handlers",
|
|
27
31
|
"default": "src/api",
|
|
@@ -50,11 +54,6 @@
|
|
|
50
54
|
},
|
|
51
55
|
"additionalProperties": false
|
|
52
56
|
},
|
|
53
|
-
"modern": {
|
|
54
|
-
"title": "Enable build for modern browsers",
|
|
55
|
-
"default": true,
|
|
56
|
-
"type": "boolean"
|
|
57
|
-
},
|
|
58
57
|
"fileSystemPages": {
|
|
59
58
|
"title": "File-System Routing feature",
|
|
60
59
|
"default": {},
|
|
@@ -786,6 +785,16 @@
|
|
|
786
785
|
"default": false,
|
|
787
786
|
"type": "boolean"
|
|
788
787
|
},
|
|
788
|
+
"runtimeChunk": {
|
|
789
|
+
"title": "Webpack Runtime Chunk settings",
|
|
790
|
+
"default": false,
|
|
791
|
+
"enum": [
|
|
792
|
+
false,
|
|
793
|
+
"multiple",
|
|
794
|
+
"single",
|
|
795
|
+
true
|
|
796
|
+
]
|
|
797
|
+
},
|
|
789
798
|
"webpack": {
|
|
790
799
|
"title": "experiments configuration for [webpack](https://webpack.js.org/configuration/experiments/)",
|
|
791
800
|
"default": {},
|
|
@@ -826,6 +835,10 @@
|
|
|
826
835
|
"topLevelAwait": {
|
|
827
836
|
"description": "Allow using top-level-await in EcmaScript Modules.",
|
|
828
837
|
"type": "boolean"
|
|
838
|
+
},
|
|
839
|
+
"deferImport": {
|
|
840
|
+
"description": "Enable experimental tc39 proposal https://github.com/tc39/proposal-defer-import-eval. This allows to defer execution of a module until it's first use.",
|
|
841
|
+
"type": "boolean"
|
|
829
842
|
}
|
|
830
843
|
},
|
|
831
844
|
"additionalProperties": false
|
|
@@ -1015,6 +1028,46 @@
|
|
|
1015
1028
|
}
|
|
1016
1029
|
]
|
|
1017
1030
|
},
|
|
1031
|
+
"integrity": {
|
|
1032
|
+
"title": "Integrity generation options",
|
|
1033
|
+
"default": false,
|
|
1034
|
+
"anyOf": [
|
|
1035
|
+
{
|
|
1036
|
+
"type": "object",
|
|
1037
|
+
"properties": {
|
|
1038
|
+
"enabled": {
|
|
1039
|
+
"enum": [
|
|
1040
|
+
"auto",
|
|
1041
|
+
false,
|
|
1042
|
+
true
|
|
1043
|
+
]
|
|
1044
|
+
},
|
|
1045
|
+
"hashFuncNames": {
|
|
1046
|
+
"type": "array",
|
|
1047
|
+
"items": {
|
|
1048
|
+
"enum": [
|
|
1049
|
+
"sha256",
|
|
1050
|
+
"sha384",
|
|
1051
|
+
"sha512"
|
|
1052
|
+
],
|
|
1053
|
+
"type": "string"
|
|
1054
|
+
}
|
|
1055
|
+
},
|
|
1056
|
+
"hashLoading": {
|
|
1057
|
+
"enum": [
|
|
1058
|
+
"eager",
|
|
1059
|
+
"lazy"
|
|
1060
|
+
],
|
|
1061
|
+
"type": "string"
|
|
1062
|
+
}
|
|
1063
|
+
},
|
|
1064
|
+
"additionalProperties": false
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
"type": "boolean"
|
|
1068
|
+
}
|
|
1069
|
+
]
|
|
1070
|
+
},
|
|
1018
1071
|
"excludesPresetEnv": {
|
|
1019
1072
|
"title": "List of modules to exclude from `@babel/preset-env` and `swc-loader`",
|
|
1020
1073
|
"type": "array",
|
|
@@ -1236,23 +1289,23 @@
|
|
|
1236
1289
|
"dotAll": {
|
|
1237
1290
|
"type": "boolean"
|
|
1238
1291
|
},
|
|
1239
|
-
"__@match@
|
|
1292
|
+
"__@match@8914": {
|
|
1240
1293
|
"type": "object",
|
|
1241
1294
|
"additionalProperties": false
|
|
1242
1295
|
},
|
|
1243
|
-
"__@replace@
|
|
1296
|
+
"__@replace@8916": {
|
|
1244
1297
|
"type": "object",
|
|
1245
1298
|
"additionalProperties": false
|
|
1246
1299
|
},
|
|
1247
|
-
"__@search@
|
|
1300
|
+
"__@search@8919": {
|
|
1248
1301
|
"type": "object",
|
|
1249
1302
|
"additionalProperties": false
|
|
1250
1303
|
},
|
|
1251
|
-
"__@split@
|
|
1304
|
+
"__@split@8921": {
|
|
1252
1305
|
"type": "object",
|
|
1253
1306
|
"additionalProperties": false
|
|
1254
1307
|
},
|
|
1255
|
-
"__@matchAll@
|
|
1308
|
+
"__@matchAll@8923": {
|
|
1256
1309
|
"type": "object",
|
|
1257
1310
|
"additionalProperties": false
|
|
1258
1311
|
}
|
|
@@ -1599,6 +1652,46 @@
|
|
|
1599
1652
|
}
|
|
1600
1653
|
]
|
|
1601
1654
|
},
|
|
1655
|
+
"integrity": {
|
|
1656
|
+
"title": "Integrity generation options",
|
|
1657
|
+
"default": false,
|
|
1658
|
+
"anyOf": [
|
|
1659
|
+
{
|
|
1660
|
+
"type": "object",
|
|
1661
|
+
"properties": {
|
|
1662
|
+
"enabled": {
|
|
1663
|
+
"enum": [
|
|
1664
|
+
"auto",
|
|
1665
|
+
false,
|
|
1666
|
+
true
|
|
1667
|
+
]
|
|
1668
|
+
},
|
|
1669
|
+
"hashFuncNames": {
|
|
1670
|
+
"type": "array",
|
|
1671
|
+
"items": {
|
|
1672
|
+
"enum": [
|
|
1673
|
+
"sha256",
|
|
1674
|
+
"sha384",
|
|
1675
|
+
"sha512"
|
|
1676
|
+
],
|
|
1677
|
+
"type": "string"
|
|
1678
|
+
}
|
|
1679
|
+
},
|
|
1680
|
+
"hashLoading": {
|
|
1681
|
+
"enum": [
|
|
1682
|
+
"eager",
|
|
1683
|
+
"lazy"
|
|
1684
|
+
],
|
|
1685
|
+
"type": "string"
|
|
1686
|
+
}
|
|
1687
|
+
},
|
|
1688
|
+
"additionalProperties": false
|
|
1689
|
+
},
|
|
1690
|
+
{
|
|
1691
|
+
"type": "boolean"
|
|
1692
|
+
}
|
|
1693
|
+
]
|
|
1694
|
+
},
|
|
1602
1695
|
"experiments": {
|
|
1603
1696
|
"title": "Change different experimental cli settings",
|
|
1604
1697
|
"default": {},
|
|
@@ -1644,6 +1737,10 @@
|
|
|
1644
1737
|
"topLevelAwait": {
|
|
1645
1738
|
"description": "Allow using top-level-await in EcmaScript Modules.",
|
|
1646
1739
|
"type": "boolean"
|
|
1740
|
+
},
|
|
1741
|
+
"deferImport": {
|
|
1742
|
+
"description": "Enable experimental tc39 proposal https://github.com/tc39/proposal-defer-import-eval. This allows to defer execution of a module until it's first use.",
|
|
1743
|
+
"type": "boolean"
|
|
1647
1744
|
}
|
|
1648
1745
|
},
|
|
1649
1746
|
"additionalProperties": false
|
|
@@ -1987,23 +2084,23 @@
|
|
|
1987
2084
|
"dotAll": {
|
|
1988
2085
|
"type": "boolean"
|
|
1989
2086
|
},
|
|
1990
|
-
"__@match@
|
|
2087
|
+
"__@match@8914": {
|
|
1991
2088
|
"type": "object",
|
|
1992
2089
|
"additionalProperties": false
|
|
1993
2090
|
},
|
|
1994
|
-
"__@replace@
|
|
2091
|
+
"__@replace@8916": {
|
|
1995
2092
|
"type": "object",
|
|
1996
2093
|
"additionalProperties": false
|
|
1997
2094
|
},
|
|
1998
|
-
"__@search@
|
|
2095
|
+
"__@search@8919": {
|
|
1999
2096
|
"type": "object",
|
|
2000
2097
|
"additionalProperties": false
|
|
2001
2098
|
},
|
|
2002
|
-
"__@split@
|
|
2099
|
+
"__@split@8921": {
|
|
2003
2100
|
"type": "object",
|
|
2004
2101
|
"additionalProperties": false
|
|
2005
2102
|
},
|
|
2006
|
-
"__@matchAll@
|
|
2103
|
+
"__@matchAll@8923": {
|
|
2007
2104
|
"type": "object",
|
|
2008
2105
|
"additionalProperties": false
|
|
2009
2106
|
}
|
|
@@ -2350,6 +2447,46 @@
|
|
|
2350
2447
|
}
|
|
2351
2448
|
]
|
|
2352
2449
|
},
|
|
2450
|
+
"integrity": {
|
|
2451
|
+
"title": "Integrity generation options",
|
|
2452
|
+
"default": false,
|
|
2453
|
+
"anyOf": [
|
|
2454
|
+
{
|
|
2455
|
+
"type": "object",
|
|
2456
|
+
"properties": {
|
|
2457
|
+
"enabled": {
|
|
2458
|
+
"enum": [
|
|
2459
|
+
"auto",
|
|
2460
|
+
false,
|
|
2461
|
+
true
|
|
2462
|
+
]
|
|
2463
|
+
},
|
|
2464
|
+
"hashFuncNames": {
|
|
2465
|
+
"type": "array",
|
|
2466
|
+
"items": {
|
|
2467
|
+
"enum": [
|
|
2468
|
+
"sha256",
|
|
2469
|
+
"sha384",
|
|
2470
|
+
"sha512"
|
|
2471
|
+
],
|
|
2472
|
+
"type": "string"
|
|
2473
|
+
}
|
|
2474
|
+
},
|
|
2475
|
+
"hashLoading": {
|
|
2476
|
+
"enum": [
|
|
2477
|
+
"eager",
|
|
2478
|
+
"lazy"
|
|
2479
|
+
],
|
|
2480
|
+
"type": "string"
|
|
2481
|
+
}
|
|
2482
|
+
},
|
|
2483
|
+
"additionalProperties": false
|
|
2484
|
+
},
|
|
2485
|
+
{
|
|
2486
|
+
"type": "boolean"
|
|
2487
|
+
}
|
|
2488
|
+
]
|
|
2489
|
+
},
|
|
2353
2490
|
"experiments": {
|
|
2354
2491
|
"title": "Change different experimental cli settings",
|
|
2355
2492
|
"default": {},
|
|
@@ -2395,6 +2532,10 @@
|
|
|
2395
2532
|
"topLevelAwait": {
|
|
2396
2533
|
"description": "Allow using top-level-await in EcmaScript Modules.",
|
|
2397
2534
|
"type": "boolean"
|
|
2535
|
+
},
|
|
2536
|
+
"deferImport": {
|
|
2537
|
+
"description": "Enable experimental tc39 proposal https://github.com/tc39/proposal-defer-import-eval. This allows to defer execution of a module until it's first use.",
|
|
2538
|
+
"type": "boolean"
|
|
2398
2539
|
}
|
|
2399
2540
|
},
|
|
2400
2541
|
"additionalProperties": false
|
|
@@ -2738,23 +2879,23 @@
|
|
|
2738
2879
|
"dotAll": {
|
|
2739
2880
|
"type": "boolean"
|
|
2740
2881
|
},
|
|
2741
|
-
"__@match@
|
|
2882
|
+
"__@match@8914": {
|
|
2742
2883
|
"type": "object",
|
|
2743
2884
|
"additionalProperties": false
|
|
2744
2885
|
},
|
|
2745
|
-
"__@replace@
|
|
2886
|
+
"__@replace@8916": {
|
|
2746
2887
|
"type": "object",
|
|
2747
2888
|
"additionalProperties": false
|
|
2748
2889
|
},
|
|
2749
|
-
"__@search@
|
|
2890
|
+
"__@search@8919": {
|
|
2750
2891
|
"type": "object",
|
|
2751
2892
|
"additionalProperties": false
|
|
2752
2893
|
},
|
|
2753
|
-
"__@split@
|
|
2894
|
+
"__@split@8921": {
|
|
2754
2895
|
"type": "object",
|
|
2755
2896
|
"additionalProperties": false
|
|
2756
2897
|
},
|
|
2757
|
-
"__@matchAll@
|
|
2898
|
+
"__@matchAll@8923": {
|
|
2758
2899
|
"type": "object",
|
|
2759
2900
|
"additionalProperties": false
|
|
2760
2901
|
}
|
|
@@ -68,6 +68,20 @@ module.exports = (autogeneratedSchema) => {
|
|
|
68
68
|
},
|
|
69
69
|
},
|
|
70
70
|
},
|
|
71
|
+
analytics: {
|
|
72
|
+
type: 'object',
|
|
73
|
+
additionalProperties: false,
|
|
74
|
+
properties: {
|
|
75
|
+
enabled: {
|
|
76
|
+
title: 'enable @tramvai/cli monitoring',
|
|
77
|
+
type: 'boolean',
|
|
78
|
+
},
|
|
79
|
+
endpoint: {
|
|
80
|
+
title: '@tramvai/cli monitoring collector endpoint',
|
|
81
|
+
type: 'string',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
71
85
|
},
|
|
72
86
|
};
|
|
73
87
|
};
|
|
@@ -102,6 +102,7 @@ describe('JSON schema для tramvai.json', () => {
|
|
|
102
102
|
},
|
|
103
103
|
"reactCompiler": false,
|
|
104
104
|
"reactTransitions": false,
|
|
105
|
+
"runtimeChunk": false,
|
|
105
106
|
"serverRunner": "thread",
|
|
106
107
|
"transpilation": {
|
|
107
108
|
"loader": "babel",
|
|
@@ -126,7 +127,7 @@ describe('JSON schema для tramvai.json', () => {
|
|
|
126
127
|
"overlay": false,
|
|
127
128
|
},
|
|
128
129
|
},
|
|
129
|
-
"
|
|
130
|
+
"integrity": false,
|
|
130
131
|
"name": "test-app",
|
|
131
132
|
"notifications": {},
|
|
132
133
|
"output": {
|
|
@@ -194,6 +195,7 @@ describe('JSON schema для tramvai.json', () => {
|
|
|
194
195
|
"overlay": false,
|
|
195
196
|
},
|
|
196
197
|
},
|
|
198
|
+
"integrity": false,
|
|
197
199
|
"name": "test-module",
|
|
198
200
|
"notifications": {},
|
|
199
201
|
"output": "dist/modules",
|
|
@@ -4,7 +4,6 @@ export interface BuilderCustomOptions {
|
|
|
4
4
|
|
|
5
5
|
export interface BuilderOptions {
|
|
6
6
|
shouldBuildClient: boolean;
|
|
7
|
-
onlyModern?: boolean;
|
|
8
7
|
shouldBuildServer: boolean;
|
|
9
8
|
}
|
|
10
9
|
|
|
@@ -29,23 +28,19 @@ interface BuilderStartOptions {
|
|
|
29
28
|
strictError: boolean;
|
|
30
29
|
}
|
|
31
30
|
|
|
32
|
-
interface BuilderBuildOptions {
|
|
33
|
-
modern: boolean;
|
|
34
|
-
}
|
|
31
|
+
interface BuilderBuildOptions {}
|
|
35
32
|
|
|
36
33
|
interface BuilderAnalyzeOptions {
|
|
37
|
-
modern?: boolean;
|
|
38
34
|
plugin?: string;
|
|
39
35
|
}
|
|
40
36
|
|
|
41
37
|
export type GetBuildStats = () => {
|
|
42
38
|
clientBuildTime?: number;
|
|
43
|
-
clientModernBuildTime?: number;
|
|
44
39
|
serverBuildTime?: number;
|
|
45
40
|
maxMemoryRss?: number;
|
|
46
41
|
};
|
|
47
42
|
|
|
48
|
-
export type BuildType = 'client' | 'server'
|
|
43
|
+
export type BuildType = 'client' | 'server';
|
|
49
44
|
|
|
50
45
|
export interface BuilderEvents {
|
|
51
46
|
invalid: [];
|
|
@@ -60,7 +55,7 @@ export interface Builder<Name extends string> {
|
|
|
60
55
|
invalidate: () => Promise<void>;
|
|
61
56
|
getBuildStats: GetBuildStats;
|
|
62
57
|
}>;
|
|
63
|
-
build(options
|
|
58
|
+
build(options?: BuilderBuildOptions): Promise<{
|
|
64
59
|
getBuildStats: GetBuildStats;
|
|
65
60
|
}>;
|
|
66
61
|
|