@lark-apaas/coding-template-nestjs-react-fullstack 0.1.31-alpha.20260827105658 → 0.1.31-alpha.20260827112855

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.31-alpha.20260827105658",
3
+ "version": "0.1.31-alpha.20260827112855",
4
4
  "description": "NestJS + React fullstack template for miaoda coding",
5
5
  "type": "module",
6
6
  "files": [
@@ -11,12 +11,7 @@ export interface UploadFileData {
11
11
 
12
12
  export async function uploadFile(file: File): Promise<UploadFileData> {
13
13
  const dataloom = await getDataloom();
14
- const defaultBucketId = getDefaultBucketId();
15
- if (!defaultBucketId) {
16
- throw new Error('Default storage bucket is not configured');
17
- }
18
-
19
- const bucket = dataloom.storage.from(defaultBucketId);
14
+ const bucket = dataloom.storage.from(getDefaultBucketId());
20
15
 
21
16
  const result = await bucket.uploadFile(file);
22
17
 
@@ -1,4 +1,4 @@
1
- import { Extension, type Extensions } from '@tiptap/core';
1
+ import { Extension } from '@tiptap/core';
2
2
  import Color, { type ColorOptions } from '@tiptap/extension-color';
3
3
  import Highlight, { type HighlightOptions } from '@tiptap/extension-highlight';
4
4
  import type { LinkOptions } from '@tiptap/extension-link';
@@ -143,7 +143,7 @@ export const CompleteKit = Extension.create<CompleteKitOptions>({
143
143
  name: 'completeKit',
144
144
 
145
145
  addExtensions() {
146
- const extensions: Extensions = [];
146
+ const extensions = [];
147
147
 
148
148
  // StarterKit 基础扩展(排除 heading、link、codeBlock)
149
149
  const starterKitOptions: Partial<StarterKitOptions> = {
@@ -35,8 +35,8 @@
35
35
  "dependencies": {
36
36
  "@lark-apaas/fullstack-nestjs-core": "^1.1.60",
37
37
  "@nestjs/axios": "^4.0.1",
38
- "@nestjs/common": "^10.4.20",
39
38
  "@nestjs/cache-manager": "^3.1.3",
39
+ "@nestjs/common": "^10.4.20",
40
40
  "@nestjs/config": "^3.3.0",
41
41
  "@nestjs/core": "^10.4.20",
42
42
  "@nestjs/platform-express": "^10.4.20",
@@ -63,8 +63,8 @@
63
63
  "@heroicons/react": "^2.2.0",
64
64
  "@hookform/resolvers": "^5.2.2",
65
65
  "@lark-apaas/client-toolkit": "^1.2.67",
66
+ "@lark-apaas/coding-preset-vite-react": "1.0.20-alpha.20260827110844",
66
67
  "@lark-apaas/fullstack-presets": "^1.1.0",
67
- "@lark-apaas/fullstack-vite-preset": "^1.0.36",
68
68
  "@nestjs/cli": "^10.4.9",
69
69
  "@nestjs/testing": "^10.4.20",
70
70
  "@radix-ui/react-accordion": "^1.2.12",
@@ -181,7 +181,7 @@
181
181
  "typescript-eslint": "^8.44.0",
182
182
  "uuid": "11.0.5",
183
183
  "vaul": "^1.1.2",
184
- "vite": "^7.3.1",
184
+ "vite": "^8",
185
185
  "xlsx": "^0.18.5",
186
186
  "xlsx-js-style": "^1.2.0",
187
187
  "zod": "^3.25.76",
@@ -94,6 +94,18 @@ cp "$ROOT_DIR/dist/client/"*.html "$OUT_DIR/dist/client/" || true
94
94
  # 拷贝 run.sh 文件
95
95
  cp "$ROOT_DIR/scripts/run.sh" "$OUT_DIR/"
96
96
 
97
+ # 拷贝 shared/static → OUT_DIR/shared/static
98
+ # Nest server 生产从 process.cwd() + shared/static 读 (nestjs-core static.controller.ts:100),
99
+ # 生产 cwd = $OUT_DIR (dist/server), 所以目标是 dist/server/shared/static。
100
+ # coding-preset 的 static-assets plugin 之前 closeBundle 拷贝, 现在删除后由 build.sh 显式做。
101
+ # 排除 .ts/.tsx/.js/.jsx: 避免 shared/static/ 里若有开发脚本被误传到生产。
102
+ if [ -d "$ROOT_DIR/shared/static" ]; then
103
+ mkdir -p "$OUT_DIR/shared/static"
104
+ rsync -a --exclude='*.ts' --exclude='*.tsx' --exclude='*.js' --exclude='*.jsx' \
105
+ "$ROOT_DIR/shared/static/" "$OUT_DIR/shared/static/"
106
+ echo " Static → dist/server/shared/static/"
107
+ fi
108
+
97
109
  # 清理无用文件
98
110
  rm -rf "$ROOT_DIR/dist/scripts"
99
111
  rm -rf "$ROOT_DIR/dist/tsconfig.node.tsbuildinfo"
@@ -9,7 +9,6 @@
9
9
  "@lark-apaas/client-toolkit/tools/*": ["node_modules/@lark-apaas/client-toolkit/lib/apis/tools/*"]
10
10
  },
11
11
  "incremental": true,
12
- "strictNullChecks": true,
13
12
  },
14
13
  "include": [
15
14
  "client/**/*",
@@ -1,5 +1,5 @@
1
1
  import path from 'path';
2
- import { defineConfig } from '@lark-apaas/fullstack-vite-preset';
2
+ import { defineConfig } from '@lark-apaas/coding-preset-vite-react';
3
3
 
4
4
  export default defineConfig({
5
5
  resolve: {