diff --git a/examples/linearlite/sst.config.ts b/examples/linearlite/sst.config.ts index 4e210f145d..22b6fbe292 100644 --- a/examples/linearlite/sst.config.ts +++ b/examples/linearlite/sst.config.ts @@ -27,12 +27,17 @@ export default $config({ const db = new neon.Database(`linearlite`, { ...base, + name: + $app.stage === `Production` + ? `linearlite-production` + : `linearlite-${$app.stage}`, ownerName: `neondb_owner`, }) const databaseUri = getNeonDbUri(project, db) try { databaseUri.apply(applyMigrations) + databaseUri.apply(loadData) const electricInfo = databaseUri.apply((uri) => addDatabaseToElectric(uri) @@ -60,6 +65,15 @@ function applyMigrations(uri: string) { }) } +function loadData(uri: string) { + execSync(`pnpm run db:load-data`, { + env: { + ...process.env, + DATABASE_URL: uri, + }, + }) +} + function deployLinearLite( electricInfo: $util.Output<{ id: string; token: string }> ) { diff --git a/examples/nextjs-example/sst-env.d.ts b/examples/nextjs-example/sst-env.d.ts index e973cf25d9..886b767062 100644 --- a/examples/nextjs-example/sst-env.d.ts +++ b/examples/nextjs-example/sst-env.d.ts @@ -6,5 +6,9 @@ import "sst" export {} declare module "sst" { export interface Resource { + "nextjs": { + "type": "sst.aws.Nextjs" + "url": string + } } } diff --git a/examples/nextjs-example/tsconfig.json b/examples/nextjs-example/tsconfig.json index 3a2d3a6d52..94cf32e88f 100644 --- a/examples/nextjs-example/tsconfig.json +++ b/examples/nextjs-example/tsconfig.json @@ -24,5 +24,5 @@ } }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] + "exclude": ["node_modules", "sst.config.ts"] }