@tramvai/cli 5.53.80 → 6.62.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/bin/spawn.js +8 -2
- 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 -0
- 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/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/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/client.d.ts.map +1 -1
- package/lib/builder/webpack/providers/client.js +10 -9
- 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/cli/CLI.d.ts +1 -1
- package/lib/cli/CLI.d.ts.map +1 -1
- 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 +1 -12
- package/lib/cli/index.js.map +1 -1
- package/lib/cli/runCLI.d.ts.map +1 -1
- 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 +1 -1
- package/lib/commands/build/command.d.ts.map +1 -1
- package/lib/commands/build/command.js +12 -15
- package/lib/commands/build/command.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/steps/installDependencies.js +3 -3
- package/lib/commands/new/steps/installDependencies.js.map +1 -1
- package/lib/commands/start/command.d.ts +1 -1
- package/lib/commands/start/command.d.ts.map +1 -1
- package/lib/commands/start/command.js +18 -15
- package/lib/commands/start/command.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/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 +1 -4
- package/lib/commands/update/command.d.ts.map +1 -1
- package/lib/commands/update/command.js +3 -2
- package/lib/commands/update/command.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 -9
- package/lib/library/babel/index.d.ts.map +1 -1
- package/lib/library/babel/index.js +3 -132
- 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/webpack/application/client/common.d.ts.map +1 -1
- package/lib/library/webpack/application/client/common.js +10 -9
- package/lib/library/webpack/application/client/common.js.map +1 -1
- package/lib/library/webpack/application/common.d.ts.map +1 -1
- package/lib/library/webpack/application/common.js +3 -4
- package/lib/library/webpack/application/common.js.map +1 -1
- package/lib/library/webpack/blocks/pwa/client.d.ts.map +1 -1
- package/lib/library/webpack/blocks/pwa/client.js +9 -58
- package/lib/library/webpack/blocks/pwa/client.js.map +1 -1
- package/lib/library/webpack/blocks/resolve.d.ts.map +1 -1
- package/lib/library/webpack/blocks/resolve.js +1 -0
- package/lib/library/webpack/blocks/resolve.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 +2 -2
- package/lib/library/webpack/child-app/client/common.js.map +1 -1
- package/lib/library/webpack/child-app/common.d.ts.map +1 -1
- package/lib/library/webpack/child-app/common.js +3 -4
- package/lib/library/webpack/child-app/common.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.js +1 -1
- package/lib/library/webpack/utils/transpiler.js.map +1 -1
- package/lib/models/analytics/utils.d.ts +2 -1
- package/lib/models/analytics/utils.d.ts.map +1 -1
- package/lib/models/analytics/utils.js +3 -0
- package/lib/models/analytics/utils.js.map +1 -1
- package/lib/models/command.d.ts +1 -1
- package/lib/models/command.d.ts.map +1 -1
- package/lib/models/command.js +1 -1
- package/lib/models/command.js.map +1 -1
- package/lib/models/context.d.ts +1 -1
- package/lib/models/context.d.ts.map +1 -1
- package/lib/models/logger.d.ts +0 -1
- package/lib/models/logger.d.ts.map +1 -1
- package/lib/models/logger.js +2 -3
- package/lib/models/logger.js.map +1 -1
- package/lib/schema/autogeneratedSchema.json +15 -15
- package/lib/typings/configEntry/application.d.ts +1 -1
- package/lib/typings/configEntry/application.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/utils/cpu-profile.d.ts.map +1 -1
- package/lib/utils/cpu-profile.js +0 -1
- package/lib/utils/cpu-profile.js.map +1 -1
- package/package.json +23 -27
- package/schema.json +15 -15
- package/src/api/start/__integration__/start.test.ts +8 -0
- package/src/api/start/application.experimental.ts +305 -0
- package/src/api/start/index.ts +20 -4
- package/src/builder/webpack/devServer/setup.ts +1 -0
- package/src/builder/webpack/providers/analyze/shared.ts +6 -10
- package/src/builder/webpack/providers/client.ts +15 -10
- package/src/builder/webpack/providers/server.ts +15 -10
- package/src/cli/CLI.ts +1 -1
- package/src/cli/bin-init.ts +0 -2
- package/src/cli/index.ts +4 -11
- package/src/cli/runCLI.ts +0 -1
- 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 +13 -16
- 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/steps/installDependencies.ts +3 -3
- package/src/commands/new/templates/shared/_prettierrc.js.hbs +1 -1
- package/src/commands/start/command.ts +20 -16
- package/src/commands/start-prod/command.ts +12 -14
- package/src/commands/static/command.ts +7 -3
- package/src/commands/update/command.ts +3 -2
- package/src/external/config.ts +1 -0
- package/src/library/babel/index.ts +3 -160
- package/src/library/swc/__integration__/__snapshots__/swc.build.test.ts.snap +46 -28
- package/src/library/swc/__integration__/__snapshots__/swc.start.test.ts.snap +12 -8
- package/src/library/swc/__integration__/swc.start.test.ts +4 -4
- package/src/library/swc/index.ts +3 -139
- package/src/library/webpack/application/client/common.ts +12 -7
- package/src/library/webpack/application/common.ts +8 -4
- package/src/library/webpack/blocks/pwa/client.ts +13 -64
- package/src/library/webpack/blocks/resolve.ts +1 -0
- package/src/library/webpack/child-app/client/common.ts +2 -2
- package/src/library/webpack/child-app/common.ts +7 -5
- package/src/library/webpack/utils/threadLoader.ts +21 -0
- package/src/library/webpack/utils/transpiler.ts +2 -2
- package/src/models/analytics/utils.ts +6 -2
- package/src/models/command.ts +3 -4
- package/src/models/context.ts +1 -1
- package/src/models/logger.ts +1 -3
- package/src/schema/autogeneratedSchema.json +15 -15
- package/src/typings/configEntry/application.ts +5 -1
- package/src/typings/public.ts +0 -2
- package/src/utils/cpu-profile.ts +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/AssetsIntegritiesPlugin.d.ts +0 -8
- package/lib/library/webpack/plugins/AssetsIntegritiesPlugin.d.ts.map +0 -1
- package/lib/library/webpack/plugins/AssetsIntegritiesPlugin.js +0 -29
- package/lib/library/webpack/plugins/AssetsIntegritiesPlugin.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/PurifyStatsPlugin.d.ts +0 -15
- package/lib/library/webpack/plugins/PurifyStatsPlugin.d.ts.map +0 -1
- package/lib/library/webpack/plugins/PurifyStatsPlugin.js +0 -47
- package/lib/library/webpack/plugins/PurifyStatsPlugin.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/analytics.d.ts +0 -156
- package/lib/models/analytics/analytics.d.ts.map +0 -1
- package/lib/models/analytics/analytics.js +0 -259
- package/lib/models/analytics/analytics.js.map +0 -1
- package/lib/models/analytics/analytics.worker.d.ts +0 -5
- package/lib/models/analytics/analytics.worker.d.ts.map +0 -1
- package/lib/models/analytics/analytics.worker.js +0 -87
- package/lib/models/analytics/analytics.worker.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/errors.d.ts +0 -7
- package/lib/utils/errors.d.ts.map +0 -1
- package/lib/utils/errors.js +0 -43
- package/lib/utils/errors.js.map +0 -1
- package/lib/utils/memoryUsage.d.ts +0 -20
- package/lib/utils/memoryUsage.d.ts.map +0 -1
- package/lib/utils/memoryUsage.js +0 -51
- package/lib/utils/memoryUsage.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/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 -264
- package/src/library/babel/plugins/__snapshots__/provider-stack.spec.ts.snap +0 -362
- 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 -46
- 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 -33
- 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/AssetsIntegritiesPlugin.ts +0 -34
- 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/PurifyStatsPlugin.ts +0 -57
- 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/analytics.ts +0 -488
- package/src/models/analytics/analytics.worker.ts +0 -102
- package/src/typings/pwa/index.ts +0 -83
- package/src/utils/errors.ts +0 -39
- package/src/utils/memoryUsage.ts +0 -58
- package/src/utils/sentry.ts +0 -25
|
@@ -2,11 +2,12 @@ import path from 'path';
|
|
|
2
2
|
import type Config from 'webpack-chain';
|
|
3
3
|
import { InjectManifest } from 'workbox-webpack-plugin';
|
|
4
4
|
import fs from 'fs';
|
|
5
|
+
|
|
6
|
+
import { PwaIconsPlugin, WebManifestPlugin, getWorkboxOptions } from '@tramvai/plugin-webpack-pwa';
|
|
7
|
+
|
|
5
8
|
import type { ConfigManager } from '../../../../config/configManager';
|
|
6
9
|
import type { ApplicationConfigEntry } from '../../../../typings/configEntry/application';
|
|
7
10
|
import { safeRequireResolve } from '../../../../utils/safeRequire';
|
|
8
|
-
import { PwaIconsPlugin } from '../../plugins/PwaIconsPlugin';
|
|
9
|
-
import { WebManifestPlugin } from '../../plugins/WebManifestPlugin';
|
|
10
11
|
import { pwaSharedBlock } from './shared';
|
|
11
12
|
|
|
12
13
|
export const pwaBlock =
|
|
@@ -41,68 +42,16 @@ export const pwaBlock =
|
|
|
41
42
|
);
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
// do not forget about revision and possible conflict with modifyURLPrefix
|
|
55
|
-
],
|
|
56
|
-
manifestTransforms: [
|
|
57
|
-
(manifest, compilation: any) => {
|
|
58
|
-
return {
|
|
59
|
-
// we need to have a relative webmanifest url for precaching
|
|
60
|
-
manifest: manifest.map((asset) => {
|
|
61
|
-
const assetName = asset.url.replace(assetsPrefix, '');
|
|
62
|
-
// in development build `publicPath` is localhost, in production is empty string
|
|
63
|
-
const publicPath = compilation.outputOptions?.publicPath || assetsPrefix;
|
|
64
|
-
const assetInfo = compilation.assetsInfo.get(asset.url.replace(publicPath, ''));
|
|
65
|
-
|
|
66
|
-
if (assetInfo?._webmanifestFilename) {
|
|
67
|
-
return {
|
|
68
|
-
...asset,
|
|
69
|
-
url: `${pwa.sw.scope}${assetName}`,
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
return asset;
|
|
73
|
-
}),
|
|
74
|
-
};
|
|
75
|
-
},
|
|
76
|
-
],
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
if (pwa.workbox.include) {
|
|
80
|
-
workboxOptions.include = pwa.workbox.include.map((expr) => new RegExp(expr));
|
|
81
|
-
}
|
|
82
|
-
if (pwa.workbox.exclude) {
|
|
83
|
-
workboxOptions.exclude = [
|
|
84
|
-
...workboxOptions.exclude,
|
|
85
|
-
...pwa.workbox.exclude.map((expr) => new RegExp(expr)),
|
|
86
|
-
];
|
|
87
|
-
}
|
|
88
|
-
if (pwa.workbox.additionalManifestEntries) {
|
|
89
|
-
workboxOptions.additionalManifestEntries = [
|
|
90
|
-
...workboxOptions.additionalManifestEntries,
|
|
91
|
-
...pwa.workbox.additionalManifestEntries,
|
|
92
|
-
];
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
if (env === 'production') {
|
|
96
|
-
workboxOptions.dontCacheBustURLsMatching = /\/\w+?\.[\w\d]+?\.(js|css|gif|png|jpe?g|svg)$/;
|
|
97
|
-
|
|
98
|
-
workboxOptions.modifyURLPrefix = {
|
|
99
|
-
'': assetsPrefix,
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// @todo: break hmr on client when sw.ts is changed - infinity loop !!!
|
|
104
|
-
|
|
105
|
-
const workboxPlugin = new InjectManifest(workboxOptions);
|
|
45
|
+
const workboxPlugin = new InjectManifest(
|
|
46
|
+
getWorkboxOptions({
|
|
47
|
+
swSrc,
|
|
48
|
+
swDest,
|
|
49
|
+
workbox: pwa.workbox,
|
|
50
|
+
mode: env,
|
|
51
|
+
scope: pwa.sw.scope!,
|
|
52
|
+
assetsPrefix: assetsPrefix!,
|
|
53
|
+
})
|
|
54
|
+
);
|
|
106
55
|
|
|
107
56
|
// https://github.com/GoogleChrome/workbox/issues/1790#issuecomment-1241356293
|
|
108
57
|
if (env === 'development') {
|
|
@@ -46,6 +46,7 @@ export default (configManager: ConfigManager) => (config: Config) => {
|
|
|
46
46
|
'appointmentContext',
|
|
47
47
|
path.resolve(rootDir, 'apps/accounts/packages/appointment/dependencies')
|
|
48
48
|
)
|
|
49
|
+
.set('@tramvai/api/virtual/file-system-pages', '@tramvai/cli/lib/external/pages')
|
|
49
50
|
.end()
|
|
50
51
|
.modules.add('node_modules')
|
|
51
52
|
.add(path.resolve(__dirname, '..', '..', '..', '..', 'node_modules'))
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type Config from 'webpack-chain';
|
|
2
2
|
import { ChunkCorrelationPlugin } from '@module-federation/node';
|
|
3
3
|
import LoadablePlugin from '@loadable/webpack-plugin';
|
|
4
|
+
import { PurifyStatsPlugin } from '@tramvai/plugin-webpack-builder';
|
|
4
5
|
|
|
5
6
|
import type { ConfigManager } from '../../../../config/configManager';
|
|
6
7
|
|
|
@@ -9,7 +10,6 @@ import files from '../../blocks/filesClient';
|
|
|
9
10
|
import nodeClient from '../../blocks/nodeClient';
|
|
10
11
|
import postcssAssets from '../../blocks/postcssAssets';
|
|
11
12
|
import type { ChildAppConfigEntry } from '../../../../typings/configEntry/child-app';
|
|
12
|
-
import { purifyStatsPluginFactory } from '../../plugins/PurifyStatsPlugin';
|
|
13
13
|
|
|
14
14
|
const IDENTIFIER_NAME_REPLACE_REGEX = /^([^a-zA-Z$_])/;
|
|
15
15
|
const IDENTIFIER_ALPHA_NUMERIC_NAME_REPLACE_REGEX = /[^a-zA-Z0-9$]+/g;
|
|
@@ -57,7 +57,7 @@ export default (configManager: ConfigManager<ChildAppConfigEntry>) => (config: C
|
|
|
57
57
|
|
|
58
58
|
config
|
|
59
59
|
.plugin('assets-purify-plugin')
|
|
60
|
-
.use(
|
|
60
|
+
.use(PurifyStatsPlugin, [{ fileName: statsFileName, target: 'child-app' }]);
|
|
61
61
|
|
|
62
62
|
config.batch(files(configManager)).batch(nodeClient(configManager));
|
|
63
63
|
};
|
|
@@ -2,11 +2,16 @@ import type Config from 'webpack-chain';
|
|
|
2
2
|
import type webpack from 'webpack';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import crypto from 'crypto';
|
|
5
|
+
|
|
5
6
|
import { UniversalFederationPlugin } from '@module-federation/node';
|
|
6
|
-
import
|
|
7
|
+
import {
|
|
8
|
+
ModuleFederationFixRange,
|
|
9
|
+
ModuleFederationFixRangeOptions,
|
|
10
|
+
PatchAutoPublicPathPlugin,
|
|
11
|
+
} from '@tramvai/plugin-webpack-builder';
|
|
7
12
|
|
|
13
|
+
import common from '../common/main';
|
|
8
14
|
import type { ConfigManager } from '../../../config/configManager';
|
|
9
|
-
|
|
10
15
|
import ts from '../blocks/ts';
|
|
11
16
|
import js from '../blocks/js';
|
|
12
17
|
import css from '../blocks/css';
|
|
@@ -16,10 +21,7 @@ import { getSharedModules } from './moduleFederationShared';
|
|
|
16
21
|
import { configToEnv } from '../blocks/configToEnv';
|
|
17
22
|
import type { ChildAppConfigEntry } from '../../../typings/configEntry/child-app';
|
|
18
23
|
import { extractCssPluginFactory } from '../blocks/extractCssPlugin';
|
|
19
|
-
import type { ModuleFederationFixRangeOptions } from '../plugins/ModuleFederationFixRange';
|
|
20
|
-
import { ModuleFederationFixRange } from '../plugins/ModuleFederationFixRange';
|
|
21
24
|
import { resolveFrameworksPaths } from '../application/client/prod/optimization/splitChunks';
|
|
22
|
-
import { PatchAutoPublicPathPlugin } from '../plugins/AutoPublicPathPlugin';
|
|
23
25
|
|
|
24
26
|
// eslint-disable-next-line max-statements
|
|
25
27
|
export default (configManager: ConfigManager<ChildAppConfigEntry>) => (config: Config) => {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import os from 'os';
|
|
1
2
|
import * as threadLoader from 'thread-loader';
|
|
2
3
|
import { getPool } from 'thread-loader/dist/workerPools';
|
|
3
4
|
import type Config from 'webpack-chain';
|
|
@@ -10,6 +11,24 @@ const getCustomConfig = (configManager: ConfigManager<CliConfigEntry>): any => {
|
|
|
10
11
|
return additionalConfig || {};
|
|
11
12
|
};
|
|
12
13
|
|
|
14
|
+
function calculateNumberOfWorkers() {
|
|
15
|
+
if (
|
|
16
|
+
typeof process.env.TRAMVAI_THREAD_LOADER_WORKERS === 'string' &&
|
|
17
|
+
!Number.isNaN(Number(process.env.TRAMVAI_THREAD_LOADER_WORKERS))
|
|
18
|
+
) {
|
|
19
|
+
return Number(process.env.TRAMVAI_THREAD_LOADER_WORKERS);
|
|
20
|
+
}
|
|
21
|
+
// There are situations when this call will return undefined so
|
|
22
|
+
// we are fallback here to 1.
|
|
23
|
+
// More info on: https://github.com/nodejs/node/issues/19022
|
|
24
|
+
const cpus = os.cpus() || {
|
|
25
|
+
length: 1,
|
|
26
|
+
};
|
|
27
|
+
// for transpilation use a half of the available CPUs per different webpack worker,
|
|
28
|
+
// also leave at least 1 CPUs free (for process itself)
|
|
29
|
+
return Math.max(1, cpus.length - 1);
|
|
30
|
+
}
|
|
31
|
+
|
|
13
32
|
const createWorkerPoolConfig = (configManager: ConfigManager<CliConfigEntry>) => {
|
|
14
33
|
return {
|
|
15
34
|
poolTimeout: configManager.env === 'development' ? Infinity : undefined,
|
|
@@ -18,11 +37,13 @@ const createWorkerPoolConfig = (configManager: ConfigManager<CliConfigEntry>) =>
|
|
|
18
37
|
poolRespawn: configManager.env === 'development',
|
|
19
38
|
...getCustomConfig(configManager),
|
|
20
39
|
name: 'tramvai-worker-pool',
|
|
40
|
+
workers: calculateNumberOfWorkers(),
|
|
21
41
|
};
|
|
22
42
|
};
|
|
23
43
|
|
|
24
44
|
const isApplicable = (configManager: ConfigManager<CliConfigEntry>) => {
|
|
25
45
|
return (
|
|
46
|
+
process.env.TRAMVAI_DISABLE_THREAD_LOADER !== 'true' &&
|
|
26
47
|
// thread-loader uses child_process.fork under the hood, and sometimes (50/50) work in these processes does not get into inspector.Session profile
|
|
27
48
|
!process.env.TRAMVAI_CPU_PROFILE &&
|
|
28
49
|
!process.env.TRAMVAI_DEBUG_BUILD &&
|
|
@@ -3,7 +3,7 @@ import { sync as resolve } from 'resolve';
|
|
|
3
3
|
import envTargets from '@tinkoff/browserslist-config';
|
|
4
4
|
import browserslist from 'browserslist';
|
|
5
5
|
import type { ConfigManager } from '../../../config/configManager';
|
|
6
|
-
import {
|
|
6
|
+
import { swcConfigFactory } from '../../swc';
|
|
7
7
|
import { babelConfigFactory } from '../../babel';
|
|
8
8
|
import type { Env } from '../../../typings/Env';
|
|
9
9
|
import type { Target } from '../../../typings/target';
|
|
@@ -55,7 +55,7 @@ Please run "npx tramvai add --dev @tramvai/swc-integration" to fix the problem
|
|
|
55
55
|
`);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
return rule.loader('swc-loader').options(
|
|
58
|
+
return rule.loader('swc-loader').options(swcConfigFactory(transpilerConfig)).end();
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
if (loader === 'babel') {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FeaturesProperties, ProjectProperties } from '
|
|
1
|
+
import { FeaturesProperties, ProjectProperties } from '@tramvai/api/lib/services/analytics';
|
|
2
2
|
import { ConfigEntry } from '../../typings/configEntry/common';
|
|
3
3
|
import { ConfigManager } from '../config';
|
|
4
4
|
import { ApplicationConfigEntry, ChildAppConfigEntry } from '../../api';
|
|
@@ -42,11 +42,12 @@ export function getProjectProperties({
|
|
|
42
42
|
return projectCache[projectName];
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
// eslint-disable-next-line max-statements
|
|
45
46
|
export function getFeaturesProperties({
|
|
46
47
|
parameters,
|
|
47
48
|
configManager,
|
|
48
49
|
}: {
|
|
49
|
-
parameters: { target?: string };
|
|
50
|
+
parameters: { target?: string; experimentalWebpackWorkerThreads?: boolean };
|
|
50
51
|
configManager: ConfigManager;
|
|
51
52
|
}): FeaturesProperties {
|
|
52
53
|
const projectName = parameters.target ?? 'unknown';
|
|
@@ -100,6 +101,9 @@ export function getFeaturesProperties({
|
|
|
100
101
|
applicationProject.experiments?.viewTransitions ||
|
|
101
102
|
applicationProject.experiments?.reactTransitions
|
|
102
103
|
) ?? false;
|
|
104
|
+
|
|
105
|
+
featuresCache[projectName].experimentalWebpackWorkerThreads =
|
|
106
|
+
parameters.experimentalWebpackWorkerThreads;
|
|
103
107
|
}
|
|
104
108
|
|
|
105
109
|
if (project.type === 'child-app') {
|
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,7 +65,6 @@ export abstract class CLICommand<
|
|
|
65
65
|
});
|
|
66
66
|
|
|
67
67
|
await this.validator(parameters);
|
|
68
|
-
|
|
69
68
|
return this.action(parameters);
|
|
70
69
|
}
|
|
71
70
|
|
|
@@ -74,7 +73,7 @@ export abstract class CLICommand<
|
|
|
74
73
|
return;
|
|
75
74
|
}
|
|
76
75
|
|
|
77
|
-
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)));
|
|
78
77
|
|
|
79
78
|
result.forEach((item) => {
|
|
80
79
|
if (item.message) {
|
package/src/models/context.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
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 { AnalyticsService } from './analytics/analytics';
|
|
7
7
|
|
|
8
8
|
export class Context {
|
|
9
9
|
constructor(
|
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),
|
|
@@ -40,5 +40,3 @@ export class Logger {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
export const logger = new Logger();
|
|
@@ -1289,23 +1289,23 @@
|
|
|
1289
1289
|
"dotAll": {
|
|
1290
1290
|
"type": "boolean"
|
|
1291
1291
|
},
|
|
1292
|
-
"__@match@
|
|
1292
|
+
"__@match@8914": {
|
|
1293
1293
|
"type": "object",
|
|
1294
1294
|
"additionalProperties": false
|
|
1295
1295
|
},
|
|
1296
|
-
"__@replace@
|
|
1296
|
+
"__@replace@8916": {
|
|
1297
1297
|
"type": "object",
|
|
1298
1298
|
"additionalProperties": false
|
|
1299
1299
|
},
|
|
1300
|
-
"__@search@
|
|
1300
|
+
"__@search@8919": {
|
|
1301
1301
|
"type": "object",
|
|
1302
1302
|
"additionalProperties": false
|
|
1303
1303
|
},
|
|
1304
|
-
"__@split@
|
|
1304
|
+
"__@split@8921": {
|
|
1305
1305
|
"type": "object",
|
|
1306
1306
|
"additionalProperties": false
|
|
1307
1307
|
},
|
|
1308
|
-
"__@matchAll@
|
|
1308
|
+
"__@matchAll@8923": {
|
|
1309
1309
|
"type": "object",
|
|
1310
1310
|
"additionalProperties": false
|
|
1311
1311
|
}
|
|
@@ -2084,23 +2084,23 @@
|
|
|
2084
2084
|
"dotAll": {
|
|
2085
2085
|
"type": "boolean"
|
|
2086
2086
|
},
|
|
2087
|
-
"__@match@
|
|
2087
|
+
"__@match@8914": {
|
|
2088
2088
|
"type": "object",
|
|
2089
2089
|
"additionalProperties": false
|
|
2090
2090
|
},
|
|
2091
|
-
"__@replace@
|
|
2091
|
+
"__@replace@8916": {
|
|
2092
2092
|
"type": "object",
|
|
2093
2093
|
"additionalProperties": false
|
|
2094
2094
|
},
|
|
2095
|
-
"__@search@
|
|
2095
|
+
"__@search@8919": {
|
|
2096
2096
|
"type": "object",
|
|
2097
2097
|
"additionalProperties": false
|
|
2098
2098
|
},
|
|
2099
|
-
"__@split@
|
|
2099
|
+
"__@split@8921": {
|
|
2100
2100
|
"type": "object",
|
|
2101
2101
|
"additionalProperties": false
|
|
2102
2102
|
},
|
|
2103
|
-
"__@matchAll@
|
|
2103
|
+
"__@matchAll@8923": {
|
|
2104
2104
|
"type": "object",
|
|
2105
2105
|
"additionalProperties": false
|
|
2106
2106
|
}
|
|
@@ -2879,23 +2879,23 @@
|
|
|
2879
2879
|
"dotAll": {
|
|
2880
2880
|
"type": "boolean"
|
|
2881
2881
|
},
|
|
2882
|
-
"__@match@
|
|
2882
|
+
"__@match@8914": {
|
|
2883
2883
|
"type": "object",
|
|
2884
2884
|
"additionalProperties": false
|
|
2885
2885
|
},
|
|
2886
|
-
"__@replace@
|
|
2886
|
+
"__@replace@8916": {
|
|
2887
2887
|
"type": "object",
|
|
2888
2888
|
"additionalProperties": false
|
|
2889
2889
|
},
|
|
2890
|
-
"__@search@
|
|
2890
|
+
"__@search@8919": {
|
|
2891
2891
|
"type": "object",
|
|
2892
2892
|
"additionalProperties": false
|
|
2893
2893
|
},
|
|
2894
|
-
"__@split@
|
|
2894
|
+
"__@split@8921": {
|
|
2895
2895
|
"type": "object",
|
|
2896
2896
|
"additionalProperties": false
|
|
2897
2897
|
},
|
|
2898
|
-
"__@matchAll@
|
|
2898
|
+
"__@matchAll@8923": {
|
|
2899
2899
|
"type": "object",
|
|
2900
2900
|
"additionalProperties": false
|
|
2901
2901
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
// eslint-disable-next-line no-restricted-imports
|
|
2
2
|
import type { ForkTsCheckerWebpackPluginOptions } from 'fork-ts-checker-webpack-plugin/lib/plugin-options';
|
|
3
3
|
import type { ManifestEntry } from 'workbox-build';
|
|
4
|
-
import type {
|
|
4
|
+
import type {
|
|
5
|
+
PwaIconOptions,
|
|
6
|
+
PwaMetaOptions,
|
|
7
|
+
WebManifestOptions,
|
|
8
|
+
} from '@tramvai/plugin-webpack-pwa';
|
|
5
9
|
import type { CliConfigEntry, Experiments } from './cli';
|
|
6
10
|
import type { OverridableOption } from './common';
|
|
7
11
|
|
package/src/typings/public.ts
CHANGED
package/src/utils/cpu-profile.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-token-pure.d.ts","sourceRoot":"","sources":["../../../../src/library/babel/plugins/create-token-pure.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,UAAU,UAAU;IAClB,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,UAAU,CAqCpD,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createTokenPurePlugin = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const helper_annotate_as_pure_1 = tslib_1.__importDefault(require("@babel/helper-annotate-as-pure"));
|
|
6
|
-
const createTokenPurePlugin = ({ types: t }) => {
|
|
7
|
-
return {
|
|
8
|
-
pre() {
|
|
9
|
-
this.hasCreateToken = false;
|
|
10
|
-
},
|
|
11
|
-
visitor: {
|
|
12
|
-
ImportDeclaration(path) {
|
|
13
|
-
if (this.hasCreateToken) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
const { node } = path;
|
|
17
|
-
const sourceValue = node.source.value;
|
|
18
|
-
if (sourceValue === '@tramvai/core' || sourceValue === '@tinkoff/dippy') {
|
|
19
|
-
this.hasCreateToken = node.specifiers.some((s) => s.type === 'ImportSpecifier' && s.local?.name === 'createToken');
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
CallExpression(path) {
|
|
23
|
-
const { node } = path;
|
|
24
|
-
if (!this.hasCreateToken) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
const { callee } = node;
|
|
28
|
-
if (callee?.type === 'Identifier') {
|
|
29
|
-
if (callee?.name === 'createToken') {
|
|
30
|
-
(0, helper_annotate_as_pure_1.default)(path);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
exports.createTokenPurePlugin = createTokenPurePlugin;
|
|
38
|
-
exports.default = exports.createTokenPurePlugin;
|
|
39
|
-
//# sourceMappingURL=create-token-pure.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-token-pure.js","sourceRoot":"","sources":["../../../../src/library/babel/plugins/create-token-pure.ts"],"names":[],"mappings":";;;;AAAA,qGAA4D;AAOrD,MAAM,qBAAqB,GAAuB,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE;IACxE,OAAO;QACL,GAAG;YACD,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAC9B,CAAC;QACD,OAAO,EAAE;YACP,iBAAiB,CAAC,IAAI;gBACpB,IAAI,IAAI,CAAC,cAAc,EAAE;oBACvB,OAAO;iBACR;gBAED,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;gBACtB,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;gBAEtC,IAAI,WAAW,KAAK,eAAe,IAAI,WAAW,KAAK,gBAAgB,EAAE;oBACvE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CACxC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,iBAAiB,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,KAAK,aAAa,CACvE,CAAC;iBACH;YACH,CAAC;YACD,cAAc,CAAC,IAAI;gBACjB,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;gBAEtB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;oBACxB,OAAO;iBACR;gBAED,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;gBAExB,IAAI,MAAM,EAAE,IAAI,KAAK,YAAY,EAAE;oBACjC,IAAI,MAAM,EAAE,IAAI,KAAK,aAAa,EAAE;wBAClC,IAAA,iCAAc,EAAC,IAAI,CAAC,CAAC;qBACtB;iBACF;YACH,CAAC;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AArCW,QAAA,qBAAqB,yBAqChC;AAEF,kBAAe,6BAAqB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fill-action-name.d.ts","sourceRoot":"","sources":["../../../../src/library/babel/plugins/fill-action-name.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,iBAAiB,QAAiC,CAAC;AACzD,QAAA,MAAM,SAAS,QAAiC,CAAC"}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
const actionOrServiceRe = /[\\/](actions|services)[\\/]/;
|
|
2
|
-
const contextRe = /[\\/](Client)?Context.[jt]s$/;
|
|
3
|
-
/** @deprecated */
|
|
4
|
-
module.exports = function plugin({ types }) {
|
|
5
|
-
function getAssignStatement(node) {
|
|
6
|
-
if (!node || !node.name) {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
return types.expressionStatement(types.assignmentExpression('=', types.memberExpression(types.identifier(node.name), types.identifier('i')), types.stringLiteral(node.name)));
|
|
10
|
-
}
|
|
11
|
-
function fillAllowed(node) {
|
|
12
|
-
const allowed = !node.alreadyFilled;
|
|
13
|
-
// eslint-disable-next-line no-param-reassign
|
|
14
|
-
node.alreadyFilled = true;
|
|
15
|
-
return allowed;
|
|
16
|
-
}
|
|
17
|
-
function fillNameBefore(parent, node) {
|
|
18
|
-
const statement = getAssignStatement(node);
|
|
19
|
-
if (statement && fillAllowed(node)) {
|
|
20
|
-
parent.insertBefore(statement);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
function fillNameAfter(parent, node) {
|
|
24
|
-
const statement = getAssignStatement(node);
|
|
25
|
-
if (statement && fillAllowed(node)) {
|
|
26
|
-
parent.insertAfter(statement);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
function isActionOrService(state) {
|
|
30
|
-
if (process.env.TEST)
|
|
31
|
-
return true;
|
|
32
|
-
const { filename } = state.file.opts;
|
|
33
|
-
return actionOrServiceRe.test(filename);
|
|
34
|
-
}
|
|
35
|
-
function findTopStatementPath(path) {
|
|
36
|
-
// eslint-disable-next-line no-param-reassign
|
|
37
|
-
while (path.parentPath.type !== 'Program')
|
|
38
|
-
path = path.parentPath;
|
|
39
|
-
return path;
|
|
40
|
-
}
|
|
41
|
-
function fillNameForNode(statementPath, node) {
|
|
42
|
-
if (node.type === 'FunctionDeclaration') {
|
|
43
|
-
fillNameAfter(statementPath, node.id);
|
|
44
|
-
}
|
|
45
|
-
else if (node.type === 'VariableDeclaration') {
|
|
46
|
-
node.declarations.forEach((declarator) => {
|
|
47
|
-
if (types.isFunction(declarator.init)) {
|
|
48
|
-
fillNameAfter(statementPath, declarator.id);
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
else if (node.type === 'VariableDeclarator') {
|
|
53
|
-
if (types.isFunction(node.init)) {
|
|
54
|
-
fillNameAfter(statementPath, node.id);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return {
|
|
59
|
-
visitor: {
|
|
60
|
-
ExportNamedDeclaration: {
|
|
61
|
-
exit(path, state) {
|
|
62
|
-
if (!isActionOrService(state))
|
|
63
|
-
return;
|
|
64
|
-
const { node } = path;
|
|
65
|
-
if (node.declaration) {
|
|
66
|
-
fillNameForNode(path, node.declaration);
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
ExportDefaultDeclaration: {
|
|
71
|
-
exit(path, state) {
|
|
72
|
-
if (!isActionOrService(state))
|
|
73
|
-
return;
|
|
74
|
-
const { declaration } = path.node;
|
|
75
|
-
if (declaration.type === 'Identifier') {
|
|
76
|
-
const binding = path.scope.getBinding(declaration.name);
|
|
77
|
-
if (binding) {
|
|
78
|
-
fillNameForNode(findTopStatementPath(binding.path), binding.path.node);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
if (declaration.type === 'FunctionDeclaration') {
|
|
82
|
-
fillNameAfter(path, declaration.id);
|
|
83
|
-
}
|
|
84
|
-
if (declaration.type === 'CallExpression') {
|
|
85
|
-
fillNameBefore(path, declaration.arguments[0]);
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
Program: {
|
|
90
|
-
exit(path, state) {
|
|
91
|
-
const { filename } = state.file.opts;
|
|
92
|
-
if (!contextRe.test(filename)) {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
path.traverse({
|
|
96
|
-
Identifier(idPath) {
|
|
97
|
-
if (idPath.node.name === 'name' && idPath.parent.type === 'MemberExpression') {
|
|
98
|
-
idPath.replaceWith(types.identifier('i'));
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
});
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
//# sourceMappingURL=fill-action-name.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fill-action-name.js","sourceRoot":"","sources":["../../../../src/library/babel/plugins/fill-action-name.ts"],"names":[],"mappings":"AAAA,MAAM,iBAAiB,G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C,GAAG,CAAC,CAAC,CAAC;6BAC3C;wBACH,CAAC;qBACF,CAAC,CAAC;gBACL,CAAC;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fill-declare-action-name.d.ts","sourceRoot":"","sources":["../../../../src/library/babel/plugins/fill-declare-action-name.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAUxC,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC;IAAE,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAiG9E,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|