Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"test:e2e-ui": "playwright test --ui"
},
"dependencies": {
"@acm-uiuc/js-shared": "^3.1.0"
"@acm-uiuc/js-shared": "^3.2.1"
},
"devDependencies": {
"@eslint/compat": "^1.3.2",
Expand All @@ -44,8 +44,8 @@
"@types/ioredis-mock": "^8.2.5",
"@types/node": "^24.3.0",
"@types/pluralize": "^0.0.33",
"@types/react": "^19.1.10",
"@types/react-dom": "^19.1.7",
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
"@types/supertest": "^6.0.3",
"@typescript-eslint/eslint-plugin": "^8.40.0",
"@typescript-eslint/parser": "^8.40.0",
Expand All @@ -55,7 +55,7 @@
"aws-sdk-client-mock": "^4.1.0",
"concurrently": "^9.1.2",
"cross-env": "^10.0.0",
"esbuild": "^0.25.8",
"esbuild": "^0.25.11",
"esbuild-plugin-copy": "^2.1.1",
"eslint": "^9.33.0",
"eslint-config-airbnb": "^19.0.4",
Expand Down
4 changes: 2 additions & 2 deletions src/api/functions/authorization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ import {
} from "../../common/roles.js";
import type Redis from "ioredis";
import { AUTH_CACHE_PREFIX } from "api/plugins/auth.js";
import type pino from "pino";
import {
FastifyInstance,
FastifyReply,
FastifyRequest,
type FastifyBaseLogger,
} from "fastify";
import { getUserOrgRoles } from "./organizations.js";
import { ValidLoggers } from "api/types.js";

export async function getUserRoles(
dynamoClient: DynamoDBClient,
Expand Down Expand Up @@ -102,7 +102,7 @@ export async function getGroupRoles(
type ClearAuthCacheInput = {
redisClient: Redis.default;
username: string[];
logger: pino.Logger | FastifyBaseLogger;
logger: ValidLoggers;
};
export async function clearAuthCache({
redisClient,
Expand Down
6 changes: 2 additions & 4 deletions src/api/functions/entraId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,14 @@
EntraGroupActions,
EntraGroupMetadata,
EntraInvitationResponse,
ProfilePatchRequest,
ProfilePatchWithUpnRequest,
} from "../../common/types/iam.js";
import { UserProfileData } from "common/types/msGraphApi.js";
import { SecretsManagerClient } from "@aws-sdk/client-secrets-manager";
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
import { checkPaidMembershipFromTable } from "./membership.js";
import type pino from "pino";
import { type FastifyBaseLogger } from "fastify";
import { RunEnvironment } from "common/roles.js";
import { ValidLoggers } from "api/types.js";

function validateGroupId(groupId: string): boolean {
const groupIdPattern = /^[a-zA-Z0-9-]+$/; // Adjust the pattern as needed
Expand All @@ -46,7 +44,7 @@
clientId: string;
scopes?: string[];
secretName?: string;
logger: pino.Logger | FastifyBaseLogger;
logger: ValidLoggers;
};
export async function getEntraIdToken({
clients,
Expand Down Expand Up @@ -892,13 +890,13 @@
const errorData = (await addOwnerResponse.json()) as {
error?: { message?: string };
};
console.warn(

Check warning on line 893 in src/api/functions/entraId.ts

View workflow job for this annotation

GitHub Actions / Run Unit Tests

Unexpected console statement
`Failed to add service principal as owner: ${errorData?.error?.message ?? addOwnerResponse.statusText}`,
);
// Don't throw here - group was created successfully, owner addition is non-critical
}
} catch (ownerError) {
console.warn(`Failed to add service principal as owner:`, ownerError);

Check warning on line 899 in src/api/functions/entraId.ts

View workflow job for this annotation

GitHub Actions / Run Unit Tests

Unexpected console statement
// Don't throw - group was created successfully
}

Expand Down
4 changes: 2 additions & 2 deletions src/api/functions/membership.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import { pollUntilNoError } from "./general.js";
import Redis from "ioredis";
import { getKey, setKey } from "./redisCache.js";
import { FastifyBaseLogger } from "fastify";
import type pino from "pino";
import { createAuditLogEntry } from "./auditLog.js";
import { Modules } from "common/modules.js";
import { ValidLoggers } from "api/types.js";

export const MEMBER_CACHE_SECONDS = 43200; // 12 hours

Expand All @@ -38,7 +38,7 @@ export async function patchExternalMemberList({
add: string[];
remove: string[];
clients: { dynamoClient: DynamoDBClient; redisClient: Redis.default };
logger: pino.Logger | FastifyBaseLogger;
logger: ValidLoggers;
auditLogData: { actor: string; requestId: string };
}) {
const listId = oldListId.toLowerCase();
Expand Down
4 changes: 3 additions & 1 deletion src/api/functions/mobileWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import pino from "pino";
import { createAuditLogEntry } from "./auditLog.js";
import { Modules } from "common/modules.js";
import { FastifyBaseLogger } from "fastify";
import { ValidLoggers } from "api/types.js";

function trim(s: string) {
return (s || "").replace(/^\s+|\s+$/g, "");
Expand All @@ -38,7 +39,7 @@ export async function issueAppleWalletMembershipCard(
runEnvironment: RunEnvironment,
email: string,
initiator: string,
logger: pino.Logger | FastifyBaseLogger,
logger: ValidLoggers,
name?: string,
) {
if (!email.endsWith("@illinois.edu")) {
Expand Down Expand Up @@ -118,6 +119,7 @@ export async function issueAppleWalletMembershipCard(
}
pkpass.backFields.push({ label: "Pass Created On", key: "iat", value: iat });
pkpass.backFields.push({ label: "Membership ID", key: "id", value: email });
logger.info("Constructed membership file");
const buffer = pkpass.getAsBuffer();
await createAuditLogEntry({
entry: {
Expand Down
6 changes: 3 additions & 3 deletions src/api/functions/redisCache.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import type RedisModule from "ioredis";
import type pino from "pino";
import { type FastifyBaseLogger } from "fastify";
import { ValidLoggers } from "api/types.js";

export type GetFromCacheInput = {
redisClient: RedisModule.default;
key: string;
logger: pino.Logger | FastifyBaseLogger;
logger: ValidLoggers;
};

export type SetInCacheInput = {
redisClient: RedisModule.default;
key: string;
data: string;
expiresIn?: number;
logger: pino.Logger | FastifyBaseLogger;
logger: ValidLoggers;
};

export async function getKey<T extends object>({
Expand Down
24 changes: 12 additions & 12 deletions src/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
"prettier:write": "prettier --write *.ts **/*.ts"
},
"dependencies": {
"@aws-sdk/client-dynamodb": "^3.895.0",
"@aws-sdk/client-lambda": "^3.895.0",
"@aws-sdk/client-secrets-manager": "^3.895.0",
"@aws-sdk/client-ses": "^3.895.0",
"@aws-sdk/client-sqs": "^3.895.0",
"@aws-sdk/client-sts": "^3.895.0",
"@aws-sdk/signature-v4-crt": "^3.895.0",
"@aws-sdk/util-dynamodb": "^3.895.0",
"@aws-sdk/client-dynamodb": "^3.914.0",
"@aws-sdk/client-lambda": "^3.914.0",
"@aws-sdk/client-secrets-manager": "^3.914.0",
"@aws-sdk/client-ses": "^3.914.0",
"@aws-sdk/client-sqs": "^3.914.0",
"@aws-sdk/client-sts": "^3.914.0",
"@aws-sdk/signature-v4-crt": "^3.914.0",
"@aws-sdk/util-dynamodb": "^3.914.0",
"@azure/msal-node": "^3.5.1",
"@fastify/auth": "^5.0.1",
"@fastify/aws-lambda": "^6.0.0",
Expand All @@ -33,7 +33,7 @@
"@middy/event-normalizer": "^6.1.6",
"@middy/sqs-partial-batch-failure": "^6.1.6",
"@touch4it/ical-timezones": "^1.9.0",
"argon2": "^0.43.0",
"argon2": "^0.44.0",
"aws-crt": "^1.27.3",
"base64-arraybuffer": "^1.0.2",
"discord.js": "^14.19.1",
Expand All @@ -53,13 +53,13 @@
"node-cache": "^5.1.2",
"octokit": "^5.0.3",
"passkit-generator": "^3.3.1",
"pino": "^9.6.0",
"pino": "^10.1.0",
"pluralize": "^8.0.0",
"qrcode": "^1.5.4",
"redlock-universal": "^0.6.4",
"sanitize-html": "^2.17.0",
"stripe": "^18.0.0",
"uuid": "^11.1.0",
"stripe": "^19.1.0",
"uuid": "^13.0.0",
"zod": "^4.0.14",
"zod-validation-error": "^4.0.1"
},
Expand Down
8 changes: 4 additions & 4 deletions src/archival/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"@types/aws-lambda": "^8.10.138",
"@types/node": "^24.3.0",
"typescript": "^5.9.2",
"esbuild": "^0.25.3"
"esbuild": "^0.25.11"
},
"dependencies": {
"@aws-sdk/client-dynamodb": "^3.895.0",
"@aws-sdk/client-firehose": "^3.895.0",
"@aws-sdk/util-dynamodb": "^3.895.0"
"@aws-sdk/client-dynamodb": "^3.914.0",
"@aws-sdk/client-firehose": "^3.914.0",
"@aws-sdk/util-dynamodb": "^3.914.0"
}
}
38 changes: 19 additions & 19 deletions src/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,32 @@
"storybook:build": "storybook build"
},
"dependencies": {
"@azure/msal-browser": "^4.11.0",
"@azure/msal-react": "^3.0.10",
"@mantine/core": "^8.2.2",
"@mantine/dates": "^8.2.2",
"@mantine/form": "^8.2.2",
"@mantine/hooks": "^8.2.2",
"@mantine/notifications": "^8.2.2",
"@tabler/icons-react": "^3.31.0",
"@azure/msal-browser": "^4.25.1",
"@azure/msal-react": "^3.0.20",
"@mantine/core": "^8.3.5",
"@mantine/dates": "^8.3.5",
"@mantine/form": "^8.3.5",
"@mantine/hooks": "^8.3.5",
"@mantine/notifications": "^8.3.5",
"@tabler/icons-react": "^3.35.0",
"@ungap/with-resolvers": "^0.1.0",
"axios": "^1.10.0",
"dayjs": "^1.11.12",
"dotenv": "^17.2.1",
"dayjs": "^1.11.18",
"dotenv": "^17.2.3",
"dotenv-cli": "^10.0.0",
"html5-qrcode": "^2.3.8",
"jsqr": "^1.4.0",
"mantine-form-zod-resolver": "^1.3.0",
"pdfjs-dist": "^5.2.133",
"pdfjs-dist": "^5.4.296",
"pluralize": "^8.0.0",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-pdf": "^10.0.1",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"react-pdf": "^10.2.0",
"react-pdftotext": "^1.3.0",
"react-qr-reader": "^3.0.0-beta-1",
"react-router-dom": "^7.5.2",
"zod": "^4.0.14",
"zod-validation-error": "^4.0.0-beta.1"
"react-router-dom": "^7.9.4",
"zod": "^4.1.12",
"zod-validation-error": "^4.0.2"
},
"devDependencies": {
"@eslint/compat": "^1.2.8",
Expand All @@ -60,8 +60,8 @@
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.5.2",
"@types/pluralize": "^0.0.33",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.2",
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"@vitejs/plugin-react": "^5.0.1",
Expand Down
Loading
Loading