arui-scripts 0.0.0-next-20230725145300
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.browserslistrc +5 -0
- package/.turbo/turbo-build.log +0 -0
- package/.turbo/turbo-test.log +91 -0
- package/CHANGELOG.md +1032 -0
- package/README.md +716 -0
- package/bin/build.sh +2 -0
- package/build/bin/index.d.ts +3 -0
- package/build/bin/index.js +21 -0
- package/build/commands/archive-build/index.d.ts +1 -0
- package/build/commands/archive-build/index.js +80 -0
- package/build/commands/build/build-wrapper.d.ts +8 -0
- package/build/commands/build/build-wrapper.js +41 -0
- package/build/commands/build/client.d.ts +1 -0
- package/build/commands/build/client.js +41 -0
- package/build/commands/build/index.d.ts +1 -0
- package/build/commands/build/index.js +10 -0
- package/build/commands/build/server.d.ts +1 -0
- package/build/commands/build/server.js +29 -0
- package/build/commands/bundle-analyze/index.d.ts +1 -0
- package/build/commands/bundle-analyze/index.js +36 -0
- package/build/commands/changelog/index.d.ts +5 -0
- package/build/commands/changelog/index.js +116 -0
- package/build/commands/docker-build/index.d.ts +1 -0
- package/build/commands/docker-build/index.js +70 -0
- package/build/commands/docker-build-compiled/index.d.ts +1 -0
- package/build/commands/docker-build-compiled/index.js +52 -0
- package/build/commands/ensure-yarn/index.d.ts +0 -0
- package/build/commands/ensure-yarn/index.js +8 -0
- package/build/commands/start/client.d.ts +1 -0
- package/build/commands/start/client.js +8 -0
- package/build/commands/start/index.d.ts +1 -0
- package/build/commands/start/index.js +8 -0
- package/build/commands/start/print-compiler-output.d.ts +1 -0
- package/build/commands/start/print-compiler-output.js +15 -0
- package/build/commands/start/server.d.ts +1 -0
- package/build/commands/start/server.js +8 -0
- package/build/commands/start-prod/client.d.ts +1 -0
- package/build/commands/start-prod/client.js +8 -0
- package/build/commands/start-prod/index.d.ts +1 -0
- package/build/commands/start-prod/index.js +8 -0
- package/build/commands/start-prod/server.d.ts +1 -0
- package/build/commands/start-prod/server.js +8 -0
- package/build/commands/test/index.d.ts +3 -0
- package/build/commands/test/index.js +17 -0
- package/build/commands/util/check-required-files.d.ts +2 -0
- package/build/commands/util/check-required-files.js +67 -0
- package/build/commands/util/client-assets-sizes.d.ts +26 -0
- package/build/commands/util/client-assets-sizes.js +88 -0
- package/build/commands/util/docker-build.d.ts +21 -0
- package/build/commands/util/docker-build.js +89 -0
- package/build/commands/util/exec.d.ts +2 -0
- package/build/commands/util/exec.js +18 -0
- package/build/commands/util/format-webpack-messages.d.ts +11 -0
- package/build/commands/util/format-webpack-messages.js +93 -0
- package/build/commands/util/make-tmp-dir.d.ts +6 -0
- package/build/commands/util/make-tmp-dir.js +29 -0
- package/build/commands/util/run-client-dev-server.d.ts +2 -0
- package/build/commands/util/run-client-dev-server.js +47 -0
- package/build/commands/util/run-compilers.d.ts +1 -0
- package/build/commands/util/run-compilers.js +31 -0
- package/build/commands/util/run-server-watch-compiler.d.ts +2 -0
- package/build/commands/util/run-server-watch-compiler.js +21 -0
- package/build/commands/util/yarn.d.ts +5 -0
- package/build/commands/util/yarn.js +53 -0
- package/build/configs/app-configs/calculate-dependent-config.d.ts +76 -0
- package/build/configs/app-configs/calculate-dependent-config.js +37 -0
- package/build/configs/app-configs/get-defaults.d.ts +3 -0
- package/build/configs/app-configs/get-defaults.js +127 -0
- package/build/configs/app-configs/index.d.ts +6 -0
- package/build/configs/app-configs/index.js +22 -0
- package/build/configs/app-configs/types.d.ts +108 -0
- package/build/configs/app-configs/types.js +2 -0
- package/build/configs/app-configs/update-with-config-file.d.ts +2 -0
- package/build/configs/app-configs/update-with-config-file.js +23 -0
- package/build/configs/app-configs/update-with-env.d.ts +2 -0
- package/build/configs/app-configs/update-with-env.js +20 -0
- package/build/configs/app-configs/update-with-package.d.ts +2 -0
- package/build/configs/app-configs/update-with-package.js +10 -0
- package/build/configs/app-configs/update-with-presets.d.ts +2 -0
- package/build/configs/app-configs/update-with-presets.js +26 -0
- package/build/configs/app-configs/validate-settings-keys.d.ts +4 -0
- package/build/configs/app-configs/validate-settings-keys.js +14 -0
- package/build/configs/babel-client.d.ts +34 -0
- package/build/configs/babel-client.js +65 -0
- package/build/configs/babel-dependencies.d.ts +14 -0
- package/build/configs/babel-dependencies.js +39 -0
- package/build/configs/babel-server.d.ts +27 -0
- package/build/configs/babel-server.js +47 -0
- package/build/configs/config-extras/minimizers/imagemin/imagemin.d.ts +2 -0
- package/build/configs/config-extras/minimizers/imagemin/imagemin.js +42 -0
- package/build/configs/config-extras/minimizers/imagemin/index.d.ts +1 -0
- package/build/configs/config-extras/minimizers/imagemin/index.js +17 -0
- package/build/configs/config-extras/minimizers/index.d.ts +1 -0
- package/build/configs/config-extras/minimizers/index.js +17 -0
- package/build/configs/dev-server.d.ts +2 -0
- package/build/configs/dev-server.js +48 -0
- package/build/configs/jest/babel-transform.d.ts +2 -0
- package/build/configs/jest/babel-transform.js +4 -0
- package/build/configs/jest/css-mock.d.ts +1 -0
- package/build/configs/jest/css-mock.js +2 -0
- package/build/configs/jest/file-transform.d.ts +3 -0
- package/build/configs/jest/file-transform.js +9 -0
- package/build/configs/jest/index.d.ts +50 -0
- package/build/configs/jest/index.js +47 -0
- package/build/configs/modules.d.ts +16 -0
- package/build/configs/modules.js +101 -0
- package/build/configs/mq.css +22 -0
- package/build/configs/postcss.config.d.ts +25 -0
- package/build/configs/postcss.config.js +62 -0
- package/build/configs/postcss.d.ts +2 -0
- package/build/configs/postcss.js +9 -0
- package/build/configs/process-assets-plugin-output.d.ts +2 -0
- package/build/configs/process-assets-plugin-output.js +46 -0
- package/build/configs/server-externals-exemptions.d.ts +1 -0
- package/build/configs/server-externals-exemptions.js +21 -0
- package/build/configs/stats-options.d.ts +3 -0
- package/build/configs/stats-options.js +49 -0
- package/build/configs/supporting-browsers.d.ts +2 -0
- package/build/configs/supporting-browsers.js +13 -0
- package/build/configs/util/apply-overrides.d.ts +56 -0
- package/build/configs/util/apply-overrides.js +47 -0
- package/build/configs/util/check-node-version.d.ts +2 -0
- package/build/configs/util/check-node-version.js +7 -0
- package/build/configs/util/find-loader.d.ts +2 -0
- package/build/configs/util/find-loader.js +23 -0
- package/build/configs/util/get-entry.d.ts +9 -0
- package/build/configs/util/get-entry.js +22 -0
- package/build/configs/util/get-polyfills.d.ts +3 -0
- package/build/configs/util/get-polyfills.js +27 -0
- package/build/configs/util/install-sourcemap-support.d.ts +1 -0
- package/build/configs/util/install-sourcemap-support.js +7 -0
- package/build/configs/util/node-assets-ignore.d.ts +0 -0
- package/build/configs/util/node-assets-ignore.js +31 -0
- package/build/configs/util/noop.d.ts +1 -0
- package/build/configs/util/noop.js +2 -0
- package/build/configs/util/register-ts-node.d.ts +0 -0
- package/build/configs/util/register-ts-node.js +17 -0
- package/build/configs/util/resolve.d.ts +12 -0
- package/build/configs/util/resolve.js +30 -0
- package/build/configs/webpack.client.d.ts +10 -0
- package/build/configs/webpack.client.dev.d.ts +2 -0
- package/build/configs/webpack.client.dev.js +9 -0
- package/build/configs/webpack.client.js +402 -0
- package/build/configs/webpack.client.prod.d.ts +2 -0
- package/build/configs/webpack.client.prod.js +9 -0
- package/build/configs/webpack.server.d.ts +2 -0
- package/build/configs/webpack.server.dev.d.ts +2 -0
- package/build/configs/webpack.server.dev.js +9 -0
- package/build/configs/webpack.server.js +229 -0
- package/build/configs/webpack.server.prod.d.ts +2 -0
- package/build/configs/webpack.server.prod.js +9 -0
- package/build/index.d.ts +5 -0
- package/build/index.js +9 -0
- package/build/plugins/reload-server-webpack-plugin.d.ts +9 -0
- package/build/plugins/reload-server-webpack-plugin.js +42 -0
- package/build/templates/dockerfile-compiled.template.d.ts +2 -0
- package/build/templates/dockerfile-compiled.template.js +47 -0
- package/build/templates/dockerfile.template.d.ts +2 -0
- package/build/templates/dockerfile.template.js +32 -0
- package/build/templates/nginx.conf.template.d.ts +2 -0
- package/build/templates/nginx.conf.template.js +34 -0
- package/build/templates/start.template.d.ts +2 -0
- package/build/templates/start.template.js +37 -0
- package/build/tsconfig-local.tsbuildinfo +1 -0
- package/docs/modules.md +572 -0
- package/jest-preset.js +22 -0
- package/package.json +172 -0
- package/release.config.js +21 -0
- package/tsconfig-local.json +16 -0
- package/tsconfig.json +71 -0
package/bin/build.sh
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#! /usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/* eslint import/no-dynamic-require: 0 */
|
|
4
|
+
const commands = {
|
|
5
|
+
start: () => require('../commands/start'),
|
|
6
|
+
'start:prod': () => require('../commands/start-prod'),
|
|
7
|
+
build: () => require('../commands/build'),
|
|
8
|
+
'docker-build': () => require('../commands/docker-build'),
|
|
9
|
+
'docker-build:compiled': () => require('../commands/docker-build-compiled'),
|
|
10
|
+
test: () => require('../commands/test'),
|
|
11
|
+
'ensure-yarn': () => require('../commands/ensure-yarn'),
|
|
12
|
+
'archive-build': () => require('../commands/archive-build'),
|
|
13
|
+
'bundle-analyze': () => require('../commands/bundle-analyze'),
|
|
14
|
+
changelog: () => require('../commands/changelog'),
|
|
15
|
+
};
|
|
16
|
+
const command = process.argv[2];
|
|
17
|
+
if (!command || !commands[command]) {
|
|
18
|
+
console.error(`Please specify one of available commands: ${Object.keys(commands).map(c => `"${c}"`).join(' ')}`);
|
|
19
|
+
process.exit(-1);
|
|
20
|
+
}
|
|
21
|
+
commands[command]();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const tar_1 = __importDefault(require("tar"));
|
|
16
|
+
const path_1 = __importDefault(require("path"));
|
|
17
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
18
|
+
const app_configs_1 = __importDefault(require("../../configs/app-configs"));
|
|
19
|
+
const exec_1 = __importDefault(require("../util/exec"));
|
|
20
|
+
const nginx_conf_template_1 = __importDefault(require("../../templates/nginx.conf.template"));
|
|
21
|
+
const start_template_1 = __importDefault(require("../../templates/start.template"));
|
|
22
|
+
const yarn_1 = require("../util/yarn");
|
|
23
|
+
const tempDirName = '.archive-build';
|
|
24
|
+
const nginxConfFileName = 'nginx.conf';
|
|
25
|
+
const startScriptFileName = 'start.sh';
|
|
26
|
+
const nodeModulesDirName = 'node_modules';
|
|
27
|
+
const packageJsonFileName = 'package.json';
|
|
28
|
+
const pathToTempDir = path_1.default.join(app_configs_1.default.cwd, tempDirName);
|
|
29
|
+
const nginxConfPath = path_1.default.join(pathToTempDir, nginxConfFileName);
|
|
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);
|
|
33
|
+
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
|
+
try {
|
|
35
|
+
console.time('Total time');
|
|
36
|
+
console.time('Setting up time');
|
|
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;
|
|
41
|
+
yield Promise.all([
|
|
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),
|
|
45
|
+
]);
|
|
46
|
+
console.timeEnd('Setting up time');
|
|
47
|
+
console.time('Build application time');
|
|
48
|
+
// run build script
|
|
49
|
+
yield (0, exec_1.default)('npm run build');
|
|
50
|
+
console.timeEnd('Build application time');
|
|
51
|
+
console.time('Remove build dependencies time');
|
|
52
|
+
const pruneCommand = (0, yarn_1.getPruningCommand)();
|
|
53
|
+
yield (0, exec_1.default)(pruneCommand);
|
|
54
|
+
console.timeEnd('Remove build dependencies time');
|
|
55
|
+
console.time('Archive build time');
|
|
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)),
|
|
58
|
+
fs_extra_1.default.copy(nodeModulesPath, path_1.default.join(pathToTempDir, nodeModulesDirName)),
|
|
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))))
|
|
61
|
+
]);
|
|
62
|
+
yield tar_1.default.c({
|
|
63
|
+
file: app_configs_1.default.archiveName,
|
|
64
|
+
cwd: pathToTempDir
|
|
65
|
+
}, fs_extra_1.default.readdirSync(pathToTempDir));
|
|
66
|
+
console.timeEnd('Archive build time');
|
|
67
|
+
console.time('Cleanup time');
|
|
68
|
+
// remove temp directory
|
|
69
|
+
yield fs_extra_1.default.remove(pathToTempDir);
|
|
70
|
+
console.timeEnd('Cleanup time');
|
|
71
|
+
console.timeEnd('Total time');
|
|
72
|
+
}
|
|
73
|
+
catch (err) {
|
|
74
|
+
console.error('Error during archive-build.');
|
|
75
|
+
if (app_configs_1.default.debug) {
|
|
76
|
+
console.error(err);
|
|
77
|
+
}
|
|
78
|
+
process.exit(1);
|
|
79
|
+
}
|
|
80
|
+
}))();
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import webpack from 'webpack';
|
|
2
|
+
type BuildResult = {
|
|
3
|
+
stats: webpack.Stats | webpack.MultiStats;
|
|
4
|
+
warnings: string[];
|
|
5
|
+
previousFileSizes: unknown;
|
|
6
|
+
};
|
|
7
|
+
declare function build(config: webpack.Configuration | webpack.Configuration[], previousFileSizes?: unknown): Promise<BuildResult>;
|
|
8
|
+
export default build;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint import/no-extraneous-dependencies: 0 */
|
|
3
|
+
/* eslint no-console: 0 */
|
|
4
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
6
|
+
};
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
+
const webpack_1 = __importDefault(require("webpack"));
|
|
10
|
+
const format_webpack_messages_1 = __importDefault(require("../util/format-webpack-messages"));
|
|
11
|
+
function build(config, previousFileSizes) {
|
|
12
|
+
let compiler = (0, webpack_1.default)(config);
|
|
13
|
+
return new Promise((resolve, reject) => {
|
|
14
|
+
compiler.run((err, stats) => {
|
|
15
|
+
if (err) {
|
|
16
|
+
return reject(err);
|
|
17
|
+
}
|
|
18
|
+
const messages = (0, format_webpack_messages_1.default)(stats === null || stats === void 0 ? void 0 : stats.toJson({}));
|
|
19
|
+
if (messages.errors.length) {
|
|
20
|
+
// Only keep the first error. Others are often indicative
|
|
21
|
+
// of the same problem, but confuse the reader with noise.
|
|
22
|
+
if (messages.errors.length > 1) {
|
|
23
|
+
messages.errors.length = 1;
|
|
24
|
+
}
|
|
25
|
+
return reject(new Error(messages.errors.join('\n\n')));
|
|
26
|
+
}
|
|
27
|
+
if (process.env.CI && (process.env.CI.toLowerCase() !== 'false') &&
|
|
28
|
+
messages.warnings.length) {
|
|
29
|
+
console.log(chalk_1.default.yellow('\nTreating warnings as errors because process.env.CI = true.\n' +
|
|
30
|
+
'Most CI servers set it automatically.\n'));
|
|
31
|
+
return reject(new Error(messages.warnings.join('\n\n')));
|
|
32
|
+
}
|
|
33
|
+
return resolve({
|
|
34
|
+
stats,
|
|
35
|
+
warnings: messages.warnings,
|
|
36
|
+
previousFileSizes
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
exports.default = build;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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
|
+
/* eslint import/no-extraneous-dependencies: 0 */
|
|
7
|
+
/* eslint no-console: 0 */
|
|
8
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
+
const printBuildError_1 = __importDefault(require("react-dev-utils/printBuildError"));
|
|
10
|
+
const build_wrapper_1 = __importDefault(require("./build-wrapper"));
|
|
11
|
+
const client_assets_sizes_1 = require("../util/client-assets-sizes");
|
|
12
|
+
const webpack_client_prod_1 = __importDefault(require("../../configs/webpack.client.prod"));
|
|
13
|
+
console.log(chalk_1.default.magenta('Building client...'));
|
|
14
|
+
(0, build_wrapper_1.default)(webpack_client_prod_1.default)
|
|
15
|
+
.then(({ stats, warnings }) => {
|
|
16
|
+
if (warnings.length) {
|
|
17
|
+
console.log(chalk_1.default.yellow('Client compiled with warnings.\n'));
|
|
18
|
+
console.log(warnings.join('\n\n'));
|
|
19
|
+
console.log(`Search for the ${chalk_1.default.underline(chalk_1.default.yellow('keywords'))} to learn more about each warning.`);
|
|
20
|
+
console.log(`To ignore, add ${chalk_1.default.cyan('// eslint-disable-next-line')} to the line before.`);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
console.log(chalk_1.default.green('Client compiled successfully.\n'));
|
|
24
|
+
}
|
|
25
|
+
function printOutputSizes(webpackConfig, stats) {
|
|
26
|
+
var _a;
|
|
27
|
+
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
|
+
(0, client_assets_sizes_1.printAssetsSizes)(sizes);
|
|
29
|
+
}
|
|
30
|
+
if (Array.isArray(webpack_client_prod_1.default)) {
|
|
31
|
+
webpack_client_prod_1.default.forEach((conf, index) => printOutputSizes(conf, stats.stats[index]));
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
printOutputSizes(webpack_client_prod_1.default, stats);
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
.catch((err) => {
|
|
38
|
+
console.log(chalk_1.default.red('Failed to compile client.\n'));
|
|
39
|
+
(0, printBuildError_1.default)(err);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const run_compilers_1 = require("../util/run-compilers");
|
|
4
|
+
process.env.BABEL_ENV = 'production';
|
|
5
|
+
process.env.NODE_ENV = 'production';
|
|
6
|
+
process.env.BROWSERSLIST_CONFIG = process.env.BROWSERSLIST_CONFIG || require.resolve('../../../.browserslistrc');
|
|
7
|
+
(0, run_compilers_1.runCompilers)([
|
|
8
|
+
require.resolve('./client'),
|
|
9
|
+
require.resolve('./server'),
|
|
10
|
+
]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
/* eslint import/no-extraneous-dependencies: 0 */
|
|
7
|
+
/* eslint no-console: 0 */
|
|
8
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
+
const printBuildError_1 = __importDefault(require("react-dev-utils/printBuildError"));
|
|
10
|
+
const build_wrapper_1 = __importDefault(require("./build-wrapper"));
|
|
11
|
+
const webpack_server_prod_1 = __importDefault(require("../../configs/webpack.server.prod"));
|
|
12
|
+
console.log(chalk_1.default.magenta('Building server...'));
|
|
13
|
+
(0, build_wrapper_1.default)(webpack_server_prod_1.default)
|
|
14
|
+
.then(({ warnings }) => {
|
|
15
|
+
if (warnings.length) {
|
|
16
|
+
console.log(chalk_1.default.yellow('Server compiled with warnings.\n'));
|
|
17
|
+
console.log(warnings.join('\n\n'));
|
|
18
|
+
console.log(`Search for the ${chalk_1.default.underline(chalk_1.default.yellow('keywords'))} to learn more about each warning.`);
|
|
19
|
+
console.log(`To ignore, add ${chalk_1.default.cyan('// eslint-disable-next-line')} to the line before.`);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
console.log(chalk_1.default.green('Server compiled successfully.\n'));
|
|
23
|
+
}
|
|
24
|
+
})
|
|
25
|
+
.catch((err) => {
|
|
26
|
+
console.log(chalk_1.default.red('Failed to compile server.\n'));
|
|
27
|
+
(0, printBuildError_1.default)(err);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const webpack_1 = __importDefault(require("webpack"));
|
|
16
|
+
const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer");
|
|
17
|
+
const make_tmp_dir_1 = __importDefault(require("../util/make-tmp-dir"));
|
|
18
|
+
const webpack_client_prod_1 = __importDefault(require("../../configs/webpack.client.prod"));
|
|
19
|
+
const app_configs_1 = __importDefault(require("../../configs/app-configs"));
|
|
20
|
+
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
+
let clientWebpackConfigs = Array.isArray(webpack_client_prod_1.default) ? webpack_client_prod_1.default : [webpack_client_prod_1.default];
|
|
22
|
+
const promises = clientWebpackConfigs.map((webpackConfig, i) => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
|
+
const tmpDir = yield (0, make_tmp_dir_1.default)(i.toString());
|
|
24
|
+
webpackConfig.plugins = [
|
|
25
|
+
...(webpackConfig.plugins || []),
|
|
26
|
+
new webpack_bundle_analyzer_1.BundleAnalyzerPlugin({
|
|
27
|
+
generateStatsFile: true,
|
|
28
|
+
statsFilename: app_configs_1.default.statsOutputPath,
|
|
29
|
+
analyzerPort: 'auto',
|
|
30
|
+
}),
|
|
31
|
+
];
|
|
32
|
+
webpackConfig.output = Object.assign(Object.assign({}, webpackConfig.output), { path: tmpDir });
|
|
33
|
+
}));
|
|
34
|
+
yield Promise.all(promises);
|
|
35
|
+
(0, webpack_1.default)(clientWebpackConfigs).run(() => { });
|
|
36
|
+
}))();
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Формирует описание версии в `CHANGELOG.md` на основе данных введенных в Jenkins при старте пайплайна.
|
|
4
|
+
* `standard-version` запускает этот скрипт как `postchangelog` хук.
|
|
5
|
+
*/
|
|
6
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
7
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
8
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
9
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
10
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
11
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
12
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
16
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
17
|
+
var m = o[Symbol.asyncIterator], i;
|
|
18
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
19
|
+
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); }); }; }
|
|
20
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
21
|
+
};
|
|
22
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
const child_process_1 = require("child_process");
|
|
27
|
+
const fs_1 = require("fs");
|
|
28
|
+
const readline_1 = __importDefault(require("readline"));
|
|
29
|
+
const app_configs_1 = __importDefault(require("../../configs/app-configs"));
|
|
30
|
+
const { readFile, rename, unlink } = fs_1.promises;
|
|
31
|
+
/**
|
|
32
|
+
* Сюда пайплайн Jenkins складывает соответствующие части описания версии. Не получается использовать
|
|
33
|
+
* переменные окружения, т.к. `standard-version` запускает хуки через `child_process.exec`, не передавая туда
|
|
34
|
+
* ни аргументы ни переменные окружения.
|
|
35
|
+
*/
|
|
36
|
+
const { appNodeModulesBin, changelogPath, changelogTmpPath, changelogFeaturesPath, changelogBugfixesPath, changelogBreakingChangesPath } = app_configs_1.default;
|
|
37
|
+
// Пример заголовка – `## [50.1.0](http://git.moscow.alfaintra.net/...) (2022-07-27)`.
|
|
38
|
+
const changelogHeaderRegExp = /^###? \[\d+\.\d+\.\d+]\([^)]+\) \(\d{4}-\d{2}-\d{2}\)/;
|
|
39
|
+
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
40
|
+
var _a, e_1, _b, _c;
|
|
41
|
+
const rl = readline_1.default.createInterface({
|
|
42
|
+
input: (0, fs_1.createReadStream)(changelogPath),
|
|
43
|
+
});
|
|
44
|
+
const ws = (0, fs_1.createWriteStream)(changelogTmpPath);
|
|
45
|
+
let modifyingStatus = 'PENDING';
|
|
46
|
+
const addVersionDescription = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
47
|
+
const [features, bugFixes, breakingChanges] = yield Promise.all([
|
|
48
|
+
readFile(changelogFeaturesPath, 'utf-8'),
|
|
49
|
+
readFile(changelogBugfixesPath, 'utf-8'),
|
|
50
|
+
readFile(changelogBreakingChangesPath, 'utf-8'),
|
|
51
|
+
]).then((files) => files.map((content) => content.trim()));
|
|
52
|
+
ws.write(getVersionDescription({ features, bugFixes, breakingChanges }));
|
|
53
|
+
});
|
|
54
|
+
try {
|
|
55
|
+
for (var _d = true, rl_1 = __asyncValues(rl), rl_1_1; rl_1_1 = yield rl_1.next(), _a = rl_1_1.done, !_a;) {
|
|
56
|
+
_c = rl_1_1.value;
|
|
57
|
+
_d = false;
|
|
58
|
+
try {
|
|
59
|
+
const line = _c;
|
|
60
|
+
switch (modifyingStatus) {
|
|
61
|
+
// Копируем всё как есть до первого заголовка.
|
|
62
|
+
case 'PENDING':
|
|
63
|
+
if (changelogHeaderRegExp.test(line)) {
|
|
64
|
+
modifyingStatus = 'MODIFYING';
|
|
65
|
+
}
|
|
66
|
+
ws.write(`${line}\n`);
|
|
67
|
+
break;
|
|
68
|
+
// Игнорируем описание версии, сгенерированное пакетом `standard-version`, пишем своё
|
|
69
|
+
// до второго заголовка. См. описание задачи http://jira.moscow.alfaintra.net/browse/NEWCLICKUI-1048
|
|
70
|
+
case 'MODIFYING':
|
|
71
|
+
if (changelogHeaderRegExp.test(line)) {
|
|
72
|
+
modifyingStatus = 'MODIFIED';
|
|
73
|
+
yield addVersionDescription();
|
|
74
|
+
ws.write(`${line}\n`);
|
|
75
|
+
}
|
|
76
|
+
break;
|
|
77
|
+
// Дальше просто копируем всё как есть.
|
|
78
|
+
case 'MODIFIED':
|
|
79
|
+
ws.write(`${line}\n`);
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
finally {
|
|
84
|
+
_d = true;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
89
|
+
finally {
|
|
90
|
+
try {
|
|
91
|
+
if (!_d && !_a && (_b = rl_1.return)) yield _b.call(rl_1);
|
|
92
|
+
}
|
|
93
|
+
finally { if (e_1) throw e_1.error; }
|
|
94
|
+
}
|
|
95
|
+
if (modifyingStatus !== 'MODIFIED') {
|
|
96
|
+
yield addVersionDescription();
|
|
97
|
+
}
|
|
98
|
+
ws.close();
|
|
99
|
+
yield unlink(changelogPath);
|
|
100
|
+
yield rename(changelogTmpPath, changelogPath);
|
|
101
|
+
(0, child_process_1.execSync)(`${appNodeModulesBin}/prettier -w "${changelogPath}"`);
|
|
102
|
+
process.exit(0);
|
|
103
|
+
}))();
|
|
104
|
+
function getVersionDescription({ features, bugFixes, breakingChanges }) {
|
|
105
|
+
let versionDescription = '';
|
|
106
|
+
if (features) {
|
|
107
|
+
versionDescription += `### Features\n${features}\n`;
|
|
108
|
+
}
|
|
109
|
+
if (bugFixes) {
|
|
110
|
+
versionDescription += `### Bug Fixes\n${bugFixes}\n`;
|
|
111
|
+
}
|
|
112
|
+
if (breakingChanges) {
|
|
113
|
+
versionDescription += `### ⚠ BREAKING CHANGES\n${breakingChanges}\n`;
|
|
114
|
+
}
|
|
115
|
+
return versionDescription;
|
|
116
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
16
|
+
const app_configs_1 = __importDefault(require("../../configs/app-configs"));
|
|
17
|
+
const dockerfile_template_1 = __importDefault(require("../../templates/dockerfile.template"));
|
|
18
|
+
const nginx_conf_template_1 = __importDefault(require("../../templates/nginx.conf.template"));
|
|
19
|
+
const start_template_1 = __importDefault(require("../../templates/start.template"));
|
|
20
|
+
const exec_1 = __importDefault(require("../util/exec"));
|
|
21
|
+
const docker_build_1 = require("../util/docker-build");
|
|
22
|
+
const yarn_1 = require("../util/yarn");
|
|
23
|
+
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
24
|
+
const { imageFullName, pathToTempDir, tempDirName } = (0, docker_build_1.getBuildParamsFromArgs)();
|
|
25
|
+
try {
|
|
26
|
+
console.log(`Build docker image ${imageFullName}`);
|
|
27
|
+
console.time('Total time');
|
|
28
|
+
console.time('Setting up time');
|
|
29
|
+
yield (0, docker_build_1.prepareFilesForDocker)({
|
|
30
|
+
pathToTempDir,
|
|
31
|
+
dockerfileTemplate: dockerfile_template_1.default,
|
|
32
|
+
nginxConfTemplate: nginx_conf_template_1.default,
|
|
33
|
+
startScriptTemplate: start_template_1.default,
|
|
34
|
+
allowLocalDockerfile: true,
|
|
35
|
+
allowLocalStartScript: true,
|
|
36
|
+
});
|
|
37
|
+
yield fs_extra_1.default.remove(app_configs_1.default.buildPath);
|
|
38
|
+
console.timeEnd('Setting up time');
|
|
39
|
+
console.time('Build application time');
|
|
40
|
+
// run build script
|
|
41
|
+
yield (0, exec_1.default)('npm run build');
|
|
42
|
+
console.timeEnd('Build application time');
|
|
43
|
+
if (app_configs_1.default.removeDevDependenciesDuringDockerBuild) {
|
|
44
|
+
console.time('Remove dev dependencies time');
|
|
45
|
+
const pruneCommand = (0, yarn_1.getPruningCommand)();
|
|
46
|
+
yield (0, exec_1.default)(pruneCommand);
|
|
47
|
+
console.timeEnd('Remove dev dependencies time');
|
|
48
|
+
}
|
|
49
|
+
console.time('Build docker image time');
|
|
50
|
+
yield (0, exec_1.default)((0, docker_build_1.getDockerBuildCommand)({ tempDirName, imageFullName }));
|
|
51
|
+
console.timeEnd('Build docker image time');
|
|
52
|
+
console.time('Cleanup time');
|
|
53
|
+
// remove temp directory
|
|
54
|
+
yield fs_extra_1.default.remove(pathToTempDir);
|
|
55
|
+
// guard against pushing the image during tests
|
|
56
|
+
if (!app_configs_1.default.debug) {
|
|
57
|
+
yield (0, exec_1.default)(`docker push ${imageFullName}`);
|
|
58
|
+
}
|
|
59
|
+
console.timeEnd('Cleanup time');
|
|
60
|
+
console.timeEnd('Total time');
|
|
61
|
+
}
|
|
62
|
+
catch (err) {
|
|
63
|
+
yield fs_extra_1.default.remove(pathToTempDir);
|
|
64
|
+
console.error('Error during docker-build.');
|
|
65
|
+
if (app_configs_1.default.debug) {
|
|
66
|
+
console.error(err);
|
|
67
|
+
}
|
|
68
|
+
process.exit(1);
|
|
69
|
+
}
|
|
70
|
+
}))();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
16
|
+
const app_configs_1 = __importDefault(require("../../configs/app-configs"));
|
|
17
|
+
const dockerfile_compiled_template_1 = __importDefault(require("../../templates/dockerfile-compiled.template"));
|
|
18
|
+
const nginx_conf_template_1 = __importDefault(require("../../templates/nginx.conf.template"));
|
|
19
|
+
const start_template_1 = __importDefault(require("../../templates/start.template"));
|
|
20
|
+
const exec_1 = __importDefault(require("../util/exec"));
|
|
21
|
+
const docker_build_1 = require("../util/docker-build");
|
|
22
|
+
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
|
+
const { imageFullName, pathToTempDir, tempDirName } = (0, docker_build_1.getBuildParamsFromArgs)();
|
|
24
|
+
try {
|
|
25
|
+
console.log(`Build docker image ${imageFullName}`);
|
|
26
|
+
console.time('Total time');
|
|
27
|
+
yield (0, docker_build_1.prepareFilesForDocker)({
|
|
28
|
+
pathToTempDir,
|
|
29
|
+
dockerfileTemplate: dockerfile_compiled_template_1.default,
|
|
30
|
+
nginxConfTemplate: nginx_conf_template_1.default,
|
|
31
|
+
startScriptTemplate: start_template_1.default,
|
|
32
|
+
allowLocalDockerfile: false,
|
|
33
|
+
allowLocalStartScript: false,
|
|
34
|
+
});
|
|
35
|
+
yield (0, exec_1.default)('echo "node_modules" >> .dockerignore');
|
|
36
|
+
yield (0, exec_1.default)((0, docker_build_1.getDockerBuildCommand)({ tempDirName, imageFullName }));
|
|
37
|
+
yield fs_extra_1.default.remove(pathToTempDir);
|
|
38
|
+
// guard against pushing the image during tests
|
|
39
|
+
if (!app_configs_1.default.debug) {
|
|
40
|
+
yield (0, exec_1.default)(`docker push ${imageFullName}`);
|
|
41
|
+
}
|
|
42
|
+
console.timeEnd('Total time');
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
yield fs_extra_1.default.remove(pathToTempDir);
|
|
46
|
+
console.error('Error during docker-build.');
|
|
47
|
+
if (app_configs_1.default.debug) {
|
|
48
|
+
console.error(err);
|
|
49
|
+
}
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
}))();
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint no-console: 0 */
|
|
3
|
+
if (process.env.npm_config_user_agent && process.env.npm_config_user_agent.indexOf('yarn') === -1) {
|
|
4
|
+
console.log(process.env);
|
|
5
|
+
console.error('You must use yarn to install dependencies, now using', process.env.npm_execpath);
|
|
6
|
+
console.log('Recommended version is yarn@0.27.5');
|
|
7
|
+
process.exit(1);
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
const webpack_client_dev_1 = __importDefault(require("../../configs/webpack.client.dev"));
|
|
7
|
+
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);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const run_compilers_1 = require("../util/run-compilers");
|
|
4
|
+
process.env.BROWSERSLIST_CONFIG = process.env.BROWSERSLIST_CONFIG || require.resolve('../../../.browserslistrc');
|
|
5
|
+
(0, run_compilers_1.runCompilers)([
|
|
6
|
+
require.resolve('./client'),
|
|
7
|
+
require.resolve('./server'),
|
|
8
|
+
]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function printCompilerOutput(compilerName: string, stats: any): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
7
|
+
const stats_options_1 = __importDefault(require("../../configs/stats-options"));
|
|
8
|
+
function printCompilerOutput(compilerName, stats) {
|
|
9
|
+
const output = stats.toString(stats_options_1.default)
|
|
10
|
+
.split('\n')
|
|
11
|
+
.map((line) => `${chalk_1.default.cyan(`[${compilerName}]`)} ${line}`)
|
|
12
|
+
.join('\n');
|
|
13
|
+
console.log(output);
|
|
14
|
+
}
|
|
15
|
+
exports.default = printCompilerOutput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
const webpack_server_dev_1 = __importDefault(require("../../configs/webpack.server.dev"));
|
|
7
|
+
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);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
const webpack_client_prod_1 = __importDefault(require("../../configs/webpack.client.prod"));
|
|
7
|
+
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);
|