@getstrata/starter 2.2.56 → 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/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);
|
|
@@ -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.
|
|
4477
|
-
"@getstrata/cli": "^2.2.
|
|
4478
|
-
"@getstrata/core": "^2.2.
|
|
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") {
|
|
@@ -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`.
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"check": "tsc --noEmit"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@getstrata/bootstrap": "^2.2.
|
|
16
|
-
"@getstrata/cli": "^2.2.
|
|
17
|
-
"@getstrata/core": "^2.2.
|
|
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": {
|
|
@@ -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 ?? "");
|