arui-scripts 18.4.0 → 18.6.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.
- package/.turbo/turbo-lint.log +16 -9
- package/.turbo/turbo-test.log +10 -7
- package/CHANGELOG.md +49 -0
- package/build/commands/docker-build/index.js +2 -0
- package/build/commands/docker-build-compiled/index.js +2 -0
- package/build/commands/util/docker-build.d.ts +2 -1
- package/build/commands/util/docker-build.js +20 -5
- package/build/configs/app-configs/get-defaults.d.ts +2 -0
- package/build/configs/app-configs/get-defaults.js +7 -1
- package/build/configs/app-configs/types.d.ts +8 -0
- package/build/configs/postcss.config.d.ts +12 -4
- package/build/configs/postcss.config.js +13 -6
- package/build/configs/postcss.d.ts +1 -1
- package/build/configs/postcss.js +3 -1
- package/build/configs/util/apply-overrides.d.ts +1 -0
- package/build/plugins/postcss-global-variables/postcss-global-variables.d.ts +6 -0
- package/build/plugins/postcss-global-variables/postcss-global-variables.js +38 -0
- package/build/plugins/postcss-global-variables/utils/utils.d.ts +7 -0
- package/build/plugins/postcss-global-variables/utils/utils.js +77 -0
- package/build/templates/base-nginx.conf.template.d.ts +2 -0
- package/build/templates/base-nginx.conf.template.js +61 -0
- package/build/templates/dockerfile-compiled.template.js +3 -0
- package/build/templates/dockerfile.template.js +3 -0
- package/build/tsconfig-local.tsbuildinfo +1 -1
- package/docs/overrides.md +3 -0
- package/docs/settings.md +16 -0
- package/package.json +1 -2
|
@@ -0,0 +1,61 @@
|
|
|
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 app_configs_1 = require("../configs/app-configs");
|
|
7
|
+
const apply_overrides_1 = __importDefault(require("../configs/util/apply-overrides"));
|
|
8
|
+
const baseNginxConfig = {
|
|
9
|
+
workerProcesses: 2,
|
|
10
|
+
workerRlimitNoFile: 20000,
|
|
11
|
+
workerConnections: 19000,
|
|
12
|
+
eventsUse: 'epoll',
|
|
13
|
+
daemon: 'off',
|
|
14
|
+
};
|
|
15
|
+
const nginx = Object.assign(Object.assign({}, baseNginxConfig), app_configs_1.configs.nginx);
|
|
16
|
+
const baseNginxTemplate = `
|
|
17
|
+
worker_processes ${nginx.workerProcesses};
|
|
18
|
+
worker_rlimit_nofile ${nginx.workerRlimitNoFile};
|
|
19
|
+
daemon ${nginx.daemon};
|
|
20
|
+
|
|
21
|
+
error_log /var/log/nginx/error.log;
|
|
22
|
+
pid /var/run/nginx.pid;
|
|
23
|
+
|
|
24
|
+
events {
|
|
25
|
+
worker_connections ${nginx.workerConnections};
|
|
26
|
+
use ${nginx.eventsUse};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
http {
|
|
30
|
+
include /etc/nginx/mime.types;
|
|
31
|
+
default_type application/octet-stream;
|
|
32
|
+
|
|
33
|
+
server_tokens off;
|
|
34
|
+
access_log off;
|
|
35
|
+
keepalive_timeout 65;
|
|
36
|
+
proxy_read_timeout 200;
|
|
37
|
+
sendfile on;
|
|
38
|
+
tcp_nopush on;
|
|
39
|
+
tcp_nodelay on;
|
|
40
|
+
|
|
41
|
+
gzip_static on;
|
|
42
|
+
brotli on;
|
|
43
|
+
brotli_static on;
|
|
44
|
+
brotli_types application/atom+xml application/javascript application/json application/rss+xml
|
|
45
|
+
application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype
|
|
46
|
+
application/x-font-ttf application/x-javascript application/xhtml+xml application/xml
|
|
47
|
+
font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon
|
|
48
|
+
image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml application/wasm;
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
# Only retry if there was a communication error, not a timeout
|
|
52
|
+
# on the Node server (to avoid propagating "queries of death"
|
|
53
|
+
# to all frontends)
|
|
54
|
+
proxy_next_upstream error;
|
|
55
|
+
|
|
56
|
+
#cache
|
|
57
|
+
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=all:32m max_size=1g;
|
|
58
|
+
|
|
59
|
+
include /etc/nginx/conf.d/*.conf;
|
|
60
|
+
}`;
|
|
61
|
+
exports.default = (0, apply_overrides_1.default)('nginxConf', baseNginxTemplate);
|
|
@@ -8,6 +8,7 @@ const app_configs_1 = __importDefault(require("../configs/app-configs"));
|
|
|
8
8
|
const apply_overrides_1 = __importDefault(require("../configs/util/apply-overrides"));
|
|
9
9
|
const installProductionCommand = (0, yarn_1.getInstallProductionCommand)();
|
|
10
10
|
const yarnVersion = (0, yarn_1.getYarnVersion)();
|
|
11
|
+
const { nginx } = app_configs_1.default;
|
|
11
12
|
// В зависимости от используемого мендежера зависимостей для их установки нужно копировать разный набор файлов
|
|
12
13
|
const filesRequiredToInstallDependencies = [
|
|
13
14
|
'package.json',
|
|
@@ -20,12 +21,14 @@ const dockerfileTemplate = `
|
|
|
20
21
|
FROM ${app_configs_1.default.baseDockerImage}
|
|
21
22
|
ARG START_SH_LOCATION
|
|
22
23
|
ARG NGINX_CONF_LOCATION
|
|
24
|
+
ARG NGINX_BASE_CONF_LOCATION
|
|
23
25
|
|
|
24
26
|
WORKDIR /src
|
|
25
27
|
|
|
26
28
|
# Полу-статичные файлы, могут легко кешироваться
|
|
27
29
|
ADD $START_SH_LOCATION /src/start.sh
|
|
28
30
|
ADD $NGINX_CONF_LOCATION /src/nginx.conf
|
|
31
|
+
${nginx ? 'ADD $NGINX_BASE_CONF_LOCATION /etc/nginx/nginx.conf' : ''}
|
|
29
32
|
|
|
30
33
|
# Зависимости. При некоторой удаче могут кешироваться и соответственно кешировать установку зависимостей
|
|
31
34
|
${filesRequiredToInstallDependencies
|
|
@@ -8,6 +8,7 @@ const apply_overrides_1 = __importDefault(require("../configs/util/apply-overrid
|
|
|
8
8
|
const appPathToAdd = app_configs_1.configs.clientOnly ? app_configs_1.configs.buildPath : '.';
|
|
9
9
|
const appTargetPath = app_configs_1.configs.clientOnly ? `/src/${app_configs_1.configs.buildPath}` : '/src';
|
|
10
10
|
const nginxConfTargetLocation = app_configs_1.configs.clientOnly ? '/etc/nginx/conf.d/default.conf' : '/src/nginx.conf';
|
|
11
|
+
const { nginx } = app_configs_1.configs;
|
|
11
12
|
const nginxNonRootPart = app_configs_1.configs.runFromNonRootUser
|
|
12
13
|
? `RUN chown -R nginx:nginx /src && \\
|
|
13
14
|
mkdir -p /var/lib/nginx && \\
|
|
@@ -24,10 +25,12 @@ const dockerfileTemplate = `
|
|
|
24
25
|
FROM ${app_configs_1.configs.baseDockerImage}
|
|
25
26
|
ARG START_SH_LOCATION
|
|
26
27
|
ARG NGINX_CONF_LOCATION
|
|
28
|
+
ARG NGINX_BASE_CONF_LOCATION
|
|
27
29
|
|
|
28
30
|
WORKDIR /src
|
|
29
31
|
ADD $START_SH_LOCATION /src/start.sh
|
|
30
32
|
ADD $NGINX_CONF_LOCATION ${nginxConfTargetLocation}
|
|
33
|
+
${nginx ? 'ADD $NGINX_BASE_CONF_LOCATION /etc/nginx/nginx.conf' : ''}
|
|
31
34
|
|
|
32
35
|
${nginxNonRootPart}
|
|
33
36
|
|