@elliemae/pui-cli 7.27.0-beta.2 → 7.27.1

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.
Files changed (105) hide show
  1. package/README.md +1 -0
  2. package/dist/cjs/cli.js +12 -14
  3. package/dist/cjs/commands/build.js +8 -9
  4. package/dist/cjs/commands/codemod.js +9 -7
  5. package/dist/cjs/commands/gendoc.js +2 -2
  6. package/dist/cjs/commands/lint.js +23 -21
  7. package/dist/cjs/commands/pack.js +20 -25
  8. package/dist/cjs/commands/start.js +10 -11
  9. package/dist/cjs/commands/storybook.js +18 -19
  10. package/dist/cjs/commands/test.js +31 -37
  11. package/dist/cjs/commands/tscheck.js +8 -9
  12. package/dist/cjs/commands/utils.js +6 -11
  13. package/dist/cjs/commands/version.js +19 -21
  14. package/dist/cjs/commands/vitest.js +28 -32
  15. package/dist/cjs/index.cjs +2 -0
  16. package/dist/cjs/index.js +2 -2
  17. package/dist/cjs/monorepo/delete-merged-tags.js +1 -1
  18. package/dist/cjs/monorepo/set-registry-version.js +2 -2
  19. package/dist/cjs/monorepo/set-workspace-version.js +2 -2
  20. package/dist/cjs/server/app-routes.cjs +42 -0
  21. package/dist/cjs/server/csp.js +4 -3
  22. package/dist/cjs/server/index.js +11 -13
  23. package/dist/cjs/server/middlewares.js +4 -7
  24. package/dist/cjs/server/utils.js +1 -1
  25. package/dist/cjs/testing/setup-tests.js +4 -2
  26. package/dist/cjs/webpack/helpers.js +3 -3
  27. package/dist/cjs/webpack/webpack.base.babel.js +10 -3
  28. package/dist/cjs/webpack/webpack.dev.babel.js +10 -13
  29. package/dist/cjs/webpack/webpack.lib.base.babel.js +5 -4
  30. package/dist/cjs/webpack/webpack.lib.dev.babel.js +0 -1
  31. package/dist/cjs/webpack/webpack.prod.babel.js +15 -7
  32. package/dist/cjs/webpack/webpack.storybook.js +20 -27
  33. package/dist/esm/cli.js +12 -14
  34. package/dist/esm/commands/build.js +8 -9
  35. package/dist/esm/commands/codemod.js +9 -7
  36. package/dist/esm/commands/gendoc.js +2 -2
  37. package/dist/esm/commands/lint.js +23 -27
  38. package/dist/esm/commands/pack.js +20 -32
  39. package/dist/esm/commands/start.js +10 -11
  40. package/dist/esm/commands/storybook.js +18 -19
  41. package/dist/esm/commands/test.js +31 -37
  42. package/dist/esm/commands/tscheck.js +8 -9
  43. package/dist/esm/commands/utils.js +5 -10
  44. package/dist/esm/commands/version.js +19 -21
  45. package/dist/esm/commands/vitest.js +28 -32
  46. package/dist/esm/index.cjs +2 -0
  47. package/dist/esm/index.js +1 -1
  48. package/dist/esm/monorepo/delete-merged-tags.js +1 -1
  49. package/dist/esm/monorepo/set-registry-version.js +2 -2
  50. package/dist/esm/monorepo/set-workspace-version.js +2 -2
  51. package/dist/esm/server/app-routes.cjs +42 -0
  52. package/dist/esm/server/csp.js +4 -3
  53. package/dist/esm/server/index.js +11 -13
  54. package/dist/esm/server/middlewares.js +4 -7
  55. package/dist/esm/server/utils.js +1 -1
  56. package/dist/esm/testing/setup-tests.js +4 -2
  57. package/dist/esm/webpack/helpers.js +3 -3
  58. package/dist/esm/webpack/webpack.base.babel.js +10 -3
  59. package/dist/esm/webpack/webpack.dev.babel.js +10 -13
  60. package/dist/esm/webpack/webpack.lib.base.babel.js +5 -4
  61. package/dist/esm/webpack/webpack.lib.dev.babel.js +0 -1
  62. package/dist/esm/webpack/webpack.prod.babel.js +15 -7
  63. package/dist/esm/webpack/webpack.storybook.js +20 -27
  64. package/dist/types/commands/build.d.ts +13 -13
  65. package/dist/types/commands/codemod.d.ts +6 -13
  66. package/dist/types/commands/gendoc.d.ts +6 -7
  67. package/dist/types/commands/lint.d.ts +29 -29
  68. package/dist/types/commands/pack.d.ts +26 -29
  69. package/dist/types/commands/start.d.ts +13 -17
  70. package/dist/types/commands/storybook.d.ts +27 -28
  71. package/dist/types/commands/test.d.ts +39 -47
  72. package/dist/types/commands/tscheck.d.ts +14 -16
  73. package/dist/types/commands/utils.d.ts +11 -11
  74. package/dist/types/commands/version.d.ts +28 -31
  75. package/dist/types/commands/vitest.d.ts +35 -41
  76. package/dist/types/index.d.cts +2 -1
  77. package/dist/types/index.d.ts +11 -11
  78. package/dist/types/monorepo/delete-merged-tags.d.ts +1 -1
  79. package/dist/types/monorepo/set-registry-version.d.ts +1 -1
  80. package/dist/types/monorepo/set-workspace-version.d.ts +1 -1
  81. package/dist/types/server/app-routes.d.cts +1 -0
  82. package/dist/types/server/csp.d.ts +9 -12
  83. package/dist/types/server/logger.d.ts +4 -7
  84. package/dist/types/server/middlewares.d.ts +2 -6
  85. package/dist/types/server/utils.d.ts +3 -3
  86. package/dist/types/testing/jest.config.d.cts +10 -10
  87. package/dist/types/testing/jest.node.config.d.cts +10 -10
  88. package/dist/types/webpack/helpers.d.ts +18 -19
  89. package/dist/types/webpack/webpack.base.babel.d.ts +106 -3
  90. package/dist/types/webpack/webpack.dev.babel.d.ts +1 -2
  91. package/dist/types/webpack/webpack.lib.base.babel.d.ts +102 -3
  92. package/dist/types/webpack/webpack.lib.dev.babel.d.ts +101 -3
  93. package/dist/types/webpack/webpack.lib.prod.babel.d.ts +101 -2
  94. package/dist/types/webpack/webpack.prod.babel.d.ts +2 -3
  95. package/dist/types/webpack/webpack.storybook.d.ts +4 -5
  96. package/package.json +52 -66
  97. package/dist/cjs/monorepo/utils.js +0 -54
  98. package/dist/cjs/server/appRoutes.js +0 -74
  99. package/dist/cjs/utils.js +0 -50
  100. package/dist/esm/monorepo/utils.js +0 -24
  101. package/dist/esm/server/appRoutes.js +0 -44
  102. package/dist/esm/utils.js +0 -20
  103. package/dist/types/monorepo/utils.d.ts +0 -1
  104. package/dist/types/server/appRoutes.d.ts +0 -2
  105. package/dist/types/utils.d.ts +0 -4
@@ -28,13 +28,14 @@ const sendFileWithCSPNonce = ({
28
28
  res.sendStatus(404);
29
29
  } else {
30
30
  res.set("Content-Type", "text/html");
31
- res.send(html.replace(nonceRegex, res.locals.cspNonce));
31
+ res.send(html.replace(nonceRegex, (res.locals || {}).cspNonce));
32
32
  }
33
33
  });
34
34
  };
35
35
  const getScriptSrc = () => {
36
- const source = (req, res) => `'nonce-${res.locals.cspNonce}'`;
37
- const scriptSrc = sources.concat([source]);
36
+ const scriptSrc = sources.concat([
37
+ (req, res) => `'nonce-${res.locals.cspNonce}'`
38
+ ]);
38
39
  return true ? scriptSrc.concat(["'unsafe-eval'"]) : scriptSrc;
39
40
  };
40
41
  const csp = (app) => {
@@ -5,16 +5,14 @@ import {
5
5
  setupAdditionalMiddlewars
6
6
  } from "./middlewares.js";
7
7
  import { port, host } from "./utils.js";
8
- import { loadRoutes } from "./appRoutes.js";
9
- (async function startServer() {
10
- const app = express();
11
- setupDefaultMiddlewares(app);
12
- await loadRoutes(app);
13
- setupAdditionalMiddlewars(app);
14
- app.listen(port, host, () => {
15
- logger.appStarted(port.toString(), host || "localhost");
16
- }).on("error", (err) => {
17
- logger.error(err);
18
- process.exit(1);
19
- });
20
- })();
8
+ import { loadRoutes } from "./app-routes.cjs";
9
+ const app = express();
10
+ setupDefaultMiddlewares(app);
11
+ loadRoutes(app);
12
+ setupAdditionalMiddlewars(app);
13
+ app.listen(port, host, async (err) => {
14
+ if (err) {
15
+ return logger.error(err.message);
16
+ }
17
+ logger.appStarted(port, host || "localhost");
18
+ });
@@ -2,12 +2,12 @@ import express from "express";
2
2
  import cors from "cors";
3
3
  import compression from "compression";
4
4
  import expressStaticGzip from "express-static-gzip";
5
- import pinoLogger from "pino-http";
5
+ import expressPinoLogger from "express-pino-logger";
6
6
  import { csp, sendFileWithCSPNonce } from "./csp.js";
7
7
  import { getPaths } from "../webpack/helpers.js";
8
8
  const paths = getPaths();
9
9
  const setupDefaultMiddlewares = (app) => {
10
- const pino = pinoLogger({
10
+ const pino = expressPinoLogger({
11
11
  transport: {
12
12
  target: "pino-pretty",
13
13
  options: {
@@ -38,11 +38,8 @@ const setupAdditionalMiddlewars = (app, options = {}) => {
38
38
  orderPreference: ["br"]
39
39
  })
40
40
  );
41
- app.use(expressStaticGzip("cdn", {}));
42
- app.get(
43
- "*",
44
- (req, res) => sendFileWithCSPNonce({ buildPath, res })
45
- );
41
+ app.use(expressStaticGzip("cdn"));
42
+ app.get("*", (req, res) => sendFileWithCSPNonce({ buildPath, res }));
46
43
  return app;
47
44
  };
48
45
  export {
@@ -5,7 +5,7 @@ const port = parseInt(
5
5
  argv.port || process.env.port || process.env.PORT || "3000",
6
6
  10
7
7
  );
8
- const host = argv.host || process.env.HOST || "localhost";
8
+ const host = argv.host || process.env.HOST;
9
9
  export {
10
10
  getCWD,
11
11
  host,
@@ -45,5 +45,7 @@ const addRootElement = (id) => {
45
45
  addRootElement("root");
46
46
  addMatchMedia();
47
47
  window.ResizeObserver = ResizeObserver;
48
- window.emui = {};
49
- window.emui.logger = logger();
48
+ window.emui = {
49
+ logger: logger(),
50
+ _BASE_PATH: new URL(document.baseURI).pathname
51
+ };
@@ -3,8 +3,8 @@ import fs from "node:fs";
3
3
  import _ from "lodash";
4
4
  import CompressionPlugin from "compression-webpack-plugin";
5
5
  import zlib from "zlib";
6
- import { findMonoRepoRoot } from "../monorepo/utils.js";
7
- import { basePath, getAppConfig } from "../utils.js";
6
+ import { findMonoRepoRoot } from "../monorepo/utils.cjs";
7
+ import { basePath, getAppConfig } from "../utils.cjs";
8
8
  let pathSep = path.sep;
9
9
  if (pathSep === "\\")
10
10
  pathSep = "\\\\";
@@ -26,7 +26,7 @@ const excludeNodeModulesExcept = (modules) => {
26
26
  };
27
27
  const getLibraryName = () => {
28
28
  const packageJson = JSON.parse(
29
- fs.readFileSync(path.join(process.cwd(), "package.json")).toString()
29
+ fs.readFileSync(path.join(process.cwd(), "package.json"))
30
30
  );
31
31
  const libraryName = packageJson ? packageJson.name : process.env.LIBRARY_NAME || "mylibrary";
32
32
  const modifiedLibName = `emui-${libraryName.replace("@elliemae/", "").replace("pui-", "")}`;
@@ -1,9 +1,9 @@
1
1
  import path from "node:path";
2
2
  import webpack from "webpack";
3
- import "webpack-dev-server";
4
3
  import MiniCssExtractPlugin from "mini-css-extract-plugin";
5
4
  import PostcssPresetEnv from "postcss-preset-env";
6
5
  import CopyWebpackPlugin from "copy-webpack-plugin";
6
+ import DuplicatePackageCheckerPlugin from "duplicate-package-checker-webpack-plugin";
7
7
  import MomentLocalesPlugin from "moment-locales-webpack-plugin";
8
8
  import { WebpackManifestPlugin } from "webpack-manifest-plugin";
9
9
  import FaviconsWebpackPlugin from "favicons-webpack-plugin";
@@ -113,6 +113,7 @@ const plugins = [
113
113
  }
114
114
  ])
115
115
  }),
116
+ new DuplicatePackageCheckerPlugin(),
116
117
  new MomentLocalesPlugin({ localesToKeep: ["es-us"] }),
117
118
  new WebpackManifestPlugin({
118
119
  fileName: "./latest/manifest.json",
@@ -126,7 +127,13 @@ const plugins = [
126
127
  outputPath: "./latest/assets",
127
128
  logo: "./app/view/images/favicon.png",
128
129
  favicons: {
129
- developerName: "ICE MT"
130
+ developerName: "ICE MT",
131
+ developerURL: null,
132
+ // prevent retrieving from the nearest package.json
133
+ icons: {
134
+ coast: false,
135
+ yandex: false
136
+ }
130
137
  }
131
138
  })
132
139
  ];
@@ -232,7 +239,7 @@ const baseConfig = (options) => ({
232
239
  }
233
240
  ]
234
241
  },
235
- plugins: options.plugins ? plugins.concat(options.plugins) : plugins,
242
+ plugins: plugins.concat(options.plugins),
236
243
  resolve: {
237
244
  modules: [
238
245
  "node_modules",
@@ -5,9 +5,9 @@ import HtmlWebpackPlugin from "html-webpack-plugin";
5
5
  import CircularDependencyPlugin from "circular-dependency-plugin";
6
6
  import MiniCssExtractPlugin from "mini-css-extract-plugin";
7
7
  import ReactRefreshWebpackPlugin from "@pmmmwh/react-refresh-webpack-plugin";
8
- import expressStaticGzip from "express-static-gzip";
8
+ import SpeedMeasurePlugin from "speed-measure-webpack-plugin";
9
9
  import { setupDefaultMiddlewares } from "../server/middlewares.js";
10
- import { loadRoutes } from "../server/appRoutes.js";
10
+ import { loadRoutes } from "../server/app-routes.cjs";
11
11
  import {
12
12
  isAppLoaderEnabled,
13
13
  getPaths,
@@ -15,6 +15,7 @@ import {
15
15
  } from "./helpers.js";
16
16
  import { baseConfig } from "./webpack.base.babel.js";
17
17
  const __filename = fileURLToPath(import.meta.url);
18
+ const smp = new SpeedMeasurePlugin({ disable: !process.env.MEASURE });
18
19
  const {
19
20
  appVersion,
20
21
  buildPath,
@@ -108,25 +109,21 @@ const devConfig = {
108
109
  devMiddleware: {
109
110
  publicPath: basePath
110
111
  },
111
- historyApiFallback: true,
112
+ historyApiFallback: {
113
+ index: `${basePath}index.html`
114
+ },
112
115
  hot: true,
113
116
  open: [basePath],
114
117
  port: process.env.PORT || "auto",
115
118
  setupMiddlewares: (middlewares, devServer) => {
116
- if (devServer.app) {
117
- setupDefaultMiddlewares(devServer.app);
118
- devServer.app.use(expressStaticGzip("cdn", {}));
119
- loadRoutes(devServer.app).then(() => {
120
- }).catch((err) => {
121
- console.error(err);
122
- });
123
- }
119
+ setupDefaultMiddlewares(devServer.app);
120
+ loadRoutes(devServer.app);
124
121
  return middlewares;
125
122
  }
126
123
  }
127
124
  };
128
- const config = baseConfig(devConfig);
129
- config.plugins = config.plugins ? config.plugins.concat([new ReactRefreshWebpackPlugin({})]) : [];
125
+ const config = smp.wrap(baseConfig(devConfig));
126
+ config.plugins = config.plugins.concat([new ReactRefreshWebpackPlugin({})]);
130
127
  var webpack_dev_babel_default = config;
131
128
  export {
132
129
  webpack_dev_babel_default as default
@@ -1,9 +1,9 @@
1
1
  import path from "node:path";
2
2
  import webpack from "webpack";
3
- import "webpack-dev-server";
4
3
  import MiniCssExtractPlugin from "mini-css-extract-plugin";
5
4
  import CopyWebpackPlugin from "copy-webpack-plugin";
6
5
  import PostcssPresetEnv from "postcss-preset-env";
6
+ import DuplicatePackageCheckerPlugin from "duplicate-package-checker-webpack-plugin";
7
7
  import MomentLocalesPlugin from "moment-locales-webpack-plugin";
8
8
  import ResolveTypeScriptPlugin from "resolve-typescript-plugin";
9
9
  import browserslistToEsbuild from "browserslist-to-esbuild";
@@ -14,7 +14,7 @@ import {
14
14
  getAlias,
15
15
  filterByFilePresence
16
16
  } from "./helpers.js";
17
- import { getAppConfig } from "../utils.js";
17
+ import { getAppConfig } from "../utils.cjs";
18
18
  const minicssLoader = {
19
19
  loader: MiniCssExtractPlugin.loader,
20
20
  options: {}
@@ -37,7 +37,7 @@ const plugins = [
37
37
  CI: "false"
38
38
  }),
39
39
  new webpack.DefinePlugin({
40
- APP_CONFIG: getAppConfig()
40
+ APP_CONFIG: getAppConfig(true)
41
41
  }),
42
42
  /* eslint-disable indent */
43
43
  ...copyPluginPatterns.length > 0 ? [
@@ -46,6 +46,7 @@ const plugins = [
46
46
  })
47
47
  ] : [],
48
48
  /* eslint-enable indent */
49
+ new DuplicatePackageCheckerPlugin(),
49
50
  new webpack.optimize.LimitChunkCountPlugin({
50
51
  maxChunks: 1
51
52
  }),
@@ -163,7 +164,7 @@ const baseConfig = (options) => ({
163
164
  }
164
165
  ]
165
166
  },
166
- plugins: options.plugins ? plugins.concat(options.plugins || []) : plugins,
167
+ plugins: plugins.concat(options.plugins || []),
167
168
  resolve: {
168
169
  modules: [
169
170
  "node_modules",
@@ -1,6 +1,5 @@
1
1
  import path from "node:path";
2
2
  import webpack from "webpack";
3
- import "webpack-dev-server";
4
3
  import fg from "fast-glob";
5
4
  import CircularDependencyPlugin from "circular-dependency-plugin";
6
5
  import MiniCssExtractPlugin from "mini-css-extract-plugin";
@@ -4,6 +4,7 @@ import { GenerateSW } from "workbox-webpack-plugin";
4
4
  import MiniCssExtractPlugin from "mini-css-extract-plugin";
5
5
  import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
6
6
  import { ESBuildMinifyPlugin } from "esbuild-loader";
7
+ import SpeedMeasurePlugin from "speed-measure-webpack-plugin";
7
8
  import browserslistToEsbuild from "browserslist-to-esbuild";
8
9
  import { baseConfig } from "./webpack.base.babel.js";
9
10
  import {
@@ -53,10 +54,6 @@ const getProdConfig = ({ latestVersion = true } = {}) => {
53
54
  },
54
55
  plugins: [
55
56
  ...getCompressionPlugins(),
56
- new MiniCssExtractPlugin({
57
- filename: "latest/css/[name].[contenthash].css",
58
- chunkFilename: "latest/css/[name].[contenthash].chunk.css"
59
- }),
60
57
  new BundleAnalyzerPlugin({
61
58
  analyzerMode: "static",
62
59
  reportFilename: path.join(process.cwd(), "reports/bundle-stats.html"),
@@ -109,9 +106,20 @@ const htmlWebpackPlugin = new HtmlWebpackPlugin({
109
106
  }
110
107
  });
111
108
  const config = baseConfig(getProdConfig());
112
- if (config.plugins)
113
- config.plugins.push(htmlWebpackPlugin);
114
- var webpack_prod_babel_default = config;
109
+ config.plugins.push(htmlWebpackPlugin);
110
+ const addSMPPlugin = (webpackConfig) => {
111
+ const smpConfig = new SpeedMeasurePlugin({
112
+ disable: !process.env.MEASURE
113
+ }).wrap(webpackConfig);
114
+ smpConfig.plugins.push(
115
+ new MiniCssExtractPlugin({
116
+ filename: "latest/css/[name].[contenthash].css",
117
+ chunkFilename: "latest/css/[name].[contenthash].chunk.css"
118
+ })
119
+ );
120
+ return smpConfig;
121
+ };
122
+ var webpack_prod_babel_default = addSMPPlugin(config);
115
123
  export {
116
124
  webpack_prod_babel_default as default
117
125
  };
@@ -3,7 +3,7 @@ import MiniCssExtractPlugin from "mini-css-extract-plugin";
3
3
  import CopyWebpackPlugin from "copy-webpack-plugin";
4
4
  import ResolveTypeScriptPlugin from "resolve-typescript-plugin";
5
5
  import { getAlias, getCompressionPlugins } from "./helpers.js";
6
- import { isApp } from "../utils.js";
6
+ import { isApp } from "../utils.cjs";
7
7
  const IS_APP = isApp();
8
8
  const CWD = process.cwd();
9
9
  const getAdditionalPlugins = () => [
@@ -50,40 +50,33 @@ const getModuleRules = () => [
50
50
  type: "asset/resource"
51
51
  }
52
52
  ];
53
- const webpackFinal = (config, { configType }) => {
53
+ const webpackFinal = async (config, { configType }) => {
54
54
  const isProd = configType === "PRODUCTION";
55
- const fileLoaderRule = config?.module?.rules?.find?.(
55
+ const fileLoaderRule = config.module.rules.find(
56
56
  (rule) => rule.test?.test?.(".svg")
57
57
  );
58
- if (fileLoaderRule)
59
- fileLoaderRule.exclude = /\.svg$/i;
60
- config?.module?.rules?.unshift(...getModuleRules());
61
- config?.plugins?.push(...getAdditionalPlugins());
58
+ fileLoaderRule.exclude = /\.svg$/i;
59
+ config.module.rules.unshift(...getModuleRules());
60
+ config.plugins.push(...getAdditionalPlugins());
62
61
  if (isProd) {
63
- config.plugins = config?.plugins?.concat(getCompressionPlugins());
64
- }
65
- if (config.resolve) {
66
- config.resolve.alias = { ...config?.resolve?.alias, ...getAlias() };
67
- config.resolve.fallback = { ...config.resolve.fallback, crypto: false };
68
- config.resolve.extensions?.push(".svg");
69
- config.resolve.plugins = [
70
- ...config.resolve.plugins || [],
71
- new ResolveTypeScriptPlugin({})
72
- ];
62
+ config.plugins = config.plugins.concat(getCompressionPlugins());
73
63
  }
64
+ config.resolve.alias = { ...config.resolve.alias, ...getAlias() };
65
+ config.resolve.fallback = { ...config.resolve.fallback, crypto: false };
66
+ config.resolve.extensions.push(".svg");
67
+ config.resolve.plugins = [
68
+ ...config.resolve.plugins || [],
69
+ new ResolveTypeScriptPlugin({})
70
+ ];
74
71
  config.externals = config.externals || {};
75
- if (config.externals) {
76
- config.externals["@elliemae/pui-user-monitoring"] = "emuiUserMonitoring";
77
- config.externals["@elliemae/pui-app-loader"] = "emuiAppLoader";
78
- config.externals["@elliemae/pui-diagnostics"] = "emuiDiagnostics";
79
- }
72
+ config.externals["@elliemae/pui-user-monitoring"] = "emuiUserMonitoring";
73
+ config.externals["@elliemae/pui-app-loader"] = "emuiAppLoader";
74
+ config.externals["@elliemae/pui-diagnostics"] = "emuiDiagnostics";
80
75
  return config;
81
76
  };
82
- const managerWebpack = (config) => {
83
- if (config.plugins)
84
- config.plugins = config.plugins.concat(getCompressionPlugins());
85
- if (config.resolve)
86
- config.resolve.alias = { ...config.resolve.alias, ...getAlias() };
77
+ const managerWebpack = async (config) => {
78
+ config.plugins = config.plugins.concat(getCompressionPlugins());
79
+ config.resolve.alias = { ...config.resolve.alias, ...getAlias() };
87
80
  return config;
88
81
  };
89
82
  export {
@@ -1,14 +1,14 @@
1
- import yargs, { Argv } from 'yargs';
2
- export declare const buildCmd: {
3
- handler: ({ service }: {
1
+ export namespace buildCmd {
2
+ function handler({ service }: {
4
3
  service?: boolean | undefined;
5
- }) => Promise<void>;
6
- command: string;
7
- desc: string;
8
- builder: (yargsRef: Argv) => yargs.Argv<yargs.Omit<{}, "service"> & yargs.InferredOptionTypes<{
9
- service: {
10
- boolean: boolean;
11
- default: boolean;
12
- };
13
- }>>;
14
- };
4
+ }): Promise<void>;
5
+ const command: string;
6
+ const describe: string;
7
+ namespace builder {
8
+ namespace service {
9
+ export const type: string;
10
+ const _default: boolean;
11
+ export { _default as default };
12
+ }
13
+ }
14
+ }
@@ -1,13 +1,6 @@
1
- import yargs, { Argv } from 'yargs';
2
- type Arguments = {
3
- transform: string;
4
- };
5
- export declare const codemodCmd: {
6
- handler: (argv: Arguments) => Promise<void>;
7
- command: string;
8
- desc: string;
9
- builder: (yargsRef: Argv) => yargs.Argv<{
10
- transform: string;
11
- }>;
12
- };
13
- export {};
1
+ export namespace codemodCmd {
2
+ function handler(argv: any): Promise<void>;
3
+ const command: string;
4
+ const describe: string;
5
+ function builder(yargsRef: any): void;
6
+ }
@@ -1,7 +1,6 @@
1
- import yargs, { Argv } from 'yargs';
2
- export declare const gendocCmd: {
3
- handler: () => Promise<void>;
4
- command: string;
5
- desc: string;
6
- builder: (yargsRef: Argv) => yargs.Argv<yargs.Omit<{}, never> & yargs.InferredOptionTypes<{}>>;
7
- };
1
+ export namespace gendocCmd {
2
+ function handler(): Promise<void>;
3
+ const command: string;
4
+ const describe: string;
5
+ const builder: {};
6
+ }
@@ -1,29 +1,29 @@
1
- import yargs, { Argv } from 'yargs';
2
- type Arguments = {
3
- css: boolean;
4
- js: boolean;
5
- fix: boolean;
6
- };
7
- export declare const lintCmd: {
8
- handler: (argv: Arguments) => Promise<void>;
9
- command: string;
10
- desc: string;
11
- builder: (yargsRef: Argv) => yargs.Argv<yargs.Omit<{}, "css" | "js" | "fix"> & yargs.InferredOptionTypes<{
12
- css: {
13
- boolean: boolean;
14
- alias: string;
15
- default: boolean;
16
- };
17
- js: {
18
- boolean: boolean;
19
- alias: string;
20
- default: boolean;
21
- };
22
- fix: {
23
- boolean: boolean;
24
- alias: string;
25
- default: boolean;
26
- };
27
- }>>;
28
- };
29
- export {};
1
+ export namespace lintCmd {
2
+ function handler(argv: any): Promise<0 | -1>;
3
+ const command: string;
4
+ const describe: string;
5
+ namespace builder {
6
+ namespace css {
7
+ export const alias: string;
8
+ export const type: string;
9
+ const _default: boolean;
10
+ export { _default as default };
11
+ }
12
+ namespace js {
13
+ const alias_1: string;
14
+ export { alias_1 as alias };
15
+ const type_1: string;
16
+ export { type_1 as type };
17
+ const _default_1: boolean;
18
+ export { _default_1 as default };
19
+ }
20
+ namespace fix {
21
+ const alias_2: string;
22
+ export { alias_2 as alias };
23
+ const type_2: string;
24
+ export { type_2 as type };
25
+ const _default_2: boolean;
26
+ export { _default_2 as default };
27
+ }
28
+ }
29
+ }
@@ -1,29 +1,26 @@
1
- import yargs, { Argv } from 'yargs';
2
- type Arguments = {
3
- production: boolean;
4
- target: string;
5
- srcPath: string;
6
- };
7
- export declare const packCmd: {
8
- handler: (argv: Arguments) => Promise<void>;
9
- command: string;
10
- desc: string;
11
- builder: (yargsRef: Argv) => yargs.Argv<yargs.Omit<{}, "target" | "production" | "srcPath"> & yargs.InferredOptionTypes<{
12
- production: {
13
- boolean: boolean;
14
- alias: string;
15
- default: boolean;
16
- };
17
- target: {
18
- string: boolean;
19
- alias: string;
20
- default: string;
21
- description: string;
22
- };
23
- srcPath: {
24
- string: boolean;
25
- default: string;
26
- };
27
- }>>;
28
- };
29
- export {};
1
+ export namespace packCmd {
2
+ function handler(argv: any): Promise<void>;
3
+ const command: string;
4
+ const describe: string;
5
+ namespace builder {
6
+ namespace production {
7
+ export const alias: string;
8
+ export const type: string;
9
+ const _default: boolean;
10
+ export { _default as default };
11
+ }
12
+ namespace target {
13
+ const alias_1: string;
14
+ export { alias_1 as alias };
15
+ const type_1: string;
16
+ export { type_1 as type };
17
+ export const description: string;
18
+ }
19
+ namespace srcPath {
20
+ const type_2: string;
21
+ export { type_2 as type };
22
+ const _default_1: string;
23
+ export { _default_1 as default };
24
+ }
25
+ }
26
+ }
@@ -1,17 +1,13 @@
1
- import yargs, { Argv } from 'yargs';
2
- type Arguments = {
3
- prod: boolean;
4
- };
5
- export declare const startCmd: {
6
- handler: (argv: Arguments) => Promise<void>;
7
- command: string;
8
- desc: string;
9
- builder: (yargsRef: Argv) => yargs.Argv<yargs.Omit<{}, "prod"> & yargs.InferredOptionTypes<{
10
- prod: {
11
- boolean: boolean;
12
- alias: string;
13
- default: boolean;
14
- };
15
- }>>;
16
- };
17
- export {};
1
+ export namespace startCmd {
2
+ function handler(argv: any): Promise<void>;
3
+ const command: string;
4
+ const describe: string;
5
+ namespace builder {
6
+ namespace prod {
7
+ export const alias: string;
8
+ const _default: boolean;
9
+ export { _default as default };
10
+ export const type: string;
11
+ }
12
+ }
13
+ }
@@ -1,28 +1,27 @@
1
- import yargs, { Argv } from 'yargs';
2
- type Arguments = {
3
- build: boolean;
4
- docs: boolean;
5
- output: string;
6
- };
7
- export declare const storybookCmd: {
8
- handler: (argv: Arguments) => Promise<void>;
9
- command: string;
10
- desc: string;
11
- builder: (yargsRef: Argv) => yargs.Argv<yargs.Omit<{}, "build" | "docs" | "output"> & yargs.InferredOptionTypes<{
12
- build: {
13
- boolean: boolean;
14
- alias: string;
15
- default: boolean;
16
- };
17
- docs: {
18
- boolean: boolean;
19
- default: boolean;
20
- };
21
- output: {
22
- string: boolean;
23
- alias: string;
24
- default: string;
25
- };
26
- }>>;
27
- };
28
- export {};
1
+ export namespace storybookCmd {
2
+ function handler(argv: any): Promise<void>;
3
+ const command: string;
4
+ const describe: string;
5
+ namespace builder {
6
+ namespace build {
7
+ export const alias: string;
8
+ export const type: string;
9
+ const _default: boolean;
10
+ export { _default as default };
11
+ }
12
+ namespace docs {
13
+ const type_1: string;
14
+ export { type_1 as type };
15
+ const _default_1: boolean;
16
+ export { _default_1 as default };
17
+ }
18
+ namespace output {
19
+ const alias_1: string;
20
+ export { alias_1 as alias };
21
+ const type_2: string;
22
+ export { type_2 as type };
23
+ const _default_2: string;
24
+ export { _default_2 as default };
25
+ }
26
+ }
27
+ }