@coze-arch/cli 0.0.1-beta.5 → 0.0.2
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/.coze +7 -2
- package/lib/__templates__/expo/.cozeproj/scripts/dev_build.sh +46 -0
- package/lib/__templates__/expo/.cozeproj/scripts/dev_run.sh +229 -0
- package/lib/__templates__/expo/.cozeproj/scripts/prod_build.sh +47 -0
- package/lib/__templates__/expo/.cozeproj/scripts/prod_run.sh +34 -0
- package/lib/__templates__/expo/.cozeproj/scripts/server_dev_run.sh +46 -0
- package/lib/__templates__/expo/README.md +68 -7
- package/lib/__templates__/expo/_gitignore +1 -1
- package/lib/__templates__/{react-rsbuild → expo}/_npmrc +4 -5
- package/lib/__templates__/expo/client/app/+not-found.tsx +15 -64
- package/lib/__templates__/expo/client/app/_layout.tsx +15 -12
- package/lib/__templates__/expo/client/app/index.tsx +1 -0
- package/lib/__templates__/expo/client/app.config.ts +76 -0
- package/lib/__templates__/expo/client/components/Screen.tsx +22 -38
- package/lib/__templates__/expo/client/components/ThemedText.tsx +33 -0
- package/lib/__templates__/expo/client/components/ThemedView.tsx +37 -0
- package/lib/__templates__/expo/client/constants/theme.ts +117 -58
- package/lib/__templates__/expo/client/contexts/AuthContext.tsx +14 -107
- package/lib/__templates__/expo/client/declarations.d.ts +5 -0
- package/lib/__templates__/expo/{eslint.config.mjs → client/eslint.config.mjs} +40 -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 +26 -6
- package/lib/__templates__/expo/client/metro.config.js +124 -0
- package/lib/__templates__/expo/client/package.json +95 -0
- 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 +47 -22
- package/lib/__templates__/expo/client/tsconfig.json +24 -0
- package/lib/__templates__/expo/client/utils/index.ts +23 -2
- 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/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/eslint-plugins/restrict-linear-gradient/index.js +9 -0
- package/lib/__templates__/expo/eslint-plugins/restrict-linear-gradient/rule.js +120 -0
- package/lib/__templates__/expo/eslint-plugins/restrict-linear-gradient/tech.md +58 -0
- package/lib/__templates__/expo/package.json +16 -91
- package/lib/__templates__/expo/patches/expo@54.0.33.patch +45 -0
- package/lib/__templates__/expo/pnpm-lock.yaml +1805 -3126
- package/lib/__templates__/expo/pnpm-workspace.yaml +3 -0
- package/lib/__templates__/expo/server/build.js +21 -0
- package/lib/__templates__/expo/server/package.json +34 -0
- package/lib/__templates__/expo/server/src/index.ts +20 -0
- package/lib/__templates__/expo/server/tsconfig.json +24 -0
- package/lib/__templates__/expo/template.config.js +58 -1
- package/lib/__templates__/expo/tsconfig.json +1 -24
- 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/.coze +4 -3
- package/lib/__templates__/nextjs/README.md +346 -19
- package/lib/__templates__/nextjs/_npmrc +2 -1
- package/lib/__templates__/nextjs/components.json +21 -0
- package/lib/__templates__/nextjs/eslint.config.mjs +5 -0
- package/lib/__templates__/nextjs/next.config.ts +11 -0
- package/lib/__templates__/nextjs/package.json +63 -2
- package/lib/__templates__/nextjs/pnpm-lock.yaml +10053 -1710
- package/lib/__templates__/nextjs/scripts/build.sh +4 -1
- package/lib/__templates__/nextjs/scripts/dev.sh +15 -27
- package/lib/__templates__/{react-rsbuild/scripts/build.sh → nextjs/scripts/prepare.sh} +0 -5
- package/lib/__templates__/nextjs/scripts/start.sh +7 -1
- package/lib/__templates__/nextjs/src/app/globals.css +124 -13
- package/lib/__templates__/nextjs/src/app/layout.tsx +56 -16
- package/lib/__templates__/nextjs/src/app/page.tsx +18 -49
- package/lib/__templates__/nextjs/src/app/robots.ts +11 -0
- package/lib/__templates__/nextjs/src/components/ui/accordion.tsx +66 -0
- package/lib/__templates__/nextjs/src/components/ui/alert-dialog.tsx +157 -0
- package/lib/__templates__/nextjs/src/components/ui/alert.tsx +66 -0
- package/lib/__templates__/nextjs/src/components/ui/aspect-ratio.tsx +11 -0
- package/lib/__templates__/nextjs/src/components/ui/avatar.tsx +53 -0
- package/lib/__templates__/nextjs/src/components/ui/badge.tsx +46 -0
- package/lib/__templates__/nextjs/src/components/ui/breadcrumb.tsx +109 -0
- package/lib/__templates__/nextjs/src/components/ui/button-group.tsx +83 -0
- package/lib/__templates__/nextjs/src/components/ui/button.tsx +62 -0
- package/lib/__templates__/nextjs/src/components/ui/calendar.tsx +220 -0
- package/lib/__templates__/nextjs/src/components/ui/card.tsx +92 -0
- package/lib/__templates__/nextjs/src/components/ui/carousel.tsx +241 -0
- package/lib/__templates__/nextjs/src/components/ui/chart.tsx +357 -0
- package/lib/__templates__/nextjs/src/components/ui/checkbox.tsx +32 -0
- package/lib/__templates__/nextjs/src/components/ui/collapsible.tsx +33 -0
- package/lib/__templates__/nextjs/src/components/ui/command.tsx +184 -0
- package/lib/__templates__/nextjs/src/components/ui/context-menu.tsx +252 -0
- package/lib/__templates__/nextjs/src/components/ui/dialog.tsx +143 -0
- package/lib/__templates__/nextjs/src/components/ui/drawer.tsx +135 -0
- package/lib/__templates__/nextjs/src/components/ui/dropdown-menu.tsx +257 -0
- package/lib/__templates__/nextjs/src/components/ui/empty.tsx +104 -0
- package/lib/__templates__/nextjs/src/components/ui/field.tsx +248 -0
- package/lib/__templates__/nextjs/src/components/ui/form.tsx +167 -0
- package/lib/__templates__/nextjs/src/components/ui/hover-card.tsx +44 -0
- package/lib/__templates__/nextjs/src/components/ui/input-group.tsx +170 -0
- package/lib/__templates__/nextjs/src/components/ui/input-otp.tsx +77 -0
- package/lib/__templates__/nextjs/src/components/ui/input.tsx +21 -0
- package/lib/__templates__/nextjs/src/components/ui/item.tsx +193 -0
- package/lib/__templates__/nextjs/src/components/ui/kbd.tsx +28 -0
- package/lib/__templates__/nextjs/src/components/ui/label.tsx +24 -0
- package/lib/__templates__/nextjs/src/components/ui/menubar.tsx +276 -0
- package/lib/__templates__/nextjs/src/components/ui/navigation-menu.tsx +168 -0
- package/lib/__templates__/nextjs/src/components/ui/pagination.tsx +127 -0
- package/lib/__templates__/nextjs/src/components/ui/popover.tsx +48 -0
- package/lib/__templates__/nextjs/src/components/ui/progress.tsx +31 -0
- package/lib/__templates__/nextjs/src/components/ui/radio-group.tsx +45 -0
- package/lib/__templates__/nextjs/src/components/ui/resizable.tsx +63 -0
- package/lib/__templates__/nextjs/src/components/ui/scroll-area.tsx +58 -0
- package/lib/__templates__/nextjs/src/components/ui/select.tsx +190 -0
- package/lib/__templates__/nextjs/src/components/ui/separator.tsx +28 -0
- package/lib/__templates__/nextjs/src/components/ui/sheet.tsx +139 -0
- package/lib/__templates__/nextjs/src/components/ui/sidebar.tsx +724 -0
- package/lib/__templates__/nextjs/src/components/ui/skeleton.tsx +13 -0
- package/lib/__templates__/nextjs/src/components/ui/slider.tsx +63 -0
- package/lib/__templates__/nextjs/src/components/ui/sonner.tsx +40 -0
- package/lib/__templates__/nextjs/src/components/ui/spinner.tsx +16 -0
- package/lib/__templates__/nextjs/src/components/ui/switch.tsx +31 -0
- package/lib/__templates__/nextjs/src/components/ui/table.tsx +116 -0
- package/lib/__templates__/nextjs/src/components/ui/tabs.tsx +66 -0
- package/lib/__templates__/nextjs/src/components/ui/textarea.tsx +18 -0
- package/lib/__templates__/nextjs/src/components/ui/toggle-group.tsx +83 -0
- package/lib/__templates__/nextjs/src/components/ui/toggle.tsx +47 -0
- package/lib/__templates__/nextjs/src/components/ui/tooltip.tsx +61 -0
- package/lib/__templates__/nextjs/src/hooks/use-mobile.ts +19 -0
- package/lib/__templates__/nextjs/src/lib/utils.ts +6 -0
- package/lib/__templates__/nextjs/src/server.ts +35 -0
- package/lib/__templates__/nextjs/template.config.js +70 -5
- 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__/{rsbuild → nuxt-vue}/_npmrc +2 -1
- package/lib/__templates__/nuxt-vue/app/app.vue +6 -0
- package/lib/__templates__/nuxt-vue/app/pages/index.vue +23 -0
- package/lib/__templates__/{rsbuild/src/index.css → nuxt-vue/assets/css/main.css} +7 -4
- 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__/{rsbuild → nuxt-vue}/scripts/build.sh +2 -2
- package/lib/__templates__/nuxt-vue/scripts/dev.sh +39 -0
- package/lib/__templates__/nuxt-vue/scripts/prepare.sh +14 -0
- package/lib/__templates__/nuxt-vue/scripts/start.sh +21 -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 +763 -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 +238 -0
- package/lib/__templates__/taro/config/prod.ts +34 -0
- package/lib/__templates__/taro/eslint.config.mjs +135 -0
- package/lib/__templates__/taro/key/private.appid.key +0 -0
- package/lib/__templates__/taro/package.json +112 -0
- package/lib/__templates__/taro/patches/@tarojs__plugin-mini-ci@4.1.9.patch +30 -0
- package/lib/__templates__/taro/pnpm-lock.yaml +23412 -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 +156 -0
- package/lib/__templates__/taro/src/app.tsx +9 -0
- package/lib/__templates__/taro/src/components/ui/accordion.tsx +159 -0
- package/lib/__templates__/taro/src/components/ui/alert-dialog.tsx +260 -0
- package/lib/__templates__/taro/src/components/ui/alert.tsx +60 -0
- package/lib/__templates__/taro/src/components/ui/aspect-ratio.tsx +36 -0
- package/lib/__templates__/taro/src/components/ui/avatar.tsx +84 -0
- package/lib/__templates__/taro/src/components/ui/badge.tsx +37 -0
- package/lib/__templates__/taro/src/components/ui/breadcrumb.tsx +117 -0
- package/lib/__templates__/taro/src/components/ui/button-group.tsx +83 -0
- package/lib/__templates__/taro/src/components/ui/button.tsx +67 -0
- package/lib/__templates__/taro/src/components/ui/calendar.tsx +394 -0
- package/lib/__templates__/taro/src/components/ui/card.tsx +108 -0
- package/lib/__templates__/taro/src/components/ui/carousel.tsx +228 -0
- package/lib/__templates__/taro/src/components/ui/checkbox.tsx +58 -0
- package/lib/__templates__/taro/src/components/ui/code-block.tsx +169 -0
- package/lib/__templates__/taro/src/components/ui/collapsible.tsx +71 -0
- package/lib/__templates__/taro/src/components/ui/command.tsx +385 -0
- package/lib/__templates__/taro/src/components/ui/context-menu.tsx +614 -0
- package/lib/__templates__/taro/src/components/ui/dialog.tsx +256 -0
- package/lib/__templates__/taro/src/components/ui/drawer.tsx +192 -0
- package/lib/__templates__/taro/src/components/ui/dropdown-menu.tsx +561 -0
- package/lib/__templates__/taro/src/components/ui/field.tsx +228 -0
- package/lib/__templates__/taro/src/components/ui/hover-card.tsx +282 -0
- package/lib/__templates__/taro/src/components/ui/input-group.tsx +197 -0
- package/lib/__templates__/taro/src/components/ui/input-otp.tsx +136 -0
- package/lib/__templates__/taro/src/components/ui/input.tsx +56 -0
- package/lib/__templates__/taro/src/components/ui/label.tsx +24 -0
- package/lib/__templates__/taro/src/components/ui/menubar.tsx +595 -0
- package/lib/__templates__/taro/src/components/ui/navigation-menu.tsx +264 -0
- package/lib/__templates__/taro/src/components/ui/pagination.tsx +118 -0
- package/lib/__templates__/taro/src/components/ui/popover.tsx +291 -0
- package/lib/__templates__/taro/src/components/ui/portal.tsx +19 -0
- package/lib/__templates__/taro/src/components/ui/progress.tsx +28 -0
- package/lib/__templates__/taro/src/components/ui/radio-group.tsx +64 -0
- package/lib/__templates__/taro/src/components/ui/resizable.tsx +346 -0
- package/lib/__templates__/taro/src/components/ui/scroll-area.tsx +34 -0
- package/lib/__templates__/taro/src/components/ui/select.tsx +438 -0
- package/lib/__templates__/taro/src/components/ui/separator.tsx +30 -0
- package/lib/__templates__/taro/src/components/ui/sheet.tsx +262 -0
- package/lib/__templates__/taro/src/components/ui/skeleton.tsx +17 -0
- package/lib/__templates__/taro/src/components/ui/slider.tsx +203 -0
- package/lib/__templates__/taro/src/components/ui/sonner.tsx +1 -0
- package/lib/__templates__/taro/src/components/ui/switch.tsx +55 -0
- package/lib/__templates__/taro/src/components/ui/table.tsx +142 -0
- package/lib/__templates__/taro/src/components/ui/tabs.tsx +114 -0
- package/lib/__templates__/taro/src/components/ui/textarea.tsx +54 -0
- package/lib/__templates__/taro/src/components/ui/toast.tsx +517 -0
- package/lib/__templates__/taro/src/components/ui/toggle-group.tsx +120 -0
- package/lib/__templates__/taro/src/components/ui/toggle.tsx +77 -0
- package/lib/__templates__/taro/src/components/ui/tooltip.tsx +455 -0
- package/lib/__templates__/taro/src/index.html +39 -0
- package/lib/__templates__/taro/src/lib/hooks/use-keyboard-offset.ts +37 -0
- package/lib/__templates__/taro/src/lib/measure.ts +115 -0
- package/lib/__templates__/taro/src/lib/platform.ts +12 -0
- package/lib/__templates__/taro/src/lib/utils.ts +6 -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 +238 -0
- package/lib/__templates__/taro/src/presets/h5-styles.ts +220 -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 +126 -64
- package/lib/__templates__/vite/.coze +4 -3
- package/lib/__templates__/vite/README.md +383 -26
- package/lib/__templates__/vite/_gitignore +1 -0
- package/lib/__templates__/vite/_npmrc +2 -1
- package/lib/__templates__/vite/eslint.config.mjs +14 -0
- package/lib/__templates__/vite/package.json +23 -3
- package/lib/__templates__/vite/pnpm-lock.yaml +2509 -293
- package/lib/__templates__/vite/scripts/build.sh +4 -1
- package/lib/__templates__/vite/scripts/dev.sh +16 -28
- package/lib/__templates__/vite/scripts/prepare.sh +9 -0
- package/lib/__templates__/vite/scripts/start.sh +9 -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 -48
- package/lib/__templates__/vite/template.config.js +82 -10
- package/lib/__templates__/vite/tsconfig.json +4 -3
- package/lib/__templates__/vite/vite.config.ts +8 -3
- package/lib/cli.js +1544 -488
- package/package.json +18 -7
- package/lib/__templates__/expo/.cozeproj/scripts/deploy_build.sh +0 -109
- package/lib/__templates__/expo/.cozeproj/scripts/deploy_run.sh +0 -257
- package/lib/__templates__/expo/app.json +0 -63
- package/lib/__templates__/expo/babel.config.js +0 -9
- package/lib/__templates__/expo/client/app/(tabs)/_layout.tsx +0 -43
- package/lib/__templates__/expo/client/app/(tabs)/home.tsx +0 -1
- package/lib/__templates__/expo/client/app/(tabs)/index.tsx +0 -7
- package/lib/__templates__/expo/client/hooks/useColorScheme.ts +0 -1
- package/lib/__templates__/expo/client/index.js +0 -11
- package/lib/__templates__/expo/client/screens/home/index.tsx +0 -54
- package/lib/__templates__/expo/client/screens/home/styles.ts +0 -332
- package/lib/__templates__/expo/metro.config.js +0 -53
- package/lib/__templates__/expo/src/index.ts +0 -12
- package/lib/__templates__/nextjs/.vscode/settings.json +0 -121
- package/lib/__templates__/react-rsbuild/.coze +0 -11
- package/lib/__templates__/react-rsbuild/.vscode/settings.json +0 -121
- package/lib/__templates__/react-rsbuild/README.md +0 -61
- package/lib/__templates__/react-rsbuild/_gitignore +0 -97
- package/lib/__templates__/react-rsbuild/package.json +0 -31
- package/lib/__templates__/react-rsbuild/pnpm-lock.yaml +0 -997
- package/lib/__templates__/react-rsbuild/rsbuild.config.ts +0 -13
- package/lib/__templates__/react-rsbuild/scripts/dev.sh +0 -51
- package/lib/__templates__/react-rsbuild/scripts/start.sh +0 -15
- package/lib/__templates__/react-rsbuild/src/App.tsx +0 -60
- package/lib/__templates__/react-rsbuild/src/index.css +0 -21
- package/lib/__templates__/react-rsbuild/src/index.html +0 -12
- package/lib/__templates__/react-rsbuild/src/index.tsx +0 -16
- package/lib/__templates__/react-rsbuild/tailwind.config.js +0 -9
- package/lib/__templates__/react-rsbuild/template.config.js +0 -54
- package/lib/__templates__/react-rsbuild/tsconfig.json +0 -17
- package/lib/__templates__/rsbuild/.coze +0 -11
- package/lib/__templates__/rsbuild/.vscode/settings.json +0 -7
- package/lib/__templates__/rsbuild/README.md +0 -61
- package/lib/__templates__/rsbuild/_gitignore +0 -97
- package/lib/__templates__/rsbuild/package.json +0 -24
- package/lib/__templates__/rsbuild/pnpm-lock.yaml +0 -888
- package/lib/__templates__/rsbuild/rsbuild.config.ts +0 -12
- package/lib/__templates__/rsbuild/scripts/dev.sh +0 -51
- package/lib/__templates__/rsbuild/scripts/start.sh +0 -15
- package/lib/__templates__/rsbuild/src/index.html +0 -12
- package/lib/__templates__/rsbuild/src/index.ts +0 -5
- package/lib/__templates__/rsbuild/src/main.ts +0 -65
- package/lib/__templates__/rsbuild/tailwind.config.js +0 -9
- package/lib/__templates__/rsbuild/template.config.js +0 -54
- package/lib/__templates__/rsbuild/tsconfig.json +0 -16
- package/lib/__templates__/vite/.vscode/settings.json +0 -7
- /package/lib/__templates__/expo/{eslint-formatter-simple.mjs → client/eslint-formatter-simple.mjs} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as esbuild from 'esbuild';
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
|
|
4
|
+
const require = createRequire(import.meta.url);
|
|
5
|
+
const pkg = require('./package.json');
|
|
6
|
+
const dependencies = pkg.dependencies || {};
|
|
7
|
+
const externalList = Object.keys(dependencies).filter(dep => dep !== 'dayjs');
|
|
8
|
+
try {
|
|
9
|
+
await esbuild.build({
|
|
10
|
+
entryPoints: ['src/index.ts'],
|
|
11
|
+
bundle: true,
|
|
12
|
+
platform: 'node',
|
|
13
|
+
format: 'esm',
|
|
14
|
+
outdir: 'dist',
|
|
15
|
+
external: externalList,
|
|
16
|
+
});
|
|
17
|
+
console.log('⚡ Build complete!');
|
|
18
|
+
} catch (e) {
|
|
19
|
+
console.error(e);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "server",
|
|
3
|
+
"private": true,
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "node build.js",
|
|
7
|
+
"dev": "bash ../.cozeproj/scripts/server_dev_run.sh",
|
|
8
|
+
"preinstall": "npx only-allow pnpm",
|
|
9
|
+
"start": "NODE_ENV=production PORT=${PORT:-5000} node dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@supabase/supabase-js": "2.95.3",
|
|
13
|
+
"cors": "^2.8.5",
|
|
14
|
+
"coze-coding-dev-sdk": "^0.7.16",
|
|
15
|
+
"dayjs": "^1.11.19",
|
|
16
|
+
"dotenv": "^17.2.3",
|
|
17
|
+
"drizzle-orm": "^0.45.1",
|
|
18
|
+
"drizzle-zod": "^0.8.3",
|
|
19
|
+
"express": "^4.22.1",
|
|
20
|
+
"multer": "^2.0.2",
|
|
21
|
+
"pg": "^8.16.3",
|
|
22
|
+
"zod": "^4.2.1"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/cors": "^2.8.19",
|
|
26
|
+
"@types/express": "^5.0.6",
|
|
27
|
+
"@types/multer": "^2.0.0",
|
|
28
|
+
"@types/pg": "^8.16.0",
|
|
29
|
+
"drizzle-kit": "^0.31.8",
|
|
30
|
+
"esbuild": "0.27.2",
|
|
31
|
+
"tsx": "^4.21.0",
|
|
32
|
+
"typescript": "^5.8.3"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import express from "express";
|
|
2
|
+
import cors from "cors";
|
|
3
|
+
|
|
4
|
+
const app = express();
|
|
5
|
+
const port = process.env.PORT || 9091;
|
|
6
|
+
|
|
7
|
+
// Middleware
|
|
8
|
+
app.use(cors());
|
|
9
|
+
app.use(express.json({ limit: '50mb' }));
|
|
10
|
+
app.use(express.urlencoded({ limit: '50mb', extended: true }));
|
|
11
|
+
|
|
12
|
+
app.get('/api/v1/health', (req, res) => {
|
|
13
|
+
console.log('Health check success');
|
|
14
|
+
res.status(200).json({ status: 'ok' });
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
app.listen(port, () => {
|
|
19
|
+
console.log(`Server listening at http://localhost:${port}/`);
|
|
20
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://www.schemastore.org/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"lib": [
|
|
5
|
+
"es2024",
|
|
6
|
+
"ESNext.Array",
|
|
7
|
+
"ESNext.Collection",
|
|
8
|
+
"ESNext.Iterator",
|
|
9
|
+
"ESNext.Promise"
|
|
10
|
+
],
|
|
11
|
+
"module": "preserve",
|
|
12
|
+
"target": "es2024",
|
|
13
|
+
|
|
14
|
+
"strict": true,
|
|
15
|
+
"esModuleInterop": true,
|
|
16
|
+
"skipLibCheck": true,
|
|
17
|
+
"moduleResolution": "bundler",
|
|
18
|
+
|
|
19
|
+
"rewriteRelativeImportExtensions": true,
|
|
20
|
+
"erasableSyntaxOnly": true,
|
|
21
|
+
"verbatimModuleSyntax": true
|
|
22
|
+
},
|
|
23
|
+
"include": ["src"]
|
|
24
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
import { spawn } from 'child_process';
|
|
4
|
+
import { resolve, join, basename } from 'path';
|
|
5
|
+
import { appendFileSync, openSync, closeSync, mkdirSync } from 'fs';
|
|
3
6
|
|
|
4
7
|
|
|
5
8
|
|
|
@@ -29,9 +32,10 @@ export const paramsSchema = {
|
|
|
29
32
|
};
|
|
30
33
|
|
|
31
34
|
const config = {
|
|
35
|
+
description: 'Expo template for React Native applications',
|
|
32
36
|
paramsSchema,
|
|
33
37
|
defaultParams: {
|
|
34
|
-
port:
|
|
38
|
+
port: 9090,
|
|
35
39
|
appName: 'my-expo-app',
|
|
36
40
|
},
|
|
37
41
|
onBeforeRender: async context => {
|
|
@@ -44,6 +48,59 @@ const config = {
|
|
|
44
48
|
console.log(` - Framework: Expo`);
|
|
45
49
|
console.log(` - Port: ${context.port}`);
|
|
46
50
|
},
|
|
51
|
+
onComplete: async (_context, outputPath) => {
|
|
52
|
+
// Skip pnpm update in test environment to avoid monorepo workspace issues
|
|
53
|
+
if (process.env.NODE_ENV === 'test') {
|
|
54
|
+
console.log('⊘ Skipping dependency update in test environment');
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const cmd = 'pnpm';
|
|
59
|
+
const args = ['-r', 'up', 'coze-coding-dev-sdk@^0.7.0'];
|
|
60
|
+
console.log(
|
|
61
|
+
`\nTriggering: ${cmd} ${args.join(' ')} (running in background)`,
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
try {
|
|
65
|
+
const projectRoot = resolve(outputPath);
|
|
66
|
+
|
|
67
|
+
// Determine log directory
|
|
68
|
+
const logDir = process.env.COZE_LOG_DIR || resolve(__dirname, '../.log');
|
|
69
|
+
mkdirSync(logDir, { recursive: true });
|
|
70
|
+
|
|
71
|
+
// Use project name in log file to avoid conflicts
|
|
72
|
+
const projectName = basename(projectRoot);
|
|
73
|
+
const logFile = join(logDir, `${projectName}-init.log`);
|
|
74
|
+
|
|
75
|
+
// Write log header
|
|
76
|
+
const timestamp = new Date().toISOString();
|
|
77
|
+
appendFileSync(
|
|
78
|
+
logFile,
|
|
79
|
+
`\n=== [${timestamp}] ${cmd} ${args.join(' ')} ===\n`,
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
// Open log file for appending
|
|
83
|
+
const logFd = openSync(logFile, 'a');
|
|
84
|
+
|
|
85
|
+
// Spawn in detached mode
|
|
86
|
+
const child = spawn(cmd, args, {
|
|
87
|
+
cwd: projectRoot,
|
|
88
|
+
detached: true,
|
|
89
|
+
stdio: ['ignore', logFd, logFd],
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
child.unref();
|
|
93
|
+
closeSync(logFd);
|
|
94
|
+
|
|
95
|
+
console.log(
|
|
96
|
+
'✓ coze-coding-dev-sdk update triggered (running in background)',
|
|
97
|
+
);
|
|
98
|
+
console.log(` Log file: ${logFile}`);
|
|
99
|
+
} catch (error) {
|
|
100
|
+
console.error('✗ Failed to trigger coze-coding-dev-sdk update:', error);
|
|
101
|
+
console.log(' You can manually run: pnpm update coze-coding-dev-sdk');
|
|
102
|
+
}
|
|
103
|
+
},
|
|
47
104
|
};
|
|
48
105
|
|
|
49
106
|
export default config;
|
|
@@ -1,24 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "expo/tsconfig.base",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"skipLibCheck": true,
|
|
5
|
-
"jsx": "react-jsx",
|
|
6
|
-
"baseUrl": ".",
|
|
7
|
-
"strict": true,
|
|
8
|
-
"noEmit": true,
|
|
9
|
-
"paths": {
|
|
10
|
-
"@/*": ["./client/*"]
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
"include": ["**/*.ts", "**/*.tsx", ".expo/types/**/*.ts", "expo-env.d.ts"],
|
|
14
|
-
"exclude": [
|
|
15
|
-
"node_modules",
|
|
16
|
-
"**/*.spec.ts",
|
|
17
|
-
"**/*.test.ts",
|
|
18
|
-
"**/*.spec.tsx",
|
|
19
|
-
"**/*.test.tsx",
|
|
20
|
-
"dist",
|
|
21
|
-
"build",
|
|
22
|
-
"client/.expo"
|
|
23
|
-
]
|
|
24
|
-
}
|
|
1
|
+
{}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<meta name="description" content="扣子编程,你的 AI 开发伙伴已就位" />
|
|
7
|
+
<title>扣子编程 - AI 开发伙伴</title>
|
|
8
|
+
<link rel="stylesheet" href="/styles/main.css" />
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="app">
|
|
12
|
+
<main class="main-wrapper">
|
|
13
|
+
<div class="content-container">
|
|
14
|
+
<img
|
|
15
|
+
src="https://lf-coze-web-cdn.coze.cn/obj/eden-cn/lm-lgvj/ljhwZthlaukjlkulzlp/coze-coding/icon/coze-coding.gif"
|
|
16
|
+
alt="扣子编程 Logo"
|
|
17
|
+
class="logo-image"
|
|
18
|
+
/>
|
|
19
|
+
<div>
|
|
20
|
+
<div class="text-container">
|
|
21
|
+
<h1 class="heading">
|
|
22
|
+
应用开发中
|
|
23
|
+
</h1>
|
|
24
|
+
<p class="description">
|
|
25
|
+
请稍后,页面即将呈现
|
|
26
|
+
</p>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</main>
|
|
31
|
+
</div>
|
|
32
|
+
</body>
|
|
33
|
+
</html>
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/* ABOUTME: Main stylesheet for native-static template */
|
|
2
|
+
/* ABOUTME: Provides layout, typography, and theme styles without external dependencies */
|
|
3
|
+
|
|
4
|
+
/* Reset and base styles */
|
|
5
|
+
* {
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:root {
|
|
12
|
+
/* Light theme colors */
|
|
13
|
+
--background: #ffffff;
|
|
14
|
+
--foreground: #171717;
|
|
15
|
+
--muted-foreground: #71717a;
|
|
16
|
+
|
|
17
|
+
/* Spacing */
|
|
18
|
+
--spacing-2: 0.5rem;
|
|
19
|
+
--spacing-4: 1rem;
|
|
20
|
+
--spacing-16: 4rem;
|
|
21
|
+
--spacing-32: 8rem;
|
|
22
|
+
|
|
23
|
+
/* Typography */
|
|
24
|
+
--font-size-base: 1rem;
|
|
25
|
+
--font-size-sm: 0.875rem;
|
|
26
|
+
--line-height-tight: 1.25;
|
|
27
|
+
--line-height-relaxed: 2;
|
|
28
|
+
--letter-spacing-tight: -0.025em;
|
|
29
|
+
|
|
30
|
+
/* Transitions */
|
|
31
|
+
--transition-duration: 300ms;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Dark theme */
|
|
35
|
+
@media (prefers-color-scheme: dark) {
|
|
36
|
+
:root {
|
|
37
|
+
--background: #0a0a0a;
|
|
38
|
+
--foreground: #ededed;
|
|
39
|
+
--muted-foreground: #a1a1aa;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
body {
|
|
44
|
+
background: var(--background);
|
|
45
|
+
color: var(--foreground);
|
|
46
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
|
47
|
+
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
|
48
|
+
sans-serif;
|
|
49
|
+
-webkit-font-smoothing: antialiased;
|
|
50
|
+
-moz-osx-font-smoothing: grayscale;
|
|
51
|
+
margin: 0;
|
|
52
|
+
padding: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* App container */
|
|
56
|
+
#app {
|
|
57
|
+
display: flex;
|
|
58
|
+
height: 100%;
|
|
59
|
+
min-height: 100vh;
|
|
60
|
+
align-items: center;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Main content wrapper */
|
|
66
|
+
.main-wrapper {
|
|
67
|
+
display: flex;
|
|
68
|
+
width: 100%;
|
|
69
|
+
height: 100%;
|
|
70
|
+
max-width: 48rem;
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
padding-left: var(--spacing-16);
|
|
75
|
+
padding-right: var(--spacing-16);
|
|
76
|
+
padding-top: var(--spacing-32);
|
|
77
|
+
padding-bottom: var(--spacing-32);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* Content container */
|
|
81
|
+
.content-container {
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
align-items: center;
|
|
85
|
+
justify-content: space-between;
|
|
86
|
+
gap: var(--spacing-4);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Logo image */
|
|
90
|
+
.logo-image {
|
|
91
|
+
width: 156px;
|
|
92
|
+
height: 130px;
|
|
93
|
+
object-fit: contain;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Text container */
|
|
97
|
+
.text-container {
|
|
98
|
+
display: flex;
|
|
99
|
+
flex-direction: column;
|
|
100
|
+
align-items: center;
|
|
101
|
+
gap: var(--spacing-2);
|
|
102
|
+
text-align: center;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Heading */
|
|
106
|
+
.heading {
|
|
107
|
+
max-width: 36rem;
|
|
108
|
+
font-size: var(--font-size-base);
|
|
109
|
+
font-weight: 600;
|
|
110
|
+
line-height: var(--line-height-tight);
|
|
111
|
+
letter-spacing: var(--letter-spacing-tight);
|
|
112
|
+
color: var(--foreground);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* Description text */
|
|
116
|
+
.description {
|
|
117
|
+
max-width: 42rem;
|
|
118
|
+
font-size: var(--font-size-sm);
|
|
119
|
+
line-height: var(--line-height-relaxed);
|
|
120
|
+
color: var(--muted-foreground);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* Responsive design */
|
|
124
|
+
@media (max-width: 640px) {
|
|
125
|
+
.main-wrapper {
|
|
126
|
+
padding-left: 1rem;
|
|
127
|
+
padding-right: 1rem;
|
|
128
|
+
padding-top: 2rem;
|
|
129
|
+
padding-bottom: 2rem;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.logo-image {
|
|
133
|
+
width: 120px;
|
|
134
|
+
height: 100px;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
// start_aigc
|
|
7
|
+
const config = {
|
|
8
|
+
description:
|
|
9
|
+
'Native Static(纯静态):`coze init ${COZE_WORKSPACE_PATH} --template native-static`\n' +
|
|
10
|
+
'- 适用:纯静态 HTML/CSS/JS 项目、静态网站\n' +
|
|
11
|
+
'- 使用 Python http.server 作为开发服务器\n' +
|
|
12
|
+
'- 不需要 Node.js 环境,适合简单静态内容',
|
|
13
|
+
paramsSchema: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {},
|
|
16
|
+
required: [],
|
|
17
|
+
additionalProperties: false,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
// end_aigc
|
|
21
|
+
|
|
22
|
+
export default config;
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
requires = ["nodejs-24"]
|
|
3
3
|
|
|
4
4
|
[dev]
|
|
5
|
-
|
|
5
|
+
build = ["bash", "./scripts/prepare.sh"]
|
|
6
|
+
run = ["bash", "./scripts/dev.sh"]
|
|
6
7
|
deps = ["git"] # -> apt install git
|
|
7
8
|
|
|
8
9
|
[deploy]
|
|
9
|
-
build = ["
|
|
10
|
-
run = ["
|
|
10
|
+
build = ["bash","./scripts/build.sh"]
|
|
11
|
+
run = ["bash","./scripts/start.sh"]
|
|
11
12
|
deps = ["git"] # -> apt install git
|