{"_id":"@dscodotco/compliance-gates","_rev":"2-efeaf830320ffcc5aced6c97c67d8e4b","name":"@dscodotco/compliance-gates","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@dscodotco/compliance-gates","version":"0.1.0","license":"MIT","_id":"@dscodotco/compliance-gates@0.1.0","maintainers":[{"name":"williamk","email":"wkasel@gmail.com"}],"homepage":"https://github.com/ruopro/flightdeck#readme","bugs":{"url":"https://github.com/ruopro/flightdeck/issues"},"bin":{"compliance-check":"dist/bin/compliance-check.js"},"dist":{"shasum":"dc6e1339f34bdee62b14e44075e9c1c9ac667200","tarball":"https://registry.npmjs.org/@dscodotco/compliance-gates/-/compliance-gates-0.1.0.tgz","fileCount":12,"integrity":"sha512-mG7SZjrJc2rZkHVetDXS0mc3R65iNoLbPwGiZfTa5imYYk0Y0d0YNXxFzYemSvk+p65l5jaQWfUnzevyyi+oWQ==","signatures":[{"sig":"MEYCIQCLzlI9ch6xpv13DouRsSoFK8E9BZFCglamRs0+cZFizwIhAKJG8wEJ/cJXQzofZF9OSUePMzB58m1rStrkkydKuuKo","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":71928},"main":"./dist/index.cjs","type":"module","_from":"file:dscodotco-compliance-gates-0.1.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs","development":"./src/index.ts"},"./biome":"./biome/base.json"},"scripts":{"test":"node --test --import tsx src/**/*.test.ts","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"williamk","email":"wkasel@gmail.com"},"_resolved":"/private/var/folders/gd/tyl93m8j5j30dvbb98j87smc0000gn/T/d23fc927a9c9ef8a09f8731c2f3f71ee/dscodotco-compliance-gates-0.1.0.tgz","_integrity":"sha512-mG7SZjrJc2rZkHVetDXS0mc3R65iNoLbPwGiZfTa5imYYk0Y0d0YNXxFzYemSvk+p65l5jaQWfUnzevyyi+oWQ==","repository":{"url":"git+https://github.com/ruopro/flightdeck.git","type":"git","directory":"packages/compliance-gates"},"_npmVersion":"10.9.4","description":"Config-driven legal-compliance gates for e-commerce/subscription sites: ADA/a11y (Biome preset), ARL auto-renewal, CCPA, CAN-SPAM, Prop 65, and research-use-only disclosures. Runs in CI + pre-commit.","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","tsup":"^8.5.0","typescript":"^5.7.0","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/compliance-gates_0.1.0_1789151779311_0.6724686036381888","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@dscodotco/compliance-gates","version":"0.1.1","description":"Config-driven legal-compliance gates for e-commerce/subscription sites: ADA/a11y (Biome preset), ARL auto-renewal, CCPA, CAN-SPAM, Prop 65, and research-use-only disclosures. Runs in CI + pre-commit.","license":"MIT","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./biome":"./biome/base.json"},"sideEffects":false,"bin":{"compliance-check":"dist/bin/compliance-check.js"},"devDependencies":{"@types/node":"^22.10.0","tsup":"^8.5.0","tsx":"^4.19.0","typescript":"^5.7.0"},"repository":{"type":"git","url":"git+https://github.com/ruopro/flightdeck.git","directory":"packages/compliance-gates"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup","typecheck":"tsc --noEmit","test":"node --test --import tsx src/**/*.test.ts"},"_id":"@dscodotco/compliance-gates@0.1.1","bugs":{"url":"https://github.com/ruopro/flightdeck/issues"},"homepage":"https://github.com/ruopro/flightdeck#readme","_integrity":"sha512-RexN8ffX8fv0CpEsb+VX0iUp7hQ0bJbeYk1PKBeIWLqHmO5AVrkHIoe96OdkdIyYaoEhnzFlhRM7MxDutid76Q==","_resolved":"/private/var/folders/gd/tyl93m8j5j30dvbb98j87smc0000gn/T/a2e5e241867e2ed542f6ad498cfd1f1d/dscodotco-compliance-gates-0.1.1.tgz","_from":"file:dscodotco-compliance-gates-0.1.1.tgz","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-RexN8ffX8fv0CpEsb+VX0iUp7hQ0bJbeYk1PKBeIWLqHmO5AVrkHIoe96OdkdIyYaoEhnzFlhRM7MxDutid76Q==","shasum":"3e314ec5d8bea348c7fe701f3bbf0afa5fe72000","tarball":"https://registry.npmjs.org/@dscodotco/compliance-gates/-/compliance-gates-0.1.1.tgz","fileCount":12,"unpackedSize":71889,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDOLjsGS2ywjPF2ne43focT0Jza6zl3bgtWVmjuzLdWCAIhAKrGFaXqoXIkUt5U/cLRWO697pJlFpcqQ1X3jHQXEmjC"}]},"_npmUser":{"name":"williamk","email":"wkasel@gmail.com"},"directories":{},"maintainers":[{"name":"williamk","email":"wkasel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/compliance-gates_0.1.1_1789172164571_0.16868488065282028"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-11T18:36:19.150Z","modified":"2026-09-12T00:16:04.895Z","0.1.0":"2026-09-11T18:36:19.456Z","0.1.1":"2026-09-12T00:16:04.713Z"},"bugs":{"url":"https://github.com/ruopro/flightdeck/issues"},"license":"MIT","homepage":"https://github.com/ruopro/flightdeck#readme","repository":{"type":"git","url":"git+https://github.com/ruopro/flightdeck.git","directory":"packages/compliance-gates"},"description":"Config-driven legal-compliance gates for e-commerce/subscription sites: ADA/a11y (Biome preset), ARL auto-renewal, CCPA, CAN-SPAM, Prop 65, and research-use-only disclosures. Runs in CI + pre-commit.","maintainers":[{"name":"williamk","email":"wkasel@gmail.com"}],"readme":"# @dscodotco/compliance-gates\n\nConfig-driven **legal-compliance gates** for e-commerce / subscription sites — the \"easy lawsuit\" surface, enforced in CI and pre-commit so it can't silently regress.\n\n> Not legal advice. These gates enforce that a required disclosure, link, warning, or control is **present** where the law expects it. They cannot judge whether the wording is legally sufficient — that's a job for counsel. Their value is stopping the common regression: the required element quietly disappearing from a page.\n\n## Two halves\n\n1. **ADA / accessibility (a Biome preset).** `@dscodotco/compliance-gates/biome` turns on Biome's full `a11y` rule group at error. Extend it from your `biome.json`:\n   ```json\n   { \"extends\": [\"@dscodotco/compliance-gates/biome\"] }\n   ```\n   This makes WCAG-adjacent issues (missing alt text, unlabeled controls, keyboard handlers, ARIA misuse) fail `biome check`.\n\n2. **Content gates (a CLI).** `compliance-check` scans your source for the disclosures/links/warnings the other laws require, driven by a `compliance.config.ts`:\n   ```ts\n   import { arlAutoRenew, ccpaPrivacyChoices, prop65, canSpamFooter, ruoNotice,\n     accessibilityStatement, noPreCheckedConsent } from \"@dscodotco/compliance-gates\";\n   export const config = {\n     checks: [\n       ccpaPrivacyChoices([\"surfaces/**/footer*.tsx\", \"surfaces/**/layout*.tsx\"]),\n       accessibilityStatement([\"surfaces/**\"]),\n       arlAutoRenew([\"surfaces/**/checkout/**\", \"surfaces/**/subscribe*.tsx\"]),\n       prop65([\"surfaces/**/products/**\", \"surfaces/**/product-*.tsx\"]),\n       canSpamFooter([\"modules/comms/**/templates*.ts\"]),\n       ruoNotice([\"surfaces/storefront/**\"]),\n       noPreCheckedConsent([\"surfaces/**\"]),\n     ],\n   };\n   ```\n   Then run `compliance-check` (exit 1 on any violation).\n\n## Covered categories\n\n| Check | Law | What it asserts |\n|---|---|---|\n| `arlAutoRenew` | CA ARL §17600 / ROSCA / FTC Click-to-Cancel | A subscription/auto-renew UI also discloses the auto-renewal terms |\n| `ccpaPrivacyChoices` | CCPA/CPRA §1798.135 | A \"Your Privacy Choices\" / \"Do Not Sell or Share\" control exists |\n| `prop65` | CA Prop 65 §25249.6 | A product / add-to-cart UI carries a Prop 65 warning |\n| `canSpamFooter` | CAN-SPAM §7704 | A marketing email template carries an unsubscribe link + postal address |\n| `ruoNotice` | FDA RUO labeling / FTC | The research-use-only notice is present |\n| `accessibilityStatement` | ADA / CA Unruh | A public accessibility statement exists |\n| `noPreCheckedConsent` | ROSCA / FTC negative-option | No pre-checked consent inputs (dark pattern) |\n| (Biome preset) | ADA Title III / CA Unruh | a11y rules at error |\n\n## Check kinds (engine)\n\n- **required-somewhere** — at least one file in `globs` contains one of `anyOf`.\n- **conditional** — any file matching a `trigger` must also contain one of `require`.\n- **forbidden** — no file may contain any of `forbidden`.\n\nA `required-somewhere` or `conditional` check whose globs match **zero files fails** (\"gate scoped to nothing\"): a gate pointed at a path that doesn't exist — or whose target file was deleted — must never read as green.\n\nMatching is case-insensitive substring (grep-grade). Zero runtime dependencies.\n\n## Wiring\n\n- Add `\"compliance\": \"compliance-check\"` to `package.json` scripts.\n- Run it in CI and in a pre-commit hook (alongside `biome check`).\n\n## Status\n\nAlpha (0.x). Built for the RUO Pro platform; being generalized for open source.\n","readmeFilename":"README.md"}