@dazhicheng/common 1.0.18 → 1.0.20

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/.gitlab-ci.yml CHANGED
@@ -12,10 +12,12 @@ variables:
12
12
  image: node:24-alpine
13
13
  tags:
14
14
  - build
15
+ resource_group: build
15
16
  script:
16
- - npm install -g pnpm
17
- - pnpm up:dzc
17
+ - npm install -g pnpm@latest
18
+ - pnpm config set registry https://registry.npmmirror.com
18
19
  - pnpm install --no-frozen-lockfile
20
+ - pnpm up:dzc
19
21
  - pnpm "build:${NODE_ENV}"
20
22
  artifacts:
21
23
  paths:
package/nginx_dev.conf CHANGED
@@ -1,26 +1,34 @@
1
- # HTTP 服务器 - 保持原有配置
2
- server {
3
- <<<listen>>>
4
- server_name localhost;
5
- charset utf-8;
6
-
7
- root /usr/share/nginx/html;
8
- index index.html;
9
-
10
- location / {
11
- try_files $uri $uri/ /index.html;
12
- <<<CORS配置>>>
13
- }
14
-
15
- location /dev-api/ {
16
- proxy_set_header Host $host;
17
- proxy_set_header X-Real-Ip $remote_addr;
18
- proxy_set_header X-Forwarded-For $remote_addr;
19
- proxy_pass http://fulfillment-dev.tiantai-jp.com:11000/;
20
- }
21
-
22
- error_page 500 502 503 504 /50x.html;
23
- location = /50x.html {
24
- root html;
25
- }
26
- }
1
+ # 根据请求Host分配后端地址(公网Host走公网,默认走内网)
2
+ map $http_host $dev_backend_addr {
3
+ default 192.168.128.215:11000; # 默认走内网
4
+ 120.76.61.203:13000 14.220.235.21:11000; # 公网Host走公网
5
+ }
6
+
7
+ # HTTP 服务器 - 保持原有配置
8
+ server {
9
+ <<<listen>>>
10
+ server_name localhost;
11
+ charset utf-8;
12
+
13
+ root /usr/share/nginx/html;
14
+ index index.html;
15
+
16
+ location / {
17
+ try_files $uri $uri/ /index.html;
18
+ <<<CORS配置>>>
19
+ }
20
+
21
+ location /dev-api/ {
22
+ proxy_set_header Host $host;
23
+ proxy_set_header X-Real-Ip $remote_addr;
24
+ proxy_set_header X-Forwarded-For $remote_addr;
25
+
26
+ rewrite ^/dev-api/(.*) /$1 break;
27
+ proxy_pass http://$dev_backend_addr/;
28
+ }
29
+
30
+ error_page 500 502 503 504 /50x.html;
31
+ location = /50x.html {
32
+ root html;
33
+ }
34
+ }
package/nginx_test.conf CHANGED
@@ -1,26 +1,34 @@
1
- # HTTP 服务器 - 保持原有配置
2
- server {
3
- <<<listen>>>
4
- server_name localhost;
5
- charset utf-8;
6
-
7
- root /usr/share/nginx/html;
8
- index index.html;
9
-
10
- location / {
11
- try_files $uri $uri/ /index.html;
12
- <<<CORS配置>>>
13
- }
14
-
15
- location /test-api/ {
16
- proxy_set_header Host $host;
17
- proxy_set_header X-Real-Ip $remote_addr;
18
- proxy_set_header X-Forwarded-For $remote_addr;
19
- proxy_pass http://fulfillment-test.tiantai-jp.com:11000/;
20
- }
21
-
22
- error_page 500 502 503 504 /50x.html;
23
- location = /50x.html {
24
- root html;
25
- }
26
- }
1
+ # 根据请求Host分配后端地址(公网Host走公网,默认走内网)
2
+ map $http_host $test_backend_addr {
3
+ default 192.168.127.72:11000; # 默认走内网
4
+ 120.76.61.203:13000 116.6.49.180:11001; # 公网Host走公网
5
+ }
6
+
7
+ # HTTP 服务器 - 保持原有配置
8
+ server {
9
+ <<<listen>>>
10
+ server_name localhost;
11
+ charset utf-8;
12
+
13
+ root /usr/share/nginx/html;
14
+ index index.html;
15
+
16
+ location / {
17
+ try_files $uri $uri/ /index.html;
18
+ <<<CORS配置>>>
19
+ }
20
+
21
+ location /test-api/ {
22
+ proxy_set_header Host $host;
23
+ proxy_set_header X-Real-Ip $remote_addr;
24
+ proxy_set_header X-Forwarded-For $remote_addr;
25
+
26
+ rewrite ^/test-api/(.*) /$1 break;
27
+ proxy_pass http://$test_backend_addr;
28
+ }
29
+
30
+ error_page 500 502 503 504 /50x.html;
31
+ location = /50x.html {
32
+ root html;
33
+ }
34
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dazhicheng/common",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "description": "共享配置文件",
5
5
  "type": "module",
6
6
  "types": "./src/types/index.d.ts",