@getstrata/starter 2.2.55 → 2.2.57

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
@@ -1,6 +1,6 @@
1
1
  # @getstrata/starter
2
2
 
3
- The `create-strata` generator for [Strata](https://github.com/EyK-26/strata). Requires Bun >=1.4.3 (tested on 1.4.3).
3
+ The `create-strata` generator for [Strata](https://github.com/EyK-26/strata). Requires Bun >=1.4.4 (tested on 1.4.4).
4
4
 
5
5
  Prefer the short form, which resolves the [`create-strata`](https://www.npmjs.com/package/create-strata) package:
6
6
 
package/dist/cli.js CHANGED
@@ -3175,6 +3175,7 @@ function renderConfigProvider(layers) {
3175
3175
  APP_PORT_CONFIG_KEY,
3176
3176
  CORE_CONFIG_TOKEN,
3177
3177
  CORE_PUBLIC_TENANCY_TOKEN,
3178
+ CSRF_TARGET_ORIGIN_CONFIG_KEY,
3178
3179
  DATABASE_URL_CONFIG_KEY,
3179
3180
  REDIS_URL_CONFIG_KEY,
3180
3181
  } from "@getstrata/bootstrap/config";
@@ -3189,6 +3190,8 @@ const configProvider: ServiceProvider = {
3189
3190
  const appConfig = loadConfig();
3190
3191
 
3191
3192
  container.set(CORE_CONFIG_TOKEN, config);
3193
+ if (process.env.CSRF_TARGET_ORIGIN !== undefined)
3194
+ config.set(CSRF_TARGET_ORIGIN_CONFIG_KEY, process.env.CSRF_TARGET_ORIGIN);
3192
3195
  // One approved origin for the starter tenant. Multi-tenant apps replace this lookup.
3193
3196
  if (isProductionEnv()) {
3194
3197
  const publicHost = normalizeTenantHostname(new URL(appConfig.appUrl).host);
@@ -3717,16 +3720,16 @@ function renderDockerfile(layers) {
3717
3720
  const frontend = needsFrontendBuild(layers.frontend);
3718
3721
  const lines = [
3719
3722
  '# Production image. Build once, run with env from your platform; see README "Deploy".',
3720
- "FROM oven/bun:1.4.3 AS deps",
3723
+ "FROM oven/bun:1.4.4 AS deps",
3721
3724
  "WORKDIR /app",
3722
3725
  "COPY package.json bun.lock ./",
3723
3726
  "RUN bun install --frozen-lockfile --production",
3724
3727
  ""
3725
3728
  ];
3726
3729
  if (frontend) {
3727
- lines.push("FROM oven/bun:1.4.3 AS frontend", "WORKDIR /app/frontend", "COPY --from=deps /app/node_modules /app/node_modules", "ARG SPA_PREFIX", "ENV SPA_PREFIX=$SPA_PREFIX", "COPY frontend/package.json frontend/bun.lock ./", "RUN bun install --frozen-lockfile", "COPY frontend/ ./", "RUN bun run build", "");
3730
+ lines.push("FROM oven/bun:1.4.4 AS frontend", "WORKDIR /app/frontend", "COPY --from=deps /app/node_modules /app/node_modules", "ARG SPA_PREFIX", "ENV SPA_PREFIX=$SPA_PREFIX", "COPY frontend/package.json frontend/bun.lock ./", "RUN bun install --frozen-lockfile", "COPY frontend/ ./", "RUN bun run build", "");
3728
3731
  }
3729
- lines.push("FROM oven/bun:1.4.3-slim AS runtime", "WORKDIR /app", "ENV APP_ENV=production", "ENV AUTH_DEV_HEADERS=false", "ENV PORT=3000", "COPY --from=deps /app/node_modules ./node_modules", "COPY . .");
3732
+ lines.push("FROM oven/bun:1.4.4-slim AS runtime", "WORKDIR /app", "ENV APP_ENV=production", "ENV AUTH_DEV_HEADERS=false", "ENV PORT=3000", "COPY --from=deps /app/node_modules ./node_modules", "COPY . .");
3730
3733
  if (frontend) {
3731
3734
  lines.push("COPY --from=frontend /app/frontend/dist ./frontend/dist");
3732
3735
  }
@@ -4071,7 +4074,7 @@ The app uses the database named in \`DATABASE_URL\` and creates it on first migr
4071
4074
  ${renderOpenApiReadme()}
4072
4075
  ## Deploy
4073
4076
 
4074
- Bun >=1.4.3 is required. \`.bun-version\` and Docker stages pin the tested 1.4.3 runtime; upgrade pins deliberately and rerun checks before deployment. The official @types/bun shim currently lags the runtime release, so package.json overrides bun-types to >=1.4.3. Refresh and commit root/frontend lockfiles when upgrading. Updating framework packages does not rewrite an existing app Dockerfile, runtime pin or manifest.
4077
+ Bun >=1.4.4 is required. \`.bun-version\` and Docker stages pin the tested 1.4.4 runtime; upgrade pins deliberately and rerun checks before deployment. Runtime and TypeScript requirements use >=1.4.4, accepting future 1.4.x patches; the bun-types override keeps transitive shims above the same minimum. Refresh and commit root/frontend lockfiles when upgrading. Updating framework packages does not rewrite an existing app Dockerfile, runtime pin or manifest.
4075
4078
 
4076
4079
  \`Dockerfile\` builds a production image from the committed \`bun.lock\` (run \`bun install\` once and commit the lockfile).${needsFrontendBuild(layers.frontend) ? " The React frontend is built inside the image." : ""}
4077
4080
 
@@ -4138,7 +4141,7 @@ function postgresAppRolePrivilegeSql(options) {
4138
4141
  const database = assertSafeSqlIdentifier(options.database, "database name");
4139
4142
  const role = assertSafeSqlIdentifier(options.role ?? POSTGRES_APP_ROLE, "role name");
4140
4143
  return `GRANT CONNECT ON DATABASE ${database} TO ${role};
4141
- GRANT USAGE, CREATE ON SCHEMA public TO ${role};
4144
+ GRANT USAGE ON SCHEMA public TO ${role};
4142
4145
  GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO ${role};
4143
4146
  GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO ${role};
4144
4147
  GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO ${role};
@@ -4296,6 +4299,8 @@ function renderEnvExample(projectName, layers) {
4296
4299
  "# Total graceful shutdown budget in milliseconds; keep deployment grace longer.",
4297
4300
  "SHUTDOWN_TIMEOUT_MS=30000",
4298
4301
  "APP_URL=http://localhost:3000",
4302
+ "# Opt-in for HTTPS termination with a preserved public Host; does not trust forwarding headers.",
4303
+ "# CSRF_TARGET_ORIGIN=https://app.example.com",
4299
4304
  `DATABASE_URL=${defaultDatabaseUrl(layers, projectName)}`,
4300
4305
  ...postgresAppRoleEnvNotes(layers),
4301
4306
  ...layers.database === "postgres" ? [`MIGRATION_DATABASE_URL=${defaultMigrationDatabaseUrl(layers, projectName)}`] : [],
@@ -4473,9 +4478,9 @@ function renderPackageJson(projectName, options = {}) {
4473
4478
  "@getstrata/cli": "workspace:*",
4474
4479
  "@getstrata/core": "workspace:*"
4475
4480
  } : {
4476
- "@getstrata/bootstrap": "^2.2.55",
4477
- "@getstrata/cli": "^2.2.55",
4478
- "@getstrata/core": "^2.2.55"
4481
+ "@getstrata/bootstrap": "^2.2.57",
4482
+ "@getstrata/cli": "^2.2.57",
4483
+ "@getstrata/core": "^2.2.57"
4479
4484
  };
4480
4485
  coreDeps.eta = "^4.6.0";
4481
4486
  if (options.layers?.database === "mysql") {
@@ -4502,11 +4507,11 @@ function renderPackageJson(projectName, options = {}) {
4502
4507
  private: true,
4503
4508
  type: "module",
4504
4509
  scripts,
4505
- engines: { bun: ">=1.4.3" },
4506
- overrides: { "bun-types": ">=1.4.3" },
4510
+ engines: { bun: ">=1.4.4" },
4511
+ overrides: { "bun-types": ">=1.4.4" },
4507
4512
  dependencies: coreDeps,
4508
4513
  devDependencies: {
4509
- "@types/bun": ">=1.4.2",
4514
+ "@types/bun": ">=1.4.4",
4510
4515
  typescript: "^7.0.2"
4511
4516
  }
4512
4517
  }, null, 2)}
@@ -6033,7 +6038,7 @@ export const TENANCY_ENABLED = ${usesTenantTable(layers.tenancy)};
6033
6038
  manifest.scripts.preview = `bun run build && ${publicEnv} bun dev-server.ts --preview`;
6034
6039
  writeText(manifestPath, JSON.stringify(manifest, null, 2));
6035
6040
  }
6036
- writeText(join2(targetDir, ".bun-version"), `1.4.3
6041
+ writeText(join2(targetDir, ".bun-version"), `1.4.4
6037
6042
  `);
6038
6043
  writeText(join2(targetDir, ".env.example"), renderEnvExample(projectName, layers));
6039
6044
  writeText(join2(targetDir, ".gitignore"), renderGitignore());
@@ -1,6 +1,8 @@
1
1
  DATABASE_URL=postgresql://postgres:dev-postgres-change-me@localhost:5432/{{PROJECT_NAME}}
2
2
  PORT=3000
3
3
  APP_URL=http://localhost:3000
4
+ # Opt-in for HTTPS termination with a preserved public Host; does not trust forwarding headers.
5
+ # CSRF_TARGET_ORIGIN=https://app.example.com
4
6
  APP_ENV=local
5
7
  APP_NAME={{PROJECT_NAME}}
6
8
  # Cookie/Redis namespace. Unset defaults to `strata`.
@@ -10,7 +10,7 @@
10
10
  "react-router-dom": "^7.8.0",
11
11
  },
12
12
  "devDependencies": {
13
- "@types/bun": ">=1.4.2",
13
+ "@types/bun": ">=1.4.4",
14
14
  "@types/react": "^19.1.10",
15
15
  "@types/react-dom": "^19.1.7",
16
16
  "typescript": "^7.0.2",
@@ -18,10 +18,10 @@
18
18
  },
19
19
  },
20
20
  "overrides": {
21
- "bun-types": ">=1.4.3",
21
+ "bun-types": ">=1.4.4",
22
22
  },
23
23
  "packages": {
24
- "@types/bun": ["@types/bun@1.4.2", "", { "dependencies": { "bun-types": "1.4.2" } }, "sha512-GimotNn7+ZV0uVArItBbriZsR1oNf0+WTzPkdcFrzShI7k2norL0uzEaJT8T33dWr7O/c9ZDuAFQrctKCi72oQ=="],
24
+ "@types/bun": ["@types/bun@1.4.4", "", { "dependencies": { "bun-types": "1.4.4" } }, "sha512-9wkRDXUXK124pEnAutE6n/l18j+i9GC5IAHK8TmX/2nlySETmky0OU6yL5U8pW1AoKh++AN9auDCr647BfurjQ=="],
25
25
 
26
26
  "@types/node": ["@types/node@26.2.0", "", { "dependencies": { "undici-types": "~8.3.0" } }, "sha512-5IviulTZeRNp2vAJ514cc/HUlY5nZ9fCbq9DMyC52BrhFZACo3nI0R7qBxhQmo/d27NFe96ur/b7Wwxklda+kg=="],
27
27
 
@@ -69,7 +69,7 @@
69
69
 
70
70
  "@typescript/typescript-win32-x64": ["@typescript/typescript-win32-x64@7.0.2", "", { "os": "win32", "cpu": "x64" }, "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g=="],
71
71
 
72
- "bun-types": ["bun-types@1.4.3", "", { "dependencies": { "@types/node": "*", "undici-types": "*" } }, "sha512-tinRJNGOmUN+tEAsn2y2e942n9JHRHR42iUYzDH75NmhJqVBokGSQkkfSFdNWwsANIdrK6ACH9t01M452YyTwg=="],
72
+ "bun-types": ["bun-types@1.4.4", "", { "dependencies": { "@types/node": "*", "undici-types": "*" } }, "sha512-yjrJh5oGX7mMPKGd19YXyIjmEuj4G4zNC30bs7PM9Az7NQ3ndF3j6hbeRdvJTRQEhJ/FYQwW0a2moweEi2hMxQ=="],
73
73
 
74
74
  "cookie": ["cookie@1.1.1", "", {}, "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ=="],
75
75
 
@@ -13,15 +13,15 @@
13
13
  "react-router-dom": "^7.8.0"
14
14
  },
15
15
  "devDependencies": {
16
- "@types/bun": ">=1.4.2",
16
+ "@types/bun": ">=1.4.4",
17
17
  "@types/react": "^19.1.10",
18
18
  "@types/react-dom": "^19.1.7",
19
19
  "typescript": "^7.0.2"
20
20
  },
21
21
  "engines": {
22
- "bun": ">=1.4.3"
22
+ "bun": ">=1.4.4"
23
23
  },
24
24
  "overrides": {
25
- "bun-types": ">=1.4.3"
25
+ "bun-types": ">=1.4.4"
26
26
  }
27
27
  }
@@ -12,19 +12,19 @@
12
12
  "check": "tsc --noEmit"
13
13
  },
14
14
  "dependencies": {
15
- "@getstrata/bootstrap": "^2.2.55",
16
- "@getstrata/cli": "^2.2.55",
17
- "@getstrata/core": "^2.2.55",
15
+ "@getstrata/bootstrap": "^2.2.57",
16
+ "@getstrata/cli": "^2.2.57",
17
+ "@getstrata/core": "^2.2.57",
18
18
  "eta": "^4.6.0"
19
19
  },
20
20
  "devDependencies": {
21
- "@types/bun": ">=1.4.2",
21
+ "@types/bun": ">=1.4.4",
22
22
  "typescript": "^7.0.2"
23
23
  },
24
24
  "engines": {
25
- "bun": ">=1.4.3"
25
+ "bun": ">=1.4.4"
26
26
  },
27
27
  "overrides": {
28
- "bun-types": ">=1.4.3"
28
+ "bun-types": ">=1.4.4"
29
29
  }
30
30
  }
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  APP_PORT_CONFIG_KEY,
3
3
  CORE_CONFIG_TOKEN,
4
+ CSRF_TARGET_ORIGIN_CONFIG_KEY,
4
5
  DATABASE_URL_CONFIG_KEY,
5
6
  REDIS_URL_CONFIG_KEY,
6
7
  } from "@getstrata/bootstrap/config";
@@ -13,6 +14,8 @@ const configProvider: ServiceProvider = {
13
14
  const appConfig = loadConfig();
14
15
 
15
16
  container.set(CORE_CONFIG_TOKEN, config);
17
+ if (process.env.CSRF_TARGET_ORIGIN !== undefined)
18
+ config.set(CSRF_TARGET_ORIGIN_CONFIG_KEY, process.env.CSRF_TARGET_ORIGIN);
16
19
  config.set(DATABASE_URL_CONFIG_KEY, appConfig.databaseUrl);
17
20
  config.set(APP_PORT_CONFIG_KEY, appConfig.port);
18
21
  config.set(REDIS_URL_CONFIG_KEY, process.env.REDIS_URL ?? "");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getstrata/starter",
3
- "version": "2.2.55",
3
+ "version": "2.2.57",
4
4
  "description": "Interactive create-strata wizard. Choose each layer; one database engine.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -24,6 +24,6 @@
24
24
  "access": "public"
25
25
  },
26
26
  "engines": {
27
- "bun": ">=1.4.3"
27
+ "bun": ">=1.4.4"
28
28
  }
29
29
  }