@coze-arch/cli 0.0.1-alpha.e9ff73 → 0.0.1-alpha.eaa612
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/client/components/Screen.tsx +2 -2
- package/lib/__templates__/expo/client/eslint.config.mjs +4 -0
- package/lib/__templates__/expo/client/scripts/install-missing-deps.js +10 -10
- package/lib/__templates__/expo/eslint-plugins/forbid-emoji/index.js +9 -0
- package/lib/__templates__/expo/eslint-plugins/forbid-emoji/rule.js +112 -0
- package/lib/__templates__/expo/eslint-plugins/forbid-emoji/tech.md +94 -0
- package/lib/__templates__/nextjs/README.md +5 -0
- package/lib/__templates__/nextjs/_gitignore +0 -3
- package/lib/__templates__/nextjs/eslint.config.mjs +5 -0
- package/lib/__templates__/nextjs/next.config.ts +1 -2
- package/lib/__templates__/nextjs/package.json +1 -5
- package/lib/__templates__/nextjs/pnpm-lock.yaml +1012 -12
- package/lib/__templates__/nextjs/scripts/build.sh +2 -2
- package/lib/__templates__/nextjs/scripts/dev.sh +3 -4
- package/lib/__templates__/nextjs/scripts/start.sh +3 -3
- package/lib/__templates__/nextjs/src/app/layout.tsx +1 -1
- package/lib/__templates__/nextjs/{server.ts → src/server.ts} +14 -14
- package/lib/__templates__/nextjs/tsconfig.json +1 -1
- package/lib/__templates__/nuxt-app/README.md +5 -15
- package/lib/__templates__/nuxt-app/app/app.vue +1 -188
- package/lib/__templates__/nuxt-app/app/pages/index.vue +23 -0
- package/lib/__templates__/nuxt-app/assets/css/main.css +24 -0
- package/lib/__templates__/nuxt-app/nuxt.config.ts +63 -3
- package/lib/__templates__/nuxt-app/package.json +7 -0
- package/lib/__templates__/nuxt-app/pnpm-lock.yaml +1610 -53
- package/lib/__templates__/nuxt-app/postcss.config.mjs +8 -0
- package/lib/__templates__/nuxt-app/scripts/dev.sh +2 -3
- package/lib/__templates__/nuxt-app/scripts/start.sh +3 -3
- package/lib/__templates__/nuxt-app/server/api/hello.ts +10 -0
- package/lib/__templates__/nuxt-app/server/middleware/logger.ts +10 -0
- package/lib/__templates__/nuxt-app/server/routes/health.ts +10 -0
- package/lib/__templates__/nuxt-app/tailwind.config.js +13 -0
- package/lib/__templates__/nuxt-app/template.config.js +9 -0
- package/lib/__templates__/templates.json +7 -0
- package/lib/__templates__/vite/README.md +189 -11
- package/lib/__templates__/vite/_gitignore +1 -0
- package/lib/__templates__/vite/eslint.config.mjs +6 -1
- package/lib/__templates__/vite/package.json +15 -3
- package/lib/__templates__/vite/pnpm-lock.yaml +750 -15
- package/lib/__templates__/vite/scripts/build-server.js +70 -0
- package/lib/__templates__/vite/scripts/build.sh +4 -1
- package/lib/__templates__/vite/scripts/dev.sh +4 -4
- package/lib/__templates__/vite/scripts/start.sh +5 -5
- package/lib/__templates__/vite/server/index.ts +57 -0
- package/lib/__templates__/vite/server/routes/index.ts +31 -0
- package/lib/__templates__/vite/server/vite.ts +79 -0
- package/lib/__templates__/vite/tsconfig.json +4 -3
- package/lib/cli.js +89 -100
- package/package.json +4 -1
- package/lib/__templates__/nuxt-app/.nuxt/app.config.mjs +0 -21
- package/lib/__templates__/nuxt-app/.nuxt/components.d.ts +0 -64
- package/lib/__templates__/nuxt-app/.nuxt/imports.d.ts +0 -31
- package/lib/__templates__/nuxt-app/.nuxt/manifest/meta/f97812ec-f25e-427b-b45d-eab58fba39f9.json +0 -1
- package/lib/__templates__/nuxt-app/.nuxt/nuxt.d.ts +0 -19
- package/lib/__templates__/nuxt-app/.nuxt/nuxt.node.d.ts +0 -14
- package/lib/__templates__/nuxt-app/.nuxt/nuxt.shared.d.ts +0 -6
- package/lib/__templates__/nuxt-app/.nuxt/schema/nuxt.schema.d.ts +0 -17
- package/lib/__templates__/nuxt-app/.nuxt/schema/nuxt.schema.json +0 -3
- package/lib/__templates__/nuxt-app/.nuxt/tsconfig.app.json +0 -201
- package/lib/__templates__/nuxt-app/.nuxt/tsconfig.json +0 -203
- package/lib/__templates__/nuxt-app/.nuxt/tsconfig.node.json +0 -110
- package/lib/__templates__/nuxt-app/.nuxt/tsconfig.server.json +0 -140
- package/lib/__templates__/nuxt-app/.nuxt/tsconfig.shared.json +0 -152
- package/lib/__templates__/nuxt-app/.nuxt/types/app.config.d.ts +0 -35
- package/lib/__templates__/nuxt-app/.nuxt/types/build.d.ts +0 -24
- package/lib/__templates__/nuxt-app/.nuxt/types/builder-env.d.ts +0 -1
- package/lib/__templates__/nuxt-app/.nuxt/types/components.d.ts +0 -69
- package/lib/__templates__/nuxt-app/.nuxt/types/imports.d.ts +0 -360
- package/lib/__templates__/nuxt-app/.nuxt/types/middleware.d.ts +0 -11
- package/lib/__templates__/nuxt-app/.nuxt/types/modules.d.ts +0 -79
- package/lib/__templates__/nuxt-app/.nuxt/types/nitro-config.d.ts +0 -14
- package/lib/__templates__/nuxt-app/.nuxt/types/nitro-imports.d.ts +0 -151
- package/lib/__templates__/nuxt-app/.nuxt/types/nitro-layouts.d.ts +0 -17
- package/lib/__templates__/nuxt-app/.nuxt/types/nitro-nuxt.d.ts +0 -64
- package/lib/__templates__/nuxt-app/.nuxt/types/nitro-routes.d.ts +0 -17
- package/lib/__templates__/nuxt-app/.nuxt/types/nitro.d.ts +0 -3
- package/lib/__templates__/nuxt-app/.nuxt/types/plugins.d.ts +0 -30
- package/lib/__templates__/nuxt-app/.nuxt/types/runtime-config.d.ts +0 -32
- package/lib/__templates__/nuxt-app/.nuxt/types/shared-imports.d.ts +0 -10
- package/lib/__templates__/nuxt-app/.nuxt/types/vue-shim.d.ts +0 -0
|
@@ -11,7 +11,7 @@ pnpm install --prefer-frozen-lockfile --prefer-offline --loglevel debug --report
|
|
|
11
11
|
echo "Building the Next.js project..."
|
|
12
12
|
npx next build
|
|
13
13
|
|
|
14
|
-
echo "
|
|
15
|
-
npx
|
|
14
|
+
echo "Bundling server with tsup..."
|
|
15
|
+
npx tsup src/server.ts --format cjs --platform node --target node20 --outDir dist --no-splitting --no-minify
|
|
16
16
|
|
|
17
17
|
echo "Build completed successfully!"
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
set -Eeuo pipefail
|
|
3
3
|
|
|
4
|
-
PORT
|
|
4
|
+
PORT="${PORT:-<%= port %>}"
|
|
5
5
|
COZE_WORKSPACE_PATH="${COZE_WORKSPACE_PATH:-$(pwd)}"
|
|
6
|
-
|
|
7
|
-
DEPLOY_RUN_PORT=<%= port %>
|
|
6
|
+
DEPLOY_RUN_PORT="${DEPLOY_RUN_PORT:-${PORT}}"
|
|
8
7
|
|
|
9
8
|
cd "${COZE_WORKSPACE_PATH}"
|
|
10
9
|
|
|
@@ -30,4 +29,4 @@ echo "Clearing port ${PORT} before start."
|
|
|
30
29
|
kill_port_if_listening
|
|
31
30
|
echo "Starting HTTP service on port ${PORT} for dev..."
|
|
32
31
|
|
|
33
|
-
PORT=$PORT npx tsx server.ts
|
|
32
|
+
PORT=$PORT npx tsx watch src/server.ts
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
set -Eeuo pipefail
|
|
3
3
|
|
|
4
4
|
COZE_WORKSPACE_PATH="${COZE_WORKSPACE_PATH:-$(pwd)}"
|
|
5
|
-
PORT
|
|
6
|
-
DEPLOY_RUN_PORT="${DEPLOY_RUN_PORT:-$PORT}"
|
|
5
|
+
PORT="${PORT:-<%= port %>}"
|
|
6
|
+
DEPLOY_RUN_PORT="${DEPLOY_RUN_PORT:-${PORT}}"
|
|
7
7
|
|
|
8
8
|
start_service() {
|
|
9
9
|
cd "${COZE_WORKSPACE_PATH}"
|
|
10
10
|
echo "Starting HTTP service on port ${DEPLOY_RUN_PORT} for deploy..."
|
|
11
|
-
PORT=${DEPLOY_RUN_PORT}
|
|
11
|
+
PORT=${DEPLOY_RUN_PORT} node dist/server.js
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
echo "Starting HTTP service on port ${DEPLOY_RUN_PORT} for deploy..."
|
|
@@ -2,7 +2,7 @@ import { createServer } from 'http';
|
|
|
2
2
|
import { parse } from 'url';
|
|
3
3
|
import next from 'next';
|
|
4
4
|
|
|
5
|
-
const dev = process.env.
|
|
5
|
+
const dev = process.env.COZE_PROJECT_ENV !== 'PROD';
|
|
6
6
|
const hostname = process.env.HOSTNAME || 'localhost';
|
|
7
7
|
const port = parseInt(process.env.PORT || '<%= port %>', 10);
|
|
8
8
|
|
|
@@ -11,7 +11,7 @@ const app = next({ dev, hostname, port });
|
|
|
11
11
|
const handle = app.getRequestHandler();
|
|
12
12
|
|
|
13
13
|
app.prepare().then(() => {
|
|
14
|
-
createServer(async (req, res) => {
|
|
14
|
+
const server = createServer(async (req, res) => {
|
|
15
15
|
try {
|
|
16
16
|
const parsedUrl = parse(req.url!, true);
|
|
17
17
|
await handle(req, res, parsedUrl);
|
|
@@ -20,16 +20,16 @@ app.prepare().then(() => {
|
|
|
20
20
|
res.statusCode = 500;
|
|
21
21
|
res.end('Internal server error');
|
|
22
22
|
}
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
});
|
|
24
|
+
server.once('error', err => {
|
|
25
|
+
console.error(err);
|
|
26
|
+
process.exit(1);
|
|
27
|
+
});
|
|
28
|
+
server.listen(port, () => {
|
|
29
|
+
console.log(
|
|
30
|
+
`> Server listening at http://${hostname}:${port} as ${
|
|
31
|
+
dev ? 'development' : process.env.COZE_PROJECT_ENV
|
|
32
|
+
}`,
|
|
33
|
+
);
|
|
34
|
+
});
|
|
35
35
|
});
|
|
@@ -49,31 +49,21 @@ pnpm start
|
|
|
49
49
|
```
|
|
50
50
|
<%= appName %>/
|
|
51
51
|
├── app/ # Application source code
|
|
52
|
-
│ ├──
|
|
52
|
+
│ ├── app.vue # Root component
|
|
53
53
|
│ ├── components/ # Vue components
|
|
54
54
|
│ └── layouts/ # Layout components
|
|
55
|
-
├── server/ # Server-side code
|
|
55
|
+
├── server/ # Server-side code (optional)
|
|
56
56
|
│ ├── api/ # API endpoints
|
|
57
57
|
│ └── middleware/ # Server middleware
|
|
58
58
|
├── public/ # Static assets
|
|
59
|
+
├── assets/ # CSS and other assets
|
|
59
60
|
├── nuxt.config.ts # Nuxt configuration
|
|
60
61
|
└── package.json # Project dependencies
|
|
61
62
|
```
|
|
62
63
|
|
|
63
|
-
##
|
|
64
|
+
## Server API (Optional)
|
|
64
65
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
```typescript
|
|
68
|
-
// server/api/hello.ts
|
|
69
|
-
export default defineEventHandler(() => {
|
|
70
|
-
return {
|
|
71
|
-
message: 'Hello from Nuxt API!'
|
|
72
|
-
}
|
|
73
|
-
})
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
Access the endpoint at `/api/hello`.
|
|
66
|
+
You can add server API by creating files in `server/api/` directory. See [server/README.md](./server/README.md) for more details.
|
|
77
67
|
|
|
78
68
|
## Learn More
|
|
79
69
|
|
|
@@ -1,193 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<NuxtRouteAnnouncer />
|
|
4
|
-
<
|
|
5
|
-
class="flex h-full items-center justify-center bg-background text-foreground transition-colors duration-300 dark:bg-background dark:text-foreground overflow-hidden min-h-screen"
|
|
6
|
-
>
|
|
7
|
-
<main
|
|
8
|
-
class="flex w-full h-full max-w-3xl flex-col items-center justify-center px-16 py-32 sm:items-center"
|
|
9
|
-
>
|
|
10
|
-
<div class="flex flex-col items-center justify-between gap-4">
|
|
11
|
-
<img
|
|
12
|
-
src="https://lf-coze-web-cdn.coze.cn/obj/eden-cn/lm-lgvj/ljhwZthlaukjlkulzlp/coze-coding/icon/coze-coding.gif"
|
|
13
|
-
alt="扣子编程 Logo"
|
|
14
|
-
width="156"
|
|
15
|
-
height="130"
|
|
16
|
-
style="width: 156px; height: 130px; object-fit: contain"
|
|
17
|
-
/>
|
|
18
|
-
<div>
|
|
19
|
-
<div
|
|
20
|
-
class="flex flex-col items-center gap-2 text-center sm:items-center sm:text-center"
|
|
21
|
-
>
|
|
22
|
-
<h1
|
|
23
|
-
class="max-w-xl text-base font-semibold leading-tight tracking-tight text-foreground dark:text-foreground"
|
|
24
|
-
>
|
|
25
|
-
应用开发中
|
|
26
|
-
</h1>
|
|
27
|
-
<p
|
|
28
|
-
class="max-w-2xl text-sm leading-8 text-muted-foreground dark:text-muted-foreground"
|
|
29
|
-
>
|
|
30
|
-
请稍后,页面即将呈现
|
|
31
|
-
</p>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
</main>
|
|
36
|
-
</div>
|
|
4
|
+
<NuxtPage />
|
|
37
5
|
</div>
|
|
38
6
|
</template>
|
|
39
|
-
|
|
40
|
-
<style>
|
|
41
|
-
/* Global styles - reset body margin */
|
|
42
|
-
body {
|
|
43
|
-
margin: 0;
|
|
44
|
-
padding: 0;
|
|
45
|
-
}
|
|
46
|
-
</style>
|
|
47
|
-
|
|
48
|
-
<style scoped>
|
|
49
|
-
/* Tailwind-like utility classes */
|
|
50
|
-
.flex {
|
|
51
|
-
display: flex;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.h-full {
|
|
55
|
-
height: 100%;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.min-h-screen {
|
|
59
|
-
min-height: 100vh;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.w-full {
|
|
63
|
-
width: 100%;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.max-w-3xl {
|
|
67
|
-
max-width: 48rem;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.max-w-xl {
|
|
71
|
-
max-width: 36rem;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.max-w-2xl {
|
|
75
|
-
max-width: 42rem;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.flex-col {
|
|
79
|
-
flex-direction: column;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.items-center {
|
|
83
|
-
align-items: center;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.justify-center {
|
|
87
|
-
justify-content: center;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.justify-between {
|
|
91
|
-
justify-content: space-between;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.gap-2 {
|
|
95
|
-
gap: 0.5rem;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.gap-4 {
|
|
99
|
-
gap: 1rem;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.overflow-hidden {
|
|
103
|
-
overflow: hidden;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.px-16 {
|
|
107
|
-
padding-left: 4rem;
|
|
108
|
-
padding-right: 4rem;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.py-32 {
|
|
112
|
-
padding-top: 8rem;
|
|
113
|
-
padding-bottom: 8rem;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.text-center {
|
|
117
|
-
text-align: center;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.text-base {
|
|
121
|
-
font-size: 1rem;
|
|
122
|
-
line-height: 1.5rem;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.text-sm {
|
|
126
|
-
font-size: 0.875rem;
|
|
127
|
-
line-height: 2rem;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.font-semibold {
|
|
131
|
-
font-weight: 600;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.leading-tight {
|
|
135
|
-
line-height: 1.25;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.leading-8 {
|
|
139
|
-
line-height: 2rem;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.tracking-tight {
|
|
143
|
-
letter-spacing: -0.025em;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.bg-background {
|
|
147
|
-
background-color: #ffffff;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.text-foreground {
|
|
151
|
-
color: #000000;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.text-muted-foreground {
|
|
155
|
-
color: #6b7280;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.transition-colors {
|
|
159
|
-
transition-property: color, background-color, border-color;
|
|
160
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
161
|
-
transition-duration: 300ms;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.duration-300 {
|
|
165
|
-
transition-duration: 300ms;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/* Dark mode */
|
|
169
|
-
@media (prefers-color-scheme: dark) {
|
|
170
|
-
.dark\:bg-background {
|
|
171
|
-
background-color: #000000;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.dark\:text-foreground {
|
|
175
|
-
color: #ffffff;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.dark\:text-muted-foreground {
|
|
179
|
-
color: #9ca3af;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/* Responsive */
|
|
184
|
-
@media (min-width: 640px) {
|
|
185
|
-
.sm\:items-center {
|
|
186
|
-
align-items: center;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.sm\:text-center {
|
|
190
|
-
text-align: center;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex min-h-screen items-center justify-center">
|
|
3
|
+
<main class="flex w-full max-w-3xl flex-col items-center justify-center px-16 py-32">
|
|
4
|
+
<div class="flex flex-col items-center gap-4">
|
|
5
|
+
<img
|
|
6
|
+
src="https://lf-coze-web-cdn.coze.cn/obj/eden-cn/lm-lgvj/ljhwZthlaukjlkulzlp/coze-coding/icon/coze-coding.gif"
|
|
7
|
+
alt="扣子编程 Logo"
|
|
8
|
+
width="156"
|
|
9
|
+
height="130"
|
|
10
|
+
style="width: 156px; height: 130px; object-fit: contain"
|
|
11
|
+
/>
|
|
12
|
+
<div class="flex flex-col items-center gap-2 text-center">
|
|
13
|
+
<h1 class="max-w-xl text-base font-semibold leading-tight tracking-tight">
|
|
14
|
+
应用开发中
|
|
15
|
+
</h1>
|
|
16
|
+
<p class="max-w-2xl text-sm leading-8 opacity-70">
|
|
17
|
+
请稍后,页面即将呈现
|
|
18
|
+
</p>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</main>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
--background: #ffffff;
|
|
7
|
+
--foreground: #000000;
|
|
8
|
+
--muted-foreground: #6b7280;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@media (prefers-color-scheme: dark) {
|
|
12
|
+
:root {
|
|
13
|
+
--background: #000000;
|
|
14
|
+
--foreground: #ffffff;
|
|
15
|
+
--muted-foreground: #9ca3af;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
body {
|
|
20
|
+
margin: 0;
|
|
21
|
+
padding: 0;
|
|
22
|
+
background: var(--background);
|
|
23
|
+
color: var(--foreground);
|
|
24
|
+
}
|
|
@@ -1,10 +1,61 @@
|
|
|
1
1
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
3
|
+
import { dirname, resolve } from 'path';
|
|
4
|
+
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = dirname(__filename);
|
|
7
|
+
|
|
2
8
|
export default defineNuxtConfig({
|
|
3
9
|
compatibilityDate: '2025-07-15',
|
|
4
10
|
devtools: { enabled: true },
|
|
11
|
+
telemetry: false,
|
|
12
|
+
|
|
13
|
+
// App head configuration
|
|
14
|
+
app: {
|
|
15
|
+
head: {
|
|
16
|
+
title: '新应用 | 扣子编程',
|
|
17
|
+
titleTemplate: '%s | 扣子编程',
|
|
18
|
+
meta: [
|
|
19
|
+
{ charset: 'utf-8' },
|
|
20
|
+
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
|
21
|
+
{
|
|
22
|
+
name: 'description',
|
|
23
|
+
content:
|
|
24
|
+
'扣子编程是一款一站式云端 Vibe Coding 开发平台。通过对话轻松构建智能体、工作流和网站,实现从创意到上线的无缝衔接。',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'keywords',
|
|
28
|
+
content:
|
|
29
|
+
'扣子编程,Coze Code,Vibe Coding,AI 编程,智能体搭建,工作流搭建,网站搭建,网站部署,全栈开发,AI 工程师',
|
|
30
|
+
},
|
|
31
|
+
{ name: 'author', content: 'Coze Code Team' },
|
|
32
|
+
{ name: 'generator', content: 'Coze Code' },
|
|
33
|
+
// Open Graph
|
|
34
|
+
{ property: 'og:title', content: '扣子编程 | 你的 AI 工程师已就位' },
|
|
35
|
+
{
|
|
36
|
+
property: 'og:description',
|
|
37
|
+
content:
|
|
38
|
+
'我正在使用扣子编程 Vibe Coding,让创意瞬间上线。告别拖拽,拥抱心流。',
|
|
39
|
+
},
|
|
40
|
+
{ property: 'og:url', content: 'https://code.coze.cn' },
|
|
41
|
+
{ property: 'og:site_name', content: '扣子编程' },
|
|
42
|
+
{ property: 'og:locale', content: 'zh_CN' },
|
|
43
|
+
{ property: 'og:type', content: 'website' },
|
|
44
|
+
// Robots
|
|
45
|
+
{ name: 'robots', content: 'index, follow' },
|
|
46
|
+
],
|
|
47
|
+
link: [{ rel: 'canonical', href: 'https://code.coze.cn' }],
|
|
48
|
+
htmlAttrs: {
|
|
49
|
+
lang: 'zh-CN',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
5
53
|
|
|
6
54
|
// Nuxt modules
|
|
7
|
-
modules: ['@nuxt/image'],
|
|
55
|
+
modules: ['@nuxt/image', '@nuxtjs/tailwindcss'],
|
|
56
|
+
|
|
57
|
+
// Global CSS
|
|
58
|
+
css: [resolve(__dirname, 'assets/css/main.css')],
|
|
8
59
|
|
|
9
60
|
// Development server configuration
|
|
10
61
|
devServer: {
|
|
@@ -21,10 +72,18 @@ export default defineNuxtConfig({
|
|
|
21
72
|
// Vite configuration (similar to Next.js allowedDevOrigins)
|
|
22
73
|
vite: {
|
|
23
74
|
server: {
|
|
75
|
+
host: '0.0.0.0',
|
|
24
76
|
cors: {
|
|
25
77
|
origin: ['*.dev.coze.site'],
|
|
26
78
|
credentials: true,
|
|
27
79
|
},
|
|
80
|
+
hmr: {
|
|
81
|
+
overlay: true,
|
|
82
|
+
path: '/hot/vite-hmr',
|
|
83
|
+
port: parseInt(process.env.HMR_PORT || '<%= hmrPort %>', 10),
|
|
84
|
+
clientPort: 443,
|
|
85
|
+
timeout: 30000,
|
|
86
|
+
},
|
|
28
87
|
},
|
|
29
88
|
},
|
|
30
89
|
|
|
@@ -48,9 +107,10 @@ export default defineNuxtConfig({
|
|
|
48
107
|
routeRules: {
|
|
49
108
|
'/**': {
|
|
50
109
|
headers: {
|
|
51
|
-
'Content-Security-Policy':
|
|
110
|
+
'Content-Security-Policy':
|
|
111
|
+
"img-src 'self' data: https://lf-coze-web-cdn.coze.cn;",
|
|
52
112
|
},
|
|
53
113
|
},
|
|
54
114
|
},
|
|
55
115
|
},
|
|
56
|
-
})
|
|
116
|
+
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%= appName %>",
|
|
3
|
+
"version": "0.1.0",
|
|
3
4
|
"private": true,
|
|
4
5
|
"type": "module",
|
|
5
6
|
"scripts": {
|
|
@@ -13,12 +14,18 @@
|
|
|
13
14
|
"dependencies": {
|
|
14
15
|
"@nuxt/image": "^1.8.1",
|
|
15
16
|
"nuxt": "^4.3.1",
|
|
17
|
+
"tailwind-merge": "^2.6.0",
|
|
16
18
|
"vue": "^3.5.30",
|
|
17
19
|
"vue-router": "^4.6.4"
|
|
18
20
|
},
|
|
19
21
|
"devDependencies": {
|
|
22
|
+
"@nuxtjs/tailwindcss": "^6.14.0",
|
|
20
23
|
"@types/node": "^20",
|
|
24
|
+
"autoprefixer": "^10.4.20",
|
|
25
|
+
"coze-coding-dev-sdk": "^0.7.16",
|
|
21
26
|
"only-allow": "^1.2.2",
|
|
27
|
+
"postcss": "^8.4.49",
|
|
28
|
+
"tailwindcss": "^3.4.17",
|
|
22
29
|
"typescript": "^5"
|
|
23
30
|
},
|
|
24
31
|
"packageManager": "pnpm@9.0.0",
|