@coze-arch/cli 0.0.1-alpha.dffbaa → 0.0.1-alpha.e02657
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/lib/__templates__/expo/.coze +7 -2
- package/lib/__templates__/expo/.cozeproj/scripts/dev_build.sh +46 -0
- package/lib/__templates__/expo/.cozeproj/scripts/dev_run.sh +229 -0
- package/lib/__templates__/expo/.cozeproj/scripts/prod_build.sh +47 -0
- package/lib/__templates__/expo/.cozeproj/scripts/prod_run.sh +34 -0
- package/lib/__templates__/expo/.cozeproj/scripts/server_dev_run.sh +46 -0
- package/lib/__templates__/expo/README.md +68 -7
- package/lib/__templates__/expo/_gitignore +1 -1
- package/lib/__templates__/expo/_npmrc +2 -4
- package/lib/__templates__/expo/client/app/+not-found.tsx +15 -64
- package/lib/__templates__/expo/client/app/_layout.tsx +15 -12
- package/lib/__templates__/expo/client/app/index.tsx +1 -0
- package/lib/__templates__/expo/client/app.config.ts +76 -0
- package/lib/__templates__/expo/client/components/Screen.tsx +1 -17
- package/lib/__templates__/expo/client/components/ThemedText.tsx +33 -0
- package/lib/__templates__/expo/client/components/ThemedView.tsx +37 -0
- package/lib/__templates__/expo/client/constants/theme.ts +117 -58
- package/lib/__templates__/expo/client/declarations.d.ts +5 -0
- package/lib/__templates__/expo/{eslint.config.mjs → client/eslint.config.mjs} +33 -10
- package/lib/__templates__/expo/client/hooks/useColorScheme.tsx +48 -0
- package/lib/__templates__/expo/client/hooks/useSafeRouter.ts +152 -0
- package/lib/__templates__/expo/client/hooks/useTheme.ts +26 -6
- package/lib/__templates__/expo/client/metro.config.js +121 -0
- package/lib/__templates__/expo/client/package.json +95 -0
- package/lib/__templates__/expo/client/screens/demo/index.tsx +25 -0
- package/lib/__templates__/expo/client/screens/demo/styles.ts +28 -0
- package/lib/__templates__/expo/client/scripts/install-missing-deps.js +1 -0
- package/lib/__templates__/expo/client/tsconfig.json +24 -0
- package/lib/__templates__/expo/client/utils/index.ts +22 -0
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/index.js +9 -0
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/names.js +1889 -0
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/rule.js +174 -0
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/v5-only-names.js +388 -0
- package/lib/__templates__/expo/eslint-plugins/react-native/index.js +9 -0
- package/lib/__templates__/expo/eslint-plugins/react-native/rule.js +64 -0
- package/lib/__templates__/expo/eslint-plugins/reanimated/index.js +9 -0
- package/lib/__templates__/expo/eslint-plugins/reanimated/rule.js +88 -0
- package/lib/__templates__/expo/package.json +16 -103
- package/lib/__templates__/expo/patches/expo@54.0.33.patch +45 -0
- package/lib/__templates__/expo/pnpm-lock.yaml +1375 -3165
- package/lib/__templates__/expo/pnpm-workspace.yaml +3 -0
- package/lib/__templates__/expo/server/build.js +21 -0
- package/lib/__templates__/expo/server/package.json +32 -0
- package/lib/__templates__/expo/server/src/index.ts +20 -0
- package/lib/__templates__/expo/server/tsconfig.json +24 -0
- package/lib/__templates__/expo/template.config.js +57 -0
- package/lib/__templates__/expo/tsconfig.json +1 -24
- package/lib/__templates__/nextjs/.babelrc +15 -0
- package/lib/__templates__/nextjs/.coze +1 -0
- package/lib/__templates__/nextjs/_npmrc +1 -0
- package/lib/__templates__/nextjs/next.config.ts +12 -0
- package/lib/__templates__/nextjs/package.json +11 -2
- package/lib/__templates__/nextjs/pnpm-lock.yaml +2606 -1723
- package/lib/__templates__/nextjs/scripts/prepare.sh +9 -0
- package/lib/__templates__/nextjs/src/app/globals.css +109 -89
- package/lib/__templates__/nextjs/src/app/layout.tsx +5 -14
- package/lib/__templates__/nextjs/src/app/page.tsx +18 -48
- package/lib/__templates__/nextjs/src/components/ui/resizable.tsx +29 -22
- package/lib/__templates__/nextjs/src/components/ui/sidebar.tsx +228 -230
- package/lib/__templates__/nextjs/template.config.js +67 -2
- package/lib/__templates__/taro/.coze +14 -0
- package/lib/__templates__/taro/.cozeproj/scripts/deploy_build.sh +19 -0
- package/lib/__templates__/taro/.cozeproj/scripts/deploy_run.sh +13 -0
- package/lib/__templates__/taro/.cozeproj/scripts/dev_build.sh +17 -0
- package/lib/__templates__/taro/.cozeproj/scripts/dev_run.sh +58 -0
- package/lib/__templates__/taro/.cozeproj/scripts/init_env.sh +5 -0
- package/lib/__templates__/taro/.cozeproj/scripts/pack.sh +1 -0
- package/lib/__templates__/taro/README.md +687 -0
- package/lib/__templates__/taro/_gitignore +40 -0
- package/lib/__templates__/taro/_npmrc +18 -0
- package/lib/__templates__/taro/babel.config.js +12 -0
- package/lib/__templates__/taro/config/dev.ts +9 -0
- package/lib/__templates__/taro/config/index.ts +173 -0
- package/lib/__templates__/taro/config/prod.ts +35 -0
- package/lib/__templates__/taro/eslint.config.mjs +57 -0
- package/lib/__templates__/taro/key/private.appid.key +0 -0
- package/lib/__templates__/taro/package.json +95 -0
- package/lib/__templates__/taro/pnpm-lock.yaml +22430 -0
- package/lib/__templates__/taro/pnpm-workspace.yaml +2 -0
- package/lib/__templates__/taro/project.config.json +15 -0
- package/lib/__templates__/taro/server/nest-cli.json +10 -0
- package/lib/__templates__/taro/server/package.json +38 -0
- package/lib/__templates__/taro/server/src/app.controller.ts +23 -0
- package/lib/__templates__/taro/server/src/app.module.ts +10 -0
- package/lib/__templates__/taro/server/src/app.service.ts +8 -0
- package/lib/__templates__/taro/server/src/interceptors/http-status.interceptor.ts +23 -0
- package/lib/__templates__/taro/server/src/main.ts +37 -0
- package/lib/__templates__/taro/server/tsconfig.json +24 -0
- package/lib/__templates__/taro/src/app.config.ts +11 -0
- package/lib/__templates__/taro/src/app.css +52 -0
- package/lib/__templates__/taro/src/app.ts +14 -0
- package/lib/__templates__/taro/src/index.html +20 -0
- package/lib/__templates__/taro/src/network.ts +39 -0
- package/lib/__templates__/taro/src/pages/index/index.config.ts +3 -0
- package/lib/__templates__/taro/src/pages/index/index.css +1 -0
- package/lib/__templates__/taro/src/pages/index/index.tsx +33 -0
- package/lib/__templates__/taro/src/utils/h5-styles.ts +22 -0
- package/lib/__templates__/taro/src/utils/wx-debug.ts +23 -0
- package/lib/__templates__/taro/stylelint.config.mjs +4 -0
- package/lib/__templates__/taro/template.config.js +68 -0
- package/lib/__templates__/taro/tsconfig.json +29 -0
- package/lib/__templates__/taro/types/global.d.ts +32 -0
- package/lib/__templates__/templates.json +93 -43
- package/lib/__templates__/vite/.coze +1 -0
- package/lib/__templates__/vite/_npmrc +1 -0
- package/lib/__templates__/vite/eslint.config.mjs +9 -0
- package/lib/__templates__/vite/package.json +11 -2
- package/lib/__templates__/vite/pnpm-lock.yaml +3232 -243
- package/lib/__templates__/vite/scripts/prepare.sh +9 -0
- package/lib/__templates__/vite/src/main.ts +17 -48
- package/lib/__templates__/vite/template.config.js +67 -6
- package/lib/cli.js +1026 -134
- package/package.json +8 -3
- package/lib/__templates__/expo/.cozeproj/scripts/deploy_build.sh +0 -116
- package/lib/__templates__/expo/.cozeproj/scripts/deploy_run.sh +0 -239
- package/lib/__templates__/expo/app.json +0 -63
- package/lib/__templates__/expo/babel.config.js +0 -9
- package/lib/__templates__/expo/client/app/(tabs)/_layout.tsx +0 -43
- package/lib/__templates__/expo/client/app/(tabs)/home.tsx +0 -1
- package/lib/__templates__/expo/client/app/(tabs)/index.tsx +0 -7
- package/lib/__templates__/expo/client/hooks/useColorScheme.ts +0 -1
- package/lib/__templates__/expo/client/index.js +0 -12
- package/lib/__templates__/expo/client/screens/home/index.tsx +0 -51
- package/lib/__templates__/expo/client/screens/home/styles.ts +0 -60
- package/lib/__templates__/expo/metro.config.js +0 -53
- package/lib/__templates__/expo/src/index.ts +0 -12
- package/lib/__templates__/nextjs/.vscode/settings.json +0 -121
- package/lib/__templates__/vite/.vscode/settings.json +0 -7
- /package/lib/__templates__/expo/{eslint-formatter-simple.mjs → client/eslint-formatter-simple.mjs} +0 -0
|
@@ -3,66 +3,116 @@
|
|
|
3
3
|
"templates": [
|
|
4
4
|
{
|
|
5
5
|
"name": "expo",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Expo template for React Native applications",
|
|
7
7
|
"location": "./expo",
|
|
8
8
|
"paramsSchema": {
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"appName": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"minLength": 1,
|
|
14
|
+
"pattern": "^[a-z0-9-]+$",
|
|
15
|
+
"description": "Application name (lowercase, alphanumeric and hyphens only)"
|
|
16
|
+
},
|
|
17
|
+
"port": {
|
|
18
|
+
"type": "number",
|
|
19
|
+
"default": 8081,
|
|
20
|
+
"minimum": 1024,
|
|
21
|
+
"maximum": 65535,
|
|
22
|
+
"description": "Metro bundler port"
|
|
23
|
+
}
|
|
13
24
|
},
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
"description": "Metro bundler port",
|
|
17
|
-
"default": 8081,
|
|
18
|
-
"minimum": 1024,
|
|
19
|
-
"maximum": 65535
|
|
20
|
-
}
|
|
25
|
+
"required": [],
|
|
26
|
+
"additionalProperties": false
|
|
21
27
|
}
|
|
22
28
|
},
|
|
23
29
|
{
|
|
24
30
|
"name": "nextjs",
|
|
25
|
-
"description": "nextjs
|
|
31
|
+
"description": "Next.js(复杂项目):`coze init ${COZE_WORKSPACE_PATH} --template nextjs`\n- 适用:全栈应用、复杂多页面等复杂项目\n- 使用默认nextjs项目规范\n - **目录规范**: 默认开启src目录(打开--src-dir选项):项目文件(如 app 目录、pages 目录、components 等)初始化到 src/ 目录下。\n - **项目理解加速**:初始可以依赖项目下 `package.json` 文件理解项目类型,如果没有或无法理解退化成阅读其他文件。\n - **UI设计与组件规范**:Next.js项目**必须默认**采用 shadcn/ui 风格和规范,`shadcn/ui`组件默认完整的预装在`src/components/ui/`目录下",
|
|
26
32
|
"location": "./nextjs",
|
|
27
33
|
"paramsSchema": {
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
34
|
+
"type": "object",
|
|
35
|
+
"properties": {
|
|
36
|
+
"appName": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"minLength": 1,
|
|
39
|
+
"pattern": "^[a-z0-9-]+$",
|
|
40
|
+
"description": "Application name (lowercase, alphanumeric and hyphens only)"
|
|
41
|
+
},
|
|
42
|
+
"port": {
|
|
43
|
+
"type": "number",
|
|
44
|
+
"default": 5000,
|
|
45
|
+
"minimum": 1024,
|
|
46
|
+
"maximum": 65535,
|
|
47
|
+
"description": "Development server port (for Next.js dev server)"
|
|
48
|
+
}
|
|
32
49
|
},
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
50
|
+
"required": [],
|
|
51
|
+
"additionalProperties": false
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "taro",
|
|
56
|
+
"description": "Taro(小程序 + H5):`coze init ${COZE_WORKSPACE_PATH} --template taro`\n- 适用:微信小程序、H5 跨端应用\n- 前后端分离架构:Taro 4 + NestJS\n- 支持微信小程序和 H5 双端构建\n- 使用 TailwindCSS + weapp-tailwindcss 实现跨端样式",
|
|
57
|
+
"location": "./taro",
|
|
58
|
+
"paramsSchema": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"properties": {
|
|
61
|
+
"appName": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"minLength": 1,
|
|
64
|
+
"pattern": "^[a-z0-9-]+$",
|
|
65
|
+
"description": "Application name (lowercase, alphanumeric and hyphens only)"
|
|
66
|
+
},
|
|
67
|
+
"port": {
|
|
68
|
+
"type": "number",
|
|
69
|
+
"default": 5000,
|
|
70
|
+
"minimum": 1024,
|
|
71
|
+
"maximum": 65535,
|
|
72
|
+
"description": "H5 development server port"
|
|
73
|
+
},
|
|
74
|
+
"serverPort": {
|
|
75
|
+
"type": "number",
|
|
76
|
+
"default": 3000,
|
|
77
|
+
"minimum": 1024,
|
|
78
|
+
"maximum": 65535,
|
|
79
|
+
"description": "NestJS backend server port"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"required": [],
|
|
83
|
+
"additionalProperties": false
|
|
40
84
|
}
|
|
41
85
|
},
|
|
42
86
|
{
|
|
43
87
|
"name": "vite",
|
|
44
|
-
"description": "vite
|
|
88
|
+
"description": "Vite(简单项目):`coze init ${COZE_WORKSPACE_PATH} --template vite`\n- 适用:轻量级 SPA、纯前端交互、仪表盘等轻量级项目。",
|
|
45
89
|
"location": "./vite",
|
|
46
90
|
"paramsSchema": {
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
91
|
+
"type": "object",
|
|
92
|
+
"properties": {
|
|
93
|
+
"appName": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"minLength": 1,
|
|
96
|
+
"pattern": "^[a-z0-9-]+$",
|
|
97
|
+
"description": "Application name (lowercase, alphanumeric and hyphens only)"
|
|
98
|
+
},
|
|
99
|
+
"port": {
|
|
100
|
+
"type": "number",
|
|
101
|
+
"default": 5000,
|
|
102
|
+
"minimum": 1024,
|
|
103
|
+
"maximum": 65535,
|
|
104
|
+
"description": "Development server port"
|
|
105
|
+
},
|
|
106
|
+
"hmrPort": {
|
|
107
|
+
"type": "number",
|
|
108
|
+
"default": 6000,
|
|
109
|
+
"minimum": 1024,
|
|
110
|
+
"maximum": 65535,
|
|
111
|
+
"description": "Development HMR server port"
|
|
112
|
+
}
|
|
58
113
|
},
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
"description": "Development HMR server port",
|
|
62
|
-
"default": 6000,
|
|
63
|
-
"minimum": 1024,
|
|
64
|
-
"maximum": 65535
|
|
65
|
-
}
|
|
114
|
+
"required": [],
|
|
115
|
+
"additionalProperties": false
|
|
66
116
|
}
|
|
67
117
|
}
|
|
68
118
|
]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import eslint from '@eslint/js';
|
|
2
|
+
import tseslint from 'typescript-eslint';
|
|
3
|
+
import { defineConfig, globalIgnores } from 'eslint/config';
|
|
4
|
+
|
|
5
|
+
export default defineConfig([
|
|
6
|
+
eslint.configs.recommended,
|
|
7
|
+
...tseslint.configs.recommended,
|
|
8
|
+
globalIgnores(['dist/**', 'node_modules/**']),
|
|
9
|
+
]);
|
|
@@ -7,18 +7,27 @@
|
|
|
7
7
|
"dev": "bash ./scripts/dev.sh",
|
|
8
8
|
"preinstall": "npx only-allow pnpm",
|
|
9
9
|
"lint": "eslint",
|
|
10
|
-
"start": "bash ./scripts/start.sh"
|
|
10
|
+
"start": "bash ./scripts/start.sh",
|
|
11
|
+
"ts-check": "tsc -p tsconfig.json"
|
|
11
12
|
},
|
|
12
13
|
"devDependencies": {
|
|
13
14
|
"autoprefixer": "^10.4.20",
|
|
15
|
+
"coze-coding-dev-sdk": "^0.7.3",
|
|
16
|
+
"eslint": "^9",
|
|
14
17
|
"only-allow": "^1.2.2",
|
|
15
18
|
"postcss": "^8.4.49",
|
|
16
19
|
"tailwindcss": "^3.4.17",
|
|
17
20
|
"typescript": "^5.6.0",
|
|
18
|
-
"
|
|
21
|
+
"typescript-eslint": "^8",
|
|
22
|
+
"vite": "^7.2.4"
|
|
19
23
|
},
|
|
20
24
|
"packageManager": "pnpm@9.0.0",
|
|
21
25
|
"engines": {
|
|
22
26
|
"pnpm": ">=9.0.0"
|
|
27
|
+
},
|
|
28
|
+
"pnpm": {
|
|
29
|
+
"overrides": {
|
|
30
|
+
"esbuild": "^0.27.2"
|
|
31
|
+
}
|
|
23
32
|
}
|
|
24
33
|
}
|