Repository navigation
docs: accurate npm READMEs for every package - #73
Merged
Merged
Conversation
Add READMEs to @webdecoy/fastify, @webdecoy/nextjs and @webdecoy/hono, whose npm pages were blank. Rewrite the @webdecoy/node README for the current API: apiKey is optional, protect() returns a Decision (conclusion, results, deniedBy), adapters start in monitor mode, and WEBDECOY_API_KEY is never read from the environment. Root README: apiUrl default is https://in.webdecoy.com, keys come from the API Keys page, tripwires are no longer called zero-FP, and the unsourced latency figure is replaced by what the code does. Express install now adds @webdecoy/node, where the rules are imported from. new WebDecoy() without a config throws, so examples pass {}.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
npm pages are where people and AI coding assistants copy install snippets from, so they need to match the code.
Changes
@webdecoy/fastify,@webdecoy/nextjsand@webdecoy/hono(their npm pages were blank): install, a minimal working snippet, options with defaults, monitor mode, request/context properties, environment variables actually read, verify step, links to docs.webdecoy.com.@webdecoy/nodeREADME rewritten for the current API:apiKeyis optional; without it, local rules only (default[tripwire()]) and no network calls.protect()returns aDecision(conclusion,allowed,resultswithstate,deniedBy(),id), not the old{ allowed, detection, error }shape.@webdecoy/nodeinstalled alongside.createFetchGuard(), clearance on Vercel, and an env-var table:WEBDECOY_API_KEYis not read automatically; only the clearance gate readsWEBDECOY_SITE_KEY/WEBDECOY_SCANNER_ID/WEBDECOY_SENSOR_KEY/WEBDECOY_INGEST, and the captcha checksNODE_ENV.apiUrl(in.webdecoy.com), not api.webdecoy.com.@webdecoy/expressREADME: install@webdecoy/nodetoo (rules are imported from it), local-rules example withreq.webdecoyDecision,onBlockeddocumented as server-score blocks only (rule refusals answer 403/429 directly), verify step.apiUrldefault ishttps://in.webdecoy.com(sdk.ts), API Keys page wording, tripwires no longer called "zero-FP", unsourced "50-200ms" and "runs asynchronously" FAQ replaced with what the code does (server call only when local analysis flags a request; awaited, bounded bytimeout, fails open).new WebDecoy()with no argument throws at runtime (config.apiKeyon undefined); the root README anddocs/verify-ai-agents-web-bot-auth.mdnow pass{}.[Unreleased]entry.Snippets are consistent with docs.webdecoy.com/installation/install-with-ai (WebDecoy/app#1745).
Verification
tsc --strictagainst the built packages.DENY/deniedBy('tripwire') === truefor/.envandALLOWfor/; Hono in enforce mode answers 403.npm pack --dry-runincludes README.md in all six packages (npm always includes it; nofileschange needed).npm run build,npm run lint,npm test,npm run check:edgeall pass.npm pages update only with the next published version.