@coze-arch/cli 0.0.1-alpha.ac9009 → 0.0.1-alpha.aea179

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.
Files changed (42) hide show
  1. package/lib/__templates__/expo/.coze +1 -1
  2. package/lib/__templates__/expo/.cozeproj/scripts/dev_build.sh +19 -82
  3. package/lib/__templates__/expo/.cozeproj/scripts/dev_run.sh +62 -81
  4. package/lib/__templates__/expo/README.md +25 -16
  5. package/lib/__templates__/expo/client/app/index.tsx +1 -0
  6. package/lib/__templates__/expo/client/app.config.ts +64 -60
  7. package/lib/__templates__/expo/client/assets/images/coze-logo.png +0 -0
  8. package/lib/__templates__/expo/client/constants/theme.ts +20 -16
  9. package/lib/__templates__/expo/client/hooks/useColorScheme.ts +34 -1
  10. package/lib/__templates__/expo/client/package.json +3 -2
  11. package/lib/__templates__/expo/client/screens/home/index.tsx +8 -37
  12. package/lib/__templates__/expo/client/screens/home/styles.ts +16 -52
  13. package/lib/__templates__/expo/pnpm-lock.yaml +28 -6
  14. package/lib/__templates__/expo/server/package.json +2 -0
  15. package/lib/__templates__/expo/server/src/index.ts +8 -2
  16. package/lib/__templates__/expo/server/tsconfig.json +2 -2
  17. package/lib/__templates__/expo/template.config.js +1 -0
  18. package/lib/__templates__/nextjs/.coze +1 -0
  19. package/lib/__templates__/nextjs/_npmrc +1 -0
  20. package/lib/__templates__/nextjs/next.config.ts +12 -0
  21. package/lib/__templates__/nextjs/package.json +3 -2
  22. package/lib/__templates__/nextjs/pnpm-lock.yaml +13 -5
  23. package/lib/__templates__/nextjs/scripts/prepare.sh +9 -0
  24. package/lib/__templates__/nextjs/src/app/globals.css +10 -2
  25. package/lib/__templates__/nextjs/src/app/layout.tsx +1 -12
  26. package/lib/__templates__/nextjs/src/app/page.tsx +33 -21
  27. package/lib/__templates__/nextjs/src/components/ui/resizable.tsx +29 -22
  28. package/lib/__templates__/nextjs/src/components/ui/sidebar.tsx +228 -230
  29. package/lib/__templates__/nextjs/template.config.js +30 -0
  30. package/lib/__templates__/templates.json +61 -43
  31. package/lib/__templates__/vite/.coze +1 -0
  32. package/lib/__templates__/vite/_npmrc +1 -0
  33. package/lib/__templates__/vite/eslint.config.mjs +9 -0
  34. package/lib/__templates__/vite/package.json +5 -1
  35. package/lib/__templates__/vite/pnpm-lock.yaml +3481 -14
  36. package/lib/__templates__/vite/scripts/prepare.sh +9 -0
  37. package/lib/__templates__/vite/template.config.js +28 -4
  38. package/lib/cli.js +189 -52
  39. package/package.json +5 -3
  40. package/lib/__templates__/nextjs/.vscode/settings.json +0 -121
  41. package/lib/__templates__/vite/.vscode/settings.json +0 -7
  42. /package/lib/__templates__/expo/client/app/{index.ts → home.tsx} +0 -0
@@ -2,23 +2,21 @@ import { Platform, StyleSheet } from "react-native";
2
2
 
3
3
  export const Colors = {
4
4
  light: {
5
- text: "#111827",
6
- textPrimary: "#111827",
5
+ textPrimary: "#1C1917",
7
6
  textSecondary: "#374151",
8
7
  textMuted: "#9CA3AF",
9
8
  textDisabled: "#D1D5DB",
10
9
  placeholder: "#9CA3AF",
11
- buttonText: "#FFFFFF",
12
10
  tabIconDefault: "#9CA3AF",
13
- tabIconSelected: "#111827",
14
- primary: "#111827",
11
+ tabIconSelected: "#1C1917",
12
+ primary: "#1C1917",
15
13
  accent: "#000000",
16
- link: "#111827",
14
+ link: "#1C1917",
17
15
  success: "#16A34A",
18
16
  warning: "#F59E0B",
19
17
  error: "#DC2626",
20
18
  info: "#2563EB",
21
- backgroundRoot: "#FFFFFF",
19
+ backgroundRoot: "#FAFAF9",
22
20
  backgroundDefault: "#F9FAFB",
23
21
  backgroundSecondary: "#F3F4F6",
24
22
  backgroundTertiary: "#E5E7EB",
@@ -27,25 +25,27 @@ export const Colors = {
27
25
  divider: "#F3F4F6",
28
26
  overlay: "rgba(0, 0, 0, 0.4)",
29
27
  chartBackground: "rgba(249, 250, 251, 0.5)",
28
+ buttonPrimaryBackground: "#1C1917",
29
+ buttonPrimaryText: "#FFFFFF",
30
+ buttonSecondaryBackground: "#F3F4F6",
31
+ buttonSecondaryText: "#1C1917",
30
32
  },
31
33
  dark: {
32
- text: "#ECEDEE",
33
- textPrimary: "#ECEDEE",
34
+ textPrimary: "#FAFAF9",
34
35
  textSecondary: "#9BA1A6",
35
36
  textMuted: "#6F767E",
36
37
  textDisabled: "#4A4D50",
37
38
  placeholder: "#6F767E",
38
- buttonText: "#FFFFFF",
39
39
  tabIconDefault: "#6F767E",
40
- tabIconSelected: "#ECEDEE",
41
- primary: "#ECEDEE",
40
+ tabIconSelected: "#FAFAF9",
41
+ primary: "#FAFAF9",
42
42
  accent: "#FFFFFF",
43
- link: "#ECEDEE",
43
+ link: "#FAFAF9",
44
44
  success: "#30D158",
45
45
  warning: "#FF9F0A",
46
46
  error: "#FF453A",
47
47
  info: "#64D2FF",
48
- backgroundRoot: "#000000",
48
+ backgroundRoot: "#1C1917",
49
49
  backgroundDefault: "#1C1C1E",
50
50
  backgroundSecondary: "#2C2C2E",
51
51
  backgroundTertiary: "#3A3A3C",
@@ -54,6 +54,10 @@ export const Colors = {
54
54
  divider: "#2C2C2E",
55
55
  overlay: "rgba(0, 0, 0, 0.6)",
56
56
  chartBackground: "rgba(28, 28, 30, 0.5)",
57
+ buttonPrimaryBackground: "#FAFAF9",
58
+ buttonPrimaryText: "#1C1917",
59
+ buttonSecondaryBackground: "#2C2C2E",
60
+ buttonSecondaryText: "#FAFAF9",
57
61
  },
58
62
  };
59
63
 
@@ -509,7 +513,7 @@ export const createThemedStyles = (theme: Theme) => {
509
513
  ...CommonStyles.scrollContent,
510
514
  },
511
515
  text: {
512
- color: theme.text,
516
+ color: theme.textPrimary,
513
517
  },
514
518
  textPrimary: {
515
519
  color: theme.textPrimary,
@@ -533,7 +537,7 @@ export const createThemedStyles = (theme: Theme) => {
533
537
  color: theme.info,
534
538
  },
535
539
  textButton: {
536
- color: theme.buttonText,
540
+ color: theme.buttonPrimaryText,
537
541
  },
538
542
  avatar: {
539
543
  ...CommonStyles.avatar,
@@ -1 +1,34 @@
1
- export { useColorScheme } from "react-native";
1
+ import { useEffect, useState } from 'react';
2
+ import { ColorSchemeName, useColorScheme as useReactNativeColorScheme, Platform } from 'react-native';
3
+
4
+ export function useColorScheme() {
5
+ const systemColorScheme = useReactNativeColorScheme();
6
+ const [colorScheme, setColorScheme] = useState<ColorSchemeName>(systemColorScheme);
7
+
8
+ useEffect(() => {
9
+ setColorScheme(systemColorScheme);
10
+ }, [systemColorScheme])
11
+
12
+ useEffect(() => {
13
+ function handleMessage(e: MessageEvent<{ event: string; colorScheme: ColorSchemeName; } | undefined>) {
14
+ if (e.data?.event === 'coze.workbench.colorScheme') {
15
+ const cs = e.data.colorScheme;
16
+ if (typeof cs === 'string') {
17
+ setColorScheme(cs);
18
+ }
19
+ }
20
+ }
21
+
22
+ if (Platform.OS === 'web') {
23
+ window.addEventListener('message', handleMessage, false);
24
+ }
25
+
26
+ return () => {
27
+ if (Platform.OS === 'web') {
28
+ window.removeEventListener('message', handleMessage, false);
29
+ }
30
+ }
31
+ }, []);
32
+
33
+ return colorScheme;
34
+ }
@@ -24,8 +24,6 @@
24
24
  "@react-native-picker/picker": "^2.11.0",
25
25
  "@react-navigation/bottom-tabs": "^7.2.0",
26
26
  "@react-navigation/native": "^7.0.14",
27
- "babel-plugin-module-resolver": "^5.0.2",
28
- "babel-preset-expo": "^54.0.9",
29
27
  "dayjs": "^1.11.19",
30
28
  "expo": "^54.0.7",
31
29
  "expo-auth-session": "^7.0.9",
@@ -40,6 +38,7 @@
40
38
  "expo-linear-gradient": "~15.0.6",
41
39
  "expo-linking": "~8.0.7",
42
40
  "expo-location": "~19.0.7",
41
+ "expo-image": "^3.0.11",
43
42
  "expo-router": "~6.0.0",
44
43
  "expo-splash-screen": "~31.0.8",
45
44
  "expo-status-bar": "~3.0.7",
@@ -65,6 +64,8 @@
65
64
  },
66
65
  "devDependencies": {
67
66
  "@babel/core": "^7.25.2",
67
+ "babel-plugin-module-resolver": "^5.0.2",
68
+ "babel-preset-expo": "^54.0.9",
68
69
  "@eslint/js": "^9.27.0",
69
70
  "@types/jest": "^29.5.12",
70
71
  "@types/react": "~19.1.0",
@@ -1,50 +1,21 @@
1
- import React, { useState, useCallback } from 'react';
2
- import {
3
- View,
4
- Text,
5
- ScrollView,
6
- RefreshControl,
7
- } from 'react-native';
8
- import { useRouter, useFocusEffect } from 'expo-router';
9
- import { FontAwesome6 } from '@expo/vector-icons';
10
- import { useSafeAreaInsets } from 'react-native-safe-area-context';
11
- import { useTheme } from "@/hooks/useTheme";
1
+ import { View, Text } from 'react-native';
2
+ import { Image } from 'expo-image';
12
3
 
4
+ import { useTheme } from '@/hooks/useTheme';
13
5
  import { Screen } from '@/components/Screen';
14
-
15
6
  import { styles } from './styles';
16
7
 
17
8
  export default function HomeScreen() {
18
- const insets = useSafeAreaInsets();
19
9
  const { theme, isDark } = useTheme();
20
10
 
21
- const [isRefreshing, setIsRefreshing] = useState(false);
22
-
23
- const loadData = useCallback(async () => {
24
- }, []);
25
-
26
- useFocusEffect(
27
- useCallback(() => {
28
- loadData();
29
- }, [loadData])
30
- );
31
-
32
- const handleRefresh = useCallback(() => {
33
- setIsRefreshing(true);
34
- loadData();
35
- }, [loadData]);
36
11
  return (
37
12
  <Screen backgroundColor={theme.backgroundRoot} statusBarStyle={isDark ? 'light' : 'dark'}>
38
- <ScrollView
39
- showsVerticalScrollIndicator={false}
40
- contentContainerStyle={{}}
41
- refreshControl={
42
- <RefreshControl refreshing={isRefreshing} onRefresh={handleRefresh} colors={['#2563EB']} />
43
- }
13
+ <View
14
+ style={styles.container}
44
15
  >
45
- <View style={[styles.header]}>
46
- </View>
47
- </ScrollView>
16
+ <Image style={styles.logo} source={require('@/assets/images/coze-logo.png')}></Image>
17
+ <Text style={{...styles.text, color: theme.textPrimary}}>即将完成开发,请稍后...</Text>
18
+ </View>
48
19
  </Screen>
49
20
  );
50
21
  }
@@ -1,60 +1,24 @@
1
- import { StyleSheet, Platform } from 'react-native';
1
+ import { StyleSheet } from 'react-native';
2
2
 
3
3
  export const styles = StyleSheet.create({
4
- loadingContainer: {
5
- flex: 1,
6
- justifyContent: 'center',
4
+ container: {
5
+ position: 'absolute',
6
+ top: 0,
7
+ left: 0,
8
+ width: '100%',
9
+ height: '100%',
10
+ display: 'flex',
11
+ flexDirection: 'column',
7
12
  alignItems: 'center',
8
- },
9
- loadingText: {
10
- marginTop: 12,
11
- fontSize: 14,
12
- color: '#64748B',
13
- },
14
- errorContainer: {
15
- flex: 1,
16
13
  justifyContent: 'center',
17
- alignItems: 'center',
18
- paddingHorizontal: 24,
19
- },
20
- errorText: {
21
- marginTop: 16,
22
- fontSize: 16,
23
- color: '#64748B',
24
14
  },
25
- header: {
26
- flexDirection: 'row',
27
- justifyContent: 'space-between',
28
- alignItems: 'center',
29
- paddingHorizontal: 16,
30
- // paddingBottom: 16,
31
- backgroundColor: '#FFFFFF',
32
- // borderBottomWidth: 1,
33
- borderBottomColor: '#E2E8F0',
34
- },
35
- logoContainer: {
36
- width: 32,
37
- height: 32,
38
- backgroundColor: '#2563EB',
39
- borderRadius: 8,
40
- justifyContent: 'center',
41
- alignItems: 'center',
42
- ...Platform.select({
43
- ios: {
44
- shadowColor: '#000',
45
- shadowOffset: { width: 0, height: 1 },
46
- shadowOpacity: 0.1,
47
- shadowRadius: 2,
48
- },
49
- android: {
50
- elevation: 2,
51
- },
52
- }),
15
+ text: {
16
+ fontSize: 14,
17
+ fontWeight: 'bold',
53
18
  },
54
- logoText: {
55
- fontSize: 18,
56
- fontWeight: '700',
57
- color: '#1E293B',
58
- letterSpacing: -0.5,
19
+ logo: {
20
+ width: 64,
21
+ height: 64,
22
+ marginBottom: 32,
59
23
  },
60
24
  });
@@ -40,12 +40,6 @@ importers:
40
40
  '@react-navigation/native':
41
41
  specifier: ^7.0.14
42
42
  version: 7.1.26(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
43
- babel-plugin-module-resolver:
44
- specifier: ^5.0.2
45
- version: 5.0.2
46
- babel-preset-expo:
47
- specifier: ^54.0.9
48
- version: 54.0.9(@babel/core@7.28.5)(@babel/runtime@7.28.4)(expo@54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-refresh@0.14.2)
49
43
  dayjs:
50
44
  specifier: ^1.11.19
51
45
  version: 1.11.19
@@ -76,6 +70,9 @@ importers:
76
70
  expo-haptics:
77
71
  specifier: ~15.0.6
78
72
  version: 15.0.8(expo@54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))
73
+ expo-image:
74
+ specifier: ^3.0.11
75
+ version: 3.0.11(expo@54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native-web@0.21.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
79
76
  expo-image-picker:
80
77
  specifier: ~17.0.7
81
78
  version: 17.0.10(expo@54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))
@@ -170,6 +167,12 @@ importers:
170
167
  '@types/react-test-renderer':
171
168
  specifier: 19.1.0
172
169
  version: 19.1.0
170
+ babel-plugin-module-resolver:
171
+ specifier: ^5.0.2
172
+ version: 5.0.2
173
+ babel-preset-expo:
174
+ specifier: ^54.0.9
175
+ version: 54.0.9(@babel/core@7.28.5)(@babel/runtime@7.28.4)(expo@54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-refresh@0.14.2)
173
176
  chalk:
174
177
  specifier: ^4.1.2
175
178
  version: 4.1.2
@@ -3528,6 +3531,17 @@ packages:
3528
3531
  peerDependencies:
3529
3532
  expo: '*'
3530
3533
 
3534
+ expo-image@3.0.11:
3535
+ resolution: {integrity: sha512-4TudfUCLgYgENv+f48omnU8tjS2S0Pd9EaON5/s1ZUBRwZ7K8acEr4NfvLPSaeXvxW24iLAiyQ7sV7BXQH3RoA==}
3536
+ peerDependencies:
3537
+ expo: '*'
3538
+ react: '*'
3539
+ react-native: '*'
3540
+ react-native-web: '*'
3541
+ peerDependenciesMeta:
3542
+ react-native-web:
3543
+ optional: true
3544
+
3531
3545
  expo-keep-awake@15.0.8:
3532
3546
  resolution: {integrity: sha512-YK9M1VrnoH1vLJiQzChZgzDvVimVoriibiDIFLbQMpjYBnvyfUeHJcin/Gx1a+XgupNXy92EQJLgI/9ZuXajYQ==}
3533
3547
  peerDependencies:
@@ -10656,6 +10670,14 @@ snapshots:
10656
10670
  expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
10657
10671
  expo-image-loader: 6.0.0(expo@54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))
10658
10672
 
10673
+ expo-image@3.0.11(expo@54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native-web@0.21.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0):
10674
+ dependencies:
10675
+ expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
10676
+ react: 19.1.0
10677
+ react-native: 0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0)
10678
+ optionalDependencies:
10679
+ react-native-web: 0.21.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
10680
+
10659
10681
  expo-keep-awake@15.0.8(expo@54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react@19.1.0):
10660
10682
  dependencies:
10661
10683
  expo: 54.0.30(@babel/core@7.28.5)(@expo/metro-runtime@6.1.2)(expo-router@6.0.21)(react-native-webview@13.15.0(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0))(react-native@0.81.5(@babel/core@7.28.5)(@types/react@19.1.17)(react@19.1.0))(react@19.1.0)
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "server",
3
3
  "private": true,
4
+ "type": "module",
4
5
  "scripts": {
5
6
  "preinstall": "npx only-allow pnpm",
6
7
  "dev": "NODE_ENV=development tsx ./src/index.ts",
@@ -9,6 +10,7 @@
9
10
  },
10
11
  "dependencies": {
11
12
  "express": "^4.22.1",
13
+ "cors": "^2.8.5",
12
14
  "coze-coding-dev-sdk": "^0.5.5",
13
15
  "dayjs": "^1.11.19",
14
16
  "drizzle-orm": "^0.45.1",
@@ -1,12 +1,18 @@
1
1
  import express from "express";
2
+ import cors from "cors";
2
3
 
3
4
  const app = express();
4
5
  const port = process.env.PORT || 9091;
5
6
 
6
- app.get('/api/v1/ping', (req, res) => {
7
- res.status(200).json({ message: 'connected' });
7
+ // Middleware
8
+ app.use(cors());
9
+ app.use(express.json());
10
+
11
+ app.get('/api/v1/health', (req, res) => {
12
+ res.status(200).json({ status: 'ok' });
8
13
  });
9
14
 
15
+
10
16
  app.listen(port, () => {
11
17
  console.log(`Server listening at http://localhost:${port}/`);
12
18
  });
@@ -8,13 +8,13 @@
8
8
  "ESNext.Iterator",
9
9
  "ESNext.Promise"
10
10
  ],
11
- "module": "nodenext",
11
+ "module": "preserve",
12
12
  "target": "es2024",
13
13
 
14
14
  "strict": true,
15
15
  "esModuleInterop": true,
16
16
  "skipLibCheck": true,
17
- "moduleResolution": "node16",
17
+ "moduleResolution": "bundler",
18
18
 
19
19
  "rewriteRelativeImportExtensions": true,
20
20
  "erasableSyntaxOnly": true,
@@ -29,6 +29,7 @@ export const paramsSchema = {
29
29
  };
30
30
 
31
31
  const config = {
32
+ description: 'Expo template for React Native applications',
32
33
  paramsSchema,
33
34
  defaultParams: {
34
35
  port: 9090,
@@ -2,6 +2,7 @@
2
2
  requires = ["nodejs-24"]
3
3
 
4
4
  [dev]
5
+ build = ["bash", "./scripts/prepare.sh"]
5
6
  run = ["bash", "./scripts/dev.sh"]
6
7
  deps = ["git"] # -> apt install git
7
8
 
@@ -1,3 +1,4 @@
1
+ loglevel=error
1
2
  registry=https://registry.npmmirror.com
2
3
 
3
4
  strictStorePkgContentCheck=false
@@ -1,7 +1,19 @@
1
1
  import type { NextConfig } from 'next';
2
+ import path from 'path';
2
3
 
3
4
  const nextConfig: NextConfig = {
5
+ outputFileTracingRoot: path.resolve(__dirname, '../../'),
4
6
  /* config options here */
7
+ allowedDevOrigins: ['*.dev.coze.site'],
8
+ images: {
9
+ remotePatterns: [
10
+ {
11
+ protocol: 'https',
12
+ hostname: 'lf3-static.bytednsdoc.com',
13
+ pathname: '/**',
14
+ },
15
+ ],
16
+ },
5
17
  };
6
18
 
7
19
  export default nextConfig;
@@ -7,7 +7,8 @@
7
7
  "dev": "bash ./scripts/dev.sh",
8
8
  "preinstall": "npx only-allow pnpm",
9
9
  "lint": "eslint",
10
- "start": "bash ./scripts/start.sh"
10
+ "start": "bash ./scripts/start.sh",
11
+ "ts-check": "tsc -p tsconfig.json"
11
12
  },
12
13
  "dependencies": {
13
14
  "@aws-sdk/client-s3": "^3.958.0",
@@ -42,7 +43,7 @@
42
43
  "class-variance-authority": "^0.7.1",
43
44
  "clsx": "^2.1.1",
44
45
  "cmdk": "^1.1.1",
45
- "coze-coding-dev-sdk": "^0.5.2",
46
+ "coze-coding-dev-sdk": "^0.7.0",
46
47
  "date-fns": "^4.1.0",
47
48
  "drizzle-kit": "^0.31.8",
48
49
  "drizzle-orm": "^0.45.1",
@@ -105,8 +105,8 @@ importers:
105
105
  specifier: ^1.1.1
106
106
  version: 1.1.1(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)
107
107
  coze-coding-dev-sdk:
108
- specifier: ^0.5.2
109
- version: 0.5.4(@types/pg@8.16.0)(openai@6.15.0(zod@4.3.5))
108
+ specifier: ^0.7.0
109
+ version: 0.7.2(@types/pg@8.16.0)(openai@6.15.0(zod@4.3.5))
110
110
  date-fns:
111
111
  specifier: ^4.1.0
112
112
  version: 4.1.0
@@ -2747,8 +2747,8 @@ packages:
2747
2747
  typescript:
2748
2748
  optional: true
2749
2749
 
2750
- coze-coding-dev-sdk@0.5.4:
2751
- resolution: {integrity: sha512-nIH2hMFlO2PSnqdslFzOITK+2FhR64caoYFuzy2ma+ceu0o2Spe7tLYLIsyUc42Prr5gXqk4MZESQqpXD34ZwQ==}
2750
+ coze-coding-dev-sdk@0.7.2:
2751
+ resolution: {integrity: sha512-IAAbI8W6MHL95BV/OmiacM2aMzkruyBwUMsvzJk/9jBT9vra2xiUC5ggS5xFi7V7MrL5VqfLv9ZlWSjcOAVRpw==}
2752
2752
  engines: {node: '>=18.0.0'}
2753
2753
  hasBin: true
2754
2754
 
@@ -4820,6 +4820,11 @@ packages:
4820
4820
  resolution: {integrity: sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w==}
4821
4821
  engines: {node: '>=16'}
4822
4822
 
4823
+ transliteration@2.6.0:
4824
+ resolution: {integrity: sha512-T6frfMj7N5xNK0l+duIzIWKxkc9ewG72uv7NeOs4dIoysqTnYpwxeVEE5qYdKKmy7hby55ah0wNUoMaLsB2Zjw==}
4825
+ engines: {node: '>=20.0.0'}
4826
+ hasBin: true
4827
+
4823
4828
  ts-api-utils@2.3.0:
4824
4829
  resolution: {integrity: sha512-6eg3Y9SF7SsAvGzRHQvvc1skDAhwI4YQ32ui1scxD1Ccr0G5qIIbUBT3pFTKX8kmWIQClHobtUdNuaBgwdfdWg==}
4825
4830
  engines: {node: '>=18.12'}
@@ -7931,7 +7936,7 @@ snapshots:
7931
7936
  optionalDependencies:
7932
7937
  typescript: 5.9.3
7933
7938
 
7934
- coze-coding-dev-sdk@0.5.4(@types/pg@8.16.0)(openai@6.15.0(zod@4.3.5)):
7939
+ coze-coding-dev-sdk@0.7.2(@types/pg@8.16.0)(openai@6.15.0(zod@4.3.5)):
7935
7940
  dependencies:
7936
7941
  '@aws-sdk/client-s3': 3.962.0
7937
7942
  '@aws-sdk/lib-storage': 3.962.0(@aws-sdk/client-s3@3.962.0)
@@ -7944,6 +7949,7 @@ snapshots:
7944
7949
  drizzle-orm: 0.45.1(@types/pg@8.16.0)(pg@8.16.3)
7945
7950
  ora: 9.0.0
7946
7951
  pg: 8.16.3
7952
+ transliteration: 2.6.0
7947
7953
  transitivePeerDependencies:
7948
7954
  - '@aws-sdk/client-rds-data'
7949
7955
  - '@cloudflare/workers-types'
@@ -10186,6 +10192,8 @@ snapshots:
10186
10192
  dependencies:
10187
10193
  tldts: 7.0.19
10188
10194
 
10195
+ transliteration@2.6.0: {}
10196
+
10189
10197
  ts-api-utils@2.3.0(typescript@5.9.3):
10190
10198
  dependencies:
10191
10199
  typescript: 5.9.3
@@ -0,0 +1,9 @@
1
+ #!/bin/bash
2
+ set -Eeuo pipefail
3
+
4
+ COZE_WORKSPACE_PATH="${COZE_WORKSPACE_PATH:-$(pwd)}"
5
+
6
+ cd "${COZE_WORKSPACE_PATH}"
7
+
8
+ echo "Installing dependencies..."
9
+ pnpm install --prefer-frozen-lockfile --prefer-offline --loglevel debug --reporter=append-only
@@ -6,8 +6,6 @@
6
6
  @theme inline {
7
7
  --color-background: var(--background);
8
8
  --color-foreground: var(--foreground);
9
- --font-sans: var(--font-geist-sans);
10
- --font-mono: var(--font-geist-mono);
11
9
  --color-sidebar-ring: var(--sidebar-ring);
12
10
  --color-sidebar-border: var(--sidebar-border);
13
11
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
@@ -44,6 +42,16 @@
44
42
  --radius-2xl: calc(var(--radius) + 8px);
45
43
  --radius-3xl: calc(var(--radius) + 12px);
46
44
  --radius-4xl: calc(var(--radius) + 16px);
45
+ --font-sans:
46
+ 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', ui-sans-serif,
47
+ system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
48
+ 'Helvetica Neue', Arial, sans-serif;
49
+ --font-mono:
50
+ ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
51
+ 'Courier New', monospace;
52
+ --font-serif:
53
+ 'Noto Serif SC', 'Songti SC', 'SimSun', ui-serif, Georgia, Cambria,
54
+ 'Times New Roman', Times, serif;
47
55
  }
48
56
 
49
57
  :root {
@@ -1,17 +1,6 @@
1
1
  import type { Metadata } from 'next';
2
- import { Geist, Geist_Mono } from 'next/font/google';
3
2
  import './globals.css';
4
3
 
5
- const geistSans = Geist({
6
- variable: '--font-geist-sans',
7
- subsets: ['latin'],
8
- });
9
-
10
- const geistMono = Geist_Mono({
11
- variable: '--font-geist-mono',
12
- subsets: ['latin'],
13
- });
14
-
15
4
  export const metadata: Metadata = {
16
5
  title: {
17
6
  default: '新应用 | 扣子编程',
@@ -74,7 +63,7 @@ export default function RootLayout({
74
63
  return (
75
64
  <html lang="en">
76
65
  <body
77
- className={`${geistSans.variable} ${geistMono.variable} antialiased`}
66
+ className={`antialiased`}
78
67
  >
79
68
  {children}
80
69
  </body>