@coze-arch/cli 0.0.1-alpha.c49cb2 → 0.0.1-alpha.c53937

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.
@@ -5,3 +5,8 @@ requires = ["nodejs-24"]
5
5
  [dev]
6
6
  build = ["bash", ".cozeproj/scripts/deploy_build.sh"]
7
7
  run = ["bash", ".cozeproj/scripts/deploy_run.sh"]
8
+
9
+ [deploy]
10
+ build = ["bash", ".cozeproj/scripts/prod_build.sh"]
11
+ run = ["bash", ".cozeproj/scripts/prod_run.sh"]
12
+ build_app_dir = "."
@@ -49,13 +49,6 @@ fs.writeSync(fd, record+"\n", null, "utf8");
49
49
  fs.fsyncSync(fd);
50
50
  fs.closeSync(fd);
51
51
  ' "$LOG_FILE" "$level" "$msg"
52
-
53
- case "$level" in
54
- INFO) info "$msg" ;;
55
- WARN) warn "$msg" ;;
56
- ERROR) echo -e "\033[31m[ERROR] $msg\033[0m" ;;
57
- *) info "$msg" ;;
58
- esac
59
52
  }
60
53
 
61
54
  # ==================== 前置检查 ====================
@@ -1,4 +1,5 @@
1
1
  ROOT_DIR="$(cd "$(dirname "$0")" && pwd)"
2
+ PREVIEW_DIR="${COZE_PREVIEW_DIR:-$ROOT_DIR}"
2
3
  LOG_DIR="${COZE_LOG_DIR:-$ROOT_DIR/logs}"
3
4
  LOG_FILE="$LOG_DIR/app.log"
4
5
  mkdir -p "$LOG_DIR"
@@ -10,7 +11,7 @@ SERVER_PORT="9091"
10
11
  # Expo 项目配置
11
12
  EXPO_HOST="0.0.0.0"
12
13
  EXPO_DIR="expo"
13
- EXPO_PORT="9090"
14
+ EXPO_PORT="5000"
14
15
  WEB_URL="${COZE_PROJECT_DOMAIN_DEFAULT:-http://127.0.0.1:${SERVER_PORT}}"
15
16
  ASSUME_YES="1"
16
17
  EXPO_PUBLIC_BACKEND_BASE_URL="${EXPO_PUBLIC_BACKEND_BASE_URL:-$WEB_URL}"
@@ -116,12 +117,6 @@ fs.writeSync(fd, record+"\n", null, "utf8");
116
117
  fs.fsyncSync(fd);
117
118
  fs.closeSync(fd);
118
119
  ' "$LOG_FILE" "$level" "$msg"
119
- case "$level" in
120
- INFO) echo -e "\033[32m[INFO] $msg\033[0m" ;;
121
- WARN) echo -e "\033[33m[WARN] $msg\033[0m" ;;
122
- ERROR) echo -e "\033[31m[ERROR] $msg\033[0m" ;;
123
- *) echo -e "\033[32m[INFO] $msg\033[0m" ;;
124
- esac
125
120
  }
126
121
 
127
122
  wait_port_connectable() {
@@ -159,6 +154,15 @@ detect_expo_fetch_failed() {
159
154
  }
160
155
 
161
156
  # ==================== 前置检查 ====================
157
+ # 关掉nginx进程
158
+ ps -ef | grep nginx | grep -v grep | awk '{print $2}' | xargs -r kill -9
159
+
160
+ write_log "INFO" "检查根目录 pre_install.py"
161
+ if [ -f "$PREVIEW_DIR/pre_install.py" ]; then
162
+ write_log "INFO" "执行:python $PREVIEW_DIR/pre_install.py"
163
+ python "$PREVIEW_DIR/pre_install.py" || write_log "ERROR" "pre_install.py 执行失败"
164
+ fi
165
+
162
166
  write_log "INFO" "==================== 开始启动 ===================="
163
167
  write_log "INFO" "开始执行服务启动脚本(start_dev.sh)..."
164
168
  write_log "INFO" "正在检查依赖命令和目录是否存在..."
@@ -176,14 +180,6 @@ ensure_port SERVER_PORT "$SERVER_PORT"
176
180
  ensure_port EXPO_PORT "$EXPO_PORT"
177
181
 
178
182
  # ==================== 启动 Server 服务 ====================
179
- write_log "INFO" "检查 Nginx 端口 (5000)..."
180
- if is_port_free 5000; then
181
- write_log "INFO" "端口 5000 未被占用,正在启动 Nginx..."
182
- service nginx start
183
- else
184
- write_log "INFO" "端口 5000 已被占用,跳过 Nginx 启动"
185
- fi
186
-
187
183
  write_log "INFO" "==================== 启动 server 服务 ===================="
188
184
  write_log "INFO" "正在执行:npm run server"
189
185
  PORT="$SERVER_PORT" nohup npm run server > logs/app.log 2>&1 &
@@ -0,0 +1,47 @@
1
+ #!/bin/bash
2
+ if [ -z "${BASH_VERSION:-}" ]; then exec /usr/bin/env bash "$0" "$@"; fi
3
+ set -euo pipefail
4
+ ROOT_DIR="$(pwd)"
5
+
6
+ # ==================== 工具函数 ====================
7
+ info() {
8
+ echo "[INFO] $1"
9
+ }
10
+ warn() {
11
+ echo "[WARN] $1"
12
+ }
13
+ error() {
14
+ echo "[ERROR] $1"
15
+ exit 1
16
+ }
17
+ check_command() {
18
+ if ! command -v "$1" &> /dev/null; then
19
+ error "命令 $1 未找到,请先安装"
20
+ fi
21
+ }
22
+
23
+ info "==================== 开始构建 ===================="
24
+ info "开始执行构建脚本(build_prod.sh)..."
25
+ info "正在检查依赖命令是否存在..."
26
+ # 检查核心命令
27
+ check_command "pnpm"
28
+ check_command "npm"
29
+
30
+ # ==================== 安装 Node 依赖 ====================
31
+ info "==================== 安装 Node 依赖 ===================="
32
+ info "开始安装 Node 依赖"
33
+ if [ -f "$ROOT_DIR/package.json" ]; then
34
+ info "进入目录:$ROOT_DIR"
35
+ info "正在执行:pnpm install"
36
+ (cd "$ROOT_DIR" && pnpm install --registry=https://registry.npmmirror.com) || error "Node 依赖安装失败"
37
+ else
38
+ warn "未找到 $ROOT_DIR/package.json 文件,请检查路径是否正确"
39
+ fi
40
+ info "==================== 依赖安装完成!====================\n"
41
+
42
+ info "==================== dist打包 ===================="
43
+ info "开始执行:pnpm run server:build"
44
+ (cd "$ROOT_DIR" && pnpm run server:build) || error "dist打包失败"
45
+ info "==================== dist打包完成!====================\n"
46
+
47
+ info "下一步:执行 ./prod_run.sh 启动服务"
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env bash
2
+ # 产物部署使用
3
+ set -euo pipefail
4
+
5
+ ROOT_DIR="$(cd "$(dirname "$0")" && pwd)"
6
+
7
+
8
+ HOST="${HOST:-0.0.0.0}"
9
+ PORT="${PORT:-5000}"
10
+
11
+ # ==================== 工具函数 ====================
12
+ info() {
13
+ echo "[INFO] $1"
14
+ }
15
+ warn() {
16
+ echo "[WARN] $1"
17
+ }
18
+ error() {
19
+ echo "[ERROR] $1"
20
+ exit 1
21
+ }
22
+ check_command() {
23
+ if ! command -v "$1" &> /dev/null; then
24
+ error "命令 $1 未找到,请先安装"
25
+ fi
26
+ }
27
+
28
+ # ============== 启动服务 ======================
29
+ # 检查核心命令
30
+ check_command "pnpm"
31
+ check_command "npm"
32
+
33
+ info "开始执行:pnpm run server:prod"
34
+ (cd "$ROOT_DIR" && PORT="$PORT" pnpm run server:prod) || error "服务启动失败"
35
+ info "服务启动完成!\n"
@@ -3,6 +3,16 @@ module.exports = function (api) {
3
3
  return {
4
4
  presets: ["babel-preset-expo"],
5
5
  plugins: [
6
+ [
7
+ "module-resolver",
8
+ {
9
+ root: ["./"],
10
+ alias: {
11
+ "@": "./client",
12
+ },
13
+ extensions: [".ios.js", ".android.js", ".js", ".ts", ".tsx", ".json"],
14
+ },
15
+ ],
6
16
  "react-native-reanimated/plugin",
7
17
  ],
8
18
  };
@@ -6,25 +6,35 @@ const tintColorDark = "#0A84FF";
6
6
  export const Colors = {
7
7
  light: {
8
8
  text: "#11181C",
9
+ textPrimary: "#11181C",
10
+ textSecondary: "#687076",
11
+ textMuted: "#9BA1A6",
9
12
  buttonText: "#FFFFFF",
10
13
  tabIconDefault: "#687076",
11
14
  tabIconSelected: tintColorLight,
15
+ primary: tintColorLight,
12
16
  link: "#007AFF",
13
17
  backgroundRoot: "#FFFFFF", // Elevation 0
14
18
  backgroundDefault: "#F2F2F2", // Elevation 1
15
19
  backgroundSecondary: "#E6E6E6", // Elevation 2
16
20
  backgroundTertiary: "#D9D9D9", // Elevation 3
21
+ border: "#E6E6E6",
17
22
  },
18
23
  dark: {
19
24
  text: "#ECEDEE",
25
+ textPrimary: "#ECEDEE",
26
+ textSecondary: "#9BA1A6",
27
+ textMuted: "#6F767E",
20
28
  buttonText: "#FFFFFF",
21
29
  tabIconDefault: "#9BA1A6",
22
30
  tabIconSelected: tintColorDark,
31
+ primary: tintColorDark,
23
32
  link: "#0A84FF",
24
33
  backgroundRoot: "#1F2123", // Elevation 0
25
34
  backgroundDefault: "#2A2C2E", // Elevation 1
26
35
  backgroundSecondary: "#353739", // Elevation 2
27
36
  backgroundTertiary: "#404244", // Elevation 3
37
+ border: "#353739",
28
38
  },
29
39
  };
30
40
 
@@ -4,7 +4,7 @@ import { useColorScheme } from "@/hooks/useColorScheme";
4
4
  export function useTheme() {
5
5
  const colorScheme = useColorScheme();
6
6
  const isDark = colorScheme === "dark";
7
- const theme = Colors[colorScheme ?? "light"];
7
+ const theme = Colors[(colorScheme as "light" | "dark") ?? "light"];
8
8
 
9
9
  return {
10
10
  theme,
@@ -1,5 +1,5 @@
1
1
  const { getDefaultConfig } = require('expo/metro-config');
2
- // const { createProxyMiddleware } = require('http-proxy-middleware');
2
+ const { createProxyMiddleware } = require('http-proxy-middleware');
3
3
  const connect = require('connect');
4
4
 
5
5
  const config = getDefaultConfig(__dirname);
@@ -28,9 +28,8 @@ config.resolver.blockList = [
28
28
  /.*\.git\/.*/, // 排除 Git 目录
29
29
  ];
30
30
 
31
- /*
32
31
  const apiProxy = createProxyMiddleware({
33
- target: 'http://localhost:5000',
32
+ target: 'http://localhost:9091',
34
33
  logLevel: 'debug',
35
34
  });
36
35
 
@@ -39,7 +38,7 @@ config.server = {
39
38
  enhanceMiddleware: (metroMiddleware, metroServer) => {
40
39
  return connect()
41
40
  .use((req, res, next) => {
42
- if (req.url && req.url.startsWith('/api')) {
41
+ if (req.url && req.url.startsWith('/api/v')) {
43
42
  console.log(`[Metro Proxy] Forwarding ${req.method} ${req.url}`);
44
43
  return apiProxy(req, res, next);
45
44
  }
@@ -48,6 +47,5 @@ config.server = {
48
47
  .use(metroMiddleware);
49
48
  },
50
49
  }
51
- */
52
50
 
53
51
  module.exports = config;
@@ -12,6 +12,8 @@
12
12
  "install-missing": "node ./client/scripts/install-missing-deps.js",
13
13
  "lint": "expo lint",
14
14
  "server": "NODE_ENV=development tsx ./src/index.ts",
15
+ "server:build": "pnpm exec esbuild src/index.ts --platform=node --packages=external --bundle --format=esm --outdir=src_dist",
16
+ "server:prod": "NODE_ENV=production PORT=${PORT:-5000} node src_dist/index.js",
15
17
  "start": "expo start --web",
16
18
  "test": "jest --watchAll"
17
19
  },
@@ -33,7 +35,7 @@
33
35
  "ajv": "^8.17.1",
34
36
  "ajv-formats": "^3.0.1",
35
37
  "connect": "^3.7.0",
36
- "coze-coding-dev-sdk": "^0.5.2",
38
+ "coze-coding-dev-sdk": "^0.5.5",
37
39
  "dayjs": "^1.11.19",
38
40
  "drizzle-kit": "^0.31.8",
39
41
  "drizzle-orm": "^0.45.1",
@@ -58,6 +60,7 @@
58
60
  "expo-system-ui": "~6.0.9",
59
61
  "expo-web-browser": "~15.0.10",
60
62
  "express": "^4.22.1",
63
+ "http-proxy-middleware": "^3.0.5",
61
64
  "multer": "^2.0.2",
62
65
  "pg": "^8.16.3",
63
66
  "react": "19.1.0",
@@ -90,7 +93,8 @@
90
93
  "babel-preset-expo": "^54.0.9",
91
94
  "chalk": "^4.1.2",
92
95
  "depcheck": "^1.4.7",
93
- "eslint": "^9.27.0",
96
+ "esbuild": "0.27.2",
97
+ "eslint": "^9.39.2",
94
98
  "eslint-formatter-compact": "^9.0.1",
95
99
  "eslint-import-resolver-typescript": "^4.4.4",
96
100
  "eslint-plugin-import": "^2.32.0",
@@ -108,5 +112,10 @@
108
112
  "packageManager": "pnpm@9.0.0",
109
113
  "engines": {
110
114
  "pnpm": ">=9.0.0"
115
+ },
116
+ "pnpm": {
117
+ "overrides": {
118
+ "esbuild": "0.27.2"
119
+ }
111
120
  }
112
121
  }
@@ -4,44 +4,25 @@ set -Eeuo pipefail
4
4
  PORT=<%= port %>
5
5
  COZE_WORKSPACE_PATH="${COZE_WORKSPACE_PATH:-$(pwd)}"
6
6
  NODE_ENV=development
7
+ DEPLOY_RUN_PORT=<%= port %>
7
8
 
8
9
  cd "${COZE_WORKSPACE_PATH}"
9
10
 
10
11
  kill_port_if_listening() {
11
12
  local pids
12
-
13
- # Check if lsof is available (macOS/BSD) or ss (Linux)
14
- if command -v lsof >/dev/null 2>&1; then
15
- # macOS/BSD using lsof
16
- pids=$(lsof -ti:${PORT} 2>/dev/null || true)
17
- elif command -v ss >/dev/null 2>&1; then
18
- # Linux using ss
19
- pids=$(ss -H -lntp 2>/dev/null | awk -v port="${PORT}" '$4 ~ ":"port"$"' | grep -o 'pid=[0-9]*' | cut -d= -f2 | paste -sd' ' - || true)
20
- else
21
- echo "Warning: neither lsof nor ss found, cannot check port ${PORT}"
22
- return
23
- fi
24
-
13
+ pids=$(ss -H -lntp 2>/dev/null | awk -v port="${DEPLOY_RUN_PORT}" '$4 ~ ":"port"$"' | grep -o 'pid=[0-9]*' | cut -d= -f2 | paste -sd' ' - || true)
25
14
  if [[ -z "${pids}" ]]; then
26
- echo "Port ${PORT} is free."
15
+ echo "Port ${DEPLOY_RUN_PORT} is free."
27
16
  return
28
17
  fi
29
-
30
- echo "Port ${PORT} in use by PIDs: ${pids} (SIGKILL)"
18
+ echo "Port ${DEPLOY_RUN_PORT} in use by PIDs: ${pids} (SIGKILL)"
31
19
  echo "${pids}" | xargs -I {} kill -9 {}
32
20
  sleep 1
33
-
34
- # Verify port is cleared
35
- if command -v lsof >/dev/null 2>&1; then
36
- pids=$(lsof -ti:${PORT} 2>/dev/null || true)
37
- elif command -v ss >/dev/null 2>&1; then
38
- pids=$(ss -H -lntp 2>/dev/null | awk -v port="${PORT}" '$4 ~ ":"port"$"' | grep -o 'pid=[0-9]*' | cut -d= -f2 | paste -sd' ' - || true)
39
- fi
40
-
21
+ pids=$(ss -H -lntp 2>/dev/null | awk -v port="${DEPLOY_RUN_PORT}" '$4 ~ ":"port"$"' | grep -o 'pid=[0-9]*' | cut -d= -f2 | paste -sd' ' - || true)
41
22
  if [[ -n "${pids}" ]]; then
42
- echo "Warning: port ${PORT} still busy after SIGKILL, PIDs: ${pids}"
23
+ echo "Warning: port ${DEPLOY_RUN_PORT} still busy after SIGKILL, PIDs: ${pids}"
43
24
  else
44
- echo "Port ${PORT} cleared."
25
+ echo "Port ${DEPLOY_RUN_PORT} cleared."
45
26
  fi
46
27
  }
47
28
 
@@ -15,7 +15,7 @@
15
15
  "postcss": "^8.4.49",
16
16
  "tailwindcss": "^3.4.17",
17
17
  "typescript": "^5.6.0",
18
- "vite": "^6.0.0"
18
+ "vite": "^7.2.4"
19
19
  },
20
20
  "packageManager": "pnpm@9.0.0",
21
21
  "engines": {
@@ -24,8 +24,8 @@ importers:
24
24
  specifier: ^5.6.0
25
25
  version: 5.9.3
26
26
  vite:
27
- specifier: ^6.0.0
28
- version: 6.4.1(jiti@1.21.7)
27
+ specifier: ^7.2.4
28
+ version: 7.3.0(jiti@1.21.7)
29
29
 
30
30
  packages:
31
31
 
@@ -33,158 +33,158 @@ packages:
33
33
  resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==}
34
34
  engines: {node: '>=10'}
35
35
 
36
- '@esbuild/aix-ppc64@0.25.12':
37
- resolution: {integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==}
36
+ '@esbuild/aix-ppc64@0.27.2':
37
+ resolution: {integrity: sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==}
38
38
  engines: {node: '>=18'}
39
39
  cpu: [ppc64]
40
40
  os: [aix]
41
41
 
42
- '@esbuild/android-arm64@0.25.12':
43
- resolution: {integrity: sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==}
42
+ '@esbuild/android-arm64@0.27.2':
43
+ resolution: {integrity: sha512-pvz8ZZ7ot/RBphf8fv60ljmaoydPU12VuXHImtAs0XhLLw+EXBi2BLe3OYSBslR4rryHvweW5gmkKFwTiFy6KA==}
44
44
  engines: {node: '>=18'}
45
45
  cpu: [arm64]
46
46
  os: [android]
47
47
 
48
- '@esbuild/android-arm@0.25.12':
49
- resolution: {integrity: sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==}
48
+ '@esbuild/android-arm@0.27.2':
49
+ resolution: {integrity: sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA==}
50
50
  engines: {node: '>=18'}
51
51
  cpu: [arm]
52
52
  os: [android]
53
53
 
54
- '@esbuild/android-x64@0.25.12':
55
- resolution: {integrity: sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==}
54
+ '@esbuild/android-x64@0.27.2':
55
+ resolution: {integrity: sha512-z8Ank4Byh4TJJOh4wpz8g2vDy75zFL0TlZlkUkEwYXuPSgX8yzep596n6mT7905kA9uHZsf/o2OJZubl2l3M7A==}
56
56
  engines: {node: '>=18'}
57
57
  cpu: [x64]
58
58
  os: [android]
59
59
 
60
- '@esbuild/darwin-arm64@0.25.12':
61
- resolution: {integrity: sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==}
60
+ '@esbuild/darwin-arm64@0.27.2':
61
+ resolution: {integrity: sha512-davCD2Zc80nzDVRwXTcQP/28fiJbcOwvdolL0sOiOsbwBa72kegmVU0Wrh1MYrbuCL98Omp5dVhQFWRKR2ZAlg==}
62
62
  engines: {node: '>=18'}
63
63
  cpu: [arm64]
64
64
  os: [darwin]
65
65
 
66
- '@esbuild/darwin-x64@0.25.12':
67
- resolution: {integrity: sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==}
66
+ '@esbuild/darwin-x64@0.27.2':
67
+ resolution: {integrity: sha512-ZxtijOmlQCBWGwbVmwOF/UCzuGIbUkqB1faQRf5akQmxRJ1ujusWsb3CVfk/9iZKr2L5SMU5wPBi1UWbvL+VQA==}
68
68
  engines: {node: '>=18'}
69
69
  cpu: [x64]
70
70
  os: [darwin]
71
71
 
72
- '@esbuild/freebsd-arm64@0.25.12':
73
- resolution: {integrity: sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==}
72
+ '@esbuild/freebsd-arm64@0.27.2':
73
+ resolution: {integrity: sha512-lS/9CN+rgqQ9czogxlMcBMGd+l8Q3Nj1MFQwBZJyoEKI50XGxwuzznYdwcav6lpOGv5BqaZXqvBSiB/kJ5op+g==}
74
74
  engines: {node: '>=18'}
75
75
  cpu: [arm64]
76
76
  os: [freebsd]
77
77
 
78
- '@esbuild/freebsd-x64@0.25.12':
79
- resolution: {integrity: sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==}
78
+ '@esbuild/freebsd-x64@0.27.2':
79
+ resolution: {integrity: sha512-tAfqtNYb4YgPnJlEFu4c212HYjQWSO/w/h/lQaBK7RbwGIkBOuNKQI9tqWzx7Wtp7bTPaGC6MJvWI608P3wXYA==}
80
80
  engines: {node: '>=18'}
81
81
  cpu: [x64]
82
82
  os: [freebsd]
83
83
 
84
- '@esbuild/linux-arm64@0.25.12':
85
- resolution: {integrity: sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==}
84
+ '@esbuild/linux-arm64@0.27.2':
85
+ resolution: {integrity: sha512-hYxN8pr66NsCCiRFkHUAsxylNOcAQaxSSkHMMjcpx0si13t1LHFphxJZUiGwojB1a/Hd5OiPIqDdXONia6bhTw==}
86
86
  engines: {node: '>=18'}
87
87
  cpu: [arm64]
88
88
  os: [linux]
89
89
 
90
- '@esbuild/linux-arm@0.25.12':
91
- resolution: {integrity: sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==}
90
+ '@esbuild/linux-arm@0.27.2':
91
+ resolution: {integrity: sha512-vWfq4GaIMP9AIe4yj1ZUW18RDhx6EPQKjwe7n8BbIecFtCQG4CfHGaHuh7fdfq+y3LIA2vGS/o9ZBGVxIDi9hw==}
92
92
  engines: {node: '>=18'}
93
93
  cpu: [arm]
94
94
  os: [linux]
95
95
 
96
- '@esbuild/linux-ia32@0.25.12':
97
- resolution: {integrity: sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==}
96
+ '@esbuild/linux-ia32@0.27.2':
97
+ resolution: {integrity: sha512-MJt5BRRSScPDwG2hLelYhAAKh9imjHK5+NE/tvnRLbIqUWa+0E9N4WNMjmp/kXXPHZGqPLxggwVhz7QP8CTR8w==}
98
98
  engines: {node: '>=18'}
99
99
  cpu: [ia32]
100
100
  os: [linux]
101
101
 
102
- '@esbuild/linux-loong64@0.25.12':
103
- resolution: {integrity: sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==}
102
+ '@esbuild/linux-loong64@0.27.2':
103
+ resolution: {integrity: sha512-lugyF1atnAT463aO6KPshVCJK5NgRnU4yb3FUumyVz+cGvZbontBgzeGFO1nF+dPueHD367a2ZXe1NtUkAjOtg==}
104
104
  engines: {node: '>=18'}
105
105
  cpu: [loong64]
106
106
  os: [linux]
107
107
 
108
- '@esbuild/linux-mips64el@0.25.12':
109
- resolution: {integrity: sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==}
108
+ '@esbuild/linux-mips64el@0.27.2':
109
+ resolution: {integrity: sha512-nlP2I6ArEBewvJ2gjrrkESEZkB5mIoaTswuqNFRv/WYd+ATtUpe9Y09RnJvgvdag7he0OWgEZWhviS1OTOKixw==}
110
110
  engines: {node: '>=18'}
111
111
  cpu: [mips64el]
112
112
  os: [linux]
113
113
 
114
- '@esbuild/linux-ppc64@0.25.12':
115
- resolution: {integrity: sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==}
114
+ '@esbuild/linux-ppc64@0.27.2':
115
+ resolution: {integrity: sha512-C92gnpey7tUQONqg1n6dKVbx3vphKtTHJaNG2Ok9lGwbZil6DrfyecMsp9CrmXGQJmZ7iiVXvvZH6Ml5hL6XdQ==}
116
116
  engines: {node: '>=18'}
117
117
  cpu: [ppc64]
118
118
  os: [linux]
119
119
 
120
- '@esbuild/linux-riscv64@0.25.12':
121
- resolution: {integrity: sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==}
120
+ '@esbuild/linux-riscv64@0.27.2':
121
+ resolution: {integrity: sha512-B5BOmojNtUyN8AXlK0QJyvjEZkWwy/FKvakkTDCziX95AowLZKR6aCDhG7LeF7uMCXEJqwa8Bejz5LTPYm8AvA==}
122
122
  engines: {node: '>=18'}
123
123
  cpu: [riscv64]
124
124
  os: [linux]
125
125
 
126
- '@esbuild/linux-s390x@0.25.12':
127
- resolution: {integrity: sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==}
126
+ '@esbuild/linux-s390x@0.27.2':
127
+ resolution: {integrity: sha512-p4bm9+wsPwup5Z8f4EpfN63qNagQ47Ua2znaqGH6bqLlmJ4bx97Y9JdqxgGZ6Y8xVTixUnEkoKSHcpRlDnNr5w==}
128
128
  engines: {node: '>=18'}
129
129
  cpu: [s390x]
130
130
  os: [linux]
131
131
 
132
- '@esbuild/linux-x64@0.25.12':
133
- resolution: {integrity: sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==}
132
+ '@esbuild/linux-x64@0.27.2':
133
+ resolution: {integrity: sha512-uwp2Tip5aPmH+NRUwTcfLb+W32WXjpFejTIOWZFw/v7/KnpCDKG66u4DLcurQpiYTiYwQ9B7KOeMJvLCu/OvbA==}
134
134
  engines: {node: '>=18'}
135
135
  cpu: [x64]
136
136
  os: [linux]
137
137
 
138
- '@esbuild/netbsd-arm64@0.25.12':
139
- resolution: {integrity: sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==}
138
+ '@esbuild/netbsd-arm64@0.27.2':
139
+ resolution: {integrity: sha512-Kj6DiBlwXrPsCRDeRvGAUb/LNrBASrfqAIok+xB0LxK8CHqxZ037viF13ugfsIpePH93mX7xfJp97cyDuTZ3cw==}
140
140
  engines: {node: '>=18'}
141
141
  cpu: [arm64]
142
142
  os: [netbsd]
143
143
 
144
- '@esbuild/netbsd-x64@0.25.12':
145
- resolution: {integrity: sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==}
144
+ '@esbuild/netbsd-x64@0.27.2':
145
+ resolution: {integrity: sha512-HwGDZ0VLVBY3Y+Nw0JexZy9o/nUAWq9MlV7cahpaXKW6TOzfVno3y3/M8Ga8u8Yr7GldLOov27xiCnqRZf0tCA==}
146
146
  engines: {node: '>=18'}
147
147
  cpu: [x64]
148
148
  os: [netbsd]
149
149
 
150
- '@esbuild/openbsd-arm64@0.25.12':
151
- resolution: {integrity: sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==}
150
+ '@esbuild/openbsd-arm64@0.27.2':
151
+ resolution: {integrity: sha512-DNIHH2BPQ5551A7oSHD0CKbwIA/Ox7+78/AWkbS5QoRzaqlev2uFayfSxq68EkonB+IKjiuxBFoV8ESJy8bOHA==}
152
152
  engines: {node: '>=18'}
153
153
  cpu: [arm64]
154
154
  os: [openbsd]
155
155
 
156
- '@esbuild/openbsd-x64@0.25.12':
157
- resolution: {integrity: sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==}
156
+ '@esbuild/openbsd-x64@0.27.2':
157
+ resolution: {integrity: sha512-/it7w9Nb7+0KFIzjalNJVR5bOzA9Vay+yIPLVHfIQYG/j+j9VTH84aNB8ExGKPU4AzfaEvN9/V4HV+F+vo8OEg==}
158
158
  engines: {node: '>=18'}
159
159
  cpu: [x64]
160
160
  os: [openbsd]
161
161
 
162
- '@esbuild/openharmony-arm64@0.25.12':
163
- resolution: {integrity: sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==}
162
+ '@esbuild/openharmony-arm64@0.27.2':
163
+ resolution: {integrity: sha512-LRBbCmiU51IXfeXk59csuX/aSaToeG7w48nMwA6049Y4J4+VbWALAuXcs+qcD04rHDuSCSRKdmY63sruDS5qag==}
164
164
  engines: {node: '>=18'}
165
165
  cpu: [arm64]
166
166
  os: [openharmony]
167
167
 
168
- '@esbuild/sunos-x64@0.25.12':
169
- resolution: {integrity: sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==}
168
+ '@esbuild/sunos-x64@0.27.2':
169
+ resolution: {integrity: sha512-kMtx1yqJHTmqaqHPAzKCAkDaKsffmXkPHThSfRwZGyuqyIeBvf08KSsYXl+abf5HDAPMJIPnbBfXvP2ZC2TfHg==}
170
170
  engines: {node: '>=18'}
171
171
  cpu: [x64]
172
172
  os: [sunos]
173
173
 
174
- '@esbuild/win32-arm64@0.25.12':
175
- resolution: {integrity: sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==}
174
+ '@esbuild/win32-arm64@0.27.2':
175
+ resolution: {integrity: sha512-Yaf78O/B3Kkh+nKABUF++bvJv5Ijoy9AN1ww904rOXZFLWVc5OLOfL56W+C8F9xn5JQZa3UX6m+IktJnIb1Jjg==}
176
176
  engines: {node: '>=18'}
177
177
  cpu: [arm64]
178
178
  os: [win32]
179
179
 
180
- '@esbuild/win32-ia32@0.25.12':
181
- resolution: {integrity: sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==}
180
+ '@esbuild/win32-ia32@0.27.2':
181
+ resolution: {integrity: sha512-Iuws0kxo4yusk7sw70Xa2E2imZU5HoixzxfGCdxwBdhiDgt9vX9VUCBhqcwY7/uh//78A1hMkkROMJq9l27oLQ==}
182
182
  engines: {node: '>=18'}
183
183
  cpu: [ia32]
184
184
  os: [win32]
185
185
 
186
- '@esbuild/win32-x64@0.25.12':
187
- resolution: {integrity: sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==}
186
+ '@esbuild/win32-x64@0.27.2':
187
+ resolution: {integrity: sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==}
188
188
  engines: {node: '>=18'}
189
189
  cpu: [x64]
190
190
  os: [win32]
@@ -401,8 +401,8 @@ packages:
401
401
  electron-to-chromium@1.5.267:
402
402
  resolution: {integrity: sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==}
403
403
 
404
- esbuild@0.25.12:
405
- resolution: {integrity: sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==}
404
+ esbuild@0.27.2:
405
+ resolution: {integrity: sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==}
406
406
  engines: {node: '>=18'}
407
407
  hasBin: true
408
408
 
@@ -665,19 +665,19 @@ packages:
665
665
  util-deprecate@1.0.2:
666
666
  resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
667
667
 
668
- vite@6.4.1:
669
- resolution: {integrity: sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==}
670
- engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}
668
+ vite@7.3.0:
669
+ resolution: {integrity: sha512-dZwN5L1VlUBewiP6H9s2+B3e3Jg96D0vzN+Ry73sOefebhYr9f94wwkMNN/9ouoU8pV1BqA1d1zGk8928cx0rg==}
670
+ engines: {node: ^20.19.0 || >=22.12.0}
671
671
  hasBin: true
672
672
  peerDependencies:
673
- '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0
673
+ '@types/node': ^20.19.0 || >=22.12.0
674
674
  jiti: '>=1.21.0'
675
- less: '*'
675
+ less: ^4.0.0
676
676
  lightningcss: ^1.21.0
677
- sass: '*'
678
- sass-embedded: '*'
679
- stylus: '*'
680
- sugarss: '*'
677
+ sass: ^1.70.0
678
+ sass-embedded: ^1.70.0
679
+ stylus: '>=0.54.8'
680
+ sugarss: ^5.0.0
681
681
  terser: ^5.16.0
682
682
  tsx: ^4.8.1
683
683
  yaml: ^2.4.2
@@ -713,82 +713,82 @@ snapshots:
713
713
 
714
714
  '@alloc/quick-lru@5.2.0': {}
715
715
 
716
- '@esbuild/aix-ppc64@0.25.12':
716
+ '@esbuild/aix-ppc64@0.27.2':
717
717
  optional: true
718
718
 
719
- '@esbuild/android-arm64@0.25.12':
719
+ '@esbuild/android-arm64@0.27.2':
720
720
  optional: true
721
721
 
722
- '@esbuild/android-arm@0.25.12':
722
+ '@esbuild/android-arm@0.27.2':
723
723
  optional: true
724
724
 
725
- '@esbuild/android-x64@0.25.12':
725
+ '@esbuild/android-x64@0.27.2':
726
726
  optional: true
727
727
 
728
- '@esbuild/darwin-arm64@0.25.12':
728
+ '@esbuild/darwin-arm64@0.27.2':
729
729
  optional: true
730
730
 
731
- '@esbuild/darwin-x64@0.25.12':
731
+ '@esbuild/darwin-x64@0.27.2':
732
732
  optional: true
733
733
 
734
- '@esbuild/freebsd-arm64@0.25.12':
734
+ '@esbuild/freebsd-arm64@0.27.2':
735
735
  optional: true
736
736
 
737
- '@esbuild/freebsd-x64@0.25.12':
737
+ '@esbuild/freebsd-x64@0.27.2':
738
738
  optional: true
739
739
 
740
- '@esbuild/linux-arm64@0.25.12':
740
+ '@esbuild/linux-arm64@0.27.2':
741
741
  optional: true
742
742
 
743
- '@esbuild/linux-arm@0.25.12':
743
+ '@esbuild/linux-arm@0.27.2':
744
744
  optional: true
745
745
 
746
- '@esbuild/linux-ia32@0.25.12':
746
+ '@esbuild/linux-ia32@0.27.2':
747
747
  optional: true
748
748
 
749
- '@esbuild/linux-loong64@0.25.12':
749
+ '@esbuild/linux-loong64@0.27.2':
750
750
  optional: true
751
751
 
752
- '@esbuild/linux-mips64el@0.25.12':
752
+ '@esbuild/linux-mips64el@0.27.2':
753
753
  optional: true
754
754
 
755
- '@esbuild/linux-ppc64@0.25.12':
755
+ '@esbuild/linux-ppc64@0.27.2':
756
756
  optional: true
757
757
 
758
- '@esbuild/linux-riscv64@0.25.12':
758
+ '@esbuild/linux-riscv64@0.27.2':
759
759
  optional: true
760
760
 
761
- '@esbuild/linux-s390x@0.25.12':
761
+ '@esbuild/linux-s390x@0.27.2':
762
762
  optional: true
763
763
 
764
- '@esbuild/linux-x64@0.25.12':
764
+ '@esbuild/linux-x64@0.27.2':
765
765
  optional: true
766
766
 
767
- '@esbuild/netbsd-arm64@0.25.12':
767
+ '@esbuild/netbsd-arm64@0.27.2':
768
768
  optional: true
769
769
 
770
- '@esbuild/netbsd-x64@0.25.12':
770
+ '@esbuild/netbsd-x64@0.27.2':
771
771
  optional: true
772
772
 
773
- '@esbuild/openbsd-arm64@0.25.12':
773
+ '@esbuild/openbsd-arm64@0.27.2':
774
774
  optional: true
775
775
 
776
- '@esbuild/openbsd-x64@0.25.12':
776
+ '@esbuild/openbsd-x64@0.27.2':
777
777
  optional: true
778
778
 
779
- '@esbuild/openharmony-arm64@0.25.12':
779
+ '@esbuild/openharmony-arm64@0.27.2':
780
780
  optional: true
781
781
 
782
- '@esbuild/sunos-x64@0.25.12':
782
+ '@esbuild/sunos-x64@0.27.2':
783
783
  optional: true
784
784
 
785
- '@esbuild/win32-arm64@0.25.12':
785
+ '@esbuild/win32-arm64@0.27.2':
786
786
  optional: true
787
787
 
788
- '@esbuild/win32-ia32@0.25.12':
788
+ '@esbuild/win32-ia32@0.27.2':
789
789
  optional: true
790
790
 
791
- '@esbuild/win32-x64@0.25.12':
791
+ '@esbuild/win32-x64@0.27.2':
792
792
  optional: true
793
793
 
794
794
  '@jridgewell/gen-mapping@0.3.13':
@@ -945,34 +945,34 @@ snapshots:
945
945
 
946
946
  electron-to-chromium@1.5.267: {}
947
947
 
948
- esbuild@0.25.12:
948
+ esbuild@0.27.2:
949
949
  optionalDependencies:
950
- '@esbuild/aix-ppc64': 0.25.12
951
- '@esbuild/android-arm': 0.25.12
952
- '@esbuild/android-arm64': 0.25.12
953
- '@esbuild/android-x64': 0.25.12
954
- '@esbuild/darwin-arm64': 0.25.12
955
- '@esbuild/darwin-x64': 0.25.12
956
- '@esbuild/freebsd-arm64': 0.25.12
957
- '@esbuild/freebsd-x64': 0.25.12
958
- '@esbuild/linux-arm': 0.25.12
959
- '@esbuild/linux-arm64': 0.25.12
960
- '@esbuild/linux-ia32': 0.25.12
961
- '@esbuild/linux-loong64': 0.25.12
962
- '@esbuild/linux-mips64el': 0.25.12
963
- '@esbuild/linux-ppc64': 0.25.12
964
- '@esbuild/linux-riscv64': 0.25.12
965
- '@esbuild/linux-s390x': 0.25.12
966
- '@esbuild/linux-x64': 0.25.12
967
- '@esbuild/netbsd-arm64': 0.25.12
968
- '@esbuild/netbsd-x64': 0.25.12
969
- '@esbuild/openbsd-arm64': 0.25.12
970
- '@esbuild/openbsd-x64': 0.25.12
971
- '@esbuild/openharmony-arm64': 0.25.12
972
- '@esbuild/sunos-x64': 0.25.12
973
- '@esbuild/win32-arm64': 0.25.12
974
- '@esbuild/win32-ia32': 0.25.12
975
- '@esbuild/win32-x64': 0.25.12
950
+ '@esbuild/aix-ppc64': 0.27.2
951
+ '@esbuild/android-arm': 0.27.2
952
+ '@esbuild/android-arm64': 0.27.2
953
+ '@esbuild/android-x64': 0.27.2
954
+ '@esbuild/darwin-arm64': 0.27.2
955
+ '@esbuild/darwin-x64': 0.27.2
956
+ '@esbuild/freebsd-arm64': 0.27.2
957
+ '@esbuild/freebsd-x64': 0.27.2
958
+ '@esbuild/linux-arm': 0.27.2
959
+ '@esbuild/linux-arm64': 0.27.2
960
+ '@esbuild/linux-ia32': 0.27.2
961
+ '@esbuild/linux-loong64': 0.27.2
962
+ '@esbuild/linux-mips64el': 0.27.2
963
+ '@esbuild/linux-ppc64': 0.27.2
964
+ '@esbuild/linux-riscv64': 0.27.2
965
+ '@esbuild/linux-s390x': 0.27.2
966
+ '@esbuild/linux-x64': 0.27.2
967
+ '@esbuild/netbsd-arm64': 0.27.2
968
+ '@esbuild/netbsd-x64': 0.27.2
969
+ '@esbuild/openbsd-arm64': 0.27.2
970
+ '@esbuild/openbsd-x64': 0.27.2
971
+ '@esbuild/openharmony-arm64': 0.27.2
972
+ '@esbuild/sunos-x64': 0.27.2
973
+ '@esbuild/win32-arm64': 0.27.2
974
+ '@esbuild/win32-ia32': 0.27.2
975
+ '@esbuild/win32-x64': 0.27.2
976
976
 
977
977
  escalade@3.2.0: {}
978
978
 
@@ -1234,9 +1234,9 @@ snapshots:
1234
1234
 
1235
1235
  util-deprecate@1.0.2: {}
1236
1236
 
1237
- vite@6.4.1(jiti@1.21.7):
1237
+ vite@7.3.0(jiti@1.21.7):
1238
1238
  dependencies:
1239
- esbuild: 0.25.12
1239
+ esbuild: 0.27.2
1240
1240
  fdir: 6.5.0(picomatch@4.0.3)
1241
1241
  picomatch: 4.0.3
1242
1242
  postcss: 8.5.6
@@ -3,44 +3,25 @@ set -Eeuo pipefail
3
3
 
4
4
  PORT=<%= port %>
5
5
  COZE_WORKSPACE_PATH="${COZE_WORKSPACE_PATH:-$(pwd)}"
6
+ DEPLOY_RUN_PORT=<%= port %>
6
7
 
7
8
  cd "${COZE_WORKSPACE_PATH}"
8
9
 
9
10
  kill_port_if_listening() {
10
11
  local pids
11
-
12
- # Check if lsof is available (macOS/BSD) or ss (Linux)
13
- if command -v lsof >/dev/null 2>&1; then
14
- # macOS/BSD using lsof
15
- pids=$(lsof -ti:${PORT} 2>/dev/null || true)
16
- elif command -v ss >/dev/null 2>&1; then
17
- # Linux using ss
18
- pids=$(ss -H -lntp 2>/dev/null | awk -v port="${PORT}" '$4 ~ ":"port"$"' | grep -o 'pid=[0-9]*' | cut -d= -f2 | paste -sd' ' - || true)
19
- else
20
- echo "Warning: neither lsof nor ss found, cannot check port ${PORT}"
21
- return
22
- fi
23
-
12
+ pids=$(ss -H -lntp 2>/dev/null | awk -v port="${DEPLOY_RUN_PORT}" '$4 ~ ":"port"$"' | grep -o 'pid=[0-9]*' | cut -d= -f2 | paste -sd' ' - || true)
24
13
  if [[ -z "${pids}" ]]; then
25
- echo "Port ${PORT} is free."
14
+ echo "Port ${DEPLOY_RUN_PORT} is free."
26
15
  return
27
16
  fi
28
-
29
- echo "Port ${PORT} in use by PIDs: ${pids} (SIGKILL)"
17
+ echo "Port ${DEPLOY_RUN_PORT} in use by PIDs: ${pids} (SIGKILL)"
30
18
  echo "${pids}" | xargs -I {} kill -9 {}
31
19
  sleep 1
32
-
33
- # Verify port is cleared
34
- if command -v lsof >/dev/null 2>&1; then
35
- pids=$(lsof -ti:${PORT} 2>/dev/null || true)
36
- elif command -v ss >/dev/null 2>&1; then
37
- pids=$(ss -H -lntp 2>/dev/null | awk -v port="${PORT}" '$4 ~ ":"port"$"' | grep -o 'pid=[0-9]*' | cut -d= -f2 | paste -sd' ' - || true)
38
- fi
39
-
20
+ pids=$(ss -H -lntp 2>/dev/null | awk -v port="${DEPLOY_RUN_PORT}" '$4 ~ ":"port"$"' | grep -o 'pid=[0-9]*' | cut -d= -f2 | paste -sd' ' - || true)
40
21
  if [[ -n "${pids}" ]]; then
41
- echo "Warning: port ${PORT} still busy after SIGKILL, PIDs: ${pids}"
22
+ echo "Warning: port ${DEPLOY_RUN_PORT} still busy after SIGKILL, PIDs: ${pids}"
42
23
  else
43
- echo "Port ${PORT} cleared."
24
+ echo "Port ${DEPLOY_RUN_PORT} cleared."
44
25
  fi
45
26
  }
46
27
 
package/lib/cli.js CHANGED
@@ -1741,7 +1741,7 @@ const registerCommand = program => {
1741
1741
  });
1742
1742
  };
1743
1743
 
1744
- var version = "0.0.1-alpha.c49cb2";
1744
+ var version = "0.0.1-alpha.c53937";
1745
1745
  var packageJson = {
1746
1746
  version: version};
1747
1747
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coze-arch/cli",
3
- "version": "0.0.1-alpha.c49cb2",
3
+ "version": "0.0.1-alpha.c53937",
4
4
  "private": false,
5
5
  "description": "coze coding devtools cli",
6
6
  "license": "MIT",