@zohodesk/react-cli 0.0.1-exp.175.1 → 0.0.1-exp.176.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/.eslintignore +7 -7
- package/.eslintrc.js +180 -180
- package/.prettierrc +6 -6
- package/README.md +1025 -1028
- package/bin/cli.js +482 -482
- package/cert/Tsicsezwild-22-23.crt +37 -37
- package/cert/Tsicsezwild-22-23.key +27 -27
- package/docs/CustomChunks.md +26 -26
- package/docs/DevStart.md +18 -18
- package/docs/HoverActive.md +12 -12
- package/docs/InstallNode.md +28 -28
- package/docs/SelectorWeight.md +6 -0
- package/docs/TODOS.md +10 -10
- package/docs/ValueReplacer.md +60 -60
- package/docs/VariableConversion.md +719 -678
- package/docs/warnings_while_install.txt +35 -35
- package/files/eslintrc.js +62 -62
- package/files/prettierrc.js +3 -3
- package/lib/babel/cmjs-plugins-presets.js +4 -0
- package/lib/babel/es-plugins-presets.js +4 -0
- package/lib/common/getEntries.js +10 -0
- package/lib/common/getPublicPathConfig.js +6 -0
- package/lib/common/index.js +5 -0
- package/lib/common/splitChunks.js +13 -2
- package/lib/common/sslcertUpdater.js +17 -6
- package/lib/common/templateParameters.js +2 -0
- package/lib/common/testPattern.js +21 -10
- package/lib/common/valueReplacer.js +15 -0
- package/lib/configs/jest.config.js +9 -0
- package/lib/configs/libAlias.js +2 -4
- package/lib/configs/webpack.component.umd.config.js +5 -0
- package/lib/configs/webpack.css.umd.config.js +13 -5
- package/lib/configs/webpack.dev.config.js +36 -2
- package/lib/configs/webpack.docs.config.js +21 -1
- package/lib/configs/webpack.impact.config.js +19 -1
- package/lib/configs/webpack.prod.config.js +37 -3
- package/lib/hooks/docsProptypeHook.js +7 -3
- package/lib/jest/commitedFilesResult.js +45 -3
- package/lib/jest/coverageCollector.js +11 -0
- package/lib/jest/jsonMaker.js +6 -0
- package/lib/jest/preProcessors/cssPreprocessor.js +8 -0
- package/lib/jest/preProcessors/jsPreprocessor.js +2 -0
- package/lib/jest/preProcessors/otherFilesPreprocessor.js +3 -0
- package/lib/jest/result.js +22 -0
- package/lib/jest/run.js +17 -6
- package/lib/jest/setup.js +57 -5
- package/lib/loaderUtils/configsAssetsLoaders.js +44 -34
- package/lib/loaderUtils/getCSSLoaders.js +35 -20
- package/lib/loaderUtils/getDevJsLoaders.js +8 -0
- package/lib/loaderUtils/index.js +3 -0
- package/lib/loaderUtils/windowsModification.js +11 -0
- package/lib/loaders/docsLoader.js +7 -0
- package/lib/loaders/docsPropsLoader.js +7 -3
- package/lib/loaders/fileBountryLoader.js +2 -0
- package/lib/loaders/fileLoader.js +22 -11
- package/lib/loaders/scriptInstrumentLoader.js +13 -5
- package/lib/loaders/selectorMappingLoader.js +25 -7
- package/lib/loaders/workerLoader.js +29 -13
- package/lib/middlewares/HMRMiddleware.js +26 -13
- package/lib/middlewares/SSTMiddleware.js +3 -0
- package/lib/pluginUtils/configHtmlWebpackPlugins.js +9 -3
- package/lib/pluginUtils/getDevPlugins.js +68 -22
- package/lib/pluginUtils/getDocsPlugins.js +10 -1
- package/lib/pluginUtils/getLibraryImactPlugins.js +5 -4
- package/lib/pluginUtils/getLibraryPlugins.js +5 -0
- package/lib/pluginUtils/getProdPlugins.js +77 -28
- package/lib/pluginUtils/getServerPlugins.js +5 -0
- package/lib/pluginUtils/getUMDCSSPlugins.js +7 -0
- package/lib/pluginUtils/getUMDComponentPlugins.js +7 -0
- package/lib/pluginUtils/index.js +8 -0
- package/lib/plugins/CdnChangePlugin.js +14 -0
- package/lib/plugins/CleanupStatsPlugin.js +5 -0
- package/lib/plugins/EFCPlugin.js +34 -23
- package/lib/plugins/EFCPlugin.md +6 -6
- package/lib/plugins/EFCTemplatePlugin.js +32 -23
- package/lib/plugins/I18NInjectIntoIndexPlugin.js +38 -12
- package/lib/plugins/I18nSplitPlugin/I18nDebugPlugin.js +17 -12
- package/lib/plugins/I18nSplitPlugin/I18nDependency.js +10 -4
- package/lib/plugins/I18nSplitPlugin/I18nDownlodLogic.js +77 -46
- package/lib/plugins/I18nSplitPlugin/I18nFilesEmitter.js +59 -44
- package/lib/plugins/I18nSplitPlugin/I18nKeysIdentifer.js +30 -21
- package/lib/plugins/I18nSplitPlugin/I18nSplit.md +95 -95
- package/lib/plugins/I18nSplitPlugin/README.md +25 -25
- package/lib/plugins/I18nSplitPlugin/index.js +80 -70
- package/lib/plugins/I18nSplitPlugin/utils/collectI18nKeys.js +12 -2
- package/lib/plugins/I18nSplitPlugin/utils/getI18nFileUrlPathTemplate.js +1 -0
- package/lib/plugins/I18nSplitPlugin/utils/getI18nKeysFormModules.js +5 -0
- package/lib/plugins/I18nSplitPlugin/utils/hashUtils.js +6 -0
- package/lib/plugins/I18nSplitPlugin/utils/index.js +4 -0
- package/lib/plugins/I18nSplitPlugin/utils/propertiesUtils.js +20 -2
- package/lib/plugins/ManifestPlugin.js +17 -0
- package/lib/plugins/ModuleStatsPlugin.js +23 -0
- package/lib/plugins/OptimizeJSPlugin.js +7 -0
- package/lib/plugins/PublicPathCallbackPlugin.js +10 -0
- package/lib/plugins/PublicPathChangePlugin.js +36 -4
- package/lib/plugins/ReportGeneratePlugin.js +30 -4
- package/lib/plugins/RequireVariablePublicPlugin.js +6 -0
- package/lib/plugins/ResourceHintsPlugin.js +27 -20
- package/lib/plugins/RtlSplitPlugin/OverwriteCssPathForRTL.js +17 -12
- package/lib/plugins/RtlSplitPlugin/RtlCssPlugin.js +22 -15
- package/lib/plugins/RtlSplitPlugin/RtrSplit.md +30 -30
- package/lib/plugins/RtlSplitPlugin/replaceCssDirTemplate.js +5 -2
- package/lib/plugins/ScriptInstrumentPlugin.js +7 -0
- package/lib/plugins/SelectorPlugin.js +97 -0
- package/lib/plugins/ServiceWorkerPlugin.js +29 -13
- package/lib/plugins/ShadowDOMSupportPlugin.js +40 -3
- package/lib/plugins/SourceMapHookPlugin.js +9 -0
- package/lib/plugins/TPHashMappingPlugin.js +19 -5
- package/lib/plugins/UglifyCSSPlugin.js +9 -0
- package/lib/plugins/UnusedFilesFindPlugin.js +35 -2
- package/lib/plugins/VariableConversionCollector.js +322 -0
- package/lib/plugins/composeCommonPlugin.js +30 -0
- package/lib/plugins/index.js +19 -0
- package/lib/plugins/libraryImpactPlugin.js +32 -0
- package/lib/plugins/webpackwatchrunplugin.js +5 -0
- package/lib/postcss-plugins/ExcludePlugin.js +4 -0
- package/lib/postcss-plugins/RTLSplitPlugin.js +37 -24
- package/lib/postcss-plugins/ValueReplacer.js +6 -9
- package/lib/postcss-plugins/__test__/hoverActivePlugin.spec.js +3 -0
- package/lib/postcss-plugins/__test__/test1Input.css +38 -38
- package/lib/postcss-plugins/__test__/test1Output.css +38 -38
- package/lib/postcss-plugins/hoverActivePlugin.js +69 -33
- package/lib/postcss-plugins/variableModificationPlugin/ErrorHandler.js +42 -13
- package/lib/postcss-plugins/variableModificationPlugin/index.js +216 -141
- package/lib/postcss-plugins/variableModifier.js +20 -13
- package/lib/schemas/index.js +23 -4
- package/lib/servers/clusterHubServer.js +10 -0
- package/lib/servers/devBuild.js +24 -13
- package/lib/servers/docsServer.js +2 -0
- package/lib/servers/docsServerCore.js +21 -0
- package/lib/servers/getCliPath.js +9 -0
- package/lib/servers/helpServer.js +5 -0
- package/lib/servers/httpsOptions.js +4 -0
- package/lib/servers/impactServer.js +34 -2
- package/lib/servers/mockserver.js +9 -0
- package/lib/servers/nowatchserver.js +34 -12
- package/lib/servers/scrServer.js +20 -13
- package/lib/servers/server.js +35 -7
- package/lib/servers/ssServer.js +16 -0
- package/lib/sh/pre-commit.sh +34 -34
- package/lib/sh/reportPublish.sh +45 -45
- package/lib/templates/CoverageScriptTemplate.js +14 -0
- package/lib/templates/WMSTemplate.js +12 -6
- package/lib/utils/babelPresets.js +2 -0
- package/lib/utils/buildstats.html +148 -148
- package/lib/utils/clean.js +8 -2
- package/lib/utils/copy.js +6 -0
- package/lib/utils/copyTimezones.js +8 -0
- package/lib/utils/createEventStream.js +4 -0
- package/lib/utils/cssClassNameGenerate.js +19 -3
- package/lib/utils/cssURLReplacer.js +25 -0
- package/lib/utils/dependencyPostPublish.js +9 -0
- package/lib/utils/fileUtils.js +26 -0
- package/lib/utils/folderIterator.js +10 -0
- package/lib/utils/getComponents.js +21 -0
- package/lib/utils/getCurrentBranch.js +5 -0
- package/lib/utils/getDependenciesImpactList.js +21 -0
- package/lib/utils/getHash.js +7 -0
- package/lib/utils/getIp.js +2 -0
- package/lib/utils/getOptions.js +39 -14
- package/lib/utils/getServerURL.js +7 -0
- package/lib/utils/index.js +47 -2
- package/lib/utils/init.js +1 -0
- package/lib/utils/initPreCommitHook.js +29 -6
- package/lib/utils/jsonHelper.js +19 -2
- package/lib/utils/libraryImpactConfig.js +2 -0
- package/lib/utils/lint/addScripts.js +5 -2
- package/lib/utils/lint/checkExistingConfig.js +12 -3
- package/lib/utils/lint/copyConfigs.js +3 -0
- package/lib/utils/lint/index.js +9 -0
- package/lib/utils/lint/lintScripts.js +1 -0
- package/lib/utils/lint/lintSetup.js +4 -3
- package/lib/utils/lint/lintStagedPreCommitHook.js +1 -0
- package/lib/utils/lint/question.js +7 -0
- package/lib/utils/lintReporter.js +20 -0
- package/lib/utils/mailSender.js +7 -0
- package/lib/utils/pullOrigin.js +4 -0
- package/lib/utils/reinstallDependencies.js +28 -0
- package/lib/utils/removeAttributes.js +7 -0
- package/lib/utils/repoClone.js +27 -2
- package/lib/utils/request.js +12 -0
- package/lib/utils/resultSchema.json +73 -73
- package/lib/utils/rtl.js +16 -4
- package/lib/utils/setEnvVariables.js +2 -0
- package/lib/utils/ssTestHack.js +10 -0
- package/lib/utils/switchBranch.js +4 -0
- package/lib/utils/urlConcat.js +4 -0
- package/lib/utils/useExitCleanup.js +10 -9
- package/npm8.md +9 -9
- package/package.json +146 -146
- package/postpublish.js +6 -6
- package/templates/app/.eslintrc.js +140 -140
- package/templates/app/README.md +12 -12
- package/templates/app/app/index.html +24 -24
- package/templates/app/app/properties/ApplicationResources_en_US.properties +1 -1
- package/templates/app/app/properties/i18nkeys.json +3 -3
- package/templates/app/docs/all.html +69 -69
- package/templates/app/mockapi/index.js +18 -18
- package/templates/app/package.json +37 -37
- package/templates/app/src/actions/SampleActions/index.js +37 -37
- package/templates/app/src/actions/index.js +65 -65
- package/templates/app/src/appUrls.js +19 -19
- package/templates/app/src/components/Alert/Alert.js +134 -134
- package/templates/app/src/components/Alert/Alert.module.css +79 -79
- package/templates/app/src/components/FreezeLayer/FreezeLayer.css +37 -37
- package/templates/app/src/components/FreezeLayer/FreezeLayer.js +84 -84
- package/templates/app/src/components/Sample/Sample.module.css +11 -11
- package/templates/app/src/components/Sample/SampleList.js +61 -61
- package/templates/app/src/components/Slider/Slider.css +41 -41
- package/templates/app/src/components/Slider/Slider.js +55 -55
- package/templates/app/src/containers/AlertContainer/index.js +15 -15
- package/templates/app/src/containers/AppContainer/index.js +96 -96
- package/templates/app/src/containers/AppContainer/index.module.css +27 -27
- package/templates/app/src/containers/CustomMatch/index.js +65 -65
- package/templates/app/src/containers/DevTools/index.js +10 -10
- package/templates/app/src/containers/Header/index.js +67 -67
- package/templates/app/src/containers/Header/index.module.css +43 -43
- package/templates/app/src/containers/Redirect/index.js +63 -63
- package/templates/app/src/containers/Redirector/index.js +47 -47
- package/templates/app/src/containers/SampleListContainer/ListContainer.js +42 -42
- package/templates/app/src/containers/SampleListContainer/ListContainer.module.css +3 -3
- package/templates/app/src/historyChange.js +5 -5
- package/templates/app/src/index.html +10 -10
- package/templates/app/src/index.js +24 -24
- package/templates/app/src/middleware/PromiseMiddleware.js +59 -59
- package/templates/app/src/reducers/alertData.js +11 -11
- package/templates/app/src/reducers/index.js +6 -6
- package/templates/app/src/reducers/samples.js +19 -19
- package/templates/app/src/store/configureStore.dev.js +51 -51
- package/templates/app/src/store/configureStore.js +5 -5
- package/templates/app/src/store/configureStore.prod.js +26 -26
- package/templates/app/src/util/Common.js +5 -5
- package/templates/app/src/util/RequestAPI.js +132 -132
- package/templates/docs/all.html +249 -249
- package/templates/docs/component.html +178 -178
- package/templates/docs/components.html +221 -221
- package/templates/docs/css/b.min.css +6 -6
- package/templates/docs/css/component.css +42 -42
- package/templates/docs/css/componentTest.css +6 -6
- package/templates/docs/css/hopscotch.css +585 -585
- package/templates/docs/css/style.css +1022 -1022
- package/templates/docs/impactReportTemplate.html +154 -154
- package/templates/docs/index.html +1501 -1501
- package/templates/docs/js/active-line.js +72 -72
- package/templates/docs/js/b.min.js +7 -7
- package/templates/docs/js/codemirror.js +9680 -9680
- package/templates/docs/js/designTokens.js +334 -334
- package/templates/docs/js/j.min.js +4 -4
- package/templates/docs/js/javascript.js +874 -874
- package/templates/docs/js/matchbrackets.js +145 -145
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
|
|
2
|
-
npm WARN deprecated eslint-loader@4.0.2: This loader has been deprecated. Please use eslint-webpack-plugin
|
|
3
|
-
npm WARN deprecated gitlab@14.2.2: The gitlab package has found a new home in the @gitbeaker organization. For the latest gitlab node library, check out @gitbeaker/node. A full list of the features can be found here: https://github.com/jdalrymple/gitbeaker#readme
|
|
4
|
-
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
|
|
5
|
-
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
|
|
6
|
-
npm WARN deprecated webdriverio@4.14.4: outdated version, please use @next
|
|
7
|
-
npm WARN deprecated mkdirp@0.3.5: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
|
|
8
|
-
npm WARN deprecated cross-spawn-async@1.0.1: cross-spawn no longer requires a build toolchain, use it instead
|
|
9
|
-
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
|
|
10
|
-
npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
|
|
11
|
-
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
|
|
12
|
-
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
|
|
13
|
-
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
|
|
14
|
-
npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
|
|
15
|
-
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
|
|
16
|
-
npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
|
|
17
|
-
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
|
|
18
|
-
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
|
|
19
|
-
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^2.1.2 (node_modules/jest-haste-map/node_modules/fsevents):
|
|
20
|
-
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
|
|
21
|
-
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/nodemon/node_modules/chokidar/node_modules/fsevents):
|
|
22
|
-
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
|
|
23
|
-
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/watchpack/node_modules/chokidar/node_modules/fsevents):
|
|
24
|
-
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
|
|
25
|
-
npm WARN check2@1.0.0 No description
|
|
26
|
-
npm WARN check2@1.0.0 No repository field.
|
|
27
|
-
|
|
28
|
-
+ @zohodesk/react-cli@0.0.1-beta.165
|
|
29
|
-
updated 1 package and audited 1899 packages in 51.509s
|
|
30
|
-
|
|
31
|
-
21 packages are looking for funding
|
|
32
|
-
run `npm fund` for details
|
|
33
|
-
|
|
34
|
-
found 42 vulnerabilities (2 low, 20 moderate, 8 high, 12 critical)
|
|
35
|
-
run `npm audit fix` to fix them, or `npm audit` for details
|
|
1
|
+
npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
|
|
2
|
+
npm WARN deprecated eslint-loader@4.0.2: This loader has been deprecated. Please use eslint-webpack-plugin
|
|
3
|
+
npm WARN deprecated gitlab@14.2.2: The gitlab package has found a new home in the @gitbeaker organization. For the latest gitlab node library, check out @gitbeaker/node. A full list of the features can be found here: https://github.com/jdalrymple/gitbeaker#readme
|
|
4
|
+
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
|
|
5
|
+
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
|
|
6
|
+
npm WARN deprecated webdriverio@4.14.4: outdated version, please use @next
|
|
7
|
+
npm WARN deprecated mkdirp@0.3.5: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
|
|
8
|
+
npm WARN deprecated cross-spawn-async@1.0.1: cross-spawn no longer requires a build toolchain, use it instead
|
|
9
|
+
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
|
|
10
|
+
npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
|
|
11
|
+
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
|
|
12
|
+
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
|
|
13
|
+
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
|
|
14
|
+
npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
|
|
15
|
+
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
|
|
16
|
+
npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
|
|
17
|
+
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
|
|
18
|
+
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
|
|
19
|
+
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^2.1.2 (node_modules/jest-haste-map/node_modules/fsevents):
|
|
20
|
+
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
|
|
21
|
+
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/nodemon/node_modules/chokidar/node_modules/fsevents):
|
|
22
|
+
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
|
|
23
|
+
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/watchpack/node_modules/chokidar/node_modules/fsevents):
|
|
24
|
+
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
|
|
25
|
+
npm WARN check2@1.0.0 No description
|
|
26
|
+
npm WARN check2@1.0.0 No repository field.
|
|
27
|
+
|
|
28
|
+
+ @zohodesk/react-cli@0.0.1-beta.165
|
|
29
|
+
updated 1 package and audited 1899 packages in 51.509s
|
|
30
|
+
|
|
31
|
+
21 packages are looking for funding
|
|
32
|
+
run `npm fund` for details
|
|
33
|
+
|
|
34
|
+
found 42 vulnerabilities (2 low, 20 moderate, 8 high, 12 critical)
|
|
35
|
+
run `npm audit fix` to fix them, or `npm audit` for details
|
package/files/eslintrc.js
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
const [off, , error] = ['off', 'warn', 'error'];
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
env: {
|
|
5
|
-
browser: true,
|
|
6
|
-
es2021: true,
|
|
7
|
-
},
|
|
8
|
-
extends: [
|
|
9
|
-
'plugin:react/recommended',
|
|
10
|
-
'plugin:react-hooks/recommended',
|
|
11
|
-
'airbnb',
|
|
12
|
-
'prettier',
|
|
13
|
-
],
|
|
14
|
-
parserOptions: {
|
|
15
|
-
ecmaFeatures: {
|
|
16
|
-
jsx: true,
|
|
17
|
-
},
|
|
18
|
-
ecmaVersion: 12,
|
|
19
|
-
sourceType: 'module',
|
|
20
|
-
},
|
|
21
|
-
plugins: [
|
|
22
|
-
'react',
|
|
23
|
-
'css-modules',
|
|
24
|
-
'@zohodesk/zsecurity',
|
|
25
|
-
'@zohodesk/react-performance',
|
|
26
|
-
],
|
|
27
|
-
rules: {
|
|
28
|
-
// Internal Rules
|
|
29
|
-
'@zohodesk/react-performance/no-ref-mapstatetoprops': error,
|
|
30
|
-
'@zohodesk/zsecurity/no-unsecure-html': error,
|
|
31
|
-
'@zohodesk/zsecurity/no-protocol-check': error,
|
|
32
|
-
|
|
33
|
-
// CSS Module Rules
|
|
34
|
-
'css-modules/no-unused-class': [error, { camelCase: true }],
|
|
35
|
-
'css-modules/no-undef-class': [error, { camelCase: 'only' }],
|
|
36
|
-
|
|
37
|
-
'import/no-unresolved': off,
|
|
38
|
-
'import/no-extraneous-dependencies': off,
|
|
39
|
-
|
|
40
|
-
// As redux used
|
|
41
|
-
'no-shadow': off, // As we import the action files and use the same name in getting from props built from connect.
|
|
42
|
-
'react/jsx-filename-extension': off,
|
|
43
|
-
|
|
44
|
-
// As we don't follow
|
|
45
|
-
'react/require-default-props': off,
|
|
46
|
-
'react/jsx-props-no-spreading': off,
|
|
47
|
-
|
|
48
|
-
// As we didn't update
|
|
49
|
-
'react/jsx-fragments': off,
|
|
50
|
-
|
|
51
|
-
// Not needed
|
|
52
|
-
'no-plusplus': off,
|
|
53
|
-
'no-unused-expressions': [
|
|
54
|
-
error,
|
|
55
|
-
{
|
|
56
|
-
allowShortCircuit: true,
|
|
57
|
-
allowTernary: true,
|
|
58
|
-
},
|
|
59
|
-
],
|
|
60
|
-
'react/jsx-no-target-blank': error,
|
|
61
|
-
},
|
|
62
|
-
};
|
|
1
|
+
const [off, , error] = ['off', 'warn', 'error'];
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
env: {
|
|
5
|
+
browser: true,
|
|
6
|
+
es2021: true,
|
|
7
|
+
},
|
|
8
|
+
extends: [
|
|
9
|
+
'plugin:react/recommended',
|
|
10
|
+
'plugin:react-hooks/recommended',
|
|
11
|
+
'airbnb',
|
|
12
|
+
'prettier',
|
|
13
|
+
],
|
|
14
|
+
parserOptions: {
|
|
15
|
+
ecmaFeatures: {
|
|
16
|
+
jsx: true,
|
|
17
|
+
},
|
|
18
|
+
ecmaVersion: 12,
|
|
19
|
+
sourceType: 'module',
|
|
20
|
+
},
|
|
21
|
+
plugins: [
|
|
22
|
+
'react',
|
|
23
|
+
'css-modules',
|
|
24
|
+
'@zohodesk/zsecurity',
|
|
25
|
+
'@zohodesk/react-performance',
|
|
26
|
+
],
|
|
27
|
+
rules: {
|
|
28
|
+
// Internal Rules
|
|
29
|
+
'@zohodesk/react-performance/no-ref-mapstatetoprops': error,
|
|
30
|
+
'@zohodesk/zsecurity/no-unsecure-html': error,
|
|
31
|
+
'@zohodesk/zsecurity/no-protocol-check': error,
|
|
32
|
+
|
|
33
|
+
// CSS Module Rules
|
|
34
|
+
'css-modules/no-unused-class': [error, { camelCase: true }],
|
|
35
|
+
'css-modules/no-undef-class': [error, { camelCase: 'only' }],
|
|
36
|
+
|
|
37
|
+
'import/no-unresolved': off,
|
|
38
|
+
'import/no-extraneous-dependencies': off,
|
|
39
|
+
|
|
40
|
+
// As redux used
|
|
41
|
+
'no-shadow': off, // As we import the action files and use the same name in getting from props built from connect.
|
|
42
|
+
'react/jsx-filename-extension': off,
|
|
43
|
+
|
|
44
|
+
// As we don't follow
|
|
45
|
+
'react/require-default-props': off,
|
|
46
|
+
'react/jsx-props-no-spreading': off,
|
|
47
|
+
|
|
48
|
+
// As we didn't update
|
|
49
|
+
'react/jsx-fragments': off,
|
|
50
|
+
|
|
51
|
+
// Not needed
|
|
52
|
+
'no-plusplus': off,
|
|
53
|
+
'no-unused-expressions': [
|
|
54
|
+
error,
|
|
55
|
+
{
|
|
56
|
+
allowShortCircuit: true,
|
|
57
|
+
allowTernary: true,
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
'react/jsx-no-target-blank': error,
|
|
61
|
+
},
|
|
62
|
+
};
|
package/files/prettierrc.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
trailingComma: 'none',
|
|
3
|
-
};
|
|
1
|
+
module.exports = {
|
|
2
|
+
trailingComma: 'none',
|
|
3
|
+
};
|
|
@@ -4,17 +4,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
|
|
7
8
|
var _utils = require("../utils");
|
|
9
|
+
|
|
8
10
|
let {
|
|
9
11
|
module: {
|
|
10
12
|
mode
|
|
11
13
|
}
|
|
12
14
|
} = (0, _utils.getOptions)();
|
|
13
15
|
let isProd = mode.toLowerCase() === 'prod';
|
|
16
|
+
|
|
14
17
|
var _default = () => ({
|
|
15
18
|
presets: [require.resolve('@babel/preset-env'), require.resolve('@babel/preset-react')],
|
|
16
19
|
plugins: [[require.resolve('babel-plugin-transform-define'), isProd ? {
|
|
17
20
|
__DOCS__: false
|
|
18
21
|
} : {}]]
|
|
19
22
|
});
|
|
23
|
+
|
|
20
24
|
exports.default = _default;
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
|
|
7
8
|
var _utils = require("../utils");
|
|
9
|
+
|
|
8
10
|
let {
|
|
9
11
|
module: {
|
|
10
12
|
mode,
|
|
@@ -12,6 +14,7 @@ let {
|
|
|
12
14
|
}
|
|
13
15
|
} = (0, _utils.getOptions)();
|
|
14
16
|
let isProd = mode.toLowerCase() === 'prod';
|
|
17
|
+
|
|
15
18
|
var _default = () => ({
|
|
16
19
|
presets: [[require.resolve('@babel/preset-env'), disableES5Transpile ? {
|
|
17
20
|
modules: false,
|
|
@@ -27,4 +30,5 @@ var _default = () => ({
|
|
|
27
30
|
__DOCS__: false
|
|
28
31
|
} : {}], require.resolve('@babel/plugin-syntax-dynamic-import')]
|
|
29
32
|
});
|
|
33
|
+
|
|
30
34
|
exports.default = _default;
|
package/lib/common/getEntries.js
CHANGED
|
@@ -4,9 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
|
|
7
8
|
var _path = _interopRequireDefault(require("path"));
|
|
9
|
+
|
|
8
10
|
var _utils = require("../utils");
|
|
11
|
+
|
|
9
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
10
14
|
let getEntries = (appSchemas, mode) => {
|
|
11
15
|
let appPath = process.cwd();
|
|
12
16
|
let {
|
|
@@ -26,17 +30,23 @@ let getEntries = (appSchemas, mode) => {
|
|
|
26
30
|
let entry = {
|
|
27
31
|
main: mainJs
|
|
28
32
|
};
|
|
33
|
+
|
|
29
34
|
if (mode === 'dev' || mode === 'dev-no-warn') {
|
|
30
35
|
mainJs.push(`${_path.default.join(__dirname, '..', 'templates', 'WMSTemplate')}?wmsPath=wss:${(0, _utils.getServerURL)(server)}`);
|
|
31
36
|
}
|
|
37
|
+
|
|
32
38
|
mainJs.push(_path.default.join(appPath, folder, isReactMig ? 'migration.js' : 'index.js'));
|
|
39
|
+
|
|
33
40
|
if (hasWidget) {
|
|
34
41
|
entry.widget = [_path.default.join(appPath, folder, 'widget.js')];
|
|
35
42
|
}
|
|
43
|
+
|
|
36
44
|
if (hasEFC) {
|
|
37
45
|
entry.efc = [_path.default.join(appPath, folder, 'efc.js')];
|
|
38
46
|
}
|
|
47
|
+
|
|
39
48
|
return entry;
|
|
40
49
|
};
|
|
50
|
+
|
|
41
51
|
var _default = getEntries;
|
|
42
52
|
exports.default = _default;
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
|
|
7
8
|
var _utils = require("../utils");
|
|
9
|
+
|
|
8
10
|
let {
|
|
9
11
|
app: {
|
|
10
12
|
publicPaths,
|
|
@@ -18,8 +20,10 @@ let {
|
|
|
18
20
|
}
|
|
19
21
|
} = (0, _utils.getOptions)();
|
|
20
22
|
let isDevelopment = mode === 'dev' || mode === 'prod' || mode === 'dev-no-warn';
|
|
23
|
+
|
|
21
24
|
var _default = url => {
|
|
22
25
|
let type = (0, _utils.getFileType)(url);
|
|
26
|
+
|
|
23
27
|
if (!isDevelopment) {
|
|
24
28
|
if (publicPaths && publicPaths.callback) {
|
|
25
29
|
return `${publicPaths.callback}(${JSON.stringify(type)}) + ${JSON.stringify(url)}`;
|
|
@@ -29,6 +33,8 @@ var _default = url => {
|
|
|
29
33
|
return `__REACT_CLI_${type.toUpperCase()}_PUBLIC_PATH__ + ${JSON.stringify(url)}`;
|
|
30
34
|
}
|
|
31
35
|
}
|
|
36
|
+
|
|
32
37
|
return `__webpack_public_path__ + ${JSON.stringify(url)}`;
|
|
33
38
|
};
|
|
39
|
+
|
|
34
40
|
exports.default = _default;
|
package/lib/common/index.js
CHANGED
|
@@ -27,8 +27,13 @@ Object.defineProperty(exports, "templateParameters", {
|
|
|
27
27
|
return _templateParameters.default;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
+
|
|
30
31
|
var _splitChunks = _interopRequireDefault(require("./splitChunks"));
|
|
32
|
+
|
|
31
33
|
var _getEntries = _interopRequireDefault(require("./getEntries"));
|
|
34
|
+
|
|
32
35
|
var _getPublicPathConfig = _interopRequireDefault(require("./getPublicPathConfig"));
|
|
36
|
+
|
|
33
37
|
var _templateParameters = _interopRequireDefault(require("./templateParameters"));
|
|
38
|
+
|
|
34
39
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -4,11 +4,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
|
|
7
8
|
var _path = _interopRequireDefault(require("path"));
|
|
9
|
+
|
|
8
10
|
var _os = _interopRequireDefault(require("os"));
|
|
11
|
+
|
|
9
12
|
var _utils = require("../utils");
|
|
13
|
+
|
|
10
14
|
var _testPattern = require("./testPattern");
|
|
15
|
+
|
|
11
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
12
18
|
let isWindows = _os.default.platform().toLowerCase() === 'win32';
|
|
13
19
|
let ps = _path.default.sep;
|
|
14
20
|
let options = (0, _utils.getOptions)();
|
|
@@ -19,6 +25,7 @@ let {
|
|
|
19
25
|
vendorInclude
|
|
20
26
|
}
|
|
21
27
|
} = options;
|
|
28
|
+
|
|
22
29
|
let isVendor = function isVendor(module) {
|
|
23
30
|
let {
|
|
24
31
|
userRequest
|
|
@@ -27,6 +34,7 @@ let isVendor = function isVendor(module) {
|
|
|
27
34
|
excludeList = [...excludeList, ...vendorExclude];
|
|
28
35
|
return userRequest && (vendorInclude.some(item => userRequest.indexOf(item) !== -1) || userRequest.indexOf('node_modules') >= 0 && userRequest.endsWith('.css') === false && userRequest.endsWith('publicPathConfig.js') === false && excludeList.every(item => userRequest.indexOf(`node_modules${ps}${item}${ps}`) === -1));
|
|
29
36
|
};
|
|
37
|
+
|
|
30
38
|
let isReact = module => {
|
|
31
39
|
let {
|
|
32
40
|
userRequest
|
|
@@ -34,6 +42,7 @@ let isReact = module => {
|
|
|
34
42
|
let reactBundle = ['react', 'react-dom'];
|
|
35
43
|
return userRequest && reactBundle.some(pkg => userRequest.indexOf(`node_modules${ps}${pkg}${ps}`) >= 0);
|
|
36
44
|
};
|
|
45
|
+
|
|
37
46
|
let defaultChunks = {
|
|
38
47
|
'react.vendor': {
|
|
39
48
|
name: 'react.vendor',
|
|
@@ -86,8 +95,7 @@ customChunks.map((obj, index) => ({
|
|
|
86
95
|
const {
|
|
87
96
|
userRequest
|
|
88
97
|
} = m;
|
|
89
|
-
return (0, _testPattern.testPattern)(userRequest, rules);
|
|
90
|
-
// return (
|
|
98
|
+
return (0, _testPattern.testPattern)(userRequest, rules); // return (
|
|
91
99
|
// pkgs.some(p => isRelated(userRequest, p)) ||
|
|
92
100
|
// (includeDepenency && isDependency(m, pkgs))
|
|
93
101
|
// );
|
|
@@ -97,12 +105,15 @@ customChunks.map((obj, index) => ({
|
|
|
97
105
|
minChunks,
|
|
98
106
|
priority
|
|
99
107
|
};
|
|
108
|
+
|
|
100
109
|
if (minSize !== undefined) {
|
|
101
110
|
obj.minSize = minSize;
|
|
102
111
|
}
|
|
112
|
+
|
|
103
113
|
if (maxSize !== undefined) {
|
|
104
114
|
obj.maxSize = maxSize;
|
|
105
115
|
}
|
|
116
|
+
|
|
106
117
|
return customChunksConfig[name] = obj;
|
|
107
118
|
});
|
|
108
119
|
var _default = {
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _https = _interopRequireDefault(require("https"));
|
|
4
|
+
|
|
4
5
|
var _http = _interopRequireDefault(require("http"));
|
|
6
|
+
|
|
5
7
|
var _path = _interopRequireDefault(require("path"));
|
|
8
|
+
|
|
6
9
|
var _fs = _interopRequireDefault(require("fs"));
|
|
10
|
+
|
|
7
11
|
var _getOptions = _interopRequireDefault(require("../utils/getOptions"));
|
|
12
|
+
|
|
8
13
|
var _urlConcat = require("../utils/urlConcat");
|
|
14
|
+
|
|
9
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
|
|
10
17
|
const {
|
|
11
18
|
sslCertURL
|
|
12
19
|
} = (0, _getOptions.default)();
|
|
20
|
+
|
|
13
21
|
const CRET_FOLDER_PATH = _path.default.join(__dirname, '..', '..', 'cert');
|
|
22
|
+
|
|
14
23
|
console.log({
|
|
15
24
|
CRET_FOLDER_PATH,
|
|
16
25
|
sslCertURL
|
|
@@ -18,6 +27,7 @@ console.log({
|
|
|
18
27
|
const CERT_PATH = 'cert.pem';
|
|
19
28
|
const KEY_PATH = 'key.pem';
|
|
20
29
|
const PASSPHRASE_PATH = 'passphrase.pem';
|
|
30
|
+
|
|
21
31
|
function updateSSlFile(sslCertURL, filename) {
|
|
22
32
|
let url = (0, _urlConcat.urlConcat)(sslCertURL, filename);
|
|
23
33
|
console.log({
|
|
@@ -25,24 +35,25 @@ function updateSSlFile(sslCertURL, filename) {
|
|
|
25
35
|
});
|
|
26
36
|
(url.startsWith('https://') ? _https.default : _http.default).get(url, resp => {
|
|
27
37
|
let fpath = _path.default.join(CRET_FOLDER_PATH, filename);
|
|
28
|
-
|
|
29
|
-
// A chunk of data has been received.
|
|
38
|
+
|
|
39
|
+
let data = ''; // A chunk of data has been received.
|
|
40
|
+
|
|
30
41
|
resp.on('data', chunk => {
|
|
31
42
|
data += chunk;
|
|
32
|
-
});
|
|
43
|
+
}); // The whole response has been received. Print out the result.
|
|
33
44
|
|
|
34
|
-
// The whole response has been received. Print out the result.
|
|
35
45
|
resp.on('end', () => {
|
|
36
46
|
_fs.default.writeFileSync(fpath, data);
|
|
37
|
-
});
|
|
38
|
-
// return;
|
|
47
|
+
}); // return;
|
|
39
48
|
}).on('error', err => {
|
|
40
49
|
console.log(`Error: ${err.message}`);
|
|
41
50
|
});
|
|
42
51
|
}
|
|
52
|
+
|
|
43
53
|
if (!sslCertURL) {
|
|
44
54
|
throw 'sslCertURL not given';
|
|
45
55
|
}
|
|
56
|
+
|
|
46
57
|
updateSSlFile(sslCertURL, PASSPHRASE_PATH);
|
|
47
58
|
updateSSlFile(sslCertURL, CERT_PATH);
|
|
48
59
|
updateSSlFile(sslCertURL, KEY_PATH);
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
|
|
7
8
|
var _default = (compilation, assets, assetTags, options) => {
|
|
8
9
|
Object.keys(assetTags).forEach(rootTag => {
|
|
9
10
|
assetTags[rootTag].forEach(tag => {
|
|
@@ -20,4 +21,5 @@ var _default = (compilation, assets, assetTags, options) => {
|
|
|
20
21
|
}
|
|
21
22
|
};
|
|
22
23
|
};
|
|
24
|
+
|
|
23
25
|
exports.default = _default;
|
|
@@ -6,53 +6,64 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.isDependency = isDependency;
|
|
7
7
|
exports.isRelatedPackage = exports.isRelated = void 0;
|
|
8
8
|
exports.testPattern = testPattern;
|
|
9
|
+
|
|
9
10
|
var _path = require("path");
|
|
11
|
+
|
|
10
12
|
// in our development we only use windows, mac and linux
|
|
11
|
-
const isWindows = _path.sep !== '/';
|
|
13
|
+
const isWindows = _path.sep !== '/'; // this function will return true if pattern matched
|
|
12
14
|
|
|
13
|
-
// this function will return true if pattern matched
|
|
14
15
|
function _testPattern(req, pattern) {
|
|
15
16
|
let modifyedPattern = pattern;
|
|
17
|
+
|
|
16
18
|
if (/[*.$^]/.test(modifyedPattern)) {
|
|
17
19
|
if (isWindows) {
|
|
18
20
|
// modifyedPattern = pattern.replace(/\//g, ps.replace(/\\/g, '\\\\'));
|
|
19
21
|
modifyedPattern = modifyedPattern.replace(/\//g, '\\\\');
|
|
20
22
|
}
|
|
23
|
+
|
|
21
24
|
modifyedPattern = modifyedPattern.replace(/\./g, '\\.').replace(/\*/g, '.*');
|
|
22
25
|
const re = new RegExp(modifyedPattern);
|
|
23
26
|
return re.test(req);
|
|
24
27
|
}
|
|
28
|
+
|
|
25
29
|
if (isWindows) {
|
|
26
30
|
// modifyedPattern = pattern.replace(/\//g, ps.replace(/\\/g, '\\\\'));
|
|
27
31
|
modifyedPattern = modifyedPattern.replace(/\//g, '\\');
|
|
28
32
|
}
|
|
33
|
+
|
|
29
34
|
return req.indexOf(modifyedPattern) !== -1;
|
|
30
35
|
}
|
|
36
|
+
|
|
31
37
|
function testPattern(req, pattern) {
|
|
32
38
|
if (!req || !pattern) {
|
|
33
39
|
return false;
|
|
34
40
|
}
|
|
41
|
+
|
|
35
42
|
if (Array.isArray(pattern)) {
|
|
36
43
|
// eslint-disable-next-line no-unused-vars
|
|
37
44
|
return pattern.every(p => testPattern(req, p));
|
|
38
45
|
}
|
|
46
|
+
|
|
39
47
|
if (pattern[0] === '!') {
|
|
40
48
|
return !_testPattern(req, pattern.slice(1));
|
|
41
49
|
}
|
|
50
|
+
|
|
42
51
|
return _testPattern(req, pattern);
|
|
43
52
|
}
|
|
44
|
-
|
|
45
|
-
// export const isRelated = (req, item) => testPattern(req, item);
|
|
53
|
+
|
|
54
|
+
const isRelated = (req, item) => req && req.indexOf(item) !== -1; // export const isRelated = (req, item) => testPattern(req, item);
|
|
55
|
+
|
|
56
|
+
|
|
46
57
|
exports.isRelated = isRelated;
|
|
47
|
-
|
|
48
|
-
// export const isRelated = (req, item) => testPattern(req, item);
|
|
58
|
+
|
|
59
|
+
const isRelatedPackage = (req, item) => isRelated(req, `node_modules${_path.sep}${item}${_path.sep}`) !== -1; // export const isRelated = (req, item) => testPattern(req, item);
|
|
60
|
+
|
|
61
|
+
|
|
49
62
|
exports.isRelatedPackage = isRelatedPackage;
|
|
63
|
+
|
|
50
64
|
function isDependency(m, excludeList) {
|
|
51
65
|
// let reasons = m.reasons.map(r => r.module.userRequest);
|
|
52
66
|
// m.reasons.some(r => !r.module || !r.module.userRequest) && console.log(m.reasons);
|
|
53
67
|
return m.reasons.some(r => excludeList.some(item => r.module && isRelated(r.module.userRequest, item)));
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// export function queryHandler(conditions, pattern) {
|
|
57
|
-
|
|
68
|
+
} // export function queryHandler(conditions, pattern) {
|
|
58
69
|
// }
|
|
@@ -1,38 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _postcss = _interopRequireDefault(require("postcss"));
|
|
4
|
+
|
|
4
5
|
var _path = _interopRequireDefault(require("path"));
|
|
6
|
+
|
|
5
7
|
var _fs = _interopRequireDefault(require("fs"));
|
|
8
|
+
|
|
6
9
|
var _folderIterator = _interopRequireDefault(require("../utils/folderIterator"));
|
|
10
|
+
|
|
7
11
|
var _utils = require("../utils");
|
|
12
|
+
|
|
8
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
|
|
9
15
|
const cwd = process.cwd();
|
|
16
|
+
|
|
10
17
|
const src = _path.default.join(cwd, process.argv[2]);
|
|
18
|
+
|
|
11
19
|
const dist = _path.default.join(cwd, process.argv[3]);
|
|
20
|
+
|
|
12
21
|
const docopy = process.argv[4] === 'true';
|
|
13
22
|
const {
|
|
14
23
|
css: {
|
|
15
24
|
valueReplacer
|
|
16
25
|
}
|
|
17
26
|
} = (0, _utils.getOptions)();
|
|
27
|
+
|
|
18
28
|
if (!_fs.default.existsSync(dist)) {
|
|
19
29
|
_fs.default.mkdirSync(dist, {
|
|
20
30
|
recursive: true
|
|
21
31
|
});
|
|
22
32
|
}
|
|
33
|
+
|
|
23
34
|
(0, _folderIterator.default)(src, dist, docopy ? false : ['.css'], false, (fromPath, toPath) => {
|
|
24
35
|
//console.log({ fromPath: fromPath, toPath: toPath });
|
|
25
36
|
let css = _fs.default.readFileSync(fromPath);
|
|
37
|
+
|
|
26
38
|
if (docopy && !fromPath.endsWith('.css')) {
|
|
27
39
|
//console.log(toPath,'....');
|
|
28
40
|
_fs.default.writeFileSync(toPath, css);
|
|
41
|
+
|
|
29
42
|
return;
|
|
30
43
|
}
|
|
44
|
+
|
|
31
45
|
(0, _postcss.default)([valueReplacer && require('../postcss-plugins/ValueReplacer')(valueReplacer)]).process(css, {
|
|
32
46
|
from: fromPath,
|
|
33
47
|
to: toPath
|
|
34
48
|
}).then(result => {
|
|
35
49
|
_fs.default.writeFile(toPath, result.css, () => true);
|
|
50
|
+
|
|
36
51
|
if (result.map) {
|
|
37
52
|
_fs.default.writeFile(`${toPath}.map`, result.map, () => true);
|
|
38
53
|
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _fs = require("fs");
|
|
4
|
+
|
|
4
5
|
var _path = _interopRequireDefault(require("path"));
|
|
6
|
+
|
|
5
7
|
var _libAlias = require("./libAlias");
|
|
8
|
+
|
|
6
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
|
|
7
11
|
const appPath = process.cwd();
|
|
12
|
+
|
|
8
13
|
const appGlobals = _path.default.resolve(appPath, '__testUtils__', 'globals.js');
|
|
14
|
+
|
|
9
15
|
const commonConfig = {
|
|
10
16
|
coverageReporters: ['json', 'html', 'json-summary', 'text'],
|
|
11
17
|
collectCoverage: true,
|
|
@@ -30,14 +36,17 @@ const commonConfig = {
|
|
|
30
36
|
__TEST__: true
|
|
31
37
|
}
|
|
32
38
|
};
|
|
39
|
+
|
|
33
40
|
module.exports = (...args) => {
|
|
34
41
|
const [appFolder, forCommittedFiles = false] = args;
|
|
42
|
+
|
|
35
43
|
if (forCommittedFiles) {
|
|
36
44
|
return Object.assign({}, commonConfig, {
|
|
37
45
|
coverageDirectory: _path.default.resolve(appPath, 'commitCoverage'),
|
|
38
46
|
testResultsProcessor: _path.default.resolve(__dirname, '..', 'jest', 'commitedFilesResult.js')
|
|
39
47
|
});
|
|
40
48
|
}
|
|
49
|
+
|
|
41
50
|
return Object.assign({}, commonConfig, {
|
|
42
51
|
rootDir: appPath,
|
|
43
52
|
testPathIgnorePatterns: ['/node_modules/', 'docs'],
|