@titanpl/cli 5.0.5 → 5.0.6

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": "@titanpl/cli",
3
- "version": "5.0.5",
3
+ "version": "5.0.6",
4
4
  "description": "The unified CLI for Titan Planet. Use it to create, manage, build, and deploy high-performance backend projects.",
5
5
  "keywords": [
6
6
  "titanpl",
@@ -1 +0,0 @@
1
- TITAN_DEV=1
@@ -1,60 +0,0 @@
1
- # ================================================================
2
- # STAGE 1 — Builder
3
- # ================================================================
4
- FROM node:20-slim AS builder
5
-
6
- WORKDIR /app
7
-
8
- # build-essential is required for native Titan extensions (C++ or Rust based)
9
- RUN apt-get update && apt-get install -y --no-install-recommends \
10
- build-essential pkg-config git ca-certificates \
11
- && rm -rf /var/lib/apt/lists/*
12
-
13
- ENV NODE_ENV=production
14
-
15
- COPY package.json package-lock.json* ./
16
-
17
- # Install dependencies (including optional engines)
18
- RUN npm install --include=optional
19
-
20
- COPY . .
21
-
22
- # Run the Titan release build step
23
- # This extracts extensions to .ext and prepares the 'build/' folder
24
- RUN npx titan build --release
25
-
26
-
27
- # ================================================================
28
- # STAGE 2 — Runtime (Optimized Pure Engine)
29
- # ================================================================
30
- FROM ubuntu:24.04
31
-
32
- # Use an unprivileged user for security
33
- RUN groupadd -r titan && useradd -r -g titan titan
34
-
35
- WORKDIR /app
36
-
37
- RUN apt-get update && apt-get install -y --no-install-recommends \
38
- ca-certificates curl \
39
- && rm -rf /var/lib/apt/lists/*
40
-
41
- # Copy the entire release build folder prepared by Stage 1
42
- COPY --from=builder /app/build ./
43
-
44
- # Ensure permissions
45
- RUN chown -R titan:titan /app
46
-
47
- # Standard environment variables
48
- ENV HOST=0.0.0.0
49
- ENV PORT=5100
50
- ENV TITAN_DEV=0
51
-
52
- USER titan
53
- EXPOSE 5100
54
-
55
- # Health check
56
- HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
57
- CMD curl -f http://localhost:5100/ || exit 1
58
-
59
- # Start the server using the 'titan-server' binary created by the release process
60
- CMD ["./titan-server", "run", "dist"]
@@ -1,85 +0,0 @@
1
- # ⏣ Titan Project
2
-
3
- Welcome to your new **Titan Planet** project! Titan is a high-performance web framework designed for scale, speed, and developer happiness.
4
-
5
- ## 🚀 Getting Started
6
-
7
- ### 1. Install Dependencies
8
- ```bash
9
- npm install
10
- ```
11
-
12
- ### 2. Start Development Server
13
- Run the project in development mode with hot-reloading:
14
- ```bash
15
- titan dev
16
- ```
17
-
18
- ### 3. Build for Production
19
- Create a self-contained production bundle in the `build/` directory:
20
- ```bash
21
- titan build --release
22
- ```
23
-
24
- ### 4. Run Production Server
25
- ```bash
26
- cd build
27
- titan start
28
- ```
29
-
30
- ---
31
-
32
- ## 📂 Project Structure
33
-
34
- - `app/actions/` - Your JavaScript/TypeScript backend logic.
35
- - `public/` - Static assets served directly (images, robots.txt, etc.).
36
- - `tanfig.json` - Core project configuration and build settings.
37
- - `.env` - Environment variables.
38
-
39
- ---
40
-
41
- ## 🛠 Configuration (`tanfig.json`)
42
-
43
- Your project uses `tanfig.json` to control the build and runtime behavior.
44
-
45
- ```json
46
- {
47
- "name": "my-titan-app",
48
- "build": {
49
- "purpose": "test",
50
- "files": ["public", "static", "db", "config"]
51
- }
52
- }
53
- ```
54
-
55
- ### Build Options:
56
- - **`purpose`**:
57
- - `test`: (Default) Creates a `node_modules` junction for local testing.
58
- - `deploy`: Slim build without `node_modules`, ready for production.
59
- - **`files`**: List of folders/files from the root to include in the production `build/` folder.
60
-
61
- ---
62
-
63
- ## 🐳 Docker Deployment
64
-
65
- This project comes with a pre-configured, multi-stage `Dockerfile` optimized for Titan's native engine.
66
-
67
- ### Build Image
68
- ```bash
69
- docker build -t my-titan-app .
70
- ```
71
-
72
- ### Run Container
73
- ```bash
74
- docker run -p 5100:5100 my-titan-app
75
- ```
76
-
77
- ---
78
-
79
- ## 🌐 Community & Support
80
-
81
- - **Documentation**: [docs.titanpl.com](https://titanpl.vercel.app)
82
- - **GitHub**: [github.com/t8nlab/titanpl](https://github.com/t8nlab/titanpl)
83
- - **Discord**: [Join our community](https://discord.gg/titanpl)
84
-
85
- Built with ❤️ by the **Titan Planet** team.
@@ -1,35 +0,0 @@
1
- node_modules
2
- npm-debug.log
3
- .git
4
- .gitignore
5
-
6
- package-lock.json
7
- yarn.lock
8
-
9
- # Titan Gravity Engine
10
- dist/
11
- .titan/
12
- .ext/
13
-
14
- deploy/
15
-
16
- # Rust Build Artifacts
17
- server/target/
18
- Cargo.lock
19
-
20
- # OS Files
21
- .DS_Store
22
- Thumbs.db
23
- *.tmp
24
- *.bak
25
-
26
- # Environment & Secrets
27
- .env
28
- .env.local
29
- .env.*.local
30
-
31
- # IDEs
32
- .vscode/
33
- .idea/
34
- *.swp
35
- *.swo
@@ -1,34 +0,0 @@
1
- # Node & Packages
2
- node_modules/
3
- npm-debug.log*
4
- yarn-debug.log*
5
- yarn-error.log*
6
- package-lock.json
7
- yarn.lock
8
-
9
- # Titan Engine (Auto-generated - DO NOT COMMIT)
10
- dist/
11
- .titan/
12
- .ext/
13
- .env
14
- build/
15
-
16
- # Rust Build Artifacts (If using Hybrid)
17
- server/target/
18
- Cargo.lock
19
-
20
- # OS Files
21
- .DS_Store
22
- Thumbs.db
23
- *.tmp
24
- *.bak
25
-
26
- # Environment & Secrets
27
- .env.local
28
- .env.*.local
29
-
30
- # IDEs
31
- .vscode/
32
- .idea/
33
- *.swp
34
- *.swo
@@ -1,14 +0,0 @@
1
- {
2
- "name": "{{name}}",
3
- "description": "A powerful Titan Planet project",
4
- "version": "1.0.0",
5
- "build": {
6
- "purpose": "test",
7
- "files": [
8
- "public",
9
- "static",
10
- "db",
11
- "config"
12
- ]
13
- }
14
- }