@kmlckj/licos-ai-cli 1.8.4 → 1.8.6

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.
Files changed (47) hide show
  1. package/lib/__templates__/agent/AGENTS.md +1 -1
  2. package/lib/__templates__/agent/DATABASE.md +1 -1
  3. package/lib/__templates__/agent/README.md +2 -3
  4. package/lib/__templates__/agent/UPGRADING.md +1 -1
  5. package/lib/__templates__/agent/config/agent_llm_config.json +3 -1
  6. package/lib/__templates__/agent/examples/README.md +2 -2
  7. package/lib/__templates__/agent/examples/experts.py +7 -4
  8. package/lib/__templates__/agent/examples/handoff.py +3 -2
  9. package/lib/__templates__/agent/pyproject.toml +3 -3
  10. package/lib/__templates__/agent/requirements.txt +3 -3
  11. package/lib/__templates__/agent/src/agents/agent.py +1 -1
  12. package/lib/__templates__/agent/template.config.js +0 -2
  13. package/lib/__templates__/expo/client/entry.js +24 -24
  14. package/lib/__templates__/expo/client/package.json +100 -100
  15. package/lib/__templates__/expo/package.json +34 -34
  16. package/lib/__templates__/expo/pnpm-lock.yaml +10 -10
  17. package/lib/__templates__/expo/server/package.json +2 -2
  18. package/lib/__templates__/expo/template.config.js +109 -109
  19. package/lib/__templates__/nextjs/AGENTS.md +1 -1
  20. package/lib/__templates__/nextjs/package.json +2 -2
  21. package/lib/__templates__/nextjs/pnpm-lock.yaml +10 -10
  22. package/lib/__templates__/nextjs/template.config.js +123 -123
  23. package/lib/__templates__/nuxt-vue/AGENTS.md +1 -1
  24. package/lib/__templates__/nuxt-vue/package.json +2 -2
  25. package/lib/__templates__/nuxt-vue/pnpm-lock.yaml +10 -10
  26. package/lib/__templates__/taro/package.json +120 -120
  27. package/lib/__templates__/taro/pnpm-lock.yaml +10 -10
  28. package/lib/__templates__/taro/server/package.json +2 -2
  29. package/lib/__templates__/templates.json +2 -2
  30. package/lib/__templates__/vite/AGENTS.md +1 -1
  31. package/lib/__templates__/vite/package.json +2 -2
  32. package/lib/__templates__/vite/pnpm-lock.yaml +10 -10
  33. package/lib/__templates__/vite/template.config.js +130 -130
  34. package/lib/__templates__/workflow/AGENTS.md +1 -1
  35. package/lib/__templates__/workflow/DATABASE.md +1 -1
  36. package/lib/__templates__/workflow/README.md +1 -2
  37. package/lib/__templates__/workflow/UPGRADING.md +1 -1
  38. package/lib/__templates__/workflow/examples/wait_signal.md +1 -1
  39. package/lib/__templates__/workflow/pyproject.toml +3 -3
  40. package/lib/__templates__/workflow/requirements.txt +3 -3
  41. package/lib/__templates__/workflow/template.config.js +0 -2
  42. package/package.json +1 -1
  43. package/lib/__templates__/agent/SDK.md +0 -43
  44. package/lib/__templates__/nextjs/SDK.md +0 -19
  45. package/lib/__templates__/nuxt-vue/SDK.md +0 -19
  46. package/lib/__templates__/vite/SDK.md +0 -19
  47. package/lib/__templates__/workflow/SDK.md +0 -43
@@ -1,120 +1,120 @@
1
- {
2
- "name": "<%= appName %>",
3
- "version": "1.0.0",
4
- "private": true,
5
- "description": "LICOS Mini Program Application",
6
- "scripts": {
7
- "build": "pnpm exec concurrently --kill-others-on-fail --kill-signal SIGKILL -n lint,tsc,web,server -c red,blue,green,magenta \"pnpm lint:build\" \"pnpm tsc\" \"pnpm build:web\" \"pnpm build:server\"",
8
- "build:all": "pnpm exec concurrently --kill-others-on-fail --kill-signal SIGKILL -n lint,tsc,web,weapp,tt,server -c red,blue,green,yellow,cyan,magenta \"pnpm lint:build\" \"pnpm tsc\" \"pnpm build:web\" \"pnpm build:weapp\" \"pnpm build:tt\" \"pnpm build:server\"",
9
- "build:pack": "pnpm exec concurrently --kill-others-on-fail --kill-signal SIGKILL -n weapp,tt -c yellow,cyan \"pnpm build:weapp\" \"pnpm build:tt\"",
10
- "build:server": "pnpm --filter server build",
11
- "build:tt": "taro build --type tt",
12
- "build:weapp": "taro build --type weapp",
13
- "build:web": "taro build --type h5",
14
- "dev": "pnpm exec concurrently --kill-others --kill-signal SIGKILL -n web,server -c blue,green \"pnpm dev:web\" \"pnpm dev:server\"",
15
- "dev:server": "pnpm --filter server dev",
16
- "dev:tt": "taro build --type tt --watch",
17
- "dev:weapp": "taro build --type weapp --watch",
18
- "dev:web": "taro build --type h5 --watch",
19
- "ensure:deps": "node -e \"const fs=require('fs'); const bins=['node_modules/.bin/concurrently','node_modules/.bin/tsc','node_modules/.bin/eslint','node_modules/.bin/taro']; process.exit(bins.every((p)=>fs.existsSync(p)||fs.existsSync(p+'.cmd'))?0:1)\" || pnpm install --registry=https://registry.npmmirror.com --prefer-frozen-lockfile --prefer-offline --reporter=append-only || pnpm install --registry=https://registry.npmjs.org --no-frozen-lockfile --reporter=append-only",
20
- "prebuild": "pnpm run ensure:deps",
21
- "predev": "pnpm run ensure:deps",
22
- "preinstall": "node -e \"const ua=process.env.npm_config_user_agent||''; if(!ua.includes('pnpm')){console.error('Use pnpm to install dependencies.'); process.exit(1)}\"",
23
- "postinstall": "weapp-tw patch",
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'",
25
- "lint": "eslint \"src/**/*.{js,jsx,ts,tsx,css}\"",
26
- "lint:build": "eslint \"src/**/*.{js,jsx,ts,tsx,css}\" --max-warnings=0",
27
- "lint:fix": "eslint \"src/**/*.{js,jsx,ts,tsx,css}\" --fix",
28
- "new": "taro new",
29
- "preview:tt": "taro build --type tt --preview",
30
- "preview:weapp": "taro build --type weapp --preview",
31
- "tsc": "pnpm exec tsc --noEmit --skipLibCheck",
32
- "validate": "pnpm exec concurrently --kill-others-on-fail --kill-signal SIGKILL -n lint,tsc -c red,blue \"pnpm lint:build\" \"pnpm tsc\""
33
- },
34
- "lint-staged": {
35
- "src/**/*.{js,jsx,ts,tsx,css}": [
36
- "eslint"
37
- ]
38
- },
39
- "browserslist": [
40
- "last 3 versions",
41
- "Android >= 4.1",
42
- "ios >= 8"
43
- ],
44
- "dependencies": {
45
- "@babel/runtime": "^7.24.4",
46
- "@tarojs/components": "4.2.1",
47
- "@tarojs/helper": "4.2.1",
48
- "@tarojs/plugin-framework-react": "4.2.1",
49
- "@tarojs/plugin-platform-h5": "4.2.1",
50
- "@tarojs/plugin-platform-tt": "4.2.1",
51
- "@tarojs/plugin-platform-weapp": "4.2.1",
52
- "@tarojs/react": "4.2.1",
53
- "@tarojs/runtime": "4.2.1",
54
- "@tarojs/shared": "4.2.1",
55
- "@tarojs/taro": "4.2.1",
56
- "class-variance-authority": "^0.7.1",
57
- "clsx": "^2.1.1",
58
- "date-fns": "^4.1.0",
59
- "lucide-react-taro": "^1.4.1",
60
- "react": "^18.0.0",
61
- "react-dom": "^18.0.0",
62
- "tailwind-merge": "^3.5.0",
63
- "tailwindcss-animate": "^1.0.7",
64
- "zustand": "^5.0.9"
65
- },
66
- "devDependencies": {
67
- "@babel/core": "^7.24.4",
68
- "@babel/plugin-transform-class-properties": "7.25.9",
69
- "@babel/preset-react": "^7.24.1",
70
- "@eslint/eslintrc": "^3.3.1",
71
- "@tailwindcss/postcss": "^4.1.18",
72
- "@tarojs/cli": "4.2.1",
73
- "@tarojs/plugin-generator": "4.2.1",
74
- "@tarojs/plugin-mini-ci": "4.2.1",
75
- "@tarojs/vite-runner": "4.2.1",
76
- "@types/minimatch": "^5",
77
- "@types/react": "^18.0.0",
78
- "@vitejs/plugin-react": "^4.3.0",
79
- "babel-preset-taro": "4.2.1",
80
- "concurrently": "^9.2.1",
81
- "dotenv": "^17.2.3",
82
- "eslint": "^8.57.0",
83
- "eslint-config-taro": "4.2.1",
84
- "eslint-plugin-react": "^7.34.1",
85
- "eslint-plugin-react-hooks": "^4.4.0",
86
- "eslint-plugin-tailwindcss": "^3.18.2",
87
- "less": "^4.2.0",
88
- "lint-staged": "^16.1.2",
89
- "miniprogram-ci": "^2.1.26",
90
- "postcss": "^8.5.6",
91
- "react-refresh": "^0.14.0",
92
- "stylelint": "^16.4.0",
93
- "stylelint-config-standard": "^38.0.0",
94
- "tailwindcss": "^4.1.18",
95
- "terser": "^5.30.4",
96
- "tt-ide-cli": "^0.1.31",
97
- "typescript": "^5.4.5",
98
- "vite": "^4.2.0",
99
- "weapp-tailwindcss": "^4.10.3",
100
- "@tarojs/binding": "4.2.1"
101
- },
102
- "packageManager": "pnpm@9.0.0",
103
- "engines": {
104
- "pnpm": ">=9.0.0"
105
- },
106
- "pnpm": {
107
- "overrides": {
108
- "confbox": "0.2.2",
109
- "decode-uri-component": "0.2.2",
110
- "regenerate-unicode-properties": "10.2.2",
111
- "reflect-metadata": "0.2.2"
112
- }
113
- },
114
- "templateInfo": {
115
- "name": "default",
116
- "typescript": true,
117
- "css": "Less",
118
- "framework": "React"
119
- }
120
- }
1
+ {
2
+ "name": "<%= appName %>",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "description": "LICOS Mini Program Application",
6
+ "scripts": {
7
+ "build": "pnpm exec concurrently --kill-others-on-fail --kill-signal SIGKILL -n lint,tsc,web,server -c red,blue,green,magenta \"pnpm lint:build\" \"pnpm tsc\" \"pnpm build:web\" \"pnpm build:server\"",
8
+ "build:all": "pnpm exec concurrently --kill-others-on-fail --kill-signal SIGKILL -n lint,tsc,web,weapp,tt,server -c red,blue,green,yellow,cyan,magenta \"pnpm lint:build\" \"pnpm tsc\" \"pnpm build:web\" \"pnpm build:weapp\" \"pnpm build:tt\" \"pnpm build:server\"",
9
+ "build:pack": "pnpm exec concurrently --kill-others-on-fail --kill-signal SIGKILL -n weapp,tt -c yellow,cyan \"pnpm build:weapp\" \"pnpm build:tt\"",
10
+ "build:server": "pnpm --filter server build",
11
+ "build:tt": "taro build --type tt",
12
+ "build:weapp": "taro build --type weapp",
13
+ "build:web": "taro build --type h5",
14
+ "dev": "pnpm exec concurrently --kill-others --kill-signal SIGKILL -n web,server -c blue,green \"pnpm dev:web\" \"pnpm dev:server\"",
15
+ "dev:server": "pnpm --filter server dev",
16
+ "dev:tt": "taro build --type tt --watch",
17
+ "dev:weapp": "taro build --type weapp --watch",
18
+ "dev:web": "taro build --type h5 --watch",
19
+ "ensure:deps": "node -e \"const fs=require('fs'); const bins=['node_modules/.bin/concurrently','node_modules/.bin/tsc','node_modules/.bin/eslint','node_modules/.bin/taro']; process.exit(bins.every((p)=>fs.existsSync(p)||fs.existsSync(p+'.cmd'))?0:1)\" || pnpm install --registry=https://registry.npmmirror.com --prefer-frozen-lockfile --prefer-offline --reporter=append-only || pnpm install --registry=https://registry.npmjs.org --no-frozen-lockfile --reporter=append-only",
20
+ "prebuild": "pnpm run ensure:deps",
21
+ "predev": "pnpm run ensure:deps",
22
+ "preinstall": "node -e \"const ua=process.env.npm_config_user_agent||''; if(!ua.includes('pnpm')){console.error('Use pnpm to install dependencies.'); process.exit(1)}\"",
23
+ "postinstall": "weapp-tw patch",
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'",
25
+ "lint": "eslint \"src/**/*.{js,jsx,ts,tsx,css}\"",
26
+ "lint:build": "eslint \"src/**/*.{js,jsx,ts,tsx,css}\" --max-warnings=0",
27
+ "lint:fix": "eslint \"src/**/*.{js,jsx,ts,tsx,css}\" --fix",
28
+ "new": "taro new",
29
+ "preview:tt": "taro build --type tt --preview",
30
+ "preview:weapp": "taro build --type weapp --preview",
31
+ "tsc": "pnpm exec tsc --noEmit --skipLibCheck",
32
+ "validate": "pnpm exec concurrently --kill-others-on-fail --kill-signal SIGKILL -n lint,tsc -c red,blue \"pnpm lint:build\" \"pnpm tsc\""
33
+ },
34
+ "lint-staged": {
35
+ "src/**/*.{js,jsx,ts,tsx,css}": [
36
+ "eslint"
37
+ ]
38
+ },
39
+ "browserslist": [
40
+ "last 3 versions",
41
+ "Android >= 4.1",
42
+ "ios >= 8"
43
+ ],
44
+ "dependencies": {
45
+ "@babel/runtime": "^7.24.4",
46
+ "@tarojs/components": "4.2.1",
47
+ "@tarojs/helper": "4.2.1",
48
+ "@tarojs/plugin-framework-react": "4.2.1",
49
+ "@tarojs/plugin-platform-h5": "4.2.1",
50
+ "@tarojs/plugin-platform-tt": "4.2.1",
51
+ "@tarojs/plugin-platform-weapp": "4.2.1",
52
+ "@tarojs/react": "4.2.1",
53
+ "@tarojs/runtime": "4.2.1",
54
+ "@tarojs/shared": "4.2.1",
55
+ "@tarojs/taro": "4.2.1",
56
+ "class-variance-authority": "^0.7.1",
57
+ "clsx": "^2.1.1",
58
+ "date-fns": "^4.1.0",
59
+ "lucide-react-taro": "^1.4.1",
60
+ "react": "^18.0.0",
61
+ "react-dom": "^18.0.0",
62
+ "tailwind-merge": "^3.5.0",
63
+ "tailwindcss-animate": "^1.0.7",
64
+ "zustand": "^5.0.9"
65
+ },
66
+ "devDependencies": {
67
+ "@babel/core": "^7.24.4",
68
+ "@babel/plugin-transform-class-properties": "7.25.9",
69
+ "@babel/preset-react": "^7.24.1",
70
+ "@eslint/eslintrc": "^3.3.1",
71
+ "@tailwindcss/postcss": "^4.1.18",
72
+ "@tarojs/cli": "4.2.1",
73
+ "@tarojs/plugin-generator": "4.2.1",
74
+ "@tarojs/plugin-mini-ci": "4.2.1",
75
+ "@tarojs/vite-runner": "4.2.1",
76
+ "@types/minimatch": "^5",
77
+ "@types/react": "^18.0.0",
78
+ "@vitejs/plugin-react": "^4.3.0",
79
+ "babel-preset-taro": "4.2.1",
80
+ "concurrently": "^9.2.1",
81
+ "dotenv": "^17.2.3",
82
+ "eslint": "^8.57.0",
83
+ "eslint-config-taro": "4.2.1",
84
+ "eslint-plugin-react": "^7.34.1",
85
+ "eslint-plugin-react-hooks": "^4.4.0",
86
+ "eslint-plugin-tailwindcss": "^3.18.2",
87
+ "less": "^4.2.0",
88
+ "lint-staged": "^16.1.2",
89
+ "miniprogram-ci": "^2.1.26",
90
+ "postcss": "^8.5.6",
91
+ "react-refresh": "^0.14.0",
92
+ "stylelint": "^16.4.0",
93
+ "stylelint-config-standard": "^38.0.0",
94
+ "tailwindcss": "^4.1.18",
95
+ "terser": "^5.30.4",
96
+ "tt-ide-cli": "^0.1.31",
97
+ "typescript": "^5.4.5",
98
+ "vite": "^4.2.0",
99
+ "weapp-tailwindcss": "^4.10.3",
100
+ "@tarojs/binding": "4.2.1"
101
+ },
102
+ "packageManager": "pnpm@9.0.0",
103
+ "engines": {
104
+ "pnpm": ">=9.0.0"
105
+ },
106
+ "pnpm": {
107
+ "overrides": {
108
+ "confbox": "0.2.2",
109
+ "decode-uri-component": "0.2.2",
110
+ "regenerate-unicode-properties": "10.2.2",
111
+ "reflect-metadata": "0.2.2"
112
+ }
113
+ },
114
+ "templateInfo": {
115
+ "name": "default",
116
+ "typescript": true,
117
+ "css": "Less",
118
+ "framework": "React"
119
+ }
120
+ }
@@ -181,11 +181,11 @@ importers:
181
181
  server:
182
182
  dependencies:
183
183
  '@kmlckj/licos-dev-sdk':
184
- specifier: 0.5.0
185
- version: 0.5.0
184
+ specifier: 0.5.1
185
+ version: 0.5.1
186
186
  '@kmlckj/licos-platform-sdk':
187
- specifier: 0.15.5
188
- version: 0.15.5
187
+ specifier: 0.15.6
188
+ version: 0.15.6
189
189
  '@nestjs/common':
190
190
  specifier: ^10.4.15
191
191
  version: 10.4.22(reflect-metadata@0.2.2)(rxjs@7.8.2)
@@ -2590,12 +2590,12 @@ packages:
2590
2590
  '@keyv/serialize@1.1.1':
2591
2591
  resolution: {integrity: sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA==}
2592
2592
 
2593
- '@kmlckj/licos-dev-sdk@0.5.0':
2594
- resolution: {tarball: https://registry.npmmirror.com/@kmlckj/licos-dev-sdk/-/licos-dev-sdk-0.5.0.tgz}
2593
+ '@kmlckj/licos-dev-sdk@0.5.1':
2594
+ resolution: {tarball: https://registry.npmmirror.com/@kmlckj/licos-dev-sdk/-/licos-dev-sdk-0.5.1.tgz}
2595
2595
  engines: {node: '>=18.17'}
2596
2596
 
2597
- '@kmlckj/licos-platform-sdk@0.15.5':
2598
- resolution: {integrity: sha512-Ywzi3ktucJtpI3BM4G5TjT4G6I4iMLBAKlF4fXcNPcUZ2cRUlzRSPwqQsD5eQDUMLycqwniYP4W7mteNZG0K1Q==}
2597
+ '@kmlckj/licos-platform-sdk@0.15.6':
2598
+ resolution: {tarball: https://registry.npmmirror.com/@kmlckj/licos-platform-sdk/-/licos-platform-sdk-0.15.6.tgz}
2599
2599
 
2600
2600
  '@leejim/wxml-parser@0.1.6':
2601
2601
  resolution: {integrity: sha512-1u4ULGK4GKkWhTlc3Hmac8PknrmpGd7qxZOTnT/Bm6EZ/wtonLgFhJ4vyuiUZpeCptnknOLkRpGx2Um9npwdZw==}
@@ -12408,9 +12408,9 @@ snapshots:
12408
12408
 
12409
12409
  '@keyv/serialize@1.1.1': {}
12410
12410
 
12411
- '@kmlckj/licos-dev-sdk@0.5.0': {}
12411
+ '@kmlckj/licos-dev-sdk@0.5.1': {}
12412
12412
 
12413
- '@kmlckj/licos-platform-sdk@0.15.5':
12413
+ '@kmlckj/licos-platform-sdk@0.15.6':
12414
12414
  dependencies:
12415
12415
  ajv: 8.17.1
12416
12416
  ajv-formats: 3.0.1(ajv@8.17.1)
@@ -11,8 +11,8 @@
11
11
  "start:prod": "node dist/main"
12
12
  },
13
13
  "dependencies": {
14
- "@kmlckj/licos-dev-sdk": "0.5.0",
15
- "@kmlckj/licos-platform-sdk": "0.15.5",
14
+ "@kmlckj/licos-dev-sdk": "0.5.1",
15
+ "@kmlckj/licos-platform-sdk": "0.15.6",
16
16
  "@nestjs/common": "^10.4.15",
17
17
  "@nestjs/core": "^10.4.15",
18
18
  "@nestjs/platform-express": "^10.4.15",
@@ -3,7 +3,7 @@
3
3
  "templates": [
4
4
  {
5
5
  "name": "agent",
6
- "description": "Agent(智能体项目):`licos init ${LICOS_PROJECT_PATH} --template agent --skip-install --skip-dev --skip-commit`\n- 适用:Python + LangGraph/LangChain 智能体项目\n- README.md 介绍项目结构与开发步骤,AGENTS.md 记录项目实际实现和用户选择\n- 功能、API、配置字段及限制从 SDK.md 定位实际安装版本的 SDK 文档,按需查阅\n- examples/README.md 说明示例接入;DATABASE.md、UPGRADING.md 分别说明持久化准备和已有项目升级\n- 项目源码位于 /workspace/projects,平台数据位于 /workspace/.licos",
6
+ "description": "Agent(智能体项目):`licos init ${LICOS_PROJECT_PATH} --template agent --skip-install --skip-dev --skip-commit`\n- 适用:Python + LangGraph/LangChain 智能体项目\n- README.md 介绍项目结构与开发步骤,AGENTS.md 记录项目实际实现和用户选择\n- examples/README.md 说明示例接入;DATABASE.md、UPGRADING.md 分别说明持久化准备和已有项目升级\n- 项目源码位于 /workspace/projects,平台数据位于 /workspace/.licos",
7
7
  "location": "./agent",
8
8
  "paramsSchema": {
9
9
  "type": "object",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  {
30
30
  "name": "workflow",
31
- "description": "Workflow(工作流项目):`licos init ${LICOS_PROJECT_PATH} --template workflow`\n- 适用:Python + LangGraph 工作流项目\n- README.md 说明结构与接入,AGENTS.md 记录项目实际实现和用户选择\n- 功能、API、配置及限制按 SDK.md 查当前安装版本文档,不复制功能全集\n- DATABASE.md 与 UPGRADING.md 分别说明持久化准备和已有项目升级",
31
+ "description": "Workflow(工作流项目):`licos init ${LICOS_PROJECT_PATH} --template workflow`\n- 适用:Python + LangGraph 工作流项目\n- README.md 说明结构与接入,AGENTS.md 记录项目实际实现和用户选择\n- DATABASE.md 与 UPGRADING.md 分别说明持久化准备和已有项目升级",
32
32
  "location": "./workflow",
33
33
  "paramsSchema": {
34
34
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  # 项目上下文
2
2
 
3
- 平台能力接入先读 [SDK.md](SDK.md),再查项目实际安装版本的 SDK 文档。
3
+ 平台能力接入先读 项目实际安装版本的 SDK 文档,再查项目实际安装版本的 SDK 文档。
4
4
 
5
5
  ## 技术栈
6
6
 
@@ -14,8 +14,8 @@
14
14
  "ts-check": "tsc -p tsconfig.json"
15
15
  },
16
16
  "dependencies": {
17
- "@kmlckj/licos-dev-sdk": "0.5.0",
18
- "@kmlckj/licos-platform-sdk": "0.15.5",
17
+ "@kmlckj/licos-dev-sdk": "0.5.1",
18
+ "@kmlckj/licos-platform-sdk": "0.15.6",
19
19
  "dotenv": "^17.2.3",
20
20
  "express": "^4.21.2"
21
21
  },
@@ -13,11 +13,11 @@ importers:
13
13
  .:
14
14
  dependencies:
15
15
  '@kmlckj/licos-dev-sdk':
16
- specifier: 0.5.0
17
- version: 0.5.0
16
+ specifier: 0.5.1
17
+ version: 0.5.1
18
18
  '@kmlckj/licos-platform-sdk':
19
- specifier: 0.15.5
20
- version: 0.15.5
19
+ specifier: 0.15.6
20
+ version: 0.15.6
21
21
  dotenv:
22
22
  specifier: ^17.2.3
23
23
  version: 17.2.4
@@ -291,12 +291,12 @@ packages:
291
291
  '@jridgewell/trace-mapping@0.3.31':
292
292
  resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}
293
293
 
294
- '@kmlckj/licos-dev-sdk@0.5.0':
295
- resolution: {tarball: https://registry.npmmirror.com/@kmlckj/licos-dev-sdk/-/licos-dev-sdk-0.5.0.tgz}
294
+ '@kmlckj/licos-dev-sdk@0.5.1':
295
+ resolution: {tarball: https://registry.npmmirror.com/@kmlckj/licos-dev-sdk/-/licos-dev-sdk-0.5.1.tgz}
296
296
  engines: {node: '>=18.17'}
297
297
 
298
- '@kmlckj/licos-platform-sdk@0.15.5':
299
- resolution: {integrity: sha512-Ywzi3ktucJtpI3BM4G5TjT4G6I4iMLBAKlF4fXcNPcUZ2cRUlzRSPwqQsD5eQDUMLycqwniYP4W7mteNZG0K1Q==}
298
+ '@kmlckj/licos-platform-sdk@0.15.6':
299
+ resolution: {tarball: https://registry.npmmirror.com/@kmlckj/licos-platform-sdk/-/licos-platform-sdk-0.15.6.tgz}
300
300
 
301
301
  '@nodelib/fs.scandir@2.1.5':
302
302
  resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
@@ -1744,9 +1744,9 @@ snapshots:
1744
1744
  '@jridgewell/resolve-uri': 3.1.2
1745
1745
  '@jridgewell/sourcemap-codec': 1.5.5
1746
1746
 
1747
- '@kmlckj/licos-dev-sdk@0.5.0': {}
1747
+ '@kmlckj/licos-dev-sdk@0.5.1': {}
1748
1748
 
1749
- '@kmlckj/licos-platform-sdk@0.15.5':
1749
+ '@kmlckj/licos-platform-sdk@0.15.6':
1750
1750
  dependencies:
1751
1751
  ajv: 8.17.1
1752
1752
  ajv-formats: 3.0.1(ajv@8.17.1)
@@ -1,130 +1,130 @@
1
-
2
- import { spawn } from 'child_process';
3
- import { resolve, join, basename, dirname } from 'path';
4
- import { appendFileSync, openSync, closeSync, mkdirSync } from 'fs';
5
- import { fileURLToPath } from 'url';
6
-
7
- const __filename = fileURLToPath(import.meta.url);
8
- const __dirname = dirname(__filename);
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
- export const paramsSchema = {
19
- type: 'object',
20
- properties: {
21
- appName: {
22
- type: 'string',
23
- minLength: 1,
24
- pattern: '^[a-z0-9-]+$',
25
- description:
26
- 'Application name (lowercase, alphanumeric and hyphens only)',
27
- },
28
- port: {
29
- type: 'number',
30
- default: 5000,
31
- minimum: 1024,
32
- maximum: 65535,
33
- description: 'Development server port',
34
- },
35
- hmrPort: {
36
- type: 'number',
37
- default: 6000,
38
- minimum: 1024,
39
- maximum: 65535,
40
- description: 'Development HMR server port',
41
- },
42
- },
43
- required: [],
44
- additionalProperties: false,
45
- };
46
-
47
- const description = `Vite(简单项目):\`licos init \${LICOS_PROJECT_PATH} --template vite\`
48
- - 适用:轻量级 SPA、纯前端交互、仪表盘等轻量级项目。`;
49
-
50
- const config = {
51
- description: description,
52
- paramsSchema,
53
-
54
- defaultParams: {
55
- port: 5000,
56
- hmrPort: 6000,
57
- appName: 'projects',
58
- },
59
-
60
- onBeforeRender: async context => {
61
- console.log(
62
- `Creating Vanilla TypeScript + Vite project: ${context.appName}`,
63
- );
64
- return context;
65
- },
66
-
67
- onAfterRender: async (_context, outputPath) => {
68
- console.log(`\nProject created at: ${outputPath}`);
69
- console.log('\nConfiguration:');
70
- console.log(' - Framework: vite');
71
- console.log(' - TypeScript: enabled');
72
- console.log(' - App Router: enabled');
73
- console.log(` - Port: ${_context.port}`);
74
- },
75
-
76
- onComplete: async (_context, outputPath) => {
77
- if (process.env.NODE_ENV === 'test') {
78
- console.log('⊘ Skipping dependency install in test environment');
79
- return;
80
- }
81
- if (_context.options?.skipInstall) {
82
- console.log('⊘ Skipping dependency install because --skip-install was provided');
83
- return;
84
- }
85
-
86
- const cmd = 'bash';
87
- const args = [
88
- '-lc',
89
- 'pnpm install --registry=https://registry.npmmirror.com --prefer-frozen-lockfile --prefer-offline --reporter=append-only || pnpm install --registry=https://registry.npmjs.org --no-frozen-lockfile --reporter=append-only',
90
- ];
91
- console.log(
92
- `\nTriggering: ${cmd} ${args.join(' ')} (running in background)`,
93
- );
94
-
95
- try {
96
- const projectRoot = resolve(outputPath);
97
-
98
- const logDir = process.env.LICOS_LOG_DIR || resolve(__dirname, '../.log');
99
- mkdirSync(logDir, { recursive: true });
100
-
101
- const projectName = basename(projectRoot);
102
- const logFile = join(logDir, `${projectName}-init.log`);
103
-
104
- const timestamp = new Date().toISOString();
105
- appendFileSync(
106
- logFile,
107
- `\n=== [${timestamp}] ${cmd} ${args.join(' ')} ===\n`,
108
- );
109
-
110
- const logFd = openSync(logFile, 'a');
111
-
112
- const child = spawn(cmd, args, {
113
- cwd: projectRoot,
114
- detached: true,
115
- stdio: ['ignore', logFd, logFd],
116
- });
117
-
118
- child.unref();
119
- closeSync(logFd);
120
-
121
- console.log('✓ pnpm install triggered (running in background)');
122
- console.log(` Log file: ${logFile}`);
123
- } catch (error) {
124
- console.error('✗ Failed to trigger pnpm install:', error);
125
- console.log(' You can manually run: pnpm install --registry=https://registry.npmmirror.com || pnpm install --registry=https://registry.npmjs.org --no-frozen-lockfile');
126
- }
127
- },
128
- };
129
-
130
- export default config;
1
+
2
+ import { spawn } from 'child_process';
3
+ import { resolve, join, basename, dirname } from 'path';
4
+ import { appendFileSync, openSync, closeSync, mkdirSync } from 'fs';
5
+ import { fileURLToPath } from 'url';
6
+
7
+ const __filename = fileURLToPath(import.meta.url);
8
+ const __dirname = dirname(__filename);
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+ export const paramsSchema = {
19
+ type: 'object',
20
+ properties: {
21
+ appName: {
22
+ type: 'string',
23
+ minLength: 1,
24
+ pattern: '^[a-z0-9-]+$',
25
+ description:
26
+ 'Application name (lowercase, alphanumeric and hyphens only)',
27
+ },
28
+ port: {
29
+ type: 'number',
30
+ default: 5000,
31
+ minimum: 1024,
32
+ maximum: 65535,
33
+ description: 'Development server port',
34
+ },
35
+ hmrPort: {
36
+ type: 'number',
37
+ default: 6000,
38
+ minimum: 1024,
39
+ maximum: 65535,
40
+ description: 'Development HMR server port',
41
+ },
42
+ },
43
+ required: [],
44
+ additionalProperties: false,
45
+ };
46
+
47
+ const description = `Vite(简单项目):\`licos init \${LICOS_PROJECT_PATH} --template vite\`
48
+ - 适用:轻量级 SPA、纯前端交互、仪表盘等轻量级项目。`;
49
+
50
+ const config = {
51
+ description: description,
52
+ paramsSchema,
53
+
54
+ defaultParams: {
55
+ port: 5000,
56
+ hmrPort: 6000,
57
+ appName: 'projects',
58
+ },
59
+
60
+ onBeforeRender: async context => {
61
+ console.log(
62
+ `Creating Vanilla TypeScript + Vite project: ${context.appName}`,
63
+ );
64
+ return context;
65
+ },
66
+
67
+ onAfterRender: async (_context, outputPath) => {
68
+ console.log(`\nProject created at: ${outputPath}`);
69
+ console.log('\nConfiguration:');
70
+ console.log(' - Framework: vite');
71
+ console.log(' - TypeScript: enabled');
72
+ console.log(' - App Router: enabled');
73
+ console.log(` - Port: ${_context.port}`);
74
+ },
75
+
76
+ onComplete: async (_context, outputPath) => {
77
+ if (process.env.NODE_ENV === 'test') {
78
+ console.log('⊘ Skipping dependency install in test environment');
79
+ return;
80
+ }
81
+ if (_context.options?.skipInstall) {
82
+ console.log('⊘ Skipping dependency install because --skip-install was provided');
83
+ return;
84
+ }
85
+
86
+ const cmd = 'bash';
87
+ const args = [
88
+ '-lc',
89
+ 'pnpm install --registry=https://registry.npmmirror.com --prefer-frozen-lockfile --prefer-offline --reporter=append-only || pnpm install --registry=https://registry.npmjs.org --no-frozen-lockfile --reporter=append-only',
90
+ ];
91
+ console.log(
92
+ `\nTriggering: ${cmd} ${args.join(' ')} (running in background)`,
93
+ );
94
+
95
+ try {
96
+ const projectRoot = resolve(outputPath);
97
+
98
+ const logDir = process.env.LICOS_LOG_DIR || resolve(__dirname, '../.log');
99
+ mkdirSync(logDir, { recursive: true });
100
+
101
+ const projectName = basename(projectRoot);
102
+ const logFile = join(logDir, `${projectName}-init.log`);
103
+
104
+ const timestamp = new Date().toISOString();
105
+ appendFileSync(
106
+ logFile,
107
+ `\n=== [${timestamp}] ${cmd} ${args.join(' ')} ===\n`,
108
+ );
109
+
110
+ const logFd = openSync(logFile, 'a');
111
+
112
+ const child = spawn(cmd, args, {
113
+ cwd: projectRoot,
114
+ detached: true,
115
+ stdio: ['ignore', logFd, logFd],
116
+ });
117
+
118
+ child.unref();
119
+ closeSync(logFd);
120
+
121
+ console.log('✓ pnpm install triggered (running in background)');
122
+ console.log(` Log file: ${logFile}`);
123
+ } catch (error) {
124
+ console.error('✗ Failed to trigger pnpm install:', error);
125
+ console.log(' You can manually run: pnpm install --registry=https://registry.npmmirror.com || pnpm install --registry=https://registry.npmjs.org --no-frozen-lockfile');
126
+ }
127
+ },
128
+ };
129
+
130
+ export default config;