create-strata 1.0.1 → 1.0.2

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,9 +2528,9 @@ function renderPackageJson(projectName, options = {}) {
2528
2528
  "@getstrata/cli": "workspace:*",
2529
2529
  "@getstrata/core": "workspace:*"
2530
2530
  } : {
2531
- "@getstrata/bootstrap": "^1.0.1",
2532
- "@getstrata/cli": "^1.0.1",
2533
- "@getstrata/core": "^1.0.1"
2531
+ "@getstrata/bootstrap": "^1.0.2",
2532
+ "@getstrata/cli": "^1.0.2",
2533
+ "@getstrata/core": "^1.0.2"
2534
2534
  };
2535
2535
  if (options.layers?.database === "mysql") {
2536
2536
  coreDeps.mysql2 = "^3.24.3";
@@ -2626,7 +2626,7 @@ function renderSupportingToolsReadme(layers) {
2626
2626
  }
2627
2627
  function renderApiDocs(projectName, layers) {
2628
2628
  const rows = ["| Method | Path | Notes |", "| --- | --- | --- |"];
2629
- rows.push("| `GET` | `/health` | Plain text `ok` (200), or `degraded` (503) when the database or the migrated schema is unavailable. `/ready` returns the same checks as JSON. |");
2629
+ 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. |");
2630
2630
  rows.push("| `GET` | `/` | Welcome page. Restyle or replace it. |");
2631
2631
  if (authUsesToken(layers.auth)) {
2632
2632
  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>`. |");
@@ -3086,13 +3086,13 @@ function renderMigrateTs(layers) {
3086
3086
  }
3087
3087
  const list = statements.map((sql) => ` \`${sql}\`,`).join(`
3088
3088
  `);
3089
- const ph2 = layers.database === "postgres";
3090
- const notePlaceholder = ph2 ? "$1" : "?";
3089
+ const ph = layers.database === "postgres";
3090
+ const notePlaceholder = ph ? "$1" : "?";
3091
3091
  const verifyOn = layers.extras.emailVerification && authNeedsUsers(layers.auth);
3092
3092
  const userColumns = verifyOn ? "name, email, password, is_admin, email_verified_at" : "name, email, password, is_admin";
3093
- const userPlaceholders = verifyOn ? ph2 ? "$1, $2, $3, $4, $5), ($6, $7, $8, $9, $10" : "?, ?, ?, ?, ?), (?, ?, ?, ?, ?" : ph2 ? "$1, $2, $3, $4), ($5, $6, $7, $8" : "?, ?, ?, ?), (?, ?, ?, ?";
3094
- const adminFlag = ph2 ? "false" : "0";
3095
- const adminTrue = ph2 ? "true" : "1";
3093
+ const userPlaceholders = verifyOn ? ph ? "$1, $2, $3, $4, $5), ($6, $7, $8, $9, $10" : "?, ?, ?, ?, ?), (?, ?, ?, ?, ?" : ph ? "$1, $2, $3, $4), ($5, $6, $7, $8" : "?, ?, ?, ?), (?, ?, ?, ?";
3094
+ const adminFlag = ph ? "false" : "0";
3095
+ const adminTrue = ph ? "true" : "1";
3096
3096
  const verifiedNow = nowTimestampLiteral(layers.database);
3097
3097
  const userValues = verifyOn ? `["Demo User", "demo@example.com", password, ${adminFlag}, ${verifiedNow}, "Admin User", "admin@example.test", password, ${adminTrue}, ${verifiedNow}]` : `["Demo User", "demo@example.com", password, ${adminFlag}, "Admin User", "admin@example.test", password, ${adminTrue}]`;
3098
3098
  const seedTenant = tenancyOn ? `
@@ -3101,7 +3101,7 @@ function renderMigrateTs(layers) {
3101
3101
  );
3102
3102
  if (Number(tenantCount) === 0) {
3103
3103
  await sql.unsafe(
3104
- "INSERT INTO tenant (slug, plan, region) VALUES (${ph2 ? "$1, $2, $3" : "?, ?, ?"})",
3104
+ "INSERT INTO tenant (slug, plan, region) VALUES (${ph ? "$1, $2, $3" : "?, ?, ?"})",
3105
3105
  ["default", "enterprise", "eu"],
3106
3106
  );
3107
3107
  }` : "";
@@ -4,7 +4,7 @@ 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` when the database ping fails.
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
8
  - `GET /` returns the welcome page.
9
9
  - A `notes` table, with no routes on it yet.
10
10
 
@@ -11,9 +11,9 @@
11
11
  "check": "tsc --noEmit"
12
12
  },
13
13
  "dependencies": {
14
- "@getstrata/bootstrap": "^1.0.1",
15
- "@getstrata/cli": "^1.0.1",
16
- "@getstrata/core": "^1.0.1"
14
+ "@getstrata/bootstrap": "^1.0.2",
15
+ "@getstrata/cli": "^1.0.2",
16
+ "@getstrata/core": "^1.0.2"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/bun": "^1.4.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-strata",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Create a new Strata app. Interactive wizard; choose each layer; one database engine.",
5
5
  "type": "module",
6
6
  "license": "MIT",