diff --git a/.sequelizerc b/.sequelizerc index f8d239ac13..f972b9487a 100644 --- a/.sequelizerc +++ b/.sequelizerc @@ -1,4 +1,4 @@ -require("dotenv").config({ +require("@dotenvx/dotenvx").config({ path: process.env.NODE_ENV === "test" ? ".env.test" : ".env", }); diff --git a/app/utils/routeHelpers.ts b/app/utils/routeHelpers.ts index d6e2d196b4..35e9543c6f 100644 --- a/app/utils/routeHelpers.ts +++ b/app/utils/routeHelpers.ts @@ -63,8 +63,6 @@ export function documentEditPath(doc: Document): string { return `${documentPath(doc)}/edit`; } - - export function documentHistoryPath( doc: Document, revisionId?: string @@ -152,5 +150,3 @@ export const matchDocumentSlug = export const matchDocumentEdit = `/doc/${matchDocumentSlug}/edit`; export const matchDocumentHistory = `/doc/${matchDocumentSlug}/history/:revisionId?`; - - diff --git a/plugins/github/shared/GitHubUtils.ts b/plugins/github/shared/GitHubUtils.ts index a7eac82a42..585b8efcf5 100644 --- a/plugins/github/shared/GitHubUtils.ts +++ b/plugins/github/shared/GitHubUtils.ts @@ -22,7 +22,7 @@ export class GitHubUtils { */ public static callbackUrl( { baseUrl, params }: { baseUrl: string; params?: string } = { - baseUrl: `${env.URL}`, + baseUrl: env.URL, params: undefined, } ) { diff --git a/plugins/linear/shared/LinearUtils.ts b/plugins/linear/shared/LinearUtils.ts index f600980ad0..dda21dee49 100644 --- a/plugins/linear/shared/LinearUtils.ts +++ b/plugins/linear/shared/LinearUtils.ts @@ -29,7 +29,7 @@ export class LinearUtils { static callbackUrl( { baseUrl, params }: { baseUrl: string; params?: string } = { - baseUrl: `${env.URL}`, + baseUrl: env.URL, params: undefined, } ) { diff --git a/plugins/notion/shared/NotionUtils.ts b/plugins/notion/shared/NotionUtils.ts index 1c6dc3fbfa..55c7bde203 100644 --- a/plugins/notion/shared/NotionUtils.ts +++ b/plugins/notion/shared/NotionUtils.ts @@ -36,7 +36,7 @@ export class NotionUtils { static callbackUrl( { baseUrl, params }: { baseUrl: string; params?: string } = { - baseUrl: `${env.URL}`, + baseUrl: env.URL, params: undefined, } ) { diff --git a/plugins/slack/shared/SlackUtils.ts b/plugins/slack/shared/SlackUtils.ts index 956a8454a6..b9f89e82d1 100644 --- a/plugins/slack/shared/SlackUtils.ts +++ b/plugins/slack/shared/SlackUtils.ts @@ -35,7 +35,7 @@ export class SlackUtils { static callbackUrl( { baseUrl, params }: { baseUrl: string; params?: string } = { - baseUrl: `${env.URL}`, + baseUrl: env.URL, params: undefined, } ) { @@ -46,7 +46,7 @@ export class SlackUtils { static connectUrl( { baseUrl, params }: { baseUrl: string; params?: string } = { - baseUrl: `${env.URL}`, + baseUrl: env.URL, params: undefined, } ) { diff --git a/plugins/webhooks/server/tasks/DeliverWebhookTask.ts b/plugins/webhooks/server/tasks/DeliverWebhookTask.ts index e0b4d40a22..911bed660b 100644 --- a/plugins/webhooks/server/tasks/DeliverWebhookTask.ts +++ b/plugins/webhooks/server/tasks/DeliverWebhookTask.ts @@ -787,7 +787,8 @@ export default class DeliverWebhookTask extends BaseTask { const failedDeliveries = deliveriesInWindow.filter( (delivery) => delivery.status === "failed" ); - const failureRate = (failedDeliveries.length / deliveriesInWindow.length) * 100; + const failureRate = + (failedDeliveries.length / deliveriesInWindow.length) * 100; // Only log analysis if there are failures to report if (failedDeliveries.length > 0) { @@ -802,7 +803,11 @@ export default class DeliverWebhookTask extends BaseTask { } // Check if failure rate exceeds threshold and we have enough data points - if (failureRate >= failureRateThreshold && deliveriesInWindow.length >= DeliverWebhookTask.MIN_DELIVERIES_FOR_ANALYSIS) { + if ( + failureRate >= failureRateThreshold && + deliveriesInWindow.length >= + DeliverWebhookTask.MIN_DELIVERIES_FOR_ANALYSIS + ) { Logger.warn("Disabling webhook due to high failure rate", { subscriptionId: subscription.id, failureRate: Math.round(failureRate * 100) / 100, diff --git a/server/emails/templates/WebhookDisabledEmail.tsx b/server/emails/templates/WebhookDisabledEmail.tsx index 860384782c..9e6e77cd30 100644 --- a/server/emails/templates/WebhookDisabledEmail.tsx +++ b/server/emails/templates/WebhookDisabledEmail.tsx @@ -50,9 +50,9 @@ Webhook settings: ${teamUrl}/settings/webhooks Webhook disabled

- Your webhook ({webhookName}) has been automatically disabled due to a - high failure rate in recent delivery attempts. You can re-enable by - editing the webhook. + Your webhook ({webhookName}) has been automatically disabled due to + a high failure rate in recent delivery attempts. You can re-enable + by editing the webhook.

diff --git a/server/migrations/20250630175759-add-collection-id-to-shares.js b/server/migrations/20250630175759-add-collection-id-to-shares.js index 1ddc53601e..810e6d4dad 100644 --- a/server/migrations/20250630175759-add-collection-id-to-shares.js +++ b/server/migrations/20250630175759-add-collection-id-to-shares.js @@ -3,7 +3,7 @@ /** @type {import('sequelize-cli').Migration} */ module.exports = { async up(queryInterface, Sequelize) { - await queryInterface.sequelize.transaction(async transaction => { + await queryInterface.sequelize.transaction(async (transaction) => { await queryInterface.addColumn( "shares", "collectionId", @@ -24,7 +24,7 @@ module.exports = { }, async down(queryInterface, Sequelize) { - await queryInterface.sequelize.transaction(async transaction => { + await queryInterface.sequelize.transaction(async (transaction) => { await queryInterface.removeColumn("shares", "collectionId", { transaction, });