@coze-arch/cli 0.0.1-alpha.e8683e → 0.0.1-alpha.e9ff73
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/.cozeproj/scripts/dev_run.sh +25 -16
- package/lib/__templates__/expo/.cozeproj/scripts/server_dev_run.sh +9 -8
- package/lib/__templates__/expo/README.md +2 -2
- package/lib/__templates__/expo/client/app/+not-found.tsx +30 -0
- package/lib/__templates__/expo/client/app.config.ts +2 -2
- package/lib/__templates__/expo/client/eslint.config.mjs +17 -1
- package/lib/__templates__/expo/client/hooks/useSafeRouter.ts +152 -0
- package/lib/__templates__/expo/client/metro.config.js +3 -0
- package/lib/__templates__/expo/client/package.json +36 -34
- package/lib/__templates__/expo/client/screens/demo/index.tsx +3 -3
- 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/package.json +3 -0
- package/lib/__templates__/expo/patches/expo@54.0.33.patch +45 -0
- package/lib/__templates__/expo/pnpm-lock.yaml +1318 -2636
- package/lib/__templates__/expo/server/package.json +9 -7
- package/lib/__templates__/expo/server/src/index.ts +1 -0
- package/lib/__templates__/expo/template.config.js +56 -0
- package/lib/__templates__/native-static/.coze +11 -0
- package/lib/__templates__/native-static/index.html +33 -0
- package/lib/__templates__/native-static/styles/main.css +136 -0
- package/lib/__templates__/native-static/template.config.js +22 -0
- package/lib/__templates__/nextjs/_gitignore +3 -0
- package/lib/__templates__/nextjs/next.config.ts +1 -1
- package/lib/__templates__/nextjs/package.json +4 -1
- package/lib/__templates__/nextjs/pnpm-lock.yaml +1066 -926
- package/lib/__templates__/nextjs/scripts/build.sh +4 -1
- package/lib/__templates__/nextjs/scripts/dev.sh +1 -1
- package/lib/__templates__/nextjs/scripts/start.sh +1 -1
- package/lib/__templates__/nextjs/server.ts +35 -0
- package/lib/__templates__/nextjs/src/app/page.tsx +18 -60
- package/lib/__templates__/nextjs/template.config.js +49 -14
- package/lib/__templates__/nuxt-app/.coze +12 -0
- package/lib/__templates__/nuxt-app/.nuxt/app.config.mjs +21 -0
- package/lib/__templates__/nuxt-app/.nuxt/components.d.ts +64 -0
- package/lib/__templates__/nuxt-app/.nuxt/imports.d.ts +31 -0
- package/lib/__templates__/nuxt-app/.nuxt/manifest/meta/f97812ec-f25e-427b-b45d-eab58fba39f9.json +1 -0
- package/lib/__templates__/nuxt-app/.nuxt/nuxt.d.ts +19 -0
- package/lib/__templates__/nuxt-app/.nuxt/nuxt.node.d.ts +14 -0
- package/lib/__templates__/nuxt-app/.nuxt/nuxt.shared.d.ts +6 -0
- package/lib/__templates__/nuxt-app/.nuxt/schema/nuxt.schema.d.ts +17 -0
- package/lib/__templates__/nuxt-app/.nuxt/schema/nuxt.schema.json +3 -0
- package/lib/__templates__/nuxt-app/.nuxt/tsconfig.app.json +201 -0
- package/lib/__templates__/nuxt-app/.nuxt/tsconfig.json +203 -0
- package/lib/__templates__/nuxt-app/.nuxt/tsconfig.node.json +110 -0
- package/lib/__templates__/nuxt-app/.nuxt/tsconfig.server.json +140 -0
- package/lib/__templates__/nuxt-app/.nuxt/tsconfig.shared.json +152 -0
- package/lib/__templates__/nuxt-app/.nuxt/types/app.config.d.ts +35 -0
- package/lib/__templates__/nuxt-app/.nuxt/types/build.d.ts +24 -0
- package/lib/__templates__/nuxt-app/.nuxt/types/builder-env.d.ts +1 -0
- package/lib/__templates__/nuxt-app/.nuxt/types/components.d.ts +69 -0
- package/lib/__templates__/nuxt-app/.nuxt/types/imports.d.ts +360 -0
- package/lib/__templates__/nuxt-app/.nuxt/types/middleware.d.ts +11 -0
- package/lib/__templates__/nuxt-app/.nuxt/types/modules.d.ts +79 -0
- package/lib/__templates__/nuxt-app/.nuxt/types/nitro-config.d.ts +14 -0
- package/lib/__templates__/nuxt-app/.nuxt/types/nitro-imports.d.ts +151 -0
- package/lib/__templates__/nuxt-app/.nuxt/types/nitro-layouts.d.ts +17 -0
- package/lib/__templates__/nuxt-app/.nuxt/types/nitro-nuxt.d.ts +64 -0
- package/lib/__templates__/nuxt-app/.nuxt/types/nitro-routes.d.ts +17 -0
- package/lib/__templates__/nuxt-app/.nuxt/types/nitro.d.ts +3 -0
- package/lib/__templates__/nuxt-app/.nuxt/types/plugins.d.ts +30 -0
- package/lib/__templates__/nuxt-app/.nuxt/types/runtime-config.d.ts +32 -0
- package/lib/__templates__/nuxt-app/.nuxt/types/shared-imports.d.ts +10 -0
- package/lib/__templates__/nuxt-app/.nuxt/types/vue-shim.d.ts +0 -0
- package/lib/__templates__/nuxt-app/README.md +83 -0
- package/lib/__templates__/nuxt-app/_gitignore +24 -0
- package/lib/__templates__/nuxt-app/_npmrc +23 -0
- package/lib/__templates__/nuxt-app/app/app.vue +193 -0
- package/lib/__templates__/nuxt-app/nuxt.config.ts +56 -0
- package/lib/__templates__/nuxt-app/package.json +28 -0
- package/lib/__templates__/nuxt-app/pnpm-lock.yaml +7202 -0
- package/lib/__templates__/nuxt-app/public/favicon.ico +0 -0
- package/lib/__templates__/nuxt-app/public/robots.txt +2 -0
- package/lib/__templates__/nuxt-app/scripts/build.sh +14 -0
- package/lib/__templates__/nuxt-app/scripts/dev.sh +33 -0
- package/lib/__templates__/nuxt-app/scripts/prepare.sh +14 -0
- package/lib/__templates__/nuxt-app/scripts/start.sh +15 -0
- package/lib/__templates__/nuxt-app/template.config.js +78 -0
- package/lib/__templates__/nuxt-app/tsconfig.json +18 -0
- 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 +14 -0
- package/lib/__templates__/taro/.cozeproj/scripts/dev_build.sh +2 -0
- package/lib/__templates__/taro/.cozeproj/scripts/dev_run.sh +151 -0
- package/lib/__templates__/taro/.cozeproj/scripts/init_env.sh +5 -0
- package/lib/__templates__/taro/.cozeproj/scripts/pack.sh +24 -0
- package/lib/__templates__/taro/README.md +751 -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 +223 -0
- package/lib/__templates__/taro/config/prod.ts +34 -0
- package/lib/__templates__/taro/eslint.config.mjs +80 -0
- package/lib/__templates__/taro/key/private.appid.key +0 -0
- package/lib/__templates__/taro/package.json +107 -0
- package/lib/__templates__/taro/patches/@tarojs__plugin-mini-ci@4.1.9.patch +30 -0
- package/lib/__templates__/taro/pnpm-lock.yaml +23100 -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 +40 -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 +49 -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.tsx +9 -0
- package/lib/__templates__/taro/src/index.html +39 -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/presets/dev-debug.ts +23 -0
- package/lib/__templates__/taro/src/presets/h5-container.tsx +15 -0
- package/lib/__templates__/taro/src/presets/h5-navbar.tsx +201 -0
- package/lib/__templates__/taro/src/presets/h5-styles.ts +142 -0
- package/lib/__templates__/taro/src/presets/index.tsx +18 -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 +68 -0
- package/lib/__templates__/vite/package.json +5 -1
- package/lib/__templates__/vite/pnpm-lock.yaml +146 -1659
- package/lib/__templates__/vite/src/main.ts +17 -47
- package/lib/__templates__/vite/template.config.js +49 -14
- package/lib/__templates__/vite/vite.config.ts +1 -0
- package/lib/cli.js +617 -128
- package/package.json +2 -1
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<NuxtRouteAnnouncer />
|
|
4
|
+
<div
|
|
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>
|
|
37
|
+
</div>
|
|
38
|
+
</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,56 @@
|
|
|
1
|
+
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
2
|
+
export default defineNuxtConfig({
|
|
3
|
+
compatibilityDate: '2025-07-15',
|
|
4
|
+
devtools: { enabled: true },
|
|
5
|
+
|
|
6
|
+
// Nuxt modules
|
|
7
|
+
modules: ['@nuxt/image'],
|
|
8
|
+
|
|
9
|
+
// Development server configuration
|
|
10
|
+
devServer: {
|
|
11
|
+
port: parseInt(process.env.PORT || '<%= port %>', 10),
|
|
12
|
+
host: process.env.HOSTNAME || 'localhost',
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
// TypeScript configuration
|
|
16
|
+
typescript: {
|
|
17
|
+
strict: false,
|
|
18
|
+
typeCheck: false,
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
// Vite configuration (similar to Next.js allowedDevOrigins)
|
|
22
|
+
vite: {
|
|
23
|
+
server: {
|
|
24
|
+
cors: {
|
|
25
|
+
origin: ['*.dev.coze.site'],
|
|
26
|
+
credentials: true,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
// Image optimization (similar to Next.js images config)
|
|
32
|
+
// Using @nuxt/image module for image optimization
|
|
33
|
+
// https://image.nuxt.com/
|
|
34
|
+
image: {
|
|
35
|
+
domains: ['lf-coze-web-cdn.coze.cn'],
|
|
36
|
+
// Remote patterns configuration
|
|
37
|
+
remotePatterns: [
|
|
38
|
+
{
|
|
39
|
+
protocol: 'https',
|
|
40
|
+
hostname: 'lf-coze-web-cdn.coze.cn',
|
|
41
|
+
pathname: '/**',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
// Security headers (Content Security Policy)
|
|
47
|
+
nitro: {
|
|
48
|
+
routeRules: {
|
|
49
|
+
'/**': {
|
|
50
|
+
headers: {
|
|
51
|
+
'Content-Security-Policy': "img-src 'self' data: https://lf-coze-web-cdn.coze.cn;",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
})
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "<%= appName %>",
|
|
3
|
+
"private": true,
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "bash ./scripts/build.sh",
|
|
7
|
+
"dev": "bash ./scripts/dev.sh",
|
|
8
|
+
"generate": "nuxt generate",
|
|
9
|
+
"preinstall": "npx only-allow pnpm",
|
|
10
|
+
"preview": "nuxt preview",
|
|
11
|
+
"start": "bash ./scripts/start.sh"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@nuxt/image": "^1.8.1",
|
|
15
|
+
"nuxt": "^4.3.1",
|
|
16
|
+
"vue": "^3.5.30",
|
|
17
|
+
"vue-router": "^4.6.4"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@types/node": "^20",
|
|
21
|
+
"only-allow": "^1.2.2",
|
|
22
|
+
"typescript": "^5"
|
|
23
|
+
},
|
|
24
|
+
"packageManager": "pnpm@9.0.0",
|
|
25
|
+
"engines": {
|
|
26
|
+
"pnpm": ">=9.0.0"
|
|
27
|
+
}
|
|
28
|
+
}
|