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

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 (74) hide show
  1. package/lib/__templates__/expo/.coze +7 -2
  2. package/lib/__templates__/expo/.cozeproj/scripts/dev_build.sh +46 -0
  3. package/lib/__templates__/expo/.cozeproj/scripts/dev_run.sh +220 -0
  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 +75 -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 +786 -50
  16. package/lib/__templates__/expo/client/contexts/AuthContext.tsx +14 -107
  17. package/lib/__templates__/expo/client/hooks/useColorScheme.ts +34 -1
  18. package/lib/__templates__/expo/client/hooks/useTheme.ts +1 -1
  19. package/lib/__templates__/expo/client/metro.config.js +121 -0
  20. package/lib/__templates__/expo/client/package.json +93 -0
  21. package/lib/__templates__/expo/client/screens/home/index.tsx +13 -42
  22. package/lib/__templates__/expo/client/screens/home/styles.ts +19 -323
  23. package/lib/__templates__/expo/client/tsconfig.json +24 -0
  24. package/lib/__templates__/expo/client/utils/index.ts +1 -2
  25. package/lib/__templates__/expo/package.json +13 -101
  26. package/lib/__templates__/expo/pnpm-lock.yaml +527 -861
  27. package/lib/__templates__/expo/pnpm-workspace.yaml +3 -0
  28. package/lib/__templates__/expo/server/package.json +32 -0
  29. package/lib/__templates__/expo/{src → server/src}/index.ts +8 -2
  30. package/lib/__templates__/expo/server/tsconfig.json +24 -0
  31. package/lib/__templates__/expo/template.config.js +2 -1
  32. package/lib/__templates__/expo/tsconfig.json +1 -24
  33. package/lib/__templates__/nextjs/.coze +4 -3
  34. package/lib/__templates__/nextjs/_npmrc +2 -1
  35. package/lib/__templates__/nextjs/next.config.ts +12 -0
  36. package/lib/__templates__/nextjs/package.json +11 -4
  37. package/lib/__templates__/nextjs/pnpm-lock.yaml +2505 -1116
  38. package/lib/__templates__/nextjs/scripts/dev.sh +8 -27
  39. package/lib/__templates__/nextjs/scripts/prepare.sh +9 -0
  40. package/lib/__templates__/nextjs/src/app/globals.css +109 -89
  41. package/lib/__templates__/nextjs/src/app/layout.tsx +19 -34
  42. package/lib/__templates__/nextjs/src/app/page.tsx +33 -21
  43. package/lib/__templates__/nextjs/src/components/ui/resizable.tsx +29 -22
  44. package/lib/__templates__/nextjs/src/components/ui/sidebar.tsx +228 -230
  45. package/lib/__templates__/nextjs/template.config.js +31 -1
  46. package/lib/__templates__/templates.json +61 -36
  47. package/lib/__templates__/vite/.coze +4 -3
  48. package/lib/__templates__/vite/README.md +204 -26
  49. package/lib/__templates__/vite/_npmrc +2 -1
  50. package/lib/__templates__/vite/eslint.config.mjs +9 -0
  51. package/lib/__templates__/vite/package.json +6 -2
  52. package/lib/__templates__/vite/pnpm-lock.yaml +3486 -19
  53. package/lib/__templates__/vite/scripts/dev.sh +7 -26
  54. package/lib/__templates__/vite/scripts/prepare.sh +9 -0
  55. package/lib/__templates__/vite/template.config.js +38 -5
  56. package/lib/__templates__/vite/vite.config.ts +3 -3
  57. package/lib/cli.js +611 -314
  58. package/package.json +10 -4
  59. package/lib/__templates__/expo/.cozeproj/scripts/deploy_build.sh +0 -109
  60. package/lib/__templates__/expo/.cozeproj/scripts/deploy_run.sh +0 -257
  61. package/lib/__templates__/expo/app.json +0 -63
  62. package/lib/__templates__/expo/babel.config.js +0 -9
  63. package/lib/__templates__/expo/client/app/(tabs)/_layout.tsx +0 -43
  64. package/lib/__templates__/expo/client/app/(tabs)/home.tsx +0 -1
  65. package/lib/__templates__/expo/client/app/(tabs)/index.tsx +0 -7
  66. package/lib/__templates__/expo/client/app/+not-found.tsx +0 -79
  67. package/lib/__templates__/expo/client/index.js +0 -12
  68. package/lib/__templates__/expo/metro.config.js +0 -53
  69. package/lib/__templates__/nextjs/.babelrc +0 -15
  70. package/lib/__templates__/nextjs/.vscode/settings.json +0 -121
  71. package/lib/__templates__/nextjs/server.mjs +0 -50
  72. package/lib/__templates__/vite/.vscode/settings.json +0 -7
  73. /package/lib/__templates__/expo/{eslint-formatter-simple.mjs → client/eslint-formatter-simple.mjs} +0 -0
  74. /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,32 @@
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
+ "cors": "^2.8.5",
14
+ "coze-coding-dev-sdk": "^0.7.2",
15
+ "dayjs": "^1.11.19",
16
+ "drizzle-orm": "^0.45.1",
17
+ "drizzle-zod": "^0.8.3",
18
+ "multer": "^2.0.2",
19
+ "pg": "^8.16.3",
20
+ "zod": "^4.2.1"
21
+ },
22
+ "devDependencies": {
23
+ "@types/cors": "^2.8.19",
24
+ "@types/express": "^5.0.6",
25
+ "tsx": "^4.21.0",
26
+ "@types/multer": "^2.0.0",
27
+ "@types/pg": "^8.16.0",
28
+ "esbuild": "0.27.2",
29
+ "typescript": "^5.8.3",
30
+ "drizzle-kit": "^0.31.8"
31
+ }
32
+ }
@@ -1,12 +1,18 @@
1
1
  import express from "express";
2
+ import cors from "cors";
2
3
 
3
4
  const app = express();
4
5
  const port = process.env.PORT || 9091;
5
6
 
6
- app.get('/api/hello', (req, res) => {
7
- res.status(200).json({ message: 'hello world' });
7
+ // Middleware
8
+ app.use(cors());
9
+ app.use(express.json());
10
+
11
+ app.get('/api/v1/health', (req, res) => {
12
+ res.status(200).json({ status: 'ok' });
8
13
  });
9
14
 
15
+
10
16
  app.listen(port, () => {
11
17
  console.log(`Server listening at http://localhost:${port}/`);
12
18
  });
@@ -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
+ }
@@ -29,9 +29,10 @@ export const paramsSchema = {
29
29
  };
30
30
 
31
31
  const config = {
32
+ description: 'Expo template for React Native applications',
32
33
  paramsSchema,
33
34
  defaultParams: {
34
- port: 8081,
35
+ port: 9090,
35
36
  appName: 'my-expo-app',
36
37
  },
37
38
  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,11 @@
2
2
  requires = ["nodejs-24"]
3
3
 
4
4
  [dev]
5
- run = ["npm", "run", "dev"]
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 = ["npm", "run", "build"]
10
- run = ["npm", "run", "start"]
10
+ build = ["bash","./scripts/build.sh"]
11
+ run = ["bash","./scripts/start.sh"]
11
12
  deps = ["git"] # -> apt install git
@@ -1,4 +1,5 @@
1
- registry=https://registry.npmjs.org
1
+ loglevel=error
2
+ registry=https://registry.npmmirror.com
2
3
 
3
4
  strictStorePkgContentCheck=false
4
5
  verifyStoreIntegrity=false
@@ -1,7 +1,19 @@
1
1
  import type { NextConfig } from 'next';
2
+ import path from 'path';
2
3
 
3
4
  const nextConfig: NextConfig = {
5
+ outputFileTracingRoot: path.resolve(__dirname, '../../'),
4
6
  /* config options here */
7
+ allowedDevOrigins: ['*.dev.coze.site'],
8
+ images: {
9
+ remotePatterns: [
10
+ {
11
+ protocol: 'https',
12
+ hostname: 'lf3-static.bytednsdoc.com',
13
+ pathname: '/**',
14
+ },
15
+ ],
16
+ },
5
17
  };
6
18
 
7
19
  export default nextConfig;
@@ -7,9 +7,12 @@
7
7
  "dev": "bash ./scripts/dev.sh",
8
8
  "preinstall": "npx only-allow pnpm",
9
9
  "lint": "eslint",
10
- "start": "bash ./scripts/start.sh"
10
+ "start": "bash ./scripts/start.sh",
11
+ "ts-check": "tsc -p tsconfig.json"
11
12
  },
12
13
  "dependencies": {
14
+ "@aws-sdk/client-s3": "^3.958.0",
15
+ "@aws-sdk/lib-storage": "^3.958.0",
13
16
  "@hookform/resolvers": "^5.2.2",
14
17
  "@radix-ui/react-accordion": "^1.2.12",
15
18
  "@radix-ui/react-alert-dialog": "^1.1.15",
@@ -40,12 +43,17 @@
40
43
  "class-variance-authority": "^0.7.1",
41
44
  "clsx": "^2.1.1",
42
45
  "cmdk": "^1.1.1",
46
+ "coze-coding-dev-sdk": "^0.7.0",
43
47
  "date-fns": "^4.1.0",
48
+ "drizzle-kit": "^0.31.8",
49
+ "drizzle-orm": "^0.45.1",
50
+ "drizzle-zod": "^0.8.3",
44
51
  "embla-carousel-react": "^8.6.0",
45
52
  "input-otp": "^1.4.2",
46
53
  "lucide-react": "^0.468.0",
47
54
  "next": "16.1.1",
48
55
  "next-themes": "^0.4.6",
56
+ "pg": "^8.16.3",
49
57
  "react": "19.2.3",
50
58
  "react-day-picker": "^9.13.0",
51
59
  "react-dom": "19.2.3",
@@ -54,20 +62,19 @@
54
62
  "recharts": "2.15.4",
55
63
  "sonner": "^2.0.7",
56
64
  "tailwind-merge": "^2.6.0",
65
+ "tw-animate-css": "^1.4.0",
57
66
  "vaul": "^1.1.2",
58
67
  "zod": "^4.3.5"
59
68
  },
60
69
  "devDependencies": {
61
- "@react-dev-inspector/babel-plugin": "^2.0.1",
62
- "@react-dev-inspector/middleware": "^2.0.1",
63
70
  "@tailwindcss/postcss": "^4",
64
71
  "@types/node": "^20",
72
+ "@types/pg": "^8.16.0",
65
73
  "@types/react": "^19",
66
74
  "@types/react-dom": "^19",
67
75
  "eslint": "^9",
68
76
  "eslint-config-next": "16.1.1",
69
77
  "only-allow": "^1.2.2",
70
- "react-dev-inspector": "^2.0.1",
71
78
  "shadcn": "latest",
72
79
  "tailwindcss": "^4",
73
80
  "typescript": "^5"