@brickkit/cli 0.3.0 → 0.4.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/README.md CHANGED
@@ -4,6 +4,8 @@ CLI and server engine for the Brick-TS framework. Mounts services,
4
4
  actions, and resources as a typed HTTP API (Elysia) with OpenAPI 3.1,
5
5
  Scalar/Swagger docs, request logging, and MCP routes.
6
6
 
7
+ You need Bun 1.2 or later.
8
+
7
9
  ```sh
8
10
  bun add @brickkit/cli @brickkit/core
9
11
  ```
@@ -15,6 +17,20 @@ const app = brick({ title: "Pages API", version: "1.0.0" });
15
17
  app.listen(3333);
16
18
  ```
17
19
 
20
+ ## Commands
21
+
22
+ Every command except `dev` and `start` takes a required `<entry>`: a module
23
+ whose default export is a `BrickApp` that does not call `.listen()`.
24
+
25
+ ```sh
26
+ brick dev [entry] [--port 4000]
27
+ brick start [entry] [--port 4000]
28
+ brick build <entry> [--outdir dist/brick] [--port <number>] [--no-aot]
29
+ brick gen openapi <entry> [--output openapi.json]
30
+ brick gen client <entry> [--output _brick/contract.ts]
31
+ brick info <entry>
32
+ ```
33
+
18
34
  Build the backend directly from registered services:
19
35
 
20
36
  ```ts
@@ -27,13 +43,16 @@ const app = brick({ services: [pagesService, billingService] });
27
43
  The typed HTTP client is available from `@brickkit/core/client`. See
28
44
  `www/content/docs/(brick)/typed-client.mdx` for routing and error handling.
29
45
 
30
- The `brick` binary ships in this package for local dev and inspection:
46
+ The `brick` binary ships in this package for local dev and inspection.
47
+ `dev` and `start` accept an optional entry and resolve the port from
48
+ `--port`, then `PORT`, then 4000:
31
49
 
32
50
  ```sh
33
51
  brick dev --port 4000
34
- brick gen openapi --output openapi.json
52
+ brick dev src/app.ts --port 4000
53
+ brick gen openapi src/app.ts --output openapi.json
35
54
  brick gen client src/app.ts
36
- brick info
55
+ brick info src/app.ts
37
56
  ```
38
57
 
39
58
  Source: <https://github.com/Chandraprakash-Darji/brick>.
package/dist/bin.js CHANGED
@@ -40,7 +40,7 @@ function parsePort(portStr, envPort) {
40
40
  }
41
41
  //#endregion
42
42
  //#region src/bin.ts
43
- const CLI_VERSION = "0.3.0";
43
+ const CLI_VERSION = "0.4.0";
44
44
  const PORT_HELP = "Port to listen on (CLI --port overrides PORT env, default 4000)";
45
45
  const PORT_RESOLUTION_HELP = `
46
46
  Port Resolution (dev/start commands):
package/dist/compiler.js CHANGED
@@ -1,2 +1 @@
1
- import { a as emitHandlerFactory, i as emitCompiledApplication, n as compileBrickApplication, r as loadCompiledBrickApp, t as bindCompiledApplication } from "./compiler2.js";
2
- export { bindCompiledApplication, compileBrickApplication, emitCompiledApplication, emitHandlerFactory, loadCompiledBrickApp };
1
+ export { t as bindCompiledApplication, n as compileBrickApplication, i as emitCompiledApplication, a as emitHandlerFactory, r as loadCompiledBrickApp } from "./compiler2.js";
package/package.json CHANGED
@@ -1,7 +1,19 @@
1
1
  {
2
2
  "name": "@brickkit/cli",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "CLI and server engine for Brick-TS",
5
+ "keywords": [
6
+ "typescript",
7
+ "bun",
8
+ "cli",
9
+ "dev-server",
10
+ "elysia",
11
+ "openapi-generator",
12
+ "typed-client",
13
+ "vite-plugin",
14
+ "build-tool",
15
+ "mcp"
16
+ ],
5
17
  "license": "MIT",
6
18
  "type": "module",
7
19
  "main": "./dist/index.js",
@@ -49,18 +61,18 @@
49
61
  "format:check": "oxfmt --check ."
50
62
  },
51
63
  "dependencies": {
52
- "@brickkit/core": "^0.3.0",
53
- "@sinclair/typebox": "^0.34.0",
64
+ "@brickkit/core": "^0.4.0",
65
+ "@sinclair/typebox": "^0.34.52",
54
66
  "commander": "^15.0.0",
55
67
  "elysia": "2.0.0-beta.29"
56
68
  },
57
69
  "devDependencies": {
58
- "@types/bun": "latest",
59
- "oxfmt": "^0.72.0",
60
- "oxlint": "^1.87.0",
61
- "tsdown": "^0.23.0",
70
+ "@types/bun": "^1.4.3",
71
+ "oxfmt": "^0.73.0",
72
+ "oxlint": "^1.88.0",
73
+ "tsdown": "^0.23.1",
62
74
  "typescript": "^5.7.0",
63
- "vite": "^8.3.0"
75
+ "vite": "^8.3.4"
64
76
  },
65
77
  "peerDependencies": {
66
78
  "vite": "^8.0.0"