mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-12 15:04:53 +02:00
enable sourcemap
This commit is contained in:
parent
993eab5ac1
commit
af0bc3b2c5
3 changed files with 5 additions and 4 deletions
|
@ -10,7 +10,7 @@
|
||||||
"db:hydrate": "npx tsx scripts/hydrate.ts",
|
"db:hydrate": "npx tsx scripts/hydrate.ts",
|
||||||
"db:studio": "drizzle-kit studio",
|
"db:studio": "drizzle-kit studio",
|
||||||
"build": "mkdir -p dist && next build && node scripts/esbuild.mjs -e server/index.ts -o dist/server.mjs",
|
"build": "mkdir -p dist && next build && node scripts/esbuild.mjs -e server/index.ts -o dist/server.mjs",
|
||||||
"start": "NODE_ENV=development ENVIRONMENT=prod node dist/server.mjs",
|
"start": "NODE_ENV=development ENVIRONMENT=prod NODE_OPTIONS=--enable-source-maps node dist/server.mjs",
|
||||||
"email": "email dev --dir server/emails/templates --port 3005"
|
"email": "email dev --dir server/emails/templates --port 3005"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -62,7 +62,7 @@ esbuild
|
||||||
packagePath: getPackagePaths(),
|
packagePath: getPackagePaths(),
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
sourcemap: false,
|
sourcemap: true,
|
||||||
target: "node20",
|
target: "node20",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
|
@ -41,7 +41,7 @@ export async function setupServerAdmin() {
|
||||||
await trx
|
await trx
|
||||||
.update(users)
|
.update(users)
|
||||||
.set({ passwordHash })
|
.set({ passwordHash })
|
||||||
.where(eq(users.email, email));
|
.where(eq(users.userId, existing.userId));
|
||||||
|
|
||||||
// this isn't using the transaction, but it's probably fine
|
// this isn't using the transaction, but it's probably fine
|
||||||
await invalidateAllSessions(existing.userId);
|
await invalidateAllSessions(existing.userId);
|
||||||
|
@ -50,6 +50,7 @@ export async function setupServerAdmin() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (existing.serverAdmin) {
|
if (existing.serverAdmin) {
|
||||||
|
logger.info(`Server admin (${email}) already exists`)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +63,7 @@ export async function setupServerAdmin() {
|
||||||
})
|
})
|
||||||
.where(eq(users.email, email));
|
.where(eq(users.email, email));
|
||||||
|
|
||||||
logger.info(`Server admin (${email}) updated`);
|
logger.info(`Server admin (${email}) set`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue