@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,14 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.CustomAttributePlugin = void 0;
|
7
|
-
|
8
7
|
var _Template = _interopRequireDefault(require("webpack/lib/Template"));
|
9
|
-
|
10
8
|
var _htmlWebpackInjectAttributesPlugin = _interopRequireDefault(require("html-webpack-inject-attributes-plugin"));
|
11
|
-
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
|
-
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
14
10
|
/* eslint-disable no-use-before-define */
|
11
|
+
|
15
12
|
class CustomAttributePlugin {
|
16
13
|
constructor(options) {
|
17
14
|
this.options = {
|
@@ -22,34 +19,35 @@ class CustomAttributePlugin {
|
|
22
19
|
i18nAttributes: options.i18nAttributes || options.attributes || {}
|
23
20
|
};
|
24
21
|
}
|
25
|
-
|
26
22
|
addCustomAttributeToDynamicScriptTags(mainTemplate) {
|
27
23
|
const {
|
28
24
|
jsAttributes,
|
29
25
|
cssAttributes,
|
30
26
|
i18nAttributes
|
31
|
-
} = this.options;
|
27
|
+
} = this.options;
|
32
28
|
|
29
|
+
// NOTE: To add custom Attributes to js Script tags
|
33
30
|
mainTemplate.hooks.jsonpScript.tap('CustomAttributePlugin', source => {
|
34
31
|
const str = attributeSetTemplate(jsAttributes, 'script');
|
35
32
|
return _Template.default.asString([source, ...str]);
|
36
|
-
});
|
33
|
+
});
|
37
34
|
|
35
|
+
// NOTE: To add custom Attributes to css link tags
|
38
36
|
mainTemplate.hooks.requireEnsure.tap('CustomAttributePlugin', source => {
|
39
37
|
const str = attributeSetTemplate(cssAttributes, 'linkTag');
|
40
|
-
const replacedStr = source.replace('head.appendChild(linkTag);', `${str.join('')}head.appendChild(linkTag);`);
|
41
|
-
|
38
|
+
const replacedStr = source.replace('head.appendChild(linkTag);', `${str.join('')}head.appendChild(linkTag);`);
|
39
|
+
// console.log({ s: source, r: replacedStr });
|
42
40
|
return replacedStr;
|
43
|
-
});
|
41
|
+
});
|
44
42
|
|
43
|
+
// NOTE: To add custom Attributes to i18n split js Script tags
|
45
44
|
mainTemplate.hooks.requireEnsure.tap('CustomAttributePlugin', source => {
|
46
45
|
const str = attributeSetTemplate(i18nAttributes, 'scriptTag');
|
47
|
-
const replacedStr = source.replace('document.body.appendChild(scriptTag);', `${str.join('')}document.body.appendChild(scriptTag);`);
|
48
|
-
|
46
|
+
const replacedStr = source.replace('document.body.appendChild(scriptTag);', `${str.join('')}document.body.appendChild(scriptTag);`);
|
47
|
+
// console.log({ s: source, r: replacedStr });
|
49
48
|
return replacedStr;
|
50
49
|
});
|
51
50
|
}
|
52
|
-
|
53
51
|
apply(compiler) {
|
54
52
|
// NOTE: we not using this, Reason currently this option is only need for EFC,
|
55
53
|
// So it do not needed.
|
@@ -66,17 +64,14 @@ class CustomAttributePlugin {
|
|
66
64
|
}
|
67
65
|
});
|
68
66
|
}
|
69
|
-
|
70
67
|
}
|
71
|
-
|
72
68
|
exports.CustomAttributePlugin = CustomAttributePlugin;
|
73
|
-
|
74
69
|
function attributeSetTemplate(jsAttributes, variableName) {
|
75
70
|
let str = [];
|
76
71
|
Object.keys(jsAttributes).forEach(key => {
|
77
72
|
const val = jsAttributes[key];
|
78
73
|
str.push(`${variableName}.setAttribute(${JSON.stringify(key)}, ${JSON.stringify(val)});`);
|
79
|
-
});
|
80
|
-
|
74
|
+
});
|
75
|
+
// console.log({ str });
|
81
76
|
return str;
|
82
77
|
}
|
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.default = void 0;
|
7
|
-
|
8
7
|
var _htmlWebpackPlugin = _interopRequireDefault(require("html-webpack-plugin"));
|
9
|
-
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
-
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
12
9
|
const pluginName = 'CustomScriptLoadingStrategyPlugin';
|
13
|
-
|
14
10
|
class CustomScriptLoadingStrategyPlugin {
|
15
11
|
constructor({
|
16
12
|
scriptLoadingStategey
|
@@ -18,69 +14,57 @@ class CustomScriptLoadingStrategyPlugin {
|
|
18
14
|
this.scriptLoadingStrategy = scriptLoadingStategey;
|
19
15
|
this.tagNamesToMatch = ['script'];
|
20
16
|
}
|
21
|
-
|
22
17
|
getFileNameFromTagSrc(src) {
|
23
18
|
const fileNameArr = src.split('/');
|
24
19
|
return fileNameArr[fileNameArr.length - 1];
|
25
20
|
}
|
26
|
-
|
27
21
|
addAttributestToTag(tag, attributes) {
|
28
22
|
tag.attributes = Object.assign({}, tag.attributes, attributes);
|
29
23
|
}
|
30
|
-
|
31
24
|
matchFileName(tag, fileName) {
|
32
25
|
return fileName.test(this.getFileNameFromTagSrc(tag.attributes.src));
|
33
26
|
}
|
34
|
-
|
35
27
|
blockingStrategy(tag) {
|
36
28
|
delete tag.attributes.defer;
|
37
29
|
delete tag.attributes.async;
|
38
30
|
}
|
39
|
-
|
40
31
|
deferStrategy(tag) {
|
41
32
|
delete tag.attributes.async;
|
42
33
|
}
|
43
|
-
|
44
34
|
asyncStrategy(tag) {
|
45
35
|
delete tag.attributes.defer;
|
46
36
|
}
|
47
|
-
|
48
37
|
moduleStrategy(tag) {
|
49
38
|
this.deferStrategy(tag);
|
50
39
|
}
|
51
|
-
|
52
40
|
matchStrategy(scriptLoadingStrategy, tag) {
|
53
41
|
if (scriptLoadingStrategy === 'blocking') {
|
54
42
|
this.blockingStrategy(tag);
|
55
43
|
}
|
56
|
-
|
57
44
|
if (scriptLoadingStrategy === 'defer') {
|
58
45
|
this.deferStrategy(tag);
|
59
46
|
}
|
60
|
-
|
61
47
|
if (scriptLoadingStrategy === 'async') {
|
62
48
|
this.asyncStrategy(tag);
|
63
49
|
}
|
64
|
-
|
65
50
|
if (scriptLoadingStrategy === 'module') {
|
66
51
|
this.moduleStrategy(tag);
|
67
52
|
}
|
68
53
|
}
|
69
|
-
|
70
54
|
matchAndApplyCustomLoadingStrategyToScripts(tags) {
|
71
55
|
Object.keys(this.scriptLoadingStrategy).forEach(scriptLoadingStrategy => {
|
72
56
|
const filesToMatch = this.scriptLoadingStrategy[scriptLoadingStrategy];
|
73
57
|
tags.forEach(tag => {
|
74
58
|
if (this.tagNamesToMatch.includes(tag.tagName) && tag.attributes.src) {
|
75
59
|
const isFileMatch = filesToMatch.some(fileName => this.matchFileName(tag, fileName));
|
76
|
-
|
77
60
|
if (isFileMatch) {
|
78
61
|
this.matchStrategy(scriptLoadingStrategy, tag);
|
79
62
|
this.addAttributestToTag(tag, {
|
80
63
|
[scriptLoadingStrategy]: true
|
81
64
|
});
|
82
65
|
}
|
83
|
-
}
|
66
|
+
}
|
67
|
+
// filesToMatch.forEach(fileName => {
|
84
68
|
// if (!this.matchFileName(tag, fileName)) {
|
85
69
|
// return;
|
86
70
|
// }
|
@@ -89,11 +73,9 @@ class CustomScriptLoadingStrategyPlugin {
|
|
89
73
|
// [scriptLoadingStrategy]: true
|
90
74
|
// });
|
91
75
|
// });
|
92
|
-
|
93
76
|
});
|
94
77
|
});
|
95
78
|
}
|
96
|
-
|
97
79
|
apply(compiler) {
|
98
80
|
compiler.hooks.compilation.tap(pluginName, compilation => {
|
99
81
|
_htmlWebpackPlugin.default.getHooks(compilation).alterAssetTagGroups.tapAsync(pluginName, (data, callback) => {
|
@@ -103,7 +85,5 @@ class CustomScriptLoadingStrategyPlugin {
|
|
103
85
|
});
|
104
86
|
});
|
105
87
|
}
|
106
|
-
|
107
88
|
}
|
108
|
-
|
109
89
|
exports.default = CustomScriptLoadingStrategyPlugin;
|
package/lib/plugins/EFCPlugin.js
CHANGED
@@ -4,26 +4,17 @@ 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 _path = _interopRequireDefault(require("path"));
|
13
|
-
|
14
10
|
var _getI18nFileUrlPathTemplate = require("./I18nSplitPlugin/utils/getI18nFileUrlPathTemplate");
|
15
|
-
|
16
11
|
var _I18nKeysIdentifer = _interopRequireDefault(require("./I18nSplitPlugin/I18nKeysIdentifer"));
|
17
|
-
|
18
12
|
var _replaceCssDirTemplate = require("./RtlSplitPlugin/replaceCssDirTemplate");
|
19
|
-
|
20
13
|
var _EFCTemplatePlugin = _interopRequireDefault(require("./EFCTemplatePlugin"));
|
21
|
-
|
22
14
|
var _logger = require("../logger");
|
23
|
-
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
25
|
-
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
26
16
|
// import { getShortI18nAssets } from './I18nSplitPlugin/utils/hashUtils';
|
17
|
+
|
27
18
|
const cliOptions = (0, _utils.getOptions)();
|
28
19
|
const {
|
29
20
|
app: {
|
@@ -41,17 +32,18 @@ const {
|
|
41
32
|
createSDkFile,
|
42
33
|
cdnStatement
|
43
34
|
} = efcOptios;
|
44
|
-
|
45
35
|
class EFCPlugin {
|
46
36
|
constructor(options = {}) {
|
47
37
|
this.isDevelopment = options.isDevelopment;
|
48
38
|
this.templateFilePath = options.templateFilePath;
|
49
39
|
this.serverUrl = options.serverUrl;
|
50
|
-
this.i18nFileNameTemplate = options.i18nFileNameTemplate;
|
40
|
+
this.i18nFileNameTemplate = options.i18nFileNameTemplate;
|
41
|
+
|
42
|
+
// NOTE: this logic may be needed for i18n splited file name with contenthash cases
|
51
43
|
// this.i18nManifestFileName = options.i18nManifestFileName;
|
44
|
+
|
52
45
|
// IMPORTANT: here we mergeing optionds from pacakge.json and options via constructor
|
53
46
|
// So when debugging consider this as well
|
54
|
-
|
55
47
|
this.options = Object.assign({}, efcOptios, options);
|
56
48
|
this.options.entryPointName = options.entryPointName || 'efc';
|
57
49
|
this.options.outputFile = efcOptios.outputFile.replace('[version]', efcOptios.version);
|
@@ -60,7 +52,8 @@ class EFCPlugin {
|
|
60
52
|
const cssDirAttr = this.options.cssDirAttr || 'data-efc-dir';
|
61
53
|
const localeDefaultValue = this.options.localeDefaultValue || 'en_US';
|
62
54
|
const cssDirDefaultValue = this.options.cssDirDefaultValue || 'ltr';
|
63
|
-
this.options.localeStatement = options.localeStatement ||
|
55
|
+
this.options.localeStatement = options.localeStatement ||
|
56
|
+
// Statment 1: return langEle && langEle.getAttribute('${localeAttr}') || 'en_US';
|
64
57
|
// Statment 2: return langEle ? langEle.getAttribute('${localeAttr}') : 'en_US';
|
65
58
|
// We are using statement1 not statment2,
|
66
59
|
// Because even that attribute doesn't have value, We need default value
|
@@ -72,7 +65,9 @@ class EFCPlugin {
|
|
72
65
|
let dirEle = document.querySelector('[${cssDirAttr}]');
|
73
66
|
return dirEle && dirEle.getAttribute('${cssDirAttr}') || '${cssDirDefaultValue}';
|
74
67
|
})();`;
|
75
|
-
}
|
68
|
+
}
|
69
|
+
|
70
|
+
// NOTE: this logic may be needed for i18n splited file name with contenthash cases
|
76
71
|
// getI18nManifest(compilation) {
|
77
72
|
// const i18nManifestFile =
|
78
73
|
// compilation.assets[this.options.i18nManifestFileName];
|
@@ -83,12 +78,11 @@ class EFCPlugin {
|
|
83
78
|
// return {};
|
84
79
|
// }
|
85
80
|
|
86
|
-
|
87
81
|
getI18nAssetsStr(entryPoint, compilation) {
|
88
82
|
if (!chunkSplitEnable) {
|
89
83
|
let i18nAsstes = {};
|
90
|
-
const i18nFiles = Object.keys(compilation.assets).filter(assert => assert.indexOf(`i18n${_path.default.sep}`) !== -1);
|
91
|
-
|
84
|
+
const i18nFiles = Object.keys(compilation.assets).filter(assert => assert.indexOf(`i18n${_path.default.sep}`) !== -1);
|
85
|
+
//hook for i18n url contains i18n/ may cause problem
|
92
86
|
i18nAsstes = i18nFiles.reduce((res, i18nFilePath) => {
|
93
87
|
const fileName = i18nFilePath.replace(`i18n${_path.default.sep}`, '');
|
94
88
|
const splittedFileName = fileName.split('.');
|
@@ -97,11 +91,9 @@ class EFCPlugin {
|
|
97
91
|
}, {});
|
98
92
|
return `[${JSON.stringify(i18nAsstes)}[lang]]`;
|
99
93
|
}
|
100
|
-
|
101
94
|
const initalI18nAssets = entryPoint.chunks.filter(chunk => _I18nKeysIdentifer.default.isChunkHasI18n(chunk)).map(chunk => (0, _getI18nFileUrlPathTemplate.getI18nFileUrlPathTemplate)(compilation, chunk, this.i18nFileNameTemplate, '@locale@'));
|
102
95
|
return `${JSON.stringify(initalI18nAssets)}.map(urlpath => urlpath.replace(/@locale@/g, lang))`;
|
103
96
|
}
|
104
|
-
|
105
97
|
createFileContent(compilation) {
|
106
98
|
const {
|
107
99
|
entryPointName,
|
@@ -113,18 +105,19 @@ class EFCPlugin {
|
|
113
105
|
const {
|
114
106
|
serverUrl
|
115
107
|
} = this;
|
116
|
-
const cssDirTemplate = '@dir@';
|
117
|
-
|
118
|
-
const entryPoint = compilation.entrypoints.get(entryPointName);
|
119
|
-
|
108
|
+
const cssDirTemplate = '@dir@';
|
109
|
+
// const i18nManifest = this.getI18nManifest(compilation);
|
110
|
+
const entryPoint = compilation.entrypoints.get(entryPointName);
|
111
|
+
// const chunk = compilation.namedChunks.get(entryPointName);
|
120
112
|
const [jsPath, cssPath,,, i18nJsPath] = !this.isDevelopment ? publicPaths : [];
|
121
113
|
const initialFiles = entryPoint.getFiles();
|
122
|
-
const filteredInitialFiles = initialFiles.filter(file => /\.(css|js)$/.test(file));
|
114
|
+
const filteredInitialFiles = initialFiles.filter(file => /\.(css|js)$/.test(file));
|
115
|
+
|
116
|
+
// const i18nAssets = getShortI18nAssets(
|
123
117
|
// entryPoint.chunks,
|
124
118
|
// i18nManifest,
|
125
119
|
// i18nJsPath
|
126
120
|
// );
|
127
|
-
|
128
121
|
const initalI18nAssets = this.getI18nAssetsStr(entryPoint, compilation, i18nJsPath);
|
129
122
|
return `(() => {
|
130
123
|
const lang = ${localeStatement};
|
@@ -203,12 +196,10 @@ class EFCPlugin {
|
|
203
196
|
})();
|
204
197
|
`;
|
205
198
|
}
|
206
|
-
|
207
199
|
apply(compiler) {
|
208
200
|
if (!createSDkFile) {
|
209
201
|
return;
|
210
202
|
}
|
211
|
-
|
212
203
|
if (this.templateFilePath) {
|
213
204
|
new _EFCTemplatePlugin.default({
|
214
205
|
templateFilePath: this.templateFilePath,
|
@@ -218,24 +209,19 @@ class EFCPlugin {
|
|
218
209
|
}).apply(compiler);
|
219
210
|
return;
|
220
211
|
}
|
221
|
-
|
222
212
|
compiler.hooks.emit.tap('EFCPlugin', compilation => {
|
223
213
|
const {
|
224
214
|
entryPointName,
|
225
215
|
outputFile
|
226
216
|
} = this.options;
|
227
217
|
const entryPoint = compilation.entrypoints.get(entryPointName);
|
228
|
-
|
229
218
|
if (!entryPoint) {
|
230
219
|
return;
|
231
220
|
}
|
232
|
-
|
233
221
|
const source = new _webpackSources.RawSource(this.createFileContent(compilation));
|
234
222
|
compilation.assets[outputFile] = source;
|
235
223
|
(0, _logger.messageLogger)('The EFC embedded code was created successfully..!!!');
|
236
224
|
});
|
237
225
|
}
|
238
|
-
|
239
226
|
}
|
240
|
-
|
241
227
|
exports.default = EFCPlugin;
|
@@ -4,26 +4,17 @@ 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 _path = _interopRequireDefault(require("path"));
|
13
|
-
|
14
10
|
var _fs = require("fs");
|
15
|
-
|
16
11
|
var _getI18nFileUrlPathTemplate = require("./I18nSplitPlugin/utils/getI18nFileUrlPathTemplate");
|
17
|
-
|
18
12
|
var _I18nKeysIdentifer = _interopRequireDefault(require("./I18nSplitPlugin/I18nKeysIdentifer"));
|
19
|
-
|
20
13
|
var _replaceCssDirTemplate = require("./RtlSplitPlugin/replaceCssDirTemplate");
|
21
|
-
|
22
14
|
var _logger = require("../logger");
|
23
|
-
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
25
|
-
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
26
16
|
// import { getShortI18nAssets } from './I18nSplitPlugin/utils/hashUtils';
|
17
|
+
|
27
18
|
const cliOptions = (0, _utils.getOptions)();
|
28
19
|
const {
|
29
20
|
i18n: {
|
@@ -36,7 +27,9 @@ const {
|
|
36
27
|
} = cliOptions;
|
37
28
|
const {
|
38
29
|
createSDkFile
|
39
|
-
} = efcOptios;
|
30
|
+
} = efcOptios;
|
31
|
+
|
32
|
+
// for smap relate changes
|
40
33
|
// CdnChangePlugin
|
41
34
|
// SourceMapHookPlugin
|
42
35
|
|
@@ -44,15 +37,20 @@ class EFCTemplatePlugin {
|
|
44
37
|
constructor(options = {}) {
|
45
38
|
this.templateFilePath = _path.default.join(process.cwd(), options.templateFilePath);
|
46
39
|
this.i18nFileNameTemplate = options.i18nFileNameTemplate;
|
47
|
-
this.publicPath = options.publicPath;
|
40
|
+
this.publicPath = options.publicPath;
|
41
|
+
|
42
|
+
// NOTE: this logic may be needed for i18n splited file name with contenthash cases
|
48
43
|
// this.i18nManifestFileName = options.i18nManifestFileName;
|
44
|
+
|
49
45
|
// IMPORTANT: here we mergeing optionds from pacakge.json and options via constructor
|
50
46
|
// So when debugging consider this as well
|
51
47
|
// this.options = Object.assign({}, efcOptios, options);
|
52
48
|
|
53
49
|
this.entryPointName = options.entryPointName || 'efc';
|
54
50
|
this.outputFile = efcOptios.outputFile.replace('[version]', efcOptios.version);
|
55
|
-
}
|
51
|
+
}
|
52
|
+
|
53
|
+
// NOTE: this logic may be needed for i18n splited file name with contenthash cases
|
56
54
|
// getI18nManifest(compilation) {
|
57
55
|
// const i18nManifestFile =
|
58
56
|
// compilation.assets[this.options.i18nManifestFileName];
|
@@ -63,13 +61,12 @@ class EFCTemplatePlugin {
|
|
63
61
|
// return {};
|
64
62
|
// }
|
65
63
|
|
66
|
-
|
67
64
|
getI18nAssetsStr(entryPoint, compilation) {
|
68
65
|
// NOTE: we have used lang variable inside
|
69
66
|
if (!chunkSplitEnable) {
|
70
67
|
let i18nAsstes = {};
|
71
|
-
const i18nFiles = Object.keys(compilation.assets).filter(assert => assert.indexOf(`i18n${_path.default.sep}`) !== -1);
|
72
|
-
|
68
|
+
const i18nFiles = Object.keys(compilation.assets).filter(assert => assert.indexOf(`i18n${_path.default.sep}`) !== -1);
|
69
|
+
//hook for i18n url contains i18n/ may cause problem
|
73
70
|
i18nAsstes = i18nFiles.reduce((res, i18nFilePath) => {
|
74
71
|
const fileName = i18nFilePath.replace(`i18n${_path.default.sep}`, '');
|
75
72
|
const splittedFileName = fileName.split('.');
|
@@ -78,28 +75,27 @@ class EFCTemplatePlugin {
|
|
78
75
|
}, {});
|
79
76
|
return `[${JSON.stringify(i18nAsstes)}[lang]]`;
|
80
77
|
}
|
81
|
-
|
82
78
|
const initalI18nAssets = entryPoint.chunks.filter(chunk => _I18nKeysIdentifer.default.isChunkHasI18n(chunk)).map(chunk => (0, _getI18nFileUrlPathTemplate.getI18nFileUrlPathTemplate)(compilation, chunk, this.i18nFileNameTemplate, '@locale@'));
|
83
79
|
return `${JSON.stringify(initalI18nAssets)}.map(urlpath => urlpath.replace(/@locale@/g, lang))`;
|
84
80
|
}
|
85
|
-
|
86
81
|
templateReplacer(entryPoint, compilation) {
|
87
|
-
const cssDirTemplate = '@dir@';
|
82
|
+
const cssDirTemplate = '@dir@';
|
83
|
+
// const i18nManifest = this.getI18nManifest(compilation);
|
88
84
|
|
89
85
|
const initialFiles = entryPoint.getFiles();
|
90
86
|
const filteredInitialFiles = initialFiles.filter(file => /\.(css|js)$/.test(file));
|
91
87
|
const initialJsFiles = filteredInitialFiles.filter(file => /\.js$/.test(file));
|
92
88
|
let initialCssFiles = filteredInitialFiles.filter(file => /\.css$/.test(file));
|
93
|
-
|
94
89
|
if (enableRTLSplit) {
|
95
90
|
initialCssFiles = initialCssFiles.map(filePath => (0, _replaceCssDirTemplate.replaceCssDirTemplate)(filePath, cssDirTemplate));
|
96
|
-
}
|
91
|
+
}
|
92
|
+
|
93
|
+
// const i18nAssets = getShortI18nAssets(
|
97
94
|
// entryPoint.chunks,
|
98
95
|
// i18nManifest,
|
99
96
|
// '' // i18nJsPath
|
100
97
|
// );
|
101
98
|
|
102
|
-
|
103
99
|
const initalI18nAssets = this.getI18nAssetsStr(entryPoint, compilation, '' // i18nJsPath
|
104
100
|
);
|
105
101
|
const templateStr = (0, _fs.readFileSync)(this.templateFilePath).toString();
|
@@ -116,34 +112,27 @@ class EFCTemplatePlugin {
|
|
116
112
|
return [];
|
117
113
|
}`).replace('((\'@dir@\'))', '\'@dir@\'').replace('((\'publicPath\'))', this.publicPath).replace('((\'@locale@\'))', '\'@locale@\'');
|
118
114
|
}
|
119
|
-
|
120
115
|
apply(compiler) {
|
121
116
|
if (!createSDkFile) {
|
122
117
|
return;
|
123
118
|
}
|
124
|
-
|
125
119
|
compiler.hooks.emit.tap('EFCTemplatePlugin', compilation => {
|
126
120
|
const {
|
127
121
|
entryPointName,
|
128
122
|
outputFile
|
129
123
|
} = this;
|
130
124
|
const entryPoint = compilation.entrypoints.get(entryPointName);
|
131
|
-
|
132
125
|
if (!entryPoint) {
|
133
126
|
return;
|
134
127
|
}
|
135
|
-
|
136
128
|
if (!(0, _fs.existsSync)(this.templateFilePath)) {
|
137
129
|
console.error(`EFC Template file not exists ${this.templateFilePath}`);
|
138
130
|
return;
|
139
131
|
}
|
140
|
-
|
141
132
|
const source = new _webpackSources.RawSource(this.templateReplacer(entryPoint, compilation));
|
142
133
|
compilation.assets[outputFile] = source;
|
143
134
|
(0, _logger.messageLogger)('The EFC embedded code was created successfully..!!!');
|
144
135
|
});
|
145
136
|
}
|
146
|
-
|
147
137
|
}
|
148
|
-
|
149
138
|
exports.default = EFCTemplatePlugin;
|
@@ -3,13 +3,11 @@
|
|
3
3
|
const {
|
4
4
|
Template
|
5
5
|
} = require('webpack');
|
6
|
-
|
7
6
|
const plugInName = 'EFCResourceCleanup';
|
8
7
|
module.exports = class EfcResouceCleanupPlugin {
|
9
8
|
constructor(options) {
|
10
9
|
this.options = options;
|
11
10
|
}
|
12
|
-
|
13
11
|
apply(compiler) {
|
14
12
|
compiler.hooks.thisCompilation.tap(plugInName, ({
|
15
13
|
mainTemplate
|
@@ -39,5 +37,4 @@ module.exports = class EfcResouceCleanupPlugin {
|
|
39
37
|
});
|
40
38
|
});
|
41
39
|
}
|
42
|
-
|
43
40
|
};
|
@@ -4,14 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.EventsHandlingPlugin = void 0;
|
7
|
-
|
8
7
|
/* eslint-disable no-use-before-define */
|
8
|
+
|
9
9
|
class EventsHandlingPlugin {
|
10
10
|
constructor(options) {}
|
11
|
-
|
12
11
|
apply(compiler) {
|
13
12
|
// NOTE: we not using this, Reason currently this option is only need for EFC,
|
14
13
|
// So it do not needed.
|
14
|
+
|
15
15
|
compiler.hooks.thisCompilation.tap({
|
16
16
|
name: 'CustomAttributePlugin',
|
17
17
|
stage: 1,
|
@@ -28,7 +28,5 @@ class EventsHandlingPlugin {
|
|
28
28
|
}
|
29
29
|
});
|
30
30
|
}
|
31
|
-
|
32
31
|
}
|
33
|
-
|
34
32
|
exports.EventsHandlingPlugin = EventsHandlingPlugin;
|
@@ -4,34 +4,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.default = void 0;
|
7
|
-
|
8
7
|
var _htmlWebpackPlugin = _interopRequireDefault(require("html-webpack-plugin"));
|
9
|
-
|
10
8
|
var _utils = require("../utils");
|
11
|
-
|
12
9
|
var _urlConcat = require("../utils/urlConcat");
|
13
|
-
|
14
10
|
var _path = _interopRequireDefault(require("path"));
|
15
|
-
|
16
11
|
var _webpackSources = require("webpack-sources");
|
17
|
-
|
18
12
|
var _hashUtils = require("./I18nSplitPlugin/utils/hashUtils");
|
19
|
-
|
20
13
|
var _getI18nFileUrlPathTemplate = require("./I18nSplitPlugin/utils/getI18nFileUrlPathTemplate");
|
21
|
-
|
22
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
23
|
-
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
24
15
|
let i18nObj = null;
|
25
16
|
const options = (0, _utils.getOptions)();
|
26
|
-
|
27
17
|
function newAssign(target, data) {
|
28
18
|
return Object.assign({}, target, data);
|
29
19
|
}
|
30
|
-
|
31
20
|
const {
|
32
21
|
i18n
|
33
22
|
} = options;
|
34
|
-
|
35
23
|
class I18NInjectIntoIndexPlugin {
|
36
24
|
constructor(options) {
|
37
25
|
this.isDevelopment = options.isDevelopment;
|
@@ -41,35 +29,33 @@ class I18NInjectIntoIndexPlugin {
|
|
41
29
|
this.i18nManifestFileName = options.i18nManifestFileName;
|
42
30
|
this.entryPointName = options.mainChunkName;
|
43
31
|
}
|
44
|
-
|
45
32
|
getI18nFileUrlPath(chunk, compilation) {
|
46
33
|
const urlpath = (0, _getI18nFileUrlPathTemplate.getI18nFileUrlPathTemplate)(compilation, chunk, this.i18nFileNameTemplate, this.templateLabel);
|
47
34
|
return (0, _urlConcat.urlConcat)(this.publicPath, urlpath);
|
48
35
|
}
|
49
|
-
|
50
36
|
getI18nManifest(compilation) {
|
51
37
|
const i18nManifestFile = compilation.assets[this.i18nManifestFileName];
|
52
|
-
|
53
38
|
if (!i18nManifestFile) {
|
54
39
|
return {};
|
55
40
|
}
|
56
|
-
|
57
41
|
const manifest = JSON.parse(i18nManifestFile.source());
|
58
42
|
return manifest;
|
59
43
|
}
|
60
|
-
|
61
44
|
injectI18nURLsToHTML(compilation) {
|
62
45
|
_htmlWebpackPlugin.default.getHooks(compilation).beforeAssetTagGeneration.tapAsync('I18NInjectIntoIndexPlugin', (data, cb) => {
|
63
46
|
const {
|
64
47
|
assets
|
65
|
-
} = data;
|
66
|
-
|
67
|
-
const i18nManifest = this.getI18nManifest(compilation);
|
68
|
-
const entryPoint = compilation.entrypoints.get(this.entryPointName);
|
69
|
-
const i18nScriptURLs =
|
48
|
+
} = data;
|
49
|
+
// Manipulate the content
|
50
|
+
// const i18nManifest = this.getI18nManifest(compilation);
|
51
|
+
// const entryPoint = compilation.entrypoints.get(this.entryPointName);
|
52
|
+
const i18nScriptURLs = [];
|
53
|
+
i18nScriptURLs.push("i18n-chunk/desk-i18n-manifest.js");
|
54
|
+
i18nScriptURLs.push(`i18n-chunk/${this.templateLabel}/master.i18n.js`);
|
55
|
+
|
56
|
+
// .map(url => getI18nScriptTagObj(url));
|
70
57
|
// .join('');
|
71
58
|
// Tell webpack to move on
|
72
|
-
|
73
59
|
cb(null, newAssign(data, {
|
74
60
|
assets: newAssign(assets, {
|
75
61
|
js: i18nScriptURLs.concat(assets.js)
|
@@ -77,7 +63,6 @@ class I18NInjectIntoIndexPlugin {
|
|
77
63
|
}));
|
78
64
|
});
|
79
65
|
}
|
80
|
-
|
81
66
|
withI18nSpitHandling(compiler) {
|
82
67
|
compiler.hooks.make.tap('I18NInjectIntoIndexPlugin', compilation => {
|
83
68
|
// let cdns = Object.keys(this.publicPaths);
|
@@ -85,19 +70,17 @@ class I18NInjectIntoIndexPlugin {
|
|
85
70
|
this.injectI18nURLsToHTML(compilation);
|
86
71
|
return;
|
87
72
|
}
|
88
|
-
|
89
73
|
_htmlWebpackPlugin.default.getHooks(compilation).beforeEmit.tapAsync('I18NInjectIntoIndexPlugin', (data, cb) => {
|
90
74
|
// Manipulate the content
|
91
75
|
const i18nManifest = this.getI18nManifest(compilation);
|
92
76
|
const entryPoint = compilation.entrypoints.get(this.entryPointName);
|
93
77
|
const i18nAssets = (0, _hashUtils.getShortI18nAssets)(entryPoint.chunks, i18nManifest, this.publicPath);
|
94
|
-
data.html = data.html.replace(new RegExp('<!--I18nInfoToServer(.*?)I18nInfoToServer-->', 'g'), (match, arg) => match.replace(arg, JSON.stringify(i18nAssets)));
|
95
|
-
|
78
|
+
data.html = data.html.replace(new RegExp('<!--I18nInfoToServer(.*?)I18nInfoToServer-->', 'g'), (match, arg) => match.replace(arg, JSON.stringify(i18nAssets)));
|
79
|
+
// Tell webpack to move on
|
96
80
|
cb(null, data);
|
97
81
|
});
|
98
82
|
});
|
99
83
|
}
|
100
|
-
|
101
84
|
apply(compiler) {
|
102
85
|
if (i18n.chunkSplitEnable) {
|
103
86
|
this.withI18nSpitHandling(compiler);
|
@@ -105,13 +88,12 @@ class I18NInjectIntoIndexPlugin {
|
|
105
88
|
this.withoutI18nSpitHandling(compiler);
|
106
89
|
}
|
107
90
|
}
|
108
|
-
|
109
91
|
withoutI18nSpitHandling(compiler) {
|
110
92
|
compiler.hooks.emit.tap('I18NInjectIntoIndexPlugin', compilation => {
|
111
93
|
// let cdns = Object.keys(this.publicPaths);
|
112
94
|
if (i18nObj === null) {
|
113
|
-
const i18nFiles = Object.keys(compilation.assets).filter(assert => assert.indexOf(`i18n${_path.default.sep}`) !== -1);
|
114
|
-
|
95
|
+
const i18nFiles = Object.keys(compilation.assets).filter(assert => assert.indexOf(`i18n${_path.default.sep}`) !== -1);
|
96
|
+
//hook for i18n url contains i18n/ may cause problem
|
115
97
|
i18nObj = i18nFiles.reduce((res, next) => {
|
116
98
|
const fileName = next.replace(`i18n${_path.default.sep}`, '');
|
117
99
|
const splittedFileName = fileName.split('.');
|
@@ -120,21 +102,16 @@ class I18NInjectIntoIndexPlugin {
|
|
120
102
|
} else {
|
121
103
|
res[splittedFileName[0]] = fileName;
|
122
104
|
} */
|
123
|
-
|
124
105
|
res[splittedFileName[0]] = `${this.publicPath}/i18n/${fileName}`;
|
125
106
|
return res;
|
126
107
|
}, {});
|
127
108
|
}
|
128
|
-
|
129
109
|
const [indexFile] = Object.keys(compilation.assets).filter(filename => /\.html$/g.test(filename));
|
130
|
-
|
131
110
|
if (indexFile) {
|
132
111
|
const source = compilation.assets[indexFile].source();
|
133
112
|
compilation.assets[indexFile] = new _webpackSources.RawSource(source.replace(new RegExp('<!--I18nInfoToServer(.*)I18nInfoToServer-->', 'g'), (match, arg) => match.replace(arg, JSON.stringify(i18nObj))));
|
134
113
|
}
|
135
114
|
});
|
136
115
|
}
|
137
|
-
|
138
116
|
}
|
139
|
-
|
140
117
|
exports.default = I18NInjectIntoIndexPlugin;
|