arui-scripts 19.0.8 → 20.0.0

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 (99) hide show
  1. package/.turbo/turbo-test.log +7 -7
  2. package/CHANGELOG.md +23 -0
  3. package/README.md +1 -1
  4. package/build/bin/index.js +0 -5
  5. package/build/commands/archive-build/index.js +18 -18
  6. package/build/commands/build/build-wrapper.js +3 -5
  7. package/build/commands/build/client.js +5 -7
  8. package/build/commands/build/index.js +1 -3
  9. package/build/commands/build/server.js +2 -4
  10. package/build/commands/bundle-analyze/index.js +7 -9
  11. package/build/commands/changelog/index.js +27 -9
  12. package/build/commands/docker-build/index.js +18 -18
  13. package/build/commands/docker-build-compiled/index.js +14 -14
  14. package/build/commands/ensure-yarn/index.js +0 -1
  15. package/build/commands/start/client.js +2 -5
  16. package/build/commands/start/index.js +1 -3
  17. package/build/commands/start/print-compiler-output.d.ts +2 -1
  18. package/build/commands/start/print-compiler-output.js +3 -3
  19. package/build/commands/start/server.js +2 -5
  20. package/build/commands/start-prod/client.js +2 -5
  21. package/build/commands/start-prod/index.js +1 -3
  22. package/build/commands/start-prod/server.js +2 -5
  23. package/build/commands/test/index.js +0 -2
  24. package/build/commands/util/client-assets-sizes.js +0 -1
  25. package/build/commands/util/docker-build.js +14 -14
  26. package/build/commands/util/exec.d.ts +1 -2
  27. package/build/commands/util/exec.js +2 -4
  28. package/build/commands/util/format-webpack-messages.d.ts +4 -10
  29. package/build/commands/util/format-webpack-messages.js +21 -22
  30. package/build/commands/util/make-tmp-dir.d.ts +1 -2
  31. package/build/commands/util/make-tmp-dir.js +1 -1
  32. package/build/commands/util/run-client-dev-server.js +7 -9
  33. package/build/commands/util/run-server-watch-compiler.js +4 -7
  34. package/build/configs/app-configs/index.d.ts +0 -1
  35. package/build/configs/app-configs/index.js +0 -1
  36. package/build/configs/app-configs/types.d.ts +2 -2
  37. package/build/configs/app-configs/warn-about-deprecations.js +5 -3
  38. package/build/configs/babel-client.d.ts +1 -2
  39. package/build/configs/babel-client.js +5 -8
  40. package/build/configs/babel-dependencies.js +4 -7
  41. package/build/configs/babel-server.d.ts +1 -2
  42. package/build/configs/babel-server.js +7 -10
  43. package/build/configs/dev-server.d.ts +1 -2
  44. package/build/configs/dev-server.js +7 -6
  45. package/build/configs/jest/babel-transform.js +1 -1
  46. package/build/configs/jest/settings.js +1 -1
  47. package/build/configs/modules.js +5 -3
  48. package/build/configs/postcss.config.d.ts +2 -2
  49. package/build/configs/postcss.config.js +9 -11
  50. package/build/configs/postcss.d.ts +1 -2
  51. package/build/configs/postcss.js +3 -8
  52. package/build/configs/process-assets-plugin-output.js +8 -8
  53. package/build/configs/server-externals-exemptions.js +2 -6
  54. package/build/configs/stats-options.d.ts +1 -2
  55. package/build/configs/stats-options.js +3 -6
  56. package/build/configs/supporting-browsers.d.ts +1 -2
  57. package/build/configs/supporting-browsers.js +3 -6
  58. package/build/configs/swc.js +5 -10
  59. package/build/configs/util/apply-overrides.d.ts +2 -2
  60. package/build/configs/util/apply-overrides.js +5 -9
  61. package/build/configs/util/check-node-version.d.ts +1 -2
  62. package/build/configs/util/check-node-version.js +1 -1
  63. package/build/configs/util/find-loader.js +3 -3
  64. package/build/configs/util/get-entry.d.ts +1 -2
  65. package/build/configs/util/get-entry.js +1 -1
  66. package/build/configs/util/get-polyfills.d.ts +1 -1
  67. package/build/configs/util/get-polyfills.js +1 -14
  68. package/build/configs/util/get-webpack-cache-dependencies.js +4 -7
  69. package/build/configs/util/install-sourcemap-support.js +0 -1
  70. package/build/configs/util/register-ts-node.js +0 -1
  71. package/build/configs/webpack.client.dev.d.ts +1 -2
  72. package/build/configs/webpack.client.dev.js +3 -6
  73. package/build/configs/webpack.client.js +23 -71
  74. package/build/configs/webpack.client.prod.d.ts +1 -2
  75. package/build/configs/webpack.client.prod.js +3 -6
  76. package/build/configs/webpack.server.dev.d.ts +1 -2
  77. package/build/configs/webpack.server.dev.js +3 -6
  78. package/build/configs/webpack.server.js +35 -39
  79. package/build/configs/webpack.server.prod.d.ts +1 -2
  80. package/build/configs/webpack.server.prod.js +3 -6
  81. package/build/plugins/arui-runtime/index.js +2 -2
  82. package/build/plugins/postcss-global-variables/utils/utils.js +4 -4
  83. package/build/plugins/postcss-prefix-selector.js +5 -2
  84. package/build/templates/base-nginx.conf.template.d.ts +1 -2
  85. package/build/templates/base-nginx.conf.template.js +3 -5
  86. package/build/templates/dockerfile-compiled.template.d.ts +1 -2
  87. package/build/templates/dockerfile-compiled.template.js +7 -9
  88. package/build/templates/dockerfile.template.d.ts +1 -2
  89. package/build/templates/dockerfile.template.js +10 -8
  90. package/build/templates/html.template.js +2 -5
  91. package/build/templates/nginx.conf.template.d.ts +1 -2
  92. package/build/templates/nginx.conf.template.js +3 -5
  93. package/build/templates/start.template.d.ts +1 -2
  94. package/build/templates/start.template.js +3 -5
  95. package/build/tsconfig-local.tsbuildinfo +1 -1
  96. package/docs/modules.md +1 -2
  97. package/docs/settings.md +1 -1
  98. package/package.json +2 -2
  99. package/tsconfig.json +2 -1
@@ -5,19 +5,19 @@ ts-jest[versions] (WARN) Version 29.7.0 of jest installed has not been tested wi
5
5
  ts-jest[versions] (WARN) Version 5.6.3 of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=4.3.0 <5.0.0-0). Please do not report issues in ts-jest if you are using unsupported versions.
6
6
  ts-jest[versions] (WARN) Version 5.6.3 of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=4.3.0 <5.0.0-0). Please do not report issues in ts-jest if you are using unsupported versions.
7
7
  ts-jest[versions] (WARN) Version 5.6.3 of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=4.3.0 <5.0.0-0). Please do not report issues in ts-jest if you are using unsupported versions.
8
- PASS src/plugins/postcss-global-variables/utils/__tests__/add-global-variable.tests.ts (26.822 s)
9
- PASS src/configs/util/__tests__/get-polyfills.tests.ts
10
- PASS src/configs/app-configs/__tests__/update-with-presets.tests.ts (27.105 s)
8
+ PASS src/plugins/postcss-global-variables/utils/__tests__/add-global-variable.tests.ts (26.801 s)
9
+ PASS src/configs/app-configs/__tests__/update-with-presets.tests.ts (26.854 s)
11
10
  PASS src/configs/util/__tests__/apply-overrides.tests.ts
12
11
  PASS src/configs/app-configs/__tests__/update-with-package.tests.ts
13
12
  PASS src/configs/app-configs/__tests__/update-with-env.tests.ts
13
+ PASS src/configs/util/__tests__/get-polyfills.tests.ts
14
14
  PASS src/plugins/postcss-global-variables/utils/__tests__/parse-variables.tests.ts
15
- PASS src/configs/app-configs/__tests__/validate-settings-keys.tests.ts
16
15
  PASS src/plugins/postcss-global-variables/utils/__tests__/get-media-query-name.tests.ts
17
- PASS src/configs/util/__tests__/find-plugin.tests.ts (28.885 s)
16
+ PASS src/configs/app-configs/__tests__/validate-settings-keys.tests.ts
17
+ PASS src/configs/util/__tests__/find-plugin.tests.ts (29.103 s)
18
18
 
19
19
  Test Suites: 10 passed, 10 total
20
- Tests: 26 passed, 26 total
20
+ Tests: 24 passed, 24 total
21
21
  Snapshots: 0 total
22
- Time: 30.041 s
22
+ Time: 30.177 s
23
23
  Ran all test suites.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # [15.3.0](https://github.com/core-ds/arui-scripts/compare/v15.2.0...v15.3.0) (2023-06-30)
2
2
 
3
+ ## 20.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#335](https://github.com/core-ds/arui-scripts/pull/335) [`2562b34`](https://github.com/core-ds/arui-scripts/commit/2562b34f0670d174a572215df610ddfd0d64be41) Thanks [@dmitrbrvsk](https://github.com/dmitrbrvsk)! - 1. Удалено подключение полифилов из arui-feather. 2. arui-feather удален из списка `serverExternalsExemptions`.
8
+
9
+ Если вы по какой-то причине хотите вернуть это поведение:
10
+
11
+ 1. Вы можете использовать настройку `clientPolyfillsEntry`, передав туда путь до файла с полифилами (`./node_modules/arui-feather/polyfills.js`)
12
+ 2. Вы можете использовать оверрайд для `serverExternalsExemptions` и добавить туда regex для feather: `/^arui-feather/`.
13
+
14
+ - [#346](https://github.com/core-ds/arui-scripts/pull/346) [`bf3072e`](https://github.com/core-ds/arui-scripts/commit/bf3072e164d19179c05523900036a9841497cdcb) Thanks [@heymdall-legal](https://github.com/heymdall-legal)! - Изменены настройки минификации js кода. Минифицированный код больше НЕ поддерживает старые версии браузеров (safari 10, ie, chrome < 49).
15
+
16
+ Для большинства проектов это изменение не принесёт никаких проблем, но позволит сократить объем минифицированного кода на 5%.
17
+
18
+ Если вам по каким либо причинам нужно изменить это поведение - вы можете воспользоваться механизмом оверрайдов.
19
+
20
+ ## 19.1.0
21
+
22
+ ### Minor Changes
23
+
24
+ - [#344](https://github.com/core-ds/arui-scripts/pull/344) [`1ed4a51`](https://github.com/core-ds/arui-scripts/commit/1ed4a511a6bdb7bd654a31c236600ec2c369ff6a) Thanks [@heymdall-legal](https://github.com/heymdall-legal)! - Многие внутренние экспорты были исправлены с дефолтных на именованные. Если вы использовали внутренние файлы arui-scripts - вам может потребоваться обновить свой код
25
+
3
26
  ## 19.0.8
4
27
 
5
28
  ### Patch Changes
package/README.md CHANGED
@@ -10,7 +10,7 @@ ARUI-scripts
10
10
 
11
11
  Зависимость | Версия
12
12
  -- | --
13
- `nodejs` | `16.20.2, 18.0.0+, 20.0.0+, 22.0.0+`
13
+ `nodejs` | `20.0.0+, 22.0.0+, 24.0.0+`
14
14
  `react` | `16.13.0+`
15
15
  `react-dom` | `16.13.0+`
16
16
 
@@ -1,10 +1,7 @@
1
1
  #! /usr/bin/env node
2
2
  "use strict";
3
- // TODO: remove eslint-disable and eslint-disable-next-line
4
3
  /* eslint-disable global-require */
5
4
  /* eslint import/no-dynamic-require: 0 */
6
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
7
- // @ts-ignore
8
5
  const commands = {
9
6
  start: () => require('../commands/start'),
10
7
  'start:prod': () => require('../commands/start-prod'),
@@ -17,8 +14,6 @@ const commands = {
17
14
  'bundle-analyze': () => require('../commands/bundle-analyze'),
18
15
  changelog: () => require('../commands/changelog'),
19
16
  };
20
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
21
- // @ts-ignore
22
17
  const command = process.argv[2];
23
18
  if (!command || !commands[command]) {
24
19
  console.error(`Please specify one of available commands: ${Object.keys(commands)
@@ -15,52 +15,52 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const path_1 = __importDefault(require("path"));
16
16
  const fs_extra_1 = __importDefault(require("fs-extra"));
17
17
  const tar_1 = __importDefault(require("tar"));
18
- const app_configs_1 = __importDefault(require("../../configs/app-configs"));
19
- const nginx_conf_template_1 = __importDefault(require("../../templates/nginx.conf.template"));
20
- const start_template_1 = __importDefault(require("../../templates/start.template"));
21
- const exec_1 = __importDefault(require("../util/exec"));
18
+ const app_configs_1 = require("../../configs/app-configs");
19
+ const nginx_conf_template_1 = require("../../templates/nginx.conf.template");
20
+ const start_template_1 = require("../../templates/start.template");
21
+ const exec_1 = require("../util/exec");
22
22
  const yarn_1 = require("../util/yarn");
23
23
  const tempDirName = '.archive-build';
24
24
  const nginxConfFileName = 'nginx.conf';
25
25
  const startScriptFileName = 'start.sh';
26
26
  const nodeModulesDirName = 'node_modules';
27
27
  const packageJsonFileName = 'package.json';
28
- const pathToTempDir = path_1.default.join(app_configs_1.default.cwd, tempDirName);
28
+ const pathToTempDir = path_1.default.join(app_configs_1.configs.cwd, tempDirName);
29
29
  const nginxConfPath = path_1.default.join(pathToTempDir, nginxConfFileName);
30
30
  const startScriptPath = path_1.default.join(pathToTempDir, startScriptFileName);
31
- const nodeModulesPath = path_1.default.join(app_configs_1.default.cwd, nodeModulesDirName);
32
- const packageJsonPath = path_1.default.join(app_configs_1.default.cwd, packageJsonFileName);
31
+ const nodeModulesPath = path_1.default.join(app_configs_1.configs.cwd, nodeModulesDirName);
32
+ const packageJsonPath = path_1.default.join(app_configs_1.configs.cwd, packageJsonFileName);
33
33
  (() => __awaiter(void 0, void 0, void 0, function* () {
34
34
  try {
35
35
  console.time('Total time');
36
36
  console.time('Setting up time');
37
37
  yield fs_extra_1.default.emptyDir(pathToTempDir);
38
- const nginxConf = app_configs_1.default.localNginxConf
39
- ? yield fs_extra_1.default.readFile(app_configs_1.default.localNginxConf, 'utf8')
40
- : nginx_conf_template_1.default;
38
+ const nginxConf = app_configs_1.configs.localNginxConf
39
+ ? yield fs_extra_1.default.readFile(app_configs_1.configs.localNginxConf, 'utf8')
40
+ : nginx_conf_template_1.nginxConfTemplate;
41
41
  yield Promise.all([
42
42
  fs_extra_1.default.writeFile(nginxConfPath, nginxConf, 'utf8'),
43
- fs_extra_1.default.writeFile(startScriptPath, start_template_1.default, { encoding: 'utf8', mode: 0o555 }),
44
- fs_extra_1.default.remove(app_configs_1.default.buildPath),
43
+ fs_extra_1.default.writeFile(startScriptPath, start_template_1.startScript, { encoding: 'utf8', mode: 0o555 }),
44
+ fs_extra_1.default.remove(app_configs_1.configs.buildPath),
45
45
  ]);
46
46
  console.timeEnd('Setting up time');
47
47
  console.time('Build application time');
48
48
  // run build script
49
- yield (0, exec_1.default)('npm run build');
49
+ yield (0, exec_1.exec)('npm run build');
50
50
  console.timeEnd('Build application time');
51
51
  console.time('Remove build dependencies time');
52
52
  const pruneCommand = (0, yarn_1.getPruningCommand)();
53
- yield (0, exec_1.default)(pruneCommand);
53
+ yield (0, exec_1.exec)(pruneCommand);
54
54
  console.timeEnd('Remove build dependencies time');
55
55
  console.time('Archive build time');
56
56
  yield Promise.all([
57
- fs_extra_1.default.copy(app_configs_1.default.buildPath, path_1.default.join(pathToTempDir, app_configs_1.default.buildPath)),
57
+ fs_extra_1.default.copy(app_configs_1.configs.buildPath, path_1.default.join(pathToTempDir, app_configs_1.configs.buildPath)),
58
58
  fs_extra_1.default.copy(nodeModulesPath, path_1.default.join(pathToTempDir, nodeModulesDirName)),
59
59
  fs_extra_1.default.copy(packageJsonPath, path_1.default.join(pathToTempDir, packageJsonFileName)),
60
- ...app_configs_1.default.additionalBuildPath.map((additionalPath) => fs_extra_1.default.copy(path_1.default.join(app_configs_1.default.cwd, additionalPath), path_1.default.join(pathToTempDir, additionalPath))),
60
+ ...app_configs_1.configs.additionalBuildPath.map((additionalPath) => fs_extra_1.default.copy(path_1.default.join(app_configs_1.configs.cwd, additionalPath), path_1.default.join(pathToTempDir, additionalPath))),
61
61
  ]);
62
62
  yield tar_1.default.c({
63
- file: app_configs_1.default.archiveName,
63
+ file: app_configs_1.configs.archiveName,
64
64
  cwd: pathToTempDir,
65
65
  }, fs_extra_1.default.readdirSync(pathToTempDir));
66
66
  console.timeEnd('Archive build time');
@@ -72,7 +72,7 @@ const packageJsonPath = path_1.default.join(app_configs_1.default.cwd, packageJs
72
72
  }
73
73
  catch (err) {
74
74
  console.error('Error during archive-build.');
75
- if (app_configs_1.default.debug) {
75
+ if (app_configs_1.configs.debug) {
76
76
  console.error(err);
77
77
  }
78
78
  process.exit(1);
@@ -1,13 +1,11 @@
1
1
  "use strict";
2
- /* eslint import/no-extraneous-dependencies: 0 */
3
- /* eslint no-console: 0 */
4
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
5
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
6
4
  };
7
5
  Object.defineProperty(exports, "__esModule", { value: true });
8
6
  const chalk_1 = __importDefault(require("chalk"));
9
7
  const core_1 = require("@rspack/core");
10
- const format_webpack_messages_1 = __importDefault(require("../util/format-webpack-messages"));
8
+ const format_webpack_messages_1 = require("../util/format-webpack-messages");
11
9
  function build(config, previousFileSizes) {
12
10
  let compiler = (0, core_1.rspack)(config);
13
11
  return new Promise((resolve, reject) => {
@@ -15,7 +13,7 @@ function build(config, previousFileSizes) {
15
13
  if (err) {
16
14
  return reject(err);
17
15
  }
18
- const messages = (0, format_webpack_messages_1.default)(stats === null || stats === void 0 ? void 0 : stats.toJson({}));
16
+ const messages = (0, format_webpack_messages_1.formatWebpackMessages)(stats === null || stats === void 0 ? void 0 : stats.toJson({}));
19
17
  if (messages.errors.length) {
20
18
  // Only keep the first error. Others are often indicative
21
19
  // of the same problem, but confuse the reader with noise.
@@ -32,7 +30,7 @@ function build(config, previousFileSizes) {
32
30
  return reject(new Error(messages.warnings.join('\n\n')));
33
31
  }
34
32
  return resolve({
35
- stats,
33
+ stats: stats,
36
34
  warnings: messages.warnings,
37
35
  previousFileSizes,
38
36
  });
@@ -3,15 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- /* eslint import/no-extraneous-dependencies: 0 */
7
- /* eslint no-console: 0 */
8
6
  const chalk_1 = __importDefault(require("chalk"));
9
7
  const printBuildError_1 = __importDefault(require("react-dev-utils/printBuildError"));
10
8
  const build_wrapper_1 = __importDefault(require("./build-wrapper"));
11
9
  const client_assets_sizes_1 = require("../util/client-assets-sizes");
12
- const webpack_client_prod_1 = __importDefault(require("../../configs/webpack.client.prod"));
10
+ const webpack_client_prod_1 = require("../../configs/webpack.client.prod");
13
11
  console.log(chalk_1.default.magenta('Building client...'));
14
- (0, build_wrapper_1.default)(webpack_client_prod_1.default)
12
+ (0, build_wrapper_1.default)(webpack_client_prod_1.webpackClientConfig)
15
13
  .then(({ stats, warnings }) => {
16
14
  if (warnings.length) {
17
15
  console.log(chalk_1.default.yellow('Client compiled with warnings.\n'));
@@ -27,11 +25,11 @@ console.log(chalk_1.default.magenta('Building client...'));
27
25
  const sizes = (0, client_assets_sizes_1.calculateAssetsSizes)(stats, (_a = webpackConfig === null || webpackConfig === void 0 ? void 0 : webpackConfig.output) === null || _a === void 0 ? void 0 : _a.path);
28
26
  (0, client_assets_sizes_1.printAssetsSizes)(sizes);
29
27
  }
30
- if (Array.isArray(webpack_client_prod_1.default)) {
31
- webpack_client_prod_1.default.forEach((conf, index) => printOutputSizes(conf, stats.stats[index]));
28
+ if (Array.isArray(webpack_client_prod_1.webpackClientConfig)) {
29
+ webpack_client_prod_1.webpackClientConfig.forEach((conf, index) => printOutputSizes(conf, stats.stats[index]));
32
30
  }
33
31
  else {
34
- printOutputSizes(webpack_client_prod_1.default, stats);
32
+ printOutputSizes(webpack_client_prod_1.webpackClientConfig, stats);
35
33
  }
36
34
  })
37
35
  .catch((err) => {
@@ -6,9 +6,7 @@ process.env.BABEL_ENV = 'production';
6
6
  process.env.NODE_ENV = 'production';
7
7
  process.env.BROWSERSLIST_CONFIG =
8
8
  process.env.BROWSERSLIST_CONFIG || require.resolve('../../../.browserslistrc');
9
- const compilersCommands = [
10
- require.resolve('./client'),
11
- ];
9
+ const compilersCommands = [require.resolve('./client')];
12
10
  if (!app_configs_1.configs.clientOnly) {
13
11
  compilersCommands.push(require.resolve('./server'));
14
12
  }
@@ -3,14 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- /* eslint import/no-extraneous-dependencies: 0 */
7
- /* eslint no-console: 0 */
8
6
  const chalk_1 = __importDefault(require("chalk"));
9
7
  const printBuildError_1 = __importDefault(require("react-dev-utils/printBuildError"));
10
8
  const build_wrapper_1 = __importDefault(require("./build-wrapper"));
11
- const webpack_server_prod_1 = __importDefault(require("../../configs/webpack.server.prod"));
9
+ const webpack_server_prod_1 = require("../../configs/webpack.server.prod");
12
10
  console.log(chalk_1.default.magenta('Building server...'));
13
- (0, build_wrapper_1.default)(webpack_server_prod_1.default)
11
+ (0, build_wrapper_1.default)(webpack_server_prod_1.webpackServerConfig)
14
12
  .then(({ warnings }) => {
15
13
  if (warnings.length) {
16
14
  console.log(chalk_1.default.yellow('Server compiled with warnings.\n'));
@@ -8,22 +8,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
11
  Object.defineProperty(exports, "__esModule", { value: true });
15
- // TODO: remove eslint-disable
16
- /* eslint-disable no-param-reassign */
17
12
  const rspack_plugin_1 = require("@rsdoctor/rspack-plugin");
18
13
  const core_1 = require("@rspack/core");
19
14
  const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer");
20
15
  const app_configs_1 = require("../../configs/app-configs");
21
- const webpack_client_prod_1 = __importDefault(require("../../configs/webpack.client.prod"));
22
- const make_tmp_dir_1 = __importDefault(require("../util/make-tmp-dir"));
16
+ const webpack_client_prod_1 = require("../../configs/webpack.client.prod");
17
+ const make_tmp_dir_1 = require("../util/make-tmp-dir");
23
18
  (() => __awaiter(void 0, void 0, void 0, function* () {
24
- const clientWebpackConfigs = Array.isArray(webpack_client_prod_1.default) ? webpack_client_prod_1.default : [webpack_client_prod_1.default];
19
+ const clientWebpackConfigs = Array.isArray(webpack_client_prod_1.webpackClientConfig)
20
+ ? webpack_client_prod_1.webpackClientConfig
21
+ : [webpack_client_prod_1.webpackClientConfig];
22
+ /* eslint-disable no-param-reassign */
25
23
  const promises = clientWebpackConfigs.map((webpackConfig, i) => __awaiter(void 0, void 0, void 0, function* () {
26
- const tmpDir = yield (0, make_tmp_dir_1.default)(i.toString());
24
+ const tmpDir = yield (0, make_tmp_dir_1.makeTmpDir)(i.toString());
27
25
  webpackConfig.plugins = [
28
26
  ...(webpackConfig.plugins || []),
29
27
  new webpack_bundle_analyzer_1.BundleAnalyzerPlugin({
@@ -1,9 +1,31 @@
1
1
  "use strict";
2
- // TODO: remove eslint-disable-next-line
3
2
  /**
4
3
  * Формирует описание версии в `CHANGELOG.md` на основе данных введенных в Jenkins при старте пайплайна.
5
4
  * `standard-version` запускает этот скрипт как `postchangelog` хук.
6
5
  */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || function (mod) {
23
+ if (mod && mod.__esModule) return mod;
24
+ var result = {};
25
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
+ __setModuleDefault(result, mod);
27
+ return result;
28
+ };
7
29
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
8
30
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9
31
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -20,26 +42,23 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
20
42
  function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
21
43
  function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
22
44
  };
23
- var __importDefault = (this && this.__importDefault) || function (mod) {
24
- return (mod && mod.__esModule) ? mod : { "default": mod };
25
- };
26
45
  Object.defineProperty(exports, "__esModule", { value: true });
27
46
  const child_process_1 = require("child_process");
28
47
  const fs_1 = require("fs");
29
- const readline_1 = __importDefault(require("readline"));
30
- const app_configs_1 = __importDefault(require("../../configs/app-configs"));
48
+ const readline = __importStar(require("readline"));
49
+ const app_configs_1 = require("../../configs/app-configs");
31
50
  const { readFile, rename, unlink } = fs_1.promises;
32
51
  /**
33
52
  * Сюда пайплайн Jenkins складывает соответствующие части описания версии. Не получается использовать
34
53
  * переменные окружения, т.к. `standard-version` запускает хуки через `child_process.exec`, не передавая туда
35
54
  * ни аргументы ни переменные окружения.
36
55
  */
37
- const { appNodeModulesBin, changelogPath, changelogTmpPath, changelogFeaturesPath, changelogBugfixesPath, changelogBreakingChangesPath, } = app_configs_1.default;
56
+ const { appNodeModulesBin, changelogPath, changelogTmpPath, changelogFeaturesPath, changelogBugfixesPath, changelogBreakingChangesPath, } = app_configs_1.configs;
38
57
  // Пример заголовка – `## [50.1.0](http://git.moscow.alfaintra.net/...) (2022-07-27)`.
39
58
  const changelogHeaderRegExp = /^###? \[\d+\.\d+\.\d+]\([^)]+\) \(\d{4}-\d{2}-\d{2}\)/;
40
59
  (() => __awaiter(void 0, void 0, void 0, function* () {
41
60
  var _a, e_1, _b, _c;
42
- const rl = readline_1.default.createInterface({
61
+ const rl = readline.createInterface({
43
62
  input: (0, fs_1.createReadStream)(changelogPath),
44
63
  });
45
64
  const ws = (0, fs_1.createWriteStream)(changelogTmpPath);
@@ -53,7 +72,6 @@ const changelogHeaderRegExp = /^###? \[\d+\.\d+\.\d+]\([^)]+\) \(\d{4}-\d{2}-\d{
53
72
  ws.write(getVersionDescription({ features, bugFixes, breakingChanges }));
54
73
  });
55
74
  try {
56
- // eslint-disable-next-line no-restricted-syntax
57
75
  for (var _d = true, rl_1 = __asyncValues(rl), rl_1_1; rl_1_1 = yield rl_1.next(), _a = rl_1_1.done, !_a; _d = true) {
58
76
  _c = rl_1_1.value;
59
77
  _d = false;
@@ -13,13 +13,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const fs_extra_1 = __importDefault(require("fs-extra"));
16
- const app_configs_1 = __importDefault(require("../../configs/app-configs"));
17
- const base_nginx_conf_template_1 = __importDefault(require("../../templates/base-nginx.conf.template"));
18
- const dockerfile_template_1 = __importDefault(require("../../templates/dockerfile.template"));
19
- const nginx_conf_template_1 = __importDefault(require("../../templates/nginx.conf.template"));
20
- const start_template_1 = __importDefault(require("../../templates/start.template"));
16
+ const app_configs_1 = require("../../configs/app-configs");
17
+ const base_nginx_conf_template_1 = require("../../templates/base-nginx.conf.template");
18
+ const dockerfile_template_1 = require("../../templates/dockerfile.template");
19
+ const nginx_conf_template_1 = require("../../templates/nginx.conf.template");
20
+ const start_template_1 = require("../../templates/start.template");
21
21
  const docker_build_1 = require("../util/docker-build");
22
- const exec_1 = __importDefault(require("../util/exec"));
22
+ const exec_1 = require("../util/exec");
23
23
  const yarn_1 = require("../util/yarn");
24
24
  (() => __awaiter(void 0, void 0, void 0, function* () {
25
25
  const { imageFullName, pathToTempDir, tempDirName } = (0, docker_build_1.getBuildParamsFromArgs)();
@@ -29,35 +29,35 @@ const yarn_1 = require("../util/yarn");
29
29
  console.time('Setting up time');
30
30
  yield (0, docker_build_1.prepareFilesForDocker)({
31
31
  pathToTempDir,
32
- dockerfileTemplate: dockerfile_template_1.default,
33
- nginxConfTemplate: nginx_conf_template_1.default,
34
- nginxBaseConfTemplate: base_nginx_conf_template_1.default,
35
- startScriptTemplate: start_template_1.default,
32
+ dockerfileTemplate: dockerfile_template_1.dockerfileTemplate,
33
+ nginxConfTemplate: nginx_conf_template_1.nginxConfTemplate,
34
+ nginxBaseConfTemplate: base_nginx_conf_template_1.nginxBaseConfTemplate,
35
+ startScriptTemplate: start_template_1.startScript,
36
36
  allowLocalDockerfile: true,
37
37
  allowLocalStartScript: true,
38
38
  addNodeModulesToDockerIgnore: false,
39
39
  });
40
- yield fs_extra_1.default.remove(app_configs_1.default.buildPath);
40
+ yield fs_extra_1.default.remove(app_configs_1.configs.buildPath);
41
41
  console.timeEnd('Setting up time');
42
42
  console.time('Build application time');
43
43
  // run build script
44
- yield (0, exec_1.default)('npm run build');
44
+ yield (0, exec_1.exec)('npm run build');
45
45
  console.timeEnd('Build application time');
46
- if (app_configs_1.default.removeDevDependenciesDuringDockerBuild) {
46
+ if (app_configs_1.configs.removeDevDependenciesDuringDockerBuild) {
47
47
  console.time('Remove dev dependencies time');
48
48
  const pruneCommand = (0, yarn_1.getPruningCommand)();
49
- yield (0, exec_1.default)(pruneCommand);
49
+ yield (0, exec_1.exec)(pruneCommand);
50
50
  console.timeEnd('Remove dev dependencies time');
51
51
  }
52
52
  console.time('Build docker image time');
53
- yield (0, exec_1.default)((0, docker_build_1.getDockerBuildCommand)({ tempDirName, imageFullName }));
53
+ yield (0, exec_1.exec)((0, docker_build_1.getDockerBuildCommand)({ tempDirName, imageFullName }));
54
54
  console.timeEnd('Build docker image time');
55
55
  console.time('Cleanup time');
56
56
  // remove temp directory
57
57
  yield fs_extra_1.default.remove(pathToTempDir);
58
58
  // guard against pushing the image during tests
59
- if (!app_configs_1.default.debug) {
60
- yield (0, exec_1.default)(`docker push ${imageFullName}`);
59
+ if (!app_configs_1.configs.debug) {
60
+ yield (0, exec_1.exec)(`docker push ${imageFullName}`);
61
61
  }
62
62
  console.timeEnd('Cleanup time');
63
63
  console.timeEnd('Total time');
@@ -65,7 +65,7 @@ const yarn_1 = require("../util/yarn");
65
65
  catch (err) {
66
66
  yield fs_extra_1.default.remove(pathToTempDir);
67
67
  console.error('Error during docker-build.');
68
- if (app_configs_1.default.debug) {
68
+ if (app_configs_1.configs.debug) {
69
69
  console.error(err);
70
70
  }
71
71
  process.exit(1);
@@ -13,13 +13,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const fs_extra_1 = __importDefault(require("fs-extra"));
16
- const app_configs_1 = __importDefault(require("../../configs/app-configs"));
17
- const base_nginx_conf_template_1 = __importDefault(require("../../templates/base-nginx.conf.template"));
18
- const dockerfile_compiled_template_1 = __importDefault(require("../../templates/dockerfile-compiled.template"));
19
- const nginx_conf_template_1 = __importDefault(require("../../templates/nginx.conf.template"));
20
- const start_template_1 = __importDefault(require("../../templates/start.template"));
16
+ const app_configs_1 = require("../../configs/app-configs");
17
+ const base_nginx_conf_template_1 = require("../../templates/base-nginx.conf.template");
18
+ const dockerfile_compiled_template_1 = require("../../templates/dockerfile-compiled.template");
19
+ const nginx_conf_template_1 = require("../../templates/nginx.conf.template");
20
+ const start_template_1 = require("../../templates/start.template");
21
21
  const docker_build_1 = require("../util/docker-build");
22
- const exec_1 = __importDefault(require("../util/exec"));
22
+ const exec_1 = require("../util/exec");
23
23
  (() => __awaiter(void 0, void 0, void 0, function* () {
24
24
  const { imageFullName, pathToTempDir, tempDirName } = (0, docker_build_1.getBuildParamsFromArgs)();
25
25
  try {
@@ -27,26 +27,26 @@ const exec_1 = __importDefault(require("../util/exec"));
27
27
  console.time('Total time');
28
28
  yield (0, docker_build_1.prepareFilesForDocker)({
29
29
  pathToTempDir,
30
- dockerfileTemplate: dockerfile_compiled_template_1.default,
31
- nginxConfTemplate: nginx_conf_template_1.default,
32
- nginxBaseConfTemplate: base_nginx_conf_template_1.default,
33
- startScriptTemplate: start_template_1.default,
30
+ dockerfileTemplate: dockerfile_compiled_template_1.dockerfileTemplate,
31
+ nginxConfTemplate: nginx_conf_template_1.nginxConfTemplate,
32
+ nginxBaseConfTemplate: base_nginx_conf_template_1.nginxBaseConfTemplate,
33
+ startScriptTemplate: start_template_1.startScript,
34
34
  allowLocalDockerfile: false,
35
35
  allowLocalStartScript: false,
36
36
  addNodeModulesToDockerIgnore: true,
37
37
  });
38
- yield (0, exec_1.default)((0, docker_build_1.getDockerBuildCommand)({ tempDirName, imageFullName }));
38
+ yield (0, exec_1.exec)((0, docker_build_1.getDockerBuildCommand)({ tempDirName, imageFullName }));
39
39
  yield fs_extra_1.default.remove(pathToTempDir);
40
40
  // guard against pushing the image during tests
41
- if (!app_configs_1.default.debug) {
42
- yield (0, exec_1.default)(`docker push ${imageFullName}`);
41
+ if (!app_configs_1.configs.debug) {
42
+ yield (0, exec_1.exec)(`docker push ${imageFullName}`);
43
43
  }
44
44
  console.timeEnd('Total time');
45
45
  }
46
46
  catch (err) {
47
47
  yield fs_extra_1.default.remove(pathToTempDir);
48
48
  console.error('Error during docker-build.');
49
- if (app_configs_1.default.debug) {
49
+ if (app_configs_1.configs.debug) {
50
50
  console.error(err);
51
51
  }
52
52
  process.exit(1);
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- /* eslint no-console: 0 */
3
2
  if (process.env.npm_config_user_agent && process.env.npm_config_user_agent.indexOf('yarn') === -1) {
4
3
  console.log(process.env);
5
4
  console.error('You must use yarn to install dependencies, now using', process.env.npm_execpath);
@@ -1,8 +1,5 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const webpack_client_dev_1 = __importDefault(require("../../configs/webpack.client.dev"));
3
+ const webpack_client_dev_1 = require("../../configs/webpack.client.dev");
7
4
  const run_client_dev_server_1 = require("../util/run-client-dev-server");
8
- (0, run_client_dev_server_1.runClientDevServer)(webpack_client_dev_1.default);
5
+ (0, run_client_dev_server_1.runClientDevServer)(webpack_client_dev_1.config);
@@ -5,9 +5,7 @@ const run_compilers_1 = require("../util/run-compilers");
5
5
  const tsc_1 = require("../util/tsc");
6
6
  process.env.BROWSERSLIST_CONFIG =
7
7
  process.env.BROWSERSLIST_CONFIG || require.resolve('../../../.browserslistrc');
8
- const compilersCommands = [
9
- require.resolve('./client'),
10
- ];
8
+ const compilersCommands = [require.resolve('./client')];
11
9
  if (!app_configs_1.configs.clientOnly) {
12
10
  compilersCommands.push(require.resolve('./server'));
13
11
  }
@@ -1 +1,2 @@
1
- export default function printCompilerOutput(compilerName: string, stats: any): void;
1
+ import { type Stats } from '@rspack/core';
2
+ export declare function printCompilerOutput(compilerName: string, stats: Stats): void;
@@ -3,12 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.default = printCompilerOutput;
6
+ exports.printCompilerOutput = printCompilerOutput;
7
7
  const chalk_1 = __importDefault(require("chalk"));
8
- const stats_options_1 = __importDefault(require("../../configs/stats-options"));
8
+ const stats_options_1 = require("../../configs/stats-options");
9
9
  function printCompilerOutput(compilerName, stats) {
10
10
  const output = stats
11
- .toString(stats_options_1.default)
11
+ .toString(stats_options_1.statsOptions)
12
12
  .split('\n')
13
13
  .map((line) => `${chalk_1.default.cyan(`[${compilerName}]`)} ${line}`)
14
14
  .join('\n');
@@ -1,8 +1,5 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const webpack_server_dev_1 = __importDefault(require("../../configs/webpack.server.dev"));
3
+ const webpack_server_dev_1 = require("../../configs/webpack.server.dev");
7
4
  const run_server_watch_compiler_1 = require("../util/run-server-watch-compiler");
8
- (0, run_server_watch_compiler_1.runServerWatchCompiler)(webpack_server_dev_1.default);
5
+ (0, run_server_watch_compiler_1.runServerWatchCompiler)(webpack_server_dev_1.webpackServerConfig);
@@ -1,8 +1,5 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const webpack_client_prod_1 = __importDefault(require("../../configs/webpack.client.prod"));
3
+ const webpack_client_prod_1 = require("../../configs/webpack.client.prod");
7
4
  const run_client_dev_server_1 = require("../util/run-client-dev-server");
8
- (0, run_client_dev_server_1.runClientDevServer)(webpack_client_prod_1.default);
5
+ (0, run_client_dev_server_1.runClientDevServer)(webpack_client_prod_1.webpackClientConfig);
@@ -5,9 +5,7 @@ const run_compilers_1 = require("../util/run-compilers");
5
5
  const tsc_1 = require("../util/tsc");
6
6
  process.env.BROWSERSLIST_CONFIG =
7
7
  process.env.BROWSERSLIST_CONFIG || require.resolve('../../../.browserslistrc');
8
- const compilersCommands = [
9
- require.resolve('./client'),
10
- ];
8
+ const compilersCommands = [require.resolve('./client')];
11
9
  if (!app_configs_1.configs.clientOnly) {
12
10
  compilersCommands.push(require.resolve('./server'));
13
11
  }
@@ -1,8 +1,5 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const webpack_server_prod_1 = __importDefault(require("../../configs/webpack.server.prod"));
3
+ const webpack_server_prod_1 = require("../../configs/webpack.server.prod");
7
4
  const run_server_watch_compiler_1 = require("../util/run-server-watch-compiler");
8
- (0, run_server_watch_compiler_1.runServerWatchCompiler)(webpack_server_prod_1.default);
5
+ (0, run_server_watch_compiler_1.runServerWatchCompiler)(webpack_server_prod_1.webpackServerConfig);
@@ -46,8 +46,6 @@ process.on('unhandledRejection', (err) => {
46
46
  throw err;
47
47
  });
48
48
  // Skip 'node', 'arui-scripts' and 'test' arguments and take all the rest (or none if there is no more arguments).
49
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
50
- // @ts-ignore
51
49
  const argv = process.argv.slice(3);
52
50
  const runJest = () => __awaiter(void 0, void 0, void 0, function* () {
53
51
  const jestConfig = yield (0, get_config_1.getJestConfig)();
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.calculateAssetsSizes = calculateAssetsSizes;
7
7
  exports.printAssetsSizes = printAssetsSizes;
8
- // TODO: remove eslint-disable-next-line
9
8
  const fs_1 = __importDefault(require("fs"));
10
9
  const path_1 = __importDefault(require("path"));
11
10
  const chalk_1 = __importDefault(require("chalk"));