Skip to content

feat: implement scope parser with CIDR, domain, wildcard, and exclusion support#1

Merged
dmchaledev merged 1 commit into
mainfrom
feat/working-implementation
May 18, 2026
Merged

feat: implement scope parser with CIDR, domain, wildcard, and exclusion support#1
dmchaledev merged 1 commit into
mainfrom
feat/working-implementation

Conversation

@dmchaledev
Copy link
Copy Markdown
Contributor

Full zero-dependency TypeScript implementation:

  • src/types.ts: ParsedEntry, NormalizedScopeJSON interfaces
  • src/parse.ts: ipToInt, intToIp, prefixToMask, parseEntry (IPv4, CIDR, domain, wildcard, exclusion)
  • src/NormalizedScope.ts: NormalizedScope class with .includes()/.excludes()/.toCIDR()/.toJSON()
  • src/index.ts: parseScope() convenience function + re-exports
  • 20 vitest tests across parse.test.ts and scope.test.ts (all passing)
  • tsconfig: skipLibCheck, @types/node, excludes tests from dist build
  • .eslintrc.cjs + vitest.config.ts

@dmchaledev dmchaledev merged commit 5c3e710 into main May 18, 2026
1 check failed
@dmchaledev dmchaledev deleted the feat/working-implementation branch May 18, 2026 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant