@kmlckj/licos-ai-cli 0.0.9 → 0.0.11

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/README.md +1 -8
  2. package/lib/__templates__/agent/pyproject.toml +1 -1
  3. package/lib/__templates__/agent/requirements.txt +1 -1
  4. package/lib/__templates__/expo/.licos +4 -4
  5. package/lib/__templates__/expo/server/package.json +35 -35
  6. package/lib/__templates__/native-static/template.config.js +1 -1
  7. package/lib/__templates__/nextjs/package.json +93 -93
  8. package/lib/__templates__/nextjs/scripts/build.sh +2 -2
  9. package/lib/__templates__/nextjs/scripts/dev.sh +3 -3
  10. package/lib/__templates__/nextjs/scripts/prepare.sh +2 -2
  11. package/lib/__templates__/nextjs/scripts/start.sh +2 -2
  12. package/lib/__templates__/nextjs/template.config.js +1 -1
  13. package/lib/__templates__/nuxt-vue/package.json +35 -35
  14. package/lib/__templates__/nuxt-vue/scripts/build.sh +2 -2
  15. package/lib/__templates__/nuxt-vue/scripts/dev.sh +3 -3
  16. package/lib/__templates__/nuxt-vue/scripts/prepare.sh +2 -2
  17. package/lib/__templates__/nuxt-vue/scripts/start.sh +2 -2
  18. package/lib/__templates__/nuxt-vue/template.config.js +1 -1
  19. package/lib/__templates__/taro/.licos +5 -5
  20. package/lib/__templates__/taro/.licosproj/scripts/deploy_build.sh +3 -1
  21. package/lib/__templates__/taro/.licosproj/scripts/deploy_run.sh +3 -2
  22. package/lib/__templates__/taro/.licosproj/scripts/dev_run.sh +5 -2
  23. package/lib/__templates__/taro/.licosproj/scripts/init_env.sh +3 -1
  24. package/lib/__templates__/taro/server/package.json +40 -40
  25. package/lib/__templates__/taro/template.config.js +1 -1
  26. package/lib/__templates__/templates.json +30 -5
  27. package/lib/__templates__/vite/package.json +44 -44
  28. package/lib/__templates__/vite/scripts/build.sh +2 -2
  29. package/lib/__templates__/vite/scripts/dev.sh +3 -3
  30. package/lib/__templates__/vite/scripts/prepare.sh +2 -2
  31. package/lib/__templates__/vite/scripts/start.sh +2 -2
  32. package/lib/__templates__/vite/template.config.js +1 -1
  33. package/lib/__templates__/workflow/.licos +14 -0
  34. package/lib/__templates__/workflow/README.md +34 -0
  35. package/lib/__templates__/workflow/_gitignore +10 -0
  36. package/lib/__templates__/workflow/pyproject.toml +13 -0
  37. package/lib/__templates__/workflow/requirements.txt +1 -0
  38. package/lib/__templates__/workflow/scripts/http_run.sh +29 -0
  39. package/lib/__templates__/workflow/scripts/local_run.sh +12 -0
  40. package/lib/__templates__/workflow/scripts/pack.sh +23 -0
  41. package/lib/__templates__/workflow/scripts/setup.sh +44 -0
  42. package/lib/__templates__/workflow/src/graphs/__init__.py +1 -0
  43. package/lib/__templates__/workflow/src/graphs/graph.py +36 -0
  44. package/lib/__templates__/workflow/src/main.py +7 -0
  45. package/lib/__templates__/workflow/template.config.js +45 -0
  46. package/lib/cli.js +1 -1
  47. package/package.json +1 -1
@@ -30,11 +30,4 @@ bash scripts/http_run.sh -p <%= port %>
30
30
  - `POST /cancel/{run_id}`
31
31
  - `POST /node_run/{node_id}`
32
32
  - `GET /graph_parameter`
33
- - `POST /v1/chat/completions`
34
-
35
- ## 工作区约定
36
-
37
- - `LICOS_WORKSPACE_PATH=/workspace`
38
- - `LICOS_PROJECT_PATH=/workspace/projects`
39
- - `.licos/` 平台数据目录只允许位于 `/workspace/.licos`
40
- - 当前项目源码只放在 `/workspace/projects`
33
+ - `POST /v1/chat/completions`
@@ -4,7 +4,7 @@ version = "0.1.0"
4
4
  description = "LICOS LangGraph agent project"
5
5
  requires-python = ">=3.12"
6
6
  dependencies = [
7
- "licos-agent-runtime>=0.1.0",
7
+ "licos-agent-runtime>=0.2.1",
8
8
  ]
9
9
 
10
10
  [tool.uv]
@@ -1 +1 @@
1
- licos-agent-runtime>=0.1.0
1
+ licos-agent-runtime>=0.2.1
@@ -3,10 +3,10 @@ entrypoint = "server.js"
3
3
  requires = ["nodejs-24"]
4
4
 
5
5
  [dev]
6
- build = ["bash", ".cozeproj/scripts/dev_build.sh"]
7
- run = ["bash", ".cozeproj/scripts/dev_run.sh"]
6
+ build = ["bash", ".licosproj/scripts/dev_build.sh"]
7
+ run = ["bash", ".licosproj/scripts/dev_run.sh"]
8
8
 
9
9
  [deploy]
10
- build = ["bash", ".cozeproj/scripts/prod_build.sh"]
11
- run = ["bash", ".cozeproj/scripts/prod_run.sh"]
10
+ build = ["bash", ".licosproj/scripts/prod_build.sh"]
11
+ run = ["bash", ".licosproj/scripts/prod_run.sh"]
12
12
  build_app_dir = "./client"
@@ -1,35 +1,35 @@
1
- {
2
- "name": "server",
3
- "private": true,
4
- "type": "module",
5
- "scripts": {
6
- "build": "node build.js",
7
- "dev": "bash ../.licosproj/scripts/server_dev_run.sh",
8
- "preinstall": "npx only-allow pnpm",
9
- "start": "NODE_ENV=production PORT=${PORT:-5000} node dist/index.js",
10
- "lint": "tsc --noEmit"
11
- },
12
- "dependencies": {
13
- "@kmlckj/licos-platform-sdk": "0.6.0",
14
- "@supabase/supabase-js": "2.95.3",
15
- "cors": "^2.8.5",
16
- "dayjs": "^1.11.19",
17
- "dotenv": "^17.2.3",
18
- "drizzle-orm": "^0.45.1",
19
- "drizzle-zod": "^0.8.3",
20
- "express": "^4.22.1",
21
- "multer": "^2.0.2",
22
- "pg": "^8.16.3",
23
- "zod": "^4.2.1"
24
- },
25
- "devDependencies": {
26
- "@types/cors": "^2.8.19",
27
- "@types/express": "^5.0.6",
28
- "@types/multer": "^2.0.0",
29
- "@types/pg": "^8.16.0",
30
- "drizzle-kit": "^0.31.8",
31
- "esbuild": "0.27.2",
32
- "tsx": "^4.21.0",
33
- "typescript": "^5.8.3"
34
- }
35
- }
1
+ {
2
+ "name": "server",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "build": "node build.js",
7
+ "dev": "bash ../.licosproj/scripts/server_dev_run.sh",
8
+ "preinstall": "npx only-allow pnpm",
9
+ "start": "NODE_ENV=production PORT=${PORT:-5000} node dist/index.js",
10
+ "lint": "tsc --noEmit"
11
+ },
12
+ "dependencies": {
13
+ "@kmlckj/licos-platform-sdk": "0.6.0",
14
+ "@supabase/supabase-js": "2.95.3",
15
+ "cors": "^2.8.5",
16
+ "dayjs": "^1.11.19",
17
+ "dotenv": "^17.2.3",
18
+ "drizzle-orm": "^0.45.1",
19
+ "drizzle-zod": "^0.8.3",
20
+ "express": "^4.22.1",
21
+ "multer": "^2.0.2",
22
+ "pg": "^8.16.3",
23
+ "zod": "^4.2.1"
24
+ },
25
+ "devDependencies": {
26
+ "@types/cors": "^2.8.19",
27
+ "@types/express": "^5.0.6",
28
+ "@types/multer": "^2.0.0",
29
+ "@types/pg": "^8.16.0",
30
+ "drizzle-kit": "^0.31.8",
31
+ "esbuild": "0.27.2",
32
+ "tsx": "^4.21.0",
33
+ "typescript": "^5.8.3"
34
+ }
35
+ }
@@ -6,7 +6,7 @@
6
6
  // start_aigc
7
7
  const config = {
8
8
  description:
9
- 'Native Static(纯静态):`licos init ${LICOS_WORKSPACE_PATH} --template native-static`\n' +
9
+ 'Native Static(纯静态):`licos init ${LICOS_PROJECT_PATH} --template native-static`\n' +
10
10
  '- 适用:纯静态 HTML/CSS/JS 项目、静态网站\n' +
11
11
  '- 使用 Python http.server 作为开发服务器\n' +
12
12
  '- 不需要 Node.js 环境,适合简单静态内容',
@@ -1,93 +1,93 @@
1
- {
2
- "name": "<%= appName %>",
3
- "version": "0.1.0",
4
- "private": true,
5
- "scripts": {
6
- "build": "bash ./scripts/build.sh",
7
- "dev": "bash ./scripts/dev.sh",
8
- "preinstall": "npx only-allow pnpm",
9
- "lint": "eslint",
10
- "start": "bash ./scripts/start.sh",
11
- "ts-check": "tsc -p tsconfig.json"
12
- },
13
- "dependencies": {
14
- "@kmlckj/licos-platform-sdk": "0.6.0",
15
- "@aws-sdk/client-s3": "^3.958.0",
16
- "@aws-sdk/lib-storage": "^3.958.0",
17
- "@hookform/resolvers": "^5.2.2",
18
- "@radix-ui/react-accordion": "^1.2.12",
19
- "@radix-ui/react-alert-dialog": "^1.1.15",
20
- "@radix-ui/react-aspect-ratio": "^1.1.8",
21
- "@radix-ui/react-avatar": "^1.1.11",
22
- "@radix-ui/react-checkbox": "^1.3.3",
23
- "@radix-ui/react-collapsible": "^1.1.12",
24
- "@radix-ui/react-context-menu": "^2.2.16",
25
- "@radix-ui/react-dialog": "^1.1.15",
26
- "@radix-ui/react-dropdown-menu": "^2.1.16",
27
- "@radix-ui/react-hover-card": "^1.1.15",
28
- "@radix-ui/react-label": "^2.1.8",
29
- "@radix-ui/react-menubar": "^1.1.16",
30
- "@radix-ui/react-navigation-menu": "^1.2.14",
31
- "@radix-ui/react-popover": "^1.1.15",
32
- "@radix-ui/react-progress": "^1.1.8",
33
- "@radix-ui/react-radio-group": "^1.3.8",
34
- "@radix-ui/react-scroll-area": "^1.2.10",
35
- "@radix-ui/react-select": "^2.2.6",
36
- "@radix-ui/react-separator": "^1.1.8",
37
- "@radix-ui/react-slider": "^1.3.6",
38
- "@radix-ui/react-slot": "^1.2.4",
39
- "@radix-ui/react-switch": "^1.2.6",
40
- "@radix-ui/react-tabs": "^1.1.13",
41
- "@radix-ui/react-toggle": "^1.1.10",
42
- "@radix-ui/react-toggle-group": "^1.1.11",
43
- "@radix-ui/react-tooltip": "^1.2.8",
44
- "@supabase/supabase-js": "2.95.3",
45
- "class-variance-authority": "^0.7.1",
46
- "clsx": "^2.1.1",
47
- "cmdk": "^1.1.1",
48
- "date-fns": "^4.1.0",
49
- "dotenv": "^17.2.3",
50
- "drizzle-kit": "^0.31.8",
51
- "drizzle-orm": "^0.45.1",
52
- "drizzle-zod": "^0.8.3",
53
- "embla-carousel-react": "^8.6.0",
54
- "input-otp": "^1.4.2",
55
- "lucide-react": "^0.468.0",
56
- "next": "16.1.1",
57
- "next-themes": "^0.4.6",
58
- "pg": "^8.16.3",
59
- "react": "19.2.3",
60
- "react-day-picker": "^9.13.0",
61
- "react-dom": "19.2.3",
62
- "react-hook-form": "^7.70.0",
63
- "react-resizable-panels": "^4.2.0",
64
- "recharts": "2.15.4",
65
- "sonner": "^2.0.7",
66
- "tailwind-merge": "^2.6.0",
67
- "tw-animate-css": "^1.4.0",
68
- "vaul": "^1.1.2",
69
- "zod": "^4.3.5"
70
- },
71
- "devDependencies": {
72
- "@react-dev-inspector/babel-plugin": "^2.0.1",
73
- "@react-dev-inspector/middleware": "^2.0.1",
74
- "@tailwindcss/postcss": "^4",
75
- "@types/node": "^20",
76
- "@types/pg": "^8.16.0",
77
- "@types/react": "^19",
78
- "@types/react-dom": "^19",
79
- "eslint": "^9",
80
- "eslint-config-next": "16.1.1",
81
- "only-allow": "^1.2.2",
82
- "react-dev-inspector": "^2.0.1",
83
- "shadcn": "latest",
84
- "tailwindcss": "^4",
85
- "tsup": "^8.3.5",
86
- "tsx": "^4.19.2",
87
- "typescript": "^5"
88
- },
89
- "packageManager": "pnpm@9.0.0",
90
- "engines": {
91
- "pnpm": ">=9.0.0"
92
- }
93
- }
1
+ {
2
+ "name": "<%= appName %>",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "build": "bash ./scripts/build.sh",
7
+ "dev": "bash ./scripts/dev.sh",
8
+ "preinstall": "npx only-allow pnpm",
9
+ "lint": "eslint",
10
+ "start": "bash ./scripts/start.sh",
11
+ "ts-check": "tsc -p tsconfig.json"
12
+ },
13
+ "dependencies": {
14
+ "@kmlckj/licos-platform-sdk": "0.6.0",
15
+ "@aws-sdk/client-s3": "^3.958.0",
16
+ "@aws-sdk/lib-storage": "^3.958.0",
17
+ "@hookform/resolvers": "^5.2.2",
18
+ "@radix-ui/react-accordion": "^1.2.12",
19
+ "@radix-ui/react-alert-dialog": "^1.1.15",
20
+ "@radix-ui/react-aspect-ratio": "^1.1.8",
21
+ "@radix-ui/react-avatar": "^1.1.11",
22
+ "@radix-ui/react-checkbox": "^1.3.3",
23
+ "@radix-ui/react-collapsible": "^1.1.12",
24
+ "@radix-ui/react-context-menu": "^2.2.16",
25
+ "@radix-ui/react-dialog": "^1.1.15",
26
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
27
+ "@radix-ui/react-hover-card": "^1.1.15",
28
+ "@radix-ui/react-label": "^2.1.8",
29
+ "@radix-ui/react-menubar": "^1.1.16",
30
+ "@radix-ui/react-navigation-menu": "^1.2.14",
31
+ "@radix-ui/react-popover": "^1.1.15",
32
+ "@radix-ui/react-progress": "^1.1.8",
33
+ "@radix-ui/react-radio-group": "^1.3.8",
34
+ "@radix-ui/react-scroll-area": "^1.2.10",
35
+ "@radix-ui/react-select": "^2.2.6",
36
+ "@radix-ui/react-separator": "^1.1.8",
37
+ "@radix-ui/react-slider": "^1.3.6",
38
+ "@radix-ui/react-slot": "^1.2.4",
39
+ "@radix-ui/react-switch": "^1.2.6",
40
+ "@radix-ui/react-tabs": "^1.1.13",
41
+ "@radix-ui/react-toggle": "^1.1.10",
42
+ "@radix-ui/react-toggle-group": "^1.1.11",
43
+ "@radix-ui/react-tooltip": "^1.2.8",
44
+ "@supabase/supabase-js": "2.95.3",
45
+ "class-variance-authority": "^0.7.1",
46
+ "clsx": "^2.1.1",
47
+ "cmdk": "^1.1.1",
48
+ "date-fns": "^4.1.0",
49
+ "dotenv": "^17.2.3",
50
+ "drizzle-kit": "^0.31.8",
51
+ "drizzle-orm": "^0.45.1",
52
+ "drizzle-zod": "^0.8.3",
53
+ "embla-carousel-react": "^8.6.0",
54
+ "input-otp": "^1.4.2",
55
+ "lucide-react": "^0.468.0",
56
+ "next": "16.1.1",
57
+ "next-themes": "^0.4.6",
58
+ "pg": "^8.16.3",
59
+ "react": "19.2.3",
60
+ "react-day-picker": "^9.13.0",
61
+ "react-dom": "19.2.3",
62
+ "react-hook-form": "^7.70.0",
63
+ "react-resizable-panels": "^4.2.0",
64
+ "recharts": "2.15.4",
65
+ "sonner": "^2.0.7",
66
+ "tailwind-merge": "^2.6.0",
67
+ "tw-animate-css": "^1.4.0",
68
+ "vaul": "^1.1.2",
69
+ "zod": "^4.3.5"
70
+ },
71
+ "devDependencies": {
72
+ "@react-dev-inspector/babel-plugin": "^2.0.1",
73
+ "@react-dev-inspector/middleware": "^2.0.1",
74
+ "@tailwindcss/postcss": "^4",
75
+ "@types/node": "^20",
76
+ "@types/pg": "^8.16.0",
77
+ "@types/react": "^19",
78
+ "@types/react-dom": "^19",
79
+ "eslint": "^9",
80
+ "eslint-config-next": "16.1.1",
81
+ "only-allow": "^1.2.2",
82
+ "react-dev-inspector": "^2.0.1",
83
+ "shadcn": "latest",
84
+ "tailwindcss": "^4",
85
+ "tsup": "^8.3.5",
86
+ "tsx": "^4.19.2",
87
+ "typescript": "^5"
88
+ },
89
+ "packageManager": "pnpm@9.0.0",
90
+ "engines": {
91
+ "pnpm": ">=9.0.0"
92
+ }
93
+ }
@@ -1,9 +1,9 @@
1
1
  #!/bin/bash
2
2
  set -Eeuo pipefail
3
3
 
4
- LICOS_WORKSPACE_PATH="${LICOS_WORKSPACE_PATH:-$(pwd)}"
4
+ PROJECT_DIR="${LICOS_PROJECT_PATH:-${LICOS_WORKSPACE_PATH:-$(pwd)}}"
5
5
 
6
- cd "${LICOS_WORKSPACE_PATH}"
6
+ cd "${PROJECT_DIR}"
7
7
 
8
8
  echo "Installing dependencies..."
9
9
  pnpm install --prefer-frozen-lockfile --prefer-offline --loglevel debug --reporter=append-only
@@ -4,15 +4,15 @@ set -Eeuo pipefail
4
4
  <% if (process.env.NODE_ENV === 'test') { %>
5
5
  # 测试环境:支持环境变量覆盖端口
6
6
  PORT="${PORT:-<%= port %>}"
7
- LICOS_WORKSPACE_PATH="${LICOS_WORKSPACE_PATH:-$(pwd)}"
7
+ PROJECT_DIR="${LICOS_PROJECT_PATH:-${LICOS_WORKSPACE_PATH:-$(pwd)}}"
8
8
  DEPLOY_RUN_PORT="${DEPLOY_RUN_PORT:-${PORT}}"
9
9
  <% } else { %>
10
10
  PORT=<%= port %>
11
- LICOS_WORKSPACE_PATH="${LICOS_WORKSPACE_PATH:-$(pwd)}"
11
+ PROJECT_DIR="${LICOS_PROJECT_PATH:-${LICOS_WORKSPACE_PATH:-$(pwd)}}"
12
12
  DEPLOY_RUN_PORT=<%= port %>
13
13
  <% } %>
14
14
 
15
- cd "${LICOS_WORKSPACE_PATH}"
15
+ cd "${PROJECT_DIR}"
16
16
 
17
17
  kill_port_if_listening() {
18
18
  local pids
@@ -1,9 +1,9 @@
1
1
  #!/bin/bash
2
2
  set -Eeuo pipefail
3
3
 
4
- LICOS_WORKSPACE_PATH="${LICOS_WORKSPACE_PATH:-$(pwd)}"
4
+ PROJECT_DIR="${LICOS_PROJECT_PATH:-${LICOS_WORKSPACE_PATH:-$(pwd)}}"
5
5
 
6
- cd "${LICOS_WORKSPACE_PATH}"
6
+ cd "${PROJECT_DIR}"
7
7
 
8
8
  echo "Installing dependencies..."
9
9
  pnpm install --prefer-frozen-lockfile --prefer-offline --loglevel debug --reporter=append-only
@@ -1,7 +1,7 @@
1
1
  #!/bin/bash
2
2
  set -Eeuo pipefail
3
3
 
4
- LICOS_WORKSPACE_PATH="${LICOS_WORKSPACE_PATH:-$(pwd)}"
4
+ PROJECT_DIR="${LICOS_PROJECT_PATH:-${LICOS_WORKSPACE_PATH:-$(pwd)}}"
5
5
  <% if (process.env.NODE_ENV === 'test') { %>
6
6
  # 测试环境:支持环境变量覆盖端口
7
7
  PORT="${PORT:-<%= port %>}"
@@ -12,7 +12,7 @@ DEPLOY_RUN_PORT="${DEPLOY_RUN_PORT:-$PORT}"
12
12
  <% } %>
13
13
 
14
14
  start_service() {
15
- cd "${LICOS_WORKSPACE_PATH}"
15
+ cd "${PROJECT_DIR}"
16
16
  echo "Starting HTTP service on port ${DEPLOY_RUN_PORT} for deploy..."
17
17
  PORT=${DEPLOY_RUN_PORT} node dist/server.js
18
18
  }
@@ -13,7 +13,7 @@ const __dirname = dirname(__filename);
13
13
 
14
14
 
15
15
 
16
- const description = `Next.js(复杂项目):\`licos init \${LICOS_WORKSPACE_PATH} --template nextjs\`
16
+ const description = `Next.js(复杂项目):\`licos init \${LICOS_PROJECT_PATH} --template nextjs\`
17
17
  - 适用:全栈应用、复杂多页面等复杂项目
18
18
  - 使用默认nextjs项目规范
19
19
  - **目录规范**: 默认开启src目录(打开--src-dir选项):项目文件(如 app 目录、pages 目录、components 等)初始化到 src/ 目录下。
@@ -1,35 +1,35 @@
1
- {
2
- "name": "<%= appName %>",
3
- "version": "0.1.0",
4
- "private": true,
5
- "type": "module",
6
- "scripts": {
7
- "build": "bash ./scripts/build.sh",
8
- "dev": "bash ./scripts/dev.sh",
9
- "generate": "nuxt generate",
10
- "preinstall": "npx only-allow pnpm",
11
- "preview": "nuxt preview",
12
- "start": "bash ./scripts/start.sh"
13
- },
14
- "dependencies": {
15
- "@kmlckj/licos-platform-sdk": "0.6.0",
16
- "@nuxt/image": "^1.8.1",
17
- "nuxt": "^4.3.1",
18
- "tailwind-merge": "^2.6.0",
19
- "vue": "^3.5.30",
20
- "vue-router": "^4.6.4"
21
- },
22
- "devDependencies": {
23
- "@nuxtjs/tailwindcss": "^6.14.0",
24
- "@types/node": "^20",
25
- "autoprefixer": "^10.4.20",
26
- "only-allow": "^1.2.2",
27
- "postcss": "^8.4.49",
28
- "tailwindcss": "^3.4.17",
29
- "typescript": "^5"
30
- },
31
- "packageManager": "pnpm@9.0.0",
32
- "engines": {
33
- "pnpm": ">=9.0.0"
34
- }
35
- }
1
+ {
2
+ "name": "<%= appName %>",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "build": "bash ./scripts/build.sh",
8
+ "dev": "bash ./scripts/dev.sh",
9
+ "generate": "nuxt generate",
10
+ "preinstall": "npx only-allow pnpm",
11
+ "preview": "nuxt preview",
12
+ "start": "bash ./scripts/start.sh"
13
+ },
14
+ "dependencies": {
15
+ "@kmlckj/licos-platform-sdk": "0.6.0",
16
+ "@nuxt/image": "^1.8.1",
17
+ "nuxt": "^4.3.1",
18
+ "tailwind-merge": "^2.6.0",
19
+ "vue": "^3.5.30",
20
+ "vue-router": "^4.6.4"
21
+ },
22
+ "devDependencies": {
23
+ "@nuxtjs/tailwindcss": "^6.14.0",
24
+ "@types/node": "^20",
25
+ "autoprefixer": "^10.4.20",
26
+ "only-allow": "^1.2.2",
27
+ "postcss": "^8.4.49",
28
+ "tailwindcss": "^3.4.17",
29
+ "typescript": "^5"
30
+ },
31
+ "packageManager": "pnpm@9.0.0",
32
+ "engines": {
33
+ "pnpm": ">=9.0.0"
34
+ }
35
+ }
@@ -1,9 +1,9 @@
1
1
  #!/bin/bash
2
2
  set -Eeuo pipefail
3
3
 
4
- LICOS_WORKSPACE_PATH="${LICOS_WORKSPACE_PATH:-$(pwd)}"
4
+ PROJECT_DIR="${LICOS_PROJECT_PATH:-${LICOS_WORKSPACE_PATH:-$(pwd)}}"
5
5
 
6
- cd "${LICOS_WORKSPACE_PATH}"
6
+ cd "${PROJECT_DIR}"
7
7
 
8
8
  echo "Installing dependencies..."
9
9
  pnpm install --prefer-frozen-lockfile --prefer-offline --loglevel debug --reporter=append-only
@@ -4,15 +4,15 @@ set -Eeuo pipefail
4
4
  <% if (process.env.NODE_ENV === 'test') { %>
5
5
  # 测试环境:支持环境变量覆盖端口
6
6
  PORT="${PORT:-<%= port %>}"
7
- LICOS_WORKSPACE_PATH="${LICOS_WORKSPACE_PATH:-$(pwd)}"
7
+ PROJECT_DIR="${LICOS_PROJECT_PATH:-${LICOS_WORKSPACE_PATH:-$(pwd)}}"
8
8
  DEPLOY_RUN_PORT="${DEPLOY_RUN_PORT:-${PORT}}"
9
9
  <% } else { %>
10
10
  PORT=<%= port %>
11
- LICOS_WORKSPACE_PATH="${LICOS_WORKSPACE_PATH:-$(pwd)}"
11
+ PROJECT_DIR="${LICOS_PROJECT_PATH:-${LICOS_WORKSPACE_PATH:-$(pwd)}}"
12
12
  DEPLOY_RUN_PORT=<%= port %>
13
13
  <% } %>
14
14
 
15
- cd "${LICOS_WORKSPACE_PATH}"
15
+ cd "${PROJECT_DIR}"
16
16
 
17
17
  kill_port_if_listening() {
18
18
  local pids
@@ -1,9 +1,9 @@
1
1
  #!/bin/bash
2
2
  set -Eeuo pipefail
3
3
 
4
- LICOS_WORKSPACE_PATH="${LICOS_WORKSPACE_PATH:-$(pwd)}"
4
+ PROJECT_DIR="${LICOS_PROJECT_PATH:-${LICOS_WORKSPACE_PATH:-$(pwd)}}"
5
5
 
6
- cd "${LICOS_WORKSPACE_PATH}"
6
+ cd "${PROJECT_DIR}"
7
7
 
8
8
  echo "Installing dependencies..."
9
9
  pnpm install --prefer-frozen-lockfile --prefer-offline
@@ -1,7 +1,7 @@
1
1
  #!/bin/bash
2
2
  set -Eeuo pipefail
3
3
 
4
- LICOS_WORKSPACE_PATH="${LICOS_WORKSPACE_PATH:-$(pwd)}"
4
+ PROJECT_DIR="${LICOS_PROJECT_PATH:-${LICOS_WORKSPACE_PATH:-$(pwd)}}"
5
5
  <% if (process.env.NODE_ENV === 'test') { %>
6
6
  # 测试环境:支持环境变量覆盖端口
7
7
  PORT="${PORT:-<%= port %>}"
@@ -12,7 +12,7 @@ DEPLOY_RUN_PORT="${DEPLOY_RUN_PORT:-$PORT}"
12
12
  <% } %>
13
13
 
14
14
  start_service() {
15
- cd "${LICOS_WORKSPACE_PATH}"
15
+ cd "${PROJECT_DIR}"
16
16
  echo "Starting Nuxt.js service on port ${DEPLOY_RUN_PORT} for production..."
17
17
  PORT=${DEPLOY_RUN_PORT} node .output/server/index.mjs
18
18
  }
@@ -7,7 +7,7 @@
7
7
 
8
8
 
9
9
 
10
- const description = `Nuxt.js(服务端 + Vue):\`licos init \${LICOS_WORKSPACE_PATH} --template nuxt-vue\`
10
+ const description = `Nuxt.js(服务端 + Vue):\`licos init \${LICOS_PROJECT_PATH} --template nuxt-vue\`
11
11
  - 适用:全栈应用、需要服务端接口能力的 Vue 项目
12
12
  - 特点:
13
13
  - **服务端能力**:内置服务端 API 路由,可直接创建后端接口
@@ -3,12 +3,12 @@ entrypoint = "server.js"
3
3
  requires = ["nodejs-24"]
4
4
 
5
5
  [dev]
6
- build = ["bash", ".cozeproj/scripts/dev_build.sh"]
7
- run = ["bash", ".cozeproj/scripts/dev_run.sh"]
6
+ build = ["bash", ".licosproj/scripts/dev_build.sh"]
7
+ run = ["bash", ".licosproj/scripts/dev_run.sh"]
8
8
  deps = ["git"] # -> apt install git
9
- pack = ["bash", ".cozeproj/scripts/pack.sh"]
9
+ pack = ["bash", ".licosproj/scripts/pack.sh"]
10
10
 
11
11
  [deploy]
12
- build = ["bash", ".cozeproj/scripts/deploy_build.sh"]
13
- run = ["bash", ".cozeproj/scripts/deploy_run.sh"]
12
+ build = ["bash", ".licosproj/scripts/deploy_build.sh"]
13
+ run = ["bash", ".licosproj/scripts/deploy_run.sh"]
14
14
  deps = ["git"] # -> apt install git
@@ -1,7 +1,9 @@
1
1
  #!/bin/bash
2
2
  set -Eeuo pipefail
3
3
 
4
- cd "${LICOS_WORKSPACE_PATH}"
4
+ PROJECT_DIR="${LICOS_PROJECT_PATH:-${LICOS_WORKSPACE_PATH:-$(pwd)}}"
5
+
6
+ cd "${PROJECT_DIR}"
5
7
  if [ -f "./.licosproj/scripts/init_env.sh" ]; then
6
8
  echo "⚙️ Initializing environment..."
7
9
  # 使用 bash 执行,确保即使没有 x 权限也能跑
@@ -2,9 +2,10 @@
2
2
  set -Eeuo pipefail
3
3
 
4
4
  start_service() {
5
- cd "${LICOS_WORKSPACE_PATH}/server/dist"
5
+ local project_dir="${LICOS_PROJECT_PATH:-${LICOS_WORKSPACE_PATH:-$(pwd)}}"
6
+ cd "${project_dir}/server/dist"
6
7
 
7
- local port="${DEPLOY_RUN_PORT:-3000}"
8
+ local port="${DEPLOY_RUN_PORT:-${PORT:-3000}}"
8
9
  echo "Starting Static File Server on port ${port} for deploy..."
9
10
 
10
11
  node ./main.js -p "${port}"
@@ -2,7 +2,10 @@
2
2
  echo "⚙️ dev_run.sh 开始运行"
3
3
  set -Eeuo pipefail
4
4
 
5
- cd "${LICOS_WORKSPACE_PATH}"
5
+ PROJECT_DIR="${LICOS_PROJECT_PATH:-${LICOS_WORKSPACE_PATH:-$(pwd)}}"
6
+ DEPLOY_RUN_PORT="${DEPLOY_RUN_PORT:-${LICOS_RUN_PORT:-5000}}"
7
+
8
+ cd "${PROJECT_DIR}"
6
9
 
7
10
  # ---------------------------------------------------------
8
11
  # PID 文件,用于追踪上一次启动的进程树
@@ -120,7 +123,7 @@ trap cleanup_on_exit EXIT INT TERM HUP
120
123
  # 5. 启动服务
121
124
  # ---------------------------------------------------------
122
125
  start_service() {
123
- cd "${LICOS_WORKSPACE_PATH}"
126
+ cd "${PROJECT_DIR}"
124
127
 
125
128
  # 动态注入环境变量
126
129
  if [ -n "${LICOS_PROJECT_DOMAIN_DEFAULT:-}" ]; then
@@ -1,5 +1,7 @@
1
1
  #!/bin/bash
2
2
 
3
- cd "${LICOS_WORKSPACE_PATH}"
3
+ PROJECT_DIR="${LICOS_PROJECT_PATH:-${LICOS_WORKSPACE_PATH:-$(pwd)}}"
4
+
5
+ cd "${PROJECT_DIR}"
4
6
 
5
7
  echo "✅ 初始化完成"