@zohodesk/react-cli 1.1.28 → 1.1.29-exp.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -18
- package/lib/babel/babel-option-utils/babel-preset-react-option.js +0 -3
- package/lib/babel/cmjs-plugins-presets.js +1 -8
- package/lib/babel/es-plugins-presets.js +1 -8
- package/lib/common/buildEs.js +1 -0
- package/lib/common/getEntries.js +2 -13
- package/lib/common/getPublicPathConfig.js +0 -6
- package/lib/common/index.js +1 -6
- package/lib/common/runPreProcess.js +6 -15
- package/lib/common/splitChunks.js +2 -21
- package/lib/common/sslcertUpdater.js +7 -18
- package/lib/common/templateParameters.js +0 -2
- package/lib/common/testPattern.js +10 -21
- package/lib/common/valueReplacer.js +1 -16
- package/lib/configs/jest.config.js +2 -11
- package/lib/configs/libAlias.js +10 -16
- package/lib/configs/resolvers.js +6 -16
- package/lib/configs/webpack.component.umd.config.js +1 -6
- package/lib/configs/webpack.css.umd.config.js +6 -14
- package/lib/configs/webpack.dev.config.js +1 -14
- package/lib/configs/webpack.docs.config.js +1 -9
- package/lib/configs/webpack.impact.config.js +1 -8
- package/lib/configs/webpack.prod.config.js +4 -17
- package/lib/constants.js +9 -18
- package/lib/deprecationLogger.js +0 -7
- package/lib/hooks/docsProptypeHook.js +4 -8
- package/lib/jest/commitedFilesResult.js +4 -46
- package/lib/jest/coverageCollector.js +1 -12
- package/lib/jest/jsonMaker.js +0 -6
- package/lib/jest/preProcessors/cssPreprocessor.js +1 -9
- package/lib/jest/preProcessors/jsPreprocessor.js +1 -6
- package/lib/jest/preProcessors/otherFilesPreprocessor.js +1 -4
- package/lib/jest/result.js +1 -23
- package/lib/jest/run.js +7 -18
- package/lib/jest/setup.js +8 -60
- package/lib/loaderUtils/configsAssetsLoaders.js +2 -12
- package/lib/loaderUtils/getCSSLoaders.js +10 -22
- package/lib/loaderUtils/getDevJsLoaders.js +4 -13
- package/lib/loaderUtils/index.js +1 -4
- package/lib/loaderUtils/tests/windowsModification.test.js +0 -1
- package/lib/loaderUtils/windowsModification.js +2 -3
- package/lib/loaders/__test__/markdownLoader.spec.js +0 -1
- package/lib/loaders/composeLoader.js +13 -37
- package/lib/loaders/docsLoader.js +1 -12
- package/lib/loaders/docsPropsLoader.js +4 -8
- package/lib/loaders/enhancedReactLiveConverter.js +2 -23
- package/lib/loaders/fileBountryLoader.js +1 -3
- package/lib/loaders/fileLoader.js +12 -23
- package/lib/loaders/markdownLoader.js +14 -19
- package/lib/loaders/reactLiveConvertor.js +5 -15
- package/lib/loaders/scriptInstrumentLoader.js +7 -16
- package/lib/loaders/selectorMappingLoader.js +7 -26
- package/lib/loaders/workerLoader.js +9 -24
- package/lib/logger.js +0 -4
- package/lib/middlewares/HMRMiddleware.js +13 -27
- package/lib/middlewares/SSTMiddleware.js +1 -5
- package/lib/pluginUtils/configHtmlWebpackPlugins.js +1 -24
- package/lib/pluginUtils/getDevPlugins.js +9 -42
- package/lib/pluginUtils/getDocsPlugins.js +3 -13
- package/lib/pluginUtils/getLibraryImactPlugins.js +5 -6
- package/lib/pluginUtils/getLibraryPlugins.js +2 -8
- package/lib/pluginUtils/getProdPlugins.js +8 -47
- package/lib/pluginUtils/getServerPlugins.js +2 -8
- package/lib/pluginUtils/getUMDCSSPlugins.js +2 -10
- package/lib/pluginUtils/getUMDComponentPlugins.js +2 -10
- package/lib/pluginUtils/index.js +1 -9
- package/lib/plugins/CdnChangePlugin.js +2 -18
- package/lib/plugins/CleanupStatsPlugin.js +0 -5
- package/lib/plugins/CssOrderControlPlugin.js +3 -6
- package/lib/plugins/CustomAttributePlugin.js +14 -19
- package/lib/plugins/CustomScriptLoadingStrategyPlugin.js +3 -23
- package/lib/plugins/EFCPlugin.js +20 -34
- package/lib/plugins/EFCTemplatePlugin.js +19 -30
- package/lib/plugins/EfcResourceCleanupPlugin.js +0 -3
- package/lib/plugins/EventsHandlingPlugin.js +2 -4
- package/lib/plugins/I18NInjectIntoIndexPlugin.js +14 -37
- package/lib/plugins/I18nSplitPlugin/I18nDebugPlugin.js +10 -15
- package/lib/plugins/I18nSplitPlugin/I18nDependency.js +4 -10
- package/lib/plugins/I18nSplitPlugin/I18nDownlodLogic.js +78 -155
- package/lib/plugins/I18nSplitPlugin/I18nFilesEmitter.js +198 -81
- package/lib/plugins/I18nSplitPlugin/I18nKeysIdentifer.js +12 -23
- package/lib/plugins/I18nSplitPlugin/index.js +13 -24
- package/lib/plugins/I18nSplitPlugin/utils/applyMetaManifest.js +279 -0
- package/lib/plugins/I18nSplitPlugin/utils/collectI18nKeys.js +2 -12
- package/lib/plugins/I18nSplitPlugin/utils/createMetaManifest.js +51 -0
- package/lib/plugins/I18nSplitPlugin/utils/createRegularManifest.js +48 -0
- package/lib/plugins/I18nSplitPlugin/utils/getI18nFileUrlPathTemplate.js +0 -1
- package/lib/plugins/I18nSplitPlugin/utils/getI18nKeysFormModules.js +0 -5
- package/lib/plugins/I18nSplitPlugin/utils/hashUtils.js +1 -8
- package/lib/plugins/I18nSplitPlugin/utils/index.js +0 -4
- package/lib/plugins/I18nSplitPlugin/utils/propertiesUtils.js +0 -20
- package/lib/plugins/I18nSplitPlugin/utils/unicodeConversion.js +0 -1
- package/lib/plugins/ManifestPlugin.js +1 -18
- package/lib/plugins/MinifyPlugin.js +1 -10
- package/lib/plugins/ModuleStatsPlugin.js +1 -24
- package/lib/plugins/OptimizeJSPlugin.js +2 -10
- package/lib/plugins/PublicPathCallbackPlugin.js +1 -12
- package/lib/plugins/PublicPathChangePlugin.js +6 -39
- package/lib/plugins/ReportGeneratePlugin.js +5 -32
- package/lib/plugins/RequireVariablePublicPlugin.js +1 -8
- package/lib/plugins/ResourceHintsPlugin.js +4 -13
- package/lib/plugins/RtlSplitPlugin/OverwriteCssPathForRTL.js +12 -17
- package/lib/plugins/RtlSplitPlugin/RtlCssPlugin.js +10 -17
- package/lib/plugins/RtlSplitPlugin/replaceCssDirTemplate.js +2 -5
- package/lib/plugins/ScriptInstrumentPlugin.js +1 -8
- package/lib/plugins/SelectorPlugin.js +6 -32
- package/lib/plugins/ServiceWorkerPlugin.js +5 -22
- package/lib/plugins/ShadowDOMSupportPlugin.js +4 -41
- package/lib/plugins/SourceMapHookPlugin.js +2 -12
- package/lib/plugins/StatsPlugin.js +0 -14
- package/lib/plugins/TPHashMappingPlugin.js +3 -18
- package/lib/plugins/UnusedFilesFindPlugin.js +4 -39
- package/lib/plugins/VariableConversionCollector.js +15 -42
- package/lib/plugins/index.js +1 -20
- package/lib/plugins/libraryImpactPlugin.js +1 -33
- package/lib/plugins/newi18nsplitplugin/18nPlugin1.js +306 -0
- package/lib/plugins/newi18nsplitplugin/18nPlugin2.js +363 -0
- package/lib/plugins/newi18nsplitplugin/18nPlugin3.js +694 -0
- package/lib/plugins/newi18nsplitplugin/18nPlugin_hashed.js +1258 -0
- package/lib/plugins/newi18nsplitplugin/18nPlugin_working.js +542 -0
- package/lib/plugins/newi18nsplitplugin/18nplugin.js +974 -0
- package/lib/plugins/newi18nsplitplugin/ChunkManager.js +131 -0
- package/lib/plugins/newi18nsplitplugin/GenerateModuleIdToKeysMapPlugin.js +59 -0
- package/lib/plugins/newi18nsplitplugin/I18nDiffPlugin.js +262 -0
- package/lib/plugins/newi18nsplitplugin/I18nDownloadLogic.js +166 -0
- package/lib/plugins/newi18nsplitplugin/I18nPropertiesPlugin.js +111 -0
- package/lib/plugins/newi18nsplitplugin/KeyCollector.js +163 -0
- package/lib/plugins/newi18nsplitplugin/ManifestGenerator.js +88 -0
- package/lib/plugins/newi18nsplitplugin/UnicodeConversionPlugin.js +101 -0
- package/lib/plugins/newi18nsplitplugin/constants.js +162 -0
- package/lib/plugins/newi18nsplitplugin/utils/I18nKeyHasher.js +78 -0
- package/lib/plugins/newi18nsplitplugin/utils/getJsResourceKeys.js +22 -0
- package/lib/plugins/newi18nsplitplugin/utils/i18nChunkUtils.js +18 -0
- package/lib/plugins/newi18nsplitplugin/utils/manifestGenerator.js +580 -0
- package/lib/plugins/newi18nsplitplugin/utils/propertiesUtils.js +54 -0
- package/lib/plugins/utils/classHandling.js +0 -6
- package/lib/plugins/utils/fileHandling.js +6 -15
- package/lib/plugins/utils/tests/fileHandling.test.js +0 -4
- package/lib/plugins/variableConvertorUtils.js +14 -29
- package/lib/plugins/webpackwatchrunplugin.js +0 -5
- package/lib/postcss-plugins/EmptyPlugin.js +3 -4
- package/lib/postcss-plugins/ExcludePlugin.js +1 -5
- package/lib/postcss-plugins/IncludePlugin.js +1 -5
- package/lib/postcss-plugins/RTLSplitPlugin.js +14 -27
- package/lib/postcss-plugins/SelectorReplace.js +1 -16
- package/lib/postcss-plugins/ValueReplacer.js +7 -6
- package/lib/postcss-plugins/__test__/hoverActivePlugin.spec.js +0 -3
- package/lib/postcss-plugins/__test__/selectorReplace.test.js +6 -3
- package/lib/postcss-plugins/__test__/valueReplacer.spec.js +2 -5
- package/lib/postcss-plugins/hoverActivePlugin.js +31 -67
- package/lib/postcss-plugins/variableModificationPlugin/ErrorHandler.js +0 -7
- package/lib/postcss-plugins/variableModificationPlugin/index.js +28 -49
- package/lib/schemas/index.js +3 -10
- package/lib/servers/clusterHubServer.js +1 -11
- package/lib/servers/devBuild.js +14 -26
- package/lib/servers/docsServer.js +1 -3
- package/lib/servers/docsServerCore.js +1 -22
- package/lib/servers/getCliPath.js +0 -9
- package/lib/servers/helpServer.js +1 -6
- package/lib/servers/httpsOptions.js +2 -8
- package/lib/servers/impactServer.js +3 -35
- package/lib/servers/mockserver.js +1 -10
- package/lib/servers/nowatchserver.js +12 -37
- package/lib/servers/requireLocalOrGlobal.js +6 -17
- package/lib/servers/scrServer.js +14 -21
- package/lib/servers/server.js +6 -36
- package/lib/servers/ssServer.js +1 -17
- package/lib/templates/CoverageScriptTemplate.js +0 -14
- package/lib/templates/WMSTemplate.js +7 -13
- package/lib/templates/linterConstant.js +2 -4
- package/lib/utils/babelPresets.js +3 -7
- package/lib/utils/clean.js +3 -9
- package/lib/utils/copy.js +1 -7
- package/lib/utils/copyTimezones.js +1 -9
- package/lib/utils/createEventStream.js +1 -6
- package/lib/utils/cssClassNameGenerate.js +10 -30
- package/lib/utils/cssURLReplacer.js +1 -22
- package/lib/utils/dependencyPostPublish.js +1 -10
- package/lib/utils/deprecationSupport.js +7 -32
- package/lib/utils/fileUtils.js +1 -28
- package/lib/utils/folderIterator.js +2 -13
- package/lib/utils/getComponents.js +0 -21
- package/lib/utils/getCurrentBranch.js +0 -5
- package/lib/utils/getDependenciesImpactList.js +1 -22
- package/lib/utils/getFileType.js +2 -10
- package/lib/utils/getHash.js +1 -8
- package/lib/utils/getIp.js +0 -2
- package/lib/utils/getOptions.js +16 -53
- package/lib/utils/getServerURL.js +1 -10
- package/lib/utils/index.js +4 -51
- package/lib/utils/init.js +0 -1
- package/lib/utils/initPreCommitHook.js +7 -30
- package/lib/utils/jsonHelper.js +3 -22
- package/lib/utils/libraryImpactConfig.js +2 -5
- package/lib/utils/lint/addScripts.js +2 -5
- package/lib/utils/lint/checkExistingConfig.js +3 -12
- package/lib/utils/lint/copyConfigs.js +0 -3
- package/lib/utils/lint/index.js +0 -9
- package/lib/utils/lint/lintScripts.js +0 -1
- package/lib/utils/lint/lintSetup.js +3 -4
- package/lib/utils/lint/lintStagedPreCommitHook.js +0 -1
- package/lib/utils/lint/question.js +0 -7
- package/lib/utils/lintReporter.js +0 -20
- package/lib/utils/log.js +0 -1
- package/lib/utils/mailSender.js +1 -8
- package/lib/utils/object-manipulation.js +1 -17
- package/lib/utils/pullOrigin.js +0 -4
- package/lib/utils/reinstallDependencies.js +1 -29
- package/lib/utils/removeAttributes.js +1 -8
- package/lib/utils/repoClone.js +3 -28
- package/lib/utils/request.js +0 -12
- package/lib/utils/rtl.js +5 -17
- package/lib/utils/selectorReplacer.js +10 -16
- package/lib/utils/setEnvVariables.js +0 -2
- package/lib/utils/ssTestHack.js +1 -11
- package/lib/utils/switchBranch.js +0 -5
- package/lib/utils/typeCheck.js +0 -1
- package/lib/utils/urlConcat.js +0 -4
- package/lib/utils/useExitCleanup.js +9 -10
- package/lib/utils/variableConverter.js +22 -31
- package/{npm-shrinkwrap.json → package-lock.json} +2098 -1999
- package/package.json +1 -1
- package/packages/client_build_tool/lib/allCommandsConfigs.js +0 -25
- package/packages/client_build_tool/lib/commands/build/commandExecutor.js +0 -17
- package/packages/client_build_tool/lib/commands/build/config.js +0 -12
- package/packages/client_build_tool/lib/commands/build/optionsProcessor.js +0 -35
- package/packages/client_build_tool/lib/commands/build/preProcessor.js +0 -12
- package/packages/client_build_tool/lib/commands/buildEs/commandExecutor.js +0 -33
- package/packages/client_build_tool/lib/commands/buildEs/config.js +0 -12
- package/packages/client_build_tool/lib/commands/buildEs/preProcessor.js +0 -17
- package/packages/client_build_tool/lib/commands/buildLib/commandExecutor.js +0 -33
- package/packages/client_build_tool/lib/commands/buildLib/config.js +0 -12
- package/packages/client_build_tool/lib/commands/buildLib/preProcessor.js +0 -17
- package/packages/client_build_tool/lib/commands/mockserver/commandExecutor.js +0 -43
- package/packages/client_build_tool/lib/commands/mockserver/config.js +0 -12
- package/packages/client_build_tool/lib/commands/pre_process/commandExecutor.js +0 -18
- package/packages/client_build_tool/lib/commands/pre_process/config.js +0 -12
- package/packages/client_build_tool/lib/commands/start/commandExecutor.js +0 -12
- package/packages/client_build_tool/lib/commands/start/config.js +0 -12
- package/packages/client_build_tool/lib/commands/start/optionsProcessor.js +0 -30
- package/packages/client_build_tool/lib/commands/start/preProcessor.js +0 -12
- package/packages/client_build_tool/lib/commands/template/commandExecutor.js +0 -28
- package/packages/client_build_tool/lib/commands/template/config.js +0 -12
- package/packages/client_build_tool/lib/commands/version/commandExecutor.js +0 -14
- package/packages/client_build_tool/lib/commands/version/config.js +0 -12
- package/packages/client_build_tool/lib/commandsRouter.js +0 -74
- package/packages/client_build_tool/lib/index.js +0 -12
- package/packages/client_build_tool/lib/logger.js +0 -34
- package/packages/client_build_tool/lib/schemas/applyValuesToSchema/__test__/otherTestCases.test.js +0 -234
- package/packages/client_build_tool/lib/schemas/applyValuesToSchema/__test__/passingDifferentDataTypesToSchema.test.js +0 -103
- package/packages/client_build_tool/lib/schemas/applyValuesToSchema/__test__/passingEmptyObjects.test.js +0 -41
- package/packages/client_build_tool/lib/schemas/applyValuesToSchema/__test__/replacingSchemaValueByCustomOptions/convertArray.test.js +0 -68
- package/packages/client_build_tool/lib/schemas/applyValuesToSchema/__test__/replacingSchemaValueByCustomOptions/convertNumber.test.js +0 -68
- package/packages/client_build_tool/lib/schemas/applyValuesToSchema/__test__/replacingSchemaValueByCustomOptions/convertObject.test.js +0 -141
- package/packages/client_build_tool/lib/schemas/applyValuesToSchema/__test__/replacingSchemaValueByCustomOptions/convertString.test.js +0 -68
- package/packages/client_build_tool/lib/schemas/applyValuesToSchema/__test__/replacingSchemaValueByCustomOptions/convertUndefinedAndNull.test.js +0 -132
- package/packages/client_build_tool/lib/schemas/applyValuesToSchema/__test__/replacingSchemaValueByProcessEnv/convertArray.test.js +0 -71
- package/packages/client_build_tool/lib/schemas/applyValuesToSchema/__test__/replacingSchemaValueByProcessEnv/convertNumber.test.js +0 -71
- package/packages/client_build_tool/lib/schemas/applyValuesToSchema/__test__/replacingSchemaValueByProcessEnv/convertObject.test.js +0 -73
- package/packages/client_build_tool/lib/schemas/applyValuesToSchema/__test__/replacingSchemaValueByProcessEnv/convertString.test.js +0 -71
- package/packages/client_build_tool/lib/schemas/applyValuesToSchema/__test__/replacingSchemaValueByProcessEnv/convertUndefinedAndNull.test.js +0 -138
- package/packages/client_build_tool/lib/schemas/applyValuesToSchema/index.js +0 -34
- package/packages/client_build_tool/lib/schemas/applyValuesToSchema/isObject.js +0 -10
- package/packages/client_build_tool/lib/schemas/applyValuesToSchema/isValid.js +0 -14
- package/packages/client_build_tool/lib/schemas/cliArgsToObject.js +0 -39
- package/packages/client_build_tool/lib/schemas/defaultConfigValues.js +0 -349
- package/packages/client_build_tool/lib/schemas/defaultConfigValuesOnly.js +0 -187
- package/packages/client_build_tool/lib/schemas/deprecatedOptionsHandler.js +0 -67
- package/packages/client_build_tool/lib/schemas/getNpmVersion.js +0 -22
- package/packages/client_build_tool/lib/schemas/giveDefaultValue.js +0 -18
- package/packages/client_build_tool/lib/schemas/npmConfigToObject.js +0 -35
- package/packages/client_build_tool/lib/schemas/readOptions.js +0 -54
- package/packages/client_build_tool/lib/schemas/readOptionsForConfigFile.js +0 -42
- package/packages/client_build_tool/lib/shared/babel/__test__/es2015/Map.test.js +0 -15
- package/packages/client_build_tool/lib/shared/babel/__test__/es2015/MathAndNumberMethod.test.js +0 -30
- package/packages/client_build_tool/lib/shared/babel/__test__/es2015/ObjectAndModules.test.js +0 -47
- package/packages/client_build_tool/lib/shared/babel/__test__/es2015/Sets.test.js +0 -18
- package/packages/client_build_tool/lib/shared/babel/__test__/es2015/Symbol.test.js +0 -25
- package/packages/client_build_tool/lib/shared/babel/__test__/es2015/arrowFunction.test.js +0 -34
- package/packages/client_build_tool/lib/shared/babel/__test__/es2015/block-scoping.test.js +0 -18
- package/packages/client_build_tool/lib/shared/babel/__test__/es2015/classes.test.js +0 -55
- package/packages/client_build_tool/lib/shared/babel/__test__/es2015/defaultParameterValues.test.js +0 -18
- package/packages/client_build_tool/lib/shared/babel/__test__/es2015/extraFeatures.test.js +0 -82
- package/packages/client_build_tool/lib/shared/babel/__test__/es2015/forOf.test.js +0 -20
- package/packages/client_build_tool/lib/shared/babel/__test__/es2015/promise.test.js +0 -22
- package/packages/client_build_tool/lib/shared/babel/__test__/es2015/spreadOperator.test.js +0 -20
- package/packages/client_build_tool/lib/shared/babel/__test__/es2015/spreadParams.test.js +0 -24
- package/packages/client_build_tool/lib/shared/babel/__test__/es2015/stringAndArrayMethods.test.js +0 -67
- package/packages/client_build_tool/lib/shared/babel/__test__/es2015/variables.test.js +0 -21
- package/packages/client_build_tool/lib/shared/babel/__test__/es2016/array-includes.test.js +0 -13
- package/packages/client_build_tool/lib/shared/babel/__test__/es2016/exponentationOperator.test.js +0 -20
- package/packages/client_build_tool/lib/shared/babel/__test__/es2017/asyncAndawait.test.js +0 -23
- package/packages/client_build_tool/lib/shared/babel/__test__/es2017/object-entries.test.js +0 -24
- package/packages/client_build_tool/lib/shared/babel/__test__/es2017/object-getOwnproperties.test.js +0 -24
- package/packages/client_build_tool/lib/shared/babel/__test__/es2017/object-values.test.js +0 -24
- package/packages/client_build_tool/lib/shared/babel/__test__/es2017/stringMethods.test.js +0 -20
- package/packages/client_build_tool/lib/shared/babel/__test__/es2018/asynchronous-iterator.test.js +0 -19
- package/packages/client_build_tool/lib/shared/babel/__test__/es2018/object-rest-spread.test.js +0 -24
- package/packages/client_build_tool/lib/shared/babel/__test__/es2018/promise-finally.test.js +0 -26
- package/packages/client_build_tool/lib/shared/babel/__test__/es2018/regularExpressions.test.js +0 -35
- package/packages/client_build_tool/lib/shared/babel/__test__/es2019/Json.stringify.test.js +0 -21
- package/packages/client_build_tool/lib/shared/babel/__test__/es2019/arrayMethods.test.js +0 -31
- package/packages/client_build_tool/lib/shared/babel/__test__/es2019/object-fromEntriesMethod.test.js +0 -13
- package/packages/client_build_tool/lib/shared/babel/__test__/es2019/optionalCatchBinding.test.js +0 -23
- package/packages/client_build_tool/lib/shared/babel/__test__/es2019/revisedFunctionToString.test.js +0 -17
- package/packages/client_build_tool/lib/shared/babel/__test__/es2019/trim-startAndend-method.test.js +0 -20
- package/packages/client_build_tool/lib/shared/babel/__test__/es2020/AssignmentOperator.test.js +0 -27
- package/packages/client_build_tool/lib/shared/babel/__test__/es2020/Dynamic-Import.test.js +0 -19
- package/packages/client_build_tool/lib/shared/babel/__test__/es2020/NullishOperator.test.js +0 -15
- package/packages/client_build_tool/lib/shared/babel/__test__/es2020/bigInt.test.js +0 -13
- package/packages/client_build_tool/lib/shared/babel/__test__/es2020/chainOperator.test.js +0 -17
- package/packages/client_build_tool/lib/shared/babel/__test__/es2020/export-namespace-from.test.js +0 -12
- package/packages/client_build_tool/lib/shared/babel/__test__/es2020/promiseAllSettledMathod.test.js +0 -17
- package/packages/client_build_tool/lib/shared/babel/__test__/es2020/stringMatchMethod.test.js +0 -13
- package/packages/client_build_tool/lib/shared/babel/__test__/es2021/NumericSeparator.test.js +0 -23
- package/packages/client_build_tool/lib/shared/babel/__test__/es2021/logicalOperatorAssignments.test.js +0 -25
- package/packages/client_build_tool/lib/shared/babel/__test__/es2021/promiseAny.test.js +0 -16
- package/packages/client_build_tool/lib/shared/babel/__test__/es2021/stringReplaceMethod.test.js +0 -16
- package/packages/client_build_tool/lib/shared/babel/__test__/es2022/Array-atMethod.test.js +0 -13
- package/packages/client_build_tool/lib/shared/babel/__test__/es2022/ObjectKeyCheck.test.js +0 -27
- package/packages/client_build_tool/lib/shared/babel/__test__/es2022/ObjecthasOwnMethod.test.js +0 -19
- package/packages/client_build_tool/lib/shared/babel/__test__/es2022/RegexMatchIndices.test.js +0 -20
- package/packages/client_build_tool/lib/shared/babel/__test__/es2022/String-atMethod.test.js +0 -15
- package/packages/client_build_tool/lib/shared/babel/__test__/es2022/error.Cause.test.js +0 -23
- package/packages/client_build_tool/lib/shared/babel/__test__/es2022/keysCheckinPrivateFields.test.js +0 -27
- package/packages/client_build_tool/lib/shared/babel/__test__/es2022/privateMethodsAndFields.test.js +0 -23
- package/packages/client_build_tool/lib/shared/babel/__test__/es2022/staticFieldsAndMethod.test.js +0 -54
- package/packages/client_build_tool/lib/shared/babel/__test__/es2022/topLevelAwait.test.js +0 -11
- package/packages/client_build_tool/lib/shared/babel/__test__/es2022/weakRef.test.js +0 -17
- package/packages/client_build_tool/lib/shared/babel/__test__/utilities.js +0 -28
- package/packages/client_build_tool/lib/shared/babel/addDefaultPlugins.js +0 -15
- package/packages/client_build_tool/lib/shared/babel/babelWebConfig.js +0 -54
- package/packages/client_build_tool/lib/shared/babel/babel_plugins/removeAttributesPlugin.js +0 -23
- package/packages/client_build_tool/lib/shared/babel/getBabelPlugin.js +0 -37
- package/packages/client_build_tool/lib/shared/babel/runBabelForJSFile.js +0 -24
- package/packages/client_build_tool/lib/shared/babel/runBabelForTsFile.js +0 -30
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/decidePublicPath.js +0 -57
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/libAlias.js +0 -31
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/modeUtils.js +0 -39
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/nameTemplates.js +0 -105
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/resourceBasedPublicPath.js +0 -21
- package/packages/client_build_tool/lib/shared/bundler/webpack/configCustomLoaders.js +0 -10
- package/packages/client_build_tool/lib/shared/bundler/webpack/cssLoaders.js +0 -16
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/BundleIntegrityReport/index.js +0 -83
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/CdnChangePlugin/index.js +0 -119
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/CdnChangePlugin/webpackCustomJsUrlLoader.js +0 -46
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/CustomScriptLoadingPlugin.js +0 -109
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/EFCTemplatePlugin.js +0 -112
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/ContributionGuide.md +0 -11
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nFilesEmitPlugin.js +0 -174
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nKeysIdentifer.js +0 -76
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nRuntimeDealerPlugin.js +0 -223
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nSplit.md +0 -95
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/LocaleChunkAssetsStore.js +0 -73
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/ModulesI18nKeysStore.js +0 -88
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/README.md +0 -25
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/constants.js +0 -29
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/createHash.js +0 -24
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nLoadingRuntimeModule.js +0 -76
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/index.js +0 -39
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/iterateModulesInChunk.js +0 -50
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/optionsHandler.js +0 -68
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/pathCreator.js +0 -23
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/readI18nValues.js +0 -29
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/templateFileName.js +0 -43
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/templateHashHelpers.js +0 -77
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/terser/__test__/classesAndObject.test.js +0 -56
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/terser/__test__/conditionalOperation.test.js +0 -154
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/terser/__test__/function.test.js +0 -89
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/terser/__test__/function2.test.js +0 -71
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/terser/__test__/loop.test.js +0 -112
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/terser/__test__/minifyBooleanValues.test.js +0 -43
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/terser/__test__/minimizeVariableNames.test.js +0 -45
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/terser/__test__/promise.test.js +0 -53
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/terser/__test__/removeCommentsAndEmptySpace.test.js +0 -13
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/terser/__test__/removeUnusedStrings.test.js +0 -14
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/terser/__test__/variableDeclaration.test.js +0 -30
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/collectI18nKeys.js +0 -66
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/getChunkModules.js +0 -13
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/hashUtils.js +0 -19
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/index.js +0 -31
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/propertiesUtils.js +0 -129
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/InitialHtmlPlugin.js +0 -60
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/__test__/addFilesNamesToManifestJson.test.js +0 -51
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/__test__/createInitialEntries.test.js +0 -95
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/__test__/removeHashFromFileName.test.js +0 -91
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/addFilesNamesToManifestJson.js +0 -30
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/createInitialEntries.js +0 -23
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/createManifestJson.js +0 -35
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/findInitialFileNames.js +0 -18
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/index.js +0 -46
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/removeHashFromFileName.js +0 -18
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RTLSplitPlugin.js +0 -1
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/ResourceHintsPlugin.js +0 -193
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/OverwriteCssPathForRTL.js +0 -62
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/RtlCssPlugin.js +0 -84
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/RtrSplit.md +0 -34
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/replaceCssDirTemplate.js +0 -27
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RuntimeResourceCleanup/index.js +0 -73
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/SelectorWeightPlugin/classHandling.js +0 -20
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/SelectorWeightPlugin/index.js +0 -78
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/SelectorWeightPlugin/selectorWeightPrefixAdder.js +0 -51
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/SelectorWeightPlugin/windowsModification.js +0 -16
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/ServiceWorkerPlugin.js +0 -114
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/ServiceWorkerPluginUtils.js +0 -13
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/SourceMapPlugin/index.js +0 -68
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/TPHashMappingPlugin/addHashToFilePath.js +0 -22
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/TPHashMappingPlugin/index.js +0 -55
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/UglifyCSSPlugin/__test__/uglifyCss1.test.js +0 -74
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/UglifyCSSPlugin/__test__/uglifycss.test.js +0 -64
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/UglifyCSSPlugin/__test__/utilities.js +0 -28
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/UglifyCSSPlugin/index.js.js +0 -49
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/VariableConversionCollector/ErrorHandler.js +0 -62
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/VariableConversionCollector/index.js +0 -362
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/custom_attribute_plugin/index.js +0 -80
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/emitAsset.js +0 -14
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/getInitialAssetsFuncTemplate.js +0 -57
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/getInitialI18nAssetsArrayStr.js +0 -87
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/terser/__test__/classesAndObject.test.js +0 -56
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/terser/__test__/conditionalOperation.test.js +0 -154
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/terser/__test__/function.test.js +0 -89
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/terser/__test__/function2.test.js +0 -71
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/terser/__test__/loop.test.js +0 -112
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/terser/__test__/minifyBooleanValues.test.js +0 -43
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/terser/__test__/minimizeVariableNames.test.js +0 -45
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/terser/__test__/promise.test.js +0 -53
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/terser/__test__/removeCommentsAndEmptySpace.test.js +0 -13
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/terser/__test__/removeUnusedStrings.test.js +0 -14
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/terser/__test__/variableDeclaration.test.js +0 -30
- package/packages/client_build_tool/lib/shared/bundler/webpack/defaultVendorPatternList.js +0 -13
- package/packages/client_build_tool/lib/shared/bundler/webpack/devtoolConfig.js +0 -13
- package/packages/client_build_tool/lib/shared/bundler/webpack/entryConfig.js +0 -28
- package/packages/client_build_tool/lib/shared/bundler/webpack/externals.js +0 -17
- package/packages/client_build_tool/lib/shared/bundler/webpack/getCSSLoaders.js +0 -29
- package/packages/client_build_tool/lib/shared/bundler/webpack/getFilenameFromModule.js +0 -24
- package/packages/client_build_tool/lib/shared/bundler/webpack/jsLoaders.js +0 -17
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/assetLoaders.js +0 -12
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/babelLoaderConfig.js +0 -18
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/checkIsPatternsMatchFilename.js +0 -56
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/configHtmlTemplateLoader.js +0 -18
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/configPostCssLoader.js +0 -37
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/configWebWorkerLoader.js +0 -21
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/configsAssetsLoaders.js +0 -86
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/cssClassNameGenerate.js +0 -65
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/getCssLoaderOptions.js +0 -21
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaders/miniCssFallBackLoader.js +0 -7
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaders/workerLoader.js +0 -133
- package/packages/client_build_tool/lib/shared/bundler/webpack/optimizationConfig.js +0 -56
- package/packages/client_build_tool/lib/shared/bundler/webpack/outputConfig.js +0 -38
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configBundleAnalyzer.js +0 -40
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configBundleIntegrityReport.js +0 -36
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configCSSMinifierPlugin.js +0 -28
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configCdnChangePlugin.js +0 -27
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configCopyPublicFolders.js +0 -63
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configCustomAttributesPlugin.js +0 -20
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configCustomScriptLoadingStrategyPlugin.js +0 -76
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configEFCTemplatePlugin.js +0 -46
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configEnvVariables.js +0 -51
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configHtmlWebpackPlugin.js +0 -56
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configI18nSplitPlugin.js +0 -41
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configIgnorePlugin.js +0 -16
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configManifestJsonPlugin.js +0 -44
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configMiniCSSExtractPlugin.js +0 -24
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configProgressPlugin.js +0 -24
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configResourceHintsPlugin.js +0 -21
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configRtlCssPlugin.js +0 -27
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configRuntimeResourceCleanup.js +0 -31
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configSelectorWeightPlugin.js +0 -28
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configServiceWorkerPlugin.js +0 -40
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configSourceMapPlugin.js +0 -20
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configTPHashMappingPlugin.js +0 -32
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configVariableConversionPlugin.js +0 -25
- package/packages/client_build_tool/lib/shared/bundler/webpack/plugins.js +0 -58
- package/packages/client_build_tool/lib/shared/bundler/webpack/resolvers.js +0 -82
- package/packages/client_build_tool/lib/shared/bundler/webpack/splitChunksConfig.js +0 -116
- package/packages/client_build_tool/lib/shared/bundler/webpack/statsConfig.js +0 -30
- package/packages/client_build_tool/lib/shared/bundler/webpack/tsLoaders.js +0 -17
- package/packages/client_build_tool/lib/shared/bundler/webpack/utils/__test__/getArrayWithDefaultWithCustomEqual.test.js +0 -54
- package/packages/client_build_tool/lib/shared/bundler/webpack/utils/__test__/updateArrayWithDefault.test.js +0 -47
- package/packages/client_build_tool/lib/shared/bundler/webpack/utils/index.js +0 -31
- package/packages/client_build_tool/lib/shared/bundler/webpack/utils/object-manipulation.js +0 -87
- package/packages/client_build_tool/lib/shared/bundler/webpack/utils/updateArrayWithDefault.js +0 -34
- package/packages/client_build_tool/lib/shared/bundler/webpack/webpackBuild.js +0 -27
- package/packages/client_build_tool/lib/shared/bundler/webpack/webpackConfig.js +0 -58
- package/packages/client_build_tool/lib/shared/commands-utils/doBasicRequirementCheck.js +0 -17
- package/packages/client_build_tool/lib/shared/commands-utils/getCliPath.js +0 -39
- package/packages/client_build_tool/lib/shared/commands-utils/index.js +0 -29
- package/packages/client_build_tool/lib/shared/commands-utils/log.js +0 -13
- package/packages/client_build_tool/lib/shared/commands-utils/readArgsFormCommandLine.js +0 -11
- package/packages/client_build_tool/lib/shared/commands-utils/readOptionFormCommandLine.js +0 -11
- package/packages/client_build_tool/lib/shared/commands-utils/spawnSyncIO.js +0 -38
- package/packages/client_build_tool/lib/shared/constants.js +0 -48
- package/packages/client_build_tool/lib/shared/fileUtils/copyFile.js +0 -38
- package/packages/client_build_tool/lib/shared/fileUtils/directoryIterator.js +0 -21
- package/packages/client_build_tool/lib/shared/fileUtils/watchRun.js +0 -112
- package/packages/client_build_tool/lib/shared/postcss/__test__/ignoreTestCases.test.js +0 -80
- package/packages/client_build_tool/lib/shared/postcss/__test__/postcss-rtl-all-cases.test.js +0 -119
- package/packages/client_build_tool/lib/shared/postcss/__test__/postcssRtl.spec.js +0 -34
- package/packages/client_build_tool/lib/shared/postcss/custom_postcss_plugins/EmptyPlugin.js +0 -21
- package/packages/client_build_tool/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/constants.js +0 -10
- package/packages/client_build_tool/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/handleIgnores.js +0 -66
- package/packages/client_build_tool/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/index.js +0 -136
- package/packages/client_build_tool/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/insertBefore.js +0 -32
- package/packages/client_build_tool/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/isPreviouslyProcessed.js +0 -20
- package/packages/client_build_tool/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/replaceUtils.js +0 -20
- package/packages/client_build_tool/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/separateHoveredSelectorAndNormalSelector.js +0 -24
- package/packages/client_build_tool/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/specialCases.js +0 -43
- package/packages/client_build_tool/lib/shared/postcss/custom_postcss_plugins/HoverActivePlugin/typeCheckUtils.js +0 -52
- package/packages/client_build_tool/lib/shared/postcss/custom_postcss_plugins/RTLSplitPlugin.js +0 -139
- package/packages/client_build_tool/lib/shared/postcss/custom_postcss_plugins/SelectorReplace.js +0 -90
- package/packages/client_build_tool/lib/shared/postcss/custom_postcss_plugins/ValueReplacer.js +0 -57
- package/packages/client_build_tool/lib/shared/postcss/custom_postcss_plugins/VariableModificationPlugin/index.js +0 -347
- package/packages/client_build_tool/lib/shared/postcss/filterPluginsAllowedForSpecficFile.js +0 -55
- package/packages/client_build_tool/lib/shared/postcss/getAllowedPostCssPlugins.js +0 -30
- package/packages/client_build_tool/lib/shared/postcss/getSpecificPostCssPlugin.js +0 -58
- package/packages/client_build_tool/lib/shared/postcss/runPostCssForCssFile.js +0 -37
- package/packages/client_build_tool/lib/shared/pre_process/runPreProcess.js +0 -58
- package/packages/client_build_tool/lib/shared/server/configWebpackDevMiddleware.js +0 -41
- package/packages/client_build_tool/lib/shared/server/corsHandling.js +0 -30
- package/packages/client_build_tool/lib/shared/server/getIp.js +0 -30
- package/packages/client_build_tool/lib/shared/server/getServerURL.js +0 -36
- package/packages/client_build_tool/lib/shared/server/httpsOptions.js +0 -46
- package/packages/client_build_tool/lib/shared/server/initExpressApp.js +0 -19
- package/packages/client_build_tool/lib/shared/server/initialHTMLHandling.js +0 -99
- package/packages/client_build_tool/lib/shared/server/mockApiHandler.js +0 -60
- package/packages/client_build_tool/lib/shared/server/mockServer.js +0 -41
- package/packages/client_build_tool/lib/shared/server/serveContextFiles.js +0 -27
- package/packages/client_build_tool/lib/shared/server/serverBywebpackDevMiddleware.js +0 -35
- package/packages/client_build_tool/lib/shared/server/startHttpServer.js +0 -26
- package/packages/client_build_tool/lib/shared/server/startHttpsServer.js +0 -38
- package/packages/client_build_tool/lib/shared/server/unwanted/addHttp2Server.js +0 -41
- package/packages/client_build_tool/lib/shared/server/unwanted/configWebpackDevMiddleware.js +0 -44
- package/packages/client_build_tool/lib/shared/server/unwanted/mockApiSupport.js +0 -19
- package/packages/client_build_tool/lib/shared/server/unwanted/websocketMockSetup.js +0 -48
- package/packages/client_build_tool/lib/shared/server/urlConcat.js +0 -32
- package/packages/client_build_tool/lib/shared/utils/requireLocalOrGlobal.js +0 -81
- package/packages/client_build_tool/lib/shared/utils/utils.js +0 -1
- package/packages/client_build_tool/lib/shared/utils/versionPrint.js +0 -20
- package/packages/client_build_tool/node_modules/history/CHANGES.md +0 -395
- package/packages/client_build_tool/node_modules/history/DOMUtils.js +0 -3
- package/packages/client_build_tool/node_modules/history/ExecutionEnvironment.js +0 -3
- package/packages/client_build_tool/node_modules/history/LICENSE +0 -21
- package/packages/client_build_tool/node_modules/history/LocationUtils.js +0 -3
- package/packages/client_build_tool/node_modules/history/PathUtils.js +0 -3
- package/packages/client_build_tool/node_modules/history/README.md +0 -282
- package/packages/client_build_tool/node_modules/history/cjs/history.js +0 -933
- package/packages/client_build_tool/node_modules/history/cjs/history.min.js +0 -1
- package/packages/client_build_tool/node_modules/history/createBrowserHistory.js +0 -3
- package/packages/client_build_tool/node_modules/history/createHashHistory.js +0 -3
- package/packages/client_build_tool/node_modules/history/createMemoryHistory.js +0 -3
- package/packages/client_build_tool/node_modules/history/createTransitionManager.js +0 -3
- package/packages/client_build_tool/node_modules/history/es/DOMUtils.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/ExecutionEnvironment.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/LocationUtils.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/PathUtils.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/createBrowserHistory.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/createHashHistory.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/createMemoryHistory.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/createTransitionManager.js +0 -7
- package/packages/client_build_tool/node_modules/history/es/warnAboutDeprecatedESMImport.js +0 -35
- package/packages/client_build_tool/node_modules/history/esm/history.js +0 -904
- package/packages/client_build_tool/node_modules/history/index.js +0 -7
- package/packages/client_build_tool/node_modules/history/package.json +0 -120
- package/packages/client_build_tool/node_modules/history/umd/history.js +0 -1059
- package/packages/client_build_tool/node_modules/history/umd/history.min.js +0 -1
- package/packages/client_build_tool/node_modules/history/warnAboutDeprecatedCJSRequire.js +0 -35
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
// utils/getJsResourceKeys.js
|
4
|
+
const fs = require('fs');
|
5
|
+
const readline = require('readline');
|
6
|
+
function getJsResourceKeys(filePath) {
|
7
|
+
const keys = new Set();
|
8
|
+
const fileContent = fs.readFileSync(filePath, 'utf8');
|
9
|
+
const lines = fileContent.split(/\r?\n/);
|
10
|
+
for (const line of lines) {
|
11
|
+
const trimmedLine = line.trim();
|
12
|
+
if (trimmedLine && !trimmedLine.startsWith('#')) {
|
13
|
+
const equalIndex = trimmedLine.indexOf('=');
|
14
|
+
if (equalIndex > 0) {
|
15
|
+
const key = trimmedLine.slice(0, equalIndex).trim();
|
16
|
+
keys.add(key);
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
return keys;
|
21
|
+
}
|
22
|
+
module.exports = getJsResourceKeys;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
// i18nChunkUtils.js
|
4
|
+
const crypto = require('crypto');
|
5
|
+
function hashKey(key) {
|
6
|
+
return crypto.createHash('md5').update(key).digest('hex');
|
7
|
+
}
|
8
|
+
function getChunkIdForKey(key) {
|
9
|
+
const hash = hashKey(key);
|
10
|
+
const numChunks = 100;
|
11
|
+
const numericHash = parseInt(hash.substring(0, 8), 16);
|
12
|
+
const chunkId = numericHash % numChunks;
|
13
|
+
return `chunk-${chunkId}`;
|
14
|
+
}
|
15
|
+
module.exports = {
|
16
|
+
hashKey,
|
17
|
+
getChunkIdForKey
|
18
|
+
};
|
@@ -0,0 +1,580 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
// // // // // const crypto = require('crypto');
|
4
|
+
// // // // // const { RawSource } = require('webpack-sources');
|
5
|
+
// // // // // function getChunkIdForKey(key, NUMBER_OF_CHUNKS) {
|
6
|
+
// // // // // const hash = crypto.createHash('md5');
|
7
|
+
// // // // // hash.update(key);
|
8
|
+
// // // // // const digest = hash.digest('hex');
|
9
|
+
// // // // // const numericHash = parseInt(digest.substr(0, 8), 16);
|
10
|
+
// // // // // return numericHash % NUMBER_OF_CHUNKS;
|
11
|
+
// // // // // }
|
12
|
+
// // // // // function generateManifests(options) {
|
13
|
+
// // // // // const {
|
14
|
+
// // // // // compilation,
|
15
|
+
// // // // // allI18nKeys,
|
16
|
+
// // // // // moduleToKeysMap,
|
17
|
+
// // // // // keyToModulesMap,
|
18
|
+
// // // // // moduleChunkIdToModulesMap,
|
19
|
+
// // // // // entryPointKeys,
|
20
|
+
// // // // // NUMBER_OF_CHUNKS,
|
21
|
+
// // // // // } = options;
|
22
|
+
// // // // // const metadataManifest = {
|
23
|
+
// // // // // keyToModulesMap: {},
|
24
|
+
// // // // // keyToChunkIdMap: {},
|
25
|
+
// // // // // moduleToKeysMap: {},
|
26
|
+
// // // // // };
|
27
|
+
// // // // // const runtimeManifest = {
|
28
|
+
// // // // // moduleToI18nChunkMap: {},
|
29
|
+
// // // // // locales: {},
|
30
|
+
// // // // // };
|
31
|
+
// // // // // const keyToI18nChunkIdMap = {};
|
32
|
+
// // // // // // Get the list of locales
|
33
|
+
// // // // // const locales = Object.keys(allI18nKeys);
|
34
|
+
// // // // // // Map from i18nChunkId to keys
|
35
|
+
// // // // // const i18nChunkIdToKeysMap = {};
|
36
|
+
// // // // // // Initialize the chunks
|
37
|
+
// // // // // for (let i = 0; i < NUMBER_OF_CHUNKS; i++) {
|
38
|
+
// // // // // i18nChunkIdToKeysMap[i] = [];
|
39
|
+
// // // // // }
|
40
|
+
// // // // // // Collect all keys from the i18n files
|
41
|
+
// // // // // const allKeys = Object.keys(keyToModulesMap);
|
42
|
+
// // // // // // Assign keys to chunks using hash-based mapping
|
43
|
+
// // // // // for (const key of allKeys) {
|
44
|
+
// // // // // const chunkId = getChunkIdForKey(key, NUMBER_OF_CHUNKS);
|
45
|
+
// // // // // i18nChunkIdToKeysMap[chunkId].push(key);
|
46
|
+
// // // // // // Map key to chunk ID
|
47
|
+
// // // // // keyToI18nChunkIdMap[key] = chunkId;
|
48
|
+
// // // // // // Populate metadata manifest
|
49
|
+
// // // // // metadataManifest.keyToChunkIdMap[key] = chunkId;
|
50
|
+
// // // // // metadataManifest.keyToModulesMap[key] = Array.from(keyToModulesMap[key]);
|
51
|
+
// // // // // }
|
52
|
+
// // // // // // Populate moduleToKeysMap in metadata manifest
|
53
|
+
// // // // // for (const [moduleResource, keys] of moduleToKeysMap.entries()) {
|
54
|
+
// // // // // metadataManifest.moduleToKeysMap[moduleResource] = keys;
|
55
|
+
// // // // // }
|
56
|
+
// // // // // // Now, generate the i18n chunks for each locale
|
57
|
+
// // // // // for (const locale of locales) {
|
58
|
+
// // // // // runtimeManifest.locales[locale] = runtimeManifest.locales[locale] || {};
|
59
|
+
// // // // // for (let i = 0; i < NUMBER_OF_CHUNKS; i++) {
|
60
|
+
// // // // // const keys = i18nChunkIdToKeysMap[i];
|
61
|
+
// // // // // const i18nData = {};
|
62
|
+
// // // // // for (const key of keys) {
|
63
|
+
// // // // // const value = allI18nKeys[locale][key];
|
64
|
+
// // // // // if (value !== undefined) {
|
65
|
+
// // // // // i18nData[key] = value;
|
66
|
+
// // // // // }
|
67
|
+
// // // // // }
|
68
|
+
// // // // // if (Object.keys(i18nData).length > 0) {
|
69
|
+
// // // // // const moduleSource = `window.loadI18nChunk(${JSON.stringify(i18nData)});`;
|
70
|
+
// // // // // const filename = `i18n-chunks/${locale}/chunk-${i}.js`;
|
71
|
+
// // // // // compilation.emitAsset(filename, new RawSource(moduleSource));
|
72
|
+
// // // // // runtimeManifest.locales[locale][i] = filename;
|
73
|
+
// // // // // console.log(`Emitted i18n chunk: ${filename}`);
|
74
|
+
// // // // // }
|
75
|
+
// // // // // }
|
76
|
+
// // // // // }
|
77
|
+
// // // // // // Now, create moduleToI18nChunkMap for runtime manifest
|
78
|
+
// // // // // for (const [moduleChunkId, moduleResources] of Object.entries(moduleChunkIdToModulesMap)) {
|
79
|
+
// // // // // const requiredI18nChunkIds = new Set();
|
80
|
+
// // // // // for (const moduleResource of moduleResources) {
|
81
|
+
// // // // // const keys = moduleToKeysMap.get(moduleResource);
|
82
|
+
// // // // // if (keys) {
|
83
|
+
// // // // // for (const key of keys) {
|
84
|
+
// // // // // const i18nChunkId = keyToI18nChunkIdMap[key];
|
85
|
+
// // // // // if (i18nChunkId !== undefined) {
|
86
|
+
// // // // // requiredI18nChunkIds.add(i18nChunkId);
|
87
|
+
// // // // // }
|
88
|
+
// // // // // }
|
89
|
+
// // // // // }
|
90
|
+
// // // // // }
|
91
|
+
// // // // // if (requiredI18nChunkIds.size > 0) {
|
92
|
+
// // // // // runtimeManifest.moduleToI18nChunkMap[moduleChunkId] = Array.from(requiredI18nChunkIds);
|
93
|
+
// // // // // } else {
|
94
|
+
// // // // // // console.log(`No required i18n chunks for module chunk ID ${moduleChunkId}`);
|
95
|
+
// // // // // }
|
96
|
+
// // // // // }
|
97
|
+
// // // // // // Emit the metadata manifest
|
98
|
+
// // // // // const metadataManifestSource = new RawSource(
|
99
|
+
// // // // // `window.i18n = window.i18n || {}; window.i18n.metadataManifest = ${JSON.stringify(metadataManifest, null, 2)};`
|
100
|
+
// // // // // );
|
101
|
+
// // // // // const metadataManifestFilename = 'i18n-chunks/metadataManifest.js';
|
102
|
+
// // // // // compilation.emitAsset(metadataManifestFilename, metadataManifestSource);
|
103
|
+
// // // // // console.log(`Emitted metadata manifest: ${metadataManifestFilename}`);
|
104
|
+
// // // // // // Emit the runtime manifest
|
105
|
+
// // // // // const runtimeManifestSource = new RawSource(
|
106
|
+
// // // // // `window.i18n = window.i18n || {}; window.i18n.runtimeManifest = ${JSON.stringify(runtimeManifest, null, 2)};`
|
107
|
+
// // // // // );
|
108
|
+
// // // // // const runtimeManifestFilename = 'i18n-chunks/runtimeManifest.js';
|
109
|
+
// // // // // compilation.emitAsset(runtimeManifestFilename, runtimeManifestSource);
|
110
|
+
// // // // // console.log(`Emitted runtime manifest: ${runtimeManifestFilename}`);
|
111
|
+
// // // // // }
|
112
|
+
// // // // // module.exports = { generateManifests };
|
113
|
+
// // // // const { RawSource } = require('webpack-sources');
|
114
|
+
// // // // function generateManifests(options) {
|
115
|
+
// // // // const {
|
116
|
+
// // // // compilation,
|
117
|
+
// // // // allI18nKeys,
|
118
|
+
// // // // moduleToKeysMap,
|
119
|
+
// // // // keyToModulesMap,
|
120
|
+
// // // // moduleChunkIdToModulesMap,
|
121
|
+
// // // // keyToI18nChunkIdMap, // Receive the map from I18nPlugin
|
122
|
+
// // // // } = options;
|
123
|
+
// // // // // // Inside generateManifests
|
124
|
+
// // // // // console.log('keyToI18nChunkIdMap:', keyToI18nChunkIdMap);
|
125
|
+
// // // // // console.log('moduleChunkIdToModulesMap:', moduleChunkIdToModulesMap);
|
126
|
+
// // // // // console.log('moduleToKeysMap:', moduleToKeysMap);
|
127
|
+
// // // // // console.log('runtimeManifest.moduleToI18nChunkMap:', runtimeManifest.moduleToI18nChunkMap);
|
128
|
+
// // // // const metadataManifest = {
|
129
|
+
// // // // keyToModulesMap: {},
|
130
|
+
// // // // keyToChunkIdMap: {},
|
131
|
+
// // // // moduleToKeysMap: {},
|
132
|
+
// // // // };
|
133
|
+
// // // // const runtimeManifest = {
|
134
|
+
// // // // moduleToI18nChunkMap: {},
|
135
|
+
// // // // locales: {},
|
136
|
+
// // // // };
|
137
|
+
// // // // // Use the keyToI18nChunkIdMap provided
|
138
|
+
// // // // // Populate metadataManifest.keyToChunkIdMap and keyToModulesMap
|
139
|
+
// // // // for (const [key, modulesSet] of keyToModulesMap.entries()) {
|
140
|
+
// // // // const chunkId = keyToI18nChunkIdMap[key];
|
141
|
+
// // // // metadataManifest.keyToChunkIdMap[key] = chunkId;
|
142
|
+
// // // // metadataManifest.keyToModulesMap[key] = Array.from(modulesSet);
|
143
|
+
// // // // }
|
144
|
+
// // // // // Populate moduleToKeysMap in metadata manifest
|
145
|
+
// // // // for (const [moduleResource, keys] of moduleToKeysMap.entries()) {
|
146
|
+
// // // // metadataManifest.moduleToKeysMap[moduleResource] = keys;
|
147
|
+
// // // // }
|
148
|
+
// // // // // Now, create moduleToI18nChunkMap for runtime manifest
|
149
|
+
// // // // for (const [moduleChunkId, moduleResources] of Object.entries(moduleChunkIdToModulesMap)) {
|
150
|
+
// // // // const requiredI18nChunkIds = new Set();
|
151
|
+
// // // // for (const moduleResource of moduleResources) {
|
152
|
+
// // // // const keys = moduleToKeysMap.get(moduleResource);
|
153
|
+
// // // // if (keys) {
|
154
|
+
// // // // for (const key of keys) {
|
155
|
+
// // // // const i18nChunkId = keyToI18nChunkIdMap[key];
|
156
|
+
// // // // if (i18nChunkId !== undefined) {
|
157
|
+
// // // // requiredI18nChunkIds.add(i18nChunkId);
|
158
|
+
// // // // }
|
159
|
+
// // // // }
|
160
|
+
// // // // }
|
161
|
+
// // // // }
|
162
|
+
// // // // if (requiredI18nChunkIds.size > 0) {
|
163
|
+
// // // // runtimeManifest.moduleToI18nChunkMap[moduleChunkId] = Array.from(requiredI18nChunkIds);
|
164
|
+
// // // // } else {
|
165
|
+
// // // // console.log(`No required i18n chunks for module chunk ID ${moduleChunkId}`);
|
166
|
+
// // // // }
|
167
|
+
// // // // }
|
168
|
+
// // // // // Emit the metadata manifest
|
169
|
+
// // // // const metadataManifestSource = new RawSource(
|
170
|
+
// // // // `window.i18n = window.i18n || {}; window.i18n.metadataManifest = ${JSON.stringify(metadataManifest, null, 2)};`
|
171
|
+
// // // // );
|
172
|
+
// // // // const metadataManifestFilename = 'i18n-chunks/metadataManifest.js';
|
173
|
+
// // // // compilation.emitAsset(metadataManifestFilename, metadataManifestSource);
|
174
|
+
// // // // console.log(`Emitted metadata manifest: ${metadataManifestFilename}`);
|
175
|
+
// // // // // Emit the runtime manifest
|
176
|
+
// // // // const runtimeManifestSource = new RawSource(
|
177
|
+
// // // // `window.i18n = window.i18n || {}; window.i18n.runtimeManifest = ${JSON.stringify(runtimeManifest, null, 2)};`
|
178
|
+
// // // // );
|
179
|
+
// // // // const runtimeManifestFilename = 'i18n-chunks/runtimeManifest.js';
|
180
|
+
// // // // compilation.emitAsset(runtimeManifestFilename, runtimeManifestSource);
|
181
|
+
// // // // console.log(`Emitted runtime manifest: ${runtimeManifestFilename}`);
|
182
|
+
// // // // }
|
183
|
+
// // // // module.exports = { generateManifests };
|
184
|
+
// // // const { RawSource } = require('webpack-sources');
|
185
|
+
// // // function generateManifests({
|
186
|
+
// // // compilation,
|
187
|
+
// // // allI18nKeys,
|
188
|
+
// // // moduleToKeysMap,
|
189
|
+
// // // keyToModulesMap,
|
190
|
+
// // // moduleChunkIdToModulesMap,
|
191
|
+
// // // jsResourceI18nKeys,
|
192
|
+
// // // }) {
|
193
|
+
// // // const manifest = {
|
194
|
+
// // // moduleToI18nChunkMap: {},
|
195
|
+
// // // locales: {},
|
196
|
+
// // // debugInfo: {},
|
197
|
+
// // // };
|
198
|
+
// // // const locales = Object.keys(allI18nKeys);
|
199
|
+
// // // let i18nChunkIdCounter = 0;
|
200
|
+
// // // const sectionToI18nChunkIdMap = {};
|
201
|
+
// // // const keyToI18nChunkIdMap = {};
|
202
|
+
// // // // Collect all keys to be included (only those in jsResourceI18nKeys)
|
203
|
+
// // // const allKeysToInclude = new Set(Object.keys(jsResourceI18nKeys));
|
204
|
+
// // // // Build chunks up to 100KB
|
205
|
+
// // // const chunks = [];
|
206
|
+
// // // let currentChunk = {
|
207
|
+
// // // sections: [],
|
208
|
+
// // // size: 0,
|
209
|
+
// // // id: i18nChunkIdCounter++,
|
210
|
+
// // // };
|
211
|
+
// // // // Assuming all locales have the same sections as the first locale
|
212
|
+
// // // const firstLocale = locales[0];
|
213
|
+
// // // const sections = Object.keys(allI18nKeys[firstLocale]);
|
214
|
+
// // // for (const sectionName of sections) {
|
215
|
+
// // // // Filter keys in the section based on jsResourceI18nKeys
|
216
|
+
// // // const sectionKeys = Object.keys(allI18nKeys[firstLocale][sectionName] || {});
|
217
|
+
// // // const filteredKeys = sectionKeys.filter((key) =>
|
218
|
+
// // // allKeysToInclude.has(key)
|
219
|
+
// // // );
|
220
|
+
// // // if (filteredKeys.length === 0) {
|
221
|
+
// // // continue; // Skip sections with no relevant keys
|
222
|
+
// // // }
|
223
|
+
// // // // Estimate the size of the section
|
224
|
+
// // // const sectionData = {};
|
225
|
+
// // // for (const key of filteredKeys) {
|
226
|
+
// // // sectionData[key] = allI18nKeys[firstLocale][sectionName][key];
|
227
|
+
// // // }
|
228
|
+
// // // const sectionSize = Buffer.byteLength(
|
229
|
+
// // // JSON.stringify(sectionData),
|
230
|
+
// // // 'utf8'
|
231
|
+
// // // );
|
232
|
+
// // // if (currentChunk.size + sectionSize > 100 * 1024) {
|
233
|
+
// // // // Start a new chunk
|
234
|
+
// // // chunks.push(currentChunk);
|
235
|
+
// // // currentChunk = {
|
236
|
+
// // // sections: [],
|
237
|
+
// // // size: 0,
|
238
|
+
// // // id: i18nChunkIdCounter++,
|
239
|
+
// // // };
|
240
|
+
// // // }
|
241
|
+
// // // currentChunk.sections.push(sectionName);
|
242
|
+
// // // currentChunk.size += sectionSize;
|
243
|
+
// // // // Map section to chunk id
|
244
|
+
// // // sectionToI18nChunkIdMap[sectionName] = currentChunk.id;
|
245
|
+
// // // }
|
246
|
+
// // // // Add the last chunk
|
247
|
+
// // // if (currentChunk.sections.length > 0) {
|
248
|
+
// // // chunks.push(currentChunk);
|
249
|
+
// // // }
|
250
|
+
// // // // Map keys to i18nChunkIds
|
251
|
+
// // // for (const sectionName of sections) {
|
252
|
+
// // // if (!sectionToI18nChunkIdMap.hasOwnProperty(sectionName)) {
|
253
|
+
// // // continue; // Skip sections not included
|
254
|
+
// // // }
|
255
|
+
// // // const i18nChunkId = sectionToI18nChunkIdMap[sectionName];
|
256
|
+
// // // const keys = Object.keys(allI18nKeys[firstLocale][sectionName] || {});
|
257
|
+
// // // const filteredKeys = keys.filter((key) => allKeysToInclude.has(key));
|
258
|
+
// // // for (const key of filteredKeys) {
|
259
|
+
// // // keyToI18nChunkIdMap[key] = i18nChunkId;
|
260
|
+
// // // }
|
261
|
+
// // // }
|
262
|
+
// // // // Generate the i18n chunk files for each locale and chunk
|
263
|
+
// // // for (const locale of locales) {
|
264
|
+
// // // manifest.locales[locale] = manifest.locales[locale] || {};
|
265
|
+
// // // manifest.debugInfo[locale] = {};
|
266
|
+
// // // for (const chunk of chunks) {
|
267
|
+
// // // const i18nData = {};
|
268
|
+
// // // for (const sectionName of chunk.sections) {
|
269
|
+
// // // const sectionKeys = allI18nKeys[locale][sectionName] || {};
|
270
|
+
// // // for (const key of Object.keys(sectionKeys)) {
|
271
|
+
// // // if (allKeysToInclude.has(key)) {
|
272
|
+
// // // i18nData[key] = sectionKeys[key];
|
273
|
+
// // // }
|
274
|
+
// // // }
|
275
|
+
// // // }
|
276
|
+
// // // const numKeys = Object.keys(i18nData).length;
|
277
|
+
// // // if (numKeys > 0) {
|
278
|
+
// // // const moduleSource = `window.loadI18nChunk(${JSON.stringify(
|
279
|
+
// // // i18nData,
|
280
|
+
// // // null,
|
281
|
+
// // // 2
|
282
|
+
// // // )});`;
|
283
|
+
// // // const filename = `i18n-chunks/${locale}/chunk-${chunk.id}.js`;
|
284
|
+
// // // compilation.emitAsset(filename, new RawSource(moduleSource));
|
285
|
+
// // // manifest.locales[locale][chunk.id] = filename;
|
286
|
+
// // // manifest.debugInfo[locale][chunk.id] = {
|
287
|
+
// // // numKeys,
|
288
|
+
// // // };
|
289
|
+
// // // } else {
|
290
|
+
// // // // Even if there are no keys, we might want to create an empty chunk for consistency
|
291
|
+
// // // const moduleSource = `window.loadI18nChunk({});`;
|
292
|
+
// // // const filename = `i18n-chunks/${locale}/chunk-${chunk.id}.js`;
|
293
|
+
// // // compilation.emitAsset(filename, new RawSource(moduleSource));
|
294
|
+
// // // manifest.locales[locale][chunk.id] = filename;
|
295
|
+
// // // manifest.debugInfo[locale][chunk.id] = {
|
296
|
+
// // // numKeys: 0,
|
297
|
+
// // // };
|
298
|
+
// // // }
|
299
|
+
// // // }
|
300
|
+
// // // }
|
301
|
+
// // // // Create moduleToI18nChunkMap
|
302
|
+
// // // for (const [moduleChunkId, moduleResources] of Object.entries(
|
303
|
+
// // // moduleChunkIdToModulesMap
|
304
|
+
// // // )) {
|
305
|
+
// // // const requiredI18nChunkIds = new Set();
|
306
|
+
// // // for (const moduleResource of moduleResources) {
|
307
|
+
// // // const keys = moduleToKeysMap.get(moduleResource);
|
308
|
+
// // // if (keys) {
|
309
|
+
// // // for (const key of keys) {
|
310
|
+
// // // const i18nChunkId = keyToI18nChunkIdMap[key];
|
311
|
+
// // // if (i18nChunkId !== undefined) {
|
312
|
+
// // // requiredI18nChunkIds.add(i18nChunkId);
|
313
|
+
// // // }
|
314
|
+
// // // }
|
315
|
+
// // // }
|
316
|
+
// // // }
|
317
|
+
// // // if (requiredI18nChunkIds.size > 0) {
|
318
|
+
// // // manifest.moduleToI18nChunkMap[moduleChunkId] = Array.from(
|
319
|
+
// // // requiredI18nChunkIds
|
320
|
+
// // // );
|
321
|
+
// // // } else {
|
322
|
+
// // // console.log(
|
323
|
+
// // // `No required i18n chunks for module chunk ID ${moduleChunkId}`
|
324
|
+
// // // );
|
325
|
+
// // // }
|
326
|
+
// // // }
|
327
|
+
// // // // Emit the manifest file
|
328
|
+
// // // const manifestSource = new RawSource(
|
329
|
+
// // // `window.i18n = window.i18n || {}; window.i18n.manifest = ${JSON.stringify(
|
330
|
+
// // // manifest,
|
331
|
+
// // // null,
|
332
|
+
// // // 2
|
333
|
+
// // // )};`
|
334
|
+
// // // );
|
335
|
+
// // // const manifestFilename = 'i18n-chunks/manifest.js';
|
336
|
+
// // // compilation.emitAsset(manifestFilename, manifestSource);
|
337
|
+
// // // console.log(`Emitted i18n manifest: ${manifestFilename}`);
|
338
|
+
// // // }
|
339
|
+
// // // module.exports = {
|
340
|
+
// // // generateManifests,
|
341
|
+
// // // };
|
342
|
+
// // const { RawSource } = require('webpack-sources');
|
343
|
+
// // function generateManifests({
|
344
|
+
// // compilation,
|
345
|
+
// // allI18nKeys,
|
346
|
+
// // moduleToKeysMap,
|
347
|
+
// // chunkToModulesMap,
|
348
|
+
// // jsResourceI18nKeys,
|
349
|
+
// // }) {
|
350
|
+
// // const manifest = {
|
351
|
+
// // chunkToI18nMap: {},
|
352
|
+
// // locales: {},
|
353
|
+
// // };
|
354
|
+
// // const locales = Object.keys(allI18nKeys);
|
355
|
+
// // // For each chunk, collect all i18n keys used by its modules
|
356
|
+
// // for (const [chunkId, moduleResources] of chunkToModulesMap.entries()) {
|
357
|
+
// // const chunkI18nKeys = new Set();
|
358
|
+
// // for (const moduleResource of moduleResources) {
|
359
|
+
// // const keys = moduleToKeysMap.get(moduleResource);
|
360
|
+
// // if (keys) {
|
361
|
+
// // keys.forEach((key) => {
|
362
|
+
// // if (jsResourceI18nKeys.hasOwnProperty(key)) {
|
363
|
+
// // chunkI18nKeys.add(key);
|
364
|
+
// // }
|
365
|
+
// // });
|
366
|
+
// // }
|
367
|
+
// // }
|
368
|
+
// // // Generate i18n files per chunk and locale
|
369
|
+
// // for (const locale of locales) {
|
370
|
+
// // const i18nData = {};
|
371
|
+
// // const localeData = allI18nKeys[locale];
|
372
|
+
// // for (const key of chunkI18nKeys) {
|
373
|
+
// // // Find the key in the locale data
|
374
|
+
// // let found = false;
|
375
|
+
// // for (const section of Object.values(localeData)) {
|
376
|
+
// // if (section.hasOwnProperty(key)) {
|
377
|
+
// // i18nData[key] = section[key];
|
378
|
+
// // found = true;
|
379
|
+
// // break;
|
380
|
+
// // }
|
381
|
+
// // }
|
382
|
+
// // if (!found) {
|
383
|
+
// // console.warn(`Key "${key}" not found in locale "${locale}"`);
|
384
|
+
// // }
|
385
|
+
// // }
|
386
|
+
// // // Create the i18n chunk file
|
387
|
+
// // const moduleSource = `window.loadI18nChunk(${JSON.stringify(
|
388
|
+
// // i18nData,
|
389
|
+
// // null,
|
390
|
+
// // 2
|
391
|
+
// // )});`;
|
392
|
+
// // const filename = `i18n-chunks/${locale}/chunk-${chunkId}.js`;
|
393
|
+
// // compilation.emitAsset(filename, new RawSource(moduleSource));
|
394
|
+
// // // Update the manifest
|
395
|
+
// // if (!manifest.locales[locale]) {
|
396
|
+
// // manifest.locales[locale] = {};
|
397
|
+
// // }
|
398
|
+
// // if (!manifest.locales[locale][chunkId]) {
|
399
|
+
// // manifest.locales[locale][chunkId] = filename;
|
400
|
+
// // }
|
401
|
+
// // }
|
402
|
+
// // // Update the manifest for the chunk
|
403
|
+
// // manifest.chunkToI18nMap[chunkId] = chunkId;
|
404
|
+
// // }
|
405
|
+
// // // Emit the manifest file
|
406
|
+
// // const manifestSource = new RawSource(
|
407
|
+
// // `window.i18n = window.i18n || {}; window.i18n.manifest = ${JSON.stringify(
|
408
|
+
// // manifest,
|
409
|
+
// // null,
|
410
|
+
// // 2
|
411
|
+
// // )};`
|
412
|
+
// // );
|
413
|
+
// // const manifestFilename = 'i18n-chunks/manifest.js';
|
414
|
+
// // compilation.emitAsset(manifestFilename, manifestSource);
|
415
|
+
// // console.log(`Emitted i18n manifest: ${manifestFilename}`);
|
416
|
+
// // }
|
417
|
+
// // module.exports = {
|
418
|
+
// // generateManifests,
|
419
|
+
// // };
|
420
|
+
// const { RawSource } = require('webpack-sources');
|
421
|
+
// function generateManifests({
|
422
|
+
// compilation,
|
423
|
+
// allI18nKeys,
|
424
|
+
// moduleToKeysMap,
|
425
|
+
// cacheGroupToModulesMap,
|
426
|
+
// jsResourceI18nKeys,
|
427
|
+
// }) {
|
428
|
+
// const manifest = {
|
429
|
+
// cacheGroupToI18nMap: {},
|
430
|
+
// locales: {},
|
431
|
+
// };
|
432
|
+
// const locales = Object.keys(allI18nKeys);
|
433
|
+
// for (const [cacheGroupName, moduleResources] of cacheGroupToModulesMap.entries()) {
|
434
|
+
// const cacheGroupI18nKeys = new Set();
|
435
|
+
// for (const moduleResource of moduleResources) {
|
436
|
+
// const keys = moduleToKeysMap.get(moduleResource);
|
437
|
+
// if (keys) {
|
438
|
+
// keys.forEach((key) => {
|
439
|
+
// if (jsResourceI18nKeys.hasOwnProperty(key)) {
|
440
|
+
// cacheGroupI18nKeys.add(key);
|
441
|
+
// }
|
442
|
+
// });
|
443
|
+
// }
|
444
|
+
// }
|
445
|
+
// // Generate i18n files per cache group and locale
|
446
|
+
// for (const locale of locales) {
|
447
|
+
// const i18nData = {};
|
448
|
+
// const localeData = allI18nKeys[locale];
|
449
|
+
// for (const key of cacheGroupI18nKeys) {
|
450
|
+
// // Find the key in the locale data
|
451
|
+
// let found = false;
|
452
|
+
// for (const section of Object.values(localeData)) {
|
453
|
+
// if (section.hasOwnProperty(key)) {
|
454
|
+
// i18nData[key] = section[key];
|
455
|
+
// found = true;
|
456
|
+
// break;
|
457
|
+
// }
|
458
|
+
// }
|
459
|
+
// if (!found) {
|
460
|
+
// console.warn(`Key "${key}" not found in locale "${locale}"`);
|
461
|
+
// }
|
462
|
+
// }
|
463
|
+
// // Create the i18n chunk file
|
464
|
+
// const moduleSource = `window.loadI18nChunk(${JSON.stringify(
|
465
|
+
// i18nData,
|
466
|
+
// null,
|
467
|
+
// 2
|
468
|
+
// )});`;
|
469
|
+
// const filename = `i18n-chunks/${locale}/${cacheGroupName}.js`;
|
470
|
+
// compilation.emitAsset(filename, new RawSource(moduleSource));
|
471
|
+
// // Update the manifest
|
472
|
+
// if (!manifest.locales[locale]) {
|
473
|
+
// manifest.locales[locale] = {};
|
474
|
+
// }
|
475
|
+
// manifest.locales[locale][cacheGroupName] = filename;
|
476
|
+
// }
|
477
|
+
// // Update the manifest for the cache group
|
478
|
+
// manifest.cacheGroupToI18nMap[cacheGroupName] = cacheGroupName;
|
479
|
+
// }
|
480
|
+
// // Emit the manifest file
|
481
|
+
// const manifestSource = new RawSource(
|
482
|
+
// `window.i18n = window.i18n || {}; window.i18n.manifest = ${JSON.stringify(
|
483
|
+
// manifest,
|
484
|
+
// null,
|
485
|
+
// 2
|
486
|
+
// )};`
|
487
|
+
// );
|
488
|
+
// const manifestFilename = 'i18n-chunks/manifest.js';
|
489
|
+
// compilation.emitAsset(manifestFilename, manifestSource);
|
490
|
+
// console.log(`Emitted i18n manifest: ${manifestFilename}`);
|
491
|
+
// }
|
492
|
+
// module.exports = {
|
493
|
+
// generateManifests,
|
494
|
+
// };
|
495
|
+
const {
|
496
|
+
RawSource
|
497
|
+
} = require('webpack-sources');
|
498
|
+
function generateManifests({
|
499
|
+
compilation,
|
500
|
+
allI18nKeys,
|
501
|
+
moduleToKeysMap,
|
502
|
+
cacheGroupToModulesMap,
|
503
|
+
jsResourceI18nKeys
|
504
|
+
}) {
|
505
|
+
const manifest = {
|
506
|
+
cacheGroupToI18nMap: {},
|
507
|
+
locales: {}
|
508
|
+
};
|
509
|
+
const metaManifest = {
|
510
|
+
keyToCacheGroupMap: {}
|
511
|
+
};
|
512
|
+
const locales = Object.keys(allI18nKeys); // Map keys to cache groups
|
513
|
+
|
514
|
+
const keyToCacheGroupMap = {};
|
515
|
+
for (const [cacheGroupName, moduleResources] of cacheGroupToModulesMap.entries()) {
|
516
|
+
const cacheGroupI18nKeys = new Set();
|
517
|
+
for (const moduleResource of moduleResources) {
|
518
|
+
const keys = moduleToKeysMap.get(moduleResource);
|
519
|
+
if (keys) {
|
520
|
+
keys.forEach(key => {
|
521
|
+
if (jsResourceI18nKeys.hasOwnProperty(key)) {
|
522
|
+
cacheGroupI18nKeys.add(key); // Map key to cache group for meta manifest
|
523
|
+
|
524
|
+
if (!keyToCacheGroupMap[key]) {
|
525
|
+
keyToCacheGroupMap[key] = new Set();
|
526
|
+
}
|
527
|
+
keyToCacheGroupMap[key].add(cacheGroupName);
|
528
|
+
}
|
529
|
+
});
|
530
|
+
}
|
531
|
+
} // Generate i18n files per cache group and locale
|
532
|
+
|
533
|
+
for (const locale of locales) {
|
534
|
+
const i18nData = {};
|
535
|
+
const localeData = allI18nKeys[locale];
|
536
|
+
for (const key of cacheGroupI18nKeys) {
|
537
|
+
// Find the key in the locale data
|
538
|
+
let found = false;
|
539
|
+
for (const section of Object.values(localeData)) {
|
540
|
+
if (section.hasOwnProperty(key)) {
|
541
|
+
i18nData[key] = section[key];
|
542
|
+
found = true;
|
543
|
+
break;
|
544
|
+
}
|
545
|
+
}
|
546
|
+
if (!found) {
|
547
|
+
console.warn(`Key "${key}" not found in locale "${locale}"`);
|
548
|
+
}
|
549
|
+
} // Create the i18n chunk file
|
550
|
+
|
551
|
+
const moduleSource = `window.loadI18nChunk(${JSON.stringify(i18nData, null, 2)});`;
|
552
|
+
const filename = `i18n-chunks/${locale}/${cacheGroupName}.js`;
|
553
|
+
compilation.emitAsset(filename, new RawSource(moduleSource)); // Update the main manifest
|
554
|
+
|
555
|
+
if (!manifest.locales[locale]) {
|
556
|
+
manifest.locales[locale] = {};
|
557
|
+
}
|
558
|
+
manifest.locales[locale][cacheGroupName] = filename;
|
559
|
+
} // Update the cacheGroupToI18nMap
|
560
|
+
|
561
|
+
manifest.cacheGroupToI18nMap[cacheGroupName] = cacheGroupName;
|
562
|
+
} // Generate the meta manifest by converting Sets to Arrays
|
563
|
+
|
564
|
+
for (const [key, cacheGroupsSet] of Object.entries(keyToCacheGroupMap)) {
|
565
|
+
metaManifest.keyToCacheGroupMap[key] = Array.from(cacheGroupsSet);
|
566
|
+
} // Emit the main manifest file
|
567
|
+
|
568
|
+
const manifestSource = new RawSource(`window.i18n = window.i18n || {}; window.i18n.manifest = ${JSON.stringify(manifest, null, 2)};`);
|
569
|
+
const manifestFilename = 'i18n-chunks/manifest.js';
|
570
|
+
compilation.emitAsset(manifestFilename, manifestSource);
|
571
|
+
console.log(`Emitted i18n manifest: ${manifestFilename}`); // Emit the meta manifest file
|
572
|
+
|
573
|
+
const metaManifestSource = new RawSource(JSON.stringify(metaManifest, null, 2));
|
574
|
+
const metaManifestFilename = 'i18n-chunks/metaManifest.json';
|
575
|
+
compilation.emitAsset(metaManifestFilename, metaManifestSource);
|
576
|
+
console.log(`Emitted i18n meta manifest: ${metaManifestFilename}`);
|
577
|
+
}
|
578
|
+
module.exports = {
|
579
|
+
generateManifests
|
580
|
+
};
|