Skip to content

Hrdtr/guantr

Secrets & Credentials
TypeScript Latest v2.0.0 · 26d ago Security brief →

Features

  • Type‑safe authorization and permission checking for JavaScript/TypeScript
  • Composable builder DSL for defining rules with context‑aware conditions
  • Supports ESM, CommonJS, CDN, and runtime environments (Node.js, Bun, Deno)
  • Batch permission checks and rule management APIs

Recent releases

View all 4 releases →
v2.0.0 Breaking risk
Breaking changes
  • Remove string-mode from can and cannot
  • Remove ctx. alias for contextual operands
  • Rename can/cannot to allow/deny
Notable features
  • Add batch permission checks
  • Throw error on missing condition keys (core)
Full changelog

compare changes

🚀 Enhancements

  • ⚠️ Remove string-mode from can and cannot (ac2491d)
  • ⚠️ Remove ctx. alias for contextual operands (eebd795)
  • core: Throw error on missing condition keys (925435d)
  • Add batch permission checks (8a49f31)
  • ⚠️ Add type-safe condition builder DSL (23be1e4)

🩹 Fixes

  • Handle BigInt and Date in cache serialization (3aa0fa5)
  • Clean stableStringify set and improve types (86c32b7)
  • docs: Rename condition column, add getRules (76e16f9)
  • docs: Correct column name in SQL query (792583c)

💅 Refactors

  • ⚠️ Drop strict mode, always validate conditions (1435f5f)
  • storage: ⚠️ Make cache.has required (2e603b6)
  • ⚠️ Remove clearRules and make setRules atomic (23581d4)
  • ⚠️ Remove Context generic and rename types (7565575)
  • ⚠️ Rename can/cannot to allow/deny (4528d0c)
  • tests: Restructure test suite, eliminate as any, and reach 100% coverage (37c22b8)

📖 Documentation

  • Add index on rules table example (bca4d54)
  • Add assignRuleToRole method to ScopedStorage example (d7e5d64)
  • Remove dead links (cc9dd89)

🏡 Chore

⚠️ Breaking Changes

  • ⚠️ Remove string-mode from can and cannot (ac2491d)
  • ⚠️ Remove ctx. alias for contextual operands (eebd795)
  • ⚠️ Add type-safe condition builder DSL (23be1e4)
  • ⚠️ Drop strict mode, always validate conditions (1435f5f)
  • storage: ⚠️ Make cache.has required (2e603b6)
  • ⚠️ Remove clearRules and make setRules atomic (23581d4)
  • ⚠️ Remove Context generic and rename types (7565575)
  • ⚠️ Rename can/cannot to allow/deny (4528d0c)

❤️ Contributors

Review required
v1.1.0 Breaking risk
Breaking upgrade

Abstract methods + async support + doc/CI updates

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

About

Stars
24
Forks
2
Language
TypeScript
Downloads/week
19 ↓86%
NPM Maintainers
1 Single npm maintainer
Contributors
4
TypeScript
Types included ✓

Install & Platforms

Install via
npm

Beta — feedback welcome: [email protected]