@coze-arch/cli 0.0.1-alpha.912cd5 → 0.0.1-alpha.9c9bba

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 (64) hide show
  1. package/lib/__templates__/expo/.coze +7 -2
  2. package/lib/__templates__/expo/.cozeproj/scripts/dev_build.sh +86 -0
  3. package/lib/__templates__/expo/.cozeproj/scripts/{deploy_run.sh → dev_run.sh} +45 -63
  4. package/lib/__templates__/expo/.cozeproj/scripts/prod_build.sh +47 -0
  5. package/lib/__templates__/expo/.cozeproj/scripts/prod_run.sh +34 -0
  6. package/lib/__templates__/expo/README.md +66 -7
  7. package/lib/__templates__/expo/_gitignore +1 -1
  8. package/lib/__templates__/expo/_npmrc +3 -5
  9. package/lib/__templates__/expo/client/app/_layout.tsx +1 -1
  10. package/lib/__templates__/expo/client/app/home.tsx +1 -0
  11. package/lib/__templates__/expo/client/app/index.tsx +1 -0
  12. package/lib/__templates__/expo/client/app.config.ts +71 -0
  13. package/lib/__templates__/expo/client/components/ThemedText.tsx +33 -0
  14. package/lib/__templates__/expo/client/components/ThemedView.tsx +38 -0
  15. package/lib/__templates__/expo/client/constants/theme.ts +779 -47
  16. package/lib/__templates__/expo/client/contexts/AuthContext.tsx +14 -107
  17. package/lib/__templates__/expo/client/hooks/useTheme.ts +1 -1
  18. package/lib/__templates__/expo/client/metro.config.js +121 -0
  19. package/lib/__templates__/expo/client/package.json +92 -0
  20. package/lib/__templates__/expo/client/screens/home/index.tsx +1 -5
  21. package/lib/__templates__/expo/client/screens/home/styles.ts +1 -273
  22. package/lib/__templates__/expo/client/tsconfig.json +24 -0
  23. package/lib/__templates__/expo/client/utils/index.ts +1 -2
  24. package/lib/__templates__/expo/package.json +13 -101
  25. package/lib/__templates__/expo/pnpm-lock.yaml +475 -861
  26. package/lib/__templates__/expo/pnpm-workspace.yaml +3 -0
  27. package/lib/__templates__/expo/server/package.json +30 -0
  28. package/lib/__templates__/expo/{src → server/src}/index.ts +2 -2
  29. package/lib/__templates__/expo/server/tsconfig.json +24 -0
  30. package/lib/__templates__/expo/template.config.js +1 -1
  31. package/lib/__templates__/expo/tsconfig.json +1 -24
  32. package/lib/__templates__/nextjs/.coze +3 -3
  33. package/lib/__templates__/nextjs/_npmrc +1 -1
  34. package/lib/__templates__/nextjs/next.config.ts +1 -0
  35. package/lib/__templates__/nextjs/package.json +9 -3
  36. package/lib/__templates__/nextjs/pnpm-lock.yaml +2501 -1120
  37. package/lib/__templates__/nextjs/scripts/dev.sh +8 -27
  38. package/lib/__templates__/nextjs/src/app/globals.css +99 -87
  39. package/lib/__templates__/nextjs/src/app/layout.tsx +18 -22
  40. package/lib/__templates__/nextjs/template.config.js +1 -1
  41. package/lib/__templates__/templates.json +7 -0
  42. package/lib/__templates__/vite/.coze +3 -3
  43. package/lib/__templates__/vite/README.md +204 -26
  44. package/lib/__templates__/vite/_npmrc +1 -1
  45. package/lib/__templates__/vite/package.json +1 -1
  46. package/lib/__templates__/vite/pnpm-lock.yaml +120 -120
  47. package/lib/__templates__/vite/scripts/dev.sh +7 -26
  48. package/lib/__templates__/vite/template.config.js +10 -1
  49. package/lib/__templates__/vite/vite.config.ts +3 -3
  50. package/lib/cli.js +567 -294
  51. package/package.json +10 -4
  52. package/lib/__templates__/expo/.cozeproj/scripts/deploy_build.sh +0 -109
  53. package/lib/__templates__/expo/app.json +0 -63
  54. package/lib/__templates__/expo/babel.config.js +0 -9
  55. package/lib/__templates__/expo/client/app/(tabs)/_layout.tsx +0 -43
  56. package/lib/__templates__/expo/client/app/(tabs)/home.tsx +0 -1
  57. package/lib/__templates__/expo/client/app/(tabs)/index.tsx +0 -7
  58. package/lib/__templates__/expo/client/app/+not-found.tsx +0 -79
  59. package/lib/__templates__/expo/client/index.js +0 -12
  60. package/lib/__templates__/expo/metro.config.js +0 -53
  61. package/lib/__templates__/nextjs/.babelrc +0 -15
  62. package/lib/__templates__/nextjs/server.mjs +0 -50
  63. /package/lib/__templates__/expo/{eslint-formatter-simple.mjs → client/eslint-formatter-simple.mjs} +0 -0
  64. /package/lib/__templates__/expo/{eslint.config.mjs → client/eslint.config.mjs} +0 -0
@@ -0,0 +1,3 @@
1
+ packages:
2
+ - client
3
+ - server
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "server",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "preinstall": "npx only-allow pnpm",
7
+ "dev": "NODE_ENV=development tsx ./src/index.ts",
8
+ "build": "pnpm exec esbuild src/index.ts --platform=node --packages=external --bundle --format=esm --outdir=dist",
9
+ "start": "NODE_ENV=production PORT=${PORT:-5000} node dist/index.js"
10
+ },
11
+ "dependencies": {
12
+ "express": "^4.22.1",
13
+ "coze-coding-dev-sdk": "^0.5.5",
14
+ "dayjs": "^1.11.19",
15
+ "drizzle-orm": "^0.45.1",
16
+ "drizzle-zod": "^0.8.3",
17
+ "multer": "^2.0.2",
18
+ "pg": "^8.16.3",
19
+ "zod": "^4.2.1"
20
+ },
21
+ "devDependencies": {
22
+ "@types/express": "^5.0.6",
23
+ "tsx": "^4.21.0",
24
+ "@types/multer": "^2.0.0",
25
+ "@types/pg": "^8.16.0",
26
+ "esbuild": "0.27.2",
27
+ "typescript": "^5.8.3",
28
+ "drizzle-kit": "^0.31.8"
29
+ }
30
+ }
@@ -3,8 +3,8 @@ import express from "express";
3
3
  const app = express();
4
4
  const port = process.env.PORT || 9091;
5
5
 
6
- app.get('/api/hello', (req, res) => {
7
- res.status(200).json({ message: 'hello world' });
6
+ app.get('/api/v1/ping', (req, res) => {
7
+ res.status(200).json({ message: 'connected' });
8
8
  });
9
9
 
10
10
  app.listen(port, () => {
@@ -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
+ }
@@ -31,7 +31,7 @@ export const paramsSchema = {
31
31
  const config = {
32
32
  paramsSchema,
33
33
  defaultParams: {
34
- port: 8081,
34
+ port: 9090,
35
35
  appName: 'my-expo-app',
36
36
  },
37
37
  onBeforeRender: async context => {
@@ -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
+ {}
@@ -2,10 +2,10 @@
2
2
  requires = ["nodejs-24"]
3
3
 
4
4
  [dev]
5
- run = ["npm", "run", "dev"]
5
+ run = ["bash", "./scripts/dev.sh"]
6
6
  deps = ["git"] # -> apt install git
7
7
 
8
8
  [deploy]
9
- build = ["npm", "run", "build"]
10
- run = ["npm", "run", "start"]
9
+ build = ["bash","./scripts/build.sh"]
10
+ run = ["bash","./scripts/start.sh"]
11
11
  deps = ["git"] # -> apt install git
@@ -1,4 +1,4 @@
1
- registry=https://registry.npmjs.org
1
+ registry=https://registry.npmmirror.com
2
2
 
3
3
  strictStorePkgContentCheck=false
4
4
  verifyStoreIntegrity=false
@@ -2,6 +2,7 @@ import type { NextConfig } from 'next';
2
2
 
3
3
  const nextConfig: NextConfig = {
4
4
  /* config options here */
5
+ allowedDevOrigins: ['*.dev.coze.site'],
5
6
  };
6
7
 
7
8
  export default nextConfig;
@@ -10,6 +10,8 @@
10
10
  "start": "bash ./scripts/start.sh"
11
11
  },
12
12
  "dependencies": {
13
+ "@aws-sdk/client-s3": "^3.958.0",
14
+ "@aws-sdk/lib-storage": "^3.958.0",
13
15
  "@hookform/resolvers": "^5.2.2",
14
16
  "@radix-ui/react-accordion": "^1.2.12",
15
17
  "@radix-ui/react-alert-dialog": "^1.1.15",
@@ -40,12 +42,17 @@
40
42
  "class-variance-authority": "^0.7.1",
41
43
  "clsx": "^2.1.1",
42
44
  "cmdk": "^1.1.1",
45
+ "coze-coding-dev-sdk": "^0.5.2",
43
46
  "date-fns": "^4.1.0",
47
+ "drizzle-kit": "^0.31.8",
48
+ "drizzle-orm": "^0.45.1",
49
+ "drizzle-zod": "^0.8.3",
44
50
  "embla-carousel-react": "^8.6.0",
45
51
  "input-otp": "^1.4.2",
46
52
  "lucide-react": "^0.468.0",
47
53
  "next": "16.1.1",
48
54
  "next-themes": "^0.4.6",
55
+ "pg": "^8.16.3",
49
56
  "react": "19.2.3",
50
57
  "react-day-picker": "^9.13.0",
51
58
  "react-dom": "19.2.3",
@@ -54,20 +61,19 @@
54
61
  "recharts": "2.15.4",
55
62
  "sonner": "^2.0.7",
56
63
  "tailwind-merge": "^2.6.0",
64
+ "tw-animate-css": "^1.4.0",
57
65
  "vaul": "^1.1.2",
58
66
  "zod": "^4.3.5"
59
67
  },
60
68
  "devDependencies": {
61
- "@react-dev-inspector/babel-plugin": "^2.0.1",
62
- "@react-dev-inspector/middleware": "^2.0.1",
63
69
  "@tailwindcss/postcss": "^4",
64
70
  "@types/node": "^20",
71
+ "@types/pg": "^8.16.0",
65
72
  "@types/react": "^19",
66
73
  "@types/react-dom": "^19",
67
74
  "eslint": "^9",
68
75
  "eslint-config-next": "16.1.1",
69
76
  "only-allow": "^1.2.2",
70
- "react-dev-inspector": "^2.0.1",
71
77
  "shadcn": "latest",
72
78
  "tailwindcss": "^4",
73
79
  "typescript": "^5"