arui-scripts 0.0.0-beta-20260824133302

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 (247) hide show
  1. package/.eslintignore +2 -0
  2. package/.eslintrc.js +17 -0
  3. package/.prettierignore +2 -0
  4. package/.turbo/turbo-build.log +0 -0
  5. package/.turbo/turbo-test.log +23 -0
  6. package/CHANGELOG.md +1976 -0
  7. package/README.md +59 -0
  8. package/bin/build.sh +2 -0
  9. package/build/bin/index.d.ts +2 -0
  10. package/build/bin/index.js +26 -0
  11. package/build/commands/archive-build/index.d.ts +1 -0
  12. package/build/commands/archive-build/index.js +15 -0
  13. package/build/commands/build/build-wrapper.d.ts +8 -0
  14. package/build/commands/build/build-wrapper.js +40 -0
  15. package/build/commands/build/client.d.ts +1 -0
  16. package/build/commands/build/client.js +54 -0
  17. package/build/commands/build/index.d.ts +1 -0
  18. package/build/commands/build/index.js +11 -0
  19. package/build/commands/build/server.d.ts +1 -0
  20. package/build/commands/build/server.js +29 -0
  21. package/build/commands/bundle-analyze/index.d.ts +1 -0
  22. package/build/commands/bundle-analyze/index.js +62 -0
  23. package/build/commands/changelog/index.d.ts +5 -0
  24. package/build/commands/changelog/index.js +141 -0
  25. package/build/commands/docker-build/index.d.ts +1 -0
  26. package/build/commands/docker-build/index.js +15 -0
  27. package/build/commands/docker-build-compiled/index.d.ts +1 -0
  28. package/build/commands/docker-build-compiled/index.js +15 -0
  29. package/build/commands/ensure-yarn/index.d.ts +1 -0
  30. package/build/commands/ensure-yarn/index.js +8 -0
  31. package/build/commands/start/client.d.ts +1 -0
  32. package/build/commands/start/client.js +7 -0
  33. package/build/commands/start/index.d.ts +1 -0
  34. package/build/commands/start/index.js +13 -0
  35. package/build/commands/start/print-compiler-output.d.ts +2 -0
  36. package/build/commands/start/print-compiler-output.js +16 -0
  37. package/build/commands/start/server.d.ts +1 -0
  38. package/build/commands/start/server.js +7 -0
  39. package/build/commands/start-prod/client.d.ts +1 -0
  40. package/build/commands/start-prod/client.js +7 -0
  41. package/build/commands/start-prod/index.d.ts +1 -0
  42. package/build/commands/start-prod/index.js +13 -0
  43. package/build/commands/start-prod/server.d.ts +1 -0
  44. package/build/commands/start-prod/server.js +7 -0
  45. package/build/commands/test/get-config.d.ts +1 -0
  46. package/build/commands/test/get-config.js +83 -0
  47. package/build/commands/test/index.d.ts +1 -0
  48. package/build/commands/test/index.js +68 -0
  49. package/build/commands/test-vitest/index.d.ts +1 -0
  50. package/build/commands/test-vitest/index.js +15 -0
  51. package/build/commands/util/artifacts-config.d.ts +25 -0
  52. package/build/commands/util/artifacts-config.js +119 -0
  53. package/build/commands/util/artifacts-deprecations.d.ts +9 -0
  54. package/build/commands/util/artifacts-deprecations.js +65 -0
  55. package/build/commands/util/arui-scripts-artifacts.d.ts +16 -0
  56. package/build/commands/util/arui-scripts-artifacts.js +29 -0
  57. package/build/commands/util/client-assets-sizes.d.ts +2 -0
  58. package/build/commands/util/client-assets-sizes.js +71 -0
  59. package/build/commands/util/docker-build.d.ts +35 -0
  60. package/build/commands/util/docker-build.js +76 -0
  61. package/build/commands/util/exec.d.ts +1 -0
  62. package/build/commands/util/exec.js +6 -0
  63. package/build/commands/util/format-webpack-messages.d.ts +5 -0
  64. package/build/commands/util/format-webpack-messages.js +95 -0
  65. package/build/commands/util/get-local-ident.d.ts +6 -0
  66. package/build/commands/util/get-local-ident.js +29 -0
  67. package/build/commands/util/load-browserslist.d.ts +1 -0
  68. package/build/commands/util/load-browserslist.js +15 -0
  69. package/build/commands/util/make-tmp-dir.d.ts +5 -0
  70. package/build/commands/util/make-tmp-dir.js +29 -0
  71. package/build/commands/util/print-build-error.d.ts +1 -0
  72. package/build/commands/util/print-build-error.js +32 -0
  73. package/build/commands/util/run-artifacts-cli.d.ts +7 -0
  74. package/build/commands/util/run-artifacts-cli.js +60 -0
  75. package/build/commands/util/run-client-dev-server.d.ts +2 -0
  76. package/build/commands/util/run-client-dev-server.js +47 -0
  77. package/build/commands/util/run-compilers.d.ts +1 -0
  78. package/build/commands/util/run-compilers.js +37 -0
  79. package/build/commands/util/run-server-watch-compiler.d.ts +2 -0
  80. package/build/commands/util/run-server-watch-compiler.js +17 -0
  81. package/build/commands/util/run-vitest.d.ts +7 -0
  82. package/build/commands/util/run-vitest.js +41 -0
  83. package/build/commands/util/tsc.d.ts +1 -0
  84. package/build/commands/util/tsc.js +13 -0
  85. package/build/commands/util/yarn.d.ts +10 -0
  86. package/build/commands/util/yarn.js +25 -0
  87. package/build/configs/app-configs/calculate-dependent-config.d.ts +9 -0
  88. package/build/configs/app-configs/calculate-dependent-config.js +55 -0
  89. package/build/configs/app-configs/get-defaults.d.ts +5 -0
  90. package/build/configs/app-configs/get-defaults.js +151 -0
  91. package/build/configs/app-configs/index.d.ts +5 -0
  92. package/build/configs/app-configs/index.js +25 -0
  93. package/build/configs/app-configs/read-config-file.d.ts +2 -0
  94. package/build/configs/app-configs/read-config-file.js +28 -0
  95. package/build/configs/app-configs/types.d.ts +146 -0
  96. package/build/configs/app-configs/types.js +2 -0
  97. package/build/configs/app-configs/update-with-config-file.d.ts +2 -0
  98. package/build/configs/app-configs/update-with-config-file.js +17 -0
  99. package/build/configs/app-configs/update-with-env.d.ts +2 -0
  100. package/build/configs/app-configs/update-with-env.js +23 -0
  101. package/build/configs/app-configs/update-with-package.d.ts +2 -0
  102. package/build/configs/app-configs/update-with-package.js +13 -0
  103. package/build/configs/app-configs/update-with-presets.d.ts +3 -0
  104. package/build/configs/app-configs/update-with-presets.js +41 -0
  105. package/build/configs/app-configs/validate-config.d.ts +2 -0
  106. package/build/configs/app-configs/validate-config.js +8 -0
  107. package/build/configs/app-configs/validate-settings-keys.d.ts +7 -0
  108. package/build/configs/app-configs/validate-settings-keys.js +16 -0
  109. package/build/configs/app-configs/warn-about-deprecations.d.ts +2 -0
  110. package/build/configs/app-configs/warn-about-deprecations.js +22 -0
  111. package/build/configs/babel-client.d.ts +31 -0
  112. package/build/configs/babel-client.js +69 -0
  113. package/build/configs/babel-dependencies.d.ts +14 -0
  114. package/build/configs/babel-dependencies.js +36 -0
  115. package/build/configs/babel-server.d.ts +26 -0
  116. package/build/configs/babel-server.js +45 -0
  117. package/build/configs/client-env-config/add-env-to-html-template.d.ts +1 -0
  118. package/build/configs/client-env-config/add-env-to-html-template.js +7 -0
  119. package/build/configs/client-env-config/client-config-plugin.d.ts +5 -0
  120. package/build/configs/client-env-config/client-config-plugin.js +26 -0
  121. package/build/configs/client-env-config/constants.d.ts +1 -0
  122. package/build/configs/client-env-config/constants.js +4 -0
  123. package/build/configs/client-env-config/get-env-config.d.ts +2 -0
  124. package/build/configs/client-env-config/get-env-config.js +28 -0
  125. package/build/configs/client-env-config/index.d.ts +3 -0
  126. package/build/configs/client-env-config/index.js +9 -0
  127. package/build/configs/config-extras/minimizers/imagemin/imagemin.d.ts +28 -0
  128. package/build/configs/config-extras/minimizers/imagemin/imagemin.js +65 -0
  129. package/build/configs/config-extras/minimizers/imagemin/index.d.ts +1 -0
  130. package/build/configs/config-extras/minimizers/imagemin/index.js +17 -0
  131. package/build/configs/config-extras/minimizers/index.d.ts +1 -0
  132. package/build/configs/config-extras/minimizers/index.js +17 -0
  133. package/build/configs/dev-server.d.ts +2 -0
  134. package/build/configs/dev-server.js +78 -0
  135. package/build/configs/jest/babel-transform.d.ts +2 -0
  136. package/build/configs/jest/babel-transform.js +6 -0
  137. package/build/configs/jest/css-mock.d.ts +1 -0
  138. package/build/configs/jest/css-mock.js +2 -0
  139. package/build/configs/jest/file-transform.d.ts +3 -0
  140. package/build/configs/jest/file-transform.js +11 -0
  141. package/build/configs/jest/settings.d.ts +21 -0
  142. package/build/configs/jest/settings.js +58 -0
  143. package/build/configs/modules.d.ts +17 -0
  144. package/build/configs/modules.js +181 -0
  145. package/build/configs/mq.css +22 -0
  146. package/build/configs/postcss.config.d.ts +35 -0
  147. package/build/configs/postcss.config.js +65 -0
  148. package/build/configs/postcss.d.ts +6 -0
  149. package/build/configs/postcss.js +21 -0
  150. package/build/configs/process-assets-plugin-output.d.ts +2 -0
  151. package/build/configs/process-assets-plugin-output.js +45 -0
  152. package/build/configs/server-externals-exemptions.d.ts +1 -0
  153. package/build/configs/server-externals-exemptions.js +18 -0
  154. package/build/configs/stats-options.d.ts +2 -0
  155. package/build/configs/stats-options.js +46 -0
  156. package/build/configs/supporting-browsers.d.ts +1 -0
  157. package/build/configs/supporting-browsers.js +5 -0
  158. package/build/configs/supporting-node.d.ts +1 -0
  159. package/build/configs/supporting-node.js +5 -0
  160. package/build/configs/swc.d.ts +4 -0
  161. package/build/configs/swc.js +30 -0
  162. package/build/configs/util/apply-overrides.d.ts +87 -0
  163. package/build/configs/util/apply-overrides.js +56 -0
  164. package/build/configs/util/check-node-version.d.ts +1 -0
  165. package/build/configs/util/check-node-version.js +7 -0
  166. package/build/configs/util/compress-with-dcb.d.ts +2 -0
  167. package/build/configs/util/compress-with-dcb.js +28 -0
  168. package/build/configs/util/compression-plugins-for-dictionaries.d.ts +2 -0
  169. package/build/configs/util/compression-plugins-for-dictionaries.js +78 -0
  170. package/build/configs/util/create-watch-ignore-regex.d.ts +1 -0
  171. package/build/configs/util/create-watch-ignore-regex.js +16 -0
  172. package/build/configs/util/dcb-compression-plugin.d.ts +21 -0
  173. package/build/configs/util/dcb-compression-plugin.js +130 -0
  174. package/build/configs/util/find-loader.d.ts +2 -0
  175. package/build/configs/util/find-loader.js +24 -0
  176. package/build/configs/util/find-plugin.d.ts +78 -0
  177. package/build/configs/util/find-plugin.js +21 -0
  178. package/build/configs/util/get-entry.d.ts +8 -0
  179. package/build/configs/util/get-entry.js +22 -0
  180. package/build/configs/util/get-polyfills.d.ts +2 -0
  181. package/build/configs/util/get-polyfills.js +13 -0
  182. package/build/configs/util/get-webpack-cache-dependencies.d.ts +1 -0
  183. package/build/configs/util/get-webpack-cache-dependencies.js +15 -0
  184. package/build/configs/util/install-sourcemap-support.d.ts +1 -0
  185. package/build/configs/util/install-sourcemap-support.js +10 -0
  186. package/build/configs/util/node-assets-ignore.d.ts +1 -0
  187. package/build/configs/util/node-assets-ignore.js +34 -0
  188. package/build/configs/util/noop.d.ts +1 -0
  189. package/build/configs/util/noop.js +2 -0
  190. package/build/configs/util/register-ts-node.d.ts +1 -0
  191. package/build/configs/util/register-ts-node.js +18 -0
  192. package/build/configs/util/resolve.d.ts +14 -0
  193. package/build/configs/util/resolve.js +29 -0
  194. package/build/configs/vitest/config.d.ts +2 -0
  195. package/build/configs/vitest/config.js +5 -0
  196. package/build/configs/vitest/settings.d.ts +30 -0
  197. package/build/configs/vitest/settings.js +77 -0
  198. package/build/configs/webpack.client.d.ts +10 -0
  199. package/build/configs/webpack.client.dev.d.ts +1 -0
  200. package/build/configs/webpack.client.dev.js +12 -0
  201. package/build/configs/webpack.client.js +508 -0
  202. package/build/configs/webpack.client.prod.d.ts +1 -0
  203. package/build/configs/webpack.client.prod.js +12 -0
  204. package/build/configs/webpack.server.d.ts +2 -0
  205. package/build/configs/webpack.server.dev.d.ts +1 -0
  206. package/build/configs/webpack.server.dev.js +8 -0
  207. package/build/configs/webpack.server.js +283 -0
  208. package/build/configs/webpack.server.prod.d.ts +1 -0
  209. package/build/configs/webpack.server.prod.js +8 -0
  210. package/build/index.d.ts +19 -0
  211. package/build/index.js +35 -0
  212. package/build/plugins/arui-runtime/arui-runtime-module.d.ts +7 -0
  213. package/build/plugins/arui-runtime/arui-runtime-module.js +20 -0
  214. package/build/plugins/arui-runtime/index.d.ts +11 -0
  215. package/build/plugins/arui-runtime/index.js +47 -0
  216. package/build/plugins/postcss-global-variables/postcss-global-variables.d.ts +6 -0
  217. package/build/plugins/postcss-global-variables/postcss-global-variables.js +38 -0
  218. package/build/plugins/postcss-global-variables/utils/utils.d.ts +7 -0
  219. package/build/plugins/postcss-global-variables/utils/utils.js +91 -0
  220. package/build/plugins/postcss-prefix-selector.d.ts +6 -0
  221. package/build/plugins/postcss-prefix-selector.js +65 -0
  222. package/build/plugins/reload-server-plugin.d.ts +10 -0
  223. package/build/plugins/reload-server-plugin.js +46 -0
  224. package/build/plugins/turn-off-split-remote-entry.d.ts +11 -0
  225. package/build/plugins/turn-off-split-remote-entry.js +71 -0
  226. package/build/plugins/watch-missing-node-modules-plugin.d.ts +6 -0
  227. package/build/plugins/watch-missing-node-modules-plugin.js +20 -0
  228. package/build/templates/html.template.d.ts +1 -0
  229. package/build/templates/html.template.js +22 -0
  230. package/docs/artifact.md +62 -0
  231. package/docs/caveats.md +41 -0
  232. package/docs/client-only.md +77 -0
  233. package/docs/commands.md +159 -0
  234. package/docs/compilers.md +18 -0
  235. package/docs/compression-dictionary.md +130 -0
  236. package/docs/examples.md +100 -0
  237. package/docs/modules.md +834 -0
  238. package/docs/overrides.md +175 -0
  239. package/docs/presets.md +65 -0
  240. package/docs/settings.md +336 -0
  241. package/jest-preset.js +5 -0
  242. package/package.json +215 -0
  243. package/stylelint.config.js +11 -0
  244. package/tsconfig-local.json +17 -0
  245. package/tsconfig-local.tsbuildinfo +1 -0
  246. package/tsconfig.eslint.json +5 -0
  247. package/tsconfig.json +29 -0
@@ -0,0 +1,151 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.baseNginxConfigFileName = exports.nginxConfigFileName = void 0;
7
+ exports.getDefaultAppConfig = getDefaultAppConfig;
8
+ exports.getDefaultAppContext = getDefaultAppContext;
9
+ const fs_1 = __importDefault(require("fs"));
10
+ const path_1 = __importDefault(require("path"));
11
+ const resolve_1 = require("../util/resolve");
12
+ const read_config_file_1 = require("./read-config-file");
13
+ const CWD = process.cwd();
14
+ const absoluteSrcPath = path_1.default.resolve(CWD, 'src');
15
+ exports.nginxConfigFileName = 'nginx.conf';
16
+ exports.baseNginxConfigFileName = 'base-nginx.conf';
17
+ function getDefaultAppConfig() {
18
+ var _a;
19
+ const appPackage = getPackageJson();
20
+ const configFile = (0, read_config_file_1.readConfigFile)(CWD);
21
+ return {
22
+ /// general settings
23
+ clientServerPort: 8080,
24
+ serverPort: 3000,
25
+ debug: false,
26
+ devSourceMaps: 'cheap-module-source-map', // Ρ‚Π°ΠΊ ΠΏΠΎΠ»ΡƒΡ‡Π°ΡŽΡ‚ΡΡ Π½ΠΎΡ€ΠΌΠ°Π»ΡŒΠ½Ρ‹Π΅ сорсмапы, с eval - ΠΎΠ½ΠΈ Π½Π΅ Ρ€Π°Π±ΠΎΡ‚Π°ΡŽΡ‚
27
+ devServerCors: false,
28
+ useServerHMR: false,
29
+ presets: (configFile === null || configFile === void 0 ? void 0 : configFile.presets) || ((_a = appPackage === null || appPackage === void 0 ? void 0 : appPackage.aruiScripts) === null || _a === void 0 ? void 0 : _a.presets) || null,
30
+ proxy: appPackage.proxy || [],
31
+ clientOnly: false,
32
+ // paths
33
+ buildPath: '.build',
34
+ assetsPath: 'assets',
35
+ statsOutputFilename: 'stats.json',
36
+ serverEntry: path_1.default.resolve(absoluteSrcPath, 'server/index'),
37
+ serverOutput: 'server.js',
38
+ clientPolyfillsEntry: null,
39
+ clientEntry: path_1.default.resolve(absoluteSrcPath, 'index'),
40
+ // docker/archive compilation configs
41
+ // Π”Π΅Ρ„ΠΎΠ»Ρ‚Ρ‹ этих настроСк ΠΆΠΈΠ²ΡƒΡ‚ Π² @alfalab/arui-scripts-artifacts (resolveArtifactsConfig).
42
+ // Π—Π΄Π΅ΡΡŒ ΠΊΠ»ΡŽΡ‡ΠΈ ΠΎΠ±ΡŠΡΠ²Π»Π΅Π½Ρ‹ Π±Π΅Π· Π·Π½Π°Ρ‡Π΅Π½ΠΈΠΉ, Ρ‡Ρ‚ΠΎΠ±Ρ‹ настройка ΠΈΠ· package.json/ΠΊΠΎΠ½Ρ„ΠΈΠ³Π° Π½Π΅ ΡΡ‡ΠΈΡ‚Π°Π»Π°ΡΡŒ
43
+ // нСизвСстной, Π° `undefined` Π΄ΠΎΠ΅Ρ…Π°Π» Π΄ΠΎ scripts-artifacts ΠΈ Π±Ρ‹Π» Π·Π°ΠΏΠΎΠ»Π½Π΅Π½ Ρ‚Π°ΠΌ.
44
+ dockerRegistry: undefined,
45
+ baseDockerImage: undefined,
46
+ nginxRootPath: undefined,
47
+ nginx: undefined,
48
+ runFromNonRootUser: undefined,
49
+ removeDevDependenciesDuringDockerBuild: undefined,
50
+ archiveName: undefined,
51
+ additionalBuildPath: undefined,
52
+ dictionaryCompression: {
53
+ dictionaryPath: [],
54
+ enablePreviousVersionHeaders: false,
55
+ },
56
+ // build tuning
57
+ keepPropTypes: false,
58
+ codeLoader: 'swc',
59
+ experimentalReactCompiler: 'disabled',
60
+ installServerSourceMaps: false,
61
+ disableDevWebpackTypecheck: true,
62
+ jestCodeTransformer: 'swc',
63
+ collectCoverage: process.env.NODE_ENV === 'cypress' || process.env.USE_ISTANBUL === 'enabled',
64
+ // image processing
65
+ dataUrlMaxSize: 1536,
66
+ imageMinimizer: {
67
+ svg: {
68
+ enabled: true,
69
+ },
70
+ gif: {
71
+ enabled: false,
72
+ optimizationLevel: 1,
73
+ },
74
+ jpg: {
75
+ enabled: false,
76
+ quality: 75,
77
+ },
78
+ png: {
79
+ enabled: false,
80
+ optimizationLevel: 3,
81
+ bitDepthReduction: false,
82
+ colorTypeReduction: false,
83
+ paletteReduction: false,
84
+ },
85
+ },
86
+ // CSS
87
+ componentsTheme: null,
88
+ keepCssVars: false,
89
+ // Modules
90
+ disableModulesSupport: false,
91
+ compatModules: null,
92
+ modules: null,
93
+ nodeExternals: {
94
+ modulesFromFile: true,
95
+ },
96
+ };
97
+ }
98
+ function getPackageJson() {
99
+ const appPackage = JSON.parse(fs_1.default.readFileSync(path_1.default.join(CWD, 'package.json'), 'utf8'));
100
+ if (appPackage['arui-scripts']) {
101
+ throw Error('arui-scripts in package.json is not supported. Use aruiScripts instead.');
102
+ }
103
+ return appPackage;
104
+ }
105
+ function getDefaultAppContext() {
106
+ const appPackage = getPackageJson();
107
+ const absoluteNodeModulesPath = path_1.default.resolve(CWD, 'node_modules');
108
+ const absoluteNodeModulesBinPath = path_1.default.resolve(absoluteNodeModulesPath, '.bin');
109
+ const projectTsConfigPath = path_1.default.join(CWD, 'tsconfig.json');
110
+ const yarnLockFilePath = path_1.default.join(CWD, 'yarn.lock');
111
+ const overridesPath = (0, resolve_1.tryResolve)(path_1.default.join(CWD, 'arui-scripts.overrides'));
112
+ const nginxConfFilePath = path_1.default.join(CWD, exports.nginxConfigFileName);
113
+ const nginxBaseConfFilePath = path_1.default.join(CWD, exports.baseNginxConfigFileName);
114
+ const dockerfileFilePath = path_1.default.join(CWD, 'Dockerfile');
115
+ const startScriptFilePath = path_1.default.join(CWD, 'start.sh');
116
+ return {
117
+ appPackage,
118
+ name: appPackage.name,
119
+ normalizedName: appPackage.name.replace(/-/g, '_'), // для использования Π² качСствС ΠΈΠΌΠ΅Π½ΠΈ ΠΏΠ΅Ρ€Π΅ΠΌΠ΅Π½Π½ΠΎΠΉ
120
+ version: appPackage.version,
121
+ // general paths
122
+ cwd: CWD,
123
+ appSrc: absoluteSrcPath,
124
+ appNodeModules: absoluteNodeModulesPath,
125
+ appNodeModulesBin: absoluteNodeModulesBinPath,
126
+ overridesPath: overridesPath ? [overridesPath] : [],
127
+ // tools availability
128
+ babelRuntimeVersion: '7.0.0-beta.0',
129
+ useYarn: fs_1.default.existsSync(yarnLockFilePath),
130
+ // compilation configs locations
131
+ tsconfig: fs_1.default.existsSync(projectTsConfigPath) ? projectTsConfigPath : null,
132
+ localNginxConf: fs_1.default.existsSync(nginxConfFilePath) ? nginxConfFilePath : null,
133
+ localNginxBaseConf: fs_1.default.existsSync(nginxBaseConfFilePath) ? nginxBaseConfFilePath : null,
134
+ localDockerfile: fs_1.default.existsSync(dockerfileFilePath) ? dockerfileFilePath : null,
135
+ localStartScript: fs_1.default.existsSync(startScriptFilePath) ? startScriptFilePath : null,
136
+ // Π­Ρ‚ΠΈ ΠΏΡƒΡ‚ΠΈ зависят ΠΎΡ‚ Π΄Ρ€ΡƒΠ³ΠΈΡ… настроСк, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ ΠΌΠΎΠ³ΡƒΡ‚ Π±Ρ‹Ρ‚ΡŒ ΠΏΠ΅Ρ€Π΅ΠΎΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½Ρ‹ ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»Π΅ΠΌ
137
+ publicPath: '',
138
+ serverOutputPath: '',
139
+ clientOutputPath: '',
140
+ statsOutputPath: '',
141
+ watchIgnorePath: [],
142
+ // changelog paths
143
+ changelogPath: path_1.default.resolve(CWD, './CHANGELOG.md'),
144
+ changelogTmpPath: path_1.default.resolve(CWD, './CHANGELOG_TMP.md'),
145
+ changelogFeaturesPath: path_1.default.resolve(CWD, './changelog_features.tmp'),
146
+ changelogBugfixesPath: path_1.default.resolve(CWD, './changelog_bugfixes.tmp'),
147
+ changelogBreakingChangesPath: path_1.default.resolve(CWD, './changelog_breaking_changes.tmp'),
148
+ compressionPredefinedDictionaryPath: [],
149
+ compressionPreviousVersionPath: [],
150
+ };
151
+ }
@@ -0,0 +1,5 @@
1
+ import { type AppConfigs, type AppContext, type AppContextWithConfigs } from './types';
2
+ import '../util/register-ts-node';
3
+ export declare const appContext: AppContext;
4
+ export declare const appConfigs: AppConfigs;
5
+ export declare const configs: AppContextWithConfigs;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.configs = exports.appConfigs = exports.appContext = void 0;
4
+ const calculate_dependent_config_1 = require("./calculate-dependent-config");
5
+ const get_defaults_1 = require("./get-defaults");
6
+ const update_with_config_file_1 = require("./update-with-config-file");
7
+ const update_with_env_1 = require("./update-with-env");
8
+ const update_with_package_1 = require("./update-with-package");
9
+ const update_with_presets_1 = require("./update-with-presets");
10
+ const validate_config_1 = require("./validate-config");
11
+ const warn_about_deprecations_1 = require("./warn-about-deprecations");
12
+ require("../util/register-ts-node");
13
+ let tmpConfig = (0, get_defaults_1.getDefaultAppConfig)();
14
+ let tmpContext = (0, get_defaults_1.getDefaultAppContext)();
15
+ tmpConfig = (0, update_with_presets_1.updateWithPresets)(tmpConfig, tmpContext);
16
+ tmpConfig = (0, update_with_package_1.updateWithPackage)(tmpConfig, tmpContext);
17
+ tmpConfig = (0, update_with_config_file_1.updateWithConfigFile)(tmpConfig, tmpContext);
18
+ tmpConfig = (0, update_with_env_1.updateWithEnv)(tmpConfig);
19
+ tmpConfig = (0, calculate_dependent_config_1.calculateDependentConfig)(tmpConfig);
20
+ tmpContext = (0, calculate_dependent_config_1.calculateDependentContext)(tmpConfig, tmpContext);
21
+ exports.appContext = tmpContext;
22
+ exports.appConfigs = tmpConfig;
23
+ exports.configs = Object.assign(Object.assign({}, exports.appConfigs), exports.appContext);
24
+ (0, validate_config_1.validateConfig)(exports.configs);
25
+ (0, warn_about_deprecations_1.warnAboutDeprecations)(exports.configs);
@@ -0,0 +1,2 @@
1
+ export declare function readConfigFile(cwd: string): any;
2
+ export declare function getConfigFilePath(cwd: string): string | undefined;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.readConfigFile = readConfigFile;
7
+ exports.getConfigFilePath = getConfigFilePath;
8
+ const path_1 = __importDefault(require("path"));
9
+ const resolve_1 = require("../util/resolve");
10
+ function readConfigFile(cwd) {
11
+ const appConfigPath = getConfigFilePath(cwd);
12
+ if (appConfigPath) {
13
+ // ΠœΡ‹ Π½Π΅ ΠΌΠΎΠΆΠ΅ΠΌ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒ ΠΈΠΌΠΏΠΎΡ€Ρ‚Ρ‹, Π½Π°ΠΌ Π½ΡƒΠΆΠ΅Π½ ΠΈΠΌΠ΅Π½Π½ΠΎ require, ΠΏΠΎΡ‚ΠΎΠΌΡƒ Ρ‡Ρ‚ΠΎ ΠΌΡ‹ Π½Π΅ Π·Π½Π°Π΅ΠΌ Π·Π°Ρ€Π°Π½Π΅Π΅ Π½Π΅ Ρ‚ΠΎΠ»ΡŒΠΊΠΎ ΠΏΡƒΡ‚ΡŒ Π΄ΠΎ Ρ„Π°ΠΉΠ»Π°,
14
+ // Π½ΠΎ ΠΈ Ρ‚ΠΎ, Π½Π° ΠΊΠ°ΠΊΠΎΠΌ языкС ΠΎΠ½ написан
15
+ // eslint-disable-next-line import/no-dynamic-require, global-require, @typescript-eslint/no-var-requires
16
+ let appSettings = require(appConfigPath);
17
+ // ts-node ΠΈΠΌΠΏΠΎΡ€Ρ‚ΠΈΡ€ΡƒΠ΅Ρ‚ esModules, ΠΈΠ· Π½ΠΈΡ… Π½Π°Π΄ΠΎ Π²Ρ‹Ρ‚ΡΠ³ΠΈΠ²Π°Ρ‚ΡŒ default ΠΈΠΌΠ΅Π½Π½ΠΎ Ρ‚Π°ΠΊ
18
+ // eslint-disable-next-line no-underscore-dangle
19
+ if (appSettings.__esModule) {
20
+ appSettings = appSettings.default;
21
+ }
22
+ return appSettings;
23
+ }
24
+ return null;
25
+ }
26
+ function getConfigFilePath(cwd) {
27
+ return (0, resolve_1.tryResolve)(path_1.default.join(cwd, '/arui-scripts.config'));
28
+ }
@@ -0,0 +1,146 @@
1
+ import { type DevTool, type Shared } from '@rspack/core';
2
+ import { type Configuration as DevServerConfiguration } from '@rspack/dev-server';
3
+ import { type PluginOptions as ReactCompilerOptions } from 'babel-plugin-react-compiler';
4
+ import type webpackNodeExternals from 'webpack-node-externals';
5
+ import { type NginxBaseConfOptions } from '@alfalab/arui-scripts-artifacts';
6
+ /**
7
+ * ΠšΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΡ arui-scripts, которая ΠΌΠΎΠΆΠ΅Ρ‚ Π±Ρ‹Ρ‚ΡŒ ΠΏΠ΅Ρ€Π΅ΠΎΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½Π° ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ΠΌ
8
+ */
9
+ export type AppConfigs = {
10
+ clientServerPort: number;
11
+ serverPort: number;
12
+ debug: boolean;
13
+ devSourceMaps: DevTool;
14
+ devServerCors: boolean;
15
+ useServerHMR: boolean;
16
+ presets: string | null;
17
+ proxy: DevServerConfiguration['proxy'];
18
+ clientOnly: boolean;
19
+ buildPath: string;
20
+ assetsPath: string;
21
+ statsOutputFilename: string;
22
+ serverEntry: string | string[] | Record<string, string | string[]>;
23
+ serverOutput: string;
24
+ clientPolyfillsEntry: null | string | string[];
25
+ clientEntry: string | string[] | Record<string, string | string[]>;
26
+ /** @deprecated Π˜ΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠΉΡ‚Π΅ `docker.registry` Π² ΠΊΠΎΠ½Ρ„ΠΈΠ³Π΅ @alfalab/arui-scripts-artifacts. */
27
+ dockerRegistry?: string;
28
+ /** @deprecated Π˜ΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠΉΡ‚Π΅ `docker.baseImage` Π² ΠΊΠΎΠ½Ρ„ΠΈΠ³Π΅ @alfalab/arui-scripts-artifacts. */
29
+ baseDockerImage?: string;
30
+ /** @deprecated Π˜ΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠΉΡ‚Π΅ `nginx.rootPath` Π² ΠΊΠΎΠ½Ρ„ΠΈΠ³Π΅ @alfalab/arui-scripts-artifacts. */
31
+ nginxRootPath?: string;
32
+ /** @deprecated Π˜ΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠΉΡ‚Π΅ `nginx.baseConf` Π² ΠΊΠΎΠ½Ρ„ΠΈΠ³Π΅ @alfalab/arui-scripts-artifacts. */
33
+ nginx?: NginxBaseConfOptions | null;
34
+ /** @deprecated Π˜ΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠΉΡ‚Π΅ `docker.runFromNonRootUser` Π² ΠΊΠΎΠ½Ρ„ΠΈΠ³Π΅ @alfalab/arui-scripts-artifacts. */
35
+ runFromNonRootUser?: boolean;
36
+ /** @deprecated Π˜ΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠΉΡ‚Π΅ `build.removeDevDependencies` Π² ΠΊΠΎΠ½Ρ„ΠΈΠ³Π΅ @alfalab/arui-scripts-artifacts. */
37
+ removeDevDependenciesDuringDockerBuild?: boolean;
38
+ /** @deprecated Π˜ΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠΉΡ‚Π΅ `archive.name` Π² ΠΊΠΎΠ½Ρ„ΠΈΠ³Π΅ @alfalab/arui-scripts-artifacts. */
39
+ archiveName?: string;
40
+ /**
41
+ * Π”ΠΈΡ€Π΅ΠΊΡ‚ΠΎΡ€ΠΈΠΈ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π°, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ кладутся Π² tar-Π°Ρ€Ρ…ΠΈΠ² рядом со сборкой.
42
+ * @deprecated Π˜ΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠΉΡ‚Π΅ `archive.additionalPaths` Π² ΠΊΠΎΠ½Ρ„ΠΈΠ³Π΅ @alfalab/arui-scripts-artifacts.
43
+ */
44
+ additionalBuildPath?: string[];
45
+ dictionaryCompression: {
46
+ dictionaryPath: string[];
47
+ enablePreviousVersionHeaders?: boolean;
48
+ };
49
+ keepPropTypes: boolean;
50
+ codeLoader: 'babel' | 'tsc' | 'swc';
51
+ experimentalReactCompiler: 'disabled' | ReactCompilerOptions;
52
+ installServerSourceMaps: boolean;
53
+ disableDevWebpackTypecheck: boolean;
54
+ jestCodeTransformer: 'babel' | 'tsc' | 'swc';
55
+ collectCoverage: boolean;
56
+ dataUrlMaxSize?: number;
57
+ imageMinimizer?: {
58
+ svg?: {
59
+ enabled?: boolean;
60
+ };
61
+ gif?: {
62
+ enabled?: boolean;
63
+ optimizationLevel?: number;
64
+ };
65
+ jpg?: {
66
+ enabled?: boolean;
67
+ quality: number;
68
+ };
69
+ png?: {
70
+ enabled?: boolean;
71
+ optimizationLevel?: number;
72
+ bitDepthReduction?: boolean;
73
+ colorTypeReduction?: boolean;
74
+ paletteReduction?: boolean;
75
+ interlaced?: boolean;
76
+ };
77
+ };
78
+ componentsTheme: string | null;
79
+ keepCssVars: boolean;
80
+ disableModulesSupport: boolean;
81
+ compatModules: {
82
+ shared?: {
83
+ [libraryName: string]: string;
84
+ };
85
+ exposes?: {
86
+ [moduleId: string]: CompatModuleConfigBase;
87
+ };
88
+ } | null;
89
+ modules: {
90
+ name?: string;
91
+ shared: Shared;
92
+ exposes?: Record<string, string>;
93
+ options?: ModuleConfigBase;
94
+ shareScope?: string;
95
+ } | null;
96
+ nodeExternals?: Omit<webpackNodeExternals.Options, 'allowlist'>;
97
+ };
98
+ export type ModuleConfigBase = {
99
+ cssPrefix?: false | string;
100
+ useSeparateBuild?: boolean;
101
+ separateBuildShared?: Shared;
102
+ };
103
+ type CompatModuleConfigBase = {
104
+ cssPrefix?: false | string;
105
+ entry: string;
106
+ externals?: Record<string, string>;
107
+ };
108
+ export type CompatModuleConfig = CompatModuleConfigBase & {
109
+ name: string;
110
+ };
111
+ /**
112
+ * Π’Π½ΡƒΡ‚Ρ€Π΅Π½Π½ΠΈΠΉ контСкст arui-scripts
113
+ */
114
+ export type AppContext = {
115
+ appPackage: any;
116
+ name: string;
117
+ normalizedName: string;
118
+ version: string;
119
+ cwd: string;
120
+ appSrc: string;
121
+ appNodeModules: string;
122
+ appNodeModulesBin: string;
123
+ babelRuntimeVersion: string;
124
+ useYarn: boolean;
125
+ tsconfig: string | null;
126
+ localNginxConf: string | null;
127
+ localNginxBaseConf: string | null;
128
+ localDockerfile: string | null;
129
+ localStartScript: string | null;
130
+ overridesPath: string[];
131
+ publicPath: string;
132
+ serverOutputPath: string;
133
+ clientOutputPath: string;
134
+ statsOutputPath: string;
135
+ watchIgnorePath: string[];
136
+ changelogPath: string;
137
+ changelogTmpPath: string;
138
+ changelogFeaturesPath: string;
139
+ changelogBugfixesPath: string;
140
+ changelogBreakingChangesPath: string;
141
+ compressionPreviousVersionPath: string[];
142
+ compressionPredefinedDictionaryPath: string[];
143
+ };
144
+ export type AppContextWithConfigs = AppContext & AppConfigs;
145
+ export type PackageSettings = Partial<AppConfigs>;
146
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import { type AppConfigs, type AppContext } from './types';
2
+ export declare function updateWithConfigFile(config: AppConfigs, context: AppContext): any;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.updateWithConfigFile = updateWithConfigFile;
7
+ const lodash_merge_1 = __importDefault(require("lodash.merge"));
8
+ const read_config_file_1 = require("./read-config-file");
9
+ const validate_settings_keys_1 = require("./validate-settings-keys");
10
+ function updateWithConfigFile(config, context) {
11
+ const appSettings = (0, read_config_file_1.readConfigFile)(context.cwd);
12
+ if (appSettings) {
13
+ (0, validate_settings_keys_1.validateSettingsKeys)(config, appSettings, context.cwd);
14
+ return (0, lodash_merge_1.default)(config, appSettings);
15
+ }
16
+ return config;
17
+ }
@@ -0,0 +1,2 @@
1
+ import { type AppConfigs } from './types';
2
+ export declare function updateWithEnv(config: AppConfigs): any;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.updateWithEnv = updateWithEnv;
7
+ const lodash_merge_1 = __importDefault(require("lodash.merge"));
8
+ const validate_settings_keys_1 = require("./validate-settings-keys");
9
+ function updateWithEnv(config) {
10
+ if (!process.env.ARUI_SCRIPTS_CONFIG) {
11
+ return config;
12
+ }
13
+ try {
14
+ console.warn('Π˜ΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠΉΡ‚Π΅ ARUI_SCRIPTS_CONFIG Ρ‚ΠΎΠ»ΡŒΠΊΠΎ для ΠΎΡ‚Π»Π°Π΄ΠΊΠΈ');
15
+ const envSettings = JSON.parse(process.env.ARUI_SCRIPTS_CONFIG);
16
+ (0, validate_settings_keys_1.validateSettingsKeys)(config, envSettings, 'ENV');
17
+ return (0, lodash_merge_1.default)(config, envSettings);
18
+ }
19
+ catch (e) {
20
+ console.error(e);
21
+ throw Error('Not valid JSON passed. Correct it. For example: ARUI_SCRIPTS_CONFIG="{"serverPort":3333}"');
22
+ }
23
+ }
@@ -0,0 +1,2 @@
1
+ import { type AppConfigs, type AppContext } from './types';
2
+ export declare function updateWithPackage(config: AppConfigs, context: AppContext): any;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.updateWithPackage = updateWithPackage;
7
+ const lodash_merge_1 = __importDefault(require("lodash.merge"));
8
+ const validate_settings_keys_1 = require("./validate-settings-keys");
9
+ function updateWithPackage(config, context) {
10
+ const packageSettings = context.appPackage.aruiScripts || {};
11
+ (0, validate_settings_keys_1.validateSettingsKeys)(config, packageSettings, 'package.json');
12
+ return (0, lodash_merge_1.default)(config, packageSettings);
13
+ }
@@ -0,0 +1,3 @@
1
+ import { type AppConfigs, type AppContext } from './types';
2
+ export declare function updateWithPresets(config: AppConfigs, context: AppContext): AppConfigs;
3
+ export declare function getPresetsConfigPath(config: AppConfigs, cwd: string): string | undefined;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.updateWithPresets = updateWithPresets;
7
+ exports.getPresetsConfigPath = getPresetsConfigPath;
8
+ // TODO: remove eslint-disable-next-line
9
+ const lodash_merge_1 = __importDefault(require("lodash.merge"));
10
+ const resolve_1 = require("../util/resolve");
11
+ const validate_settings_keys_1 = require("./validate-settings-keys");
12
+ function updateWithPresets(config, context) {
13
+ if (!config.presets) {
14
+ return config;
15
+ }
16
+ const presetsConfigPath = getPresetsConfigPath(config, context.cwd);
17
+ const presetsOverridesPath = (0, resolve_1.tryResolve)(`${config.presets}/arui-scripts.overrides`, {
18
+ paths: [context.cwd],
19
+ });
20
+ if (presetsConfigPath) {
21
+ // eslint-disable-next-line import/no-dynamic-require, @typescript-eslint/no-var-requires, global-require
22
+ let presetsSettings = require(presetsConfigPath);
23
+ // eslint-disable-next-line no-underscore-dangle
24
+ if (presetsSettings.__esModule) {
25
+ // ts-node ΠΈΠΌΠΏΠΎΡ€Ρ‚ΠΈΡ€ΡƒΠ΅Ρ‚ esModules, ΠΈΠ· Π½ΠΈΡ… Π½Π°Π΄ΠΎ Π²Ρ‹Ρ‚ΡΠ³ΠΈΠ²Π°Ρ‚ΡŒ default ΠΈΠΌΠ΅Π½Π½ΠΎ Ρ‚Π°ΠΊ
26
+ presetsSettings = presetsSettings.default;
27
+ }
28
+ (0, validate_settings_keys_1.validateSettingsKeys)(config, presetsSettings, presetsConfigPath);
29
+ // eslint-disable-next-line no-param-reassign
30
+ config = (0, lodash_merge_1.default)(config, presetsSettings);
31
+ }
32
+ if (presetsOverridesPath) {
33
+ context.overridesPath.unshift(presetsOverridesPath);
34
+ }
35
+ return config;
36
+ }
37
+ function getPresetsConfigPath(config, cwd) {
38
+ return (0, resolve_1.tryResolve)(`${config.presets}/arui-scripts.config`, {
39
+ paths: [cwd],
40
+ });
41
+ }
@@ -0,0 +1,2 @@
1
+ import { type AppContextWithConfigs } from './types';
2
+ export declare function validateConfig(config: AppContextWithConfigs): void;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateConfig = validateConfig;
4
+ function validateConfig(config) {
5
+ if (config.experimentalReactCompiler !== 'disabled' && config.codeLoader !== 'swc') {
6
+ throw new Error('ИспользованиС `experimentalReactCompiler` Π½Π° Π΄Π°Π½Π½Ρ‹ΠΉ ΠΌΠΎΠΌΠ΅Π½Ρ‚ поддСрТиваСтся Ρ‚ΠΎΠ»ΡŒΠΊΠΎ с `codeLoader: "swc"`. \nΠ›ΠΈΠ±ΠΎ Π²Ρ‹ΠΊΠ»ΡŽΡ‡ΠΈΡ‚Π΅ `experimentalReactCompiler`, Π»ΠΈΠ±ΠΎ ΠΈΠ·ΠΌΠ΅Π½ΠΈΡ‚Π΅ настройку для `codeLoader`.');
7
+ }
8
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Ѐункция провСряСт Ρ‡Ρ‚ΠΎ всС ΠΊΠ»ΡŽΡ‡ΠΈ ΠΎΠ±ΡŠΠ΅ΠΊΡ‚Π° settingsObject Π΅ΡΡ‚ΡŒ Π² ΡƒΠΆΠ΅ ΡΡƒΡ‰Π΅ΡΡ‚Π²ΡƒΡŽΡ‰Π΅ΠΉ ΠΊΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΠΈ.
3
+ *
4
+ * ΠŸΡ€ΠΎΠ²Π΅Ρ€ΡΠ΅Ρ‚ΡΡ ΠΈΠΌΠ΅Π½Π½ΠΎ Π½Π°Π»ΠΈΡ‡ΠΈΠ΅ ΠΊΠ»ΡŽΡ‡Π°, Π° Π½Π΅ значСния: Ρƒ части настроСк (Π½Π°ΠΏΡ€ΠΈΠΌΠ΅Ρ€, docker-спСцифичных)
5
+ * Π΄Π΅Ρ„ΠΎΠ»Ρ‚ ΠΆΠΈΠ²Π΅Ρ‚ Π² @alfalab/arui-scripts-artifacts, поэтому Π² ΠΊΠΎΠ½Ρ„ΠΈΠ³Π΅ ΠΎΠ½ΠΈ Π»Π΅ΠΆΠ°Ρ‚ со Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ΠΌ `undefined`.
6
+ */
7
+ export declare function validateSettingsKeys(existingConfig: Record<string, unknown>, settingsObject: Record<string, unknown>, source?: string): void;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateSettingsKeys = validateSettingsKeys;
4
+ /**
5
+ * Ѐункция провСряСт Ρ‡Ρ‚ΠΎ всС ΠΊΠ»ΡŽΡ‡ΠΈ ΠΎΠ±ΡŠΠ΅ΠΊΡ‚Π° settingsObject Π΅ΡΡ‚ΡŒ Π² ΡƒΠΆΠ΅ ΡΡƒΡ‰Π΅ΡΡ‚Π²ΡƒΡŽΡ‰Π΅ΠΉ ΠΊΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΠΈ.
6
+ *
7
+ * ΠŸΡ€ΠΎΠ²Π΅Ρ€ΡΠ΅Ρ‚ΡΡ ΠΈΠΌΠ΅Π½Π½ΠΎ Π½Π°Π»ΠΈΡ‡ΠΈΠ΅ ΠΊΠ»ΡŽΡ‡Π°, Π° Π½Π΅ значСния: Ρƒ части настроСк (Π½Π°ΠΏΡ€ΠΈΠΌΠ΅Ρ€, docker-спСцифичных)
8
+ * Π΄Π΅Ρ„ΠΎΠ»Ρ‚ ΠΆΠΈΠ²Π΅Ρ‚ Π² @alfalab/arui-scripts-artifacts, поэтому Π² ΠΊΠΎΠ½Ρ„ΠΈΠ³Π΅ ΠΎΠ½ΠΈ Π»Π΅ΠΆΠ°Ρ‚ со Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ΠΌ `undefined`.
9
+ */
10
+ function validateSettingsKeys(existingConfig, settingsObject, source) {
11
+ Object.keys(settingsObject).forEach((setting) => {
12
+ if (!Object.prototype.hasOwnProperty.call(existingConfig, setting)) {
13
+ console.warn(`НСизвСстная настройка "${setting}" Π² ${source || 'ΠΊΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΠΈ'}`);
14
+ }
15
+ });
16
+ }
@@ -0,0 +1,2 @@
1
+ import { type AppContextWithConfigs } from './types';
2
+ export declare function warnAboutDeprecations(config: AppContextWithConfigs): void;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.warnAboutDeprecations = warnAboutDeprecations;
4
+ function warnAboutDeprecations(config) {
5
+ if (!Array.isArray(config.proxy) && config.proxy) {
6
+ console.warn('ΠŸΠ΅Ρ€Π΅Π΄Π°Ρ‡Π° config.proxy ΠΊΠ°ΠΊ ΠΎΠ±ΡŠΠ΅ΠΊΡ‚Π° большС Π½Π΅ поддСрТиваСтся. ', 'arui-scripts ΠΏΠΎΠΏΡ€ΠΎΠ±ΡƒΠ΅Ρ‚ привСсти ΠΊΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΡŽ ΠΊ ΠΊΠΎΡ€Ρ€Π΅ΠΊΡ‚Π½ΠΎΠΌΡƒ Π²ΠΈΠ΄Ρƒ, Π½ΠΎ это Π½Π΅ всСгда ΠΌΠΎΠΆΠ΅Ρ‚ Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ ΠΊΠΎΡ€Ρ€Π΅ΠΊΡ‚Π½ΠΎ', 'ΠŸΡ€Π°Π²ΠΈΠ»ΡŒΠ½Ρ‹ΠΉ Ρ„ΠΎΡ€ΠΌΠ°Ρ‚ ΠΊΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΠΈ ΠΌΠΎΠΆΠ½ΠΎ ΠΏΠΎΡΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Π² Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚Π°Ρ†ΠΈΠΈ rspack: https://rspack.dev/guide/features/dev-server#proxy');
7
+ // eslint-disable-next-line no-param-reassign
8
+ config.proxy = convertObjectProxyConfigurationToArray(config.proxy);
9
+ }
10
+ }
11
+ function convertObjectProxyConfigurationToArray(proxyConfiguration) {
12
+ const arrayProxy = [];
13
+ Object.keys(proxyConfiguration).forEach((context) => {
14
+ const itemConfig = proxyConfiguration[context];
15
+ arrayProxy.push(Object.assign({ context }, (typeof itemConfig === 'string'
16
+ ? {
17
+ target: itemConfig,
18
+ }
19
+ : itemConfig)));
20
+ });
21
+ return arrayProxy;
22
+ }
@@ -0,0 +1,31 @@
1
+ export declare const babelClientConfig: {
2
+ presets: (string | false | (string | {
3
+ targets: string[];
4
+ loose: boolean;
5
+ useBuiltIns: string;
6
+ corejs: string;
7
+ exclude: string[];
8
+ })[])[];
9
+ plugins: (string | false | (string | {
10
+ legacy: boolean;
11
+ })[] | (string | {
12
+ loose: boolean;
13
+ })[] | (string | {
14
+ useBuiltIns: boolean;
15
+ })[] | (string | {
16
+ corejs: boolean;
17
+ helpers: boolean;
18
+ version: string;
19
+ regenerator: boolean;
20
+ })[])[];
21
+ env: {
22
+ production: {
23
+ plugins: (string | (string | {
24
+ removeImport: boolean;
25
+ })[])[];
26
+ };
27
+ test: {
28
+ plugins: string[];
29
+ };
30
+ };
31
+ };
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.babelClientConfig = void 0;
4
+ const apply_overrides_1 = require("./util/apply-overrides");
5
+ const app_configs_1 = require("./app-configs");
6
+ const supporting_browsers_1 = require("./supporting-browsers");
7
+ exports.babelClientConfig = (0, apply_overrides_1.applyOverrides)(['babel', 'babelClient'], {
8
+ presets: [
9
+ [
10
+ require.resolve('@babel/preset-env'),
11
+ {
12
+ targets: supporting_browsers_1.supportingBrowsers,
13
+ loose: true,
14
+ // Allow importing core-js in entrypoint and use browserlist to select polyfills
15
+ useBuiltIns: 'entry',
16
+ // Set the corejs version we are using to avoid warnings in console
17
+ corejs: '3.32',
18
+ // Exclude transforms that make all code slower
19
+ exclude: ['transform-typeof-symbol'],
20
+ },
21
+ ],
22
+ app_configs_1.configs.tsconfig !== null &&
23
+ app_configs_1.configs.codeLoader !== 'tsc' &&
24
+ require.resolve('@babel/preset-typescript'),
25
+ require.resolve('@babel/preset-react'),
26
+ ].filter(Boolean),
27
+ plugins: [
28
+ require.resolve('@babel/plugin-syntax-dynamic-import'),
29
+ require.resolve('@babel/plugin-transform-proto-to-assign'),
30
+ [require.resolve('@babel/plugin-proposal-decorators'), { legacy: true }],
31
+ [require.resolve('@babel/plugin-transform-class-properties'), { loose: true }],
32
+ [require.resolve('@babel/plugin-transform-private-methods'), { loose: true }],
33
+ [require.resolve('@babel/plugin-transform-private-property-in-object'), { loose: true }],
34
+ require.resolve('@babel/plugin-transform-numeric-separator'),
35
+ require.resolve('@babel/plugin-proposal-export-default-from'),
36
+ require.resolve('@babel/plugin-transform-export-namespace-from'),
37
+ [require.resolve('@babel/plugin-transform-object-rest-spread'), { useBuiltIns: true }],
38
+ [
39
+ require.resolve('@babel/plugin-transform-runtime'),
40
+ {
41
+ corejs: false,
42
+ helpers: true,
43
+ // By default, babel assumes babel/runtime version 7.0.0-beta.0,
44
+ // explicitly resolving to match the provided helper functions.
45
+ // https://github.com/babel/babel/issues/10261
46
+ version: app_configs_1.configs.babelRuntimeVersion,
47
+ regenerator: true,
48
+ },
49
+ ],
50
+ require.resolve('@babel/plugin-transform-nullish-coalescing-operator'),
51
+ require.resolve('@babel/plugin-transform-optional-chaining'),
52
+ app_configs_1.configs.collectCoverage && require.resolve('babel-plugin-istanbul'),
53
+ ].filter(Boolean),
54
+ env: {
55
+ production: {
56
+ plugins: [
57
+ require.resolve('@babel/plugin-transform-react-constant-elements'),
58
+ require.resolve('@babel/plugin-transform-react-inline-elements'),
59
+ [
60
+ require.resolve('babel-plugin-transform-react-remove-prop-types'),
61
+ { removeImport: true },
62
+ ],
63
+ ],
64
+ },
65
+ test: {
66
+ plugins: [require.resolve('@babel/plugin-transform-modules-commonjs')],
67
+ },
68
+ },
69
+ });