@idealyst/cli 1.0.24 → 1.0.26

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 (48) hide show
  1. package/README.md +109 -109
  2. package/dist/index.js +233 -36
  3. package/dist/types/generators/api.d.ts +2 -0
  4. package/dist/types/generators/index.d.ts +1 -0
  5. package/dist/types/generators/utils.d.ts +18 -1
  6. package/dist/types/types.d.ts +2 -1
  7. package/package.json +1 -1
  8. package/templates/api/README.md +207 -0
  9. package/templates/api/env.example +12 -0
  10. package/templates/api/package.json +49 -0
  11. package/templates/api/prisma/schema.prisma +21 -0
  12. package/templates/api/src/context.ts +23 -0
  13. package/templates/api/src/controllers/UserController.ts +102 -0
  14. package/templates/api/src/index.ts +14 -0
  15. package/templates/api/src/lib/controller.ts +90 -0
  16. package/templates/api/src/lib/middleware.ts +170 -0
  17. package/templates/api/src/middleware/auth.ts +75 -0
  18. package/templates/api/src/middleware/common.ts +103 -0
  19. package/templates/api/src/router/index.ts +130 -0
  20. package/templates/api/src/server.ts +50 -0
  21. package/templates/api/src/trpc.ts +28 -0
  22. package/templates/api/tsconfig.json +44 -0
  23. package/templates/native/.yarnrc.yml +18 -18
  24. package/templates/native/App.tsx +23 -23
  25. package/templates/native/README.md +85 -85
  26. package/templates/native/app.json +4 -4
  27. package/templates/native/babel.config.js +9 -9
  28. package/templates/native/index.js +5 -5
  29. package/templates/native/metro.config.js +27 -27
  30. package/templates/native/package.json +9 -9
  31. package/templates/native/src/App-with-trpc.tsx +72 -0
  32. package/templates/native/src/utils/trpc.ts +127 -0
  33. package/templates/native/tsconfig.json +29 -29
  34. package/templates/shared/README.md +108 -108
  35. package/templates/shared/package.json +39 -39
  36. package/templates/shared/tsconfig.json +24 -24
  37. package/templates/web/README.md +89 -89
  38. package/templates/web/index.html +12 -12
  39. package/templates/web/package.json +55 -51
  40. package/templates/web/src/App-with-trpc.tsx +80 -0
  41. package/templates/web/src/App.tsx +14 -14
  42. package/templates/web/src/main.tsx +24 -24
  43. package/templates/web/src/utils/trpc.ts +93 -0
  44. package/templates/web/tsconfig.json +26 -26
  45. package/templates/web/vite.config.ts +68 -68
  46. package/templates/workspace/.yarnrc.yml +25 -25
  47. package/templates/workspace/README.md +79 -79
  48. package/templates/workspace/package.json +24 -24
@@ -1,109 +1,109 @@
1
- # {{projectName}}
2
-
3
- {{description}}
4
-
5
- ## Getting Started
6
-
7
- This is a shared library built with the Idealyst Framework that can be used across React Native and React web applications.
8
-
9
- ### Prerequisites
10
-
11
- - Node.js 18+
12
- - Yarn
13
-
14
- ### Installation
15
-
16
- Install dependencies:
17
- ```bash
18
- yarn install
19
- ```
20
-
21
- ### Development
22
-
23
- Build the library:
24
- ```bash
25
- yarn build
26
- ```
27
-
28
- Watch for changes during development:
29
- ```bash
30
- yarn dev
31
- ```
32
-
33
- ### Project Structure
34
-
35
- ```
36
- {{projectName}}/
37
- ├── src/
38
- │ ├── components/ # Shared components
39
- │ ├── utils/ # Utility functions
40
- │ ├── types/ # TypeScript types
41
- │ └── index.ts # Main export file
42
- ├── dist/ # Built library (generated)
43
- ├── rollup.config.js # Build configuration
44
- └── tsconfig.json # TypeScript configuration
45
- ```
46
-
47
- ### Features
48
-
49
- - **Cross-platform**: Works on both React Native and React web
50
- - **TypeScript**: Full type safety
51
- - **Tree-shakeable**: Optimized for bundle size
52
- - **Peer Dependencies**: Lightweight by design
53
- - **Idealyst Theme Integration**: Compatible with the Idealyst theming system
54
-
55
- ### Usage
56
-
57
- After building, you can import and use the library in your projects:
58
-
59
- ```tsx
60
- import { SharedComponent, toTitleCase, ComponentProps } from '{{packageName}}';
61
-
62
- // Use the shared component
63
- <SharedComponent
64
- title="Hello World"
65
- description="This works on both web and mobile!"
66
- />
67
-
68
- // Use utility functions
69
- const formatted = toTitleCase('hello world'); // "Hello World"
70
- ```
71
-
72
- ### Building for Production
73
-
74
- Build the library:
75
- ```bash
76
- yarn build
77
- ```
78
-
79
- This creates:
80
- - `dist/index.js` - CommonJS build
81
- - `dist/index.esm.js` - ES modules build
82
- - `dist/index.d.ts` - TypeScript declarations
83
-
84
- ### Publishing
85
-
86
- Before publishing, make sure to:
87
-
88
- 1. Update the version in `package.json`
89
- 2. Build the library: `yarn build`
90
- 3. Publish to npm: `npm publish`
91
-
92
- ### Development in Monorepo
93
-
94
- If you're using this in a monorepo, you can reference it directly:
95
-
96
- ```json
97
- {
98
- "dependencies": {
99
- "{{packageName}}": "workspace:*"
100
- }
101
- }
102
- ```
103
-
104
- ### Learn More
105
-
106
- - [Idealyst Framework Documentation](https://github.com/your-username/idealyst-framework)
107
- - [React Native Documentation](https://reactnative.dev/)
108
- - [React Documentation](https://react.dev/)
1
+ # {{projectName}}
2
+
3
+ {{description}}
4
+
5
+ ## Getting Started
6
+
7
+ This is a shared library built with the Idealyst Framework that can be used across React Native and React web applications.
8
+
9
+ ### Prerequisites
10
+
11
+ - Node.js 18+
12
+ - Yarn
13
+
14
+ ### Installation
15
+
16
+ Install dependencies:
17
+ ```bash
18
+ yarn install
19
+ ```
20
+
21
+ ### Development
22
+
23
+ Build the library:
24
+ ```bash
25
+ yarn build
26
+ ```
27
+
28
+ Watch for changes during development:
29
+ ```bash
30
+ yarn dev
31
+ ```
32
+
33
+ ### Project Structure
34
+
35
+ ```
36
+ {{projectName}}/
37
+ ├── src/
38
+ │ ├── components/ # Shared components
39
+ │ ├── utils/ # Utility functions
40
+ │ ├── types/ # TypeScript types
41
+ │ └── index.ts # Main export file
42
+ ├── dist/ # Built library (generated)
43
+ ├── rollup.config.js # Build configuration
44
+ └── tsconfig.json # TypeScript configuration
45
+ ```
46
+
47
+ ### Features
48
+
49
+ - **Cross-platform**: Works on both React Native and React web
50
+ - **TypeScript**: Full type safety
51
+ - **Tree-shakeable**: Optimized for bundle size
52
+ - **Peer Dependencies**: Lightweight by design
53
+ - **Idealyst Theme Integration**: Compatible with the Idealyst theming system
54
+
55
+ ### Usage
56
+
57
+ After building, you can import and use the library in your projects:
58
+
59
+ ```tsx
60
+ import { SharedComponent, toTitleCase, ComponentProps } from '{{packageName}}';
61
+
62
+ // Use the shared component
63
+ <SharedComponent
64
+ title="Hello World"
65
+ description="This works on both web and mobile!"
66
+ />
67
+
68
+ // Use utility functions
69
+ const formatted = toTitleCase('hello world'); // "Hello World"
70
+ ```
71
+
72
+ ### Building for Production
73
+
74
+ Build the library:
75
+ ```bash
76
+ yarn build
77
+ ```
78
+
79
+ This creates:
80
+ - `dist/index.js` - CommonJS build
81
+ - `dist/index.esm.js` - ES modules build
82
+ - `dist/index.d.ts` - TypeScript declarations
83
+
84
+ ### Publishing
85
+
86
+ Before publishing, make sure to:
87
+
88
+ 1. Update the version in `package.json`
89
+ 2. Build the library: `yarn build`
90
+ 3. Publish to npm: `npm publish`
91
+
92
+ ### Development in Monorepo
93
+
94
+ If you're using this in a monorepo, you can reference it directly:
95
+
96
+ ```json
97
+ {
98
+ "dependencies": {
99
+ "{{packageName}}": "workspace:*"
100
+ }
101
+ }
102
+ ```
103
+
104
+ ### Learn More
105
+
106
+ - [Idealyst Framework Documentation](https://github.com/your-username/idealyst-framework)
107
+ - [React Native Documentation](https://reactnative.dev/)
108
+ - [React Documentation](https://react.dev/)
109
109
  - [Rollup Documentation](https://rollupjs.org/)
@@ -1,40 +1,40 @@
1
- {
2
- "name": "{{packageName}}",
3
- "version": "{{version}}",
4
- "description": "{{description}}",
5
- "main": "src/index.ts",
6
- "module": "src/index.ts",
7
- "types": "src/index.ts",
8
- "peerDependencies": {
9
- "@idealyst/components": "^1.0.21",
10
- "@idealyst/navigation": "^1.0.21",
11
- "@idealyst/theme": "^1.0.21",
12
- "react": "^19.1.0",
13
- "react-native": "^0.80.1"
14
- },
15
- "peerDependenciesMeta": {
16
- "react-native": {
17
- "optional": true
18
- }
19
- },
20
- "devDependencies": {
21
- "@idealyst/components": "^1.0.21",
22
- "@idealyst/navigation": "^1.0.21",
23
- "@idealyst/theme": "^1.0.21",
24
- "@types/react": "^19.1.0",
25
- "react": "^19.1.0",
26
- "react-native": "^0.80.1",
27
- "typescript": "^5.0.0"
28
- },
29
- "files": [
30
- "dist",
31
- "src"
32
- ],
33
- "keywords": [
34
- "react",
35
- "react-native",
36
- "cross-platform",
37
- "shared",
38
- "library"
39
- ]
1
+ {
2
+ "name": "{{packageName}}",
3
+ "version": "{{version}}",
4
+ "description": "{{description}}",
5
+ "main": "src/index.ts",
6
+ "module": "src/index.ts",
7
+ "types": "src/index.ts",
8
+ "peerDependencies": {
9
+ "@idealyst/components": "^1.0.21",
10
+ "@idealyst/navigation": "^1.0.21",
11
+ "@idealyst/theme": "^1.0.21",
12
+ "react": "^19.1.0",
13
+ "react-native": "^0.80.1"
14
+ },
15
+ "peerDependenciesMeta": {
16
+ "react-native": {
17
+ "optional": true
18
+ }
19
+ },
20
+ "devDependencies": {
21
+ "@idealyst/components": "^1.0.21",
22
+ "@idealyst/navigation": "^1.0.21",
23
+ "@idealyst/theme": "^1.0.21",
24
+ "@types/react": "^19.1.0",
25
+ "react": "^19.1.0",
26
+ "react-native": "^0.80.1",
27
+ "typescript": "^5.0.0"
28
+ },
29
+ "files": [
30
+ "dist",
31
+ "src"
32
+ ],
33
+ "keywords": [
34
+ "react",
35
+ "react-native",
36
+ "cross-platform",
37
+ "shared",
38
+ "library"
39
+ ]
40
40
  }
@@ -1,25 +1,25 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "ESNext",
5
- "lib": ["ES2020"],
6
- "moduleResolution": "node",
7
- "esModuleInterop": true,
8
- "allowSyntheticDefaultImports": true,
9
- "strict": true,
10
- "skipLibCheck": true,
11
- "forceConsistentCasingInFileNames": true,
12
- "declaration": true,
13
- "declarationDir": "./dist",
14
- "outDir": "./dist",
15
- "rootDir": "./src",
16
- "jsx": "react-jsx"
17
- },
18
- "include": [
19
- "src/**/*"
20
- ],
21
- "exclude": [
22
- "node_modules",
23
- "dist"
24
- ]
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "module": "ESNext",
5
+ "lib": ["ES2020"],
6
+ "moduleResolution": "node",
7
+ "esModuleInterop": true,
8
+ "allowSyntheticDefaultImports": true,
9
+ "strict": true,
10
+ "skipLibCheck": true,
11
+ "forceConsistentCasingInFileNames": true,
12
+ "declaration": true,
13
+ "declarationDir": "./dist",
14
+ "outDir": "./dist",
15
+ "rootDir": "./src",
16
+ "jsx": "react-jsx"
17
+ },
18
+ "include": [
19
+ "src/**/*"
20
+ ],
21
+ "exclude": [
22
+ "node_modules",
23
+ "dist"
24
+ ]
25
25
  }
@@ -1,90 +1,90 @@
1
- # {{projectName}}
2
-
3
- {{description}}
4
-
5
- ## Getting Started
6
-
7
- This is a React web application built with the Idealyst Framework and Vite.
8
-
9
- ### Prerequisites
10
-
11
- - Node.js 18+
12
- - Yarn
13
-
14
- ### Installation
15
-
16
- Install dependencies:
17
- ```bash
18
- yarn install
19
- ```
20
-
21
- ### Development
22
-
23
- Start the development server:
24
- ```bash
25
- yarn dev
26
- ```
27
-
28
- The app will be available at `http://localhost:3000`
29
-
30
- ### Building for Production
31
-
32
- Build the app:
33
- ```bash
34
- yarn build
35
- ```
36
-
37
- Preview the production build:
38
- ```bash
39
- yarn preview
40
- ```
41
-
42
- ### Project Structure
43
-
44
- ```
45
- {{projectName}}/
46
- ├── src/
47
- │ ├── App.tsx # Main app component
48
- │ └── main.tsx # App entry point
49
- ├── index.html # HTML template
50
- ├── vite.config.ts # Vite configuration
51
- └── tsconfig.json # TypeScript configuration
52
- ```
53
-
54
- ### Features
55
-
56
- - **Idealyst Components**: Cross-platform UI components
57
- - **Idealyst Navigation**: Consistent navigation system
58
- - **Idealyst Theme**: Unified theming across platforms
59
- - **React 19.1**: Latest React version
60
- - **Vite**: Fast build tool and dev server
61
- - **TypeScript**: Full type safety
62
- - **React Native Web**: Use React Native components on the web
63
-
64
- ### Development
65
-
66
- The app uses the Idealyst Framework for consistent UI and navigation that works across web and mobile platforms.
67
-
68
- Edit `src/App.tsx` to start building your application.
69
-
70
- ### Styling
71
-
72
- The app uses Unistyles for cross-platform styling. You can create styles that work on both web and mobile:
73
-
74
- ```tsx
75
- import { createStyleSheet } from 'react-native-unistyles';
76
-
77
- const styles = createStyleSheet({
78
- container: {
79
- flex: 1,
80
- justifyContent: 'center',
81
- alignItems: 'center'
82
- }
83
- });
84
- ```
85
-
86
- ### Learn More
87
-
88
- - [Idealyst Framework Documentation](https://github.com/your-username/idealyst-framework)
89
- - [React Documentation](https://react.dev/)
1
+ # {{projectName}}
2
+
3
+ {{description}}
4
+
5
+ ## Getting Started
6
+
7
+ This is a React web application built with the Idealyst Framework and Vite.
8
+
9
+ ### Prerequisites
10
+
11
+ - Node.js 18+
12
+ - Yarn
13
+
14
+ ### Installation
15
+
16
+ Install dependencies:
17
+ ```bash
18
+ yarn install
19
+ ```
20
+
21
+ ### Development
22
+
23
+ Start the development server:
24
+ ```bash
25
+ yarn dev
26
+ ```
27
+
28
+ The app will be available at `http://localhost:3000`
29
+
30
+ ### Building for Production
31
+
32
+ Build the app:
33
+ ```bash
34
+ yarn build
35
+ ```
36
+
37
+ Preview the production build:
38
+ ```bash
39
+ yarn preview
40
+ ```
41
+
42
+ ### Project Structure
43
+
44
+ ```
45
+ {{projectName}}/
46
+ ├── src/
47
+ │ ├── App.tsx # Main app component
48
+ │ └── main.tsx # App entry point
49
+ ├── index.html # HTML template
50
+ ├── vite.config.ts # Vite configuration
51
+ └── tsconfig.json # TypeScript configuration
52
+ ```
53
+
54
+ ### Features
55
+
56
+ - **Idealyst Components**: Cross-platform UI components
57
+ - **Idealyst Navigation**: Consistent navigation system
58
+ - **Idealyst Theme**: Unified theming across platforms
59
+ - **React 19.1**: Latest React version
60
+ - **Vite**: Fast build tool and dev server
61
+ - **TypeScript**: Full type safety
62
+ - **React Native Web**: Use React Native components on the web
63
+
64
+ ### Development
65
+
66
+ The app uses the Idealyst Framework for consistent UI and navigation that works across web and mobile platforms.
67
+
68
+ Edit `src/App.tsx` to start building your application.
69
+
70
+ ### Styling
71
+
72
+ The app uses Unistyles for cross-platform styling. You can create styles that work on both web and mobile:
73
+
74
+ ```tsx
75
+ import { createStyleSheet } from 'react-native-unistyles';
76
+
77
+ const styles = createStyleSheet({
78
+ container: {
79
+ flex: 1,
80
+ justifyContent: 'center',
81
+ alignItems: 'center'
82
+ }
83
+ });
84
+ ```
85
+
86
+ ### Learn More
87
+
88
+ - [Idealyst Framework Documentation](https://github.com/your-username/idealyst-framework)
89
+ - [React Documentation](https://react.dev/)
90
90
  - [Vite Documentation](https://vitejs.dev/)
@@ -1,13 +1,13 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>{{projectName}}</title>
8
- </head>
9
- <body>
10
- <div id="root"></div>
11
- <script type="module" src="/src/main.tsx"></script>
12
- </body>
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>{{projectName}}</title>
8
+ </head>
9
+ <body>
10
+ <div id="root"></div>
11
+ <script type="module" src="/src/main.tsx"></script>
12
+ </body>
13
13
  </html>
@@ -1,52 +1,56 @@
1
- {
2
- "name": "{{packageName}}",
3
- "version": "{{version}}",
4
- "description": "{{description}}",
5
- "private": true,
6
- "type": "module",
7
- "scripts": {
8
- "dev": "vite",
9
- "build": "tsc && vite build",
10
- "preview": "vite preview"
11
- },
12
- "dependencies": {
13
- "@idealyst/components": "^1.0.3",
14
- "@idealyst/navigation": "^1.0.3",
15
- "@idealyst/theme": "^1.0.3",
16
- "@mdi/js": "^7.4.47",
17
- "@mdi/react": "^1.6.1",
18
- "@react-native/normalize-colors": "^0.80.1",
19
- "@types/react-router-dom": "^5.3.3",
20
- "compression": "^1.7.4",
21
- "express": "^4.18.2",
22
- "react": "^19.1.0",
23
- "react-dom": "^19.1.0",
24
- "react-native": "^0.80.1",
25
- "react-native-edge-to-edge": "^1.6.2",
26
- "react-native-nitro-modules": "0.26.3",
27
- "react-native-unistyles": "^3.0.4",
28
- "react-native-web": "^0.20.0",
29
- "react-router": "^7.6.3",
30
- "react-router-dom": "^7.6.3",
31
- "sirv": "^2.0.4"
32
- },
33
- "devDependencies": {
34
- "@babel/core": "^7.28.0",
35
- "@babel/preset-env": "^7.28.0",
36
- "@babel/preset-react": "^7.27.1",
37
- "@babel/preset-typescript": "^7.27.1",
38
- "@types/compression": "^1.7.5",
39
- "@types/express": "^4.17.21",
40
- "@types/react": "^19.1.0",
41
- "@types/react-dom": "^19.1.0",
42
- "@typescript-eslint/eslint-plugin": "^7.2.0",
43
- "@typescript-eslint/parser": "^7.2.0",
44
- "@vitejs/plugin-react": "^4.6.0",
45
- "eslint": "^8.57.0",
46
- "eslint-plugin-react-hooks": "^4.6.0",
47
- "eslint-plugin-react-refresh": "^0.4.6",
48
- "typescript": "^5.2.2",
49
- "vite": "^5.2.0",
50
- "vite-plugin-babel": "^1.3.2"
51
- }
1
+ {
2
+ "name": "{{packageName}}",
3
+ "version": "{{version}}",
4
+ "description": "{{description}}",
5
+ "private": true,
6
+ "type": "module",
7
+ "scripts": {
8
+ "dev": "vite",
9
+ "build": "tsc && vite build",
10
+ "preview": "vite preview"
11
+ },
12
+ "dependencies": {
13
+ "@idealyst/components": "^1.0.3",
14
+ "@idealyst/navigation": "^1.0.3",
15
+ "@idealyst/theme": "^1.0.3",
16
+ "@mdi/js": "^7.4.47",
17
+ "@mdi/react": "^1.6.1",
18
+ "@react-native/normalize-colors": "^0.80.1",
19
+ "@tanstack/react-query": "^5.83.0",
20
+ "@trpc/client": "^11.4.3",
21
+ "@trpc/react-query": "^11.4.3",
22
+ "@trpc/server": "^11.4.3",
23
+ "@types/react-router-dom": "^5.3.3",
24
+ "compression": "^1.7.4",
25
+ "express": "^4.18.2",
26
+ "react": "^19.1.0",
27
+ "react-dom": "^19.1.0",
28
+ "react-native": "^0.80.1",
29
+ "react-native-edge-to-edge": "^1.6.2",
30
+ "react-native-nitro-modules": "0.26.3",
31
+ "react-native-unistyles": "^3.0.4",
32
+ "react-native-web": "^0.20.0",
33
+ "react-router": "^7.6.3",
34
+ "react-router-dom": "^7.6.3",
35
+ "sirv": "^2.0.4"
36
+ },
37
+ "devDependencies": {
38
+ "@babel/core": "^7.28.0",
39
+ "@babel/preset-env": "^7.28.0",
40
+ "@babel/preset-react": "^7.27.1",
41
+ "@babel/preset-typescript": "^7.27.1",
42
+ "@types/compression": "^1.7.5",
43
+ "@types/express": "^4.17.21",
44
+ "@types/react": "^19.1.0",
45
+ "@types/react-dom": "^19.1.0",
46
+ "@typescript-eslint/eslint-plugin": "^7.2.0",
47
+ "@typescript-eslint/parser": "^7.2.0",
48
+ "@vitejs/plugin-react": "^4.6.0",
49
+ "eslint": "^8.57.0",
50
+ "eslint-plugin-react-hooks": "^4.6.0",
51
+ "eslint-plugin-react-refresh": "^0.4.6",
52
+ "typescript": "^5.2.2",
53
+ "vite": "^5.2.0",
54
+ "vite-plugin-babel": "^1.3.2"
55
+ }
52
56
  }