Skip to content

Commit

Permalink
cleanup internal package resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
AmruthPillai committed Jan 13, 2025
1 parent 51f38f0 commit 0f8f2fe
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 60 deletions.
4 changes: 2 additions & 2 deletions apps/server/src/auth/strategy/github.strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ export class GitHubStrategy extends PassportStrategy(Strategy, "github") {

let user: User | null = null;

if (!email) throw new BadRequestException();
if (!email) throw new BadRequestException(ErrorMessage.InvalidCredentials);

try {
const user =
(await this.userService.findOneByIdentifier(email)) ??
(username && (await this.userService.findOneByIdentifier(username)));

if (!user) throw new Error("User not found.");
if (!user) throw new Error(ErrorMessage.InvalidCredentials);

done(null, user);
} catch {
Expand Down
4 changes: 2 additions & 2 deletions apps/server/src/auth/strategy/google.strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ export class GoogleStrategy extends PassportStrategy(Strategy, "google") {

let user: User | null = null;

if (!email) throw new BadRequestException();
if (!email) throw new BadRequestException(ErrorMessage.InvalidCredentials);

try {
const user =
(await this.userService.findOneByIdentifier(email)) ??
(username && (await this.userService.findOneByIdentifier(username)));

if (!user) throw new Error("User not found.");
if (!user) throw new Error(ErrorMessage.InvalidCredentials);

done(null, user);
} catch {
Expand Down
6 changes: 4 additions & 2 deletions libs/schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
"publishConfig": {
"access": "public"
},
"dependencies": {
"@reactive-resume/utils": "*",
"peerDependencies": {
"zod": "^3.23.8",
"@paralleldrive/cuid2": "^2.2.2",
"@swc/helpers": "^0.5.15"
},
"devDependencies": {
"@swc/helpers": "~0.5.11"
}
}
2 changes: 1 addition & 1 deletion libs/schema/src/sample.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ResumeData } from ".";
import { ResumeData } from "./index";

export const sampleResume: ResumeData = {
basics: {
Expand Down
2 changes: 1 addition & 1 deletion libs/schema/src/sections/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FilterKeys } from "@reactive-resume/utils";
import { z } from "zod";

import { FilterKeys } from "../shared";
import { idSchema } from "../shared";
import { awardSchema } from "./award";
import { certificationSchema } from "./certification";
Expand Down
1 change: 1 addition & 0 deletions libs/schema/src/shared/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from "./id";
export * from "./item";
export * from "./types";
export * from "./url";
3 changes: 3 additions & 0 deletions libs/schema/src/shared/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export type FilterKeys<T, Condition> = {
[Key in keyof T]: T[Key] extends Condition ? Key : never;
}[keyof T];
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-lingui": "^0.9.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.3",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-tailwindcss": "^3.17.5",
Expand Down
Loading

0 comments on commit 0f8f2fe

Please sign in to comment.