@gadmin2n/schematics 0.0.159 → 0.0.160

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.
@@ -33,6 +33,11 @@ RUN npm i -g @gadmin2n/cli@latest
33
33
  # (prisma generators 是 server 的 devDependencies,必须先 pnpm install)
34
34
  COPY server/package.json server/pnpm-lock.yaml server/pnpm-workspace.yaml server/.npmrc ./server/
35
35
 
36
+ # patches/ 也必须提前复制:pnpm-workspace.yaml 的 patchedDependencies 在
37
+ # install 早期就要读 patch 文件算哈希(calcPatchHashes),缺失会直接 ENOENT 中断构建。
38
+ # 注意不能依赖下方的 `COPY server/`,那一步在 pnpm install 之后。
39
+ COPY server/patches ./server/patches
40
+
36
41
  # 显式指定 store 路径:默认路径随 HOME 变化,写死才能让下方 cache mount 生效
37
42
  ENV PNPM_STORE_DIR=/pnpm/store
38
43
  RUN --mount=type=cache,target=/pnpm/store \
@@ -51,6 +51,10 @@ RUN corepack enable && corepack install --global pnpm@11.23.0
51
51
  # 从 builder 复制依赖描述文件(其源头是 codegen 镜像)
52
52
  COPY --from=builder --chown=node:node /app/server/package.json /app/server/pnpm-lock.yaml /app/server/pnpm-workspace.yaml /app/server/.npmrc ./
53
53
 
54
+ # patch 文件必须与依赖描述文件一起就位:下方装的是全量依赖(含 @nestjs/cli),
55
+ # patchedDependencies 会在 install 早期读它算哈希,缺失会直接 ENOENT 中断构建
56
+ COPY --from=builder --chown=node:node /app/server/patches ./patches
57
+
54
58
  # 注意:这里不能用 `pnpm install --prod`。
55
59
  # start-prod.sh 启动时需要:
56
60
  # - prisma CLI(运行 `pnpm migrate:deploy`)
@@ -25,5 +25,9 @@ allowBuilds:
25
25
  minimumReleaseAgeExclude:
26
26
  - '@gadmin2n/prisma-nest-generator@0.0.50'
27
27
 
28
+ # patch 只改 swc builder 的 file-add 回调(见 patch 内注释与
29
+ # scripts/check-swc-watch-leak.js)。不锁精确版本:package.json 声明的是
30
+ # ^11.0.21,各实例项目解析到的 11.x 小版本不同,锁死会报 ERR_PNPM_UNUSED_PATCH。
31
+ # 若上游重构导致补丁无法应用,pnpm 会直接报错而非静默跳过。
28
32
  patchedDependencies:
29
- '@nestjs/cli@11.0.21': patches/@nestjs__cli@11.0.21.patch
33
+ '@nestjs/cli': patches/@nestjs__cli.patch
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gadmin2n/schematics",
3
- "version": "0.0.159",
3
+ "version": "0.0.160",
4
4
  "description": "Gadmin - modern, fast, powerful node.js web framework (@schematics)",
5
5
  "main": "dist/index.js",
6
6
  "files": [