@coze-arch/cli 0.0.1-alpha.f9be02 → 0.0.1-alpha.fc5c04

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 (161) 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 +78 -88
  4. package/lib/__templates__/expo/.cozeproj/scripts/prod_build.sh +2 -2
  5. package/lib/__templates__/expo/.cozeproj/scripts/prod_run.sh +2 -2
  6. package/lib/__templates__/expo/.cozeproj/scripts/server_dev_run.sh +46 -0
  7. package/lib/__templates__/expo/README.md +68 -7
  8. package/lib/__templates__/expo/client/app/+not-found.tsx +30 -0
  9. package/lib/__templates__/expo/client/{src/app → app}/_layout.tsx +15 -12
  10. package/lib/__templates__/expo/client/app/index.tsx +1 -0
  11. package/lib/__templates__/expo/client/app.config.ts +65 -60
  12. package/lib/__templates__/expo/client/{src/components → components}/Screen.tsx +1 -17
  13. package/lib/__templates__/expo/client/{src/components → components}/ThemedView.tsx +1 -2
  14. package/lib/__templates__/expo/client/constants/theme.ts +177 -0
  15. package/lib/__templates__/expo/client/declarations.d.ts +5 -0
  16. package/lib/__templates__/expo/client/eslint.config.mjs +33 -10
  17. package/lib/__templates__/expo/client/hooks/useColorScheme.tsx +48 -0
  18. package/lib/__templates__/expo/client/hooks/useSafeRouter.ts +152 -0
  19. package/lib/__templates__/expo/client/hooks/useTheme.ts +33 -0
  20. package/lib/__templates__/expo/client/metro.config.js +3 -0
  21. package/lib/__templates__/expo/client/package.json +36 -33
  22. package/lib/__templates__/expo/client/screens/demo/index.tsx +25 -0
  23. package/lib/__templates__/expo/client/screens/demo/styles.ts +28 -0
  24. package/lib/__templates__/expo/client/scripts/install-missing-deps.js +1 -0
  25. package/lib/__templates__/expo/client/tsconfig.json +1 -1
  26. package/lib/__templates__/expo/client/{src/utils → utils}/index.ts +22 -0
  27. package/lib/__templates__/expo/eslint-plugins/fontawesome6/index.js +9 -0
  28. package/lib/__templates__/expo/eslint-plugins/fontawesome6/names.js +1889 -0
  29. package/lib/__templates__/expo/eslint-plugins/fontawesome6/rule.js +174 -0
  30. package/lib/__templates__/expo/eslint-plugins/fontawesome6/v5-only-names.js +388 -0
  31. package/lib/__templates__/expo/eslint-plugins/react-native/index.js +9 -0
  32. package/lib/__templates__/expo/eslint-plugins/react-native/rule.js +64 -0
  33. package/lib/__templates__/expo/eslint-plugins/reanimated/index.js +9 -0
  34. package/lib/__templates__/expo/eslint-plugins/reanimated/rule.js +88 -0
  35. package/lib/__templates__/expo/package.json +7 -98
  36. package/lib/__templates__/expo/patches/expo@54.0.33.patch +45 -0
  37. package/lib/__templates__/expo/pnpm-lock.yaml +1420 -2939
  38. package/lib/__templates__/expo/server/build.js +21 -0
  39. package/lib/__templates__/expo/server/package.json +21 -4
  40. package/lib/__templates__/expo/server/src/index.ts +10 -2
  41. package/lib/__templates__/expo/server/tsconfig.json +24 -0
  42. package/lib/__templates__/expo/template.config.js +57 -0
  43. package/lib/__templates__/native-static/.coze +11 -0
  44. package/lib/__templates__/native-static/index.html +33 -0
  45. package/lib/__templates__/native-static/styles/main.css +136 -0
  46. package/lib/__templates__/native-static/template.config.js +22 -0
  47. package/lib/__templates__/nextjs/.babelrc +15 -0
  48. package/lib/__templates__/nextjs/.coze +1 -0
  49. package/lib/__templates__/nextjs/_npmrc +1 -0
  50. package/lib/__templates__/nextjs/next.config.ts +12 -0
  51. package/lib/__templates__/nextjs/package.json +13 -2
  52. package/lib/__templates__/nextjs/pnpm-lock.yaml +2682 -1786
  53. package/lib/__templates__/nextjs/scripts/prepare.sh +9 -0
  54. package/lib/__templates__/nextjs/src/app/globals.css +10 -2
  55. package/lib/__templates__/nextjs/src/app/layout.tsx +5 -14
  56. package/lib/__templates__/nextjs/src/app/page.tsx +18 -48
  57. package/lib/__templates__/nextjs/src/components/ui/resizable.tsx +29 -22
  58. package/lib/__templates__/nextjs/src/components/ui/sidebar.tsx +228 -230
  59. package/lib/__templates__/nextjs/template.config.js +67 -2
  60. package/lib/__templates__/taro/.coze +14 -0
  61. package/lib/__templates__/taro/.cozeproj/scripts/deploy_build.sh +19 -0
  62. package/lib/__templates__/taro/.cozeproj/scripts/deploy_run.sh +14 -0
  63. package/lib/__templates__/taro/.cozeproj/scripts/dev_build.sh +2 -0
  64. package/lib/__templates__/taro/.cozeproj/scripts/dev_run.sh +151 -0
  65. package/lib/__templates__/taro/.cozeproj/scripts/init_env.sh +5 -0
  66. package/lib/__templates__/taro/.cozeproj/scripts/pack.sh +24 -0
  67. package/lib/__templates__/taro/README.md +751 -0
  68. package/lib/__templates__/taro/_gitignore +40 -0
  69. package/lib/__templates__/taro/_npmrc +18 -0
  70. package/lib/__templates__/taro/babel.config.js +12 -0
  71. package/lib/__templates__/taro/config/dev.ts +9 -0
  72. package/lib/__templates__/taro/config/index.ts +223 -0
  73. package/lib/__templates__/taro/config/prod.ts +34 -0
  74. package/lib/__templates__/taro/eslint.config.mjs +80 -0
  75. package/lib/__templates__/taro/key/private.appid.key +0 -0
  76. package/lib/__templates__/taro/package.json +107 -0
  77. package/lib/__templates__/taro/patches/@tarojs__plugin-mini-ci@4.1.9.patch +30 -0
  78. package/lib/__templates__/taro/pnpm-lock.yaml +23100 -0
  79. package/lib/__templates__/taro/pnpm-workspace.yaml +2 -0
  80. package/lib/__templates__/taro/project.config.json +15 -0
  81. package/lib/__templates__/taro/server/nest-cli.json +10 -0
  82. package/lib/__templates__/taro/server/package.json +40 -0
  83. package/lib/__templates__/taro/server/src/app.controller.ts +23 -0
  84. package/lib/__templates__/taro/server/src/app.module.ts +10 -0
  85. package/lib/__templates__/taro/server/src/app.service.ts +8 -0
  86. package/lib/__templates__/taro/server/src/interceptors/http-status.interceptor.ts +23 -0
  87. package/lib/__templates__/taro/server/src/main.ts +49 -0
  88. package/lib/__templates__/taro/server/tsconfig.json +24 -0
  89. package/lib/__templates__/taro/src/app.config.ts +11 -0
  90. package/lib/__templates__/taro/src/app.css +52 -0
  91. package/lib/__templates__/taro/src/app.tsx +9 -0
  92. package/lib/__templates__/taro/src/index.html +39 -0
  93. package/lib/__templates__/taro/src/network.ts +39 -0
  94. package/lib/__templates__/taro/src/pages/index/index.config.ts +3 -0
  95. package/lib/__templates__/taro/src/pages/index/index.css +1 -0
  96. package/lib/__templates__/taro/src/pages/index/index.tsx +33 -0
  97. package/lib/__templates__/taro/src/presets/dev-debug.ts +23 -0
  98. package/lib/__templates__/taro/src/presets/h5-container.tsx +15 -0
  99. package/lib/__templates__/taro/src/presets/h5-navbar.tsx +201 -0
  100. package/lib/__templates__/taro/src/presets/h5-styles.ts +142 -0
  101. package/lib/__templates__/taro/src/presets/index.tsx +18 -0
  102. package/lib/__templates__/taro/stylelint.config.mjs +4 -0
  103. package/lib/__templates__/taro/template.config.js +68 -0
  104. package/lib/__templates__/taro/tsconfig.json +29 -0
  105. package/lib/__templates__/taro/types/global.d.ts +32 -0
  106. package/lib/__templates__/templates.json +135 -42
  107. package/lib/__templates__/vite/.coze +1 -0
  108. package/lib/__templates__/vite/_npmrc +1 -0
  109. package/lib/__templates__/vite/eslint.config.mjs +9 -0
  110. package/lib/__templates__/vite/package.json +14 -1
  111. package/lib/__templates__/vite/pnpm-lock.yaml +1581 -105
  112. package/lib/__templates__/vite/scripts/prepare.sh +9 -0
  113. package/lib/__templates__/vite/src/main.ts +17 -48
  114. package/lib/__templates__/vite/template.config.js +67 -6
  115. package/lib/__templates__/vite/vite.config.ts +1 -0
  116. package/lib/__templates__/vite-vue/.coze +12 -0
  117. package/lib/__templates__/vite-vue/README.md +451 -0
  118. package/lib/__templates__/vite-vue/_gitignore +66 -0
  119. package/lib/__templates__/vite-vue/_npmrc +23 -0
  120. package/lib/__templates__/vite-vue/eslint.config.mjs +9 -0
  121. package/lib/__templates__/vite-vue/index.html +13 -0
  122. package/lib/__templates__/vite-vue/package.json +38 -0
  123. package/lib/__templates__/vite-vue/pnpm-lock.yaml +3132 -0
  124. package/lib/__templates__/vite-vue/postcss.config.mjs +6 -0
  125. package/lib/__templates__/vite-vue/scripts/build.sh +14 -0
  126. package/lib/__templates__/vite-vue/scripts/dev.sh +32 -0
  127. package/lib/__templates__/vite-vue/scripts/prepare.sh +9 -0
  128. package/lib/__templates__/vite-vue/scripts/start.sh +15 -0
  129. package/lib/__templates__/vite-vue/src/App.vue +6 -0
  130. package/lib/__templates__/vite-vue/src/index.css +29 -0
  131. package/lib/__templates__/vite-vue/src/main.ts +8 -0
  132. package/lib/__templates__/vite-vue/src/router/index.ts +17 -0
  133. package/lib/__templates__/vite-vue/src/views/Home.vue +38 -0
  134. package/lib/__templates__/vite-vue/src/vite-env.d.ts +8 -0
  135. package/lib/__templates__/vite-vue/tailwind.config.js +9 -0
  136. package/lib/__templates__/vite-vue/template.config.js +127 -0
  137. package/lib/__templates__/vite-vue/tsconfig.json +17 -0
  138. package/lib/__templates__/vite-vue/vite.config.ts +28 -0
  139. package/lib/cli.js +1006 -154
  140. package/package.json +6 -3
  141. package/lib/__templates__/expo/client/src/app/index.ts +0 -1
  142. package/lib/__templates__/expo/client/src/constants/theme.ts +0 -850
  143. package/lib/__templates__/expo/client/src/hooks/useColorScheme.ts +0 -1
  144. package/lib/__templates__/expo/client/src/hooks/useTheme.ts +0 -13
  145. package/lib/__templates__/expo/client/src/screens/home/index.tsx +0 -50
  146. package/lib/__templates__/expo/client/src/screens/home/styles.ts +0 -60
  147. package/lib/__templates__/nextjs/.vscode/settings.json +0 -121
  148. package/lib/__templates__/vite/.vscode/settings.json +0 -7
  149. /package/lib/__templates__/expo/client/{src/assets → assets}/fonts/SpaceMono-Regular.ttf +0 -0
  150. /package/lib/__templates__/expo/client/{src/assets → assets}/images/adaptive-icon.png +0 -0
  151. /package/lib/__templates__/expo/client/{src/assets → assets}/images/default-avatar.png +0 -0
  152. /package/lib/__templates__/expo/client/{src/assets → assets}/images/favicon.png +0 -0
  153. /package/lib/__templates__/expo/client/{src/assets → assets}/images/icon.png +0 -0
  154. /package/lib/__templates__/expo/client/{src/assets → assets}/images/partial-react-logo.png +0 -0
  155. /package/lib/__templates__/expo/client/{src/assets → assets}/images/react-logo.png +0 -0
  156. /package/lib/__templates__/expo/client/{src/assets → assets}/images/react-logo@2x.png +0 -0
  157. /package/lib/__templates__/expo/client/{src/assets → assets}/images/react-logo@3x.png +0 -0
  158. /package/lib/__templates__/expo/client/{src/assets → assets}/images/splash-icon.png +0 -0
  159. /package/lib/__templates__/expo/client/{src/components → components}/SmartDateInput.tsx +0 -0
  160. /package/lib/__templates__/expo/client/{src/components → components}/ThemedText.tsx +0 -0
  161. /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
- }
@@ -1,7 +0,0 @@
1
- {
2
- "editor.formatOnSave": true,
3
- "editor.codeActionsOnSave": {
4
- "source.fixAll.eslint": "explicit"
5
- },
6
- "typescript.tsdk": "node_modules/typescript/lib"
7
- }