@seip/blue-bird 0.9.8 → 1.0.0

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 environment stack (DB, redis, nginx). Run npm run dev manually.
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 environment stack (Database + Redis + Nginx). Run `npm run dev` locally to start the Node.js application.
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,16 @@ 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
+ extensions: ["html"],
163
164
  ...this.static.options,
164
165
  setHeaders: (res) => {
165
166
  res.setHeader("X-Powered-By", "Blue Bird");
166
167
  res.setHeader(
167
168
  "Cache-Control",
168
- "public, max-age=31536000, immutable",
169
+ props.debug ? "no-cache" : "public, max-age=31536000, immutable",
169
170
  );
170
171
  },
171
172
  }),
@@ -336,14 +337,14 @@ class App {
336
337
  this.server.listen(this.port, () => {
337
338
  console.log(
338
339
  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("────────────────────────────────"),
340
+ chalk.bold.cyan("App URL: ") +
341
+ chalk.green(`${this.appUrl}`) +
342
+ "\n" +
343
+ chalk.bold.cyan("Internal: ") +
344
+ chalk.green(`${this.host}:${this.port}`) +
345
+ "\n" +
346
+ (props.debug ? chalk.bold.magenta("Hot Reload: enabled\n") : "") +
347
+ chalk.gray("────────────────────────────────"),
347
348
  );
348
349
  });
349
350
  })
@@ -148,20 +148,20 @@ async function startCommand(service) {
148
148
  async function devCommand() {
149
149
  checkComposeFile();
150
150
  const dbType = getDbType();
151
- console.log(chalk.cyan("Starting development stack (DB + Redis + Nginx)..."));
151
+ console.log(chalk.cyan("Starting development environment (Database + Redis)..."));
152
152
 
153
- const containers = ["redis", "nginx"];
153
+ const containers = ["redis"];
154
154
  if (dbType !== "none") {
155
155
  containers.unshift(dbType);
156
156
  }
157
157
 
158
158
  const code = await runCmd("docker", ["compose", "up", "-d", ...containers]);
159
159
  if (code === 0) {
160
- console.log(chalk.green("Development stack started."));
161
- console.log(chalk.cyan("View live logs with: npx blue-bird docker logs"));
160
+ console.log(chalk.green("Development containers started."));
161
+ console.log(chalk.cyan("View live logs with: npx blue-bird docker logs db"));
162
162
  console.log(chalk.yellow("Now execute: npm run dev"));
163
163
  } else {
164
- console.error(chalk.red("Error starting development stack."));
164
+ console.error(chalk.red("Error starting development environment."));
165
165
  process.exit(1);
166
166
  }
167
167
  }
package/core/config.js CHANGED
@@ -42,8 +42,10 @@ class Config {
42
42
  port: Number.isNaN(portRaw) ? 3000 : portRaw,
43
43
  jwtSecret: process.env.JWT_SECRET,
44
44
  static: {
45
- path: process.env.STATIC_PATH || "frontend/public",
46
- options: {},
45
+ path: process.env.STATIC_PATH || "frontend",
46
+ options: {
47
+ extensions: ["html"],
48
+ },
47
49
  },
48
50
  };
49
51
  return _cachedProps;
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "@seip/blue-bird",
3
- "version": "0.9.8",
3
+ "version": "1.0.0",
4
4
  "description": "Express opinionated API framework with built-in JWT auth, validation, and caching",
5
5
  "type": "module",
6
6
  "types": "core/index.d.ts",
@@ -63,4 +63,4 @@
63
63
  "ws": "^8.18.0",
64
64
  "xss": "^1.0.15"
65
65
  }
66
- }
66
+ }