Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,42 +44,42 @@
"@sweetr/email-templates": "*",
"@sweetr/graphql-types": "*",
"basic-auth": "^2.0.1",
"bcrypt": "^5.1.1",
"bullmq": "^5.2.0",
"bcrypt": "^6.0.0",
"bullmq": "^5.42.0",
"date-fns": "^4.0.0",
"dotenv": "^16.3.1",
"envsafe": "^2.0.3",
"express": "^4.20.0",
"express": "^4.22.0",
"express-rate-limit": "^7.5.0",
"got": "^11.8.3",
"graphql": "^16.8.1",
"graphql-scalars": "^1.22.4",
"graphql-yoga": "^5.0.0",
"hashids": "^2.3.0",
"ioredis": "^5.4.1",
"ioredis": "^5.9.3",
"jsonwebtoken": "^9.0.2",
"micromatch": "^4.0.8",
"octokit": "^3.2.2",
"pino": "^9.13.1",
"radash": "^11.0.0",
"resend": "^3.4.0",
"resend": "^6.0.0",
"semver": "^7.5.4",
"stripe": "^16.6.0",
"utility-types": "^3.10.0",
"zod": "^3.24.2"
},
"devDependencies": {
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/client-preset": "^4.1.0",
"@graphql-codegen/typescript": "^4.0.1",
"@graphql-codegen/typescript-resolvers": "^4.0.1",
"@graphql-codegen/cli": "^6.0.0",
"@graphql-codegen/client-preset": "^5.0.0",
"@graphql-codegen/typescript": "^5.0.0",
"@graphql-codegen/typescript-resolvers": "^5.0.0",
"@octokit/webhooks-types": "^7.3.1",
"@types/bcrypt": "^5.0.2",
"@types/bcrypt": "^6.0.0",
"@types/micromatch": "^4.0.9",
"@types/node": "^20.9.0",
"@typescript-eslint/eslint-plugin": "^8.26.0",
"cross-env": "^10.1.0",
"pino-pretty": "^10.2.3",
"pino-pretty": "^13.0.0",
"prisma": "^5.5.2",
"tsx": "^4.15.9",
"typescript": "^5.2.2",
Expand Down
8 changes: 3 additions & 5 deletions apps/api/src/app/auth/services/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
WorkspaceMembership,
InstallationTargetType,
} from "@prisma/client";
import jwt from "jsonwebtoken";
import jwt, { type SignOptions } from "jsonwebtoken";
import { config } from "../../../config";
import { getBypassRlsPrisma, getPrisma } from "../../../prisma";
import * as github from "../providers/github/github.provider";
Expand Down Expand Up @@ -62,11 +62,9 @@ export const getGithubLoginUrl = (redirectTo?: string) => {
};

const signJwtToken = (payload: JWTPayload): Token => {
const expiresIn = config.auth.jwt.expiresIn;

const accessToken = jwt.sign(payload, config.auth.jwt.secret, {
expiresIn,
});
expiresIn: config.auth.jwt.expiresIn,
} as SignOptions);
Comment thread
waltergalvao marked this conversation as resolved.

return {
accessToken,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ export const loginToStripeMutation = createMutationResolver({

const session = await createStripeCustomerPortalSession(input.workspaceId);

return session?.url;
return session?.url || null;
},
});
2 changes: 1 addition & 1 deletion apps/api/src/app/email/workers/send-email.worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface SendEmailJob {
export const sendEmailWorker = createWorker(
SweetQueue.SEND_EMAIL,
async (job: Job<SendEmailJob>) => {
const template = renderEmailTemplate(
const template = await renderEmailTemplate(
emailTemplates[job.data.template.type],
job.data.template.props
);
Expand Down
1 change: 1 addition & 0 deletions apps/api/src/app/sync-batch/services/sync-batch.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ const sendSyncCompleteEmail = async (workspaceId: number) => {
to: member.user.email,
subject: "Sync complete.",
template: {
id: "initial-sync-complete",
Comment thread
waltergalvao marked this conversation as resolved.
Comment thread
waltergalvao marked this conversation as resolved.
Comment thread
waltergalvao marked this conversation as resolved.
Comment thread
waltergalvao marked this conversation as resolved.
Comment thread
waltergalvao marked this conversation as resolved.
type: emailTemplate,
props: {
username: member.name,
Expand Down
6 changes: 3 additions & 3 deletions apps/api/src/lib/email.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Resend } from "resend";
import { CreateEmailOptions, CreateEmailRequestOptions, Resend } from "resend";
import { DataAccessException } from "../app/errors/exceptions/data-access.exception";
import { env } from "../env";

let resendClient: Resend | null;

export type EmailPayload = Parameters<Resend["emails"]["send"]>[0];
export type EmailOptions = Parameters<Resend["emails"]["send"]>[1];
export type EmailPayload = CreateEmailOptions;
export type EmailOptions = CreateEmailRequestOptions;

export const getEmailClient = (): Resend => {
if (!env.RESEND_API_KEY) {
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/prisma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,5 @@ export const take = (limit: number = 50) => {
export const jsonObject = <T extends Record<string, any>>(
value: string | object | JsonValue
): T => {
return isObject(value) ? value : JSON.parse(value as string);
return isObject(value) ? (value as T) : (JSON.parse(value as string) as T);
};
6 changes: 3 additions & 3 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@mantine/nprogress": "^8.3.0",
"@mantine/spotlight": "^8.3.0",
"@sentry/react": "^9.5.0",
"@sentry/vite-plugin": "^3.2.2",
"@sentry/vite-plugin": "^4.0.0",
"@sweetr/graphql-types": "*",
"@tabler/icons": "^3.31.0",
"@tabler/icons-react": "^3.31.0",
Expand All @@ -42,7 +42,7 @@
"react": "^18.3.0",
"react-canvas-confetti": "^1.4.0",
"react-dom": "^18.3.0",
"react-router-dom": "^6.17.0",
"react-router-dom": "^7.0.0",
Comment thread
sweetrdev marked this conversation as resolved.
Outdated
"zod": "^3.24.2",
"zustand": "^5.0.3"
},
Expand All @@ -66,7 +66,7 @@
"postcss-preset-mantine": "^1.9.0",
"postcss-simple-vars": "^7.0.1",
"typescript": "^5.2.2",
"vite": "^6.3.6",
"vite": "^7.0.0",
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
Outdated
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
"vite-plugin-eslint": "^1.8.1"
},
"packageManager": "npm@8.5.5"
Expand Down
Loading
Loading