@getstrata/starter 1.0.3 → 1.0.4
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
|
@@ -2180,10 +2180,11 @@ function renderAuthProvider(layers) {
|
|
|
2180
2180
|
import type { AuthUser } from "@getstrata/core/auth/authContext";
|
|
2181
2181
|
import { currentAuthUser } from "@getstrata/core/auth/authContext";
|
|
2182
2182
|
import type { ServiceProvider } from "@getstrata/core/contracts/di";
|
|
2183
|
+
import { envFlagEnabled } from "@getstrata/core/runtime/appEnv";
|
|
2183
2184
|
|
|
2184
2185
|
class StarterAuthManager {
|
|
2185
2186
|
async resolve(request?: Request): Promise<AuthUser | null> {
|
|
2186
|
-
if (process.env.AUTH_DEV_HEADERS
|
|
2187
|
+
if (!envFlagEnabled(process.env.AUTH_DEV_HEADERS)) {
|
|
2187
2188
|
return request ? null : currentAuthUser();
|
|
2188
2189
|
}
|
|
2189
2190
|
if (request) {
|
|
@@ -2528,9 +2529,9 @@ function renderPackageJson(projectName, options = {}) {
|
|
|
2528
2529
|
"@getstrata/cli": "workspace:*",
|
|
2529
2530
|
"@getstrata/core": "workspace:*"
|
|
2530
2531
|
} : {
|
|
2531
|
-
"@getstrata/bootstrap": "^1.0.
|
|
2532
|
-
"@getstrata/cli": "^1.0.
|
|
2533
|
-
"@getstrata/core": "^1.0.
|
|
2532
|
+
"@getstrata/bootstrap": "^1.0.4",
|
|
2533
|
+
"@getstrata/cli": "^1.0.4",
|
|
2534
|
+
"@getstrata/core": "^1.0.4"
|
|
2534
2535
|
};
|
|
2535
2536
|
coreDeps.eta = "^4.6.0";
|
|
2536
2537
|
if (options.layers?.database === "mysql") {
|
|
@@ -3533,6 +3534,7 @@ import { createHealthRoutes } from "@getstrata/bootstrap/health";
|
|
|
3533
3534
|
${metricsImport}import { assertProductionSecrets } from "@getstrata/bootstrap/secretsGuard";
|
|
3534
3535
|
import { createWebServer } from "@getstrata/bootstrap/web/server";
|
|
3535
3536
|
import { setActiveApplicationContext } from "@getstrata/core/runtime/applicationRegistry";
|
|
3537
|
+
import { isProductionEnv } from "@getstrata/core/runtime/appEnv";
|
|
3536
3538
|
import { migrate } from "../db/migrate.ts";
|
|
3537
3539
|
import { buildRoutes } from "../routes.ts";
|
|
3538
3540
|
import { loadConfig } from "./config.ts";
|
|
@@ -3591,7 +3593,7 @@ function createAppContext(): AppContext {
|
|
|
3591
3593
|
}
|
|
3592
3594
|
|
|
3593
3595
|
export async function bootstrapApp(options: BootstrapOptions = {}): Promise<BootstrappedApp> {
|
|
3594
|
-
const isProduction =
|
|
3596
|
+
const isProduction = isProductionEnv();
|
|
3595
3597
|
// Dev boots migrate for convenience. Production must not mutate schema on
|
|
3596
3598
|
// start, so run \`strata migrate\` as an explicit deploy step instead.
|
|
3597
3599
|
const { migrate: runMigrate = !isProduction } = options;
|
|
@@ -11,9 +11,9 @@
|
|
|
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.4",
|
|
15
|
+
"@getstrata/cli": "^1.0.4",
|
|
16
|
+
"@getstrata/core": "^1.0.4",
|
|
17
17
|
"eta": "^4.6.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
ServiceContainer,
|
|
11
11
|
} from "@getstrata/bootstrap/contracts";
|
|
12
12
|
import { createWebServer } from "@getstrata/bootstrap/web/server";
|
|
13
|
+
import { isProductionEnv } from "@getstrata/core/runtime/appEnv";
|
|
13
14
|
import { setActiveApplicationContext } from "@getstrata/core/runtime/applicationRegistry";
|
|
14
15
|
import { migrate } from "../db/migrate.ts";
|
|
15
16
|
import { buildRoutes } from "../routes.ts";
|
|
@@ -68,7 +69,7 @@ function createAppContext(): AppContext {
|
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
export async function bootstrapApp(options: BootstrapOptions = {}): Promise<BootstrappedApp> {
|
|
71
|
-
const isProduction =
|
|
72
|
+
const isProduction = isProductionEnv();
|
|
72
73
|
const { migrate: runMigrate = !isProduction } = options;
|
|
73
74
|
|
|
74
75
|
const appConfig = loadConfig();
|