@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
@@ -4,66 +4,75 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.default = void 0;
|
7
|
-
|
8
7
|
var _webpackSources = require("webpack-sources");
|
9
|
-
|
10
8
|
var _utils = require("./utils");
|
11
|
-
|
12
9
|
var _getI18nKeysFormModules = _interopRequireDefault(require("./utils/getI18nKeysFormModules"));
|
13
|
-
|
14
|
-
|
15
|
-
|
10
|
+
var _createRegularManifest = require("./utils/createRegularManifest");
|
11
|
+
var _createMetaManifest = require("./utils/createMetaManifest");
|
12
|
+
var _applyMetaManifest = require("./utils/applyMetaManifest");
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
16
14
|
/**
|
17
15
|
* this plugin was creating the chunk specific i18n chunk's.
|
18
16
|
*/
|
19
|
-
|
17
|
+
|
20
18
|
const pluginName = 'I18nFilesEmitter';
|
21
19
|
const MODULE_TYPE = 'json/i18n';
|
22
|
-
|
23
20
|
const i18ntype = locale => `${MODULE_TYPE}/${locale}`;
|
24
|
-
|
25
21
|
class I18nFilesEmitter {
|
26
22
|
constructor({
|
27
23
|
allI18nObject,
|
28
24
|
i18nManifestFileName,
|
29
25
|
filenameTemplate,
|
30
26
|
locales,
|
31
|
-
jsonpFunc
|
27
|
+
jsonpFunc,
|
28
|
+
i18nMetaManifestFileName,
|
29
|
+
entryPointNames = ['main'],
|
30
|
+
masterChunkFileName = 'master.i18n.js'
|
32
31
|
}) {
|
33
32
|
this.locales = locales;
|
34
33
|
this.allI18nObject = allI18nObject;
|
35
|
-
this.filenameTemplate = filenameTemplate;
|
36
|
-
|
34
|
+
this.filenameTemplate = filenameTemplate;
|
37
35
|
this.jsonpFunc = jsonpFunc;
|
38
36
|
this.prevHashes = {};
|
39
37
|
this.i18nManifestFileName = i18nManifestFileName;
|
38
|
+
this.i18nMetaManifestFileName = i18nMetaManifestFileName || 'i18n-chunk/metaManifest.json';
|
39
|
+
this.regularManifest = {};
|
40
|
+
this.detailedManifest = {};
|
41
|
+
this.entryPointNames = Array.isArray(entryPointNames) ? entryPointNames : [entryPointNames];
|
42
|
+
this.masterChunkFileName = masterChunkFileName;
|
43
|
+
this.generatedMetaManifest = {
|
44
|
+
modules: {},
|
45
|
+
masterKeys: []
|
46
|
+
};
|
47
|
+
this.extraKeys = new Set();
|
48
|
+
this.movedKeys = new Set();
|
49
|
+
this.entryPointKeys = new Set();
|
50
|
+
this.combinedChunks = {};
|
51
|
+
this.moduleIdMap = new Map();
|
52
|
+
this.moduleToChunks = new Map();
|
53
|
+
this.resourceToModule = new Map();
|
40
54
|
}
|
41
|
-
|
42
55
|
emitAsset(compilation, filename, source, info) {
|
43
|
-
// NOTE: info support available since webpack v4.40.0 https://webpack.js.org/api/stats/#asset-objects
|
44
56
|
if (!compilation.emitAsset) {
|
45
57
|
compilation.assets[filename] = source;
|
46
58
|
} else {
|
47
59
|
compilation.emitAsset(filename, source, info);
|
48
60
|
}
|
49
|
-
}
|
50
|
-
|
51
|
-
|
61
|
+
}
|
52
62
|
getI18nObjectByLocale(i18nKeys, locale) {
|
53
63
|
const data = {};
|
54
64
|
i18nKeys.forEach(key => {
|
55
|
-
|
65
|
+
if (this.allI18nObject[locale] && this.allI18nObject[locale][key] !== undefined) {
|
66
|
+
data[key] = this.allI18nObject[locale][key];
|
67
|
+
}
|
56
68
|
});
|
57
69
|
return data;
|
58
70
|
}
|
59
|
-
|
60
71
|
getTemplateString(i18nKeys, locale) {
|
61
|
-
|
62
|
-
return `${this.jsonpFunc}(${(0, _utils.jsonToString)(i18nObject)});`;
|
72
|
+
const i18nObject = this.getI18nObjectByLocale(i18nKeys, locale);
|
73
|
+
return `${this.jsonpFunc}(${(0, _utils.jsonToString)(i18nObject)});`;
|
63
74
|
}
|
64
|
-
|
65
75
|
renderI18nLocaleChunk(chunk, locale, i18nKeys) {
|
66
|
-
// renderI18nLocaleChunk(chunk, locale, i18nKeys, compilation) {
|
67
76
|
const filenameTemplate = this.filenameTemplate.replace(/\[locale\]/g, locale);
|
68
77
|
const pathOptions = {
|
69
78
|
chunk,
|
@@ -77,7 +86,48 @@ class I18nFilesEmitter {
|
|
77
86
|
hash: chunk.contentHash[i18ntype(locale)]
|
78
87
|
};
|
79
88
|
}
|
89
|
+
captureModuleIds(compilation) {
|
90
|
+
console.log('Capturing final module IDs from compilation...');
|
91
|
+
this.moduleIdMap.clear();
|
92
|
+
this.resourceToModule.clear();
|
93
|
+
this.moduleToChunks.clear();
|
94
|
+
|
95
|
+
// Process all modules to build our mapping
|
96
|
+
compilation.modules.forEach(module => {
|
97
|
+
// Skip modules without resources
|
98
|
+
if (!module.resource) return;
|
99
|
+
const originalId = module.resource;
|
100
|
+
const finalId = module.id;
|
80
101
|
|
102
|
+
// Map resource path to final module ID
|
103
|
+
this.moduleIdMap.set(originalId, finalId);
|
104
|
+
// Map resource path to module object
|
105
|
+
this.resourceToModule.set(originalId, module);
|
106
|
+
|
107
|
+
// Build chunk membership for each module
|
108
|
+
const chunkIds = Array.from(module.chunksIterable || []).map(chunk => chunk.id).filter(Boolean);
|
109
|
+
if (chunkIds.length > 0) {
|
110
|
+
this.moduleToChunks.set(originalId, chunkIds);
|
111
|
+
}
|
112
|
+
});
|
113
|
+
|
114
|
+
// console.log(`Captured ${this.moduleIdMap.size} module ID mappings`);
|
115
|
+
}
|
116
|
+
gatherModuleDetails(chunk, i18nKeys) {
|
117
|
+
if (!i18nKeys.length) return;
|
118
|
+
const stableModuleIds = Array.from(chunk.modulesIterable).map(module => module.resource).filter(Boolean);
|
119
|
+
const moduleKey = stableModuleIds.length ? stableModuleIds[0] : `chunk_${chunk.id}`;
|
120
|
+
if (!this.detailedManifest[moduleKey]) {
|
121
|
+
this.detailedManifest[moduleKey] = {
|
122
|
+
chunkId: chunk.id,
|
123
|
+
chunkName: chunk.name || `chunk_${chunk.id}`,
|
124
|
+
keysUsed: new Set()
|
125
|
+
};
|
126
|
+
}
|
127
|
+
i18nKeys.forEach(key => {
|
128
|
+
this.detailedManifest[moduleKey].keysUsed.add(key);
|
129
|
+
});
|
130
|
+
}
|
81
131
|
emitI18nFilesForChunk(chunk, compilation) {
|
82
132
|
const i18nKeys = (0, _getI18nKeysFormModules.default)(chunk.modulesIterable);
|
83
133
|
const manifestForChunk = {
|
@@ -85,16 +135,17 @@ class I18nFilesEmitter {
|
|
85
135
|
hasI18n: false,
|
86
136
|
hasChanges: false
|
87
137
|
};
|
88
|
-
|
89
138
|
if (!i18nKeys.length) {
|
90
|
-
// why it is not checked as 0
|
91
139
|
return manifestForChunk;
|
92
140
|
}
|
93
|
-
|
94
|
-
manifestForChunk.hasI18n = true;
|
95
|
-
|
141
|
+
this.gatherModuleDetails(chunk, i18nKeys);
|
142
|
+
manifestForChunk.hasI18n = true;
|
143
|
+
const isEntryPoint = this.isPartOfEntryPoint(chunk, compilation);
|
144
|
+
if (isEntryPoint) {
|
145
|
+
i18nKeys.forEach(key => this.entryPointKeys.add(key));
|
146
|
+
}
|
96
147
|
this.locales.forEach(locale => {
|
97
|
-
const result = this.renderI18nLocaleChunk(chunk, locale, i18nKeys
|
148
|
+
const result = this.renderI18nLocaleChunk(chunk, locale, i18nKeys);
|
98
149
|
const {
|
99
150
|
filenameTemplate,
|
100
151
|
pathOptions,
|
@@ -104,80 +155,146 @@ class I18nFilesEmitter {
|
|
104
155
|
} = result;
|
105
156
|
const filePath = compilation.getPath(filenameTemplate, pathOptions);
|
106
157
|
manifestForChunk.assets[locale] = filePath;
|
107
|
-
|
108
158
|
if (this.prevHashes[identifier] === hash) {
|
109
159
|
return;
|
110
160
|
}
|
111
|
-
|
112
161
|
manifestForChunk.hasChanges = true;
|
113
162
|
this.prevHashes[identifier] = hash;
|
114
|
-
|
163
|
+
const renderedContent = render().source();
|
164
|
+
this.emitAsset(compilation, filePath, new _webpackSources.RawSource(renderedContent), {
|
115
165
|
locale,
|
116
166
|
chunkId: chunk.id,
|
117
167
|
chunkName: chunk.name
|
118
|
-
});
|
168
|
+
});
|
169
|
+
if (!this.combinedChunks[locale]) {
|
170
|
+
this.combinedChunks[locale] = [];
|
171
|
+
}
|
172
|
+
this.combinedChunks[locale].push({
|
173
|
+
path: filePath,
|
174
|
+
content: renderedContent,
|
175
|
+
data: this.getI18nObjectByLocale(i18nKeys, locale),
|
176
|
+
isEntryPoint: isEntryPoint
|
177
|
+
});
|
119
178
|
});
|
120
179
|
return manifestForChunk;
|
121
180
|
}
|
181
|
+
isPartOfEntryPoint(chunk, compilation) {
|
182
|
+
let isEntryChunk = false;
|
183
|
+
this.entryPointNames.forEach(entryName => {
|
184
|
+
const entryPoint = compilation.entrypoints.get(entryName);
|
185
|
+
if (entryPoint && entryPoint.chunks.includes(chunk)) {
|
186
|
+
isEntryChunk = true;
|
187
|
+
}
|
188
|
+
});
|
189
|
+
return isEntryChunk;
|
190
|
+
}
|
191
|
+
createMetaManifestWithFinalIds(compilation) {
|
192
|
+
console.log('Creating meta manifest with final module IDs...');
|
193
|
+
const finalMetaManifest = {
|
194
|
+
modules: {},
|
195
|
+
masterKeys: []
|
196
|
+
};
|
197
|
+
for (const [resourcePath, moduleData] of Object.entries(this.detailedManifest)) {
|
198
|
+
const finalId = this.moduleIdMap.get(resourcePath) || resourcePath;
|
199
|
+
const chunkName = moduleData.chunkName || `chunk_${finalId}`;
|
200
|
+
const keysArray = Array.isArray(moduleData.keysUsed) ? moduleData.keysUsed : Array.from(moduleData.keysUsed);
|
201
|
+
if (keysArray.length > 0) {
|
202
|
+
finalMetaManifest.modules[chunkName] = {
|
203
|
+
id: moduleData.chunkId,
|
204
|
+
finalId: finalId,
|
205
|
+
resourcePath: resourcePath,
|
206
|
+
keys: keysArray
|
207
|
+
};
|
208
|
+
}
|
209
|
+
}
|
210
|
+
this.generatedMetaManifest = finalMetaManifest;
|
211
|
+
console.log(`Created meta manifest with ${Object.keys(finalMetaManifest.modules).length} modules`);
|
212
|
+
}
|
213
|
+
compareWithRemoteManifest(compilation) {
|
214
|
+
(0, _applyMetaManifest.applyMetaManifest)(compilation, this);
|
215
|
+
}
|
216
|
+
emitMasterChunks(compilation) {
|
217
|
+
const combinedKeys = new Set([...this.extraKeys, ...this.movedKeys, ...(this.generatedMetaManifest.masterKeys || [])]);
|
122
218
|
|
219
|
+
// console.log(`Extra and moved keys to add to master chunk: ${combinedKeys.size}`);
|
220
|
+
// console.log(`Entry point keys: ${this.entryPointKeys.size}`);
|
221
|
+
|
222
|
+
// Add entry point keys to the master keys in meta manifest
|
223
|
+
if (this.generatedMetaManifest) {
|
224
|
+
this.generatedMetaManifest.masterKeys = [...this.generatedMetaManifest.masterKeys, ...Array.from(this.entryPointKeys)];
|
225
|
+
}
|
226
|
+
|
227
|
+
// Create a master object that contains all needed keys
|
228
|
+
const allMasterKeys = new Set([...combinedKeys, ...this.entryPointKeys]);
|
229
|
+
|
230
|
+
// console.log(`Creating master chunks with ${allMasterKeys.size} total keys`);
|
231
|
+
|
232
|
+
for (const locale of this.locales) {
|
233
|
+
try {
|
234
|
+
const masterI18nObject = this.getI18nObjectByLocale([...allMasterKeys], locale);
|
235
|
+
console.log(`Master i18n object has ${Object.keys(masterI18nObject).length} keys`);
|
236
|
+
const finalContent = `${this.jsonpFunc}(${(0, _utils.jsonToString)(masterI18nObject)});`;
|
237
|
+
const outputPath = `i18n-chunk/${locale}/${this.masterChunkFileName}`;
|
238
|
+
this.emitAsset(compilation, outputPath, new _webpackSources.RawSource(finalContent), {
|
239
|
+
locale,
|
240
|
+
chunkName: 'master',
|
241
|
+
desc: 'Combined master i18n chunk'
|
242
|
+
});
|
243
|
+
if (!this.regularManifest.master) {
|
244
|
+
this.regularManifest.master = {};
|
245
|
+
}
|
246
|
+
this.regularManifest.master[locale] = outputPath;
|
247
|
+
} catch (error) {
|
248
|
+
console.error(`ERROR processing master chunk for locale ${locale}:`, error.message);
|
249
|
+
try {
|
250
|
+
console.log(`Attempting to emit a fallback master chunk for locale ${locale}`);
|
251
|
+
const fallbackI18nObject = this.getI18nObjectByLocale([...combinedKeys], locale);
|
252
|
+
const fallbackContent = `${this.jsonpFunc}(${(0, _utils.jsonToString)(fallbackI18nObject)});`;
|
253
|
+
const outputPath = `i18n-chunk/${locale}/${this.masterChunkFileName}`;
|
254
|
+
this.emitAsset(compilation, outputPath, new _webpackSources.RawSource(fallbackContent), {
|
255
|
+
locale,
|
256
|
+
chunkName: 'master',
|
257
|
+
desc: 'Fallback master i18n chunk (only moved/extra keys)'
|
258
|
+
});
|
259
|
+
if (!this.regularManifest.master) {
|
260
|
+
this.regularManifest.master = {};
|
261
|
+
}
|
262
|
+
this.regularManifest.master[locale] = outputPath;
|
263
|
+
console.log(`Emitted fallback master chunk for locale ${locale}: ${outputPath}`);
|
264
|
+
} catch (fallbackError) {
|
265
|
+
console.error(`Failed to emit fallback master chunk for locale ${locale}:`, fallbackError.message);
|
266
|
+
}
|
267
|
+
}
|
268
|
+
}
|
269
|
+
}
|
123
270
|
emitI18nAssert(compilation) {
|
124
|
-
|
125
|
-
|
271
|
+
console.log('Starting I18n asset emission process...');
|
272
|
+
this.captureModuleIds(compilation);
|
273
|
+
this.entryPointKeys = new Set();
|
126
274
|
compilation.chunks.forEach(chunk => {
|
127
275
|
const manifestForChunk = this.emitI18nFilesForChunk(chunk, compilation);
|
128
|
-
|
129
276
|
if (manifestForChunk.hasI18n) {
|
130
|
-
|
131
|
-
needEmitManifest = needEmitManifest || manifestForChunk.hasChanges;
|
277
|
+
this.regularManifest[chunk.id] = manifestForChunk.assets;
|
132
278
|
}
|
133
279
|
});
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
280
|
+
this.createMetaManifestWithFinalIds(compilation);
|
281
|
+
this.compareWithRemoteManifest(compilation);
|
282
|
+
this.emitMasterChunks(compilation);
|
283
|
+
(0, _createRegularManifest.createRegularManifest)(compilation, this);
|
284
|
+
const metaManifestSource = new _webpackSources.RawSource(JSON.stringify(this.generatedMetaManifest, null, 2));
|
285
|
+
this.emitAsset(compilation, this.i18nMetaManifestFileName, metaManifestSource, {
|
286
|
+
desc: 'Updated meta manifest with master keys'
|
287
|
+
});
|
288
|
+
console.log('Completed I18n asset emission process');
|
141
289
|
}
|
142
|
-
|
143
290
|
apply(compiler) {
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
(result, { chunk }) => {
|
149
|
-
this.renderChunk(result, compilation, chunk);
|
150
|
-
}
|
151
|
-
);
|
152
|
-
compilation.chunkTemplate.hooks.renderManifest.tap(
|
153
|
-
pluginName,
|
154
|
-
(result, { chunk }) => {
|
155
|
-
this.renderChunk(result, compilation, chunk);
|
156
|
-
}
|
157
|
-
);
|
158
|
-
});
|
159
|
-
*/
|
160
|
-
// this below hook was tapped for create asssets(file) for chunk specific i18nChunk Files
|
161
|
-
compiler.hooks.emit.tap(pluginName, compilation => {
|
291
|
+
compiler.hooks.afterCompile.tap(pluginName, compilation => {
|
292
|
+
this.compilation = compilation;
|
293
|
+
});
|
294
|
+
compiler.hooks.emit.tapAsync(pluginName, (compilation, callback) => {
|
162
295
|
this.emitI18nAssert(compilation);
|
296
|
+
callback();
|
163
297
|
});
|
164
298
|
}
|
165
|
-
/*
|
166
|
-
renderChunk(result, compilation, chunk) {
|
167
|
-
const i18nKeys = getI18nKeysFormModules(chunk.modulesIterable);
|
168
|
-
// TODO: need to discuss with vimal ji can we chose this place for add i18n locale files ????
|
169
|
-
// IDEA: we chose this place for add i18n locale files ????
|
170
|
-
if (i18nKeys.length > 0) {
|
171
|
-
Object.keys(this.allI18nObject).forEach(locale => {
|
172
|
-
result.push(
|
173
|
-
this.renderI18nLocaleChunk(chunk, locale, i18nKeys, compilation)
|
174
|
-
);
|
175
|
-
});
|
176
|
-
}
|
177
|
-
}
|
178
|
-
*/
|
179
|
-
|
180
|
-
|
181
299
|
}
|
182
|
-
|
183
300
|
exports.default = I18nFilesEmitter;
|
@@ -4,16 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.default = void 0;
|
7
|
-
|
8
7
|
var _utils = require("./utils");
|
9
|
-
|
10
8
|
var _I18nDependency = require("./I18nDependency");
|
11
|
-
|
12
9
|
var _NullFactory = _interopRequireDefault(require("webpack/lib/NullFactory"));
|
13
|
-
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15
|
-
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
16
11
|
const pluginName = 'I18nKeysIdentifer';
|
12
|
+
|
17
13
|
/**
|
18
14
|
* this plugin search the i18 keys and make it as I18nDependency.
|
19
15
|
* how it works?
|
@@ -23,17 +19,14 @@ const pluginName = 'I18nKeysIdentifer';
|
|
23
19
|
* after the walk of AST we get some I18n keys
|
24
20
|
* then we make it as I18nDependency.
|
25
21
|
*/
|
26
|
-
|
27
22
|
class I18nKeysIdentifer {
|
28
23
|
constructor(jsResourceI18nKeys) {
|
29
24
|
this.jsResourceI18nKeys = jsResourceI18nKeys;
|
30
25
|
}
|
31
|
-
|
32
26
|
defineConfigarationForI18nDependency(compilation) {
|
33
27
|
compilation.dependencyFactories.set(_I18nDependency.I18nDependency, new _NullFactory.default());
|
34
28
|
compilation.dependencyTemplates.set(_I18nDependency.I18nDependency, new _I18nDependency.I18nDependencyTemplate());
|
35
29
|
}
|
36
|
-
|
37
30
|
addI18nDependency(module, i18nKeys) {
|
38
31
|
const identifier = `i18n ${module.resource}`;
|
39
32
|
const dep = new _I18nDependency.I18nDependency({
|
@@ -42,46 +35,43 @@ class I18nKeysIdentifer {
|
|
42
35
|
}, module.context, 0);
|
43
36
|
module.addDependency(dep);
|
44
37
|
}
|
45
|
-
|
46
38
|
apply(compiler) {
|
47
39
|
compiler.hooks.thisCompilation.tap(pluginName, (compilation, params) => {
|
48
40
|
// this below hook was tapped for we use I18nDependency
|
49
41
|
// so we must define module factory for I18nDependency
|
50
42
|
// and we must define how it import statement look like I18nDependencyTemplate
|
51
|
-
this.defineConfigarationForI18nDependency(compilation);
|
43
|
+
this.defineConfigarationForI18nDependency(compilation);
|
52
44
|
|
45
|
+
// handler for parser
|
53
46
|
const handler = parser => {
|
54
47
|
parser.hooks.program.tap(pluginName, (ast, commmets) => {
|
55
48
|
const {
|
56
49
|
module
|
57
|
-
} = parser.state;
|
58
|
-
|
50
|
+
} = parser.state;
|
51
|
+
//
|
59
52
|
if (!(module && /\.jsx?$/.test(module.resource))) {
|
60
53
|
return;
|
61
|
-
}
|
62
|
-
|
63
|
-
|
54
|
+
}
|
55
|
+
// i18n grep proper contract regex
|
64
56
|
let i18nKeys = (0, _utils.collectI18nKeysfromAST)(ast, this.jsResourceI18nKeys);
|
65
|
-
i18nKeys = i18nKeys.concat(
|
57
|
+
i18nKeys = i18nKeys.concat(
|
58
|
+
// i18n grep proper contract regex
|
66
59
|
(0, _utils.collectI18nKeysfromComments)(commmets, this.jsResourceI18nKeys));
|
67
|
-
|
68
60
|
if (i18nKeys.length) {
|
69
61
|
this.addI18nDependency(module, i18nKeys);
|
70
62
|
}
|
71
63
|
});
|
72
|
-
};
|
64
|
+
};
|
73
65
|
|
66
|
+
// this below hook was tapped for collect I18n Key from files and add as Deppenensy
|
74
67
|
|
75
68
|
const factory = params.normalModuleFactory;
|
76
69
|
factory.hooks.parser.for('javascript/auto').tap(pluginName, handler);
|
77
70
|
factory.hooks.parser.for('javascript/dynamic').tap(pluginName, handler);
|
78
71
|
});
|
79
72
|
}
|
80
|
-
|
81
73
|
}
|
82
|
-
|
83
74
|
exports.default = I18nKeysIdentifer;
|
84
|
-
|
85
75
|
I18nKeysIdentifer.isChunkHasI18n = function (chunk) {
|
86
76
|
for (const module of chunk.modulesIterable) {
|
87
77
|
for (const dep of module.dependencies) {
|
@@ -90,6 +80,5 @@ I18nKeysIdentifer.isChunkHasI18n = function (chunk) {
|
|
90
80
|
}
|
91
81
|
}
|
92
82
|
}
|
93
|
-
|
94
83
|
return false;
|
95
84
|
};
|
@@ -4,23 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.default = void 0;
|
7
|
-
|
8
7
|
var _utils = require("./utils");
|
9
|
-
|
10
8
|
var _webpack = require("webpack");
|
11
|
-
|
12
9
|
var _I18nKeysIdentifer = _interopRequireDefault(require("./I18nKeysIdentifer"));
|
13
|
-
|
14
10
|
var _I18nFilesEmitter = _interopRequireDefault(require("./I18nFilesEmitter"));
|
15
|
-
|
16
11
|
var _I18nDownlodLogic = _interopRequireDefault(require("./I18nDownlodLogic"));
|
17
|
-
|
18
12
|
var _getI18nKeysFormModules = _interopRequireDefault(require("./utils/getI18nKeysFormModules"));
|
19
|
-
|
20
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
21
|
-
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
22
14
|
// #region initial
|
23
|
-
|
24
15
|
/**
|
25
16
|
* @TODO:
|
26
17
|
* [?] add comment line options for properties file and get all keys form property file do right way to genarate them
|
@@ -39,16 +30,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
39
30
|
* - file means your machine files
|
40
31
|
* - asset means that also file but that will create by webpack after build
|
41
32
|
*/
|
33
|
+
|
42
34
|
// const getI18nLocales = require('./utils/getI18nLocales');
|
43
35
|
// const { ConcatSource, SourceMapSource, OriginalSource } = sources;
|
44
36
|
const {
|
45
37
|
createHash
|
46
38
|
} = _webpack.util;
|
47
39
|
const MODULE_TYPE = 'json/i18n';
|
48
|
-
|
49
40
|
const i18ntype = locale => `${MODULE_TYPE}/${locale}`;
|
50
|
-
|
51
41
|
const pluginName = 'i18n-plugin';
|
42
|
+
|
52
43
|
/**
|
53
44
|
* @typedef I18nPluginOptions
|
54
45
|
* @property {String} filenameTemplate this was template for i18n chunk
|
@@ -77,15 +68,16 @@ class I18nPlugin {
|
|
77
68
|
propertiesFolder,
|
78
69
|
jsonpFunc
|
79
70
|
} = this.options;
|
80
|
-
this.publicPath = publicPath;
|
81
|
-
|
71
|
+
this.publicPath = publicPath;
|
72
|
+
// gethere i18n keys and values
|
82
73
|
this.jsResourceI18nKeys = jsResource ? (0, _utils.getPropertiesAsJSON)(jsResource) : {};
|
83
74
|
this.allI18nObject = (0, _utils.getAllI18n)({
|
84
75
|
folderPath: propertiesFolder,
|
85
76
|
disableDefault,
|
86
77
|
jsResourceI18nKeys: this.jsResourceI18nKeys
|
87
|
-
});
|
78
|
+
});
|
88
79
|
|
80
|
+
// initialize base data's and plugis
|
89
81
|
this.locales = Object.keys(this.allI18nObject);
|
90
82
|
this.i18nKeysIdentifer = new _I18nKeysIdentifer.default(this.jsResourceI18nKeys);
|
91
83
|
this.i18nFilesEmitter = new _I18nFilesEmitter.default({
|
@@ -102,7 +94,6 @@ class I18nPlugin {
|
|
102
94
|
localeVarName
|
103
95
|
});
|
104
96
|
}
|
105
|
-
|
106
97
|
maintainHashForAllI18nAssets(compilation) {
|
107
98
|
/**
|
108
99
|
* we write chunkHash logic inside of our plugin Because we only add Dependency not Module.
|
@@ -122,14 +113,13 @@ class I18nPlugin {
|
|
122
113
|
hashDigestLength
|
123
114
|
} = outputOptions;
|
124
115
|
const i18nKeys = (0, _getI18nKeysFormModules.default)(chunk.modulesIterable);
|
125
|
-
|
126
116
|
if (!i18nKeys.length) {
|
127
117
|
return;
|
128
118
|
}
|
129
|
-
|
130
119
|
const {
|
131
120
|
contentHash
|
132
|
-
} = chunk;
|
121
|
+
} = chunk;
|
122
|
+
// contentHash = {
|
133
123
|
// javascript: 'abcd2938',
|
134
124
|
// 'css/mini-extract': 'askdijasod'
|
135
125
|
// };
|
@@ -141,19 +131,20 @@ class I18nPlugin {
|
|
141
131
|
});
|
142
132
|
});
|
143
133
|
}
|
144
|
-
|
145
134
|
apply(compiler) {
|
146
135
|
this.i18nKeysIdentifer.apply(compiler);
|
147
136
|
compiler.hooks.thisCompilation.tap(pluginName, compilation => {
|
148
137
|
// this below hook was tapped for hash for the specific i18nChunk Files and write logic to requireEnsure
|
149
|
-
this.maintainHashForAllI18nAssets(compilation);
|
138
|
+
this.maintainHashForAllI18nAssets(compilation);
|
139
|
+
|
140
|
+
// const { mainTemplate } = compilation;
|
150
141
|
// this.addDownloadLogicOfI18nInMainTemplate(mainTemplate);
|
151
142
|
});
|
152
143
|
this.i18nFilesEmitter.apply(compiler);
|
153
144
|
this.i18nDownlodLogic.apply(compiler);
|
154
145
|
}
|
155
|
-
|
156
146
|
}
|
147
|
+
|
157
148
|
/*
|
158
149
|
// TODO: need to reimplement this logic
|
159
150
|
// NOTE: this logic for split all content hash per mani chunk
|
@@ -180,6 +171,4 @@ class I18nPlugin {
|
|
180
171
|
|
181
172
|
}
|
182
173
|
*/
|
183
|
-
|
184
|
-
|
185
174
|
exports.default = I18nPlugin;
|