@coze-arch/cli 0.0.1-alpha.f5dbe4 → 0.0.1-alpha.f62945

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 (83) hide show
  1. package/lib/__templates__/expo/.cozeproj/scripts/dev_run.sh +13 -12
  2. package/lib/__templates__/expo/.cozeproj/scripts/server_dev_run.sh +9 -8
  3. package/lib/__templates__/expo/README.md +3 -5
  4. package/lib/__templates__/expo/client/app/+not-found.tsx +19 -4
  5. package/lib/__templates__/expo/client/app/_layout.tsx +17 -16
  6. package/lib/__templates__/expo/client/components/ThemedText.tsx +33 -0
  7. package/lib/__templates__/expo/client/components/ThemedView.tsx +37 -0
  8. package/lib/__templates__/expo/client/constants/theme.ts +177 -0
  9. package/lib/__templates__/expo/client/hooks/useColorScheme.tsx +48 -0
  10. package/lib/__templates__/expo/client/hooks/useTheme.ts +33 -0
  11. package/lib/__templates__/expo/client/metro.config.js +4 -8
  12. package/lib/__templates__/expo/client/package.json +29 -31
  13. package/lib/__templates__/expo/client/screens/demo/index.tsx +13 -7
  14. package/lib/__templates__/expo/package.json +1 -1
  15. package/lib/__templates__/expo/patches/{expo@54.0.32.patch → expo@54.0.33.patch} +3 -2
  16. package/lib/__templates__/expo/pnpm-lock.yaml +340 -1736
  17. package/lib/__templates__/expo/server/package.json +9 -7
  18. package/lib/__templates__/expo/server/src/index.ts +1 -0
  19. package/lib/__templates__/expo/template.config.js +56 -0
  20. package/lib/__templates__/native-static/.coze +11 -0
  21. package/lib/__templates__/native-static/index.html +33 -0
  22. package/lib/__templates__/native-static/styles/main.css +136 -0
  23. package/lib/__templates__/native-static/template.config.js +22 -0
  24. package/lib/__templates__/nextjs/package.json +3 -1
  25. package/lib/__templates__/nextjs/pnpm-lock.yaml +119 -106
  26. package/lib/__templates__/nextjs/src/app/page.tsx +18 -60
  27. package/lib/__templates__/nextjs/template.config.js +49 -14
  28. package/lib/__templates__/taro/.coze +14 -0
  29. package/lib/__templates__/taro/.cozeproj/scripts/deploy_build.sh +19 -0
  30. package/lib/__templates__/taro/.cozeproj/scripts/deploy_run.sh +14 -0
  31. package/lib/__templates__/taro/.cozeproj/scripts/dev_build.sh +2 -0
  32. package/lib/__templates__/taro/.cozeproj/scripts/dev_run.sh +151 -0
  33. package/lib/__templates__/taro/.cozeproj/scripts/init_env.sh +5 -0
  34. package/lib/__templates__/taro/.cozeproj/scripts/pack.sh +24 -0
  35. package/lib/__templates__/taro/README.md +751 -0
  36. package/lib/__templates__/taro/_gitignore +40 -0
  37. package/lib/__templates__/taro/_npmrc +18 -0
  38. package/lib/__templates__/taro/babel.config.js +12 -0
  39. package/lib/__templates__/taro/config/dev.ts +9 -0
  40. package/lib/__templates__/taro/config/index.ts +223 -0
  41. package/lib/__templates__/taro/config/prod.ts +34 -0
  42. package/lib/__templates__/taro/eslint.config.mjs +80 -0
  43. package/lib/__templates__/taro/key/private.appid.key +0 -0
  44. package/lib/__templates__/taro/package.json +107 -0
  45. package/lib/__templates__/taro/patches/@tarojs__plugin-mini-ci@4.1.9.patch +30 -0
  46. package/lib/__templates__/taro/pnpm-lock.yaml +23100 -0
  47. package/lib/__templates__/taro/pnpm-workspace.yaml +2 -0
  48. package/lib/__templates__/taro/project.config.json +15 -0
  49. package/lib/__templates__/taro/server/nest-cli.json +10 -0
  50. package/lib/__templates__/taro/server/package.json +40 -0
  51. package/lib/__templates__/taro/server/src/app.controller.ts +23 -0
  52. package/lib/__templates__/taro/server/src/app.module.ts +10 -0
  53. package/lib/__templates__/taro/server/src/app.service.ts +8 -0
  54. package/lib/__templates__/taro/server/src/interceptors/http-status.interceptor.ts +23 -0
  55. package/lib/__templates__/taro/server/src/main.ts +49 -0
  56. package/lib/__templates__/taro/server/tsconfig.json +24 -0
  57. package/lib/__templates__/taro/src/app.config.ts +11 -0
  58. package/lib/__templates__/taro/src/app.css +52 -0
  59. package/lib/__templates__/taro/src/app.tsx +9 -0
  60. package/lib/__templates__/taro/src/index.html +39 -0
  61. package/lib/__templates__/taro/src/network.ts +39 -0
  62. package/lib/__templates__/taro/src/pages/index/index.config.ts +3 -0
  63. package/lib/__templates__/taro/src/pages/index/index.css +1 -0
  64. package/lib/__templates__/taro/src/pages/index/index.tsx +33 -0
  65. package/lib/__templates__/taro/src/presets/dev-debug.ts +23 -0
  66. package/lib/__templates__/taro/src/presets/h5-container.tsx +15 -0
  67. package/lib/__templates__/taro/src/presets/h5-navbar.tsx +201 -0
  68. package/lib/__templates__/taro/src/presets/h5-styles.ts +142 -0
  69. package/lib/__templates__/taro/src/presets/index.tsx +18 -0
  70. package/lib/__templates__/taro/stylelint.config.mjs +4 -0
  71. package/lib/__templates__/taro/template.config.js +68 -0
  72. package/lib/__templates__/taro/tsconfig.json +29 -0
  73. package/lib/__templates__/taro/types/global.d.ts +32 -0
  74. package/lib/__templates__/templates.json +75 -0
  75. package/lib/__templates__/vite/package.json +5 -1
  76. package/lib/__templates__/vite/pnpm-lock.yaml +146 -1659
  77. package/lib/__templates__/vite/src/main.ts +17 -47
  78. package/lib/__templates__/vite/template.config.js +49 -14
  79. package/lib/__templates__/vite/vite.config.ts +1 -0
  80. package/lib/cli.js +62 -68
  81. package/package.json +2 -1
  82. package/lib/__templates__/expo/client/global.css +0 -76
  83. package/lib/__templates__/expo/client/uniwind-types.d.ts +0 -10
@@ -1,18 +1,24 @@
1
1
  import { View, Text } from 'react-native';
2
2
  import { Image } from 'expo-image';
3
3
 
4
+ import { useTheme } from '@/hooks/useTheme';
4
5
  import { Screen } from '@/components/Screen';
6
+ import { styles } from './styles';
5
7
 
6
8
  export default function DemoPage() {
9
+ const { theme, isDark } = useTheme();
10
+
7
11
  return (
8
- <Screen backgroundColor="var(--background)" statusBarStyle="auto">
9
- <View className="absolute top-0 left-0 w-full h-full flex flex-col items-center justify-center">
12
+ <Screen backgroundColor={theme.backgroundRoot} statusBarStyle={isDark ? 'light' : 'dark'}>
13
+ <View
14
+ style={styles.container}
15
+ >
10
16
  <Image
11
- className="w-[130px] h-[109px]"
12
- source="https://lf-coze-web-cdn.coze.cn/obj/eden-cn/lm-lgvj/ljhwZthlaukjlkulzlp/coze-coding/expo/coze-loading.gif"
13
- />
14
- <Text className="text-base font-bold text-foreground">APP 开发中</Text>
15
- <Text className="text-sm mt-2 text-muted">即将为您呈现应用界面</Text>
17
+ style={styles.logo}
18
+ source="https://lf-coze-web-cdn.coze.cn/obj/eden-cn/lm-lgvj/ljhwZthlaukjlkulzlp/coze-coding/icon/coze-coding.gif"
19
+ ></Image>
20
+ <Text style={{...styles.title, color: theme.textPrimary}}>应用开发中</Text>
21
+ <Text style={{...styles.description, color: theme.textSecondary}}>请稍候,界面即将呈现</Text>
16
22
  </View>
17
23
  </Screen>
18
24
  );
@@ -19,7 +19,7 @@
19
19
  "esbuild": "0.27.2"
20
20
  },
21
21
  "patchedDependencies": {
22
- "expo@54.0.32": "patches/expo@54.0.32.patch"
22
+ "expo@54.0.33": "patches/expo@54.0.33.patch"
23
23
  }
24
24
  }
25
25
  }
@@ -1,8 +1,8 @@
1
1
  diff --git a/src/async-require/hmr.ts b/src/async-require/hmr.ts
2
- index 33ce50ee2950c40d2b0553b148710f1e24e44f3d..a13d6f2da10dea858019cc991c21753f64f01fd0 100644
2
+ index 33ce50ee2950c40d2b0553b148710f1e24e44f3d..3d78cb02dd7e96ac9727a2935d8178f2c7e95982 100644
3
3
  --- a/src/async-require/hmr.ts
4
4
  +++ b/src/async-require/hmr.ts
5
- @@ -216,6 +216,39 @@ const HMRClient: HMRClientNativeInterface = {
5
+ @@ -216,6 +216,40 @@ const HMRClient: HMRClientNativeInterface = {
6
6
 
7
7
  client.on('update-done', () => {
8
8
  hideLoading();
@@ -39,6 +39,7 @@ index 33ce50ee2950c40d2b0553b148710f1e24e44f3d..a13d6f2da10dea858019cc991c21753f
39
39
  + checkServerAndReload(6);
40
40
  + }, 35_000);
41
41
  + }
42
+ + console.log('[HMR] Update done.');
42
43
  });
43
44
 
44
45
  client.on('error', (data: { type: string; message: string }) => {