Compare commits
2
Commits
ac0d2b53f0
...
release/87
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bac89d3dc | ||
|
|
ca786fd80a |
No files matched your search
@@ -29,20 +29,20 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lolympus/contracts": "workspace:*",
|
"@lolympus/contracts": "workspace:*",
|
||||||
"@nestjs/common": "^11.0.1",
|
"@nestjs/common": "^11.1.28",
|
||||||
"@nestjs/config": "^4.0.4",
|
"@nestjs/config": "^4.0.4",
|
||||||
"@nestjs/core": "^11.0.1",
|
"@nestjs/core": "^11.1.28",
|
||||||
"@nestjs/platform-express": "^11.0.1",
|
"@nestjs/platform-express": "^11.1.28",
|
||||||
"@nestjs/platform-socket.io": "^11.1.19",
|
"@nestjs/platform-socket.io": "^11.1.28",
|
||||||
"@nestjs/swagger": "^11.2.7",
|
"@nestjs/swagger": "^11.4.6",
|
||||||
"@nestjs/websockets": "^11.1.19",
|
"@nestjs/websockets": "^11.1.28",
|
||||||
"@socket.io/redis-adapter": "^8.3.0",
|
"@socket.io/redis-adapter": "^8.3.0",
|
||||||
"class-transformer": "^0.5.1",
|
"class-transformer": "^0.5.1",
|
||||||
"class-validator": "^0.15.1",
|
"class-validator": "^0.15.1",
|
||||||
"jose": "^6.2.2",
|
"jose": "^6.2.2",
|
||||||
"mongoose": "^9.4.1",
|
"mongoose": "9.4.1",
|
||||||
"nats": "^2.29.3",
|
"nats": "^2.29.3",
|
||||||
"newrelic": "^14.3.0",
|
"newrelic": "^14.3.3",
|
||||||
"redis": "^5.12.1",
|
"redis": "^5.12.1",
|
||||||
"reflect-metadata": "^0.2.2",
|
"reflect-metadata": "^0.2.2",
|
||||||
"rxjs": "^7.8.1",
|
"rxjs": "^7.8.1",
|
||||||
|
|||||||
@@ -22,6 +22,33 @@ function makeHandler(params: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
describe('MatchListHandler', () => {
|
describe('MatchListHandler', () => {
|
||||||
|
afterEach(() => {
|
||||||
|
jest.useRealTimers();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('queries only matches scheduled at or after command processing time', async () => {
|
||||||
|
const now = new Date('2026-07-25T07:30:00.000Z');
|
||||||
|
jest.useFakeTimers().setSystemTime(now);
|
||||||
|
const communityId = objectId('111111111111111111111111');
|
||||||
|
const list = jest.fn().mockResolvedValue([]);
|
||||||
|
const handler = makeHandler({
|
||||||
|
matchService: { list },
|
||||||
|
});
|
||||||
|
|
||||||
|
await handler.handle({
|
||||||
|
communityId,
|
||||||
|
senderUserId: 'kakao-user-1',
|
||||||
|
senderNickname: '프리리',
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(list).toHaveBeenCalledWith({
|
||||||
|
communityId,
|
||||||
|
status: 'recruiting',
|
||||||
|
scheduledFrom: now,
|
||||||
|
limit: 10,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it('prints short codes, compact KST dates, and short links', async () => {
|
it('prints short codes, compact KST dates, and short links', async () => {
|
||||||
const match = {
|
const match = {
|
||||||
_id: objectId('333333333333333333333333'),
|
_id: objectId('333333333333333333333333'),
|
||||||
|
|||||||
@@ -19,9 +19,11 @@ export class MatchListHandler {
|
|||||||
senderUserId: string;
|
senderUserId: string;
|
||||||
senderNickname: string;
|
senderNickname: string;
|
||||||
}): Promise<DakaoSegment[]> {
|
}): Promise<DakaoSegment[]> {
|
||||||
|
const scheduledFrom = new Date();
|
||||||
const matches = await this.matchService.list({
|
const matches = await this.matchService.list({
|
||||||
communityId: params.communityId,
|
communityId: params.communityId,
|
||||||
status: 'recruiting',
|
status: 'recruiting',
|
||||||
|
scheduledFrom,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -19,15 +19,15 @@
|
|||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lolympus/contracts": "workspace:*",
|
|
||||||
"@azure/msal-browser": "^5.8.0",
|
"@azure/msal-browser": "^5.8.0",
|
||||||
"@azure/msal-react": "^5.3.1",
|
"@azure/msal-react": "^5.3.1",
|
||||||
"@newrelic/browser-agent": "^1.316.0",
|
"@lolympus/contracts": "workspace:*",
|
||||||
|
"@newrelic/browser-agent": "^1.318.0",
|
||||||
"@tanstack/react-query": "^5.100.1",
|
"@tanstack/react-query": "^5.100.1",
|
||||||
"lucide-react": "^1.14.0",
|
"lucide-react": "^1.14.0",
|
||||||
"react": "^19.2.4",
|
"react": "^19.2.8",
|
||||||
"react-dom": "^19.2.4",
|
"react-dom": "^19.2.8",
|
||||||
"react-router": "^7.14.0",
|
"react-router": "^8.3.0",
|
||||||
"recharts": "^3.8.1",
|
"recharts": "^3.8.1",
|
||||||
"socket.io-client": "^4.8.3"
|
"socket.io-client": "^4.8.3"
|
||||||
},
|
},
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
"tailwindcss": "^4.2.2",
|
"tailwindcss": "^4.2.2",
|
||||||
"typescript": "~6.0.2",
|
"typescript": "~6.0.2",
|
||||||
"typescript-eslint": "^8.58.0",
|
"typescript-eslint": "^8.58.0",
|
||||||
"vite": "^8.0.4",
|
"vite": "^8.1.5",
|
||||||
"wrangler": "^4.85.0"
|
"wrangler": "^4.114.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# Dependency Audit Exceptions
|
||||||
|
|
||||||
|
## GHSA-mh99-v99m-4gvg
|
||||||
|
|
||||||
|
- Package: `brace-expansion`
|
||||||
|
- Scope: development tooling only (`eslint`, `jest`, and `@nestjs/cli` through
|
||||||
|
`minimatch`/`glob`)
|
||||||
|
- Production exposure: none; `pnpm audit --prod --audit-level high` reports no
|
||||||
|
high or critical findings
|
||||||
|
- Reason: the only patched release is `brace-expansion@5.0.8`, whose CommonJS
|
||||||
|
API is incompatible with the affected `minimatch@3` and `minimatch@9`
|
||||||
|
consumers
|
||||||
|
- Mitigation: repository-controlled glob patterns are trusted; no
|
||||||
|
attacker-controlled input is passed to these development tools
|
||||||
|
- Review date: 2026-08-25
|
||||||
|
- Removal condition: remove the audit exception once the upstream toolchain
|
||||||
|
supports `brace-expansion@5.0.8` or publishes compatible patched releases
|
||||||
|
|
||||||
|
## Tracked remediation
|
||||||
|
|
||||||
|
### GHSA-664h-wqgq-64gw
|
||||||
|
|
||||||
|
- Package: `mongoose@9.4.1`
|
||||||
|
- Severity: moderate
|
||||||
|
- Patched version: `>=9.7.2`
|
||||||
|
- Status: not ignored; it remains visible in a full audit and does not fail the
|
||||||
|
high-severity CI gate
|
||||||
|
- Upgrade blocker: Mongoose 9.7.x tightens create and query types and currently
|
||||||
|
causes API compilation failures across the model layer
|
||||||
|
- Next action: migrate the affected model create/query types, then upgrade
|
||||||
|
Mongoose in a dedicated change
|
||||||
|
- Review date: 2026-08-25
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
# Spec: Dakao Upcoming Internal Match List
|
||||||
|
|
||||||
|
## Objective
|
||||||
|
|
||||||
|
When a user sends `!내전 일정`, return only recruiting matches whose scheduled
|
||||||
|
start is not earlier than the command processing time. Matches that have already
|
||||||
|
started must not consume the ten-result query limit or appear in the response.
|
||||||
|
|
||||||
|
## Approved Product Decisions
|
||||||
|
|
||||||
|
- Capture the command processing time once before querying matches.
|
||||||
|
- Exclude `scheduledAt < now`.
|
||||||
|
- Include `scheduledAt === now` and future matches.
|
||||||
|
- Apply the boundary only to the Dakao `!내전 일정` command.
|
||||||
|
- Preserve the existing recruiting status, result limit, ordering, formatting,
|
||||||
|
short-code generation, and short-link behavior.
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
- Focused test:
|
||||||
|
`pnpm --filter api exec jest src/modules/dakao/handlers/match-list.handler.spec.ts --runInBand`
|
||||||
|
- API lint:
|
||||||
|
`pnpm --filter api exec eslint "{src,apps,libs,test}/**/*.ts" --max-warnings=0`
|
||||||
|
- API build: `pnpm --filter api build`
|
||||||
|
|
||||||
|
## Project Structure
|
||||||
|
|
||||||
|
- `apps/api/src/modules/dakao/handlers/match-list.handler.ts` owns the command
|
||||||
|
query and response formatting.
|
||||||
|
- `apps/api/src/modules/dakao/handlers/match-list.handler.spec.ts` verifies the
|
||||||
|
command boundary and presentation.
|
||||||
|
- `apps/api/src/modules/match/match.service.ts` translates `scheduledFrom` into a
|
||||||
|
MongoDB `$gte` filter.
|
||||||
|
|
||||||
|
## Code Style
|
||||||
|
|
||||||
|
Pass the captured boundary through the existing list contract:
|
||||||
|
|
||||||
|
```ts
|
||||||
|
const scheduledFrom = new Date();
|
||||||
|
await matchService.list({ communityId, scheduledFrom });
|
||||||
|
```
|
||||||
|
|
||||||
|
## Testing Strategy
|
||||||
|
|
||||||
|
- Freeze the system clock in the handler unit test.
|
||||||
|
- Assert that the exact frozen time is passed as `scheduledFrom`.
|
||||||
|
- Rely on the existing `MatchService` test that verifies `scheduledFrom` becomes
|
||||||
|
`{ scheduledAt: { $gte: scheduledFrom } }`.
|
||||||
|
- Run the focused handler test, full API lint, and API build.
|
||||||
|
|
||||||
|
## Boundaries
|
||||||
|
|
||||||
|
- Always: filter before applying the result limit and use one captured time.
|
||||||
|
- Ask first: change ordering, statuses, limit, or response wording.
|
||||||
|
- Never: hide the requirement with an ESLint exception or filter only after the
|
||||||
|
limited database query.
|
||||||
|
|
||||||
|
## Success Criteria
|
||||||
|
|
||||||
|
- A match scheduled before command processing time is not queried.
|
||||||
|
- A match scheduled exactly at command processing time remains eligible.
|
||||||
|
- Existing command formatting and link tests continue to pass.
|
||||||
|
|
||||||
|
## Open Questions
|
||||||
|
|
||||||
|
None.
|
||||||
+21
-1
@@ -26,6 +26,26 @@
|
|||||||
},
|
},
|
||||||
"packageManager": "pnpm@10.4.1",
|
"packageManager": "pnpm@10.4.1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@infisical/sdk": "^5.0.0"
|
"@infisical/sdk": "^5.0.2"
|
||||||
|
},
|
||||||
|
"pnpm": {
|
||||||
|
"auditConfig": {
|
||||||
|
"ignoreGhsas": [
|
||||||
|
"GHSA-mh99-v99m-4gvg"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"overrides": {
|
||||||
|
"@babel/core@7.29.0": "7.29.6",
|
||||||
|
"brace-expansion@1.1.13": "1.1.16",
|
||||||
|
"brace-expansion@2.0.3": "2.1.2",
|
||||||
|
"brace-expansion@5.0.5": "5.0.8",
|
||||||
|
"engine.io@6.6.6": "6.6.7",
|
||||||
|
"fast-uri@3.1.0": "3.1.4",
|
||||||
|
"form-data@4.0.5": "4.0.6",
|
||||||
|
"js-yaml@4.1.1": "4.3.0",
|
||||||
|
"js-yaml@5.2.1": "5.2.2",
|
||||||
|
"qs@6.15.1": "6.15.2",
|
||||||
|
"ws@8.18.3": "8.21.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Generated
+1662
-1630
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user