@lark-apaas/coding-template-nestjs-react-fullstack 0.1.10 → 0.1.11-beta.0

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/coding-template-nestjs-react-fullstack",
3
- "version": "0.1.10",
3
+ "version": "0.1.11-beta.0",
4
4
  "description": "NestJS + React fullstack template for miaoda coding",
5
5
  "type": "module",
6
6
  "files": [
@@ -5,9 +5,10 @@
5
5
  //
6
6
  // 流程:
7
7
  // 1. env pull —— 拉沙箱身份/凭证到 .env.local
8
- // 2. skills sync —— 同步当前 stack agent skills
9
- // 3. dotenv 加载 .env / .env.local process.env(含 SUDA_WEBUSER 适配)
10
- // 4. 并发起 dev:server + dev:client(子进程继承 process.env
8
+ // 2. action-plugin init —— user app package.json.actionPlugins 里声明的插件
9
+ // 3. skills sync —— 同步当前 stack agent skills
10
+ // 4. dotenv 加载 .env / .env.local 到 process.env(含 SUDA_WEBUSER 适配)
11
+ // 5. 并发起 dev:server + dev:client(子进程继承 process.env)
11
12
  //
12
13
  // 关键设计:本脚本在 spawn 子进程之前先把 .env / .env.local 加载到 process.env,
13
14
  // 然后 spawn 的 server / client 进程通过 env 继承直接拿到——SDK(fullstack-nestjs-core
@@ -34,7 +35,7 @@ if (!process.env.MIAODA_APP_TYPE) process.env.MIAODA_APP_TYPE = '3';
34
35
  process.env.MIAODA_LOCAL_DEV = '1';
35
36
 
36
37
  // 1. env pull
37
- console.log('[dev-local] (1/4) env pull...');
38
+ console.log('[dev-local] (1/5) env pull...');
38
39
  const hasLarkCli = spawnSync('command', ['-v', 'lark-cli'], { shell: true, stdio: 'ignore' }).status === 0;
39
40
  if (hasLarkCli) {
40
41
  let appId = '';
@@ -55,20 +56,28 @@ if (hasLarkCli) {
55
56
  warn('lark-cli 未安装,跳过 env pull;请确保 .env.local 已就绪');
56
57
  }
57
58
 
58
- // 2. skills sync —— --local 切到 flat layout (.agents/skills + .claude/skills 软链),
59
+ // 2. action-plugin init —— user app package.json.actionPlugins 里声明的插件。
60
+ console.log('[dev-local] (2/5) action-plugin init...');
61
+ try {
62
+ execSync('npx -y @lark-apaas/fullstack-cli@latest action-plugin init', { stdio: 'inherit' });
63
+ } catch {
64
+ warn('action-plugin init 失败,继续启动');
65
+ }
66
+
67
+ // 3. skills sync —— --local 切到 flat layout (.agents/skills + .claude/skills 软链),
59
68
  // 跟沙箱 nested layout 区分。不传 --version,handler 默认拉 coding-steering@latest,
60
69
  // 保证每次本地 npm run dev 都把 skills 升到最新。
61
- console.log('[dev-local] (2/4) miaoda skills sync...');
70
+ console.log('[dev-local] (3/5) miaoda skills sync...');
62
71
  try {
63
72
  execSync('npx -y @lark-apaas/miaoda-cli@latest skills sync --local', { stdio: 'inherit' });
64
73
  } catch {
65
74
  console.log(' (skills sync 失败,继续启动)');
66
75
  }
67
76
 
68
- // 3. 加载 .env / .env.local 到 process.env
77
+ // 4. 加载 .env / .env.local 到 process.env
69
78
  // dotenv 默认 override:false,先到先得 → 先 .env.local 让它优先于 .env;
70
79
  // shell env 已在 process.env,两次 config 都不会覆盖。
71
- console.log('[dev-local] (3/4) loading .env / .env.local...');
80
+ console.log('[dev-local] (4/5) loading .env / .env.local...');
72
81
  const dotenv = require('dotenv');
73
82
  dotenv.config({ path: '.env.local' });
74
83
  dotenv.config({ path: '.env' });
@@ -89,8 +98,8 @@ if (process.env.SUDA_WEBUSER) {
89
98
  }
90
99
  }
91
100
 
92
- // 4. 并发起前后端 dev server
93
- console.log('[dev-local] (4/4) 并发起 dev:server + dev:client');
101
+ // 5. 并发起前后端 dev server
102
+ console.log('[dev-local] (5/5) 并发起 dev:server + dev:client');
94
103
  const child = spawn(
95
104
  'npx',
96
105
  [