chore: trigger.version.ts to set trigger tasks versions in prod (#27333)
* chore: trigger.version.ts instead of .env.production * chore: trigger.version.ts instead of .env.production * chore: restore dotenv/config import for local development Co-Authored-By: [email protected] <[email protected]> * fixup! chore: trigger.version.ts instead of .env.production * fixup! fixup! chore: trigger.version.ts instead of .env.production --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
14 files changed
+46
-31
No files matched your search
@@ -2,7 +2,7 @@
|
||||
const { withAxiom } = require("next-axiom");
|
||||
const { withSentryConfig } = require("@sentry/nextjs");
|
||||
const { PrismaPlugin } = require("@prisma/nextjs-monorepo-workaround-plugin");
|
||||
|
||||
const { TRIGGER_VERSION } = require("./trigger.version.js");
|
||||
const plugins = [withAxiom];
|
||||
|
||||
/** @type {import("next").NextConfig} */
|
||||
@@ -105,4 +105,10 @@ if (process.env.NEXT_PUBLIC_SENTRY_DSN) {
|
||||
);
|
||||
}
|
||||
|
||||
const env = process.env;
|
||||
|
||||
if (process.env.NODE_ENV === "production" || process.env.CALCOM_ENV === "production") {
|
||||
env.TRIGGER_VERSION = TRIGGER_VERSION;
|
||||
}
|
||||
|
||||
module.exports = () => plugins.reduce((acc, next) => next(acc), nextConfig);
|
||||
@@ -0,0 +1 @@
|
||||
export const TRIGGER_VERSION = "20260128.1";
|
||||
@@ -17,7 +17,8 @@
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
"../../../packages/types/*.d.ts",
|
||||
"../../../packages/types/next-auth.d.ts"
|
||||
"../../../packages/types/next-auth.d.ts",
|
||||
"trigger.version.js"
|
||||
],
|
||||
"exclude": ["**/node_modules/**", "templates", "auth"]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
TRIGGER_VERSION=20260128.2
|
||||
@@ -1,7 +1,4 @@
|
||||
import { getEnv } from "@/env";
|
||||
import { Controller, Get, Version, VERSION_NEUTRAL } from "@nestjs/common";
|
||||
import { ApiTags as DocsTags, ApiExcludeController as DocsExcludeController } from "@nestjs/swagger";
|
||||
|
||||
import { Controller, Get, VERSION_NEUTRAL, Version } from "@nestjs/common";
|
||||
@Controller()
|
||||
export class AppController {
|
||||
@Get("health")
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
import { ThrottlerStorageRedisService } from "@nest-lab/throttler-storage-redis";
|
||||
import { BullModule } from "@nestjs/bull";
|
||||
import { MiddlewareConsumer, Module, NestModule, RequestMethod } from "@nestjs/common";
|
||||
import { ConfigModule } from "@nestjs/config";
|
||||
import { APP_FILTER, APP_GUARD, APP_INTERCEPTOR } from "@nestjs/core";
|
||||
import { seconds, ThrottlerModule } from "@nestjs/throttler";
|
||||
import { SentryGlobalFilter, SentryModule } from "@sentry/nestjs/setup";
|
||||
import { AppController } from "./app.controller";
|
||||
import appConfig from "@/config/app";
|
||||
import { CustomThrottlerGuard } from "@/lib/throttler-guard";
|
||||
import { AppLoggerMiddleware } from "@/middleware/app.logger.middleware";
|
||||
@@ -13,23 +21,12 @@ import { JwtModule } from "@/modules/jwt/jwt.module";
|
||||
import { PrismaModule } from "@/modules/prisma/prisma.module";
|
||||
import { RedisModule } from "@/modules/redis/redis.module";
|
||||
import { RedisService } from "@/modules/redis/redis.service";
|
||||
import { ThrottlerStorageRedisService } from "@nest-lab/throttler-storage-redis";
|
||||
import { BullModule } from "@nestjs/bull";
|
||||
import { MiddlewareConsumer, Module, NestModule, RequestMethod } from "@nestjs/common";
|
||||
import { ConfigModule } from "@nestjs/config";
|
||||
import { APP_GUARD, APP_INTERCEPTOR, APP_FILTER } from "@nestjs/core";
|
||||
import { seconds, ThrottlerModule } from "@nestjs/throttler";
|
||||
import { SentryModule, SentryGlobalFilter } from "@sentry/nestjs/setup";
|
||||
|
||||
import { AppController } from "./app.controller";
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
SentryModule.forRoot(),
|
||||
ConfigModule.forRoot({
|
||||
...(process.env.NODE_ENV === "production"
|
||||
? { envFilePath: ".env.production" }
|
||||
: { ignoreEnvFile: true }),
|
||||
ignoreEnvFile: true,
|
||||
isGlobal: true,
|
||||
load: [appConfig],
|
||||
}),
|
||||
|
||||
@@ -15,11 +15,11 @@ import type { NestExpressApplication } from "@nestjs/platform-express";
|
||||
import cookieParser from "cookie-parser";
|
||||
import { Request } from "express";
|
||||
import helmet from "helmet";
|
||||
import { CalendarServiceExceptionFilter } from "./filters/calendar-service-exception.filter";
|
||||
import { TRPCExceptionFilter } from "./filters/trpc-exception.filter";
|
||||
import { HttpExceptionFilter } from "@/filters/http-exception.filter";
|
||||
import { PrismaExceptionFilter } from "@/filters/prisma-exception.filter";
|
||||
import { ZodExceptionFilter } from "@/filters/zod-exception.filter";
|
||||
import { CalendarServiceExceptionFilter } from "./filters/calendar-service-exception.filter";
|
||||
import { TRPCExceptionFilter } from "./filters/trpc-exception.filter";
|
||||
|
||||
const logger: Logger = new Logger("Bootstrap");
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import "dotenv/config";
|
||||
|
||||
import { IncomingMessage, Server, ServerResponse } from "node:http";
|
||||
|
||||
import { Logger } from "@nestjs/common";
|
||||
import { ConfigService } from "@nestjs/config";
|
||||
import { NestFactory } from "@nestjs/core";
|
||||
@@ -9,12 +8,15 @@ import type { NestExpressApplication } from "@nestjs/platform-express";
|
||||
import type { Express, Request, Response } from "express";
|
||||
import { WinstonModule } from "nest-winston";
|
||||
import qs from "qs";
|
||||
import type { AppConfig } from "@/config/type";
|
||||
|
||||
import { TRIGGER_VERSION } from "../trigger.version";
|
||||
import { AppModule } from "./app.module";
|
||||
import { bootstrap } from "./bootstrap";
|
||||
import { loggerConfig } from "./lib/logger";
|
||||
import type { AppConfig } from "@/config/type";
|
||||
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
process.env.TRIGGER_VERSION = TRIGGER_VERSION;
|
||||
}
|
||||
const logger: Logger = new Logger("App");
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export const TRIGGER_VERSION = "20260128.1";
|
||||
Reference in new issue
Block a user