@idealyst/cli 1.2.0 → 1.2.3
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/dist/commands/add.js +233 -0
- package/dist/commands/add.js.map +1 -0
- package/dist/commands/index.js +13 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/info.js +193 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/init.js +155 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/constants.js +125 -0
- package/dist/constants.js.map +1 -0
- package/dist/generators/core/index.js +23 -0
- package/dist/generators/core/index.js.map +1 -0
- package/dist/generators/core/mobile.js +251 -0
- package/dist/generators/core/mobile.js.map +1 -0
- package/dist/generators/core/shared.js +474 -0
- package/dist/generators/core/shared.js.map +1 -0
- package/dist/generators/core/web.js +330 -0
- package/dist/generators/core/web.js.map +1 -0
- package/dist/generators/extensions/api.js +223 -0
- package/dist/generators/extensions/api.js.map +1 -0
- package/dist/generators/extensions/devcontainer.js +575 -0
- package/dist/generators/extensions/devcontainer.js.map +1 -0
- package/dist/generators/extensions/graphql.js +202 -0
- package/dist/generators/extensions/graphql.js.map +1 -0
- package/dist/generators/extensions/index.js +17 -0
- package/dist/generators/extensions/index.js.map +1 -0
- package/dist/generators/extensions/prisma.js +249 -0
- package/dist/generators/extensions/prisma.js.map +1 -0
- package/dist/generators/extensions/trpc.js +258 -0
- package/dist/generators/extensions/trpc.js.map +1 -0
- package/dist/generators/index.js +122 -4
- package/dist/generators/index.js.map +1 -1
- package/dist/generators/reactNative.js +253 -0
- package/dist/generators/reactNative.js.map +1 -0
- package/dist/generators/workspace.js +303 -0
- package/dist/generators/workspace.js.map +1 -0
- package/dist/identifiers/android.js +75 -0
- package/dist/identifiers/android.js.map +1 -0
- package/dist/identifiers/index.js +35 -0
- package/dist/identifiers/index.js.map +1 -0
- package/dist/identifiers/ios.js +65 -0
- package/dist/identifiers/ios.js.map +1 -0
- package/dist/index.js +41 -319
- package/dist/index.js.map +1 -1
- package/dist/templates/copier.js +135 -0
- package/dist/templates/copier.js.map +1 -0
- package/dist/templates/index.js +23 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/templates/merger.js +113 -0
- package/dist/templates/merger.js.map +1 -0
- package/dist/templates/processor.js +142 -0
- package/dist/templates/processor.js.map +1 -0
- package/dist/types/commands/add.d.ts +14 -0
- package/dist/types/commands/index.d.ts +6 -0
- package/dist/types/commands/info.d.ts +10 -0
- package/dist/types/commands/init.d.ts +19 -0
- package/dist/types/constants.d.ts +82 -0
- package/dist/types/generators/core/index.d.ts +6 -0
- package/dist/types/generators/core/mobile.d.ts +14 -0
- package/dist/types/generators/core/shared.d.ts +8 -0
- package/dist/types/generators/core/web.d.ts +8 -0
- package/dist/types/generators/extensions/api.d.ts +8 -0
- package/dist/types/generators/extensions/devcontainer.d.ts +15 -0
- package/dist/types/generators/extensions/graphql.d.ts +8 -0
- package/dist/types/generators/extensions/index.d.ts +8 -0
- package/dist/types/generators/extensions/prisma.d.ts +8 -0
- package/dist/types/generators/extensions/trpc.d.ts +9 -0
- package/dist/types/generators/index.d.ts +11 -3
- package/dist/types/generators/reactNative.d.ts +19 -0
- package/dist/types/generators/workspace.d.ts +8 -0
- package/dist/types/identifiers/android.d.ts +26 -0
- package/dist/types/identifiers/index.d.ts +26 -0
- package/dist/types/identifiers/ios.d.ts +21 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/templates/copier.d.ts +24 -0
- package/dist/types/templates/index.d.ts +6 -0
- package/dist/types/templates/merger.d.ts +43 -0
- package/dist/types/templates/processor.d.ts +39 -0
- package/dist/types/types.d.ts +184 -5
- package/dist/types/utils/filesystem.d.ts +56 -0
- package/dist/types/utils/index.d.ts +7 -0
- package/dist/types/utils/logger.d.ts +64 -0
- package/dist/types/utils/shell.d.ts +35 -0
- package/dist/types/utils/validation.d.ts +32 -0
- package/dist/types/wizard/index.d.ts +20 -0
- package/dist/types/wizard/steps/apiExtension.d.ts +5 -0
- package/dist/types/wizard/steps/appDisplayName.d.ts +5 -0
- package/dist/types/wizard/steps/devcontainerExtension.d.ts +5 -0
- package/dist/types/wizard/steps/graphqlExtension.d.ts +5 -0
- package/dist/types/wizard/steps/index.d.ts +12 -0
- package/dist/types/wizard/steps/orgDomain.d.ts +5 -0
- package/dist/types/wizard/steps/prismaExtension.d.ts +5 -0
- package/dist/types/wizard/steps/projectName.d.ts +5 -0
- package/dist/types/wizard/steps/summary.d.ts +5 -0
- package/dist/types/wizard/steps/trpcExtension.d.ts +5 -0
- package/dist/types/wizard/validators.d.ts +17 -0
- package/dist/types.js +74 -0
- package/dist/types.js.map +1 -1
- package/dist/utils/filesystem.js +173 -0
- package/dist/utils/filesystem.js.map +1 -0
- package/dist/utils/index.js +24 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.js +106 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/shell.js +113 -0
- package/dist/utils/shell.js.map +1 -0
- package/dist/utils/validation.js +196 -0
- package/dist/utils/validation.js.map +1 -0
- package/dist/wizard/index.js +177 -0
- package/dist/wizard/index.js.map +1 -0
- package/dist/wizard/steps/apiExtension.js +33 -0
- package/dist/wizard/steps/apiExtension.js.map +1 -0
- package/dist/wizard/steps/appDisplayName.js +53 -0
- package/dist/wizard/steps/appDisplayName.js.map +1 -0
- package/dist/wizard/steps/devcontainerExtension.js +131 -0
- package/dist/wizard/steps/devcontainerExtension.js.map +1 -0
- package/dist/wizard/steps/graphqlExtension.js +37 -0
- package/dist/wizard/steps/graphqlExtension.js.map +1 -0
- package/dist/wizard/steps/index.js +25 -0
- package/dist/wizard/steps/index.js.map +1 -0
- package/dist/wizard/steps/orgDomain.js +40 -0
- package/dist/wizard/steps/orgDomain.js.map +1 -0
- package/dist/wizard/steps/prismaExtension.js +33 -0
- package/dist/wizard/steps/prismaExtension.js.map +1 -0
- package/dist/wizard/steps/projectName.js +40 -0
- package/dist/wizard/steps/projectName.js.map +1 -0
- package/dist/wizard/steps/summary.js +119 -0
- package/dist/wizard/steps/summary.js.map +1 -0
- package/dist/wizard/steps/trpcExtension.js +37 -0
- package/dist/wizard/steps/trpcExtension.js.map +1 -0
- package/dist/wizard/validators.js +35 -0
- package/dist/wizard/validators.js.map +1 -0
- package/package.json +6 -19
- package/README.md +0 -110
- package/dist/generators/init.js +0 -268
- package/dist/generators/init.js.map +0 -1
- package/dist/generators/utils.js +0 -682
- package/dist/generators/utils.js.map +0 -1
- package/dist/scripts/configure-react-native-monorepo.js +0 -144
- package/dist/scripts/configure-react-native-monorepo.js.map +0 -1
- package/dist/template/.devcontainer/Dockerfile +0 -26
- package/dist/template/.devcontainer/devcontainer.json +0 -113
- package/dist/template/.devcontainer/docker-compose.yml +0 -59
- package/dist/template/.devcontainer/figma-mcp.sh +0 -32
- package/dist/template/.devcontainer/gitignore.template +0 -2
- package/dist/template/.devcontainer/setup.sh +0 -45
- package/dist/template/DOCKER.md +0 -0
- package/dist/template/Dockerfile +0 -111
- package/dist/template/README.md +0 -233
- package/dist/template/docker/nginx/prod.conf +0 -238
- package/dist/template/docker/nginx.conf +0 -131
- package/dist/template/docker/postgres/init.sql +0 -41
- package/dist/template/docker/prometheus/prometheus.yml +0 -52
- package/dist/template/docker-compose.prod.yml +0 -146
- package/dist/template/docker-compose.yml +0 -143
- package/dist/template/dockerignore.template +0 -151
- package/dist/template/env.example.template +0 -36
- package/dist/template/gitignore.template +0 -56
- package/dist/template/jest.config.js +0 -20
- package/dist/template/mcp.json.template +0 -8
- package/dist/template/package.json +0 -45
- package/dist/template/packages/api/README.md +0 -510
- package/dist/template/packages/api/__tests__/api.test.ts +0 -26
- package/dist/template/packages/api/env.example.template +0 -6
- package/dist/template/packages/api/gitignore.template +0 -35
- package/dist/template/packages/api/jest.config.js +0 -23
- package/dist/template/packages/api/jest.setup.js +0 -9
- package/dist/template/packages/api/package.json +0 -66
- package/dist/template/packages/api/src/context.ts +0 -52
- package/dist/template/packages/api/src/controllers/TestController.ts +0 -0
- package/dist/template/packages/api/src/graphql/builder.ts +0 -75
- package/dist/template/packages/api/src/graphql/generated.ts +0 -64
- package/dist/template/packages/api/src/graphql/index.ts +0 -75
- package/dist/template/packages/api/src/graphql/types/index.ts +0 -44
- package/dist/template/packages/api/src/graphql/types/test.ts +0 -245
- package/dist/template/packages/api/src/index.ts +0 -26
- package/dist/template/packages/api/src/lib/database.ts +0 -23
- package/dist/template/packages/api/src/router/index.ts +0 -163
- package/dist/template/packages/api/src/routers/test.ts +0 -161
- package/dist/template/packages/api/src/server.ts +0 -68
- package/dist/template/packages/api/src/trpc.ts +0 -28
- package/dist/template/packages/api/tsconfig.json +0 -44
- package/dist/template/packages/database/README.md +0 -162
- package/dist/template/packages/database/gitignore.template +0 -41
- package/dist/template/packages/database/package.json +0 -49
- package/dist/template/packages/database/prisma/seed.ts +0 -64
- package/dist/template/packages/database/schema.prisma +0 -107
- package/dist/template/packages/database/src/index.ts +0 -15
- package/dist/template/packages/database/src/validators.ts +0 -10
- package/dist/template/packages/database/tsconfig.json +0 -18
- package/dist/template/packages/mobile/README.md +0 -86
- package/dist/template/packages/mobile/__tests__/App.test.tsx +0 -156
- package/dist/template/packages/mobile/__tests__/components.test.tsx +0 -300
- package/dist/template/packages/mobile/app.json +0 -5
- package/dist/template/packages/mobile/babel.config.js +0 -10
- package/dist/template/packages/mobile/gitignore.template +0 -73
- package/dist/template/packages/mobile/index.js +0 -6
- package/dist/template/packages/mobile/jest.config.js +0 -21
- package/dist/template/packages/mobile/jest.setup.js +0 -12
- package/dist/template/packages/mobile/metro.config.js +0 -36
- package/dist/template/packages/mobile/package.json +0 -60
- package/dist/template/packages/mobile/src/App.tsx +0 -8
- package/dist/template/packages/mobile/src/utils/trpc.ts +0 -7
- package/dist/template/packages/mobile/tsconfig.json +0 -28
- package/dist/template/packages/shared/README.md +0 -135
- package/dist/template/packages/shared/__tests__/shared.test.ts +0 -51
- package/dist/template/packages/shared/gitignore.template +0 -35
- package/dist/template/packages/shared/jest.config.js +0 -22
- package/dist/template/packages/shared/package.json +0 -68
- package/dist/template/packages/shared/src/components/App.tsx +0 -57
- package/dist/template/packages/shared/src/components/HelloWorld.tsx +0 -531
- package/dist/template/packages/shared/src/components/index.ts +0 -1
- package/dist/template/packages/shared/src/graphql/client.ts +0 -34
- package/dist/template/packages/shared/src/index.ts +0 -22
- package/dist/template/packages/shared/src/navigation/AppRouter.tsx +0 -565
- package/dist/template/packages/shared/src/trpc/client.ts +0 -44
- package/dist/template/packages/shared/tsconfig.json +0 -22
- package/dist/template/packages/web/README.md +0 -131
- package/dist/template/packages/web/__tests__/App.test.tsx +0 -342
- package/dist/template/packages/web/__tests__/components.test.tsx +0 -564
- package/dist/template/packages/web/gitignore.template +0 -35
- package/dist/template/packages/web/index.html +0 -13
- package/dist/template/packages/web/jest.config.js +0 -27
- package/dist/template/packages/web/jest.setup.js +0 -24
- package/dist/template/packages/web/package.json +0 -69
- package/dist/template/packages/web/src/App.tsx +0 -14
- package/dist/template/packages/web/src/components/TestDemo.tsx +0 -164
- package/dist/template/packages/web/src/main.tsx +0 -25
- package/dist/template/packages/web/src/utils/trpc.ts +0 -7
- package/dist/template/packages/web/tsconfig.json +0 -26
- package/dist/template/packages/web/vite.config.ts +0 -98
- package/dist/template/setup.sh +0 -30
- package/dist/template/tsconfig.json +0 -22
- package/dist/template/yarnrc.yml.template +0 -4
- package/dist/types/generators/init.d.ts +0 -5
- package/dist/types/generators/utils.d.ts +0 -45
- package/dist/types/scripts/configure-react-native-monorepo.d.ts +0 -23
- package/template/.devcontainer/Dockerfile +0 -26
- package/template/.devcontainer/devcontainer.json +0 -113
- package/template/.devcontainer/docker-compose.yml +0 -59
- package/template/.devcontainer/figma-mcp.sh +0 -32
- package/template/.devcontainer/setup.sh +0 -45
- package/template/.dockerignore +0 -151
- package/template/.env.example +0 -36
- package/template/.env.production +0 -56
- package/template/DOCKER.md +0 -0
- package/template/Dockerfile +0 -111
- package/template/README.md +0 -233
- package/template/docker/nginx/prod.conf +0 -238
- package/template/docker/nginx.conf +0 -131
- package/template/docker/postgres/init.sql +0 -41
- package/template/docker/prometheus/prometheus.yml +0 -52
- package/template/docker-compose.prod.yml +0 -146
- package/template/docker-compose.yml +0 -143
- package/template/jest.config.js +0 -20
- package/template/package.json +0 -45
- package/template/packages/api/.env.example +0 -6
- package/template/packages/api/README.md +0 -510
- package/template/packages/api/__tests__/api.test.ts +0 -26
- package/template/packages/api/jest.config.js +0 -23
- package/template/packages/api/jest.setup.js +0 -9
- package/template/packages/api/package.json +0 -66
- package/template/packages/api/src/context.ts +0 -52
- package/template/packages/api/src/controllers/TestController.ts +0 -0
- package/template/packages/api/src/graphql/builder.ts +0 -75
- package/template/packages/api/src/graphql/generated.ts +0 -64
- package/template/packages/api/src/graphql/index.ts +0 -75
- package/template/packages/api/src/graphql/types/index.ts +0 -44
- package/template/packages/api/src/graphql/types/test.ts +0 -245
- package/template/packages/api/src/index.ts +0 -26
- package/template/packages/api/src/lib/database.ts +0 -23
- package/template/packages/api/src/router/index.ts +0 -163
- package/template/packages/api/src/routers/test.ts +0 -161
- package/template/packages/api/src/server.ts +0 -68
- package/template/packages/api/src/trpc.ts +0 -28
- package/template/packages/api/tsconfig.json +0 -44
- package/template/packages/database/README.md +0 -162
- package/template/packages/database/package.json +0 -49
- package/template/packages/database/prisma/seed.ts +0 -64
- package/template/packages/database/schema.prisma +0 -107
- package/template/packages/database/src/index.ts +0 -15
- package/template/packages/database/src/validators.ts +0 -10
- package/template/packages/database/tsconfig.json +0 -18
- package/template/packages/mobile/README.md +0 -86
- package/template/packages/mobile/__tests__/App.test.tsx +0 -156
- package/template/packages/mobile/__tests__/components.test.tsx +0 -300
- package/template/packages/mobile/app.json +0 -5
- package/template/packages/mobile/babel.config.js +0 -26
- package/template/packages/mobile/index.js +0 -8
- package/template/packages/mobile/jest.config.js +0 -21
- package/template/packages/mobile/jest.setup.js +0 -12
- package/template/packages/mobile/metro.config.js +0 -36
- package/template/packages/mobile/package.json +0 -60
- package/template/packages/mobile/src/App.tsx +0 -8
- package/template/packages/mobile/src/utils/trpc.ts +0 -7
- package/template/packages/mobile/tsconfig.json +0 -28
- package/template/packages/shared/README.md +0 -135
- package/template/packages/shared/__tests__/shared.test.ts +0 -51
- package/template/packages/shared/jest.config.js +0 -22
- package/template/packages/shared/package.json +0 -68
- package/template/packages/shared/src/components/App.tsx +0 -57
- package/template/packages/shared/src/components/HelloWorld.tsx +0 -531
- package/template/packages/shared/src/components/index.ts +0 -1
- package/template/packages/shared/src/graphql/client.ts +0 -34
- package/template/packages/shared/src/index.ts +0 -25
- package/template/packages/shared/src/navigation/AppRouter.tsx +0 -565
- package/template/packages/shared/src/trpc/client.ts +0 -44
- package/template/packages/shared/src/unistyles.ts +0 -50
- package/template/packages/shared/tsconfig.json +0 -22
- package/template/packages/web/README.md +0 -131
- package/template/packages/web/__tests__/App.test.tsx +0 -342
- package/template/packages/web/__tests__/components.test.tsx +0 -564
- package/template/packages/web/index.html +0 -13
- package/template/packages/web/jest.config.js +0 -27
- package/template/packages/web/jest.setup.js +0 -24
- package/template/packages/web/package.json +0 -69
- package/template/packages/web/src/App.tsx +0 -14
- package/template/packages/web/src/components/TestDemo.tsx +0 -164
- package/template/packages/web/src/main.tsx +0 -27
- package/template/packages/web/src/utils/trpc.ts +0 -7
- package/template/packages/web/tsconfig.json +0 -26
- package/template/packages/web/vite.config.ts +0 -114
- package/template/setup.sh +0 -30
- package/template/tsconfig.json +0 -22
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@{{workspaceScope}}/web",
|
|
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
|
-
"test": "jest",
|
|
12
|
-
"test:watch": "jest --watch",
|
|
13
|
-
"test:coverage": "jest --coverage"
|
|
14
|
-
},
|
|
15
|
-
"dependencies": {
|
|
16
|
-
"@idealyst/components": "^{{idealystVersion}}",
|
|
17
|
-
"@idealyst/navigation": "^{{idealystVersion}}",
|
|
18
|
-
"@idealyst/theme": "^{{idealystVersion}}",
|
|
19
|
-
"@{{workspaceScope}}/shared": "workspace:*",
|
|
20
|
-
"@{{workspaceScope}}/database": "workspace:*",
|
|
21
|
-
"@{{workspaceScope}}/api": "workspace:*",
|
|
22
|
-
"@mdi/js": "^7.4.47",
|
|
23
|
-
"@mdi/react": "^1.6.1",
|
|
24
|
-
"@react-native/normalize-colors": "^0.83.1",
|
|
25
|
-
"@tanstack/react-query": "^5.83.0",
|
|
26
|
-
"@trpc/client": "^11.5.1",
|
|
27
|
-
"@trpc/react-query": "^11.5.1",
|
|
28
|
-
"@trpc/server": "^11.5.1",
|
|
29
|
-
"@types/react-router-dom": "^5.3.3",
|
|
30
|
-
"compression": "^1.7.4",
|
|
31
|
-
"express": "^4.18.2",
|
|
32
|
-
"react": "^19.2.0",
|
|
33
|
-
"react-dom": "^19.2.0",
|
|
34
|
-
"react-native": "^0.83.1",
|
|
35
|
-
"react-native-edge-to-edge": "^1.6.2",
|
|
36
|
-
"react-native-nitro-modules": "0.30.0",
|
|
37
|
-
"react-native-unistyles": "^3.0.10",
|
|
38
|
-
"react-native-web": "^0.20.0",
|
|
39
|
-
"react-router": "^7.6.3",
|
|
40
|
-
"react-router-dom": "^7.6.3",
|
|
41
|
-
"sirv": "^2.0.4"
|
|
42
|
-
},
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"@babel/core": "^7.28.0",
|
|
45
|
-
"@babel/preset-env": "^7.28.0",
|
|
46
|
-
"@babel/preset-react": "^7.27.1",
|
|
47
|
-
"@babel/preset-typescript": "^7.27.1",
|
|
48
|
-
"@testing-library/jest-dom": "^6.4.2",
|
|
49
|
-
"@testing-library/react": "^14.2.1",
|
|
50
|
-
"@testing-library/user-event": "^14.5.2",
|
|
51
|
-
"@types/compression": "^1.7.5",
|
|
52
|
-
"@types/express": "^4.17.21",
|
|
53
|
-
"@types/jest": "^29.5.12",
|
|
54
|
-
"@types/react": "^19.2.0",
|
|
55
|
-
"@types/react-dom": "^19.2.0",
|
|
56
|
-
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
|
57
|
-
"@typescript-eslint/parser": "^7.2.0",
|
|
58
|
-
"@vitejs/plugin-react": "^4.6.0",
|
|
59
|
-
"eslint": "^8.57.0",
|
|
60
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
61
|
-
"eslint-plugin-react-refresh": "^0.4.6",
|
|
62
|
-
"jest": "^29.7.0",
|
|
63
|
-
"jest-environment-jsdom": "^29.7.0",
|
|
64
|
-
"ts-jest": "^29.1.2",
|
|
65
|
-
"typescript": "^5.2.2",
|
|
66
|
-
"vite": "^5.2.0",
|
|
67
|
-
"vite-plugin-babel": "^1.3.2"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BrowserRouter } from 'react-router-dom';
|
|
2
|
-
import { App } from '@{{workspaceScope}}/shared';
|
|
3
|
-
|
|
4
|
-
function WebApp() {
|
|
5
|
-
return (
|
|
6
|
-
<div className="App">
|
|
7
|
-
<BrowserRouter>
|
|
8
|
-
<App />
|
|
9
|
-
</BrowserRouter>
|
|
10
|
-
</div>
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export default WebApp;
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { View, Text, Card, Button, Input } from '@idealyst/components';
|
|
3
|
-
import { trpc } from '../utils/trpc';
|
|
4
|
-
|
|
5
|
-
export const TestDemo: React.FC = () => {
|
|
6
|
-
const [newTestName, setNewTestName] = useState('');
|
|
7
|
-
const [newTestMessage, setNewTestMessage] = useState('');
|
|
8
|
-
|
|
9
|
-
// tRPC queries and mutations
|
|
10
|
-
const { data: tests, isLoading, refetch } = trpc.test.getAll.useQuery();
|
|
11
|
-
const createTestMutation = trpc.test.create.useMutation({
|
|
12
|
-
onSuccess: () => {
|
|
13
|
-
refetch();
|
|
14
|
-
setNewTestName('');
|
|
15
|
-
setNewTestMessage('');
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
const deleteTestMutation = trpc.test.delete.useMutation({
|
|
19
|
-
onSuccess: () => {
|
|
20
|
-
refetch();
|
|
21
|
-
},
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
const handleCreateTest = async () => {
|
|
25
|
-
if (!newTestName || !newTestMessage) return;
|
|
26
|
-
|
|
27
|
-
await createTestMutation.mutateAsync({
|
|
28
|
-
name: newTestName,
|
|
29
|
-
message: newTestMessage,
|
|
30
|
-
status: 'active',
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const handleDeleteTest = async (id: string) => {
|
|
35
|
-
await deleteTestMutation.mutateAsync({ id });
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
if (isLoading) {
|
|
39
|
-
return (
|
|
40
|
-
<Card variant="outlined" padding="lg">
|
|
41
|
-
<Text size="md">Loading tests...</Text>
|
|
42
|
-
</Card>
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return (
|
|
47
|
-
<View style={{ gap: 16 }}>
|
|
48
|
-
{/* Header */}
|
|
49
|
-
<Card variant="elevated" padding="lg" intent="primary">
|
|
50
|
-
<View style={{ alignItems: 'center' }}>
|
|
51
|
-
<Text style={{ fontSize: 24, marginBottom: 8 }}>🧪</Text>
|
|
52
|
-
<Text size="lg" weight="bold" style={{ marginBottom: 8, textAlign: 'center' }}>
|
|
53
|
-
tRPC + Database Test
|
|
54
|
-
</Text>
|
|
55
|
-
<Text size="md" style={{ textAlign: 'center' }}>
|
|
56
|
-
This demonstrates end-to-end type-safe API calls from the web app to the database.
|
|
57
|
-
</Text>
|
|
58
|
-
</View>
|
|
59
|
-
</Card>
|
|
60
|
-
|
|
61
|
-
{/* Create Test Form */}
|
|
62
|
-
<Card variant="outlined" padding="lg">
|
|
63
|
-
<Text size="md" weight="bold" style={{ marginBottom: 16 }}>
|
|
64
|
-
Create New Test
|
|
65
|
-
</Text>
|
|
66
|
-
|
|
67
|
-
<View style={{ gap: 12 }}>
|
|
68
|
-
<Input
|
|
69
|
-
label="Test Name"
|
|
70
|
-
value={newTestName}
|
|
71
|
-
onChangeText={setNewTestName}
|
|
72
|
-
placeholder="Enter test name"
|
|
73
|
-
/>
|
|
74
|
-
<Input
|
|
75
|
-
label="Test Message"
|
|
76
|
-
value={newTestMessage}
|
|
77
|
-
onChangeText={setNewTestMessage}
|
|
78
|
-
placeholder="Enter test message"
|
|
79
|
-
multiline
|
|
80
|
-
/>
|
|
81
|
-
<Button
|
|
82
|
-
variant="contained"
|
|
83
|
-
intent="primary"
|
|
84
|
-
onPress={handleCreateTest}
|
|
85
|
-
disabled={!newTestName || !newTestMessage || createTestMutation.isPending}
|
|
86
|
-
>
|
|
87
|
-
{createTestMutation.isPending ? 'Creating...' : 'Create Test'}
|
|
88
|
-
</Button>
|
|
89
|
-
</View>
|
|
90
|
-
</Card>
|
|
91
|
-
|
|
92
|
-
{/* Test Results */}
|
|
93
|
-
<Card variant="outlined" padding="lg">
|
|
94
|
-
<Text size="md" weight="bold" style={{ marginBottom: 16 }}>
|
|
95
|
-
Test Entries ({tests?.count || 0})
|
|
96
|
-
</Text>
|
|
97
|
-
|
|
98
|
-
{tests?.data && tests.data.length > 0 ? (
|
|
99
|
-
<View style={{ gap: 12 }}>
|
|
100
|
-
{tests.data.map((test) => (
|
|
101
|
-
<Card key={test.id} variant="filled" padding="md">
|
|
102
|
-
<View style={{
|
|
103
|
-
flexDirection: 'row',
|
|
104
|
-
justifyContent: 'space-between',
|
|
105
|
-
alignItems: 'flex-start',
|
|
106
|
-
gap: 12
|
|
107
|
-
}}>
|
|
108
|
-
<View style={{ flex: 1 }}>
|
|
109
|
-
<Text size="md" weight="semibold" style={{ marginBottom: 4 }}>
|
|
110
|
-
{test.name}
|
|
111
|
-
</Text>
|
|
112
|
-
<Text size="sm" style={{ marginBottom: 8, opacity: 0.8 }}>
|
|
113
|
-
{test.message}
|
|
114
|
-
</Text>
|
|
115
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
116
|
-
<Card
|
|
117
|
-
variant="filled"
|
|
118
|
-
padding="sm"
|
|
119
|
-
intent={test.status === 'active' ? 'success' : 'neutral'}
|
|
120
|
-
>
|
|
121
|
-
<Text size="sm" weight="semibold">
|
|
122
|
-
{test.status}
|
|
123
|
-
</Text>
|
|
124
|
-
</Card>
|
|
125
|
-
<Text size="sm" style={{ opacity: 0.6 }}>
|
|
126
|
-
{new Date(test.createdAt).toLocaleDateString()}
|
|
127
|
-
</Text>
|
|
128
|
-
</View>
|
|
129
|
-
</View>
|
|
130
|
-
<Button
|
|
131
|
-
variant="outlined"
|
|
132
|
-
intent="error"
|
|
133
|
-
size="sm"
|
|
134
|
-
onPress={() => handleDeleteTest(test.id)}
|
|
135
|
-
disabled={deleteTestMutation.isPending}
|
|
136
|
-
>
|
|
137
|
-
Delete
|
|
138
|
-
</Button>
|
|
139
|
-
</View>
|
|
140
|
-
</Card>
|
|
141
|
-
))}
|
|
142
|
-
</View>
|
|
143
|
-
) : (
|
|
144
|
-
<Card variant="filled" padding="md" style={{ opacity: 0.6 }}>
|
|
145
|
-
<Text size="sm" style={{ textAlign: 'center' }}>
|
|
146
|
-
No tests found. Create one above to get started!
|
|
147
|
-
</Text>
|
|
148
|
-
</Card>
|
|
149
|
-
)}
|
|
150
|
-
</Card>
|
|
151
|
-
|
|
152
|
-
{/* Type Safety Info */}
|
|
153
|
-
<Card variant="filled" intent="success" padding="md">
|
|
154
|
-
<Text size="sm" weight="semibold" style={{ marginBottom: 4 }}>
|
|
155
|
-
✨ Type Safety Features:
|
|
156
|
-
</Text>
|
|
157
|
-
<Text size="sm">
|
|
158
|
-
• Full TypeScript types from database to frontend • tRPC ensures API type safety •
|
|
159
|
-
Prisma provides database schema validation • Real-time type checking across the stack
|
|
160
|
-
</Text>
|
|
161
|
-
</Card>
|
|
162
|
-
</View>
|
|
163
|
-
);
|
|
164
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import '@idealyst/navigation/examples/unistyles';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import ReactDOM from 'react-dom/client';
|
|
5
|
-
import App from './App.tsx';
|
|
6
|
-
|
|
7
|
-
// Hydrate the app if it's SSR, otherwise render normally
|
|
8
|
-
const container = document.getElementById('root')!;
|
|
9
|
-
|
|
10
|
-
if (container.hasChildNodes()) {
|
|
11
|
-
// If the container has child nodes, it means we're hydrating SSR content
|
|
12
|
-
ReactDOM.hydrateRoot(container,
|
|
13
|
-
<React.StrictMode>
|
|
14
|
-
<App />
|
|
15
|
-
</React.StrictMode>
|
|
16
|
-
);
|
|
17
|
-
} else {
|
|
18
|
-
// Otherwise, render normally (for development)
|
|
19
|
-
const root = ReactDOM.createRoot(container);
|
|
20
|
-
root.render(
|
|
21
|
-
<React.StrictMode>
|
|
22
|
-
<App />
|
|
23
|
-
</React.StrictMode>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"skipLibCheck": true,
|
|
7
|
-
"allowImportingTsExtensions": true,
|
|
8
|
-
"isolatedModules": true,
|
|
9
|
-
"moduleDetection": "force",
|
|
10
|
-
"noEmit": true,
|
|
11
|
-
"jsx": "react-jsx",
|
|
12
|
-
"strict": true,
|
|
13
|
-
"noUnusedLocals": true,
|
|
14
|
-
"noUnusedParameters": true,
|
|
15
|
-
"noFallthroughCasesInSwitch": true,
|
|
16
|
-
"noUncheckedIndexedAccess": true,
|
|
17
|
-
"baseUrl": ".",
|
|
18
|
-
"paths": {
|
|
19
|
-
"@/*": ["./src/*"],
|
|
20
|
-
"react-native": ["node_modules/react-native-web"]
|
|
21
|
-
},
|
|
22
|
-
"types": ["vite/client"]
|
|
23
|
-
},
|
|
24
|
-
"include": ["src/**/*"],
|
|
25
|
-
"exclude": ["node_modules", "dist"]
|
|
26
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import react from "@vitejs/plugin-react";
|
|
2
|
-
import path from "path";
|
|
3
|
-
import { defineConfig } from "vite";
|
|
4
|
-
import babel from "vite-plugin-babel";
|
|
5
|
-
|
|
6
|
-
// https://vitejs.dev/config/
|
|
7
|
-
export default defineConfig({
|
|
8
|
-
plugins: [
|
|
9
|
-
babel({
|
|
10
|
-
filter: (id) =>
|
|
11
|
-
id.includes("node_modules/@idealyst/") ||
|
|
12
|
-
(id.includes("/packages/") &&
|
|
13
|
-
!id.includes("/packages/web/") &&
|
|
14
|
-
/\.(tsx?|jsx?)$/.test(id)),
|
|
15
|
-
babelConfig: {
|
|
16
|
-
presets: [
|
|
17
|
-
["@babel/preset-react", { runtime: "automatic" }],
|
|
18
|
-
[
|
|
19
|
-
"@babel/preset-typescript",
|
|
20
|
-
{
|
|
21
|
-
isTSX: true,
|
|
22
|
-
allExtensions: true,
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
],
|
|
26
|
-
plugins: [
|
|
27
|
-
[
|
|
28
|
-
"react-native-unistyles/plugin",
|
|
29
|
-
{
|
|
30
|
-
root: "src",
|
|
31
|
-
autoProcessPaths: [
|
|
32
|
-
"@idealyst/components",
|
|
33
|
-
"@idealyst/navigation",
|
|
34
|
-
"@idealyst/theme",
|
|
35
|
-
],
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
["@idealyst/components/plugin/web", { root: "src" }],
|
|
39
|
-
],
|
|
40
|
-
},
|
|
41
|
-
}),
|
|
42
|
-
// Then process everything else with React plugin
|
|
43
|
-
react(),
|
|
44
|
-
],
|
|
45
|
-
resolve: {
|
|
46
|
-
alias: {
|
|
47
|
-
// Use absolute path to resolve react-native-web properly
|
|
48
|
-
"react-native": path.resolve(__dirname, "node_modules/react-native-web"),
|
|
49
|
-
"@react-native/normalize-colors": path.resolve(
|
|
50
|
-
__dirname,
|
|
51
|
-
"node_modules/@react-native/normalize-colors"
|
|
52
|
-
),
|
|
53
|
-
},
|
|
54
|
-
// Platform-specific file resolution
|
|
55
|
-
extensions: [".web.tsx", ".web.ts", ".tsx", ".ts", ".js", ".jsx"],
|
|
56
|
-
// Ensure proper resolution of package exports
|
|
57
|
-
conditions: ["browser", "import", "module", "default"],
|
|
58
|
-
// Ensure workspace dependencies resolve properly
|
|
59
|
-
preserveSymlinks: false,
|
|
60
|
-
},
|
|
61
|
-
define: {
|
|
62
|
-
global: "globalThis",
|
|
63
|
-
__DEV__: JSON.stringify(true),
|
|
64
|
-
},
|
|
65
|
-
optimizeDeps: {
|
|
66
|
-
include: [
|
|
67
|
-
"react-native-web",
|
|
68
|
-
"react-native-unistyles",
|
|
69
|
-
"react-native-unistyles/web",
|
|
70
|
-
"@mdi/react",
|
|
71
|
-
"@mdi/js",
|
|
72
|
-
],
|
|
73
|
-
exclude: [
|
|
74
|
-
"react-native-edge-to-edge",
|
|
75
|
-
"react-native-nitro-modules",
|
|
76
|
-
"@idealyst/components",
|
|
77
|
-
"@idealyst/navigation",
|
|
78
|
-
"@idealyst/theme",
|
|
79
|
-
"@test/shared",
|
|
80
|
-
],
|
|
81
|
-
esbuildOptions: {
|
|
82
|
-
loader: {
|
|
83
|
-
".tsx": "tsx",
|
|
84
|
-
".ts": "ts",
|
|
85
|
-
".jsx": "jsx",
|
|
86
|
-
".js": "jsx", // Important: treat .js files as JSX for React Native compatibility
|
|
87
|
-
},
|
|
88
|
-
alias: {
|
|
89
|
-
"react-native": path.resolve(__dirname, "node_modules/react-native-web"),
|
|
90
|
-
"@react-native/normalize-colors": path.resolve(__dirname, "node_modules/@react-native/normalize-colors"),
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
server: {
|
|
95
|
-
host: "0.0.0.0",
|
|
96
|
-
port: 5173,
|
|
97
|
-
},
|
|
98
|
-
});
|
package/dist/template/setup.sh
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Idealyst Framework Workspace Setup Script
|
|
4
|
-
# This script sets up the development environment for your workspace
|
|
5
|
-
|
|
6
|
-
echo "🏗️ Setting up Idealyst Framework workspace..."
|
|
7
|
-
|
|
8
|
-
# Install dependencies
|
|
9
|
-
echo "📦 Installing dependencies..."
|
|
10
|
-
yarn install
|
|
11
|
-
|
|
12
|
-
# Build all packages
|
|
13
|
-
echo "🔨 Building packages..."
|
|
14
|
-
yarn build:packages
|
|
15
|
-
|
|
16
|
-
# Set up git hooks (if using husky)
|
|
17
|
-
if [ -f "package.json" ] && grep -q "husky" package.json; then
|
|
18
|
-
echo "🪝 Setting up git hooks..."
|
|
19
|
-
yarn prepare
|
|
20
|
-
fi
|
|
21
|
-
|
|
22
|
-
echo "✅ Workspace setup complete!"
|
|
23
|
-
echo ""
|
|
24
|
-
echo "🚀 Quick start:"
|
|
25
|
-
echo " • Run 'yarn dev' to start development mode"
|
|
26
|
-
echo " • Run 'yarn build' to build all packages"
|
|
27
|
-
echo " • Run 'yarn test' to run tests"
|
|
28
|
-
echo " • Use 'idealyst create <type> <name>' to add new projects"
|
|
29
|
-
echo ""
|
|
30
|
-
echo "📚 Check README.md and DOCKER.md for more information."
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "bundler",
|
|
7
|
-
"esModuleInterop": true,
|
|
8
|
-
"allowSyntheticDefaultImports": true,
|
|
9
|
-
"strict": true,
|
|
10
|
-
"skipLibCheck": true,
|
|
11
|
-
"forceConsistentCasingInFileNames": true,
|
|
12
|
-
"resolveJsonModule": true,
|
|
13
|
-
"isolatedModules": true,
|
|
14
|
-
"jsx": "react-jsx"
|
|
15
|
-
},
|
|
16
|
-
"exclude": [
|
|
17
|
-
"node_modules",
|
|
18
|
-
"dist",
|
|
19
|
-
"**/node_modules",
|
|
20
|
-
"**/dist"
|
|
21
|
-
]
|
|
22
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { TemplateData } from '../types';
|
|
2
|
-
export declare function validateProjectName(name: string): boolean;
|
|
3
|
-
export declare function getTemplatePath(templateName: string): string;
|
|
4
|
-
export declare function createPackageName(name: string): string;
|
|
5
|
-
export declare function updateWorkspacePackageJson(workspacePath: string, directory: string): Promise<void>;
|
|
6
|
-
export declare function copyTemplate(templatePath: string, destPath: string, data: TemplateData): Promise<void>;
|
|
7
|
-
export declare function processTemplateFiles(dir: string, data: TemplateData): Promise<void>;
|
|
8
|
-
export declare function processTemplateFile(filePath: string, data: TemplateData): Promise<void>;
|
|
9
|
-
export declare function installDependencies(projectPath: string, skipInstall?: boolean): Promise<void>;
|
|
10
|
-
export declare function runCommand(command: string, args: string[], options: {
|
|
11
|
-
cwd: string;
|
|
12
|
-
timeout?: number;
|
|
13
|
-
}): Promise<void>;
|
|
14
|
-
export declare function getTemplateData(projectName: string, description?: string, appName?: string, workspaceScope?: string): TemplateData;
|
|
15
|
-
/**
|
|
16
|
-
* Detects if we're in a workspace root directory
|
|
17
|
-
*/
|
|
18
|
-
export declare function isWorkspaceRoot(directory: string): Promise<boolean>;
|
|
19
|
-
/**
|
|
20
|
-
* Gets the workspace scope from the workspace root's package.json
|
|
21
|
-
* Extracts just the scope name (without @) from scoped package names
|
|
22
|
-
*/
|
|
23
|
-
export declare function getWorkspaceName(directory: string): Promise<string | null>;
|
|
24
|
-
/**
|
|
25
|
-
* Resolves the correct project path for individual projects (native, web, shared).
|
|
26
|
-
* Individual projects can ONLY be created within an existing workspace.
|
|
27
|
-
* This enforces proper monorepo structure and prevents scattered individual projects.
|
|
28
|
-
*/
|
|
29
|
-
export declare function resolveProjectPath(projectName: string, directory: string): Promise<{
|
|
30
|
-
projectPath: string;
|
|
31
|
-
workspacePath: string;
|
|
32
|
-
workspaceScope: string | null;
|
|
33
|
-
}>;
|
|
34
|
-
export declare function initializeReactNativeProject(projectName: string, directory: string, displayName?: string, skipInstall?: boolean): Promise<void>;
|
|
35
|
-
export declare function overlayIdealystFiles(templatePath: string, projectPath: string, data: TemplateData): Promise<void>;
|
|
36
|
-
export declare function mergePackageJsonDependencies(templatePath: string, projectPath: string, data: TemplateData): Promise<void>;
|
|
37
|
-
export declare function promptForProjectName(): Promise<string>;
|
|
38
|
-
export declare function promptForProjectType(): Promise<string>;
|
|
39
|
-
export declare function promptForAppName(projectName: string): Promise<string>;
|
|
40
|
-
export declare function promptForTrpcIntegration(): Promise<boolean>;
|
|
41
|
-
export declare function copyTrpcFiles(templatePath: string, projectPath: string, data: TemplateData): Promise<void>;
|
|
42
|
-
export declare function copyTrpcAppComponent(templatePath: string, projectPath: string, data: TemplateData): Promise<void>;
|
|
43
|
-
export declare function addTrpcDependencies(projectPath: string): Promise<void>;
|
|
44
|
-
export declare function removeTrpcDependencies(projectPath: string): Promise<void>;
|
|
45
|
-
export declare function configureAndroidVectorIcons(projectPath: string): Promise<void>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configures React Native Android and iOS to work in a Yarn workspace monorepo
|
|
3
|
-
* with hoisted node_modules at the workspace root.
|
|
4
|
-
*
|
|
5
|
-
* Based on: https://www.callstack.com/blog/setting-up-react-native-monorepo-with-yarn-workspaces
|
|
6
|
-
*/
|
|
7
|
-
interface ConfigureOptions {
|
|
8
|
-
mobilePackagePath: string;
|
|
9
|
-
workspaceRoot: string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Updates Android gradle files to use workspace root node_modules
|
|
13
|
-
*/
|
|
14
|
-
export declare function configureAndroid(options: ConfigureOptions): Promise<void>;
|
|
15
|
-
/**
|
|
16
|
-
* Updates iOS Podfile to use workspace root node_modules
|
|
17
|
-
*/
|
|
18
|
-
export declare function configureIOS(options: ConfigureOptions): Promise<void>;
|
|
19
|
-
/**
|
|
20
|
-
* Main function to configure both Android and iOS
|
|
21
|
-
*/
|
|
22
|
-
export declare function configureReactNativeMonorepo(mobilePackagePath: string, workspaceRoot: string): Promise<void>;
|
|
23
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
FROM node:20-bullseye
|
|
2
|
-
|
|
3
|
-
# Install additional tools including gosu for proper user switching
|
|
4
|
-
RUN apt-get update && apt-get install -y \
|
|
5
|
-
git \
|
|
6
|
-
postgresql-client \
|
|
7
|
-
&& rm -rf /var/lib/apt/lists/*
|
|
8
|
-
|
|
9
|
-
# Enable corepack for yarn
|
|
10
|
-
RUN corepack enable
|
|
11
|
-
|
|
12
|
-
# Install global tools that might be useful
|
|
13
|
-
RUN npm install -g @expo/cli @anthropic-ai/claude-code
|
|
14
|
-
|
|
15
|
-
# Set up git (will be configured in setup script)
|
|
16
|
-
RUN git config --global init.defaultBranch main
|
|
17
|
-
|
|
18
|
-
# Create workspace directory
|
|
19
|
-
RUN mkdir -p /workspace
|
|
20
|
-
WORKDIR /workspace
|
|
21
|
-
RUN chown -R node:node /workspace
|
|
22
|
-
|
|
23
|
-
# Note: We don't switch to node user here anymore - entrypoint.sh will do it
|
|
24
|
-
# This allows the entrypoint to fix permissions as root first
|
|
25
|
-
|
|
26
|
-
USER node
|