@idealyst/cli 1.0.34 → 1.0.36

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idealyst/cli",
3
- "version": "1.0.34",
3
+ "version": "1.0.36",
4
4
  "description": "CLI tool for generating Idealyst Framework projects",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -0,0 +1,25 @@
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
+ # Create workspace directory
13
+ RUN mkdir -p /workspace
14
+
15
+ # Set working directory
16
+ WORKDIR /workspace
17
+
18
+ # Install global tools that might be useful
19
+ RUN npm install -g @expo/cli
20
+
21
+ # Set up git (will be configured in setup script)
22
+ RUN git config --global init.defaultBranch main
23
+
24
+ # Keep container running
25
+ 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,7 +2,7 @@ services:
2
2
  # PostgreSQL Database
3
3
  postgres:
4
4
  image: postgres:15-alpine
5
- container_name: ${PROJECT_NAME:-truday}-postgres
5
+ container_name: ${PROJECT_NAME:-idealyst}-postgres
6
6
  environment:
7
7
  POSTGRES_DB: ${POSTGRES_DB:-idealyst_db}
8
8
  POSTGRES_USER: ${POSTGRES_USER:-postgres}
@@ -11,40 +11,30 @@ services:
11
11
  - "${POSTGRES_PORT:-5432}:5432"
12
12
  volumes:
13
13
  - 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
14
  networks:
21
15
  - idealyst-network
22
16
 
23
17
  # Redis Cache
24
18
  redis:
25
19
  image: redis:7-alpine
26
- container_name: ${PROJECT_NAME:-truday}-redis
20
+ container_name: ${PROJECT_NAME:-idealyst}-redis
27
21
  ports:
28
22
  - "${REDIS_PORT:-6379}:6379"
29
23
  volumes:
30
24
  - redis_data:/data
31
- healthcheck:
32
- test: ["CMD", "redis-cli", "ping"]
33
- interval: 30s
34
- timeout: 10s
35
- retries: 5
36
25
  networks:
37
26
  - idealyst-network
38
27
 
39
28
  # Development Service (for devcontainer)
40
- dev:
29
+ app:
41
30
  build:
42
31
  context: ..
43
- dockerfile: Dockerfile
44
- target: dev
45
- container_name: ${PROJECT_NAME:-truday}-dev
32
+ dockerfile: .devcontainer/Dockerfile
33
+ container_name: ${PROJECT_NAME:-idealyst}-app
46
34
  environment:
47
35
  NODE_ENV: development
36
+ DATABASE_URL: postgresql://postgres:postgres@postgres:5432/idealyst_db
37
+ REDIS_URL: redis://redis:6379
48
38
  ports:
49
39
  - "3000:3000" # Web dev server
50
40
  - "3001:3001" # API dev server
@@ -52,22 +42,19 @@ services:
52
42
  - "8080:8080" # Additional dev server
53
43
  - "19006:19006" # Expo dev tools
54
44
  volumes:
55
- - ..:/app
56
- - /app/node_modules
57
- - /var/run/docker.sock:/var/run/docker.sock:ro
45
+ - ..:/workspace
46
+ - node_modules:/workspace/node_modules
58
47
  depends_on:
59
- postgres:
60
- condition: service_healthy
61
- redis:
62
- condition: service_healthy
48
+ - postgres
49
+ - redis
63
50
  networks:
64
51
  - idealyst-network
65
- tty: true
66
- stdin_open: true
52
+ command: sleep infinity
67
53
 
68
54
  volumes:
69
55
  postgres_data:
70
56
  redis_data:
57
+ node_modules:
71
58
 
72
59
  networks:
73
60
  idealyst-network:
@@ -1,31 +1,15 @@
1
1
  #!/bin/bash
2
2
 
3
- # Post-create script for Idealyst dev container
4
3
  echo "🚀 Setting up Idealyst development environment..."
5
4
 
6
- # Set proper permissions
7
- sudo chown -R devuser:devuser /app
8
-
9
- # Make scripts executable
10
- chmod +x /app/scripts/*.sh
11
-
12
- # Install dependencies if not already installed
13
- if [ ! -d "/app/node_modules" ]; then
14
- echo "📦 Installing dependencies..."
15
- yarn install
16
- fi
17
-
18
- # Set up git configuration (if not already set)
19
- if [ -z "$(git config --global user.name)" ]; then
20
- echo "⚙️ Please configure git:"
21
- echo " git config --global user.name \"Your Name\""
22
- echo " git config --global user.email \"your.email@example.com\""
23
- fi
5
+ # Install dependencies
6
+ echo "📦 Installing dependencies..."
7
+ yarn install
24
8
 
25
9
  # Create environment file if it doesn't exist
26
- if [ ! -f "/app/.env" ]; then
10
+ if [ ! -f ".env" ]; then
27
11
  echo "📝 Creating .env file..."
28
- cat > /app/.env << EOF
12
+ cat > .env << EOF
29
13
  # Database Configuration
30
14
  DATABASE_URL=postgresql://postgres:postgres@postgres:5432/idealyst_db
31
15
  POSTGRES_DB=idealyst_db
@@ -61,29 +45,20 @@ done
61
45
  echo "✅ Database is ready!"
62
46
 
63
47
  # Run database migrations if they exist
64
- if [ -d "/app/packages" ]; then
48
+ if [ -d "packages" ]; then
65
49
  echo "🗄️ Setting up database..."
66
50
 
67
51
  # Check if any package has prisma
68
- for package_dir in /app/packages/*/; do
52
+ for package_dir in packages/*/; do
69
53
  if [ -f "${package_dir}prisma/schema.prisma" ]; then
70
54
  echo "Running Prisma setup for $(basename "$package_dir")..."
71
55
  cd "$package_dir"
72
56
  npx prisma generate
73
57
  npx prisma db push
74
- cd /app
58
+ cd /workspace
75
59
  fi
76
60
  done
77
61
  fi
78
62
 
79
- # Set up git hooks if husky is present
80
- if [ -f "/app/package.json" ] && grep -q "husky" /app/package.json; then
81
- echo "🐕 Setting up git hooks..."
82
- yarn husky install
83
- fi
84
-
85
- # Create helpful aliases
86
- echo "⚡ Setting up helpful aliases..."
87
- cat >> ~/.bashrc << EOF
88
-
89
- source ~/.bashrc
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