Skip to content

Commit

Permalink
feat: update env
Browse files Browse the repository at this point in the history
  • Loading branch information
loyep committed Oct 18, 2024
1 parent 5968de3 commit ee9b8ef
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 11 deletions.
3 changes: 0 additions & 3 deletions apps/api/src/core/logger/pino-logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ let outOfContext: pino.Logger | undefined;

export function __resetOutOfContextForTests() {
outOfContext = undefined;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore reset root for tests only
PinoLogger.root = undefined;
}
Expand Down Expand Up @@ -80,7 +79,6 @@ export class PinoLogger implements PinoMethods {

get logger(): pino.Logger {
// outOfContext is always set in runtime before starts using
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return storage.getStore()?.logger || outOfContext!;
}

Expand Down Expand Up @@ -157,7 +155,6 @@ export class PinoLogger implements PinoMethods {
args = [{ [this.contextName]: this.context }, ...args];
}
}
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore args are union of tuple types
this.logger[method](...args);
}
Expand Down
4 changes: 0 additions & 4 deletions apps/web/.eslintrc.cjs

This file was deleted.

8 changes: 8 additions & 0 deletions apps/web/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace NodeJS {
interface ProcessEnv {
DATABASE_URL: string;
SITE_TITLE?: string;
SITE_DESCRIPTION?: string;
PORT?: string | number;
}
}
8 changes: 4 additions & 4 deletions apps/web/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const config = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};

module.exports = config;
3 changes: 3 additions & 0 deletions apps/web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,7 @@ export default defineConfig({
}),
tsconfigPaths(),
],
define: {
'process.env': process.env,
},
});
4 changes: 4 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
"commitMessagePrefix": "chore(renovate):",
"groupName": "pin"
},
{
"matchDepTypes": ["engines"],
"enabled": false
},
{
"matchPackageNames": ["node", "pnpm", "fastify", "@fastify/*", "helmet"],
"enabled": false
Expand Down

0 comments on commit ee9b8ef

Please sign in to comment.