@kmlckj/licos-ai-cli 0.0.27 → 0.0.28

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.
@@ -13,7 +13,7 @@ else
13
13
  fi
14
14
  echo "Installing dependencies..."
15
15
  # 安装所有依赖(包含 Taro 核心和 React)
16
- pnpm install
16
+ pnpm install --prefer-frozen-lockfile --prefer-offline --reporter=append-only
17
17
 
18
18
  echo "Building the Taro project..."
19
19
  pnpm build
@@ -1,2 +1,10 @@
1
1
  #!/bin/bash
2
2
  set -Eeuo pipefail
3
+
4
+ PROJECT_DIR="${LICOS_PROJECT_PATH:-${LICOS_WORKSPACE_PATH:-$(pwd)}}"
5
+
6
+ cd "${PROJECT_DIR}"
7
+
8
+ echo "📦 Ensuring dependencies are installed..."
9
+ pnpm install --prefer-frozen-lockfile --prefer-offline --reporter=append-only
10
+ echo "✅ Dependencies are ready."
@@ -92,8 +92,13 @@ cleanup_previous_run() {
92
92
  # 2. 安装依赖
93
93
  # ---------------------------------------------------------
94
94
  echo "📦 Installing dependencies..."
95
- pnpm install
96
- echo " Dependencies installed successfully!"
95
+ if [[ ! -x "node_modules/.bin/concurrently" ]] || [[ ! -x "node_modules/.bin/tsc" ]] || [[ ! -x "node_modules/.bin/eslint" ]]; then
96
+ echo "📦 Dependencies are incomplete, installing..."
97
+ pnpm install --prefer-frozen-lockfile --prefer-offline --reporter=append-only
98
+ echo "✅ Dependencies installed successfully!"
99
+ else
100
+ echo "✅ Dependencies already installed."
101
+ fi
97
102
 
98
103
  # ---------------------------------------------------------
99
104
  # 3. 清理旧进程 + 端口
@@ -11,6 +11,8 @@ pnpm install # 安装所有依赖
11
11
  pnpm remove <package> # 移除依赖
12
12
  ```
13
13
 
14
+ - 如果 `taro`、`concurrently`、`tsc`、`eslint` 或 `pnpm validate` 报命令不存在,表示依赖安装不完整;必须先运行 `pnpm install --prefer-frozen-lockfile --prefer-offline --reporter=append-only`,不要用 `pnpm add` 重装模板已经声明过的依赖。
15
+
14
16
  ## 图片与视频资源使用规范
15
17
 
16
18
  **强制规则**:图片、视频等静态资源必须通过 TOS 对象存储管理,代码中使用 TOS 返回的 URL 引用。
@@ -15,6 +15,10 @@
15
15
  "dev:tt": "taro build --type tt --watch",
16
16
  "dev:weapp": "taro build --type weapp --watch",
17
17
  "dev:web": "taro build --type h5 --watch",
18
+ "ensure:deps": "node -e \"const fs=require('fs'); const bins=['node_modules/.bin/concurrently','node_modules/.bin/tsc','node_modules/.bin/eslint']; process.exit(bins.every((p)=>fs.existsSync(p))?0:1)\" || pnpm install --prefer-frozen-lockfile --prefer-offline --reporter=append-only",
19
+ "prebuild": "pnpm run ensure:deps",
20
+ "predev": "pnpm run ensure:deps",
21
+ "prevalidate": "pnpm run ensure:deps",
18
22
  "preinstall": "npx only-allow pnpm",
19
23
  "postinstall": "weapp-tw patch",
20
24
  "kill:all": "pkill -9 -f 'concurrently' 2>/dev/null || true; pkill -9 -f 'nest start' 2>/dev/null || true; pkill -9 -f 'taro build' 2>/dev/null || true; pkill -9 -f 'node.*dev' 2>/dev/null || true; echo 'All dev processes cleaned'",
package/lib/cli.js CHANGED
@@ -2107,7 +2107,7 @@ const EventBuilder = {
2107
2107
  };
2108
2108
 
2109
2109
  var name = "@kmlckj/licos-ai-cli";
2110
- var version = "0.0.27";
2110
+ var version = "0.0.28";
2111
2111
  var description = "LICOS AI coding workspace CLI - project template engine and dev tools";
2112
2112
  var license = "MIT";
2113
2113
  var author = "kmlckj";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmlckj/licos-ai-cli",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "description": "LICOS AI coding workspace CLI - project template engine and dev tools",
5
5
  "license": "MIT",
6
6
  "author": "kmlckj",