@coze-arch/cli 0.0.1-alpha.a3fb1a → 0.0.1-alpha.c49cb2
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/deploy_build.sh +4 -3
- package/lib/__templates__/expo/.cozeproj/scripts/deploy_run.sh +8 -40
- package/lib/__templates__/expo/_npmrc +1 -1
- package/lib/__templates__/expo/client/contexts/AuthContext.tsx +14 -107
- package/lib/__templates__/expo/client/screens/home/index.tsx +1 -4
- package/lib/__templates__/expo/client/screens/home/styles.ts +1 -273
- package/lib/__templates__/expo/client/utils/index.ts +1 -2
- package/lib/__templates__/expo/package.json +1 -1
- package/lib/__templates__/expo/pnpm-lock.yaml +5 -5
- package/lib/__templates__/expo/src/index.ts +2 -2
- package/lib/__templates__/expo/template.config.js +1 -1
- package/lib/__templates__/nextjs/_npmrc +1 -1
- package/lib/__templates__/nextjs/package.json +1 -4
- package/lib/__templates__/nextjs/pnpm-lock.yaml +5 -1025
- package/lib/__templates__/nextjs/scripts/dev.sh +1 -1
- package/lib/__templates__/nextjs/src/app/layout.tsx +18 -22
- package/lib/__templates__/nextjs/template.config.js +1 -1
- package/lib/__templates__/templates.json +7 -0
- package/lib/__templates__/vite/_npmrc +1 -1
- package/lib/__templates__/vite/template.config.js +11 -2
- package/lib/__templates__/vite/vite.config.ts +3 -3
- package/lib/cli.js +385 -242
- package/package.json +1 -2
- package/lib/__templates__/nextjs/.babelrc +0 -15
- package/lib/__templates__/nextjs/server.mjs +0 -50
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Metadata } from 'next';
|
|
2
2
|
import { Geist, Geist_Mono } from 'next/font/google';
|
|
3
|
-
import { Inspector } from 'react-dev-inspector';
|
|
4
3
|
import './globals.css';
|
|
5
4
|
|
|
6
5
|
const geistSans = Geist({
|
|
@@ -34,9 +33,9 @@ export const metadata: Metadata = {
|
|
|
34
33
|
],
|
|
35
34
|
authors: [{ name: 'Coze Code Team', url: 'https://code.coze.cn' }],
|
|
36
35
|
generator: 'Coze Code',
|
|
37
|
-
icons: {
|
|
38
|
-
|
|
39
|
-
},
|
|
36
|
+
// icons: {
|
|
37
|
+
// icon: '',
|
|
38
|
+
// },
|
|
40
39
|
openGraph: {
|
|
41
40
|
title: '扣子编程 | 你的 AI 工程师已就位',
|
|
42
41
|
description:
|
|
@@ -45,22 +44,22 @@ export const metadata: Metadata = {
|
|
|
45
44
|
siteName: '扣子编程',
|
|
46
45
|
locale: 'zh_CN',
|
|
47
46
|
type: 'website',
|
|
48
|
-
images: [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
],
|
|
56
|
-
},
|
|
57
|
-
twitter: {
|
|
58
|
-
card: 'summary_large_image',
|
|
59
|
-
title: 'Coze Code | Your AI Engineer is Here',
|
|
60
|
-
description:
|
|
61
|
-
'Build and deploy full-stack applications through AI conversation. No env setup, just flow.',
|
|
62
|
-
images: [''],
|
|
47
|
+
// images: [
|
|
48
|
+
// {
|
|
49
|
+
// url: '',
|
|
50
|
+
// width: 1200,
|
|
51
|
+
// height: 630,
|
|
52
|
+
// alt: '扣子编程 - 你的 AI 工程师',
|
|
53
|
+
// },
|
|
54
|
+
// ],
|
|
63
55
|
},
|
|
56
|
+
// twitter: {
|
|
57
|
+
// card: 'summary_large_image',
|
|
58
|
+
// title: 'Coze Code | Your AI Engineer is Here',
|
|
59
|
+
// description:
|
|
60
|
+
// 'Build and deploy full-stack applications through AI conversation. No env setup, just flow.',
|
|
61
|
+
// // images: [''],
|
|
62
|
+
// },
|
|
64
63
|
robots: {
|
|
65
64
|
index: true,
|
|
66
65
|
follow: true,
|
|
@@ -72,14 +71,11 @@ export default function RootLayout({
|
|
|
72
71
|
}: Readonly<{
|
|
73
72
|
children: React.ReactNode;
|
|
74
73
|
}>) {
|
|
75
|
-
const isDev = process.env.NODE_ENV === 'development';
|
|
76
|
-
|
|
77
74
|
return (
|
|
78
75
|
<html lang="en">
|
|
79
76
|
<body
|
|
80
77
|
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
|
81
78
|
>
|
|
82
|
-
{isDev && <Inspector />}
|
|
83
79
|
{children}
|
|
84
80
|
</body>
|
|
85
81
|
</html>
|
|
@@ -52,6 +52,13 @@
|
|
|
52
52
|
"port": {
|
|
53
53
|
"type": "number",
|
|
54
54
|
"description": "Development server port",
|
|
55
|
+
"default": 5000,
|
|
56
|
+
"minimum": 1024,
|
|
57
|
+
"maximum": 65535
|
|
58
|
+
},
|
|
59
|
+
"hmrPort": {
|
|
60
|
+
"type": "number",
|
|
61
|
+
"description": "Development HMR server port",
|
|
55
62
|
"default": 6000,
|
|
56
63
|
"minimum": 1024,
|
|
57
64
|
"maximum": 65535
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
|
|
10
11
|
export const paramsSchema = {
|
|
11
12
|
type: 'object',
|
|
12
13
|
properties: {
|
|
@@ -19,11 +20,18 @@ export const paramsSchema = {
|
|
|
19
20
|
},
|
|
20
21
|
port: {
|
|
21
22
|
type: 'number',
|
|
22
|
-
default:
|
|
23
|
+
default: 5000,
|
|
23
24
|
minimum: 1024,
|
|
24
25
|
maximum: 65535,
|
|
25
26
|
description: 'Development server port',
|
|
26
27
|
},
|
|
28
|
+
hmrPort: {
|
|
29
|
+
type: 'number',
|
|
30
|
+
default: 6000,
|
|
31
|
+
minimum: 1024,
|
|
32
|
+
maximum: 65535,
|
|
33
|
+
description: 'Development HMR server port',
|
|
34
|
+
},
|
|
27
35
|
},
|
|
28
36
|
required: [],
|
|
29
37
|
additionalProperties: false,
|
|
@@ -34,7 +42,8 @@ const config = {
|
|
|
34
42
|
|
|
35
43
|
defaultParams: {
|
|
36
44
|
port: 5000,
|
|
37
|
-
|
|
45
|
+
hmrPort: 6000,
|
|
46
|
+
appName: 'projects',
|
|
38
47
|
},
|
|
39
48
|
|
|
40
49
|
onBeforeRender: async context => {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineConfig } from 'vite';
|
|
2
2
|
|
|
3
3
|
export default defineConfig({
|
|
4
|
-
port: '<%= port %>',
|
|
5
|
-
host: '0.0.0.0',
|
|
6
4
|
server: {
|
|
5
|
+
port: <%= port %>,
|
|
6
|
+
host: '0.0.0.0',
|
|
7
7
|
hmr: {
|
|
8
8
|
overlay: true,
|
|
9
9
|
path: '/hot/vite-hmr',
|
|
10
|
-
port:
|
|
10
|
+
port: <%= hmrPort %>,
|
|
11
11
|
clientPort: 443,
|
|
12
12
|
timeout: 30000,
|
|
13
13
|
},
|