rapidkit 0.14.0 → 0.14.2

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/README.md CHANGED
@@ -5,11 +5,13 @@
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)
6
6
  [![GitHub Stars](https://img.shields.io/github/stars/getrapidkit/rapidkit-npm.svg?style=flat-square)](https://github.com/getrapidkit/rapidkit-npm/stargazers)
7
7
 
8
- > ⚠️ **PRE-RELEASE VERSION** - This is a companion tool for RapidKit framework.
9
- > The stable production version of RapidKit Python will be released soon on PyPI.
8
+ > ⚠️ **PREVIEW VERSION** - This package provides demo templates for testing RapidKit's workflow.
9
+ > Full module ecosystem and advanced features will be available after the Python Core release.
10
10
 
11
11
  🚀 The easiest way to create FastAPI and NestJS projects with RapidKit templates!
12
12
 
13
+ > 🔮 **Coming Soon:** AI-powered module recommendations when Core modules are released!
14
+
13
15
  **💡 Tip:** Use the [RapidKit VS Code Extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode) for a visual interface!
14
16
 
15
17
  ## Quick Start
@@ -60,10 +62,12 @@ npx rapidkit admin-api --template nestjs # Create NestJS project
60
62
 
61
63
  ## Templates
62
64
 
63
- | Template | Framework | Description |
64
- |----------|-----------|-------------|
65
- | `fastapi` | FastAPI | Python async web framework with automatic API docs |
66
- | `nestjs` | NestJS | TypeScript Node.js framework with modular architecture |
65
+ | Template | Framework | Description |
66
+ | --------- | --------- | ------------------------------------------------------ |
67
+ | `fastapi` | FastAPI | Python async web framework with automatic API docs |
68
+ | `nestjs` | NestJS | TypeScript Node.js framework with modular architecture |
69
+
70
+ > 📦 **Note:** These templates are designed for testing the RapidKit workflow. Full module ecosystem coming with Core release!
67
71
 
68
72
  ## CLI Options
69
73
 
@@ -72,11 +76,13 @@ npx rapidkit [project-name] [options]
72
76
  ```
73
77
 
74
78
  ### Arguments
79
+
75
80
  - `project-name` - Name of project/workspace directory to create
76
81
 
77
82
  ### Options
83
+
78
84
  - `-t, --template <template>` - Template to use: `fastapi` or `nestjs` (creates direct project)
79
- - `--skip-git` - Skip git initialization
85
+ - `--skip-git` - Skip git initialization
80
86
  - `--skip-install` - Skip installing dependencies (for NestJS)
81
87
  - `--debug` - Enable verbose debug logging
82
88
  - `--dry-run` - Preview what would be created without creating it
@@ -158,9 +164,34 @@ my-api/
158
164
 
159
165
  ## Requirements
160
166
 
161
- - **Node.js**: 18+ (for running npx)
162
- - **For FastAPI**: Python 3.11+ with Poetry
167
+ - **Node.js**: 20.19.6+ (LTS recommended)
168
+ - **For FastAPI**: Python 3.10.14+ with Poetry 2.2.1+
163
169
  - **For NestJS**: Node.js 20+ with npm/yarn/pnpm
170
+ - **Git**: For version control
171
+
172
+ > 💡 **Tip:** Use [RapidKit VS Code Extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode) - includes system checker to verify all requirements!
173
+
174
+ ## What's Next?
175
+
176
+ This npm package is currently in **preview mode** with demo templates. Here's what's coming:
177
+
178
+ ### 🚀 After Core Release (v1.0.0)
179
+
180
+ - **Full Module Ecosystem** - 50+ production-ready modules
181
+ - **AI-Powered Recommendations** - Intelligent module suggestions
182
+ - **Seamless Integration** - npm package becomes thin wrapper over Python Core
183
+ - **Dynamic Modules** - Install any module from the registry
184
+ - **Advanced Features** - All RapidKit power through npm
185
+
186
+ ### 📦 Current Focus (v0.15.0)
187
+
188
+ - Polish existing features
189
+ - Improve documentation
190
+ - Optimize bundle size
191
+ - Prepare Core integration bridge
192
+ - Enhanced error messages
193
+
194
+ **Stay tuned!** Follow our progress on [GitHub](https://github.com/getrapidkit/rapidkit-npm).
164
195
 
165
196
  ## Development
166
197
 
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rapidkit",
3
- "version": "0.13.1",
3
+ "version": "0.14.2",
4
4
  "type": "module",
5
5
  "description": "Create RapidKit projects with a single command - The official CLI for RapidKit framework",
6
6
  "keywords": [
@@ -77,7 +77,7 @@
77
77
  "vitest": "^4.0.15"
78
78
  },
79
79
  "engines": {
80
- "node": ">=18.0.0"
80
+ "node": ">=20.19.6"
81
81
  },
82
82
  "lint-staged": {
83
83
  "*.ts": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rapidkit",
3
- "version": "0.14.0",
3
+ "version": "0.14.2",
4
4
  "type": "module",
5
5
  "description": "Create RapidKit projects with a single command - The official CLI for RapidKit framework",
6
6
  "keywords": [
@@ -56,6 +56,24 @@ def _python_code_targets(root: Path) -> list[str]:
56
56
  return targets or ["src"]
57
57
 
58
58
 
59
+ def _get_poetry_venv() -> Path | None:
60
+ """Get Poetry virtualenv path if it exists"""
61
+ try:
62
+ result = subprocess.run(
63
+ ["poetry", "env", "info", "--path"],
64
+ capture_output=True,
65
+ text=True,
66
+ check=False
67
+ )
68
+ if result.returncode == 0 and result.stdout.strip():
69
+ venv_path = Path(result.stdout.strip())
70
+ if venv_path.exists():
71
+ return venv_path
72
+ except Exception:
73
+ pass
74
+ return None
75
+
76
+
59
77
  def _venv_has_uvicorn(venv_path: Path) -> bool:
60
78
  if (venv_path / "bin" / "uvicorn").exists():
61
79
  return True
@@ -77,9 +95,16 @@ def dev(port: int = 8000, host: str = "0.0.0.0", allow_global_runtime: bool = Fa
77
95
  _print_banner("📁", f"Working directory: {root}")
78
96
  _print_banner("🌐", f"Server will be available at: http://{host}:{port}")
79
97
 
98
+ # Check for .venv or Poetry virtualenv
99
+ if not venv_dir.exists():
100
+ poetry_venv = _get_poetry_venv()
101
+ if poetry_venv:
102
+ venv_dir = poetry_venv
103
+ _print_banner("🐍", f"Using Poetry virtualenv: {venv_dir}")
104
+
80
105
  if venv_dir.exists():
81
106
  if not _venv_has_uvicorn(venv_dir):
82
- print("❌ Project .venv was found but uvicorn/fastapi doesn't appear installed.")
107
+ print("❌ Project virtualenv was found but uvicorn/fastapi doesn't appear installed.")
83
108
  print("💡 Run 'rapidkit init' to install dependencies.")
84
109
  sys.exit(1)
85
110
  else:
@@ -141,9 +166,16 @@ def start(port: int = 8000, host: str = "0.0.0.0", allow_global_runtime: bool =
141
166
 
142
167
  if ptype == "python":
143
168
  venv_dir = root / ".venv"
169
+
170
+ # Check for .venv or Poetry virtualenv
171
+ if not venv_dir.exists():
172
+ poetry_venv = _get_poetry_venv()
173
+ if poetry_venv:
174
+ venv_dir = poetry_venv
175
+
144
176
  if venv_dir.exists():
145
177
  if not _venv_has_uvicorn(venv_dir):
146
- print("❌ Project .venv was found but uvicorn/fastapi doesn't appear installed.")
178
+ print("❌ Project virtualenv was found but uvicorn/fastapi doesn't appear installed.")
147
179
  print("💡 Run 'poetry install' to install dependencies.")
148
180
  sys.exit(1)
149
181
  else:
@@ -48,6 +48,15 @@ fi
48
48
  VENV_PY="${ROOT_DIR}/.venv/bin/python"
49
49
  VENV_POETRY="${ROOT_DIR}/.venv/bin/poetry"
50
50
 
51
+ # Try to detect Poetry virtualenv path
52
+ if [ ! -d "${ROOT_DIR}/.venv" ] && command -v poetry >/dev/null 2>&1; then
53
+ POETRY_VENV_PATH=$(cd "$ROOT_DIR" && poetry env info --path 2>/dev/null || true)
54
+ if [ -n "$POETRY_VENV_PATH" ] && [ -d "$POETRY_VENV_PATH" ]; then
55
+ VENV_PY="${POETRY_VENV_PATH}/bin/python"
56
+ VENV_POETRY="${POETRY_VENV_PATH}/bin/poetry"
57
+ fi
58
+ fi
59
+
51
60
  case "$PKG_TYPE" in
52
61
  python)
53
62
  # prefer project-local poetry