@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,279 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.applyMetaManifest = applyMetaManifest;
|
7
|
+
var _fs = _interopRequireDefault(require("fs"));
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
9
|
+
function applyMetaManifest(compilation, plugin) {
|
10
|
+
const {
|
11
|
+
moduleIdMap
|
12
|
+
} = plugin;
|
13
|
+
const manifestPath = './metaManifest.json';
|
14
|
+
if (!plugin.detailedManifest || Object.keys(plugin.detailedManifest).length === 0) {
|
15
|
+
console.warn('No detailedManifest available, skipping manifest comparison');
|
16
|
+
return {
|
17
|
+
extraKeys: new Set(),
|
18
|
+
movedKeys: new Set(),
|
19
|
+
error: 'No detailedManifest available'
|
20
|
+
};
|
21
|
+
}
|
22
|
+
|
23
|
+
// Track keys in current build
|
24
|
+
const currentBuildKeys = new Set();
|
25
|
+
const currentKeyToModule = new Map();
|
26
|
+
const currentModules = new Map();
|
27
|
+
const currentKeySets = new Map();
|
28
|
+
const moduleIdToName = new Map();
|
29
|
+
|
30
|
+
// Process current build modules with final IDs
|
31
|
+
for (const [resourcePath, chunkData] of Object.entries(plugin.detailedManifest)) {
|
32
|
+
// Get the final module ID if it exists in our mapping
|
33
|
+
const finalModuleId = moduleIdMap.get(resourcePath) || resourcePath;
|
34
|
+
const chunkName = chunkData.chunkName || `chunk_${chunkData.chunkId || "unknown"}`;
|
35
|
+
|
36
|
+
// Store module name mapping for better logging
|
37
|
+
moduleIdToName.set(finalModuleId, chunkName);
|
38
|
+
const keys = Array.isArray(chunkData.keysUsed) ? chunkData.keysUsed : Array.from(chunkData.keysUsed);
|
39
|
+
|
40
|
+
// Skip empty modules
|
41
|
+
if (keys.length === 0) continue;
|
42
|
+
|
43
|
+
// Sort keys for consistent comparison
|
44
|
+
const sortedKeys = [...keys].sort();
|
45
|
+
const keySetString = sortedKeys.join(',');
|
46
|
+
|
47
|
+
// Store module data using final IDs
|
48
|
+
currentModules.set(finalModuleId, {
|
49
|
+
id: finalModuleId,
|
50
|
+
resourcePath: resourcePath,
|
51
|
+
chunkId: chunkData.chunkId,
|
52
|
+
name: chunkName,
|
53
|
+
keys: sortedKeys
|
54
|
+
});
|
55
|
+
|
56
|
+
// Store key set for module fingerprinting
|
57
|
+
currentKeySets.set(keySetString, finalModuleId);
|
58
|
+
|
59
|
+
// Store individual key mappings
|
60
|
+
keys.forEach(key => {
|
61
|
+
currentBuildKeys.add(key);
|
62
|
+
currentKeyToModule.set(key, finalModuleId);
|
63
|
+
});
|
64
|
+
}
|
65
|
+
const currentKeyCount = currentBuildKeys.size;
|
66
|
+
const currentModuleCount = currentModules.size;
|
67
|
+
console.log(`Current build: ${currentKeyCount} keys in ${currentModuleCount} modules`);
|
68
|
+
try {
|
69
|
+
// Read from specified manifest path
|
70
|
+
if (!_fs.default.existsSync(manifestPath)) {
|
71
|
+
console.warn(`Meta manifest not found at ${manifestPath}`);
|
72
|
+
return {
|
73
|
+
extraKeys: new Set(),
|
74
|
+
movedKeys: new Set(),
|
75
|
+
error: `Meta manifest not found at ${manifestPath}`
|
76
|
+
};
|
77
|
+
}
|
78
|
+
const fileContent = _fs.default.readFileSync(manifestPath, 'utf8');
|
79
|
+
const remoteMetaManifest = JSON.parse(fileContent);
|
80
|
+
|
81
|
+
// Handle non-existent or invalid modules
|
82
|
+
if (!remoteMetaManifest.modules) {
|
83
|
+
console.warn('Meta manifest does not contain modules section');
|
84
|
+
return {
|
85
|
+
extraKeys: new Set(),
|
86
|
+
movedKeys: new Set(),
|
87
|
+
error: 'Meta manifest does not contain modules section'
|
88
|
+
};
|
89
|
+
}
|
90
|
+
|
91
|
+
// Track all keys in remote manifest modules
|
92
|
+
const remoteModuleKeys = new Set();
|
93
|
+
const remoteKeyToModule = new Map();
|
94
|
+
const remoteModules = new Map();
|
95
|
+
const remoteKeySets = new Map();
|
96
|
+
const remoteModuleIdToName = new Map();
|
97
|
+
const moduleEquivalenceMap = new Map();
|
98
|
+
|
99
|
+
// Process remote manifest modules
|
100
|
+
for (const [moduleId, moduleData] of Object.entries(remoteMetaManifest.modules)) {
|
101
|
+
if (moduleData.keys && Array.isArray(moduleData.keys)) {
|
102
|
+
// Store module name for better logging
|
103
|
+
const moduleName = moduleId;
|
104
|
+
remoteModuleIdToName.set(moduleId, moduleName);
|
105
|
+
|
106
|
+
// Skip empty modules
|
107
|
+
if (moduleData.keys.length === 0) continue;
|
108
|
+
|
109
|
+
// Sort keys for consistent comparison
|
110
|
+
const sortedKeys = [...moduleData.keys].sort();
|
111
|
+
const keySetString = sortedKeys.join(',');
|
112
|
+
|
113
|
+
// Store module data
|
114
|
+
remoteModules.set(moduleId, {
|
115
|
+
id: moduleData.id || moduleId,
|
116
|
+
name: moduleName,
|
117
|
+
keys: sortedKeys,
|
118
|
+
keyCount: moduleData.keys.length
|
119
|
+
});
|
120
|
+
|
121
|
+
// Store key set
|
122
|
+
remoteKeySets.set(keySetString, moduleId);
|
123
|
+
|
124
|
+
// Store individual key mappings
|
125
|
+
moduleData.keys.forEach(key => {
|
126
|
+
remoteModuleKeys.add(key);
|
127
|
+
remoteKeyToModule.set(key, moduleId);
|
128
|
+
});
|
129
|
+
}
|
130
|
+
}
|
131
|
+
|
132
|
+
// Get keys from the master chunk in the remote manifest (if it exists)
|
133
|
+
const remoteMasterKeys = new Set();
|
134
|
+
if (remoteMetaManifest.masterKeys && Array.isArray(remoteMetaManifest.masterKeys)) {
|
135
|
+
remoteMetaManifest.masterKeys.forEach(key => {
|
136
|
+
remoteMasterKeys.add(key);
|
137
|
+
});
|
138
|
+
}
|
139
|
+
|
140
|
+
// Get all unique keys from the remote manifest (modules + master)
|
141
|
+
const remoteAllKeys = new Set([...remoteModuleKeys, ...remoteMasterKeys]);
|
142
|
+
const remoteKeyCount = remoteAllKeys.size;
|
143
|
+
const remoteModuleCount = remoteModules.size;
|
144
|
+
const remoteMasterKeyCount = remoteMasterKeys.size;
|
145
|
+
console.log(`Remote manifest: ${remoteKeyCount} keys in ${remoteModuleCount} modules, ${remoteMasterKeyCount} master keys`);
|
146
|
+
|
147
|
+
// Find intersection and differences for keys
|
148
|
+
const inBothSets = new Set([...currentBuildKeys].filter(key => remoteAllKeys.has(key)));
|
149
|
+
const missingKeys = new Set([...remoteAllKeys].filter(key => !currentBuildKeys.has(key)));
|
150
|
+
const extraKeys = new Set([...currentBuildKeys].filter(key => !remoteAllKeys.has(key)));
|
151
|
+
console.log(`Key comparison: ${inBothSets.size} shared keys, ${missingKeys.size} missing, ${extraKeys.size} new`);
|
152
|
+
|
153
|
+
// Enhanced multi-level module equivalence mapping
|
154
|
+
// 1. First pass: Match by module name
|
155
|
+
for (const [remoteId, remoteModule] of remoteModules.entries()) {
|
156
|
+
if (remoteModule.name) {
|
157
|
+
// Find a current module with matching name
|
158
|
+
for (const [currentId, currentModule] of currentModules.entries()) {
|
159
|
+
if (currentModule.name && currentModule.name === remoteModule.name) {
|
160
|
+
moduleEquivalenceMap.set(remoteId, currentId);
|
161
|
+
break;
|
162
|
+
}
|
163
|
+
}
|
164
|
+
}
|
165
|
+
}
|
166
|
+
|
167
|
+
// 2. Second pass: Match by resource path
|
168
|
+
const unmatchedRemote = [...remoteModules.keys()].filter(id => !moduleEquivalenceMap.has(id));
|
169
|
+
for (const remoteId of unmatchedRemote) {
|
170
|
+
for (const [resourcePath, currentModuleId] of moduleIdMap.entries()) {
|
171
|
+
if (resourcePath.includes(remoteId)) {
|
172
|
+
moduleEquivalenceMap.set(remoteId, currentModuleId);
|
173
|
+
break;
|
174
|
+
}
|
175
|
+
}
|
176
|
+
}
|
177
|
+
|
178
|
+
// 3. Third pass: Match by key set fingerprint
|
179
|
+
const stillUnmatchedRemote = [...remoteModules.keys()].filter(id => !moduleEquivalenceMap.has(id));
|
180
|
+
for (const remoteId of stillUnmatchedRemote) {
|
181
|
+
const remoteModule = remoteModules.get(remoteId);
|
182
|
+
const keySetString = remoteModule.keys.join(',');
|
183
|
+
if (currentKeySets.has(keySetString)) {
|
184
|
+
moduleEquivalenceMap.set(remoteId, currentKeySets.get(keySetString));
|
185
|
+
}
|
186
|
+
}
|
187
|
+
|
188
|
+
// Find moved keys based on enhanced module equivalence map
|
189
|
+
const trulyMovedKeys = new Set();
|
190
|
+
const keyMovementDetails = new Map();
|
191
|
+
for (const key of inBothSets) {
|
192
|
+
// Skip keys that are in the master chunk
|
193
|
+
if (remoteMasterKeys.has(key)) {
|
194
|
+
continue;
|
195
|
+
}
|
196
|
+
const remoteModuleId = remoteKeyToModule.get(key);
|
197
|
+
const currentModuleId = currentKeyToModule.get(key);
|
198
|
+
|
199
|
+
// Normalize module names for comparison
|
200
|
+
const remoteModuleName = remoteModuleIdToName.get(remoteModuleId) || remoteModuleId;
|
201
|
+
const currentModuleName = moduleIdToName.get(currentModuleId) || currentModuleId;
|
202
|
+
|
203
|
+
// Only consider a key moved if it's actually in a different module
|
204
|
+
const moduleNameComparison = remoteModuleName !== currentModuleName;
|
205
|
+
if (moduleNameComparison) {
|
206
|
+
trulyMovedKeys.add(key);
|
207
|
+
keyMovementDetails.set(key, {
|
208
|
+
from: remoteModuleId,
|
209
|
+
fromName: remoteModuleName,
|
210
|
+
to: currentModuleId,
|
211
|
+
toName: currentModuleName,
|
212
|
+
type: 'module_change'
|
213
|
+
});
|
214
|
+
}
|
215
|
+
}
|
216
|
+
|
217
|
+
// Get keys from unmatched modules that exist in the current build
|
218
|
+
const unmatchedRemoteModules = [...remoteModules.keys()].filter(id => !moduleEquivalenceMap.has(id));
|
219
|
+
unmatchedRemoteModules.forEach(moduleId => {
|
220
|
+
const module = remoteModules.get(moduleId);
|
221
|
+
const moduleName = remoteModuleIdToName.get(moduleId) || moduleId;
|
222
|
+
module.keys.forEach(key => {
|
223
|
+
// Only add the key if it exists in the current build
|
224
|
+
if (currentBuildKeys.has(key)) {
|
225
|
+
const currentModuleId = currentKeyToModule.get(key);
|
226
|
+
const currentModuleName = moduleIdToName.get(currentModuleId) || currentModuleId;
|
227
|
+
|
228
|
+
// Only add if actually in a different module
|
229
|
+
if (moduleName !== currentModuleName) {
|
230
|
+
trulyMovedKeys.add(key);
|
231
|
+
keyMovementDetails.set(key, {
|
232
|
+
from: moduleId,
|
233
|
+
fromName: moduleName,
|
234
|
+
to: currentModuleId,
|
235
|
+
toName: currentModuleName,
|
236
|
+
type: 'unmatched_module'
|
237
|
+
});
|
238
|
+
}
|
239
|
+
}
|
240
|
+
});
|
241
|
+
});
|
242
|
+
const movedKeyCount = trulyMovedKeys.size;
|
243
|
+
console.log(`Found ${extraKeys.size} new keys and ${movedKeyCount} moved keys`);
|
244
|
+
|
245
|
+
// Add extra and moved keys to the plugin's tracking for master chunk inclusion
|
246
|
+
plugin.extraKeys = extraKeys;
|
247
|
+
plugin.movedKeys = trulyMovedKeys;
|
248
|
+
|
249
|
+
// Store key counts for reference
|
250
|
+
plugin.keyStats = {
|
251
|
+
current: currentKeyCount,
|
252
|
+
remote: remoteKeyCount,
|
253
|
+
extra: extraKeys.size,
|
254
|
+
moved: movedKeyCount
|
255
|
+
};
|
256
|
+
|
257
|
+
// Update master keys in the generated meta manifest
|
258
|
+
if (plugin.generatedMetaManifest) {
|
259
|
+
// Only include extra (new) and moved keys in the master keys
|
260
|
+
const masterKeys = [...Array.from(extraKeys), ...Array.from(trulyMovedKeys)];
|
261
|
+
plugin.generatedMetaManifest.masterKeys = masterKeys;
|
262
|
+
}
|
263
|
+
return {
|
264
|
+
extraKeys,
|
265
|
+
movedKeys: trulyMovedKeys,
|
266
|
+
keyStats: plugin.keyStats
|
267
|
+
};
|
268
|
+
} catch (error) {
|
269
|
+
console.error(`Error during manifest comparison: ${error.message}`);
|
270
|
+
// Return empty sets for keys if there was an error
|
271
|
+
plugin.extraKeys = new Set();
|
272
|
+
plugin.movedKeys = new Set();
|
273
|
+
return {
|
274
|
+
extraKeys: new Set(),
|
275
|
+
movedKeys: new Set(),
|
276
|
+
error: error.message
|
277
|
+
};
|
278
|
+
}
|
279
|
+
}
|
@@ -5,11 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.collectI18nKeysfromAST = collectI18nKeysfromAST;
|
7
7
|
exports.collectI18nKeysfromComments = collectI18nKeysfromComments;
|
8
|
-
|
9
8
|
const {
|
10
9
|
walk
|
11
10
|
} = require('estree-walker');
|
12
|
-
|
13
11
|
function collectI18nKeysfromAST(ast, allI18n) {
|
14
12
|
let i18nKeys = {};
|
15
13
|
walk(ast, {
|
@@ -23,42 +21,34 @@ function collectI18nKeysfromAST(ast, allI18n) {
|
|
23
21
|
});
|
24
22
|
return Object.keys(i18nKeys);
|
25
23
|
}
|
26
|
-
|
27
24
|
const prefixI18nComment = 'I18N';
|
28
25
|
const prefixI18nComment1 = 'dynamic-i18n-key';
|
29
|
-
|
30
26
|
function getI18nKeysFromComment(comment) {
|
31
27
|
let commentString = comment.value.trim();
|
32
28
|
let i18nKeyStr;
|
33
|
-
|
34
29
|
if (commentString.startsWith(prefixI18nComment)) {
|
35
30
|
i18nKeyStr = commentString.slice(prefixI18nComment.length).trim();
|
36
31
|
} else if (commentString.startsWith(prefixI18nComment1)) {
|
37
32
|
i18nKeyStr = commentString.slice(prefixI18nComment1.length).trim();
|
38
33
|
}
|
39
|
-
|
40
34
|
if (!i18nKeyStr) {
|
41
35
|
return [];
|
42
36
|
}
|
43
|
-
|
44
37
|
const i18nKeys = i18nKeyStr.split(',');
|
45
38
|
return i18nKeys;
|
46
|
-
}
|
47
|
-
|
39
|
+
}
|
48
40
|
|
41
|
+
// export function fromComments(comments, allI18n) {
|
49
42
|
function collectI18nKeysfromComments(comments, allI18n) {
|
50
43
|
// TODO: need to implement
|
51
44
|
let i18nKeys = {};
|
52
|
-
|
53
45
|
for (let comment of comments) {
|
54
46
|
let keys = getI18nKeysFromComment(comment);
|
55
|
-
|
56
47
|
for (let key of keys) {
|
57
48
|
if (key && allI18n[key]) {
|
58
49
|
i18nKeys[key] = allI18n[key];
|
59
50
|
}
|
60
51
|
}
|
61
52
|
}
|
62
|
-
|
63
53
|
return Object.keys(i18nKeys);
|
64
54
|
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.createMetaManifest = createMetaManifest;
|
7
|
+
var _webpackSources = require("webpack-sources");
|
8
|
+
function createMetaManifest(compilation, plugin, skipEmit = false) {
|
9
|
+
const {
|
10
|
+
detailedManifest
|
11
|
+
} = plugin;
|
12
|
+
const i18nMetaManifestFileName = plugin.i18nMetaManifestFileName;
|
13
|
+
if (!skipEmit) {
|
14
|
+
console.log('Generating meta manifest:', i18nMetaManifestFileName);
|
15
|
+
}
|
16
|
+
const finalMetaManifest = {
|
17
|
+
modules: {}
|
18
|
+
};
|
19
|
+
for (const [chunkId, chunkData] of Object.entries(detailedManifest)) {
|
20
|
+
const chunkName = chunkData.chunkName || `chunk_${chunkId}`;
|
21
|
+
const keysArray = Array.isArray(chunkData.keysUsed) ? chunkData.keysUsed : Array.from(chunkData.keysUsed);
|
22
|
+
if (keysArray.length > 0) {
|
23
|
+
finalMetaManifest.modules[chunkName] = {
|
24
|
+
id: chunkId,
|
25
|
+
keys: keysArray
|
26
|
+
};
|
27
|
+
}
|
28
|
+
}
|
29
|
+
if (plugin.extraKeys && plugin.movedKeys) {
|
30
|
+
const masterKeysSet = new Set([...(Array.from(plugin.extraKeys) || []), ...(Array.from(plugin.movedKeys) || [])]);
|
31
|
+
finalMetaManifest.masterKeys = Array.from(masterKeysSet);
|
32
|
+
if (finalMetaManifest.masterKeys.length > 0) {
|
33
|
+
console.log(`Extra and moved keys to add to master chunk: ${finalMetaManifest.masterKeys.length}`);
|
34
|
+
finalMetaManifest.masterKeys.forEach(key => {
|
35
|
+
console.log(` - ${key}`);
|
36
|
+
});
|
37
|
+
}
|
38
|
+
}
|
39
|
+
plugin.generatedMetaManifest = finalMetaManifest;
|
40
|
+
if (!skipEmit) {
|
41
|
+
const metaManifestSource = new _webpackSources.RawSource(JSON.stringify(finalMetaManifest, null, 2));
|
42
|
+
if (!compilation.emitAsset) {
|
43
|
+
compilation.assets[i18nMetaManifestFileName] = metaManifestSource;
|
44
|
+
} else {
|
45
|
+
compilation.emitAsset(i18nMetaManifestFileName, metaManifestSource, {
|
46
|
+
desc: 'Streamlined chunk-module-i18nKeys mapping with optimized master keys'
|
47
|
+
});
|
48
|
+
}
|
49
|
+
}
|
50
|
+
return finalMetaManifest;
|
51
|
+
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.createRegularManifest = createRegularManifest;
|
7
|
+
var _webpackSources = require("webpack-sources");
|
8
|
+
function createRegularManifest(compilation, plugin) {
|
9
|
+
const {
|
10
|
+
regularManifest,
|
11
|
+
// e.g., { chunkId: { localeA: pathA, localeB: pathB, ... }, ... }
|
12
|
+
locales,
|
13
|
+
// e.g., ['en_US', 'fr_FR', ...]
|
14
|
+
i18nManifestFileName,
|
15
|
+
// e.g., 'i18n-manifest.json'
|
16
|
+
deskI18nManifestFileName = 'i18n-chunk/desk-i18n-manifest.js'
|
17
|
+
} = plugin;
|
18
|
+
const finalManifest = {
|
19
|
+
locales: [...locales],
|
20
|
+
chunks: {},
|
21
|
+
basePath: 'i18n-chunk/[locale]/'
|
22
|
+
};
|
23
|
+
for (const chunkId of Object.keys(regularManifest)) {
|
24
|
+
const localePaths = regularManifest[chunkId];
|
25
|
+
if (!localePaths) continue;
|
26
|
+
const entries = Object.entries(localePaths);
|
27
|
+
if (!entries.length) continue;
|
28
|
+
const [someLocale, fullPath] = entries[0];
|
29
|
+
if (!fullPath) continue;
|
30
|
+
const pathSegments = fullPath.split('/');
|
31
|
+
const basename = pathSegments.slice(2).join('/');
|
32
|
+
finalManifest.chunks[chunkId] = basename;
|
33
|
+
}
|
34
|
+
const manifestStr = JSON.stringify(finalManifest, null, 2);
|
35
|
+
const jsonManifestSource = new _webpackSources.RawSource(manifestStr);
|
36
|
+
const deskI18nManifestCode = `
|
37
|
+
(function() {
|
38
|
+
window.desk_i18n_manifest = ${manifestStr};
|
39
|
+
})();
|
40
|
+
`;
|
41
|
+
const deskI18nManifestSource = new _webpackSources.RawSource(deskI18nManifestCode);
|
42
|
+
compilation.emitAsset(i18nManifestFileName, jsonManifestSource, {
|
43
|
+
desc: 'Emitted plain JSON i18n manifest'
|
44
|
+
});
|
45
|
+
compilation.emitAsset(deskI18nManifestFileName, deskI18nManifestSource, {
|
46
|
+
desc: 'Emitted manifest attached to window.desk_i18n_manifest'
|
47
|
+
});
|
48
|
+
}
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.getI18nFileUrlPathTemplate = getI18nFileUrlPathTemplate;
|
7
|
-
|
8
7
|
function getI18nFileUrlPathTemplate(compilation, chunk, filenameTemplate, localeTemplate) {
|
9
8
|
let urlpath = compilation.getPath(filenameTemplate, {
|
10
9
|
chunk
|
@@ -4,23 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.default = getI18nKeysFormModules;
|
7
|
-
|
8
7
|
var _I18nDependency = require("../I18nDependency");
|
9
|
-
|
10
8
|
function getI18nKeysFormModules(modules) {
|
11
9
|
const i18nTemObj = {};
|
12
|
-
|
13
10
|
for (let m of modules) {
|
14
11
|
for (let dep of m.dependencies) {
|
15
12
|
if (!(dep instanceof _I18nDependency.I18nDependency)) {
|
16
13
|
continue;
|
17
14
|
}
|
18
|
-
|
19
15
|
for (const key of dep.i18nKeys) {
|
20
16
|
i18nTemObj[key] = 1;
|
21
17
|
}
|
22
18
|
}
|
23
19
|
}
|
24
|
-
|
25
20
|
return Object.keys(i18nTemObj);
|
26
21
|
}
|
@@ -6,32 +6,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.REGEXP_CONTENTHASH = void 0;
|
7
7
|
exports.getShortI18nAssets = getShortI18nAssets;
|
8
8
|
exports.hasContentHash = hasContentHash;
|
9
|
-
|
10
9
|
var _urlConcat = require("../../../utils/urlConcat");
|
11
|
-
|
12
10
|
// export const REGEXP_CHUNKHASH = /\[chunkhash(?::(\d+))?\]/gi;
|
13
11
|
// export const REGEXP_HASH = /\[hash(?::(\d+))?\]/gi;
|
14
12
|
// export const REGEXP_NAME = /\[name\]/gi;
|
15
13
|
// export const REGEXP_PLACEHOLDERS = /\[(name|id|chunkhash)\]/gi;
|
16
14
|
// TODO: want to choose file type for i18n load
|
17
|
-
const REGEXP_CONTENTHASH = /\[contenthash(?::(\d+))?\]/gi;
|
18
|
-
exports.REGEXP_CONTENTHASH = REGEXP_CONTENTHASH;
|
19
|
-
|
15
|
+
const REGEXP_CONTENTHASH = exports.REGEXP_CONTENTHASH = /\[contenthash(?::(\d+))?\]/gi;
|
20
16
|
function hasContentHash(filenameTemplate) {
|
21
17
|
return REGEXP_CONTENTHASH.test(filenameTemplate);
|
22
18
|
}
|
23
|
-
|
24
19
|
function getShortI18nAssets(chunks, i18nManifest, publicPathPrefix) {
|
25
20
|
const i18nAssets = {};
|
26
21
|
chunks.forEach(chunk => {
|
27
22
|
const i18nFiles = i18nManifest[chunk.id];
|
28
|
-
|
29
23
|
if (i18nFiles) {
|
30
24
|
Object.keys(i18nFiles).forEach(locale => {
|
31
25
|
if (!i18nAssets[locale]) {
|
32
26
|
i18nAssets[locale] = [];
|
33
27
|
}
|
34
|
-
|
35
28
|
i18nAssets[locale].push((0, _urlConcat.urlConcat)(publicPathPrefix, i18nFiles[locale]));
|
36
29
|
});
|
37
30
|
}
|
@@ -3,9 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
|
7
6
|
var _collectI18nKeys = require("./collectI18nKeys");
|
8
|
-
|
9
7
|
Object.keys(_collectI18nKeys).forEach(function (key) {
|
10
8
|
if (key === "default" || key === "__esModule") return;
|
11
9
|
if (key in exports && exports[key] === _collectI18nKeys[key]) return;
|
@@ -16,9 +14,7 @@ Object.keys(_collectI18nKeys).forEach(function (key) {
|
|
16
14
|
}
|
17
15
|
});
|
18
16
|
});
|
19
|
-
|
20
17
|
var _propertiesUtils = require("./propertiesUtils");
|
21
|
-
|
22
18
|
Object.keys(_propertiesUtils).forEach(function (key) {
|
23
19
|
if (key === "default" || key === "__esModule") return;
|
24
20
|
if (key in exports && exports[key] === _propertiesUtils[key]) return;
|
@@ -6,19 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.getAllI18n = getAllI18n;
|
7
7
|
exports.getPropertiesAsJSON = getPropertiesAsJSON;
|
8
8
|
exports.jsonToString = jsonToString;
|
9
|
-
|
10
9
|
var _fs = require("fs");
|
11
|
-
|
12
10
|
var _path = require("path");
|
13
|
-
|
14
11
|
var _logger = require("../../../logger");
|
15
|
-
|
16
12
|
var _unicodeConversion = require("./unicodeConversion");
|
17
|
-
|
18
13
|
function isComment(line) {
|
19
14
|
return line[0] === '#';
|
20
15
|
}
|
21
|
-
|
22
16
|
function getPropertiesAsJSON(filePath) {
|
23
17
|
try {
|
24
18
|
const data = (0, _fs.readFileSync)(filePath);
|
@@ -26,16 +20,13 @@ function getPropertiesAsJSON(filePath) {
|
|
26
20
|
const i18nObj = {};
|
27
21
|
source.split(/\r?\n\r?/).forEach(fline => {
|
28
22
|
const line = fline.trim();
|
29
|
-
|
30
23
|
if (!line || isComment(line)) {
|
31
24
|
return;
|
32
25
|
}
|
33
|
-
|
34
26
|
const ind = line.indexOf('=');
|
35
27
|
const key = line.slice(0, ind).replace(/\\ /g, ' ');
|
36
28
|
let value = line.slice(ind + 1);
|
37
29
|
value = (0, _unicodeConversion.convertUnicode)(value);
|
38
|
-
|
39
30
|
if (key && value) {
|
40
31
|
i18nObj[key] = value;
|
41
32
|
}
|
@@ -45,19 +36,15 @@ function getPropertiesAsJSON(filePath) {
|
|
45
36
|
return {};
|
46
37
|
}
|
47
38
|
}
|
48
|
-
|
49
39
|
function getLang(file) {
|
50
40
|
const underScoreIndex = file.indexOf('_');
|
51
41
|
let language = 'en_US';
|
52
|
-
|
53
42
|
if (underScoreIndex !== -1) {
|
54
43
|
language = file.substring(underScoreIndex + 1);
|
55
44
|
language = language.slice(0, language.indexOf('.'));
|
56
45
|
}
|
57
|
-
|
58
46
|
return language;
|
59
47
|
}
|
60
|
-
|
61
48
|
function getAllI18n({
|
62
49
|
folderPath,
|
63
50
|
disableDefault,
|
@@ -71,11 +58,9 @@ function getAllI18n({
|
|
71
58
|
const context = (0, _path.join)(process.cwd(), folderPath);
|
72
59
|
files.forEach(file => {
|
73
60
|
const filePath = (0, _path.join)(context, file);
|
74
|
-
|
75
61
|
if (exclude.test(filePath) || !include.test(filePath)) {
|
76
62
|
return;
|
77
63
|
}
|
78
|
-
|
79
64
|
const i18n = getPropertiesAsJSON(filePath);
|
80
65
|
allLangI18n[getLang(file)] = disableDefault ? i18n : Object.assign({}, jsResourceI18nKeys, i18n);
|
81
66
|
});
|
@@ -85,27 +70,22 @@ function getAllI18n({
|
|
85
70
|
return {};
|
86
71
|
}
|
87
72
|
}
|
88
|
-
|
89
73
|
function jsonToString(json, keySeperator) {
|
90
74
|
let str = '{';
|
91
75
|
const keys = Object.keys(json);
|
92
76
|
keys.forEach((key, i) => {
|
93
77
|
const value = json[key];
|
94
|
-
|
95
78
|
if (!value) {
|
96
79
|
return;
|
97
80
|
}
|
98
|
-
|
99
81
|
str += `"${keySeperator ? key.replace(/(\.|\\(\s+))/g, keySeperator) : key}":"${value.replace(/.?"/g, match => {
|
100
82
|
if (match[0] === '\\') {
|
101
83
|
return match;
|
102
84
|
} else if (match.length === 2) {
|
103
85
|
return `${match[0]}\\${match[1]}`;
|
104
86
|
}
|
105
|
-
|
106
87
|
return `\\${match}`;
|
107
88
|
}).replace(/(\r\n|\n|\r)/g, '')}"`;
|
108
|
-
|
109
89
|
if (i !== keys.length - 1) {
|
110
90
|
str += ',';
|
111
91
|
}
|