From 31e7ec36a51144542540eba1f0508f8ef9114ea4 Mon Sep 17 00:00:00 2001 From: muntaxir4 Date: Sat, 30 Nov 2024 18:19:28 +0530 Subject: [PATCH 1/5] feat(schema, api-client): Migrate workspace membership schemas to @keyshade/schema --- package.json | 8 +- .../src/controllers/workspace-membership.ts | 2 +- .../src/types/workspace-membership.types.d.ts | 145 ------ packages/api-client/tests/config/setup.ts | 2 +- packages/eslint-config-custom/package.json | 20 +- packages/schema/src/index.ts | 1 + packages/schema/src/index.types.ts | 1 + packages/schema/src/user/index.ts | 16 +- .../schema/src/workspace-membership/index.ts | 99 ++++ .../src/workspace-membership/index.types.ts | 89 ++++ packages/schema/tests/api-key.spec.ts | 1 - packages/schema/tests/user.spec.ts | 70 ++- .../schema/tests/workspace-membership.spec.ts | 431 ++++++++++++++++++ pnpm-lock.yaml | 418 ++++++----------- 14 files changed, 852 insertions(+), 451 deletions(-) delete mode 100644 packages/api-client/src/types/workspace-membership.types.d.ts create mode 100644 packages/schema/src/workspace-membership/index.ts create mode 100644 packages/schema/src/workspace-membership/index.types.ts create mode 100644 packages/schema/tests/workspace-membership.spec.ts diff --git a/package.json b/package.json index 5f5aba7a..8ad65435 100644 --- a/package.json +++ b/package.json @@ -100,16 +100,16 @@ "lint:web": "turbo run lint --filter=web", "lint:platform": "turbo run lint --filter=platform", "lint:cli": "turbo run lint --filter=cli", - "lint:api-client": "turbo run lint --filter=api-client", + "lint:api-client": "turbo run lint --filter=@keyshade/api-client", "lint:secret-scan": "turbo run lint --filter=secret-scan", - "lint:schema": "turbo run lint --filter=schema", + "lint:schema": "turbo run lint --filter=@keyshade/schema", "build": "turbo run build", "build:api": "pnpm db:generate-types && turbo run build --filter=api", "build:web": "turbo run build --filter=web", "build:platform": "turbo run build --filter=platform", "build:cli": "pnpm build:secret-scan && pnpm build:api-client && turbo run build --filter=cli", - "build:api-client": "pnpm build:schema && turbo run --filter=api-client build", - "build:schema": "turbo run build --filter=schema", + "build:api-client": "pnpm build:schema && turbo run --filter=@keyshade/api-client build", + "build:schema": "turbo run build --filter=@keyshade/schema", "build:secret-scan": "turbo run build --filter=secret-scan", "start": "turbo run start", "start:api": "turbo run start --filter=api", diff --git a/packages/api-client/src/controllers/workspace-membership.ts b/packages/api-client/src/controllers/workspace-membership.ts index d49f8475..d296deeb 100644 --- a/packages/api-client/src/controllers/workspace-membership.ts +++ b/packages/api-client/src/controllers/workspace-membership.ts @@ -22,7 +22,7 @@ import { IsMemberResponse, GetMembersRequest, GetMembersResponse -} from '@api-client/types/workspace-membership.types' +} from '@keyshade/schema' import { ClientResponse } from '@keyshade/schema' export default class WorkspaceMembershipController { diff --git a/packages/api-client/src/types/workspace-membership.types.d.ts b/packages/api-client/src/types/workspace-membership.types.d.ts deleted file mode 100644 index df22dff6..00000000 --- a/packages/api-client/src/types/workspace-membership.types.d.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { Page } from '../../../../apps/cli/src/types/index.types' - -enum Authority { - CREATE_PROJECT, - READ_USERS, - ADD_USER, - REMOVE_USER, - UPDATE_USER_ROLE, - READ_WORKSPACE, - UPDATE_WORKSPACE, - DELETE_WORKSPACE, - CREATE_WORKSPACE_ROLE, - READ_WORKSPACE_ROLE, - UPDATE_WORKSPACE_ROLE, - DELETE_WORKSPACE_ROLE, - WORKSPACE_ADMIN, - READ_PROJECT, - UPDATE_PROJECT, - DELETE_PROJECT, - CREATE_SECRET, - READ_SECRET, - UPDATE_SECRET, - DELETE_SECRET, - CREATE_ENVIRONMENT, - READ_ENVIRONMENT, - UPDATE_ENVIRONMENT, - DELETE_ENVIRONMENT, - CREATE_VARIABLE, - READ_VARIABLE, - UPDATE_VARIABLE, - DELETE_VARIABLE, - CREATE_INTEGRATION, - READ_INTEGRATION, - UPDATE_INTEGRATION, - DELETE_INTEGRATION, - CREATE_WORKSPACE, - CREATE_API_KEY, - READ_API_KEY, - UPDATE_API_KEY, - DELETE_API_KEY, - UPDATE_PROFILE, - READ_SELF, - UPDATE_SELF, - READ_EVENT -} - -export interface CreateWorkspaceMember { - email: string - roleSlugs: string[] -} - -export interface TransferOwnershipRequest { - workspaceSlug: string - userEmail: string -} - -export interface TransferOwnershipResponse {} - -export interface InviteUsersRequest { - emails: string[] - workspaceSlug: string - members: CreateWorkspaceMember[] -} - -export interface InviteUsersResponse {} - -export interface RemoveUsersRequest { - workspaceSlug: string - userEmails: string[] -} - -export interface RemoveUsersResponse {} - -export interface UpdateMemberRoleRequest { - workspaceSlug: string - userEmail: string - roleSlugs: string[] -} - -export interface UpdateMemberRoleResponse {} - -export interface AcceptInvitationRequest { - workspaceSlug: string -} - -export interface AcceptInvitationResponse {} - -export interface DeclineInvitationRequest { - workspaceSlug: string -} - -export interface DeclineInvitationResponse {} - -export interface CancelInvitationRequest { - workspaceSlug: string - userEmail: string -} - -export interface CancelInvitationResponse {} - -export interface LeaveWorkspaceRequest { - workspaceSlug: string -} - -export interface LeaveWorkspaceResponse {} - -export interface IsMemberRequest { - workspaceSlug: string - userEmail: string -} - -export type IsMemberResponse = boolean - -export interface GetMembersRequest extends Page { - workspaceSlug: string - page?: number - limit?: number - sort?: string - order?: string - search?: string -} - -export interface GetMembersResponse - extends Page<{ - metadata: Record - id: string - user: { - id: string - email: string - name: string | null - } - roles: { - id: string - role: { - id: string - name: string - description: string | null - colorCode: string | null - authorities: Authority[] - projects: { - id: string - }[] - } - }[] - }> {} diff --git a/packages/api-client/tests/config/setup.ts b/packages/api-client/tests/config/setup.ts index 1a4e0f20..ed1d72d6 100644 --- a/packages/api-client/tests/config/setup.ts +++ b/packages/api-client/tests/config/setup.ts @@ -4,7 +4,7 @@ export default async function teardown() { await executeCommand('docker compose down') await executeCommand('docker compose -f ../../docker-compose-test.yml up -d') await executeCommand('cd ../.. && pnpm build:api') - await executeCommand('cd ../.. && pnpm db:deploy-migrations', { + await executeCommand('cd ../.. && sleep 3 && pnpm db:deploy-migrations', { DATABASE_URL: 'postgresql://prisma:prisma@localhost:5432/tests', PATH: process.env.PATH! }) diff --git a/packages/eslint-config-custom/package.json b/packages/eslint-config-custom/package.json index bc40923d..1f2cbcae 100644 --- a/packages/eslint-config-custom/package.json +++ b/packages/eslint-config-custom/package.json @@ -1,11 +1,11 @@ { - "name": "eslint-config-custom", - "license": "MIT", - "version": "0.0.0", - "private": true, - "devDependencies": { - "@vercel/style-guide": "^5.0.0", - "eslint-config-turbo": "^1.10.12", - "typescript": "^4.5.3" - } - } \ No newline at end of file + "name": "eslint-config-custom", + "license": "MIT", + "version": "0.0.0", + "private": true, + "devDependencies": { + "@vercel/style-guide": "^5.0.0", + "eslint-config-turbo": "^2.3.1", + "typescript": "^4.5.3" + } +} diff --git a/packages/schema/src/index.ts b/packages/schema/src/index.ts index 3b09fba5..484794c8 100644 --- a/packages/schema/src/index.ts +++ b/packages/schema/src/index.ts @@ -14,3 +14,4 @@ export * from './workspace' export * from './workspace-role' export * from './event' export * from './api-key' +export * from './workspace-membership' diff --git a/packages/schema/src/index.types.ts b/packages/schema/src/index.types.ts index e50b418f..6286e055 100644 --- a/packages/schema/src/index.types.ts +++ b/packages/schema/src/index.types.ts @@ -15,6 +15,7 @@ export * from './variable/index.types' export * from './event/index.types' export * from './integration/index.types' export * from './api-key/index.types' +export * from './workspace-membership/index.types' export type TCreateWorkspaceRole = z.infer export type TUpdateWorkspaceRole = z.infer diff --git a/packages/schema/src/user/index.ts b/packages/schema/src/user/index.ts index 1f6f116c..144a3097 100644 --- a/packages/schema/src/user/index.ts +++ b/packages/schema/src/user/index.ts @@ -1,7 +1,7 @@ import { z } from 'zod' import { WorkspaceSchema } from '@/workspace' -export const GetSelfResponseSchema = z.object({ +export const UserSchema = z.object({ id: z.string(), email: z.string().email(), name: z.string(), @@ -9,7 +9,10 @@ export const GetSelfResponseSchema = z.object({ isActive: z.boolean(), isOnboardingFinished: z.boolean(), isAdmin: z.boolean(), - authProvider: z.string(), + authProvider: z.string() +}) + +export const GetSelfResponseSchema = UserSchema.extend({ defaultWorkspace: WorkspaceSchema }) @@ -20,9 +23,7 @@ export const UpdateSelfRequestSchema = z.object({ email: z.string().email().optional() }) -export const UpdateSelfResponseSchema = GetSelfResponseSchema.partial().omit({ - defaultWorkspace: true -}) +export const UpdateSelfResponseSchema = UserSchema export const DeleteSelfRequestSchema = z.void() @@ -32,10 +33,7 @@ export const ValidateEmailChangeOTPRequestSchema = z.object({ otp: z.string().min(6).max(6) }) -export const ValidateEmailChangeOTPResponseSchema = - GetSelfResponseSchema.partial().omit({ - defaultWorkspace: true - }) +export const ValidateEmailChangeOTPResponseSchema = UserSchema export const ResendEmailChangeOTPRequestSchema = z.void() diff --git a/packages/schema/src/workspace-membership/index.ts b/packages/schema/src/workspace-membership/index.ts new file mode 100644 index 00000000..b5563c72 --- /dev/null +++ b/packages/schema/src/workspace-membership/index.ts @@ -0,0 +1,99 @@ +import { z } from 'zod' +import { authorityEnum } from '@/enums' +import { PageRequestSchema, PageResponseSchema } from '@/pagination' +import { WorkspaceSchema } from '@/workspace' +import { UserSchema } from '@/user' + +export const CreateWorkspaceMemberSchema = z.object({ + email: z.string().email(), + roleSlugs: z.array(z.string()) +}) + +export const TransferOwnershipRequestSchema = z.object({ + workspaceSlug: WorkspaceSchema.shape.slug, + userEmail: UserSchema.shape.email +}) + +export const TransferOwnershipResponseSchema = z.void() + +export const InviteUsersRequestSchema = z.object({ + workspaceSlug: WorkspaceSchema.shape.slug, + members: z.array(CreateWorkspaceMemberSchema) +}) + +export const InviteUsersResponseSchema = z.void() + +export const RemoveUsersRequestSchema = z.object({ + workspaceSlug: WorkspaceSchema.shape.slug, + userEmails: z.array(z.string().email()) +}) + +export const RemoveUsersResponseSchema = z.void() + +export const UpdateMemberRoleRequestSchema = z.object({ + workspaceSlug: WorkspaceSchema.shape.slug, + userEmail: UserSchema.shape.email, + roleSlugs: z.array(z.string()) +}) + +export const UpdateMemberRoleResponseSchema = z.void() + +export const AcceptInvitationRequestSchema = z.object({ + workspaceSlug: WorkspaceSchema.shape.slug +}) + +export const AcceptInvitationResponseSchema = z.void() + +export const DeclineInvitationRequestSchema = z.object({ + workspaceSlug: WorkspaceSchema.shape.slug +}) + +export const DeclineInvitationResponseSchema = z.void() + +export const CancelInvitationRequestSchema = z.object({ + workspaceSlug: WorkspaceSchema.shape.slug, + userEmail: UserSchema.shape.email +}) + +export const CancelInvitationResponseSchema = z.void() + +export const LeaveWorkspaceRequestSchema = z.object({ + workspaceSlug: WorkspaceSchema.shape.slug +}) + +export const LeaveWorkspaceResponseSchema = z.void() + +export const IsMemberRequestSchema = z.object({ + workspaceSlug: WorkspaceSchema.shape.slug, + userEmail: UserSchema.shape.email +}) + +export const IsMemberResponseSchema = z.boolean() + +export const GetMembersRequestSchema = PageRequestSchema.extend({ + workspaceSlug: WorkspaceSchema.shape.slug +}) + +export const GetMembersResponseSchema = PageResponseSchema( + z.object({ + id: z.string(), + user: UserSchema, + roles: z.array( + z.object({ + id: z.string(), + role: z.object({ + id: z.string(), + name: z.string(), + description: z.string().nullable(), + colorCode: z.string().nullable(), + authorities: z.array(authorityEnum), + projects: z.array( + z.object({ + id: z.string() + }) + ) + }) + }) + ) + }) +) diff --git a/packages/schema/src/workspace-membership/index.types.ts b/packages/schema/src/workspace-membership/index.types.ts new file mode 100644 index 00000000..f1349be1 --- /dev/null +++ b/packages/schema/src/workspace-membership/index.types.ts @@ -0,0 +1,89 @@ +import { z } from 'zod' + +import { + CreateWorkspaceMemberSchema, + TransferOwnershipRequestSchema, + TransferOwnershipResponseSchema, + InviteUsersRequestSchema, + InviteUsersResponseSchema, + RemoveUsersRequestSchema, + RemoveUsersResponseSchema, + UpdateMemberRoleRequestSchema, + UpdateMemberRoleResponseSchema, + AcceptInvitationRequestSchema, + AcceptInvitationResponseSchema, + DeclineInvitationRequestSchema, + DeclineInvitationResponseSchema, + CancelInvitationRequestSchema, + CancelInvitationResponseSchema, + LeaveWorkspaceRequestSchema, + LeaveWorkspaceResponseSchema, + IsMemberRequestSchema, + IsMemberResponseSchema, + GetMembersRequestSchema, + GetMembersResponseSchema +} from './' + +export type CreateWorkspaceMember = z.infer + +export type TransferOwnershipRequest = z.infer< + typeof TransferOwnershipRequestSchema +> + +export type TransferOwnershipResponse = z.infer< + typeof TransferOwnershipResponseSchema +> + +export type InviteUsersRequest = z.infer + +export type InviteUsersResponse = z.infer + +export type RemoveUsersRequest = z.infer + +export type RemoveUsersResponse = z.infer + +export type UpdateMemberRoleRequest = z.infer< + typeof UpdateMemberRoleRequestSchema +> + +export type UpdateMemberRoleResponse = z.infer< + typeof UpdateMemberRoleResponseSchema +> + +export type AcceptInvitationRequest = z.infer< + typeof AcceptInvitationRequestSchema +> + +export type AcceptInvitationResponse = z.infer< + typeof AcceptInvitationResponseSchema +> + +export type DeclineInvitationRequest = z.infer< + typeof DeclineInvitationRequestSchema +> + +export type DeclineInvitationResponse = z.infer< + typeof DeclineInvitationResponseSchema +> + +export type CancelInvitationRequest = z.infer< + typeof CancelInvitationRequestSchema +> + +export type CancelInvitationResponse = z.infer< + typeof CancelInvitationResponseSchema +> + +export type LeaveWorkspaceRequest = z.infer + +export type LeaveWorkspaceResponse = z.infer< + typeof LeaveWorkspaceResponseSchema +> + +export type IsMemberRequest = z.infer + +export type IsMemberResponse = z.infer + +export type GetMembersRequest = z.infer + +export type GetMembersResponse = z.infer diff --git a/packages/schema/tests/api-key.spec.ts b/packages/schema/tests/api-key.spec.ts index 111f8d58..c0cb9ba9 100644 --- a/packages/schema/tests/api-key.spec.ts +++ b/packages/schema/tests/api-key.spec.ts @@ -244,7 +244,6 @@ describe('API Key Schema Tests', () => { } } }) - console.log(result.error?.issues) expect(result.success).toBe(true) }) diff --git a/packages/schema/tests/user.spec.ts b/packages/schema/tests/user.spec.ts index c1eacbf2..a13b1f30 100644 --- a/packages/schema/tests/user.spec.ts +++ b/packages/schema/tests/user.spec.ts @@ -1,4 +1,5 @@ import { + UserSchema, GetSelfResponseSchema, UpdateSelfRequestSchema, UpdateSelfResponseSchema, @@ -11,6 +12,66 @@ import { } from '@/user' describe('User Schema Tests', () => { + // Tests for UserSchema + it('should validate a valid UserSchema', () => { + const result = UserSchema.safeParse({ + id: 'user123', + email: 'user@example.com', + name: 'User Name', + profilePictureUrl: 'http://example.com/profile.jpg', + isActive: true, + isOnboardingFinished: true, + isAdmin: false, + authProvider: 'google' + }) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid UserSchema', () => { + const result = UserSchema.safeParse({ + id: 'user123', + email: 'user@example', // Invalid email + name: 'User Name', + profilePictureUrl: 'http://example.com/profile.jpg', + isActive: true, + isOnboardingFinished: true, + isAdmin: false, + authProvider: 'google' + }) + expect(result.success).toBe(false) + expect(result.error?.issues).toHaveLength(1) + }) + + it('should not validate an invalid UserSchema with missing fields', () => { + const result = UserSchema.safeParse({ + id: 'user123', + email: 'user@example.com', + name: 'User Name', + isActive: true, + isOnboardingFinished: true, + isAdmin: false, + authProvider: 'google' + // Missing profilePictureUrl + }) + expect(result.success).toBe(false) + expect(result.error?.issues).toHaveLength(1) + }) + + it('should not validate an invalid UserSchema with incorrect types', () => { + const result = UserSchema.safeParse({ + id: 'user123', + email: 'user@example.com', + name: 'User Name', + profilePictureUrl: 'http://example.com/profile.jpg', + isActive: 'true', // Should be a boolean + isOnboardingFinished: true, + isAdmin: false, + authProvider: 'google' + }) + expect(result.success).toBe(false) + expect(result.error?.issues).toHaveLength(1) // Adjust the number based on incorrect types + }) + // Tests for GetSelfResponseSchema it('should validate a valid GetSelfResponseSchema', () => { const result = GetSelfResponseSchema.safeParse({ @@ -72,7 +133,11 @@ describe('User Schema Tests', () => { id: 'user123', email: 'jane@example.com', name: 'Jane Doe', - isActive: true + isActive: true, + profilePictureUrl: null, + isOnboardingFinished: false, + isAdmin: false, + authProvider: 'email' }) expect(result.success).toBe(true) }) @@ -81,9 +146,10 @@ describe('User Schema Tests', () => { const result = UpdateSelfResponseSchema.safeParse({ id: 123, // Should be a string email: 'jane@example.com' + // Missing required fields }) expect(result.success).toBe(false) - expect(result.error?.issues.length).toBe(1) + expect(result.error?.issues.length).toBe(7) }) // Tests for DeleteSelfRequestSchema diff --git a/packages/schema/tests/workspace-membership.spec.ts b/packages/schema/tests/workspace-membership.spec.ts new file mode 100644 index 00000000..d7ec91f8 --- /dev/null +++ b/packages/schema/tests/workspace-membership.spec.ts @@ -0,0 +1,431 @@ +// workspace-membership.spec.ts +import { + CreateWorkspaceMemberSchema, + TransferOwnershipRequestSchema, + TransferOwnershipResponseSchema, + InviteUsersRequestSchema, + InviteUsersResponseSchema, + RemoveUsersRequestSchema, + RemoveUsersResponseSchema, + UpdateMemberRoleRequestSchema, + UpdateMemberRoleResponseSchema, + AcceptInvitationRequestSchema, + AcceptInvitationResponseSchema, + DeclineInvitationRequestSchema, + DeclineInvitationResponseSchema, + CancelInvitationRequestSchema, + CancelInvitationResponseSchema, + LeaveWorkspaceRequestSchema, + LeaveWorkspaceResponseSchema, + IsMemberRequestSchema, + IsMemberResponseSchema, + GetMembersRequestSchema, + GetMembersResponseSchema +} from '@/workspace-membership' + +describe('Workspace Membership Schema Tests', () => { + // Tests for CreateWorkspaceMemberSchema + it('should validate a valid CreateWorkspaceMemberSchema', () => { + const result = CreateWorkspaceMemberSchema.safeParse({ + email: 'user@example.com', + roleSlugs: ['admin', 'editor'] + }) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid CreateWorkspaceMemberSchema', () => { + const result = CreateWorkspaceMemberSchema.safeParse({ + email: 'user@example', // Invalid email + roleSlugs: 'admin' // Should be an array + }) + expect(result.success).toBe(false) + expect(result.error?.issues).toHaveLength(2) + }) + + // Tests for TransferOwnershipRequestSchema + it('should validate a valid TransferOwnershipRequestSchema', () => { + const result = TransferOwnershipRequestSchema.safeParse({ + workspaceSlug: 'workspace-slug', + userEmail: 'user@example.com' + }) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid TransferOwnershipRequestSchema', () => { + const result = TransferOwnershipRequestSchema.safeParse({ + workspaceSlug: 123, // Should be a string + userEmail: 'user@example' // Invalid email + }) + expect(result.success).toBe(false) + expect(result.error?.issues).toHaveLength(2) + }) + + // Tests for TransferOwnershipResponseSchema + it('should validate a valid TransferOwnershipResponseSchema', () => { + const result = TransferOwnershipResponseSchema.safeParse(undefined) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid TransferOwnershipResponseSchema', () => { + const result = TransferOwnershipResponseSchema.safeParse({ + unexpectedField: 'value' + }) + expect(result.success).toBe(false) + }) + + // Tests for InviteUsersRequestSchema + it('should validate a valid InviteUsersRequestSchema', () => { + const result = InviteUsersRequestSchema.safeParse({ + workspaceSlug: 'workspace-slug', + members: [ + { + email: 'user1@example.com', + roleSlugs: ['admin', 'editor'] + }, + { + email: 'user2@example.com', + roleSlugs: ['viewer'] + } + ] + }) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid InviteUsersRequestSchema', () => { + const result = InviteUsersRequestSchema.safeParse({ + workspaceSlug: 123, // Should be a string + members: [ + { + email: 'user1@example', // Invalid email + roleSlugs: 'admin' // Should be an array + } + ] + }) + expect(result.success).toBe(false) + expect(result.error?.issues).toHaveLength(3) + }) + + // Tests for InviteUsersResponseSchema + it('should validate a valid InviteUsersResponseSchema', () => { + const result = InviteUsersResponseSchema.safeParse(undefined) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid InviteUsersResponseSchema', () => { + const result = InviteUsersResponseSchema.safeParse({ + unexpectedField: 'value' + }) + expect(result.success).toBe(false) + }) + + // Tests for RemoveUsersRequestSchema + it('should validate a valid RemoveUsersRequestSchema', () => { + const result = RemoveUsersRequestSchema.safeParse({ + workspaceSlug: 'workspace-slug', + userEmails: ['user1@example.com', 'user2@example.com'] + }) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid RemoveUsersRequestSchema', () => { + const result = RemoveUsersRequestSchema.safeParse({ + workspaceSlug: 123, // Should be a string + userEmails: ['user1@example', 'user2@example'] // Invalid email + }) + expect(result.success).toBe(false) + expect(result.error?.issues).toHaveLength(3) + }) + + // Tests for RemoveUsersResponseSchema + it('should validate a valid RemoveUsersResponseSchema', () => { + const result = RemoveUsersResponseSchema.safeParse(undefined) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid RemoveUsersResponseSchema', () => { + const result = RemoveUsersResponseSchema.safeParse({ + unexpectedField: 'value' + }) + expect(result.success).toBe(false) + }) + + // Tests for UpdateMemberRoleRequestSchema + it('should validate a valid UpdateMemberRoleRequestSchema', () => { + const result = UpdateMemberRoleRequestSchema.safeParse({ + workspaceSlug: 'workspace-slug', + userEmail: 'user@example.com', + roleSlugs: ['admin', 'editor'] + }) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid UpdateMemberRoleRequestSchema', () => { + const result = UpdateMemberRoleRequestSchema.safeParse({ + workspaceSlug: 123, // Should be a string + userEmail: 'user@example', // Invalid email + roleSlugs: 'admin' // Should be an array + }) + expect(result.success).toBe(false) + expect(result.error?.issues).toHaveLength(3) + }) + + // Tests for UpdateMemberRoleResponseSchema + it('should validate a valid UpdateMemberRoleResponseSchema', () => { + const result = UpdateMemberRoleResponseSchema.safeParse(undefined) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid UpdateMemberRoleResponseSchema', () => { + const result = UpdateMemberRoleResponseSchema.safeParse({ + unexpectedField: 'value' + }) + expect(result.success).toBe(false) + }) + + // Tests for AcceptInvitationRequestSchema + it('should validate a valid AcceptInvitationRequestSchema', () => { + const result = AcceptInvitationRequestSchema.safeParse({ + workspaceSlug: 'workspace-slug' + }) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid AcceptInvitationRequestSchema', () => { + const result = AcceptInvitationRequestSchema.safeParse({ + workspaceSlug: 123 // Should be a string + }) + expect(result.success).toBe(false) + expect(result.error?.issues).toHaveLength(1) + }) + + // Tests for AcceptInvitationResponseSchema + it('should validate a valid AcceptInvitationResponseSchema', () => { + const result = AcceptInvitationResponseSchema.safeParse(undefined) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid AcceptInvitationResponseSchema', () => { + const result = AcceptInvitationResponseSchema.safeParse({ + unexpectedField: 'value' + }) + expect(result.success).toBe(false) + }) + + // Tests for DeclineInvitationRequestSchema + it('should validate a valid DeclineInvitationRequestSchema', () => { + const result = DeclineInvitationRequestSchema.safeParse({ + workspaceSlug: 'workspace-slug' + }) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid DeclineInvitationRequestSchema', () => { + const result = DeclineInvitationRequestSchema.safeParse({ + workspaceSlug: 123 // Should be a string + }) + expect(result.success).toBe(false) + expect(result.error?.issues).toHaveLength(1) + }) + + // Tests for DeclineInvitationResponseSchema + it('should validate a valid DeclineInvitationResponseSchema', () => { + const result = DeclineInvitationResponseSchema.safeParse(undefined) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid DeclineInvitationResponseSchema', () => { + const result = DeclineInvitationResponseSchema.safeParse({ + unexpectedField: 'value' + }) + expect(result.success).toBe(false) + }) + + // Tests for CancelInvitationRequestSchema + it('should validate a valid CancelInvitationRequestSchema', () => { + const result = CancelInvitationRequestSchema.safeParse({ + workspaceSlug: 'workspace-slug', + userEmail: 'user@example.com' + }) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid CancelInvitationRequestSchema', () => { + const result = CancelInvitationRequestSchema.safeParse({ + workspaceSlug: 123, // Should be a string + userEmail: 'user@example' // Invalid email + }) + expect(result.success).toBe(false) + expect(result.error?.issues).toHaveLength(2) + }) + + // Tests for CancelInvitationResponseSchema + it('should validate a valid CancelInvitationResponseSchema', () => { + const result = CancelInvitationResponseSchema.safeParse(undefined) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid CancelInvitationResponseSchema', () => { + const result = CancelInvitationResponseSchema.safeParse({ + unexpectedField: 'value' + }) + expect(result.success).toBe(false) + }) + + // Tests for LeaveWorkspaceRequestSchema + it('should validate a valid LeaveWorkspaceRequestSchema', () => { + const result = LeaveWorkspaceRequestSchema.safeParse({ + workspaceSlug: 'workspace-slug' + }) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid LeaveWorkspaceRequestSchema', () => { + const result = LeaveWorkspaceRequestSchema.safeParse({ + workspaceSlug: 123 // Should be a string + }) + expect(result.success).toBe(false) + expect(result.error?.issues).toHaveLength(1) + }) + + // Tests for LeaveWorkspaceResponseSchema + it('should validate a valid LeaveWorkspaceResponseSchema', () => { + const result = LeaveWorkspaceResponseSchema.safeParse(undefined) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid LeaveWorkspaceResponseSchema', () => { + const result = LeaveWorkspaceResponseSchema.safeParse({ + unexpectedField: 'value' + }) + expect(result.success).toBe(false) + }) + + // Tests for IsMemberRequestSchema + it('should validate a valid IsMemberRequestSchema', () => { + const result = IsMemberRequestSchema.safeParse({ + workspaceSlug: 'workspace-slug', + userEmail: 'user@example.com' + }) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid IsMemberRequestSchema', () => { + const result = IsMemberRequestSchema.safeParse({ + workspaceSlug: 123, // Should be a string + userEmail: 'user@example' // Invalid email + }) + expect(result.success).toBe(false) + expect(result.error?.issues).toHaveLength(2) + }) + + // Tests for IsMemberResponseSchema + it('should validate a valid IsMemberResponseSchema', () => { + const result = IsMemberResponseSchema.safeParse(true) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid IsMemberResponseSchema', () => { + const result = IsMemberResponseSchema.safeParse('true') // Should be a boolean + expect(result.success).toBe(false) + expect(result.error?.issues).toHaveLength(1) + }) + + // Tests for GetMembersRequestSchema + it('should validate a valid GetMembersRequestSchema', () => { + const result = GetMembersRequestSchema.safeParse({ + page: 1, + limit: 10, + sort: 'name', + order: 'asc', + search: 'admin', + workspaceSlug: 'workspace-slug' + }) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid GetMembersRequestSchema', () => { + const result = GetMembersRequestSchema.safeParse({ + page: 'one', // Should be a number + limit: 10, + sort: 'name', + order: 'asc', + search: 'admin', + workspaceSlug: 123 // Should be a string + }) + expect(result.success).toBe(false) + expect(result.error?.issues).toHaveLength(2) + }) + + // Tests for GetMembersResponseSchema + it('should validate a valid GetMembersResponseSchema', () => { + const result = GetMembersResponseSchema.safeParse({ + items: [ + { + id: 'member123', + user: { + id: 'user123', + email: 'user@example.com', + name: 'User Name', + profilePictureUrl: 'http://example.com/profile.jpg', + isActive: true, + isOnboardingFinished: true, + isAdmin: false, + authProvider: 'google' + }, + roles: [ + { + id: 'role123', + role: { + id: 'role123', + name: 'Admin Role', + description: 'Role with admin privileges', + colorCode: '#FF5733', + authorities: ['CREATE_PROJECT'], + projects: [ + { + id: 'project123' + } + ] + } + } + ] + } + ], + metadata: { + page: 1, + perPage: 10, + pageCount: 1, + totalCount: 1, + links: { + self: 'http://example.com/page/1', + first: 'http://example.com/page/1', + previous: null, + next: null, + last: 'http://example.com/page/1' + } + } + }) + expect(result.success).toBe(true) + }) + + it('should not validate an invalid GetMembersResponseSchema', () => { + const result = GetMembersResponseSchema.safeParse({ + items: 'not-an-array', // Should be an array + metadata: { + page: 1, + perPage: 10, + pageCount: 1, + totalCount: 1, + links: { + self: 'http://example.com/page/1', + first: 'http://example.com/page/1', + previous: null, + next: null, + last: 'http://example.com/page/1' + } + } + }) + expect(result.success).toBe(false) + expect(result.error?.issues).toHaveLength(1) + }) +}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f71a4481..f1feeac5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -67,7 +67,7 @@ importers: version: 2.5.2 ts-node: specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2) + version: 10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2) tsc-alias: specifier: ^1.8.10 version: 1.8.10 @@ -86,7 +86,7 @@ importers: version: 2.36.1 '@sentry/webpack-plugin': specifier: ^2.14.2 - version: 2.22.4(webpack@5.94.0(@swc/core@1.7.26(@swc/helpers@0.5.2))) + version: 2.22.4(webpack@5.94.0(@swc/core@1.7.26)) '@types/jest': specifier: ^29.5.2 version: 29.5.13 @@ -116,7 +116,7 @@ importers: version: 9.1.6 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)) + version: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)) prettier: specifier: ^3.0.0 version: 3.3.3 @@ -125,7 +125,7 @@ importers: version: 0.5.14(prettier@3.3.3) ts-jest: specifier: ^29.1.0 - version: 29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)))(typescript@5.6.2) + version: 29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)))(typescript@5.6.2) tsconfig: specifier: workspace:* version: link:packages/tsconfig @@ -133,8 +133,8 @@ importers: specifier: ^4.2.0 version: 4.2.0 turbo: - specifier: ^1.12.4 - version: 1.13.4 + specifier: ^2.3.1 + version: 2.3.3 apps/api: dependencies: @@ -158,19 +158,19 @@ importers: version: 10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2) '@nestjs/platform-fastify': specifier: ^10.3.3 - version: 10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2) + version: 10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.2)(@nestjs/websockets@10.4.2)(reflect-metadata@0.2.2)(rxjs@7.8.1)) '@nestjs/platform-socket.io': specifier: ^10.3.7 version: 10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/websockets@10.4.2)(rxjs@7.8.1) '@nestjs/schedule': specifier: ^4.0.1 - version: 4.1.1(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2) + version: 4.1.1(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.2)(@nestjs/websockets@10.4.2)(reflect-metadata@0.2.2)(rxjs@7.8.1)) '@nestjs/swagger': specifier: ^7.3.0 - version: 7.4.1(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2)(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2) + version: 7.4.1(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.2)(@nestjs/websockets@10.4.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2) '@nestjs/throttler': specifier: ^6.2.1 - version: 6.2.1(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2)(reflect-metadata@0.2.2) + version: 6.2.1(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.2)(@nestjs/websockets@10.4.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(reflect-metadata@0.2.2) '@nestjs/websockets': specifier: ^10.3.7 version: 10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2)(@nestjs/platform-socket.io@10.4.2)(reflect-metadata@0.2.2)(rxjs@7.8.1) @@ -222,13 +222,13 @@ importers: devDependencies: '@nestjs/cli': specifier: ^10.0.0 - version: 10.4.5(@swc/cli@0.4.0(@swc/core@1.7.26(@swc/helpers@0.5.2))(chokidar@3.6.0))(@swc/core@1.7.26(@swc/helpers@0.5.2)) + version: 10.4.5(@swc/cli@0.4.0(@swc/core@1.7.26)(chokidar@3.6.0))(@swc/core@1.7.26) '@nestjs/schematics': specifier: ^10.0.0 version: 10.1.4(chokidar@3.6.0)(typescript@5.3.3) '@nestjs/testing': specifier: ^10.0.0 - version: 10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2)(@nestjs/platform-express@10.4.2) + version: 10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.2)(@nestjs/websockets@10.4.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2)) '@prisma/client': specifier: ^5.19.1 version: 5.19.1(prisma@5.19.1) @@ -258,10 +258,10 @@ importers: version: 7.4.2 jest: specifier: ^29.5.0 - version: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3)) + version: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) jest-mock-extended: specifier: ^3.0.5 - version: 3.0.7(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3)))(typescript@5.3.3) + version: 3.0.7(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)))(typescript@5.3.3) prettier: specifier: ^3.0.0 version: 3.3.3 @@ -279,10 +279,10 @@ importers: version: 6.3.4 ts-jest: specifier: ^29.1.0 - version: 29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3)))(typescript@5.3.3) + version: 29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)))(typescript@5.3.3) ts-loader: specifier: ^9.4.3 - version: 9.5.1(typescript@5.3.3)(webpack@5.94.0(@swc/core@1.7.26(@swc/helpers@0.5.2))) + version: 9.5.1(typescript@5.3.3)(webpack@5.94.0(@swc/core@1.7.26)) apps/cli: dependencies: @@ -352,7 +352,7 @@ importers: version: 43.0.1(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2))(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1))(eslint-plugin-n@16.6.2(eslint@8.57.1))(eslint-plugin-promise@6.6.0(eslint@8.57.1))(eslint@8.57.1)(typescript@5.6.2) tsup: specifier: ^8.1.2 - version: 8.2.4(@swc/core@1.7.26(@swc/helpers@0.5.2))(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1) + version: 8.2.4(@swc/core@1.7.26)(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1) apps/platform: dependencies: @@ -463,7 +463,7 @@ importers: version: 2.5.2 tailwindcss-animate: specifier: ^1.0.7 - version: 1.0.7(tailwindcss@3.4.11(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2))) + version: 1.0.7(tailwindcss@3.4.11(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2))) zod: specifier: ^3.23.8 version: 3.23.8 @@ -476,7 +476,7 @@ importers: version: 8.1.0(typescript@5.6.2) '@tailwindcss/forms': specifier: ^0.5.7 - version: 0.5.9(tailwindcss@3.4.11(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2))) + version: 0.5.9(tailwindcss@3.4.11(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2))) '@types/dayjs-precise-range': specifier: ^1.0.5 version: 1.0.5 @@ -500,7 +500,7 @@ importers: version: 8.4.47 tailwindcss: specifier: ^3.3.3 - version: 3.4.11(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)) + version: 3.4.11(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)) tsconfig: specifier: workspace:* version: link:../../packages/tsconfig @@ -509,13 +509,13 @@ importers: dependencies: '@mdx-js/loader': specifier: ^3.0.1 - version: 3.0.1(webpack@5.94.0(@swc/core@1.7.26(@swc/helpers@0.5.2))) + version: 3.0.1(webpack@5.94.0(@swc/core@1.7.26)) '@mdx-js/react': specifier: ^3.0.1 version: 3.0.1(@types/react@18.3.6)(react@18.3.1) '@next/mdx': specifier: ^14.2.3 - version: 14.2.11(@mdx-js/loader@3.0.1(webpack@5.94.0(@swc/core@1.7.26(@swc/helpers@0.5.2))))(@mdx-js/react@3.0.1(@types/react@18.3.6)(react@18.3.1)) + version: 14.2.11(@mdx-js/loader@3.0.1(webpack@5.94.0(@swc/core@1.7.26)))(@mdx-js/react@3.0.1(@types/react@18.3.6)(react@18.3.1)) '@tsparticles/engine': specifier: ^3.3.0 version: 3.5.0 @@ -567,7 +567,7 @@ importers: version: 8.1.0(typescript@5.6.2) '@tailwindcss/forms': specifier: ^0.5.7 - version: 0.5.9(tailwindcss@3.4.11(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2))) + version: 0.5.9(tailwindcss@3.4.11(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2))) '@types/react': specifier: ^18.0.22 version: 18.3.6 @@ -585,7 +585,7 @@ importers: version: 8.4.47 tailwindcss: specifier: ^3.3.3 - version: 3.4.11(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)) + version: 3.4.11(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)) tsconfig: specifier: workspace:* version: link:../../packages/tsconfig @@ -596,10 +596,10 @@ importers: devDependencies: '@vercel/style-guide': specifier: ^5.0.0 - version: 5.2.0(@next/eslint-plugin-next@13.5.6)(eslint@8.57.1)(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5)))(prettier@3.3.3)(typescript@4.9.5) + version: 5.2.0(@next/eslint-plugin-next@13.5.6)(eslint@8.57.1)(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)))(prettier@3.3.3)(typescript@4.9.5) eslint-config-turbo: - specifier: ^1.10.12 - version: 1.13.4(eslint@8.57.1) + specifier: ^2.3.1 + version: 2.3.3(eslint@8.57.1) typescript: specifier: ^4.5.3 version: 4.9.5 @@ -627,10 +627,10 @@ importers: version: 43.0.1(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2))(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1))(eslint-plugin-n@16.6.2(eslint@8.57.1))(eslint-plugin-promise@6.6.0(eslint@8.57.1))(eslint@8.57.1)(typescript@5.6.2) jest: specifier: ^29.5.0 - version: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)) + version: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)) tsup: specifier: ^8.1.2 - version: 8.2.4(@swc/core@1.7.26(@swc/helpers@0.5.2))(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1) + version: 8.2.4(@swc/core@1.7.26)(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1) typescript: specifier: ^5.5.3 version: 5.6.2 @@ -4973,8 +4973,8 @@ packages: eslint-plugin-n: '^15.0.0 || ^16.0.0 ' eslint-plugin-promise: ^6.0.0 - eslint-config-turbo@1.13.4: - resolution: {integrity: sha512-+we4eWdZlmlEn7LnhXHCIPX/wtujbHCS7XjQM/TN09BHNEl2fZ8id4rHfdfUKIYTSKyy8U/nNyJ0DNoZj5Q8bw==} + eslint-config-turbo@2.3.3: + resolution: {integrity: sha512-cM9wSBYowQIrjx2MPCzFE6jTnG4vpTPJKZ/O+Ps3CqrmGK/wtNOsY6WHGMwLtKY/nNbgRahAJH6jGVF6k2coOg==} peerDependencies: eslint: '>6.6.0' @@ -5130,8 +5130,8 @@ packages: eslint-plugin-tsdoc@0.2.17: resolution: {integrity: sha512-xRmVi7Zx44lOBuYqG8vzTXuL6IdGOeF9nHX17bjJ8+VE6fsxpdGem0/SBTmAwgYMKYB1WBkqRJVQ+n8GK041pA==} - eslint-plugin-turbo@1.13.4: - resolution: {integrity: sha512-82GfMzrewI/DJB92Bbch239GWbGx4j1zvjk1lqb06lxIlMPnVwUHVwPbAnLfyLG3JuhLv9whxGkO/q1CL18JTg==} + eslint-plugin-turbo@2.3.3: + resolution: {integrity: sha512-j8UEA0Z+NNCsjZep9G5u5soDQHcXq/x4amrwulk6eHF1U91H2qAjp5I4jQcvJewmccCJbVp734PkHHTRnosjpg==} peerDependencies: eslint: '>6.6.0' @@ -8600,38 +8600,38 @@ packages: engines: {node: '>=18.0.0'} hasBin: true - turbo-darwin-64@1.13.4: - resolution: {integrity: sha512-A0eKd73R7CGnRinTiS7txkMElg+R5rKFp9HV7baDiEL4xTG1FIg/56Vm7A5RVgg8UNgG2qNnrfatJtb+dRmNdw==} + turbo-darwin-64@2.3.3: + resolution: {integrity: sha512-bxX82xe6du/3rPmm4aCC5RdEilIN99VUld4HkFQuw+mvFg6darNBuQxyWSHZTtc25XgYjQrjsV05888w1grpaA==} cpu: [x64] os: [darwin] - turbo-darwin-arm64@1.13.4: - resolution: {integrity: sha512-eG769Q0NF6/Vyjsr3mKCnkG/eW6dKMBZk6dxWOdrHfrg6QgfkBUk0WUUujzdtVPiUIvsh4l46vQrNVd9EOtbyA==} + turbo-darwin-arm64@2.3.3: + resolution: {integrity: sha512-DYbQwa3NsAuWkCUYVzfOUBbSUBVQzH5HWUFy2Kgi3fGjIWVZOFk86ss+xsWu//rlEAfYwEmopigsPYSmW4X15A==} cpu: [arm64] os: [darwin] - turbo-linux-64@1.13.4: - resolution: {integrity: sha512-Bq0JphDeNw3XEi+Xb/e4xoKhs1DHN7OoLVUbTIQz+gazYjigVZvtwCvgrZI7eW9Xo1eOXM2zw2u1DGLLUfmGkQ==} + turbo-linux-64@2.3.3: + resolution: {integrity: sha512-eHj9OIB0dFaP6BxB88jSuaCLsOQSYWBgmhy2ErCu6D2GG6xW3b6e2UWHl/1Ho9FsTg4uVgo4DB9wGsKa5erjUA==} cpu: [x64] os: [linux] - turbo-linux-arm64@1.13.4: - resolution: {integrity: sha512-BJcXw1DDiHO/okYbaNdcWN6szjXyHWx9d460v6fCHY65G8CyqGU3y2uUTPK89o8lq/b2C8NK0yZD+Vp0f9VoIg==} + turbo-linux-arm64@2.3.3: + resolution: {integrity: sha512-NmDE/NjZoDj1UWBhMtOPmqFLEBKhzGS61KObfrDEbXvU3lekwHeoPvAMfcovzswzch+kN2DrtbNIlz+/rp8OCg==} cpu: [arm64] os: [linux] - turbo-windows-64@1.13.4: - resolution: {integrity: sha512-OFFhXHOFLN7A78vD/dlVuuSSVEB3s9ZBj18Tm1hk3aW1HTWTuAw0ReN6ZNlVObZUHvGy8d57OAGGxf2bT3etQw==} + turbo-windows-64@2.3.3: + resolution: {integrity: sha512-O2+BS4QqjK3dOERscXqv7N2GXNcqHr9hXumkMxDj/oGx9oCatIwnnwx34UmzodloSnJpgSqjl8iRWiY65SmYoQ==} cpu: [x64] os: [win32] - turbo-windows-arm64@1.13.4: - resolution: {integrity: sha512-u5A+VOKHswJJmJ8o8rcilBfU5U3Y1TTAfP9wX8bFh8teYF1ghP0EhtMRLjhtp6RPa+XCxHHVA2CiC3gbh5eg5g==} + turbo-windows-arm64@2.3.3: + resolution: {integrity: sha512-dW4ZK1r6XLPNYLIKjC4o87HxYidtRRcBeo/hZ9Wng2XM/MqqYkAyzJXJGgRMsc0MMEN9z4+ZIfnSNBrA0b08ag==} cpu: [arm64] os: [win32] - turbo@1.13.4: - resolution: {integrity: sha512-1q7+9UJABuBAHrcC4Sxp5lOqYS5mvxRrwa33wpIyM18hlOCpRD/fTJNxZ0vhbMcJmz15o9kkVm743mPn7p6jpQ==} + turbo@2.3.3: + resolution: {integrity: sha512-DUHWQAcC8BTiUZDRzAYGvpSpGLiaOQPfYXlCieQbwUvmml/LRGIe3raKdrOPOoiX0DYlzxs2nH6BoWJoZrj8hA==} hasBin: true type-check@0.4.0: @@ -10262,7 +10262,7 @@ snapshots: jest-util: 29.7.0 slash: 3.0.0 - '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5))': + '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 @@ -10276,7 +10276,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5)) + jest-config: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -10296,9 +10296,8 @@ snapshots: - babel-plugin-macros - supports-color - ts-node - optional: true - '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3))': + '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 @@ -10312,42 +10311,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3)) - jest-haste-map: 29.7.0 - jest-message-util: 29.7.0 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-resolve-dependencies: 29.7.0 - jest-runner: 29.7.0 - jest-runtime: 29.7.0 - jest-snapshot: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - jest-watcher: 29.7.0 - micromatch: 4.0.8 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-ansi: 6.0.1 - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - - ts-node - - '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2))': - dependencies: - '@jest/console': 29.7.0 - '@jest/reporters': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 20.16.5 - ansi-escapes: 4.3.2 - chalk: 4.1.2 - ci-info: 3.9.0 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)) + jest-config: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -10519,11 +10483,11 @@ snapshots: '@lukeed/csprng@1.1.0': {} - '@mdx-js/loader@3.0.1(webpack@5.94.0(@swc/core@1.7.26(@swc/helpers@0.5.2)))': + '@mdx-js/loader@3.0.1(webpack@5.94.0(@swc/core@1.7.26))': dependencies: '@mdx-js/mdx': 3.0.1 source-map: 0.7.4 - webpack: 5.94.0(@swc/core@1.7.26(@swc/helpers@0.5.2)) + webpack: 5.94.0(@swc/core@1.7.26) transitivePeerDependencies: - supports-color @@ -10583,7 +10547,7 @@ snapshots: got: 11.8.6 os-filter-obj: 2.0.0 - '@nestjs/cli@10.4.5(@swc/cli@0.4.0(@swc/core@1.7.26(@swc/helpers@0.5.2))(chokidar@3.6.0))(@swc/core@1.7.26(@swc/helpers@0.5.2))': + '@nestjs/cli@10.4.5(@swc/cli@0.4.0(@swc/core@1.7.26)(chokidar@3.6.0))(@swc/core@1.7.26)': dependencies: '@angular-devkit/core': 17.3.8(chokidar@3.6.0) '@angular-devkit/schematics': 17.3.8(chokidar@3.6.0) @@ -10593,7 +10557,7 @@ snapshots: chokidar: 3.6.0 cli-table3: 0.6.5 commander: 4.1.1 - fork-ts-checker-webpack-plugin: 9.0.2(typescript@5.3.3)(webpack@5.94.0(@swc/core@1.7.26(@swc/helpers@0.5.2))) + fork-ts-checker-webpack-plugin: 9.0.2(typescript@5.3.3)(webpack@5.94.0(@swc/core@1.7.26)) glob: 10.4.2 inquirer: 8.2.6 node-emoji: 1.11.0 @@ -10602,7 +10566,7 @@ snapshots: tsconfig-paths: 4.2.0 tsconfig-paths-webpack-plugin: 4.1.0 typescript: 5.3.3 - webpack: 5.94.0(@swc/core@1.7.26(@swc/helpers@0.5.2)) + webpack: 5.94.0(@swc/core@1.7.26) webpack-node-externals: 3.0.0 optionalDependencies: '@swc/cli': 0.4.0(@swc/core@1.7.26(@swc/helpers@0.5.2))(chokidar@3.6.0) @@ -10679,7 +10643,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@nestjs/platform-fastify@10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2)': + '@nestjs/platform-fastify@10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.2)(@nestjs/websockets@10.4.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))': dependencies: '@fastify/cors': 9.0.1 '@fastify/formbody': 7.4.0 @@ -10703,7 +10667,7 @@ snapshots: - supports-color - utf-8-validate - '@nestjs/schedule@4.1.1(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2)': + '@nestjs/schedule@4.1.1(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.2)(@nestjs/websockets@10.4.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))': dependencies: '@nestjs/common': 10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1) '@nestjs/core': 10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.2)(@nestjs/websockets@10.4.2)(reflect-metadata@0.2.2)(rxjs@7.8.1) @@ -10721,7 +10685,7 @@ snapshots: transitivePeerDependencies: - chokidar - '@nestjs/swagger@7.4.1(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2)(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)': + '@nestjs/swagger@7.4.1(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.2)(@nestjs/websockets@10.4.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)': dependencies: '@microsoft/tsdoc': 0.15.0 '@nestjs/common': 10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1) @@ -10736,7 +10700,7 @@ snapshots: class-transformer: 0.5.1 class-validator: 0.14.1 - '@nestjs/testing@10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2)(@nestjs/platform-express@10.4.2)': + '@nestjs/testing@10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.2)(@nestjs/websockets@10.4.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2))': dependencies: '@nestjs/common': 10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1) '@nestjs/core': 10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.2)(@nestjs/websockets@10.4.2)(reflect-metadata@0.2.2)(rxjs@7.8.1) @@ -10744,7 +10708,7 @@ snapshots: optionalDependencies: '@nestjs/platform-express': 10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2) - '@nestjs/throttler@6.2.1(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2)(reflect-metadata@0.2.2)': + '@nestjs/throttler@6.2.1(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.2)(@nestjs/websockets@10.4.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(reflect-metadata@0.2.2)': dependencies: '@nestjs/common': 10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1) '@nestjs/core': 10.4.2(@nestjs/common@10.4.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@10.4.2)(@nestjs/websockets@10.4.2)(reflect-metadata@0.2.2)(rxjs@7.8.1) @@ -10768,11 +10732,11 @@ snapshots: dependencies: glob: 7.1.7 - '@next/mdx@14.2.11(@mdx-js/loader@3.0.1(webpack@5.94.0(@swc/core@1.7.26(@swc/helpers@0.5.2))))(@mdx-js/react@3.0.1(@types/react@18.3.6)(react@18.3.1))': + '@next/mdx@14.2.11(@mdx-js/loader@3.0.1(webpack@5.94.0(@swc/core@1.7.26)))(@mdx-js/react@3.0.1(@types/react@18.3.6)(react@18.3.1))': dependencies: source-map: 0.7.4 optionalDependencies: - '@mdx-js/loader': 3.0.1(webpack@5.94.0(@swc/core@1.7.26(@swc/helpers@0.5.2))) + '@mdx-js/loader': 3.0.1(webpack@5.94.0(@swc/core@1.7.26)) '@mdx-js/react': 3.0.1(@types/react@18.3.6)(react@18.3.1) '@next/swc-darwin-arm64@13.5.6': @@ -11829,12 +11793,12 @@ snapshots: dependencies: '@sentry/types': 7.119.0 - '@sentry/webpack-plugin@2.22.4(webpack@5.94.0(@swc/core@1.7.26(@swc/helpers@0.5.2)))': + '@sentry/webpack-plugin@2.22.4(webpack@5.94.0(@swc/core@1.7.26))': dependencies: '@sentry/bundler-plugin-core': 2.22.4 unplugin: 1.0.1 uuid: 9.0.1 - webpack: 5.94.0(@swc/core@1.7.26(@swc/helpers@0.5.2)) + webpack: 5.94.0(@swc/core@1.7.26) transitivePeerDependencies: - encoding - supports-color @@ -12077,10 +12041,10 @@ snapshots: dependencies: defer-to-connect: 2.0.1 - '@tailwindcss/forms@0.5.9(tailwindcss@3.4.11(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)))': + '@tailwindcss/forms@0.5.9(tailwindcss@3.4.11(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)))': dependencies: mini-svg-data-uri: 1.4.4 - tailwindcss: 3.4.11(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)) + tailwindcss: 3.4.11(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)) '@tanstack/react-table@8.20.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -12695,7 +12659,7 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@vercel/style-guide@5.2.0(@next/eslint-plugin-next@13.5.6)(eslint@8.57.1)(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5)))(prettier@3.3.3)(typescript@4.9.5)': + '@vercel/style-guide@5.2.0(@next/eslint-plugin-next@13.5.6)(eslint@8.57.1)(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)))(prettier@3.3.3)(typescript@4.9.5)': dependencies: '@babel/core': 7.25.2 '@babel/eslint-parser': 7.25.1(@babel/core@7.25.2)(eslint@8.57.1) @@ -12703,13 +12667,13 @@ snapshots: '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5) '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@4.9.5) eslint-config-prettier: 9.1.0(eslint@8.57.1) - eslint-import-resolver-alias: 1.1.2(eslint-plugin-import@2.30.0) + eslint-import-resolver-alias: 1.1.2(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1)) eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint-plugin-import@2.30.0)(eslint@8.57.1) eslint-plugin-eslint-comments: 3.2.0(eslint@8.57.1) eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1) - eslint-plugin-jest: 27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5)))(typescript@4.9.5) + eslint-plugin-jest: 27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)))(typescript@4.9.5) eslint-plugin-jsx-a11y: 6.10.0(eslint@8.57.1) - eslint-plugin-playwright: 0.16.0(eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5)))(typescript@4.9.5))(eslint@8.57.1) + eslint-plugin-playwright: 0.16.0(eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)))(typescript@4.9.5))(eslint@8.57.1) eslint-plugin-react: 7.36.1(eslint@8.57.1) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.1) eslint-plugin-testing-library: 6.3.0(eslint@8.57.1)(typescript@4.9.5) @@ -13682,13 +13646,13 @@ snapshots: sha.js: 2.4.11 optional: true - create-jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5)): + create-jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5)) + jest-config: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -13696,30 +13660,14 @@ snapshots: - babel-plugin-macros - supports-color - ts-node - optional: true - create-jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3)): + create-jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3)) - jest-util: 29.7.0 - prompts: 2.4.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - - create-jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)): - dependencies: - '@jest/types': 29.6.3 - chalk: 4.1.2 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)) + jest-config: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -14257,12 +14205,12 @@ snapshots: eslint-plugin-n: 16.6.2(eslint@8.57.1) eslint-plugin-promise: 6.6.0(eslint@8.57.1) - eslint-config-turbo@1.13.4(eslint@8.57.1): + eslint-config-turbo@2.3.3(eslint@8.57.1): dependencies: eslint: 8.57.1 - eslint-plugin-turbo: 1.13.4(eslint@8.57.1) + eslint-plugin-turbo: 2.3.3(eslint@8.57.1) - eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.30.0): + eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1)): dependencies: eslint-plugin-import: 2.30.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1) @@ -14280,7 +14228,7 @@ snapshots: debug: 4.3.7(supports-color@5.5.0) enhanced-resolve: 5.17.1 eslint: 8.57.1 - eslint-module-utils: 2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1) + eslint-module-utils: 2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint-plugin-import@2.30.0)(eslint@8.57.1))(eslint@8.57.1) fast-glob: 3.3.2 get-tsconfig: 4.8.1 is-bun-module: 1.2.1 @@ -14293,7 +14241,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1): + eslint-module-utils@2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint-plugin-import@2.30.0)(eslint@8.57.1))(eslint@8.57.1): dependencies: debug: 3.2.7 optionalDependencies: @@ -14344,7 +14292,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1) + eslint-module-utils: 2.11.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint-plugin-import@2.30.0)(eslint@8.57.1))(eslint@8.57.1) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -14389,13 +14337,13 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5)))(typescript@4.9.5): + eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)))(typescript@4.9.5): dependencies: '@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@4.9.5) eslint: 8.57.1 optionalDependencies: '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5) - jest: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5)) + jest: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)) transitivePeerDependencies: - supports-color - typescript @@ -14445,11 +14393,11 @@ snapshots: resolve: 1.22.8 semver: 6.3.1 - eslint-plugin-playwright@0.16.0(eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5)))(typescript@4.9.5))(eslint@8.57.1): + eslint-plugin-playwright@0.16.0(eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)))(typescript@4.9.5))(eslint@8.57.1): dependencies: eslint: 8.57.1 optionalDependencies: - eslint-plugin-jest: 27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5)))(typescript@4.9.5) + eslint-plugin-jest: 27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)))(typescript@4.9.5) eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.3.3): dependencies: @@ -14503,7 +14451,7 @@ snapshots: '@microsoft/tsdoc': 0.14.2 '@microsoft/tsdoc-config': 0.16.2 - eslint-plugin-turbo@1.13.4(eslint@8.57.1): + eslint-plugin-turbo@2.3.3(eslint@8.57.1): dependencies: dotenv: 16.0.3 eslint: 8.57.1 @@ -14952,7 +14900,7 @@ snapshots: cross-spawn: 7.0.3 signal-exit: 4.1.0 - fork-ts-checker-webpack-plugin@9.0.2(typescript@5.3.3)(webpack@5.94.0(@swc/core@1.7.26(@swc/helpers@0.5.2))): + fork-ts-checker-webpack-plugin@9.0.2(typescript@5.3.3)(webpack@5.94.0(@swc/core@1.7.26)): dependencies: '@babel/code-frame': 7.24.7 chalk: 4.1.2 @@ -14967,7 +14915,7 @@ snapshots: semver: 7.6.3 tapable: 2.2.1 typescript: 5.3.3 - webpack: 5.94.0(@swc/core@1.7.26(@swc/helpers@0.5.2)) + webpack: 5.94.0(@swc/core@1.7.26) form-data@4.0.0: dependencies: @@ -15767,16 +15715,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5)): + jest-cli@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5)) + create-jest: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5)) + jest-config: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -15785,18 +15733,17 @@ snapshots: - babel-plugin-macros - supports-color - ts-node - optional: true - jest-cli@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3)): + jest-cli@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3)) + create-jest: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3)) + jest-config: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -15806,58 +15753,7 @@ snapshots: - supports-color - ts-node - jest-cli@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)): - dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)) - '@jest/test-result': 29.7.0 - '@jest/types': 29.6.3 - chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)) - exit: 0.1.2 - import-local: 3.2.0 - jest-config: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)) - jest-util: 29.7.0 - jest-validate: 29.7.0 - yargs: 17.7.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - - jest-config@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5)): - dependencies: - '@babel/core': 7.25.2 - '@jest/test-sequencer': 29.7.0 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.25.2) - chalk: 4.1.2 - ci-info: 3.9.0 - deepmerge: 4.3.1 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-circus: 29.7.0 - jest-environment-node: 29.7.0 - jest-get-type: 29.6.3 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-runner: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - micromatch: 4.0.8 - parse-json: 5.2.0 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - optionalDependencies: - '@types/node': 20.16.5 - ts-node: 10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5) - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - optional: true - - jest-config@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3)): + jest-config@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)): dependencies: '@babel/core': 7.25.2 '@jest/test-sequencer': 29.7.0 @@ -15883,12 +15779,12 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.16.5 - ts-node: 10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3) + ts-node: 10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3) transitivePeerDependencies: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)): + jest-config@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)): dependencies: '@babel/core': 7.25.2 '@jest/test-sequencer': 29.7.0 @@ -15914,7 +15810,7 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.16.5 - ts-node: 10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2) + ts-node: 10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -15989,9 +15885,9 @@ snapshots: slash: 3.0.0 stack-utils: 2.0.6 - jest-mock-extended@3.0.7(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3)))(typescript@5.3.3): + jest-mock-extended@3.0.7(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)))(typescript@5.3.3): dependencies: - jest: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3)) + jest: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) ts-essentials: 10.0.2(typescript@5.3.3) typescript: 5.3.3 @@ -16146,37 +16042,24 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5)): - dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5)) - '@jest/types': 29.6.3 - import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5)) - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - optional: true - - jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3)): + jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3)) + jest-cli: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros - supports-color - ts-node - jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)): + jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)) + jest-cli: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -17378,13 +17261,13 @@ snapshots: camelcase-css: 2.0.1 postcss: 8.4.47 - postcss-load-config@4.0.2(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)): + postcss-load-config@4.0.2(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)): dependencies: lilconfig: 3.1.2 yaml: 2.5.1 optionalDependencies: postcss: 8.4.47 - ts-node: 10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2) + ts-node: 10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2) postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1): dependencies: @@ -18436,11 +18319,11 @@ snapshots: tailwind-merge@2.5.2: {} - tailwindcss-animate@1.0.7(tailwindcss@3.4.11(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2))): + tailwindcss-animate@1.0.7(tailwindcss@3.4.11(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2))): dependencies: - tailwindcss: 3.4.11(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)) + tailwindcss: 3.4.11(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)) - tailwindcss@3.4.11(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)): + tailwindcss@3.4.11(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -18459,7 +18342,7 @@ snapshots: postcss: 8.4.47 postcss-import: 15.1.0(postcss@8.4.47) postcss-js: 4.0.1(postcss@8.4.47) - postcss-load-config: 4.0.2(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)) + postcss-load-config: 4.0.2(postcss@8.4.47)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)) postcss-nested: 6.2.0(postcss@8.4.47) postcss-selector-parser: 6.1.2 resolve: 1.22.8 @@ -18478,14 +18361,14 @@ snapshots: type-fest: 2.19.0 unique-string: 3.0.0 - terser-webpack-plugin@5.3.10(@swc/core@1.7.26(@swc/helpers@0.5.2))(webpack@5.94.0(@swc/core@1.7.26(@swc/helpers@0.5.2))): + terser-webpack-plugin@5.3.10(@swc/core@1.7.26)(webpack@5.94.0(@swc/core@1.7.26)): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.2 terser: 5.32.0 - webpack: 5.94.0(@swc/core@1.7.26(@swc/helpers@0.5.2)) + webpack: 5.94.0(@swc/core@1.7.26) optionalDependencies: '@swc/core': 1.7.26(@swc/helpers@0.5.2) @@ -18588,12 +18471,12 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3)))(typescript@5.3.3): + ts-jest@29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)))(typescript@5.3.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3)) + jest: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -18607,12 +18490,12 @@ snapshots: '@jest/types': 29.6.3 babel-jest: 29.7.0(@babel/core@7.25.2) - ts-jest@29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)))(typescript@5.6.2): + ts-jest@29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)))(typescript@5.6.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2)) + jest: 29.7.0(@types/node@20.16.5)(ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -18626,7 +18509,7 @@ snapshots: '@jest/types': 29.6.3 babel-jest: 29.7.0(@babel/core@7.25.2) - ts-loader@9.5.1(typescript@5.3.3)(webpack@5.94.0(@swc/core@1.7.26(@swc/helpers@0.5.2))): + ts-loader@9.5.1(typescript@5.3.3)(webpack@5.94.0(@swc/core@1.7.26)): dependencies: chalk: 4.1.2 enhanced-resolve: 5.17.1 @@ -18634,30 +18517,9 @@ snapshots: semver: 7.6.3 source-map: 0.7.4 typescript: 5.3.3 - webpack: 5.94.0(@swc/core@1.7.26(@swc/helpers@0.5.2)) - - ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@4.9.5): - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.11 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 20.16.5 - acorn: 8.12.1 - acorn-walk: 8.3.4 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 4.9.5 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - optionalDependencies: - '@swc/core': 1.7.26(@swc/helpers@0.5.2) - optional: true + webpack: 5.94.0(@swc/core@1.7.26) - ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.3.3): + ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.3.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -18678,7 +18540,7 @@ snapshots: '@swc/core': 1.7.26(@swc/helpers@0.5.2) optional: true - ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.2))(@types/node@20.16.5)(typescript@5.6.2): + ts-node@10.9.2(@swc/core@1.7.26)(@types/node@20.16.5)(typescript@5.6.2): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -18730,7 +18592,7 @@ snapshots: tslib@2.7.0: {} - tsup@8.2.4(@swc/core@1.7.26(@swc/helpers@0.5.2))(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1): + tsup@8.2.4(@swc/core@1.7.26)(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1): dependencies: bundle-require: 5.0.0(esbuild@0.23.1) cac: 6.7.14 @@ -18770,32 +18632,32 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - turbo-darwin-64@1.13.4: + turbo-darwin-64@2.3.3: optional: true - turbo-darwin-arm64@1.13.4: + turbo-darwin-arm64@2.3.3: optional: true - turbo-linux-64@1.13.4: + turbo-linux-64@2.3.3: optional: true - turbo-linux-arm64@1.13.4: + turbo-linux-arm64@2.3.3: optional: true - turbo-windows-64@1.13.4: + turbo-windows-64@2.3.3: optional: true - turbo-windows-arm64@1.13.4: + turbo-windows-arm64@2.3.3: optional: true - turbo@1.13.4: + turbo@2.3.3: optionalDependencies: - turbo-darwin-64: 1.13.4 - turbo-darwin-arm64: 1.13.4 - turbo-linux-64: 1.13.4 - turbo-linux-arm64: 1.13.4 - turbo-windows-64: 1.13.4 - turbo-windows-arm64: 1.13.4 + turbo-darwin-64: 2.3.3 + turbo-darwin-arm64: 2.3.3 + turbo-linux-64: 2.3.3 + turbo-linux-arm64: 2.3.3 + turbo-windows-64: 2.3.3 + turbo-windows-arm64: 2.3.3 type-check@0.4.0: dependencies: @@ -19073,7 +18935,7 @@ snapshots: webpack-virtual-modules@0.6.2: {} - webpack@5.94.0(@swc/core@1.7.26(@swc/helpers@0.5.2)): + webpack@5.94.0(@swc/core@1.7.26): dependencies: '@types/estree': 1.0.5 '@webassemblyjs/ast': 1.12.1 @@ -19095,7 +18957,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(@swc/core@1.7.26(@swc/helpers@0.5.2))(webpack@5.94.0(@swc/core@1.7.26(@swc/helpers@0.5.2))) + terser-webpack-plugin: 5.3.10(@swc/core@1.7.26)(webpack@5.94.0(@swc/core@1.7.26)) watchpack: 2.4.2 webpack-sources: 3.2.3 transitivePeerDependencies: From 9fad4526ffe9e3829caca3dbe7b7691bfa5c33d6 Mon Sep 17 00:00:00 2001 From: muntaxir4 Date: Sat, 30 Nov 2024 19:34:03 +0530 Subject: [PATCH 2/5] fix(api-client): add userEmails in body to remove users from workspace; Update api-collection --- .../Remove users from workspace.bru | 14 ++++++++++++++ .../src/controllers/workspace-membership.ts | 3 ++- packages/api-client/src/core/client.ts | 9 ++++++++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/api-collection/Workspace Membership Controller/Remove users from workspace.bru b/api-collection/Workspace Membership Controller/Remove users from workspace.bru index b4272c56..d0fbb4ef 100644 --- a/api-collection/Workspace Membership Controller/Remove users from workspace.bru +++ b/api-collection/Workspace Membership Controller/Remove users from workspace.bru @@ -13,3 +13,17 @@ delete { params:path { workspace_slug: workspace-1-cahli } + +body:json { + ["user1@gmail.com"] +} + +docs { + ## Description + + Remove one or more users from the workspace. + + ### Request Body + + The endpoint accepts an array of emails +} \ No newline at end of file diff --git a/packages/api-client/src/controllers/workspace-membership.ts b/packages/api-client/src/controllers/workspace-membership.ts index d296deeb..b41f2df4 100644 --- a/packages/api-client/src/controllers/workspace-membership.ts +++ b/packages/api-client/src/controllers/workspace-membership.ts @@ -62,7 +62,8 @@ export default class WorkspaceMembershipController { ): Promise> { const response = await this.apiClient.delete( `/api/workspace-membership/${request.workspaceSlug}/remove-users`, - headers + headers, + request.userEmails ) return await parseResponse(response) } diff --git a/packages/api-client/src/core/client.ts b/packages/api-client/src/core/client.ts index 3ff85d6c..7c089ba2 100644 --- a/packages/api-client/src/core/client.ts +++ b/packages/api-client/src/core/client.ts @@ -71,15 +71,22 @@ export class APIClient { * Sends a DELETE request to the specified URL and returns a Promise that resolves to the response data. * * @param url - The URL to send the DELETE request to. + * @param headers - Optional headers to include in the request. + * @param data - Optional data to be sent in the request body. * @returns A Promise that resolves to the response data. */ - delete(url: string, headers?: Record): Promise { + delete( + url: string, + headers?: Record, + data?: any + ): Promise { return this.request(url, { method: 'DELETE', headers: { 'Content-Type': 'application/json', ...headers }, + body: JSON.stringify(data), credentials: 'include' }) } From 24a745d3cf6b7571e830063a25436ae2a9c7755c Mon Sep 17 00:00:00 2001 From: muntaxir4 Date: Sat, 30 Nov 2024 21:37:05 +0530 Subject: [PATCH 3/5] fix(workflow): fix workflow succeeds even on test error --- .github/workflows/validate-api-client.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/validate-api-client.yaml b/.github/workflows/validate-api-client.yaml index 4d336299..958ea382 100644 --- a/.github/workflows/validate-api-client.yaml +++ b/.github/workflows/validate-api-client.yaml @@ -59,6 +59,7 @@ jobs: - name: Test run: | pnpm run test:api-client + continue-on-error: false - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 From bb211997d5069b2685b11c771747547d6a1adaf8 Mon Sep 17 00:00:00 2001 From: muntaxir4 Date: Sat, 30 Nov 2024 21:47:16 +0530 Subject: [PATCH 4/5] fix(api-client): Fix Custom Envs not passed during api start; undo validate-api-client test workflow --- .github/workflows/validate-api-client.yaml | 1 - packages/api-client/tests/config/setup.ts | 4 ++-- turbo.json | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/validate-api-client.yaml b/.github/workflows/validate-api-client.yaml index 958ea382..4d336299 100644 --- a/.github/workflows/validate-api-client.yaml +++ b/.github/workflows/validate-api-client.yaml @@ -59,7 +59,6 @@ jobs: - name: Test run: | pnpm run test:api-client - continue-on-error: false - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 diff --git a/packages/api-client/tests/config/setup.ts b/packages/api-client/tests/config/setup.ts index ed1d72d6..6d281d36 100644 --- a/packages/api-client/tests/config/setup.ts +++ b/packages/api-client/tests/config/setup.ts @@ -4,7 +4,7 @@ export default async function teardown() { await executeCommand('docker compose down') await executeCommand('docker compose -f ../../docker-compose-test.yml up -d') await executeCommand('cd ../.. && pnpm build:api') - await executeCommand('cd ../.. && sleep 3 && pnpm db:deploy-migrations', { + await executeCommand('cd ../.. && pnpm db:deploy-migrations', { DATABASE_URL: 'postgresql://prisma:prisma@localhost:5432/tests', PATH: process.env.PATH! }) @@ -31,7 +31,7 @@ function executeCommand( function startAPI(): Promise { return new Promise((resolve) => { - const apiProcess = exec('cd ../../ && pnpm run start:api', { + const apiProcess = exec('pnpm run --filter=api start', { env: { PATH: process.env.PATH, DATABASE_URL: 'postgresql://prisma:prisma@localhost:5432/tests', diff --git a/turbo.json b/turbo.json index 56b6c631..ad639003 100644 --- a/turbo.json +++ b/turbo.json @@ -4,7 +4,7 @@ "build": { "dependsOn": ["^build"], "outputs": ["dist/**"], - "inputs": ["NEXT_PUBLIC_BACKEND_URL"] + "env": ["NEXT_PUBLIC_BACKEND_URL"] }, "build#cli": { "dependsOn": ["build#api-client"] @@ -33,4 +33,4 @@ "inputs": ["dist/**"] } } -} \ No newline at end of file +} From 3b1bc436252737b392445845ae55162f78ab621f Mon Sep 17 00:00:00 2001 From: muntaxir4 Date: Tue, 3 Dec 2024 01:11:20 +0530 Subject: [PATCH 5/5] feat(api, schema, api-client): Update remove users from workspace endpoint to accept emails as query param --- .../Remove users from workspace.bru | 14 +++++++------- .../controller/workspace-membership.controller.ts | 4 ++-- .../workspace-membership.e2e.spec.ts | 8 ++++++-- .../src/controllers/workspace-membership.ts | 5 ++--- packages/api-client/src/core/client.ts | 2 -- .../api-client/tests/workspace-membership.spec.ts | 2 +- packages/schema/src/workspace-membership/index.ts | 2 +- packages/schema/tests/workspace-membership.spec.ts | 6 +++--- 8 files changed, 22 insertions(+), 21 deletions(-) diff --git a/api-collection/Workspace Membership Controller/Remove users from workspace.bru b/api-collection/Workspace Membership Controller/Remove users from workspace.bru index d0fbb4ef..5d7a7e9b 100644 --- a/api-collection/Workspace Membership Controller/Remove users from workspace.bru +++ b/api-collection/Workspace Membership Controller/Remove users from workspace.bru @@ -10,12 +10,12 @@ delete { auth: none } -params:path { - workspace_slug: workspace-1-cahli +params:query { + userEmails: user1@gmail.com,user2@gmail.com } -body:json { - ["user1@gmail.com"] +params:path { + workspace_slug: workspace-1-cahli } docs { @@ -23,7 +23,7 @@ docs { Remove one or more users from the workspace. - ### Request Body + ### Request Query Params - The endpoint accepts an array of emails -} \ No newline at end of file + The endpoint accepts a string of comma separated emails +} diff --git a/apps/api/src/workspace-membership/controller/workspace-membership.controller.ts b/apps/api/src/workspace-membership/controller/workspace-membership.controller.ts index 2e561ebb..32c827f9 100644 --- a/apps/api/src/workspace-membership/controller/workspace-membership.controller.ts +++ b/apps/api/src/workspace-membership/controller/workspace-membership.controller.ts @@ -53,12 +53,12 @@ export class WorkspaceMembershipController { async removeUsers( @CurrentUser() user: User, @Param('workspaceSlug') workspaceSlug: Workspace['slug'], - @Body() userEmails: User['email'][] + @Query('userEmails') userEmails: string = '' ) { return this.workspaceMembershipService.removeUsersFromWorkspace( user, workspaceSlug, - userEmails + userEmails.split(/\s*,\s*/) ) } diff --git a/apps/api/src/workspace-membership/workspace-membership.e2e.spec.ts b/apps/api/src/workspace-membership/workspace-membership.e2e.spec.ts index 01954cff..a606a17d 100644 --- a/apps/api/src/workspace-membership/workspace-membership.e2e.spec.ts +++ b/apps/api/src/workspace-membership/workspace-membership.e2e.spec.ts @@ -524,7 +524,9 @@ describe('Workspace Membership Controller Tests', () => { 'x-e2e-user-email': user1.email }, url: `/workspace-membership/${workspace1.slug}/remove-users`, - payload: [user2.id] + query: { + userEmails: user2.email + } }) expect(response.statusCode).toBe(200) @@ -548,7 +550,9 @@ describe('Workspace Membership Controller Tests', () => { 'x-e2e-user-email': user1.email }, url: `/workspace-membership/${workspace1.slug}/remove-users`, - payload: [user1.email] + query: { + userEmails: user1.email + } }) expect(response.statusCode).toBe(400) diff --git a/packages/api-client/src/controllers/workspace-membership.ts b/packages/api-client/src/controllers/workspace-membership.ts index b41f2df4..5f6f750a 100644 --- a/packages/api-client/src/controllers/workspace-membership.ts +++ b/packages/api-client/src/controllers/workspace-membership.ts @@ -61,9 +61,8 @@ export default class WorkspaceMembershipController { headers?: Record ): Promise> { const response = await this.apiClient.delete( - `/api/workspace-membership/${request.workspaceSlug}/remove-users`, - headers, - request.userEmails + `/api/workspace-membership/${request.workspaceSlug}/remove-users?userEmails=${request.userEmails}`, + headers ) return await parseResponse(response) } diff --git a/packages/api-client/src/core/client.ts b/packages/api-client/src/core/client.ts index 7c089ba2..67df7df3 100644 --- a/packages/api-client/src/core/client.ts +++ b/packages/api-client/src/core/client.ts @@ -72,7 +72,6 @@ export class APIClient { * * @param url - The URL to send the DELETE request to. * @param headers - Optional headers to include in the request. - * @param data - Optional data to be sent in the request body. * @returns A Promise that resolves to the response data. */ delete( @@ -86,7 +85,6 @@ export class APIClient { 'Content-Type': 'application/json', ...headers }, - body: JSON.stringify(data), credentials: 'include' }) } diff --git a/packages/api-client/tests/workspace-membership.spec.ts b/packages/api-client/tests/workspace-membership.spec.ts index 412ad4b3..ff067b97 100644 --- a/packages/api-client/tests/workspace-membership.spec.ts +++ b/packages/api-client/tests/workspace-membership.spec.ts @@ -58,7 +58,7 @@ describe('Workspace Membership Controller Tests', () => { it('should remove users', async () => { const request = { workspaceSlug: workspaceSlug!, - userEmails: ['invitee@example.com'] + userEmails: 'invitee@example.com' } const response = await workspaceMembershipController.removeUsers(request, { 'x-e2e-user-email': userEmail diff --git a/packages/schema/src/workspace-membership/index.ts b/packages/schema/src/workspace-membership/index.ts index b5563c72..3c873f20 100644 --- a/packages/schema/src/workspace-membership/index.ts +++ b/packages/schema/src/workspace-membership/index.ts @@ -25,7 +25,7 @@ export const InviteUsersResponseSchema = z.void() export const RemoveUsersRequestSchema = z.object({ workspaceSlug: WorkspaceSchema.shape.slug, - userEmails: z.array(z.string().email()) + userEmails: z.string() // comma separated emails }) export const RemoveUsersResponseSchema = z.void() diff --git a/packages/schema/tests/workspace-membership.spec.ts b/packages/schema/tests/workspace-membership.spec.ts index d7ec91f8..121360b3 100644 --- a/packages/schema/tests/workspace-membership.spec.ts +++ b/packages/schema/tests/workspace-membership.spec.ts @@ -122,7 +122,7 @@ describe('Workspace Membership Schema Tests', () => { it('should validate a valid RemoveUsersRequestSchema', () => { const result = RemoveUsersRequestSchema.safeParse({ workspaceSlug: 'workspace-slug', - userEmails: ['user1@example.com', 'user2@example.com'] + userEmails: 'user1@example.com,user2@example.com' }) expect(result.success).toBe(true) }) @@ -130,10 +130,10 @@ describe('Workspace Membership Schema Tests', () => { it('should not validate an invalid RemoveUsersRequestSchema', () => { const result = RemoveUsersRequestSchema.safeParse({ workspaceSlug: 123, // Should be a string - userEmails: ['user1@example', 'user2@example'] // Invalid email + userEmails: ['user1@example.com', 'user2@example.com'] // Should be a string of comma-separated emails }) expect(result.success).toBe(false) - expect(result.error?.issues).toHaveLength(3) + expect(result.error?.issues).toHaveLength(2) }) // Tests for RemoveUsersResponseSchema