@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
package/schema.json
CHANGED
|
@@ -44,6 +44,10 @@
|
|
|
44
44
|
"title": "Path to polyfill file. By default, looks for the `src/polyfill`",
|
|
45
45
|
"type": "string"
|
|
46
46
|
},
|
|
47
|
+
"modernPolyfill": {
|
|
48
|
+
"title": "Path to modern polyfill file. By default, looks for the `src/modern-polyfill`",
|
|
49
|
+
"type": "string"
|
|
50
|
+
},
|
|
47
51
|
"serverApiDir": {
|
|
48
52
|
"title": "Path to folder with papi handlers",
|
|
49
53
|
"default": "src/api",
|
|
@@ -72,11 +76,6 @@
|
|
|
72
76
|
},
|
|
73
77
|
"additionalProperties": false
|
|
74
78
|
},
|
|
75
|
-
"modern": {
|
|
76
|
-
"title": "Enable build for modern browsers",
|
|
77
|
-
"default": true,
|
|
78
|
-
"type": "boolean"
|
|
79
|
-
},
|
|
80
79
|
"fileSystemPages": {
|
|
81
80
|
"title": "File-System Routing feature",
|
|
82
81
|
"default": {},
|
|
@@ -808,6 +807,16 @@
|
|
|
808
807
|
"default": false,
|
|
809
808
|
"type": "boolean"
|
|
810
809
|
},
|
|
810
|
+
"runtimeChunk": {
|
|
811
|
+
"title": "Webpack Runtime Chunk settings",
|
|
812
|
+
"default": false,
|
|
813
|
+
"enum": [
|
|
814
|
+
false,
|
|
815
|
+
"multiple",
|
|
816
|
+
"single",
|
|
817
|
+
true
|
|
818
|
+
]
|
|
819
|
+
},
|
|
811
820
|
"webpack": {
|
|
812
821
|
"title": "experiments configuration for [webpack](https://webpack.js.org/configuration/experiments/)",
|
|
813
822
|
"default": {},
|
|
@@ -848,6 +857,10 @@
|
|
|
848
857
|
"topLevelAwait": {
|
|
849
858
|
"description": "Allow using top-level-await in EcmaScript Modules.",
|
|
850
859
|
"type": "boolean"
|
|
860
|
+
},
|
|
861
|
+
"deferImport": {
|
|
862
|
+
"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.",
|
|
863
|
+
"type": "boolean"
|
|
851
864
|
}
|
|
852
865
|
},
|
|
853
866
|
"additionalProperties": false
|
|
@@ -1037,6 +1050,46 @@
|
|
|
1037
1050
|
}
|
|
1038
1051
|
]
|
|
1039
1052
|
},
|
|
1053
|
+
"integrity": {
|
|
1054
|
+
"title": "Integrity generation options",
|
|
1055
|
+
"default": false,
|
|
1056
|
+
"anyOf": [
|
|
1057
|
+
{
|
|
1058
|
+
"type": "object",
|
|
1059
|
+
"properties": {
|
|
1060
|
+
"enabled": {
|
|
1061
|
+
"enum": [
|
|
1062
|
+
"auto",
|
|
1063
|
+
false,
|
|
1064
|
+
true
|
|
1065
|
+
]
|
|
1066
|
+
},
|
|
1067
|
+
"hashFuncNames": {
|
|
1068
|
+
"type": "array",
|
|
1069
|
+
"items": {
|
|
1070
|
+
"enum": [
|
|
1071
|
+
"sha256",
|
|
1072
|
+
"sha384",
|
|
1073
|
+
"sha512"
|
|
1074
|
+
],
|
|
1075
|
+
"type": "string"
|
|
1076
|
+
}
|
|
1077
|
+
},
|
|
1078
|
+
"hashLoading": {
|
|
1079
|
+
"enum": [
|
|
1080
|
+
"eager",
|
|
1081
|
+
"lazy"
|
|
1082
|
+
],
|
|
1083
|
+
"type": "string"
|
|
1084
|
+
}
|
|
1085
|
+
},
|
|
1086
|
+
"additionalProperties": false
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
"type": "boolean"
|
|
1090
|
+
}
|
|
1091
|
+
]
|
|
1092
|
+
},
|
|
1040
1093
|
"excludesPresetEnv": {
|
|
1041
1094
|
"title": "List of modules to exclude from `@babel/preset-env` and `swc-loader`",
|
|
1042
1095
|
"type": "array",
|
|
@@ -1258,23 +1311,23 @@
|
|
|
1258
1311
|
"dotAll": {
|
|
1259
1312
|
"type": "boolean"
|
|
1260
1313
|
},
|
|
1261
|
-
"__@match@
|
|
1314
|
+
"__@match@8914": {
|
|
1262
1315
|
"type": "object",
|
|
1263
1316
|
"additionalProperties": false
|
|
1264
1317
|
},
|
|
1265
|
-
"__@replace@
|
|
1318
|
+
"__@replace@8916": {
|
|
1266
1319
|
"type": "object",
|
|
1267
1320
|
"additionalProperties": false
|
|
1268
1321
|
},
|
|
1269
|
-
"__@search@
|
|
1322
|
+
"__@search@8919": {
|
|
1270
1323
|
"type": "object",
|
|
1271
1324
|
"additionalProperties": false
|
|
1272
1325
|
},
|
|
1273
|
-
"__@split@
|
|
1326
|
+
"__@split@8921": {
|
|
1274
1327
|
"type": "object",
|
|
1275
1328
|
"additionalProperties": false
|
|
1276
1329
|
},
|
|
1277
|
-
"__@matchAll@
|
|
1330
|
+
"__@matchAll@8923": {
|
|
1278
1331
|
"type": "object",
|
|
1279
1332
|
"additionalProperties": false
|
|
1280
1333
|
}
|
|
@@ -1630,6 +1683,46 @@
|
|
|
1630
1683
|
}
|
|
1631
1684
|
]
|
|
1632
1685
|
},
|
|
1686
|
+
"integrity": {
|
|
1687
|
+
"title": "Integrity generation options",
|
|
1688
|
+
"default": false,
|
|
1689
|
+
"anyOf": [
|
|
1690
|
+
{
|
|
1691
|
+
"type": "object",
|
|
1692
|
+
"properties": {
|
|
1693
|
+
"enabled": {
|
|
1694
|
+
"enum": [
|
|
1695
|
+
"auto",
|
|
1696
|
+
false,
|
|
1697
|
+
true
|
|
1698
|
+
]
|
|
1699
|
+
},
|
|
1700
|
+
"hashFuncNames": {
|
|
1701
|
+
"type": "array",
|
|
1702
|
+
"items": {
|
|
1703
|
+
"enum": [
|
|
1704
|
+
"sha256",
|
|
1705
|
+
"sha384",
|
|
1706
|
+
"sha512"
|
|
1707
|
+
],
|
|
1708
|
+
"type": "string"
|
|
1709
|
+
}
|
|
1710
|
+
},
|
|
1711
|
+
"hashLoading": {
|
|
1712
|
+
"enum": [
|
|
1713
|
+
"eager",
|
|
1714
|
+
"lazy"
|
|
1715
|
+
],
|
|
1716
|
+
"type": "string"
|
|
1717
|
+
}
|
|
1718
|
+
},
|
|
1719
|
+
"additionalProperties": false
|
|
1720
|
+
},
|
|
1721
|
+
{
|
|
1722
|
+
"type": "boolean"
|
|
1723
|
+
}
|
|
1724
|
+
]
|
|
1725
|
+
},
|
|
1633
1726
|
"experiments": {
|
|
1634
1727
|
"title": "Change different experimental cli settings",
|
|
1635
1728
|
"default": {},
|
|
@@ -1675,6 +1768,10 @@
|
|
|
1675
1768
|
"topLevelAwait": {
|
|
1676
1769
|
"description": "Allow using top-level-await in EcmaScript Modules.",
|
|
1677
1770
|
"type": "boolean"
|
|
1771
|
+
},
|
|
1772
|
+
"deferImport": {
|
|
1773
|
+
"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.",
|
|
1774
|
+
"type": "boolean"
|
|
1678
1775
|
}
|
|
1679
1776
|
},
|
|
1680
1777
|
"additionalProperties": false
|
|
@@ -2018,23 +2115,23 @@
|
|
|
2018
2115
|
"dotAll": {
|
|
2019
2116
|
"type": "boolean"
|
|
2020
2117
|
},
|
|
2021
|
-
"__@match@
|
|
2118
|
+
"__@match@8914": {
|
|
2022
2119
|
"type": "object",
|
|
2023
2120
|
"additionalProperties": false
|
|
2024
2121
|
},
|
|
2025
|
-
"__@replace@
|
|
2122
|
+
"__@replace@8916": {
|
|
2026
2123
|
"type": "object",
|
|
2027
2124
|
"additionalProperties": false
|
|
2028
2125
|
},
|
|
2029
|
-
"__@search@
|
|
2126
|
+
"__@search@8919": {
|
|
2030
2127
|
"type": "object",
|
|
2031
2128
|
"additionalProperties": false
|
|
2032
2129
|
},
|
|
2033
|
-
"__@split@
|
|
2130
|
+
"__@split@8921": {
|
|
2034
2131
|
"type": "object",
|
|
2035
2132
|
"additionalProperties": false
|
|
2036
2133
|
},
|
|
2037
|
-
"__@matchAll@
|
|
2134
|
+
"__@matchAll@8923": {
|
|
2038
2135
|
"type": "object",
|
|
2039
2136
|
"additionalProperties": false
|
|
2040
2137
|
}
|
|
@@ -2390,6 +2487,46 @@
|
|
|
2390
2487
|
}
|
|
2391
2488
|
]
|
|
2392
2489
|
},
|
|
2490
|
+
"integrity": {
|
|
2491
|
+
"title": "Integrity generation options",
|
|
2492
|
+
"default": false,
|
|
2493
|
+
"anyOf": [
|
|
2494
|
+
{
|
|
2495
|
+
"type": "object",
|
|
2496
|
+
"properties": {
|
|
2497
|
+
"enabled": {
|
|
2498
|
+
"enum": [
|
|
2499
|
+
"auto",
|
|
2500
|
+
false,
|
|
2501
|
+
true
|
|
2502
|
+
]
|
|
2503
|
+
},
|
|
2504
|
+
"hashFuncNames": {
|
|
2505
|
+
"type": "array",
|
|
2506
|
+
"items": {
|
|
2507
|
+
"enum": [
|
|
2508
|
+
"sha256",
|
|
2509
|
+
"sha384",
|
|
2510
|
+
"sha512"
|
|
2511
|
+
],
|
|
2512
|
+
"type": "string"
|
|
2513
|
+
}
|
|
2514
|
+
},
|
|
2515
|
+
"hashLoading": {
|
|
2516
|
+
"enum": [
|
|
2517
|
+
"eager",
|
|
2518
|
+
"lazy"
|
|
2519
|
+
],
|
|
2520
|
+
"type": "string"
|
|
2521
|
+
}
|
|
2522
|
+
},
|
|
2523
|
+
"additionalProperties": false
|
|
2524
|
+
},
|
|
2525
|
+
{
|
|
2526
|
+
"type": "boolean"
|
|
2527
|
+
}
|
|
2528
|
+
]
|
|
2529
|
+
},
|
|
2393
2530
|
"experiments": {
|
|
2394
2531
|
"title": "Change different experimental cli settings",
|
|
2395
2532
|
"default": {},
|
|
@@ -2435,6 +2572,10 @@
|
|
|
2435
2572
|
"topLevelAwait": {
|
|
2436
2573
|
"description": "Allow using top-level-await in EcmaScript Modules.",
|
|
2437
2574
|
"type": "boolean"
|
|
2575
|
+
},
|
|
2576
|
+
"deferImport": {
|
|
2577
|
+
"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.",
|
|
2578
|
+
"type": "boolean"
|
|
2438
2579
|
}
|
|
2439
2580
|
},
|
|
2440
2581
|
"additionalProperties": false
|
|
@@ -2778,23 +2919,23 @@
|
|
|
2778
2919
|
"dotAll": {
|
|
2779
2920
|
"type": "boolean"
|
|
2780
2921
|
},
|
|
2781
|
-
"__@match@
|
|
2922
|
+
"__@match@8914": {
|
|
2782
2923
|
"type": "object",
|
|
2783
2924
|
"additionalProperties": false
|
|
2784
2925
|
},
|
|
2785
|
-
"__@replace@
|
|
2926
|
+
"__@replace@8916": {
|
|
2786
2927
|
"type": "object",
|
|
2787
2928
|
"additionalProperties": false
|
|
2788
2929
|
},
|
|
2789
|
-
"__@search@
|
|
2930
|
+
"__@search@8919": {
|
|
2790
2931
|
"type": "object",
|
|
2791
2932
|
"additionalProperties": false
|
|
2792
2933
|
},
|
|
2793
|
-
"__@split@
|
|
2934
|
+
"__@split@8921": {
|
|
2794
2935
|
"type": "object",
|
|
2795
2936
|
"additionalProperties": false
|
|
2796
2937
|
},
|
|
2797
|
-
"__@matchAll@
|
|
2938
|
+
"__@matchAll@8923": {
|
|
2798
2939
|
"type": "object",
|
|
2799
2940
|
"additionalProperties": false
|
|
2800
2941
|
}
|
|
@@ -3105,6 +3246,20 @@
|
|
|
3105
3246
|
}
|
|
3106
3247
|
}
|
|
3107
3248
|
}
|
|
3249
|
+
},
|
|
3250
|
+
"analytics": {
|
|
3251
|
+
"type": "object",
|
|
3252
|
+
"additionalProperties": false,
|
|
3253
|
+
"properties": {
|
|
3254
|
+
"enabled": {
|
|
3255
|
+
"title": "enable @tramvai/cli monitoring",
|
|
3256
|
+
"type": "boolean"
|
|
3257
|
+
},
|
|
3258
|
+
"endpoint": {
|
|
3259
|
+
"title": "@tramvai/cli monitoring collector endpoint",
|
|
3260
|
+
"type": "string"
|
|
3261
|
+
}
|
|
3262
|
+
}
|
|
3108
3263
|
}
|
|
3109
3264
|
}
|
|
3110
3265
|
}
|
package/src/api/analyze/index.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { sharedProviders } from './providers/shared';
|
|
|
7
7
|
export interface Params {
|
|
8
8
|
target: string;
|
|
9
9
|
plugin?: 'bundle' | 'whybundled' | 'statoscope';
|
|
10
|
-
modern?: boolean;
|
|
11
10
|
showConfig?: boolean;
|
|
12
11
|
fileCache?: boolean;
|
|
13
12
|
verboseWebpack?: boolean;
|
|
@@ -18,7 +17,7 @@ export type AnalyzeCommand = (params: Params, providers?: Provider[]) => Promise
|
|
|
18
17
|
export default createCommand({
|
|
19
18
|
name: 'analyze',
|
|
20
19
|
command: async (di): Promise<void> => {
|
|
21
|
-
const { plugin
|
|
20
|
+
const { plugin } = di.get(COMMAND_PARAMETERS_TOKEN) as Params;
|
|
22
21
|
|
|
23
22
|
registerProviders(di, sharedProviders);
|
|
24
23
|
|
|
@@ -30,6 +29,6 @@ export default createCommand({
|
|
|
30
29
|
},
|
|
31
30
|
});
|
|
32
31
|
|
|
33
|
-
await builder.analyze({ plugin
|
|
32
|
+
await builder.analyze({ plugin });
|
|
34
33
|
},
|
|
35
34
|
});
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "../../../../../schema.json",
|
|
3
|
+
"analytics": {
|
|
4
|
+
"enabled": false
|
|
5
|
+
},
|
|
3
6
|
"projects": {
|
|
4
7
|
"app": {
|
|
5
8
|
"name": "app",
|
|
6
9
|
"root": "app",
|
|
7
|
-
"type": "application"
|
|
8
|
-
"modern": false
|
|
10
|
+
"type": "application"
|
|
9
11
|
},
|
|
10
12
|
"module": {
|
|
11
13
|
"name": "module",
|
|
@@ -10,7 +10,7 @@ import { registerProviders } from '../../utils/di';
|
|
|
10
10
|
|
|
11
11
|
export const buildApplication = async (di: Container): Result => {
|
|
12
12
|
const options = di.get(COMMAND_PARAMETERS_TOKEN as Params);
|
|
13
|
-
const { buildType = 'all'
|
|
13
|
+
const { buildType = 'all' } = options;
|
|
14
14
|
|
|
15
15
|
const shouldBuildClient = buildType === 'client' || buildType === 'all';
|
|
16
16
|
const shouldBuildServer = buildType === 'server' || buildType === 'all';
|
|
@@ -24,13 +24,10 @@ export const buildApplication = async (di: Container): Result => {
|
|
|
24
24
|
options: {
|
|
25
25
|
shouldBuildClient,
|
|
26
26
|
shouldBuildServer,
|
|
27
|
-
onlyModern,
|
|
28
27
|
},
|
|
29
28
|
});
|
|
30
29
|
|
|
31
|
-
const builderBuild = await builder.build(
|
|
32
|
-
modern: configManager.modern,
|
|
33
|
-
});
|
|
30
|
+
const builderBuild = await builder.build();
|
|
34
31
|
|
|
35
32
|
return {
|
|
36
33
|
builder,
|
|
@@ -15,11 +15,7 @@ export const buildChildApp = async (di: Container): Result => {
|
|
|
15
15
|
},
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
const builderBuild = await builder.build(
|
|
19
|
-
// child-app either should be built for legacy code always
|
|
20
|
-
// or should be smart loaded depending on browser capabilities
|
|
21
|
-
modern: false,
|
|
22
|
-
});
|
|
18
|
+
const builderBuild = await builder.build();
|
|
23
19
|
|
|
24
20
|
return {
|
|
25
21
|
builder,
|
package/src/api/build/index.ts
CHANGED
|
@@ -11,11 +11,9 @@ import type { Builder } from '../../typings/build/Builder';
|
|
|
11
11
|
|
|
12
12
|
export type Params = WithConfig<{
|
|
13
13
|
buildType?: 'server' | 'client' | 'all' | 'none';
|
|
14
|
-
onlyModern?: boolean;
|
|
15
14
|
debug?: boolean;
|
|
16
15
|
verboseWebpack?: boolean;
|
|
17
16
|
profile?: boolean;
|
|
18
|
-
modern?: boolean;
|
|
19
17
|
sourceMap?: boolean;
|
|
20
18
|
resolveSymlinks?: boolean;
|
|
21
19
|
disableProdOptimization?: boolean;
|
package/src/api/build/module.ts
CHANGED
package/src/api/index.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import '../typings/application';
|
|
2
2
|
|
|
3
3
|
import { writableNoopStream } from 'noop-stream';
|
|
4
|
-
import {
|
|
5
|
-
ANALYTICS_PACKAGE_INFO_TOKEN,
|
|
6
|
-
COMMAND_PARAMETERS_TOKEN,
|
|
7
|
-
STDERR_TOKEN,
|
|
8
|
-
STDOUT_TOKEN,
|
|
9
|
-
} from '../di/tokens';
|
|
4
|
+
import { COMMAND_PARAMETERS_TOKEN, STDERR_TOKEN, STDOUT_TOKEN } from '../di/tokens';
|
|
10
5
|
import { createApp } from '../commands/createApp';
|
|
11
6
|
|
|
12
7
|
import type { StartCommand } from './start';
|
|
@@ -43,10 +38,6 @@ const app = createApp({
|
|
|
43
38
|
'start-prod': () => import('./start-prod'),
|
|
44
39
|
},
|
|
45
40
|
providers: [
|
|
46
|
-
{
|
|
47
|
-
provide: ANALYTICS_PACKAGE_INFO_TOKEN,
|
|
48
|
-
useValue: { name: '@tramvai/cli-api', version: '0.1.0' },
|
|
49
|
-
},
|
|
50
41
|
{
|
|
51
42
|
provide: STDOUT_TOKEN,
|
|
52
43
|
useFactory: ({ params }) => {
|
|
@@ -55,6 +55,7 @@ app.get<{ Querystring: Querystring }>(
|
|
|
55
55
|
return `<html>
|
|
56
56
|
<head>
|
|
57
57
|
<link rel="stylesheet" href="http://localhost:${appConfig.staticPort}/dist/client/platform.css">
|
|
58
|
+
<script src="http://localhost:${appConfig.staticPort}/dist/client/runtime.js" defer></script>
|
|
58
59
|
<script src="http://localhost:${appConfig.staticPort}/dist/client/react.js" defer></script>
|
|
59
60
|
<script src="http://localhost:${appConfig.staticPort}/dist/client/hmr.js" defer></script>
|
|
60
61
|
<script src="http://localhost:${appConfig.staticPort}/dist/client/platform.js" defer></script>
|
|
@@ -67,6 +67,7 @@ describe('@tramvai/cli start command', () => {
|
|
|
67
67
|
|
|
68
68
|
expect(responseServer.text)
|
|
69
69
|
.toMatch(`<link rel="stylesheet" href="http://localhost:${staticServerPort}/dist/client/platform.css">
|
|
70
|
+
<script src="http://localhost:${staticServerPort}/dist/client/runtime.js" defer></script>
|
|
70
71
|
<script src="http://localhost:${staticServerPort}/dist/client/react.js" defer></script>
|
|
71
72
|
<script src="http://localhost:${staticServerPort}/dist/client/hmr.js" defer></script>
|
|
72
73
|
<script src="http://localhost:${staticServerPort}/dist/client/platform.js" defer></script>`);
|
|
@@ -94,7 +95,6 @@ describe('@tramvai/cli start command', () => {
|
|
|
94
95
|
.expect(200);
|
|
95
96
|
|
|
96
97
|
expect(browserslistConfig).toMatchObject({
|
|
97
|
-
modern: ['chrome > 100'],
|
|
98
98
|
node: ['Node >= 18'],
|
|
99
99
|
defaults: expect.arrayContaining(['chrome > 27']),
|
|
100
100
|
});
|
|
@@ -157,6 +157,14 @@ describe('@tramvai/cli start command', () => {
|
|
|
157
157
|
name: 'app',
|
|
158
158
|
type: 'application',
|
|
159
159
|
root,
|
|
160
|
+
experiments: {
|
|
161
|
+
// faster transpilation
|
|
162
|
+
transpilation: {
|
|
163
|
+
loader: 'swc',
|
|
164
|
+
},
|
|
165
|
+
// for threads "chdir" is used, cwd is changed and it can breaks some integration tests
|
|
166
|
+
serverRunner: 'process',
|
|
167
|
+
},
|
|
160
168
|
},
|
|
161
169
|
});
|
|
162
170
|
|
|
@@ -170,6 +178,7 @@ describe('@tramvai/cli start command', () => {
|
|
|
170
178
|
|
|
171
179
|
expect(responseServer.text)
|
|
172
180
|
.toMatch(`<link rel="stylesheet" href="http://localhost:${staticServerPort}/dist/client/platform.css">
|
|
181
|
+
<script src="http://localhost:${staticServerPort}/dist/client/runtime.js" defer></script>
|
|
173
182
|
<script src="http://localhost:${staticServerPort}/dist/client/react.js" defer></script>
|
|
174
183
|
<script src="http://localhost:${staticServerPort}/dist/client/hmr.js" defer></script>
|
|
175
184
|
<script src="http://localhost:${staticServerPort}/dist/client/platform.js" defer></script>`);
|