@coze-arch/cli 0.0.1-alpha.cac8f5 → 0.0.1-alpha.cbb5ba
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/README.md +1 -0
- package/lib/__templates__/expo/.cozeproj/scripts/dev_run.sh +25 -16
- package/lib/__templates__/expo/.cozeproj/scripts/server_dev_run.sh +9 -8
- package/lib/__templates__/expo/README.md +2 -2
- package/lib/__templates__/expo/client/app/+not-found.tsx +30 -0
- package/lib/__templates__/expo/client/app/_layout.tsx +11 -8
- package/lib/__templates__/expo/client/app.config.ts +2 -2
- package/lib/__templates__/expo/client/components/Screen.tsx +3 -19
- package/lib/__templates__/expo/client/components/ThemedView.tsx +1 -2
- package/lib/__templates__/expo/client/constants/theme.ts +8 -0
- package/lib/__templates__/expo/client/eslint.config.mjs +23 -0
- package/lib/__templates__/expo/client/hooks/{useColorScheme.ts → useColorScheme.tsx} +20 -6
- package/lib/__templates__/expo/client/hooks/useSafeRouter.ts +152 -0
- package/lib/__templates__/expo/client/metro.config.js +3 -0
- package/lib/__templates__/expo/client/package.json +36 -34
- package/lib/__templates__/expo/client/screens/demo/index.tsx +3 -3
- package/lib/__templates__/expo/client/scripts/install-missing-deps.js +10 -10
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/names.js +1886 -2483
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/rule.js +20 -1
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/v5-only-names.js +388 -0
- package/lib/__templates__/expo/eslint-plugins/forbid-emoji/index.js +9 -0
- package/lib/__templates__/expo/eslint-plugins/forbid-emoji/rule.js +112 -0
- package/lib/__templates__/expo/eslint-plugins/forbid-emoji/tech.md +94 -0
- package/lib/__templates__/expo/eslint-plugins/react-native/index.js +9 -0
- package/lib/__templates__/expo/eslint-plugins/react-native/rule.js +64 -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 +3 -0
- package/lib/__templates__/expo/patches/expo@54.0.33.patch +45 -0
- package/lib/__templates__/expo/pnpm-lock.yaml +1318 -2636
- package/lib/__templates__/expo/server/package.json +9 -7
- package/lib/__templates__/expo/server/src/index.ts +1 -0
- package/lib/__templates__/expo/template.config.js +56 -0
- package/lib/__templates__/native-static/.coze +11 -0
- package/lib/__templates__/native-static/index.html +33 -0
- package/lib/__templates__/native-static/styles/main.css +136 -0
- package/lib/__templates__/native-static/template.config.js +22 -0
- package/lib/__templates__/nextjs/.babelrc +15 -0
- package/lib/__templates__/nextjs/README.md +5 -0
- package/lib/__templates__/nextjs/eslint.config.mjs +5 -0
- package/lib/__templates__/nextjs/next.config.ts +1 -2
- package/lib/__templates__/nextjs/package.json +8 -6
- package/lib/__templates__/nextjs/pnpm-lock.yaml +3123 -963
- package/lib/__templates__/nextjs/scripts/build.sh +4 -1
- package/lib/__templates__/nextjs/scripts/dev.sh +1 -2
- package/lib/__templates__/nextjs/scripts/start.sh +1 -1
- package/lib/__templates__/nextjs/src/app/layout.tsx +5 -3
- package/lib/__templates__/nextjs/src/app/page.tsx +17 -60
- package/lib/__templates__/nextjs/src/server.ts +35 -0
- package/lib/__templates__/nextjs/template.config.js +49 -14
- package/lib/__templates__/nextjs/tsconfig.json +1 -1
- package/lib/__templates__/nuxt-vue/.coze +12 -0
- package/lib/__templates__/nuxt-vue/README.md +73 -0
- package/lib/__templates__/nuxt-vue/_gitignore +24 -0
- package/lib/__templates__/nuxt-vue/_npmrc +23 -0
- package/lib/__templates__/nuxt-vue/app/app.vue +6 -0
- package/lib/__templates__/nuxt-vue/app/pages/index.vue +23 -0
- package/lib/__templates__/nuxt-vue/assets/css/main.css +24 -0
- package/lib/__templates__/nuxt-vue/nuxt.config.ts +116 -0
- package/lib/__templates__/nuxt-vue/package.json +35 -0
- package/lib/__templates__/nuxt-vue/pnpm-lock.yaml +8759 -0
- package/lib/__templates__/nuxt-vue/postcss.config.mjs +8 -0
- package/lib/__templates__/nuxt-vue/public/favicon.ico +0 -0
- package/lib/__templates__/nuxt-vue/public/robots.txt +2 -0
- package/lib/__templates__/nuxt-vue/scripts/build.sh +14 -0
- package/lib/__templates__/nuxt-vue/scripts/dev.sh +32 -0
- package/lib/__templates__/nuxt-vue/scripts/prepare.sh +14 -0
- package/lib/__templates__/nuxt-vue/scripts/start.sh +15 -0
- package/lib/__templates__/nuxt-vue/server/api/hello.ts +10 -0
- package/lib/__templates__/nuxt-vue/server/middleware/logger.ts +10 -0
- package/lib/__templates__/nuxt-vue/server/routes/health.ts +10 -0
- package/lib/__templates__/nuxt-vue/tailwind.config.js +13 -0
- package/lib/__templates__/nuxt-vue/template.config.js +87 -0
- package/lib/__templates__/nuxt-vue/tsconfig.json +18 -0
- package/lib/__templates__/taro/.coze +14 -0
- package/lib/__templates__/taro/.cozeproj/scripts/deploy_build.sh +19 -0
- package/lib/__templates__/taro/.cozeproj/scripts/deploy_run.sh +14 -0
- package/lib/__templates__/taro/.cozeproj/scripts/dev_build.sh +2 -0
- package/lib/__templates__/taro/.cozeproj/scripts/dev_run.sh +151 -0
- package/lib/__templates__/taro/.cozeproj/scripts/init_env.sh +5 -0
- package/lib/__templates__/taro/.cozeproj/scripts/pack.sh +24 -0
- package/lib/__templates__/taro/README.md +751 -0
- package/lib/__templates__/taro/_gitignore +40 -0
- package/lib/__templates__/taro/_npmrc +18 -0
- package/lib/__templates__/taro/babel.config.js +12 -0
- package/lib/__templates__/taro/config/dev.ts +9 -0
- package/lib/__templates__/taro/config/index.ts +223 -0
- package/lib/__templates__/taro/config/prod.ts +34 -0
- package/lib/__templates__/taro/eslint.config.mjs +80 -0
- package/lib/__templates__/taro/key/private.appid.key +0 -0
- package/lib/__templates__/taro/package.json +107 -0
- package/lib/__templates__/taro/patches/@tarojs__plugin-mini-ci@4.1.9.patch +30 -0
- package/lib/__templates__/taro/pnpm-lock.yaml +23100 -0
- package/lib/__templates__/taro/pnpm-workspace.yaml +2 -0
- package/lib/__templates__/taro/project.config.json +15 -0
- package/lib/__templates__/taro/server/nest-cli.json +10 -0
- package/lib/__templates__/taro/server/package.json +40 -0
- package/lib/__templates__/taro/server/src/app.controller.ts +23 -0
- package/lib/__templates__/taro/server/src/app.module.ts +10 -0
- package/lib/__templates__/taro/server/src/app.service.ts +8 -0
- package/lib/__templates__/taro/server/src/interceptors/http-status.interceptor.ts +23 -0
- package/lib/__templates__/taro/server/src/main.ts +49 -0
- package/lib/__templates__/taro/server/tsconfig.json +24 -0
- package/lib/__templates__/taro/src/app.config.ts +11 -0
- package/lib/__templates__/taro/src/app.css +52 -0
- package/lib/__templates__/taro/src/app.tsx +9 -0
- package/lib/__templates__/taro/src/index.html +39 -0
- package/lib/__templates__/taro/src/network.ts +39 -0
- package/lib/__templates__/taro/src/pages/index/index.config.ts +3 -0
- package/lib/__templates__/taro/src/pages/index/index.css +1 -0
- package/lib/__templates__/taro/src/pages/index/index.tsx +33 -0
- package/lib/__templates__/taro/src/presets/dev-debug.ts +23 -0
- package/lib/__templates__/taro/src/presets/h5-container.tsx +15 -0
- package/lib/__templates__/taro/src/presets/h5-navbar.tsx +201 -0
- package/lib/__templates__/taro/src/presets/h5-styles.ts +142 -0
- package/lib/__templates__/taro/src/presets/index.tsx +18 -0
- package/lib/__templates__/taro/stylelint.config.mjs +4 -0
- package/lib/__templates__/taro/template.config.js +68 -0
- package/lib/__templates__/taro/tsconfig.json +29 -0
- package/lib/__templates__/taro/types/global.d.ts +32 -0
- package/lib/__templates__/templates.json +75 -0
- package/lib/__templates__/vite/README.md +190 -11
- package/lib/__templates__/vite/_gitignore +1 -0
- package/lib/__templates__/vite/eslint.config.mjs +6 -1
- package/lib/__templates__/vite/package.json +14 -3
- package/lib/__templates__/vite/pnpm-lock.yaml +820 -1593
- package/lib/__templates__/vite/scripts/build.sh +4 -1
- package/lib/__templates__/vite/scripts/dev.sh +2 -2
- package/lib/__templates__/vite/scripts/start.sh +3 -3
- package/lib/__templates__/vite/server/routes/index.ts +31 -0
- package/lib/__templates__/vite/server/server.ts +65 -0
- package/lib/__templates__/vite/server/vite.ts +67 -0
- package/lib/__templates__/vite/src/main.ts +17 -47
- package/lib/__templates__/vite/template.config.js +49 -14
- package/lib/__templates__/vite/tsconfig.json +4 -3
- package/lib/__templates__/vite/vite.config.ts +5 -0
- package/lib/cli.js +897 -182
- package/package.json +7 -3
|
@@ -15,36 +15,38 @@
|
|
|
15
15
|
"preset": "jest-expo"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@expo/metro-runtime": "
|
|
19
|
-
"@expo/vector-icons": "^15.0.
|
|
20
|
-
"@react-native-async-storage/async-storage": "
|
|
21
|
-
"@react-native-community/datetimepicker": "
|
|
22
|
-
"@react-native-community/slider": "
|
|
23
|
-
"@react-native-masked-view/masked-view": "
|
|
24
|
-
"@react-native-picker/picker": "
|
|
18
|
+
"@expo/metro-runtime": "~6.1.2",
|
|
19
|
+
"@expo/vector-icons": "^15.0.3",
|
|
20
|
+
"@react-native-async-storage/async-storage": "2.2.0",
|
|
21
|
+
"@react-native-community/datetimepicker": "8.4.4",
|
|
22
|
+
"@react-native-community/slider": "5.0.1",
|
|
23
|
+
"@react-native-masked-view/masked-view": "0.3.2",
|
|
24
|
+
"@react-native-picker/picker": "2.11.1",
|
|
25
25
|
"@react-navigation/bottom-tabs": "^7.2.0",
|
|
26
26
|
"@react-navigation/native": "^7.0.14",
|
|
27
27
|
"dayjs": "^1.11.19",
|
|
28
|
-
"expo": "
|
|
29
|
-
"expo-auth-session": "
|
|
30
|
-
"expo-av": "~16.0.
|
|
31
|
-
"expo-blur": "~15.0.
|
|
28
|
+
"expo": "54.0.33",
|
|
29
|
+
"expo-auth-session": "~7.0.10",
|
|
30
|
+
"expo-av": "~16.0.8",
|
|
31
|
+
"expo-blur": "~15.0.8",
|
|
32
32
|
"expo-camera": "~17.0.10",
|
|
33
|
-
"expo-constants": "~18.0.
|
|
34
|
-
"expo-crypto": "
|
|
35
|
-
"expo-
|
|
36
|
-
"expo-
|
|
37
|
-
"expo-
|
|
38
|
-
"expo-
|
|
39
|
-
"expo-
|
|
40
|
-
"expo-
|
|
41
|
-
"expo-
|
|
42
|
-
"expo-
|
|
43
|
-
"expo-
|
|
44
|
-
"expo-
|
|
45
|
-
"expo-
|
|
33
|
+
"expo-constants": "~18.0.13",
|
|
34
|
+
"expo-crypto": "~15.0.8",
|
|
35
|
+
"expo-file-system": "~19.0.21",
|
|
36
|
+
"expo-font": "~14.0.11",
|
|
37
|
+
"expo-haptics": "~15.0.8",
|
|
38
|
+
"expo-image": "~3.0.11",
|
|
39
|
+
"expo-image-picker": "~17.0.10",
|
|
40
|
+
"expo-linear-gradient": "~15.0.8",
|
|
41
|
+
"expo-linking": "~8.0.11",
|
|
42
|
+
"expo-location": "~19.0.8",
|
|
43
|
+
"expo-router": "~6.0.23",
|
|
44
|
+
"expo-splash-screen": "~31.0.13",
|
|
45
|
+
"expo-status-bar": "~3.0.9",
|
|
46
|
+
"expo-symbols": "~1.0.8",
|
|
46
47
|
"expo-system-ui": "~6.0.9",
|
|
47
48
|
"expo-web-browser": "~15.0.10",
|
|
49
|
+
"js-base64": "^3.7.7",
|
|
48
50
|
"react": "19.1.0",
|
|
49
51
|
"react-dom": "19.1.0",
|
|
50
52
|
"react-native": "0.81.5",
|
|
@@ -52,25 +54,26 @@
|
|
|
52
54
|
"react-native-gesture-handler": "~2.28.0",
|
|
53
55
|
"react-native-keyboard-aware-scroll-view": "^0.9.5",
|
|
54
56
|
"react-native-modal-datetime-picker": "18.0.0",
|
|
55
|
-
"react-native-reanimated": "~4.1.
|
|
57
|
+
"react-native-reanimated": "~4.1.1",
|
|
56
58
|
"react-native-safe-area-context": "~5.6.0",
|
|
57
59
|
"react-native-screens": "~4.16.0",
|
|
58
|
-
"react-native-svg": "15.
|
|
60
|
+
"react-native-svg": "15.12.1",
|
|
59
61
|
"react-native-toast-message": "^2.3.3",
|
|
60
|
-
"react-native-web": "
|
|
61
|
-
"react-native-webview": "
|
|
62
|
+
"react-native-web": "~0.21.0",
|
|
63
|
+
"react-native-webview": "13.15.0",
|
|
62
64
|
"react-native-worklets": "0.5.1",
|
|
63
65
|
"zod": "^4.2.1"
|
|
64
66
|
},
|
|
65
67
|
"devDependencies": {
|
|
66
68
|
"@babel/core": "^7.25.2",
|
|
67
|
-
"babel-plugin-module-resolver": "^5.0.2",
|
|
68
|
-
"babel-preset-expo": "^54.0.9",
|
|
69
69
|
"@eslint/js": "^9.27.0",
|
|
70
70
|
"@types/jest": "^29.5.12",
|
|
71
71
|
"@types/react": "~19.1.0",
|
|
72
72
|
"@types/react-test-renderer": "19.1.0",
|
|
73
|
+
"babel-plugin-module-resolver": "^5.0.2",
|
|
74
|
+
"babel-preset-expo": "^54.0.9",
|
|
73
75
|
"chalk": "^4.1.2",
|
|
76
|
+
"connect": "^3.7.0",
|
|
74
77
|
"depcheck": "^1.4.7",
|
|
75
78
|
"esbuild": "0.27.2",
|
|
76
79
|
"eslint": "^9.39.2",
|
|
@@ -81,13 +84,12 @@
|
|
|
81
84
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
82
85
|
"eslint-plugin-regexp": "^2.10.0",
|
|
83
86
|
"globals": "^16.1.0",
|
|
87
|
+
"http-proxy-middleware": "^3.0.5",
|
|
84
88
|
"jest": "^29.2.1",
|
|
85
|
-
"jest-expo": "~54.0.
|
|
89
|
+
"jest-expo": "~54.0.17",
|
|
86
90
|
"react-test-renderer": "19.1.0",
|
|
87
91
|
"tsx": "^4.21.0",
|
|
88
92
|
"typescript": "^5.8.3",
|
|
89
|
-
"typescript-eslint": "^8.32.1"
|
|
90
|
-
"connect": "^3.7.0",
|
|
91
|
-
"http-proxy-middleware": "^3.0.5"
|
|
93
|
+
"typescript-eslint": "^8.32.1"
|
|
92
94
|
}
|
|
93
95
|
}
|
|
@@ -15,10 +15,10 @@ export default function DemoPage() {
|
|
|
15
15
|
>
|
|
16
16
|
<Image
|
|
17
17
|
style={styles.logo}
|
|
18
|
-
source="https://lf-coze-web-cdn.coze.cn/obj/eden-cn/lm-lgvj/ljhwZthlaukjlkulzlp/coze-coding/
|
|
18
|
+
source="https://lf-coze-web-cdn.coze.cn/obj/eden-cn/lm-lgvj/ljhwZthlaukjlkulzlp/coze-coding/icon/coze-coding.gif"
|
|
19
19
|
></Image>
|
|
20
|
-
<Text style={{...styles.title, color: theme.textPrimary}}
|
|
21
|
-
<Text style={{...styles.description, color: theme.textSecondary}}
|
|
20
|
+
<Text style={{...styles.title, color: theme.textPrimary}}>应用开发中</Text>
|
|
21
|
+
<Text style={{...styles.description, color: theme.textSecondary}}>请稍候,界面即将呈现</Text>
|
|
22
22
|
</View>
|
|
23
23
|
</Screen>
|
|
24
24
|
);
|
|
@@ -9,7 +9,7 @@ const { execSync } = require('child_process');
|
|
|
9
9
|
const fs = require('fs');
|
|
10
10
|
const path = require('path');
|
|
11
11
|
|
|
12
|
-
console.log('
|
|
12
|
+
console.log('检测缺失的依赖...\n');
|
|
13
13
|
|
|
14
14
|
try {
|
|
15
15
|
// 运行 depcheck 并获取 JSON 输出
|
|
@@ -61,11 +61,11 @@ try {
|
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
if (missingPackages.length === 0) {
|
|
64
|
-
console.log('
|
|
64
|
+
console.log('没有发现缺失的依赖');
|
|
65
65
|
process.exit(0);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
console.log('
|
|
68
|
+
console.log('发现以下缺失的依赖:');
|
|
69
69
|
missingPackages.forEach((pkg, index) => {
|
|
70
70
|
const files = missing[pkg];
|
|
71
71
|
console.log(` ${index + 1}. ${pkg}`);
|
|
@@ -74,7 +74,7 @@ try {
|
|
|
74
74
|
);
|
|
75
75
|
});
|
|
76
76
|
|
|
77
|
-
console.log('\n
|
|
77
|
+
console.log('\n开始安装...\n');
|
|
78
78
|
|
|
79
79
|
// 使用 expo install 安装所有缺失的包
|
|
80
80
|
const packagesToInstall = missingPackages.join(' ');
|
|
@@ -84,22 +84,22 @@ try {
|
|
|
84
84
|
stdio: 'inherit',
|
|
85
85
|
});
|
|
86
86
|
|
|
87
|
-
console.log('\n
|
|
87
|
+
console.log('\n所有缺失的依赖已安装完成');
|
|
88
88
|
} catch (installError) {
|
|
89
|
-
console.log('\
|
|
89
|
+
console.log('\nexpo install 失败,尝试使用 npm install...\n');
|
|
90
90
|
|
|
91
91
|
execSync(`npm install ${packagesToInstall}`, {
|
|
92
92
|
stdio: 'inherit',
|
|
93
93
|
});
|
|
94
94
|
|
|
95
|
-
console.log('\n
|
|
95
|
+
console.log('\n所有缺失的依赖已通过 npm 安装完成');
|
|
96
96
|
}
|
|
97
97
|
} catch (error) {
|
|
98
98
|
if (error.message.includes('depcheck')) {
|
|
99
|
-
console.error('
|
|
100
|
-
console.log('
|
|
99
|
+
console.error('depcheck 未安装或运行失败');
|
|
100
|
+
console.log('尝试运行: npm install -g depcheck');
|
|
101
101
|
} else {
|
|
102
|
-
console.error('
|
|
102
|
+
console.error('发生错误:', error.message);
|
|
103
103
|
}
|
|
104
104
|
process.exit(1);
|
|
105
105
|
}
|