@getstrata/starter 1.0.1 → 1.0.3
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/dist/cli.js
CHANGED
|
@@ -2528,10 +2528,11 @@ function renderPackageJson(projectName, options = {}) {
|
|
|
2528
2528
|
"@getstrata/cli": "workspace:*",
|
|
2529
2529
|
"@getstrata/core": "workspace:*"
|
|
2530
2530
|
} : {
|
|
2531
|
-
"@getstrata/bootstrap": "^1.0.
|
|
2532
|
-
"@getstrata/cli": "^1.0.
|
|
2533
|
-
"@getstrata/core": "^1.0.
|
|
2531
|
+
"@getstrata/bootstrap": "^1.0.3",
|
|
2532
|
+
"@getstrata/cli": "^1.0.3",
|
|
2533
|
+
"@getstrata/core": "^1.0.3"
|
|
2534
2534
|
};
|
|
2535
|
+
coreDeps.eta = "^4.6.0";
|
|
2535
2536
|
if (options.layers?.database === "mysql") {
|
|
2536
2537
|
coreDeps.mysql2 = "^3.24.3";
|
|
2537
2538
|
}
|
|
@@ -2626,7 +2627,7 @@ function renderSupportingToolsReadme(layers) {
|
|
|
2626
2627
|
}
|
|
2627
2628
|
function renderApiDocs(projectName, layers) {
|
|
2628
2629
|
const rows = ["| Method | Path | Notes |", "| --- | --- | --- |"];
|
|
2629
|
-
rows.push("| `GET` | `/health` | Plain text `ok` (200), or `degraded` (503)
|
|
2630
|
+
rows.push("| `GET` | `/health` | Plain text `ok` (200), or `degraded` (503) until the database ping succeeds and the migrated `notes` table exists. Docker HEALTHCHECK uses this path. |", '| `GET` | `/ready` | JSON from the framework: `{"status":"ready","checks":{"database":"ok","redis":"skipped"}}` (200) or `not_ready` (503). `redis` is `ok` or `error` when `REDIS_URL` is set and `skipped` otherwise. It does not check the schema, so use `/health` as the deploy gate. |');
|
|
2630
2631
|
rows.push("| `GET` | `/` | Welcome page. Restyle or replace it. |");
|
|
2631
2632
|
if (authUsesToken(layers.auth)) {
|
|
2632
2633
|
rows.push("| `POST` | `/api/v1/auth/login` | `{ email, password }` returns `{ token }`. |", "| `POST` | `/api/v1/auth/register` | Creates a user and returns a token. |", "| `GET` | `/api/v1/auth/me` | Requires `Authorization: Bearer <token>`. |");
|
|
@@ -4,7 +4,8 @@ This scaffold sets `FRONTEND_MODE=api`: no server-rendered views beyond the welc
|
|
|
4
4
|
|
|
5
5
|
## What exists after migrating
|
|
6
6
|
|
|
7
|
-
- `GET /health` returns plain text `ok`, or `degraded`
|
|
7
|
+
- `GET /health` returns plain text `ok`, or `degraded` (503) until the database ping succeeds and the migrated `notes` table exists. Docker HEALTHCHECK uses `/health`.
|
|
8
|
+
- `GET /ready` returns JSON `{"status":"ready","checks":{"database":"ok","redis":"skipped"}}` (200) or `not_ready` (503). `redis` is `ok` or `error` when `REDIS_URL` is set and `skipped` otherwise. It does not check the schema, so `/health` is the deploy gate.
|
|
8
9
|
- `GET /` returns the welcome page.
|
|
9
10
|
- A `notes` table, with no routes on it yet.
|
|
10
11
|
|
|
@@ -11,9 +11,10 @@
|
|
|
11
11
|
"check": "tsc --noEmit"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@getstrata/bootstrap": "^1.0.
|
|
15
|
-
"@getstrata/cli": "^1.0.
|
|
16
|
-
"@getstrata/core": "^1.0.
|
|
14
|
+
"@getstrata/bootstrap": "^1.0.3",
|
|
15
|
+
"@getstrata/cli": "^1.0.3",
|
|
16
|
+
"@getstrata/core": "^1.0.3",
|
|
17
|
+
"eta": "^4.6.0"
|
|
17
18
|
},
|
|
18
19
|
"devDependencies": {
|
|
19
20
|
"@types/bun": "^1.4.0",
|