@lark-apaas/coding-template-nestjs-react-fullstack 0.1.27-alpha.20260824122418 → 0.1.27

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.27-alpha.20260824122418",
3
+ "version": "0.1.27",
4
4
  "description": "NestJS + React fullstack template for miaoda coding",
5
5
  "type": "module",
6
6
  "files": [
@@ -37,9 +37,9 @@
37
37
  "@headlessui/react": "^2.2.9",
38
38
  "@heroicons/react": "^2.2.0",
39
39
  "@hookform/resolvers": "^5.2.2",
40
- "@lark-apaas/client-toolkit": "^1.2.63",
40
+ "@lark-apaas/client-toolkit": "^1.2.65",
41
41
  "@lark-apaas/fullstack-presets": "^1.1.0",
42
- "@lark-apaas/fullstack-vite-preset": "^1.0.34",
42
+ "@lark-apaas/fullstack-vite-preset": "^1.0.35",
43
43
  "@nestjs/cli": "^10.4.9",
44
44
  "@nestjs/testing": "^10.4.20",
45
45
  "@radix-ui/react-accordion": "^1.2.12",
@@ -3100,9 +3100,9 @@
3100
3100
  }
3101
3101
  },
3102
3102
  "node_modules/@lark-apaas/client-toolkit": {
3103
- "version": "1.2.63",
3104
- "resolved": "https://registry.npmmirror.com/@lark-apaas/client-toolkit/-/client-toolkit-1.2.63.tgz",
3105
- "integrity": "sha512-/ZtOLOb72bWob1rV950B30C9E9Msda8BdwAFQeMWs7khaVjHBJq/k2vdJksWip14frlsUAPBPcuGe3XafBIcPw==",
3103
+ "version": "1.2.65",
3104
+ "resolved": "https://registry.npmmirror.com/@lark-apaas/client-toolkit/-/client-toolkit-1.2.65.tgz",
3105
+ "integrity": "sha512-q9Jk1T7bUhsjvWsswFhwM0YcnrGPrZ4gnG/6h45vEpjHv7EBkaO7KcGUnlASLvA1AEPXheX1cP0x6gqBD+9kTg==",
3106
3106
  "dev": true,
3107
3107
  "dependencies": {
3108
3108
  "@ant-design/colors": "^7.2.1",
@@ -3755,9 +3755,9 @@
3755
3755
  }
3756
3756
  },
3757
3757
  "node_modules/@lark-apaas/fullstack-vite-preset": {
3758
- "version": "1.0.34",
3759
- "resolved": "https://registry.npmmirror.com/@lark-apaas/fullstack-vite-preset/-/fullstack-vite-preset-1.0.34.tgz",
3760
- "integrity": "sha512-E1eZxA52JbIZA7LZMUqUJpSU8Xg7A9mlsMtkBSel/7F4Y6s51uBLusy2LpG2IQmWp8omhMQRljdnmhw+RTlC8A==",
3758
+ "version": "1.0.35",
3759
+ "resolved": "https://registry.npmmirror.com/@lark-apaas/fullstack-vite-preset/-/fullstack-vite-preset-1.0.35.tgz",
3760
+ "integrity": "sha512-91nSumvDvH53Iu6Q5XvkCxB2lyL0tJf7NzJwS5y2jYDGanoGXGgnb4vcT2KI1SOa/1Cdp6mr1xxp0fwTp2VzRQ==",
3761
3761
  "dev": true,
3762
3762
  "license": "MIT",
3763
3763
  "dependencies": {
@@ -62,9 +62,9 @@
62
62
  "@headlessui/react": "^2.2.9",
63
63
  "@heroicons/react": "^2.2.0",
64
64
  "@hookform/resolvers": "^5.2.2",
65
- "@lark-apaas/client-toolkit": "^1.2.63",
65
+ "@lark-apaas/client-toolkit": "^1.2.65",
66
66
  "@lark-apaas/fullstack-presets": "^1.1.0",
67
- "@lark-apaas/fullstack-vite-preset": "^1.0.34",
67
+ "@lark-apaas/fullstack-vite-preset": "^1.0.35",
68
68
  "@nestjs/cli": "^10.4.9",
69
69
  "@nestjs/testing": "^10.4.20",
70
70
  "@radix-ui/react-accordion": "^1.2.12",
@@ -86,11 +86,6 @@ mkdir -p "$OUT_DIR/dist/client"
86
86
  # 拷贝 HTML
87
87
  cp "$ROOT_DIR/dist/client/"*.html "$OUT_DIR/dist/client/" || true
88
88
 
89
- # public 随 views 一起进 dist/client(server setBaseViewsDir + nestjs-core 中间件同源 serve)
90
- if [ -d "$ROOT_DIR/client/public" ]; then
91
- cp -R "$ROOT_DIR/client/public/." "$OUT_DIR/dist/client/"
92
- fi
93
-
94
89
  # 拷贝 run.sh 文件
95
90
  cp "$ROOT_DIR/scripts/run.sh" "$OUT_DIR/"
96
91
 
@@ -1,14 +1,18 @@
1
1
  #!/usr/bin/env bash
2
- # `npm run dev` 入口;按 SANDBOX_ID 是否非空判断运行环境:
3
- # - SANDBOX_ID 非空(沙箱平台注入应用所属沙箱 ID)→ 直接跑 dev.js
2
+ # `npm run dev` 入口;按 MIAODA_DEP_CACHE_DIR 是否非空判断运行环境(与 miaoda-cli
3
+ # isSandboxEnv() 同口径):
4
+ # - 非空(沙箱平台注入的依赖缓存目录)→ 直接跑 dev.js
4
5
  # (保活 / restart loop / 文件日志 —— 沙箱生产形态)。脚本同步由平台 pod 启动阶段做过,
5
6
  # dev 入口不再额外 `npm run upgrade`。
6
- # - 否则(本地)→ 走 miaoda app sync 兜底 + 跑 dev-local.sh:纯 stdout、崩了就崩、Agent 友好。
7
- # 显式想跑本地路径可用 `npm run dev:local`(绕过 SANDBOX_ID 判断)。
7
+ # - 否则(本地)→ 走 miaoda app sync 兜底 + 跑 dev-local.js:纯 stdout、崩了就崩、Agent 友好。
8
+ # 显式想跑本地路径可用 `npm run dev:local`(绕过本判断)。
9
+ #
10
+ # 不用 SANDBOX_ID:它由 sandbox_console 在绑定沙箱时才写入 .force/environment/env,预热池实例
11
+ # 在绑定前拿不到,会被误判成本地。保留为附加条件只为兼容,不影响判定结果。
8
12
  set -euo pipefail
9
13
  SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
10
14
 
11
- if [ -n "${SANDBOX_ID:-}" ]; then
15
+ if [ -n "${MIAODA_DEP_CACHE_DIR:-}" ] || [ -n "${SANDBOX_ID:-}" ]; then
12
16
  exec node "$SCRIPT_DIR/dev.js" "$@"
13
17
  fi
14
18
 
@@ -18,7 +22,7 @@ if [ ! -f "$SCRIPT_DIR/dev-local.js" ]; then
18
22
  fi
19
23
 
20
24
  # 本地启动前先跑一次 miaoda app sync:同步 platform-controlled 内容 + 升 @lark-apaas/* 到
21
- # latest + 迁移老 npm scripts。沙箱不走这里(SANDBOX_ID 分支已经 exec return)。
25
+ # latest + 迁移老 npm scripts。沙箱不走这里(上面的沙箱分支已经 exec return)。
22
26
  npx -y @lark-apaas/miaoda-cli@latest app sync || echo "[dev] miaoda app sync 失败,按现状继续" >&2
23
27
 
24
28
  exec node "$SCRIPT_DIR/dev-local.js" "$@"