@coze-arch/cli 0.0.2 → 0.0.3

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.
@@ -9,3 +9,4 @@ expo-env.d.ts
9
9
  .DS_Store
10
10
  logs/
11
11
  *.tsbuildinfo
12
+ node-compile-cache/
@@ -52,6 +52,7 @@ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
52
52
  .yarn/unplugged
53
53
  .yarn/build-state.yml
54
54
  .yarn/install-state.gz
55
+ node-compile-cache/
55
56
 
56
57
  # Editor directories and files
57
58
  .vscode/*
@@ -5,6 +5,7 @@
5
5
  .nitro
6
6
  .cache
7
7
  dist
8
+ node-compile-cache
8
9
 
9
10
  # Node dependencies
10
11
  node_modules
@@ -7,7 +7,10 @@ const __dirname = dirname(__filename);
7
7
 
8
8
  export default defineNuxtConfig({
9
9
  compatibilityDate: '2025-07-15',
10
- devtools: { enabled: true },
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
- modules: ['@nuxt/image', '@nuxtjs/tailwindcss'],
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
- domains: ['lf-coze-web-cdn.coze.cn'],
95
- // Remote patterns configuration
96
- remotePatterns: [
97
- {
98
- protocol: 'https',
99
- hostname: 'lf-coze-web-cdn.coze.cn',
100
- pathname: '/**',
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: {
@@ -1,6 +1,7 @@
1
1
  # Dependencies
2
2
  node_modules/
3
3
  .pnpm-store/
4
+ node-compile-cache/
4
5
 
5
6
  # Production
6
7
  dist/
@@ -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、纯前端交互、仪表盘等轻量级项目。",
@@ -40,6 +40,7 @@ pids
40
40
  .cache/
41
41
  .eslintcache
42
42
  .stylelintcache
43
+ node-compile-cache/
43
44
 
44
45
  # Editor directories and files
45
46
  .vscode/*
package/lib/cli.js CHANGED
@@ -2598,7 +2598,7 @@ const registerCommand = program => {
2598
2598
  });
2599
2599
  };
2600
2600
 
2601
- var version = "0.0.2";
2601
+ var version = "0.0.3";
2602
2602
  var packageJson = {
2603
2603
  version: version};
2604
2604
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coze-arch/cli",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
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",