@lark-apaas/fullstack-cli 1.1.34-alpha.0 → 1.1.34-alpha.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/fullstack-cli",
3
- "version": "1.1.34-alpha.0",
3
+ "version": "1.1.34-alpha.2",
4
4
  "description": "CLI tool for fullstack template management",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -42,9 +42,9 @@ echo ""
42
42
  # ==================== 步骤 3 ====================
43
43
  STEP_START=$(node -e "console.log(Date.now())")
44
44
 
45
- # 根据 deploy_faas 决定是否构建 server
46
- if [[ "${deploy_faas:-true}" == "false" ]]; then
47
- echo "🔨 [3/5] 仅构建 client (deploy_faas=false)"
45
+ # 根据 only_frontend_change 决定是否构建 server
46
+ if [[ "${only_frontend_change:-false}" == "true" ]]; then
47
+ echo "🔨 [3/5] 仅构建 client (only_frontend_change=true)"
48
48
 
49
49
  echo " ├─ 启动 client 构建..."
50
50
  npm run build:client > /tmp/build-client.log 2>&1
@@ -104,12 +104,12 @@ STEP_START=$(node -e "console.log(Date.now())")
104
104
  # HTML 文件属于前端产物,始终执行
105
105
  if [ -d "$DIST_DIR/client" ]; then
106
106
  mkdir -p "$DIST_DIR/dist/client"
107
- find "$DIST_DIR/client" -maxdepth 1 -name "*.html" -exec mv {} "$DIST_DIR/dist/client/" \;
107
+ find "$DIST_DIR/client" -maxdepth 1 -name "*.html" -exec cp {} "$DIST_DIR/dist/client/" \;
108
108
  fi
109
109
 
110
- # server 相关产物准备(deploy_faas=false 时跳过)
111
- if [[ "${deploy_faas:-true}" == "false" ]]; then
112
- echo " [skip] 跳过 run.sh/.env 复制 (deploy_faas=false)"
110
+ # server 相关产物准备(only_frontend_change=true 时跳过)
111
+ if [[ "${only_frontend_change:-false}" == "true" ]]; then
112
+ echo " [skip] 跳过 run.sh/.env 复制 (only_frontend_change=true)"
113
113
  else
114
114
  # 拷贝 run.sh 到 dist/(prod 从 dist/ 启动,确保 cwd 一致性)
115
115
  cp "$ROOT_DIR/scripts/run.sh" "$DIST_DIR/"
@@ -131,8 +131,8 @@ echo ""
131
131
  STEP_START=$(node -e "console.log(Date.now())")
132
132
 
133
133
  # 智能依赖裁剪(仅全量构建时执行,纯前端场景不打包 server,无需裁剪)
134
- if [[ "${deploy_faas:-true}" == "false" ]]; then
135
- echo "✂️ [5/5] 跳过智能依赖裁剪 (deploy_faas=false)"
134
+ if [[ "${only_frontend_change:-false}" == "true" ]]; then
135
+ echo "✂️ [5/5] 跳过智能依赖裁剪 (only_frontend_change=true)"
136
136
  else
137
137
  echo "✂️ [5/5] 智能依赖裁剪"
138
138
 
@@ -149,7 +149,7 @@ print_time $TOTAL_START
149
149
 
150
150
  # 输出产物信息
151
151
  DIST_SIZE=$(du -sh "$DIST_DIR" | cut -f1)
152
- if [[ "${deploy_faas:-true}" == "false" ]]; then
152
+ if [[ "${only_frontend_change:-false}" == "true" ]]; then
153
153
  echo ""
154
154
  echo "📊 构建产物统计:"
155
155
  echo " 产物大小: $DIST_SIZE"