Commit Graph

28 Commits

Author SHA1 Message Date
5fb095a498 test: add comprehensive testing infrastructure with critical bug fixes
- Add Vitest testing framework with 88 passing tests across 4 test files
- Fix critical entity validator bug (service array index)
- Implement validator architecture with 'matched but invalid' state support
- Add strict IPv4/IPv6 validation with detailed error messages
- Add case-insensitive domain and ASN matching
- Add explicit validator priority ordering (url→json→tld→ip→domain)
- Add integration tests with real IANA registry validation
- Add AutnumCard component for AS number display
- Update dependencies: prettier 2.8.1→2.8.8

Test coverage:
- helpers.test.ts: IPv4/IPv6 CIDR matching (27 tests)
- helpers.asn.test.ts: ASN range validation (22 tests)
- rdap.test.ts: Type detection with edge cases (36 tests)
- rdap.integration.test.ts: Real IANA registry tests (3 tests)

Bug fixes:
- Entity validator now correctly uses service[1] for tags (0=email, 1=tags, 2=urls)
- IPv4 validation rejects octets >255 with specific error messages
- IPv6 validation checks for invalid hex chars and multiple ::
- Domain regex supports multi-label domains (a.b.c.d.example.net)
- Type detection priority prevents URL/JSON false matches as domains
2025-10-22 01:23:15 -05:00
09cd0bf49b build: migrate to pnpm and add vitest testing infrastructure
- Replace Yarn with pnpm as package manager
- Add Vitest with React Testing Library and happy-dom
- Configure test setup and add test scripts (test, test:ui, test:run)
- Add IPCard component and update lookup components
- Remove unused react-ogp dependency
- Add type-check script
2025-10-22 00:34:53 -05:00
ae81ce3ba0 fml 2024-05-12 16:34:27 -05:00
bb4ba75b38 Vercel linting error, removed unused import, add getTypeEasy callback dependency 2024-05-12 16:31:56 -05:00
b3048086c3 Add await registry-informed getTypes method with smart entity tag validation
fuck type coloring madness
2024-05-12 02:10:15 -05:00
9f23ba979b Implement querying for TLD, URL, and JSON target types 2024-05-11 02:50:17 -05:00
597863ea70 Add metadata to ParsedGeneric submit response 2024-05-10 05:42:43 -05:00
670e8c377a Improve unexpected status code handling 2024-05-10 02:45:39 -05:00
f95e0de5bb type assert bootstrapItem as min length 1 2024-05-10 02:36:25 -05:00
1f93c8568f fix minor linting/type errors 2024-05-10 02:25:44 -05:00
d071c73756 Switch registryDataRef initial value type to match ref type
No fucking clue why I used a non-matching type for this; makes no sense
2024-05-10 01:37:14 -05:00
4b7691fed7 Switch UriType calculated value to Maybe<> 2024-05-10 01:36:28 -05:00
49832cf8e7 Switch all classNames helpers to clsx 2024-05-09 02:29:44 -05:00
31c8062715 Add left pad to Zod errors list 2024-05-09 02:15:22 -05:00
c3fe5691c6 fix: format zod errors better, format newlines correctly in error card 2024-05-09 02:11:46 -05:00
d2f4b238b8 transform zod, type check and result processing with result/maybe 2024-05-09 01:46:20 -05:00
3b9153fb97 internal: add true-myth for result/maybe types, test maybe on getType() handler, disable /old page 2024-05-09 01:21:37 -05:00
f67cdadde0 Provide preventative error details for likely mixed content / CORS issues 2023-08-26 01:13:48 -05:00
114f10193d Provide data context to null target detection error message 2023-08-25 23:56:59 -05:00
d2bcbfd759 Check for empty string on matching empty target string 2023-05-23 22:56:39 -05:00
ece0ffc7a0 Commit latest design, styling & functionality 2023-05-23 20:00:16 -05:00
74c68ab45b Properly set target from SubmitProps 2023-05-21 23:19:46 -05:00
6e27447a99 Prettier reformat 2023-05-20 21:29:27 -05:00
Xevion
d9285647c2 Fix refactor broken import path 2023-02-20 00:52:02 -06:00
Xevion
9907772020 Remove axios, use fetch API 2023-02-20 00:37:48 -06:00
Xevion
e188215331 Fix queued state modifications breaking lookup internally 2023-02-20 00:31:00 -06:00
Xevion
a535c43bf8 Add bootstrap file load check, use registry URL lookup properly, getAndParse
- Clear error before returning submit
- ParsedGeneric types
2023-02-20 00:06:06 -06:00
Xevion
3c8e1ce716 Commit latest version of useLookup hook 2023-02-19 23:29:16 -06:00