@seip/blue-bird 0.9.7 → 0.9.9

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/AGENTS.md CHANGED
@@ -117,7 +117,7 @@ Production deployments always use Docker for orchestration, running:
117
117
 
118
118
  ```bash
119
119
  # Manage containers using blue-bird CLI
120
- npx blue-bird docker dev # Starts development app stack (DB, redis, app, nginx) with npm run dev
120
+ npx blue-bird docker dev # Starts development database & redis containers. Run npm run dev manually.
121
121
  npx blue-bird docker start # Starts production app stack (DB, redis, app, nginx)
122
122
  npx blue-bird docker start db # Starts configured database container only (postgres or mysql)
123
123
  npx blue-bird docker start redis # Starts Redis container only
package/README.md CHANGED
@@ -385,7 +385,7 @@ npx blue-bird docker <command> [options]
385
385
 
386
386
  ### Supported Actions:
387
387
 
388
- - **`npx blue-bird docker dev`**: Boots the development stack (Node.js App with `npm run dev` + Nginx + Database + Redis).
388
+ - **`npx blue-bird docker dev`**: Boots the development database and Redis containers. Run `npm run dev` locally on your host machine.
389
389
  - **`npx blue-bird docker start`**: Boots the production stack (Node.js App + Nginx + Database + Redis).
390
390
  - **`npx blue-bird docker start db`** (or `postgres` / `mysql`): Boots the configured database container only (great for local development outside Docker).
391
391
  - **`npx blue-bird docker start redis`**: Boots the Redis container only.
package/core/app.js CHANGED
@@ -157,15 +157,15 @@ class App {
157
157
  next();
158
158
  });
159
159
 
160
- if (this.static.path)
160
+ if (this.static.path || props.debug)
161
161
  this.app.use(
162
- express.static(path.join(__dirname, this.static.path), {
162
+ express.static(path.join(__dirname, this.static.path || "frontend"), {
163
163
  ...this.static.options,
164
164
  setHeaders: (res) => {
165
165
  res.setHeader("X-Powered-By", "Blue Bird");
166
166
  res.setHeader(
167
167
  "Cache-Control",
168
- "public, max-age=31536000, immutable",
168
+ props.debug ? "no-cache" : "public, max-age=31536000, immutable",
169
169
  );
170
170
  },
171
171
  }),
@@ -336,14 +336,14 @@ class App {
336
336
  this.server.listen(this.port, () => {
337
337
  console.log(
338
338
  chalk.bold.blue("Blue Bird Server Online\n") +
339
- chalk.bold.cyan("App URL: ") +
340
- chalk.green(`${this.appUrl}`) +
341
- "\n" +
342
- chalk.bold.cyan("Internal: ") +
343
- chalk.green(`${this.host}:${this.port}`) +
344
- "\n" +
345
- (props.debug ? chalk.bold.magenta("Hot Reload: enabled\n") : "") +
346
- chalk.gray("────────────────────────────────"),
339
+ chalk.bold.cyan("App URL: ") +
340
+ chalk.green(`${this.appUrl}`) +
341
+ "\n" +
342
+ chalk.bold.cyan("Internal: ") +
343
+ chalk.green(`${this.host}:${this.port}`) +
344
+ "\n" +
345
+ (props.debug ? chalk.bold.magenta("Hot Reload: enabled\n") : "") +
346
+ chalk.gray("────────────────────────────────"),
347
347
  );
348
348
  });
349
349
  })
@@ -145,29 +145,25 @@ async function startCommand(service) {
145
145
  /**
146
146
  * Handles the 'dev' CLI command.
147
147
  */
148
- async function devCommand() {
149
- checkComposeFile();
150
- console.log(chalk.cyan("Starting development stack (DB + Redis + App (npm run dev) + Nginx)..."));
151
-
152
- const devComposeFile = path.join(process.cwd(), "docker", "docker-compose.dev.yml");
153
- const cmdArgs = ["compose", "-f", "docker-compose.yml"];
154
-
155
- if (fs.existsSync(devComposeFile)) {
156
- cmdArgs.push("-f", "docker/docker-compose.dev.yml");
157
- } else {
158
- console.log(chalk.yellow("[WARN] docker/docker-compose.dev.yml not found, running standard stack."));
159
- }
160
-
161
- cmdArgs.push("--profile", "prod", "up", "-d");
162
-
163
- const code = await runCmd("docker", cmdArgs);
164
- if (code === 0) {
165
- console.log(chalk.green("Development stack started."));
166
- console.log(chalk.cyan("View live logs with: npx blue-bird docker logs"));
167
- } else {
168
- console.error(chalk.red("Error starting development stack."));
169
- process.exit(1);
170
- }
148
+ async function devCommand() {
149
+ checkComposeFile();
150
+ const dbType = getDbType();
151
+ console.log(chalk.cyan("Starting development environment (Database + Redis)..."));
152
+
153
+ const containers = ["redis"];
154
+ if (dbType !== "none") {
155
+ containers.unshift(dbType);
156
+ }
157
+
158
+ const code = await runCmd("docker", ["compose", "up", "-d", ...containers]);
159
+ if (code === 0) {
160
+ console.log(chalk.green("Development containers started."));
161
+ console.log(chalk.cyan("View live logs with: npx blue-bird docker logs db"));
162
+ console.log(chalk.yellow("Now execute: npm run dev"));
163
+ } else {
164
+ console.error(chalk.red("Error starting development environment."));
165
+ process.exit(1);
166
+ }
171
167
  }
172
168
 
173
169
  /**
@@ -38,9 +38,6 @@ services:
38
38
  volumes:
39
39
  - .:/app:ro
40
40
  - ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
41
- depends_on:
42
- app:
43
- condition: service_started
44
41
  networks:
45
42
  - bluebird_net
46
43
  profiles:
@@ -35,9 +35,6 @@ services:
35
35
  volumes:
36
36
  - .:/app:ro
37
37
  - ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
38
- depends_on:
39
- app:
40
- condition: service_started
41
38
  networks:
42
39
  - bluebird_net
43
40
  profiles:
@@ -38,9 +38,6 @@ services:
38
38
  volumes:
39
39
  - .:/app:ro
40
40
  - ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
41
- depends_on:
42
- app:
43
- condition: service_started
44
41
  networks:
45
42
  - bluebird_net
46
43
  profiles:
@@ -38,9 +38,6 @@ services:
38
38
  volumes:
39
39
  - .:/app:ro
40
40
  - ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
41
- depends_on:
42
- app:
43
- condition: service_started
44
41
  networks:
45
42
  - bluebird_net
46
43
  profiles:
package/package.json CHANGED
@@ -1,66 +1,66 @@
1
- {
2
- "name": "@seip/blue-bird",
3
- "version": "0.9.7",
4
- "description": "Express opinionated API framework with built-in JWT auth, validation, and caching",
5
- "type": "module",
6
- "types": "core/index.d.ts",
7
- "exports": {
8
- "./*": "./*"
9
- },
10
- "bin": {
11
- "blue-bird": "core/cli/init.js"
12
- },
13
- "repository": {
14
- "type": "git",
15
- "url": "git+https://github.com/seip25/Blue-bird.git"
16
- },
17
- "keywords": [
18
- "express",
19
- "framework",
20
- "html",
21
- "api",
22
- "jwt",
23
- "seo"
24
- ],
25
- "author": "Seip25",
26
- "license": "MIT",
27
- "bugs": {
28
- "url": "https://github.com/seip25/Blue-bird/issues"
29
- },
30
- "homepage": "https://seip25.github.io/Blue-bird/",
31
- "scripts": {
32
- "dev": "node --watch --env-file=.env backend/index.js",
33
- "start": "node --env-file=.env backend/index.js",
34
- "init": "node core/cli/init.js",
35
- "route": "node core/cli/route.js",
36
- "swagger-install": "node core/cli/swagger.js",
37
- "docker": "node core/cli/init.js docker"
38
- },
39
- "publishConfig": {
40
- "access": "public"
41
- },
42
- "files": [
43
- "core",
44
- "backend",
45
- "frontend",
46
- "docker",
47
- "docker-compose.yml",
48
- "AGENTS.md",
49
- "index.js",
50
- ".env_example"
51
- ],
52
- "dependencies": {
53
- "chalk": "^5.6.2",
54
- "compression": "^1.8.1",
55
- "cookie-parser": "^1.4.7",
56
- "cors": "^2.8.6",
57
- "express": "^5.2.1",
58
- "express-rate-limit": "^8.2.1",
59
- "helmet": "^8.1.0",
60
- "jsonwebtoken": "^9.0.2",
61
- "multer": "^2.0.2",
62
- "redis": "^6.1.0",
63
- "ws": "^8.18.0",
64
- "xss": "^1.0.15"
65
- }
1
+ {
2
+ "name": "@seip/blue-bird",
3
+ "version": "0.9.9",
4
+ "description": "Express opinionated API framework with built-in JWT auth, validation, and caching",
5
+ "type": "module",
6
+ "types": "core/index.d.ts",
7
+ "exports": {
8
+ "./*": "./*"
9
+ },
10
+ "bin": {
11
+ "blue-bird": "core/cli/init.js"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/seip25/Blue-bird.git"
16
+ },
17
+ "keywords": [
18
+ "express",
19
+ "framework",
20
+ "html",
21
+ "api",
22
+ "jwt",
23
+ "seo"
24
+ ],
25
+ "author": "Seip25",
26
+ "license": "MIT",
27
+ "bugs": {
28
+ "url": "https://github.com/seip25/Blue-bird/issues"
29
+ },
30
+ "homepage": "https://seip25.github.io/Blue-bird/",
31
+ "scripts": {
32
+ "dev": "node --watch --env-file=.env backend/index.js",
33
+ "start": "node --env-file=.env backend/index.js",
34
+ "init": "node core/cli/init.js",
35
+ "route": "node core/cli/route.js",
36
+ "swagger-install": "node core/cli/swagger.js",
37
+ "docker": "node core/cli/init.js docker"
38
+ },
39
+ "publishConfig": {
40
+ "access": "public"
41
+ },
42
+ "files": [
43
+ "core",
44
+ "backend",
45
+ "frontend",
46
+ "docker",
47
+ "docker-compose.yml",
48
+ "AGENTS.md",
49
+ "index.js",
50
+ ".env_example"
51
+ ],
52
+ "dependencies": {
53
+ "chalk": "^5.6.2",
54
+ "compression": "^1.8.1",
55
+ "cookie-parser": "^1.4.7",
56
+ "cors": "^2.8.6",
57
+ "express": "^5.2.1",
58
+ "express-rate-limit": "^8.2.1",
59
+ "helmet": "^8.1.0",
60
+ "jsonwebtoken": "^9.0.2",
61
+ "multer": "^2.0.2",
62
+ "redis": "^6.1.0",
63
+ "ws": "^8.18.0",
64
+ "xss": "^1.0.15"
65
+ }
66
66
  }