@coze-arch/cli 0.0.1-alpha.8f2811 → 0.0.1-alpha.904498

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 (66) hide show
  1. package/lib/__templates__/expo/.cozeproj/scripts/dev_run.sh +12 -13
  2. package/lib/__templates__/expo/.cozeproj/scripts/server_dev_run.sh +8 -9
  3. package/lib/__templates__/expo/README.md +13 -16
  4. package/lib/__templates__/expo/client/app/+not-found.tsx +4 -19
  5. package/lib/__templates__/expo/client/app/_layout.tsx +16 -17
  6. package/lib/__templates__/expo/client/global.css +78 -0
  7. package/lib/__templates__/expo/client/metro.config.js +8 -1
  8. package/lib/__templates__/expo/client/package.json +9 -7
  9. package/lib/__templates__/expo/client/screens/demo/index.tsx +7 -13
  10. package/lib/__templates__/expo/client/styles.css +263 -0
  11. package/lib/__templates__/expo/client/uniwind-types.d.ts +10 -0
  12. package/lib/__templates__/expo/patches/expo@54.0.32.patch +2 -3
  13. package/lib/__templates__/expo/pnpm-lock.yaml +1732 -163
  14. package/lib/__templates__/expo/server/package.json +1 -1
  15. package/lib/__templates__/nextjs/src/app/page.tsx +61 -17
  16. package/lib/__templates__/templates.json +0 -32
  17. package/lib/__templates__/vite/src/main.ts +47 -17
  18. package/lib/cli.js +1 -1
  19. package/package.json +1 -1
  20. package/lib/__templates__/expo/client/components/ThemedText.tsx +0 -33
  21. package/lib/__templates__/expo/client/components/ThemedView.tsx +0 -37
  22. package/lib/__templates__/expo/client/constants/theme.ts +0 -177
  23. package/lib/__templates__/expo/client/hooks/useColorScheme.tsx +0 -48
  24. package/lib/__templates__/expo/client/hooks/useTheme.ts +0 -33
  25. package/lib/__templates__/taro/.coze +0 -14
  26. package/lib/__templates__/taro/.cozeproj/scripts/deploy_build.sh +0 -19
  27. package/lib/__templates__/taro/.cozeproj/scripts/deploy_run.sh +0 -14
  28. package/lib/__templates__/taro/.cozeproj/scripts/dev_build.sh +0 -16
  29. package/lib/__templates__/taro/.cozeproj/scripts/dev_run.sh +0 -74
  30. package/lib/__templates__/taro/.cozeproj/scripts/init_env.sh +0 -5
  31. package/lib/__templates__/taro/.cozeproj/scripts/pack.sh +0 -1
  32. package/lib/__templates__/taro/README.md +0 -687
  33. package/lib/__templates__/taro/_gitignore +0 -40
  34. package/lib/__templates__/taro/_npmrc +0 -18
  35. package/lib/__templates__/taro/babel.config.js +0 -12
  36. package/lib/__templates__/taro/config/dev.ts +0 -9
  37. package/lib/__templates__/taro/config/index.ts +0 -173
  38. package/lib/__templates__/taro/config/prod.ts +0 -35
  39. package/lib/__templates__/taro/eslint.config.mjs +0 -57
  40. package/lib/__templates__/taro/key/private.appid.key +0 -0
  41. package/lib/__templates__/taro/package.json +0 -95
  42. package/lib/__templates__/taro/pnpm-lock.yaml +0 -22430
  43. package/lib/__templates__/taro/pnpm-workspace.yaml +0 -2
  44. package/lib/__templates__/taro/project.config.json +0 -15
  45. package/lib/__templates__/taro/server/nest-cli.json +0 -10
  46. package/lib/__templates__/taro/server/package.json +0 -38
  47. package/lib/__templates__/taro/server/src/app.controller.ts +0 -23
  48. package/lib/__templates__/taro/server/src/app.module.ts +0 -10
  49. package/lib/__templates__/taro/server/src/app.service.ts +0 -8
  50. package/lib/__templates__/taro/server/src/interceptors/http-status.interceptor.ts +0 -23
  51. package/lib/__templates__/taro/server/src/main.ts +0 -49
  52. package/lib/__templates__/taro/server/tsconfig.json +0 -24
  53. package/lib/__templates__/taro/src/app.config.ts +0 -11
  54. package/lib/__templates__/taro/src/app.css +0 -52
  55. package/lib/__templates__/taro/src/app.ts +0 -14
  56. package/lib/__templates__/taro/src/index.html +0 -50
  57. package/lib/__templates__/taro/src/network.ts +0 -39
  58. package/lib/__templates__/taro/src/pages/index/index.config.ts +0 -3
  59. package/lib/__templates__/taro/src/pages/index/index.css +0 -1
  60. package/lib/__templates__/taro/src/pages/index/index.tsx +0 -33
  61. package/lib/__templates__/taro/src/utils/h5-styles.ts +0 -22
  62. package/lib/__templates__/taro/src/utils/wx-debug.ts +0 -23
  63. package/lib/__templates__/taro/stylelint.config.mjs +0 -4
  64. package/lib/__templates__/taro/template.config.js +0 -68
  65. package/lib/__templates__/taro/tsconfig.json +0 -29
  66. package/lib/__templates__/taro/types/global.d.ts +0 -32
@@ -1,74 +0,0 @@
1
- #!/bin/bash
2
-
3
- echo "⚙️ dev_run.sh 开始运行"
4
- set -Eeuo pipefail
5
-
6
- cd "${COZE_WORKSPACE_PATH}"
7
-
8
- kill_port_if_listening() {
9
- local port=$1
10
- local pids
11
- pids=$(ss -H -lntp 2>/dev/null | awk -v port="${port}" '$4 ~ ":"port"$"' | grep -o 'pid=[0-9]*' | cut -d= -f2 | paste -sd' ' - || true)
12
- if [[ -z "${pids}" ]]; then
13
- echo "Port ${port} is free."
14
- return
15
- fi
16
- echo "Port ${port} in use by PIDs: ${pids}"
17
- for pid in ${pids}; do
18
- kill_process_group "${pid}"
19
- done
20
- sleep 1
21
- pids=$(ss -H -lntp 2>/dev/null | awk -v port="${port}" '$4 ~ ":"port"$"' | grep -o 'pid=[0-9]*' | cut -d= -f2 | paste -sd' ' - || true)
22
- if [[ -n "${pids}" ]]; then
23
- echo "Warning: port ${port} still busy after cleanup, PIDs: ${pids}"
24
- else
25
- echo "Port ${port} cleared."
26
- fi
27
- }
28
-
29
- kill_process_group() {
30
- local pid=$1
31
- local pgid
32
- pgid=$(ps -o pgid= -p "${pid}" 2>/dev/null | tr -d ' ' || true)
33
- if [[ -n "${pgid}" && "${pgid}" != "0" ]]; then
34
- echo "Killing process group ${pgid} (from PID ${pid})"
35
- kill -9 -"${pgid}" 2>/dev/null || true
36
- fi
37
- if kill -0 "${pid}" 2>/dev/null; then
38
- echo "Killing PID ${pid} directly"
39
- kill -9 "${pid}" 2>/dev/null || true
40
- fi
41
- }
42
-
43
- start_service() {
44
- cd "${COZE_WORKSPACE_PATH}"
45
-
46
- # ---------------------------------------------------------
47
- # 0. 动态注入环境变量
48
- # ---------------------------------------------------------
49
- if [ -n "$COZE_PROJECT_DOMAIN_DEFAULT" ]; then
50
- export PROJECT_DOMAIN="$COZE_PROJECT_DOMAIN_DEFAULT"
51
- echo "✅ 环境变量已动态注入: PROJECT_DOMAIN=$PROJECT_DOMAIN"
52
- else
53
- echo "⚠️ 警告: COZE_PROJECT_DOMAIN_DEFAULT 未设置,使用 .env.local 中的配置"
54
- fi
55
-
56
- # ---------------------------------------------------------
57
- # 启动 Taro H5 和 NestJS Server
58
- # ---------------------------------------------------------
59
- echo "Starting Taro H5 Dev Server and NestJS Server..."
60
-
61
- # ⚠️ 重要:为了让 Taro 使用平台动态分配的端口
62
- export PORT=${DEPLOY_RUN_PORT}
63
-
64
- exec pnpm dev
65
- }
66
-
67
- SERVER_PORT=<%= serverPort %>
68
-
69
- echo "Clearing port ${DEPLOY_RUN_PORT} (web) before start."
70
- kill_port_if_listening "${DEPLOY_RUN_PORT}"
71
- echo "Clearing port ${SERVER_PORT} (server) before start."
72
- kill_port_if_listening "${SERVER_PORT}"
73
- echo "Starting HTTP services on port ${DEPLOY_RUN_PORT} (web) and ${SERVER_PORT} (server)..."
74
- start_service
@@ -1,5 +0,0 @@
1
- #!/bin/bash
2
-
3
- cd "${COZE_WORKSPACE_PATH}"
4
-
5
- echo "✅ 初始化完成"
@@ -1 +0,0 @@
1
- pnpm build:weapp