@coze-arch/cli 0.0.21-alpha.df4fd6 → 0.0.22

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.
@@ -2,6 +2,7 @@
2
2
  if [ -z "${BASH_VERSION:-}" ]; then exec /usr/bin/env bash "$0" "$@"; fi
3
3
  set -euo pipefail
4
4
  ROOT_DIR="$(pwd)"
5
+ PREVIEW_DIR="/source/preview"
5
6
 
6
7
  # ==================== 配置项 ====================
7
8
  SERVER_DIR="app"
@@ -16,6 +17,11 @@ check_command() {
16
17
 
17
18
  echo "==================== 开始构建 ===================="
18
19
 
20
+ echo "检查根目录 pre_install.py"
21
+ if [ -f "$PREVIEW_DIR/pre_install.py" ]; then
22
+ echo "执行:python $PREVIEW_DIR/pre_install.py"
23
+ python "$PREVIEW_DIR/pre_install.py" || echo "pre_install.py 执行失败"
24
+ fi
19
25
 
20
26
  echo "开始执行构建脚本(build_dev.sh)..."
21
27
  echo "正在检查依赖命令是否存在..."
@@ -30,5 +36,11 @@ fi
30
36
  # 步骤 2.1/2.2:安装项目依赖
31
37
  pnpm install --registry=https://registry.npmmirror.com || echo "Expo 项目依赖安装失败(pnpm 执行出错)"
32
38
 
39
+ echo "检查根目录 post_install.py"
40
+ if [ -f "$PREVIEW_DIR/post_install.py" ]; then
41
+ echo "执行:python $PREVIEW_DIR/post_install.py"
42
+ python "$PREVIEW_DIR/post_install.py" || echo "post_install.py 执行失败"
43
+ fi
44
+
33
45
  echo "==================== 依赖安装完成!====================\n"
34
46
  echo "下一步:执行 ./dev_run.sh 启动服务"
@@ -1,4 +1,5 @@
1
1
  ROOT_DIR="$(cd "$(dirname "$0")/../.." && pwd)"
2
+ PREVIEW_DIR="/source/preview"
2
3
  LOG_DIR="${COZE_LOG_DIR:-$ROOT_DIR/logs}"
3
4
  LOG_CLIENT_FILE="$LOG_DIR/client.log"
4
5
  mkdir -p "$LOG_DIR"
@@ -147,6 +148,17 @@ detect_expo_fetch_failed() {
147
148
  # 关掉nginx进程
148
149
  ps -ef | grep nginx | grep -v grep | awk '{print $2}' | xargs -r kill -9
149
150
 
151
+ echo "检查根目录 pre_install.py"
152
+ if [ -f "$PREVIEW_DIR/pre_install.py" ]; then
153
+ echo "执行:python $PREVIEW_DIR/pre_install.py"
154
+ python "$PREVIEW_DIR/pre_install.py" || echo "pre_install.py 执行失败"
155
+ fi
156
+
157
+ echo "检查根目录 post_install.py"
158
+ if [ -f "$PREVIEW_DIR/post_install.py" ]; then
159
+ echo "执行:python $PREVIEW_DIR/post_install.py"
160
+ python "$PREVIEW_DIR/post_install.py" || echo "post_install.py 执行失败"
161
+ fi
150
162
 
151
163
  echo "==================== 开始启动 ===================="
152
164
  echo "开始执行服务启动脚本(start_dev.sh)..."
package/lib/cli.js CHANGED
@@ -2107,7 +2107,7 @@ const EventBuilder = {
2107
2107
  };
2108
2108
 
2109
2109
  var name = "@coze-arch/cli";
2110
- var version = "0.0.21-alpha.df4fd6";
2110
+ var version = "0.0.21";
2111
2111
  var description = "coze coding devtools cli";
2112
2112
  var license = "MIT";
2113
2113
  var author = "fanwenjie.fe@bytedance.com";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coze-arch/cli",
3
- "version": "0.0.21-alpha.df4fd6",
3
+ "version": "0.0.22",
4
4
  "private": false,
5
5
  "description": "coze coding devtools cli",
6
6
  "license": "MIT",