@coze-arch/cli 0.0.2 → 0.0.3-alpha.419211
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/_gitignore +1 -0
- package/lib/__templates__/nextjs/_gitignore +1 -0
- package/lib/__templates__/nuxt-vue/_gitignore +1 -0
- package/lib/__templates__/nuxt-vue/nuxt.config.ts +23 -13
- package/lib/__templates__/taro/_gitignore +1 -0
- package/lib/__templates__/templates.json +37 -0
- package/lib/__templates__/vite/_gitignore +1 -0
- package/lib/cli.js +1 -1
- package/package.json +4 -2
|
@@ -7,7 +7,10 @@ const __dirname = dirname(__filename);
|
|
|
7
7
|
|
|
8
8
|
export default defineNuxtConfig({
|
|
9
9
|
compatibilityDate: '2025-07-15',
|
|
10
|
-
devtools
|
|
10
|
+
// Disable devtools in CI/test environments (prevents hanging in headless mode)
|
|
11
|
+
devtools: {
|
|
12
|
+
enabled: process.env.CI !== 'true' && process.env.COZE_PROJECT_ENV !== 'PROD',
|
|
13
|
+
},
|
|
11
14
|
telemetry: false,
|
|
12
15
|
|
|
13
16
|
// App head configuration
|
|
@@ -52,7 +55,11 @@ export default defineNuxtConfig({
|
|
|
52
55
|
},
|
|
53
56
|
|
|
54
57
|
// Nuxt modules
|
|
55
|
-
|
|
58
|
+
// Skip @nuxt/image in CI (requires sharp binaries not available in headless environments)
|
|
59
|
+
modules:
|
|
60
|
+
process.env.CI === 'true'
|
|
61
|
+
? ['@nuxtjs/tailwindcss']
|
|
62
|
+
: ['@nuxt/image', '@nuxtjs/tailwindcss'],
|
|
56
63
|
|
|
57
64
|
// Global CSS
|
|
58
65
|
css: [resolve(__dirname, 'assets/css/main.css')],
|
|
@@ -90,17 +97,20 @@ export default defineNuxtConfig({
|
|
|
90
97
|
// Image optimization (similar to Next.js images config)
|
|
91
98
|
// Using @nuxt/image module for image optimization
|
|
92
99
|
// https://image.nuxt.com/
|
|
93
|
-
image
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
// Skip image config in CI (when @nuxt/image module is disabled)
|
|
101
|
+
...(process.env.CI !== 'true' && {
|
|
102
|
+
image: {
|
|
103
|
+
domains: ['lf-coze-web-cdn.coze.cn'],
|
|
104
|
+
// Remote patterns configuration
|
|
105
|
+
remotePatterns: [
|
|
106
|
+
{
|
|
107
|
+
protocol: 'https',
|
|
108
|
+
hostname: 'lf-coze-web-cdn.coze.cn',
|
|
109
|
+
pathname: '/**',
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
}),
|
|
104
114
|
|
|
105
115
|
// Security headers (Content Security Policy)
|
|
106
116
|
nitro: {
|
|
@@ -126,6 +126,43 @@
|
|
|
126
126
|
"additionalProperties": false
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
|
+
{
|
|
130
|
+
"name": "test-only",
|
|
131
|
+
"description": "Test template showcasing all template hooks and features",
|
|
132
|
+
"location": "./test-only",
|
|
133
|
+
"paramsSchema": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"properties": {
|
|
136
|
+
"appName": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"minLength": 1,
|
|
139
|
+
"pattern": "^[a-z0-9-]+$",
|
|
140
|
+
"description": "Application name (lowercase, alphanumeric and hyphens only)"
|
|
141
|
+
},
|
|
142
|
+
"port": {
|
|
143
|
+
"type": "number",
|
|
144
|
+
"default": 5000,
|
|
145
|
+
"minimum": 1024,
|
|
146
|
+
"maximum": 65535,
|
|
147
|
+
"description": "Development server port"
|
|
148
|
+
},
|
|
149
|
+
"includeTests": {
|
|
150
|
+
"type": "boolean",
|
|
151
|
+
"default": true,
|
|
152
|
+
"nullable": true,
|
|
153
|
+
"description": "Include test files"
|
|
154
|
+
},
|
|
155
|
+
"addCopyright": {
|
|
156
|
+
"type": "boolean",
|
|
157
|
+
"default": false,
|
|
158
|
+
"nullable": true,
|
|
159
|
+
"description": "Add copyright header to source files"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"required": [],
|
|
163
|
+
"additionalProperties": false
|
|
164
|
+
}
|
|
165
|
+
},
|
|
129
166
|
{
|
|
130
167
|
"name": "vite",
|
|
131
168
|
"description": "Vite(简单项目):`coze init ${COZE_WORKSPACE_PATH} --template vite`\n- 适用:轻量级 SPA、纯前端交互、仪表盘等轻量级项目。",
|
package/lib/cli.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coze-arch/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3-alpha.419211",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "coze coding devtools cli",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,13 +14,15 @@
|
|
|
14
14
|
"bin",
|
|
15
15
|
"lib/**/.npmrc",
|
|
16
16
|
"!**/*.tsbuildinfo",
|
|
17
|
-
"!**/*.map"
|
|
17
|
+
"!**/*.map",
|
|
18
|
+
"!**/node-compile-cache"
|
|
18
19
|
],
|
|
19
20
|
"scripts": {
|
|
20
21
|
"prebuild": "tsx scripts/prebuild.ts",
|
|
21
22
|
"build": "tsx scripts/build.ts",
|
|
22
23
|
"create": "tsx scripts/create-template.ts",
|
|
23
24
|
"lint": "eslint ./ --cache",
|
|
25
|
+
"pre-release": "tsx scripts/pre-release.ts",
|
|
24
26
|
"postpublish": "bash scripts/sync-npmmirror.sh",
|
|
25
27
|
"test": "vitest --run --passWithNoTests",
|
|
26
28
|
"test:all": "bash scripts/test-coverage.sh",
|