@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,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,27 +0,0 @@
|
|
|
1
|
-
// Import shared unistyles configuration FIRST
|
|
2
|
-
// This ensures the theme is registered before any component stylesheets
|
|
3
|
-
import '@{{projectName}}/shared';
|
|
4
|
-
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import ReactDOM from 'react-dom/client';
|
|
7
|
-
import App from './App.tsx';
|
|
8
|
-
|
|
9
|
-
// Hydrate the app if it's SSR, otherwise render normally
|
|
10
|
-
const container = document.getElementById('root')!;
|
|
11
|
-
|
|
12
|
-
if (container.hasChildNodes()) {
|
|
13
|
-
// If the container has child nodes, it means we're hydrating SSR content
|
|
14
|
-
ReactDOM.hydrateRoot(container,
|
|
15
|
-
<React.StrictMode>
|
|
16
|
-
<App />
|
|
17
|
-
</React.StrictMode>
|
|
18
|
-
);
|
|
19
|
-
} else {
|
|
20
|
-
// Otherwise, render normally (for development)
|
|
21
|
-
const root = ReactDOM.createRoot(container);
|
|
22
|
-
root.render(
|
|
23
|
-
<React.StrictMode>
|
|
24
|
-
<App />
|
|
25
|
-
</React.StrictMode>
|
|
26
|
-
);
|
|
27
|
-
}
|
|
@@ -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,114 +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
|
-
// Idealyst StyleBuilder plugin - expands $iterator patterns
|
|
28
|
-
// Must run BEFORE react-native-unistyles/plugin
|
|
29
|
-
[
|
|
30
|
-
"@idealyst/theme/plugin",
|
|
31
|
-
{
|
|
32
|
-
autoProcessPaths: [
|
|
33
|
-
"@idealyst/components",
|
|
34
|
-
"@idealyst/navigation",
|
|
35
|
-
"@idealyst/theme",
|
|
36
|
-
],
|
|
37
|
-
// Path to your theme configuration file (relative to project root)
|
|
38
|
-
themePath: "../shared/src/unistyles.ts",
|
|
39
|
-
},
|
|
40
|
-
],
|
|
41
|
-
// Unistyles plugin - processes StyleSheet.create calls
|
|
42
|
-
[
|
|
43
|
-
"react-native-unistyles/plugin",
|
|
44
|
-
{
|
|
45
|
-
root: "src",
|
|
46
|
-
autoProcessPaths: [
|
|
47
|
-
"@idealyst/components",
|
|
48
|
-
"@idealyst/navigation",
|
|
49
|
-
"@idealyst/theme",
|
|
50
|
-
],
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
// Web-specific component plugin
|
|
54
|
-
["@idealyst/components/plugin/web", { root: "src" }],
|
|
55
|
-
],
|
|
56
|
-
},
|
|
57
|
-
}),
|
|
58
|
-
// Then process everything else with React plugin
|
|
59
|
-
react(),
|
|
60
|
-
],
|
|
61
|
-
resolve: {
|
|
62
|
-
alias: {
|
|
63
|
-
// Use absolute path to resolve react-native-web properly
|
|
64
|
-
"react-native": path.resolve(__dirname, "node_modules/react-native-web"),
|
|
65
|
-
"@react-native/normalize-colors": path.resolve(
|
|
66
|
-
__dirname,
|
|
67
|
-
"node_modules/@react-native/normalize-colors"
|
|
68
|
-
),
|
|
69
|
-
},
|
|
70
|
-
// Platform-specific file resolution
|
|
71
|
-
extensions: [".web.tsx", ".web.ts", ".tsx", ".ts", ".js", ".jsx"],
|
|
72
|
-
// Ensure proper resolution of package exports
|
|
73
|
-
conditions: ["browser", "import", "module", "default"],
|
|
74
|
-
// Ensure workspace dependencies resolve properly
|
|
75
|
-
preserveSymlinks: false,
|
|
76
|
-
},
|
|
77
|
-
define: {
|
|
78
|
-
global: "globalThis",
|
|
79
|
-
__DEV__: JSON.stringify(true),
|
|
80
|
-
},
|
|
81
|
-
optimizeDeps: {
|
|
82
|
-
include: [
|
|
83
|
-
"react-native-web",
|
|
84
|
-
"react-native-unistyles",
|
|
85
|
-
"react-native-unistyles/web",
|
|
86
|
-
"@mdi/react",
|
|
87
|
-
"@mdi/js",
|
|
88
|
-
],
|
|
89
|
-
exclude: [
|
|
90
|
-
"react-native-edge-to-edge",
|
|
91
|
-
"react-native-nitro-modules",
|
|
92
|
-
"@idealyst/components",
|
|
93
|
-
"@idealyst/navigation",
|
|
94
|
-
"@idealyst/theme",
|
|
95
|
-
"@{{projectName}}/shared",
|
|
96
|
-
],
|
|
97
|
-
esbuildOptions: {
|
|
98
|
-
loader: {
|
|
99
|
-
".tsx": "tsx",
|
|
100
|
-
".ts": "ts",
|
|
101
|
-
".jsx": "jsx",
|
|
102
|
-
".js": "jsx", // Important: treat .js files as JSX for React Native compatibility
|
|
103
|
-
},
|
|
104
|
-
alias: {
|
|
105
|
-
"react-native": path.resolve(__dirname, "node_modules/react-native-web"),
|
|
106
|
-
"@react-native/normalize-colors": path.resolve(__dirname, "node_modules/@react-native/normalize-colors"),
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
server: {
|
|
111
|
-
host: "0.0.0.0",
|
|
112
|
-
port: 5173,
|
|
113
|
-
},
|
|
114
|
-
});
|
package/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."
|
package/template/tsconfig.json
DELETED
|
@@ -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
|
-
}
|