@coze-arch/cli 0.0.1-alpha.f9be02 → 0.0.1-alpha.fd3d56
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/.coze +1 -1
- package/lib/__templates__/expo/.cozeproj/scripts/dev_build.sh +19 -82
- package/lib/__templates__/expo/.cozeproj/scripts/dev_run.sh +75 -86
- package/lib/__templates__/expo/.cozeproj/scripts/prod_build.sh +2 -2
- package/lib/__templates__/expo/.cozeproj/scripts/prod_run.sh +2 -2
- package/lib/__templates__/expo/.cozeproj/scripts/server_dev_run.sh +45 -0
- package/lib/__templates__/expo/README.md +68 -7
- package/lib/__templates__/expo/client/app/+not-found.tsx +30 -0
- package/lib/__templates__/expo/client/{src/app → app}/_layout.tsx +15 -12
- package/lib/__templates__/expo/client/app/index.tsx +1 -0
- package/lib/__templates__/expo/client/app.config.ts +65 -60
- package/lib/__templates__/expo/client/{src/components → components}/Screen.tsx +1 -17
- package/lib/__templates__/expo/client/{src/components → components}/ThemedView.tsx +1 -2
- package/lib/__templates__/expo/client/constants/theme.ts +177 -0
- package/lib/__templates__/expo/client/declarations.d.ts +5 -0
- package/lib/__templates__/expo/client/eslint.config.mjs +30 -10
- package/lib/__templates__/expo/client/hooks/useColorScheme.tsx +48 -0
- package/lib/__templates__/expo/client/hooks/useSafeRouter.ts +152 -0
- package/lib/__templates__/expo/client/hooks/useTheme.ts +33 -0
- package/lib/__templates__/expo/client/package.json +6 -3
- package/lib/__templates__/expo/client/screens/demo/index.tsx +25 -0
- package/lib/__templates__/expo/client/screens/demo/styles.ts +28 -0
- package/lib/__templates__/expo/client/scripts/install-missing-deps.js +1 -0
- package/lib/__templates__/expo/client/tsconfig.json +1 -1
- package/lib/__templates__/expo/client/{src/utils → utils}/index.ts +22 -0
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/index.js +9 -0
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/names.js +1889 -0
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/rule.js +174 -0
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/v5-only-names.js +388 -0
- package/lib/__templates__/expo/eslint-plugins/reanimated/index.js +9 -0
- package/lib/__templates__/expo/eslint-plugins/reanimated/rule.js +88 -0
- package/lib/__templates__/expo/package.json +7 -98
- package/lib/__templates__/expo/patches/expo@54.0.32.patch +44 -0
- package/lib/__templates__/expo/pnpm-lock.yaml +2001 -2124
- package/lib/__templates__/expo/server/build.js +21 -0
- package/lib/__templates__/expo/server/package.json +19 -4
- package/lib/__templates__/expo/server/src/index.ts +9 -2
- package/lib/__templates__/expo/server/tsconfig.json +24 -0
- package/lib/__templates__/expo/template.config.js +1 -0
- package/lib/__templates__/nextjs/.babelrc +15 -0
- package/lib/__templates__/nextjs/.coze +1 -0
- package/lib/__templates__/nextjs/_npmrc +1 -0
- package/lib/__templates__/nextjs/next.config.ts +12 -0
- package/lib/__templates__/nextjs/package.json +10 -11
- package/lib/__templates__/nextjs/pnpm-lock.yaml +2543 -1747
- package/lib/__templates__/nextjs/scripts/prepare.sh +9 -0
- package/lib/__templates__/nextjs/src/app/globals.css +10 -2
- package/lib/__templates__/nextjs/src/app/layout.tsx +5 -14
- package/lib/__templates__/nextjs/src/app/page.tsx +35 -23
- package/lib/__templates__/nextjs/src/components/ui/resizable.tsx +29 -22
- package/lib/__templates__/nextjs/src/components/ui/sidebar.tsx +228 -230
- package/lib/__templates__/nextjs/template.config.js +30 -0
- package/lib/__templates__/templates.json +61 -43
- package/lib/__templates__/vite/.coze +1 -0
- package/lib/__templates__/vite/_npmrc +1 -0
- package/lib/__templates__/vite/eslint.config.mjs +9 -0
- package/lib/__templates__/vite/package.json +10 -1
- package/lib/__templates__/vite/pnpm-lock.yaml +3115 -126
- package/lib/__templates__/vite/scripts/prepare.sh +9 -0
- package/lib/__templates__/vite/src/main.ts +1 -2
- package/lib/__templates__/vite/template.config.js +30 -4
- package/lib/cli.js +691 -130
- package/package.json +5 -3
- package/lib/__templates__/expo/client/src/app/index.ts +0 -1
- package/lib/__templates__/expo/client/src/constants/theme.ts +0 -850
- package/lib/__templates__/expo/client/src/hooks/useColorScheme.ts +0 -1
- package/lib/__templates__/expo/client/src/hooks/useTheme.ts +0 -13
- package/lib/__templates__/expo/client/src/screens/home/index.tsx +0 -50
- package/lib/__templates__/expo/client/src/screens/home/styles.ts +0 -60
- package/lib/__templates__/nextjs/.vscode/settings.json +0 -121
- package/lib/__templates__/vite/.vscode/settings.json +0 -7
- /package/lib/__templates__/expo/client/{src/assets → assets}/fonts/SpaceMono-Regular.ttf +0 -0
- /package/lib/__templates__/expo/client/{src/assets → assets}/images/adaptive-icon.png +0 -0
- /package/lib/__templates__/expo/client/{src/assets → assets}/images/default-avatar.png +0 -0
- /package/lib/__templates__/expo/client/{src/assets → assets}/images/favicon.png +0 -0
- /package/lib/__templates__/expo/client/{src/assets → assets}/images/icon.png +0 -0
- /package/lib/__templates__/expo/client/{src/assets → assets}/images/partial-react-logo.png +0 -0
- /package/lib/__templates__/expo/client/{src/assets → assets}/images/react-logo.png +0 -0
- /package/lib/__templates__/expo/client/{src/assets → assets}/images/react-logo@2x.png +0 -0
- /package/lib/__templates__/expo/client/{src/assets → assets}/images/react-logo@3x.png +0 -0
- /package/lib/__templates__/expo/client/{src/assets → assets}/images/splash-icon.png +0 -0
- /package/lib/__templates__/expo/client/{src/components → components}/SmartDateInput.tsx +0 -0
- /package/lib/__templates__/expo/client/{src/components → components}/ThemedText.tsx +0 -0
- /package/lib/__templates__/expo/client/{src/contexts → contexts}/AuthContext.tsx +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useColorScheme } from "react-native";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Colors } from "@/constants/theme";
|
|
2
|
-
import { useColorScheme } from "@/hooks/useColorScheme";
|
|
3
|
-
|
|
4
|
-
export function useTheme() {
|
|
5
|
-
const colorScheme = useColorScheme();
|
|
6
|
-
const isDark = colorScheme === "dark";
|
|
7
|
-
const theme = Colors[(colorScheme as "light" | "dark") ?? "light"];
|
|
8
|
-
|
|
9
|
-
return {
|
|
10
|
-
theme,
|
|
11
|
-
isDark,
|
|
12
|
-
};
|
|
13
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
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";
|
|
12
|
-
|
|
13
|
-
import { Screen } from '@/components/Screen';
|
|
14
|
-
|
|
15
|
-
import { styles } from './styles';
|
|
16
|
-
|
|
17
|
-
export default function HomeScreen() {
|
|
18
|
-
const insets = useSafeAreaInsets();
|
|
19
|
-
const { theme, isDark } = useTheme();
|
|
20
|
-
|
|
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
|
-
return (
|
|
37
|
-
<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
|
-
}
|
|
44
|
-
>
|
|
45
|
-
<View style={[styles.header]}>
|
|
46
|
-
</View>
|
|
47
|
-
</ScrollView>
|
|
48
|
-
</Screen>
|
|
49
|
-
);
|
|
50
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { StyleSheet, Platform } from 'react-native';
|
|
2
|
-
|
|
3
|
-
export const styles = StyleSheet.create({
|
|
4
|
-
loadingContainer: {
|
|
5
|
-
flex: 1,
|
|
6
|
-
justifyContent: 'center',
|
|
7
|
-
alignItems: 'center',
|
|
8
|
-
},
|
|
9
|
-
loadingText: {
|
|
10
|
-
marginTop: 12,
|
|
11
|
-
fontSize: 14,
|
|
12
|
-
color: '#64748B',
|
|
13
|
-
},
|
|
14
|
-
errorContainer: {
|
|
15
|
-
flex: 1,
|
|
16
|
-
justifyContent: 'center',
|
|
17
|
-
alignItems: 'center',
|
|
18
|
-
paddingHorizontal: 24,
|
|
19
|
-
},
|
|
20
|
-
errorText: {
|
|
21
|
-
marginTop: 16,
|
|
22
|
-
fontSize: 16,
|
|
23
|
-
color: '#64748B',
|
|
24
|
-
},
|
|
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
|
-
}),
|
|
53
|
-
},
|
|
54
|
-
logoText: {
|
|
55
|
-
fontSize: 18,
|
|
56
|
-
fontWeight: '700',
|
|
57
|
-
color: '#1E293B',
|
|
58
|
-
letterSpacing: -0.5,
|
|
59
|
-
},
|
|
60
|
-
});
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"[css]": {
|
|
3
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
4
|
-
},
|
|
5
|
-
"[dotenv]": {
|
|
6
|
-
"editor.defaultFormatter": "foxundermoon.shell-format"
|
|
7
|
-
},
|
|
8
|
-
"[html]": {
|
|
9
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
10
|
-
},
|
|
11
|
-
"[ignore]": {
|
|
12
|
-
"editor.defaultFormatter": "foxundermoon.shell-format"
|
|
13
|
-
},
|
|
14
|
-
"[javascript]": {
|
|
15
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
16
|
-
},
|
|
17
|
-
"[javascriptreact]": {
|
|
18
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
19
|
-
},
|
|
20
|
-
"[json]": {
|
|
21
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
22
|
-
},
|
|
23
|
-
"[jsonc]": {
|
|
24
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
25
|
-
},
|
|
26
|
-
"[less]": {
|
|
27
|
-
"editor.defaultFormatter": "stylelint.vscode-stylelint"
|
|
28
|
-
},
|
|
29
|
-
"[scss]": {
|
|
30
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
31
|
-
},
|
|
32
|
-
"[shellscript]": {
|
|
33
|
-
"editor.defaultFormatter": "foxundermoon.shell-format"
|
|
34
|
-
},
|
|
35
|
-
"[sql]": {
|
|
36
|
-
"editor.defaultFormatter": "adpyke.vscode-sql-formatter"
|
|
37
|
-
},
|
|
38
|
-
"[svg]": {
|
|
39
|
-
"editor.defaultFormatter": "jock.svg"
|
|
40
|
-
},
|
|
41
|
-
"[typescript]": {
|
|
42
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
43
|
-
},
|
|
44
|
-
"[typescriptreact]": {
|
|
45
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
46
|
-
},
|
|
47
|
-
"[xml]": {
|
|
48
|
-
"editor.defaultFormatter": "mblode.pretty-formatter"
|
|
49
|
-
},
|
|
50
|
-
"[yaml]": {
|
|
51
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
52
|
-
},
|
|
53
|
-
"cSpell.diagnosticLevel": "Warning",
|
|
54
|
-
"css.validate": false,
|
|
55
|
-
"editor.codeActionsOnSave": {
|
|
56
|
-
"source.fixAll": "never",
|
|
57
|
-
"source.fixAll.eslint": "explicit",
|
|
58
|
-
"source.organizeImports": "never",
|
|
59
|
-
"source.removeUnused": "never",
|
|
60
|
-
"source.removeUnused.ts": "never",
|
|
61
|
-
"source.removeUnusedImports": "never",
|
|
62
|
-
"source.sort.json": "never"
|
|
63
|
-
// "source.sortImports": "always"
|
|
64
|
-
},
|
|
65
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
66
|
-
"editor.formatOnPaste": false,
|
|
67
|
-
"editor.formatOnSave": true,
|
|
68
|
-
"editor.formatOnType": false,
|
|
69
|
-
"editor.insertSpaces": true,
|
|
70
|
-
"editor.minimap.enabled": true,
|
|
71
|
-
//
|
|
72
|
-
"editor.rulers": [80, 120],
|
|
73
|
-
"editor.semanticHighlighting.enabled": false,
|
|
74
|
-
"editor.tabSize": 2,
|
|
75
|
-
"emmet.triggerExpansionOnTab": true,
|
|
76
|
-
"files.associations": {
|
|
77
|
-
".babelrc": "json",
|
|
78
|
-
".code-workspace": "jsonc",
|
|
79
|
-
".eslintrc": "jsonc",
|
|
80
|
-
".eslintrc*.json": "jsonc",
|
|
81
|
-
".htmlhintrc": "jsonc",
|
|
82
|
-
".stylelintrc": "javascript",
|
|
83
|
-
"*.json": "jsonc",
|
|
84
|
-
"*.log": "plaintext",
|
|
85
|
-
"*.map": "plaintext",
|
|
86
|
-
"**/coverage/**/*.*": "plaintext",
|
|
87
|
-
"**/pnpm-lock.yaml": "plaintext",
|
|
88
|
-
"htmlhintrc": "jsonc",
|
|
89
|
-
"package.json": "json",
|
|
90
|
-
"README": "markdown",
|
|
91
|
-
"stylelintrc": "jsonc",
|
|
92
|
-
".coze": "toml"
|
|
93
|
-
},
|
|
94
|
-
"files.defaultLanguage": "plaintext",
|
|
95
|
-
"files.eol": "\n",
|
|
96
|
-
"files.exclude": {
|
|
97
|
-
"**/.DS_Store": true,
|
|
98
|
-
"**/.git": true,
|
|
99
|
-
"**/.hg": true,
|
|
100
|
-
"**/.svn": true,
|
|
101
|
-
// "**/.lintcache": true,
|
|
102
|
-
"**/.swc": true,
|
|
103
|
-
"**/CVS": true,
|
|
104
|
-
"**/Thumbs.db": true
|
|
105
|
-
},
|
|
106
|
-
"files.insertFinalNewline": true,
|
|
107
|
-
"files.trimTrailingWhitespace": true,
|
|
108
|
-
"files.watcherExclude": {
|
|
109
|
-
"**/.git/objects/**": true,
|
|
110
|
-
"**/.git/subtree-cache/**": true,
|
|
111
|
-
"**/node_modules/*/**": true
|
|
112
|
-
},
|
|
113
|
-
"git.openRepositoryInParentFolders": "always",
|
|
114
|
-
"search.exclude": {
|
|
115
|
-
"**/dist": true,
|
|
116
|
-
"**/node_modules": true
|
|
117
|
-
},
|
|
118
|
-
// "editor.formatOnSaveMode": "modificationsIfAvailable",
|
|
119
|
-
"search.followSymlinks": false,
|
|
120
|
-
"search.useIgnoreFiles": true
|
|
121
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|