@idealyst/cli 1.0.35 → 1.0.37

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.
@@ -0,0 +1,23 @@
1
+ FROM node:20-bullseye
2
+
3
+ # Install additional tools
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
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
+
22
+ # Keep container running
23
+ CMD ["sleep", "infinity"]
@@ -1,88 +1,10 @@
1
1
  {
2
- "name": "Idealyst Development Environment",
3
- "dockerComposeFile": ["./docker-compose.yml"],
4
- "service": "dev",
5
- "workspaceFolder": "/app",
6
- "shutdownAction": "stopCompose",
2
+ "name": "Idealyst Development",
3
+ "dockerComposeFile": "docker-compose.yml",
4
+ "service": "app",
5
+ "workspaceFolder": "/workspace",
7
6
 
8
- // VS Code configuration
9
- "customizations": {
10
- "vscode": {
11
- "settings": {
12
- "terminal.integrated.shell.linux": "/bin/bash",
13
- "typescript.preferences.includePackageJsonAutoImports": "auto",
14
- "editor.formatOnSave": true,
15
- "editor.codeActionsOnSave": {
16
- "source.fixAll.eslint": "explicit",
17
- "source.organizeImports": "explicit"
18
- },
19
- "files.watcherExclude": {
20
- "**/node_modules/**": true,
21
- "**/.git/**": true,
22
- "**/dist/**": true,
23
- "**/coverage/**": true
24
- },
25
- "search.exclude": {
26
- "**/node_modules": true,
27
- "**/dist": true,
28
- "**/coverage": true,
29
- "**/.yarn": true
30
- },
31
- "typescript.preferences.importModuleSpecifier": "relative",
32
- "jest.jestCommandLine": "yarn test",
33
- "jest.autoRun": "off"
34
- },
35
-
36
- // Extensions to install
37
- "extensions": [
38
- "ms-vscode.vscode-typescript-next",
39
- "bradlc.vscode-tailwindcss",
40
- "esbenp.prettier-vscode",
41
- "dbaeumer.vscode-eslint",
42
- "ms-vscode.vscode-json",
43
- "ms-vscode.test-adapter-converter",
44
- "orta.vscode-jest",
45
- "ms-vscode.vscode-npm-script",
46
- "christian-kohler.path-intellisense",
47
- "formulahendry.auto-rename-tag",
48
- "bradlc.vscode-tailwindcss",
49
- "ms-vscode.vscode-docker",
50
- "ms-azuretools.vscode-docker",
51
- "redhat.vscode-yaml",
52
- "ms-vscode.vscode-markdown",
53
- "yzhang.markdown-all-in-one",
54
- "davidanson.vscode-markdownlint",
55
- "ms-vscode.vscode-git-graph",
56
- "eamodio.gitlens",
57
- "github.vscode-pull-request-github",
58
- "github.copilot",
59
- "github.copilot-chat",
60
- "ms-vscode.vscode-react-native",
61
- "msjsdiag.vscode-react-native"
62
- ]
63
- }
64
- },
65
-
66
- // Development container features
67
- "features": {
68
- "ghcr.io/devcontainers/features/git:1": {
69
- "ppa": true,
70
- "version": "latest"
71
- },
72
- "ghcr.io/devcontainers/features/github-cli:1": {
73
- "version": "latest"
74
- },
75
- "ghcr.io/devcontainers/features/common-utils:2": {
76
- "installZsh": true,
77
- "configureZshAsDefaultShell": true,
78
- "installOhMyZsh": true,
79
- "username": "devuser",
80
- "userUid": 1001,
81
- "userGid": 1001
82
- }
83
- },
84
-
85
- // Port forwarding for development servers
7
+ // Forward ports
86
8
  "forwardPorts": [
87
9
  3000, // Web dev server
88
10
  3001, // API server
@@ -93,6 +15,7 @@
93
15
  6379 // Redis
94
16
  ],
95
17
 
18
+ // Port attributes
96
19
  "portsAttributes": {
97
20
  "3000": {
98
21
  "label": "Web App",
@@ -100,41 +23,90 @@
100
23
  },
101
24
  "3001": {
102
25
  "label": "API Server",
103
- "onAutoForward": "silent"
26
+ "onAutoForward": "notify"
104
27
  },
105
28
  "5173": {
106
29
  "label": "Vite Dev Server",
107
30
  "onAutoForward": "openBrowser"
108
31
  },
32
+ "8080": {
33
+ "label": "Additional Dev Server",
34
+ "onAutoForward": "notify"
35
+ },
109
36
  "19006": {
110
37
  "label": "Expo Dev Tools",
111
38
  "onAutoForward": "openBrowser"
112
39
  },
113
40
  "5432": {
114
- "label": "PostgreSQL",
41
+ "label": "PostgreSQL Database",
115
42
  "onAutoForward": "silent"
116
43
  },
117
44
  "6379": {
118
- "label": "Redis",
45
+ "label": "Redis Cache",
119
46
  "onAutoForward": "silent"
120
47
  }
121
48
  },
122
49
 
123
- // Post-create commands
124
- "postCreateCommand": "bash .devcontainer/post-create.sh",
50
+ // VS Code customizations
51
+ "customizations": {
52
+ "vscode": {
53
+ "extensions": [
54
+ // React Native/React development
55
+ "ms-vscode.vscode-react-native",
56
+ "msjsdiag.vscode-react-native",
57
+
58
+ // TypeScript/JavaScript
59
+ "ms-vscode.vscode-typescript-next",
60
+ "dbaeumer.vscode-eslint",
61
+ "esbenp.prettier-vscode",
62
+ "bradlc.vscode-tailwindcss",
63
+
64
+ // General development
65
+ "ms-vscode.vscode-json",
66
+ "redhat.vscode-yaml",
67
+ "ms-vscode.vscode-docker",
68
+ "ms-vscode.vscode-markdown",
69
+ "christian-kohler.path-intellisense",
70
+ "formulahendry.auto-rename-tag",
125
71
 
126
- // Development user
127
- "remoteUser": "devuser",
72
+ // Testing
73
+ "orta.vscode-jest",
74
+ "ms-vscode.test-adapter-converter",
128
75
 
129
- // Environment variables
130
- "remoteEnv": {
131
- "NODE_ENV": "development",
132
- "DATABASE_URL": "postgresql://postgres:postgres@postgres:5432/idealyst_db",
133
- "REDIS_URL": "redis://redis:6379"
76
+ // Git
77
+ "mhutchie.git-graph",
78
+ "eamodio.gitlens",
79
+ "github.vscode-pull-request-github",
80
+ "github.copilot",
81
+ "github.copilot-chat"
82
+ ],
83
+ "settings": {
84
+ "terminal.integrated.defaultProfile.linux": "bash",
85
+ "typescript.preferences.includePackageJsonAutoImports": "auto",
86
+ "editor.formatOnSave": true,
87
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
88
+ "editor.codeActionsOnSave": {
89
+ "source.fixAll.eslint": "explicit",
90
+ "source.organizeImports": "explicit"
91
+ },
92
+ "files.watcherExclude": {
93
+ "**/node_modules/**": true,
94
+ "**/.git/**": true,
95
+ "**/dist/**": true,
96
+ "**/coverage/**": true
97
+ },
98
+ "search.exclude": {
99
+ "**/node_modules": true,
100
+ "**/dist": true,
101
+ "**/coverage": true,
102
+ "**/.yarn": true
103
+ },
104
+ "jest.jestCommandLine": "yarn test",
105
+ "jest.autoRun": "off"
106
+ }
107
+ }
134
108
  },
135
109
 
136
- // Mount the workspace with proper permissions
137
- "mounts": [
138
- "source=${localWorkspaceFolder},target=/app,type=bind,consistency=cached"
139
- ]
110
+ // Post-create command to set up the development environment
111
+ "postCreateCommand": "bash .devcontainer/setup.sh"
140
112
  }
@@ -2,73 +2,46 @@ services:
2
2
  # PostgreSQL Database
3
3
  postgres:
4
4
  image: postgres:15-alpine
5
- container_name: ${PROJECT_NAME:-truday}-postgres
6
5
  environment:
7
- POSTGRES_DB: ${POSTGRES_DB:-idealyst_db}
8
- POSTGRES_USER: ${POSTGRES_USER:-postgres}
9
- POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
6
+ POSTGRES_DB: idealyst_db
7
+ POSTGRES_USER: postgres
8
+ POSTGRES_PASSWORD: postgres
10
9
  ports:
11
- - "${POSTGRES_PORT:-5432}:5432"
10
+ - "5432:5432"
12
11
  volumes:
13
12
  - postgres_data:/var/lib/postgresql/data
14
- - ../docker/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
15
- healthcheck:
16
- test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
17
- interval: 30s
18
- timeout: 10s
19
- retries: 5
20
- networks:
21
- - idealyst-network
22
13
 
23
14
  # Redis Cache
24
15
  redis:
25
16
  image: redis:7-alpine
26
- container_name: ${PROJECT_NAME:-truday}-redis
27
17
  ports:
28
- - "${REDIS_PORT:-6379}:6379"
18
+ - "6379:6379"
29
19
  volumes:
30
20
  - redis_data:/data
31
- healthcheck:
32
- test: ["CMD", "redis-cli", "ping"]
33
- interval: 30s
34
- timeout: 10s
35
- retries: 5
36
- networks:
37
- - idealyst-network
38
21
 
39
22
  # Development Service (for devcontainer)
40
- dev:
23
+ app:
41
24
  build:
42
- context: ..
25
+ context: .
43
26
  dockerfile: Dockerfile
44
- target: dev
45
- container_name: ${PROJECT_NAME:-truday}-dev
46
27
  environment:
47
28
  NODE_ENV: development
29
+ DATABASE_URL: postgresql://postgres:postgres@postgres:5432/idealyst_db
30
+ REDIS_URL: redis://redis:6379
48
31
  ports:
49
- - "3000:3000" # Web dev server
50
- - "3001:3001" # API dev server
51
- - "5173:5173" # Vite dev server
52
- - "8080:8080" # Additional dev server
53
- - "19006:19006" # Expo dev tools
32
+ - "3000:3000"
33
+ - "3001:3001"
34
+ - "5173:5173"
35
+ - "8080:8080"
36
+ - "19006:19006"
54
37
  volumes:
55
- - ..:/app
56
- - /app/node_modules
57
- - /var/run/docker.sock:/var/run/docker.sock:ro
38
+ - ..:/workspace
39
+ - /workspace/node_modules
58
40
  depends_on:
59
- postgres:
60
- condition: service_healthy
61
- redis:
62
- condition: service_healthy
63
- networks:
64
- - idealyst-network
65
- tty: true
66
- stdin_open: true
41
+ - postgres
42
+ - redis
43
+ command: sleep infinity
67
44
 
68
45
  volumes:
69
46
  postgres_data:
70
47
  redis_data:
71
-
72
- networks:
73
- idealyst-network:
74
- driver: bridge
@@ -0,0 +1,64 @@
1
+ #!/bin/bash
2
+
3
+ echo "🚀 Setting up Idealyst development environment..."
4
+
5
+ # Install dependencies
6
+ echo "📦 Installing dependencies..."
7
+ yarn install
8
+
9
+ # Create environment file if it doesn't exist
10
+ if [ ! -f ".env" ]; then
11
+ echo "📝 Creating .env file..."
12
+ cat > .env << EOF
13
+ # Database Configuration
14
+ DATABASE_URL=postgresql://postgres:postgres@postgres:5432/idealyst_db
15
+ POSTGRES_DB=idealyst_db
16
+ POSTGRES_USER=postgres
17
+ POSTGRES_PASSWORD=postgres
18
+
19
+ # Redis Configuration
20
+ REDIS_URL=redis://redis:6379
21
+
22
+ # API Configuration
23
+ API_PORT=3001
24
+ JWT_SECRET=your-jwt-secret-here
25
+
26
+ # Web Configuration
27
+ WEB_PORT=3000
28
+
29
+ # Development Configuration
30
+ NODE_ENV=development
31
+ LOG_LEVEL=debug
32
+
33
+ # Project Configuration
34
+ PROJECT_NAME={{packageName}}
35
+ EOF
36
+ fi
37
+
38
+ # Wait for database to be ready
39
+ echo "⏳ Waiting for database to be ready..."
40
+ until pg_isready -h postgres -p 5432 -U postgres; do
41
+ echo "Database is unavailable - sleeping"
42
+ sleep 1
43
+ done
44
+
45
+ echo "✅ Database is ready!"
46
+
47
+ # Run database migrations if they exist
48
+ if [ -d "packages" ]; then
49
+ echo "🗄️ Setting up database..."
50
+
51
+ # Check if any package has prisma
52
+ for package_dir in packages/*/; do
53
+ if [ -f "${package_dir}prisma/schema.prisma" ]; then
54
+ echo "Running Prisma setup for $(basename "$package_dir")..."
55
+ cd "$package_dir"
56
+ npx prisma generate
57
+ npx prisma db push
58
+ cd /workspace
59
+ fi
60
+ done
61
+ fi
62
+
63
+ echo "✅ Development environment is ready!"
64
+ echo "🎉 You can now start developing your Idealyst application!"
@@ -66,16 +66,34 @@ CMD ["nginx", "-g", "daemon off;"]
66
66
  # Development stage - for use with dev containers
67
67
  FROM base AS dev
68
68
 
69
+ # Install additional tools for development
70
+ RUN apt-get update && apt-get install -y \
71
+ sudo \
72
+ postgresql-client \
73
+ && rm -rf /var/lib/apt/lists/*
74
+
75
+ # Create dev user with proper permissions
76
+ RUN groupadd --gid 1000 devuser \
77
+ && useradd --uid 1000 --gid devuser --shell /bin/bash --create-home devuser \
78
+ && echo 'devuser ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
79
+
80
+ # Set up workspace directory with proper ownership
81
+ RUN mkdir -p /app && chown -R devuser:devuser /app
82
+
83
+ # Switch to dev user for remaining setup
84
+ USER devuser
85
+ WORKDIR /app
86
+
69
87
  # Copy package files
70
- COPY package.json yarn.lock .yarnrc.yml ./
71
- COPY .yarn .yarn
88
+ COPY --chown=devuser:devuser package.json yarn.lock .yarnrc.yml ./
89
+ COPY --chown=devuser:devuser .yarn .yarn
72
90
 
73
91
  # Create packages directory structure and copy package.json files
74
92
  RUN mkdir -p packages/api packages/app packages/components packages/web
75
- COPY packages/api/package.json ./packages/api/
76
- COPY packages/app/package.json ./packages/app/
77
- COPY packages/components/package.json ./packages/components/
78
- COPY packages/web/package.json ./packages/web/
93
+ COPY --chown=devuser:devuser packages/api/package.json ./packages/api/
94
+ COPY --chown=devuser:devuser packages/app/package.json ./packages/app/
95
+ COPY --chown=devuser:devuser packages/components/package.json ./packages/components/
96
+ COPY --chown=devuser:devuser packages/web/package.json ./packages/web/
79
97
 
80
98
  # Install dependencies including dev dependencies
81
99
  RUN yarn install
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idealyst/cli",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
4
  "description": "CLI tool for generating Idealyst Framework projects",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -9,14 +9,15 @@ RUN apt-get update && apt-get install -y \
9
9
  # Enable corepack for yarn
10
10
  RUN corepack enable
11
11
 
12
- # Set working directory
13
- WORKDIR /workspace
14
-
15
12
  # Install global tools that might be useful
16
13
  RUN npm install -g @expo/cli
17
14
 
18
15
  # Set up git (will be configured in setup script)
19
16
  RUN git config --global init.defaultBranch main
20
17
 
18
+ # Create workspace directory
19
+ RUN mkdir -p /workspace
20
+ WORKDIR /workspace
21
+
21
22
  # Keep container running
22
23
  CMD ["sleep", "infinity"]
@@ -0,0 +1,112 @@
1
+ {
2
+ "name": "Idealyst Development",
3
+ "dockerComposeFile": "docker-compose.yml",
4
+ "service": "app",
5
+ "workspaceFolder": "/workspace",
6
+
7
+ // Forward ports
8
+ "forwardPorts": [
9
+ 3000, // Web dev server
10
+ 3001, // API server
11
+ 5173, // Vite dev server
12
+ 8080, // Additional dev server
13
+ 19006, // Expo dev tools
14
+ 5432, // PostgreSQL
15
+ 6379 // Redis
16
+ ],
17
+
18
+ // Port attributes
19
+ "portsAttributes": {
20
+ "3000": {
21
+ "label": "Web App",
22
+ "onAutoForward": "openBrowser"
23
+ },
24
+ "3001": {
25
+ "label": "API Server",
26
+ "onAutoForward": "notify"
27
+ },
28
+ "5173": {
29
+ "label": "Vite Dev Server",
30
+ "onAutoForward": "openBrowser"
31
+ },
32
+ "8080": {
33
+ "label": "Additional Dev Server",
34
+ "onAutoForward": "notify"
35
+ },
36
+ "19006": {
37
+ "label": "Expo Dev Tools",
38
+ "onAutoForward": "openBrowser"
39
+ },
40
+ "5432": {
41
+ "label": "PostgreSQL Database",
42
+ "onAutoForward": "silent"
43
+ },
44
+ "6379": {
45
+ "label": "Redis Cache",
46
+ "onAutoForward": "silent"
47
+ }
48
+ },
49
+
50
+ // VS Code customizations
51
+ "customizations": {
52
+ "vscode": {
53
+ "extensions": [
54
+ // React Native/React development
55
+ "ms-vscode.vscode-react-native",
56
+ "msjsdiag.vscode-react-native",
57
+
58
+ // TypeScript/JavaScript
59
+ "ms-vscode.vscode-typescript-next",
60
+ "dbaeumer.vscode-eslint",
61
+ "esbenp.prettier-vscode",
62
+ "bradlc.vscode-tailwindcss",
63
+
64
+ // General development
65
+ "ms-vscode.vscode-json",
66
+ "redhat.vscode-yaml",
67
+ "ms-vscode.vscode-docker",
68
+ "ms-vscode.vscode-markdown",
69
+ "christian-kohler.path-intellisense",
70
+ "formulahendry.auto-rename-tag",
71
+
72
+ // Testing
73
+ "orta.vscode-jest",
74
+ "ms-vscode.test-adapter-converter",
75
+
76
+ // Git
77
+ "mhutchie.git-graph",
78
+ "eamodio.gitlens",
79
+ "github.vscode-pull-request-github",
80
+ "github.copilot",
81
+ "github.copilot-chat"
82
+ ],
83
+ "settings": {
84
+ "terminal.integrated.defaultProfile.linux": "bash",
85
+ "typescript.preferences.includePackageJsonAutoImports": "auto",
86
+ "editor.formatOnSave": true,
87
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
88
+ "editor.codeActionsOnSave": {
89
+ "source.fixAll.eslint": "explicit",
90
+ "source.organizeImports": "explicit"
91
+ },
92
+ "files.watcherExclude": {
93
+ "**/node_modules/**": true,
94
+ "**/.git/**": true,
95
+ "**/dist/**": true,
96
+ "**/coverage/**": true
97
+ },
98
+ "search.exclude": {
99
+ "**/node_modules": true,
100
+ "**/dist": true,
101
+ "**/coverage": true,
102
+ "**/.yarn": true
103
+ },
104
+ "jest.jestCommandLine": "yarn test",
105
+ "jest.autoRun": "off"
106
+ }
107
+ }
108
+ },
109
+
110
+ // Post-create command to set up the development environment
111
+ "postCreateCommand": "bash .devcontainer/setup.sh"
112
+ }
@@ -2,60 +2,46 @@ services:
2
2
  # PostgreSQL Database
3
3
  postgres:
4
4
  image: postgres:15-alpine
5
- container_name: ${PROJECT_NAME:-idealyst}-postgres
6
5
  environment:
7
- POSTGRES_DB: ${POSTGRES_DB:-idealyst_db}
8
- POSTGRES_USER: ${POSTGRES_USER:-postgres}
9
- POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
6
+ POSTGRES_DB: idealyst_db
7
+ POSTGRES_USER: postgres
8
+ POSTGRES_PASSWORD: postgres
10
9
  ports:
11
- - "${POSTGRES_PORT:-5432}:5432"
10
+ - "5432:5432"
12
11
  volumes:
13
12
  - postgres_data:/var/lib/postgresql/data
14
- networks:
15
- - idealyst-network
16
13
 
17
14
  # Redis Cache
18
15
  redis:
19
16
  image: redis:7-alpine
20
- container_name: ${PROJECT_NAME:-idealyst}-redis
21
17
  ports:
22
- - "${REDIS_PORT:-6379}:6379"
18
+ - "6379:6379"
23
19
  volumes:
24
20
  - redis_data:/data
25
- networks:
26
- - idealyst-network
27
21
 
28
22
  # Development Service (for devcontainer)
29
23
  app:
30
24
  build:
31
- context: ..
32
- dockerfile: .devcontainer/Dockerfile
33
- container_name: ${PROJECT_NAME:-idealyst}-app
25
+ context: .
26
+ dockerfile: Dockerfile
34
27
  environment:
35
28
  NODE_ENV: development
36
29
  DATABASE_URL: postgresql://postgres:postgres@postgres:5432/idealyst_db
37
30
  REDIS_URL: redis://redis:6379
38
31
  ports:
39
- - "3000:3000" # Web dev server
40
- - "3001:3001" # API dev server
41
- - "5173:5173" # Vite dev server
42
- - "8080:8080" # Additional dev server
43
- - "19006:19006" # Expo dev tools
32
+ - "3000:3000"
33
+ - "3001:3001"
34
+ - "5173:5173"
35
+ - "8080:8080"
36
+ - "19006:19006"
44
37
  volumes:
45
38
  - ..:/workspace
46
- - node_modules:/workspace/node_modules
39
+ - /workspace/node_modules
47
40
  depends_on:
48
41
  - postgres
49
42
  - redis
50
- networks:
51
- - idealyst-network
52
43
  command: sleep infinity
53
44
 
54
45
  volumes:
55
46
  postgres_data:
56
47
  redis_data:
57
- node_modules:
58
-
59
- networks:
60
- idealyst-network:
61
- driver: bridge