@sentry/warden 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +36 -2
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/setup-app/manifest.d.ts.map +1 -1
- package/dist/cli/commands/setup-app/manifest.js +3 -1
- package/dist/cli/commands/setup-app/manifest.js.map +1 -1
- package/dist/cli/commands/setup-app.js +1 -1
- package/dist/cli/commands/setup-app.js.map +1 -1
- package/dist/cli/diff-apply.d.ts +15 -0
- package/dist/cli/diff-apply.d.ts.map +1 -0
- package/dist/cli/diff-apply.js +69 -0
- package/dist/cli/diff-apply.js.map +1 -0
- package/dist/cli/files.d.ts +11 -1
- package/dist/cli/files.d.ts.map +1 -1
- package/dist/cli/files.js +145 -4
- package/dist/cli/files.js.map +1 -1
- package/dist/cli/fix.d.ts +1 -5
- package/dist/cli/fix.d.ts.map +1 -1
- package/dist/cli/fix.js +3 -62
- package/dist/cli/fix.js.map +1 -1
- package/dist/cli/git.d.ts.map +1 -1
- package/dist/cli/git.js +5 -9
- package/dist/cli/git.js.map +1 -1
- package/dist/cli/index.js +0 -0
- package/dist/cli/output/tasks.d.ts.map +1 -1
- package/dist/cli/output/tasks.js +5 -1
- package/dist/cli/output/tasks.js.map +1 -1
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +15 -1
- package/dist/config/schema.js.map +1 -1
- package/dist/diff/coalesce.d.ts +32 -2
- package/dist/diff/coalesce.d.ts.map +1 -1
- package/dist/diff/coalesce.js +174 -2
- package/dist/diff/coalesce.js.map +1 -1
- package/dist/output/dedup.d.ts +7 -4
- package/dist/output/dedup.d.ts.map +1 -1
- package/dist/output/dedup.js +48 -12
- package/dist/output/dedup.js.map +1 -1
- package/dist/output/renderer.d.ts.map +1 -1
- package/dist/output/renderer.js +52 -7
- package/dist/output/renderer.js.map +1 -1
- package/dist/output/stale.d.ts.map +1 -1
- package/dist/output/stale.js +7 -0
- package/dist/output/stale.js.map +1 -1
- package/dist/output/types.d.ts +15 -1
- package/dist/output/types.d.ts.map +1 -1
- package/dist/sdk/analyze.d.ts +18 -0
- package/dist/sdk/analyze.d.ts.map +1 -0
- package/dist/sdk/analyze.js +421 -0
- package/dist/sdk/analyze.js.map +1 -0
- package/dist/sdk/errors.d.ts +23 -0
- package/dist/sdk/errors.d.ts.map +1 -0
- package/dist/sdk/errors.js +74 -0
- package/dist/sdk/errors.js.map +1 -0
- package/dist/sdk/extract.d.ts +44 -0
- package/dist/sdk/extract.d.ts.map +1 -0
- package/dist/sdk/extract.js +224 -0
- package/dist/sdk/extract.js.map +1 -0
- package/dist/sdk/prepare.d.ts +13 -0
- package/dist/sdk/prepare.d.ts.map +1 -0
- package/dist/sdk/prepare.js +73 -0
- package/dist/sdk/prepare.js.map +1 -0
- package/dist/sdk/prompt.d.ts +30 -0
- package/dist/sdk/prompt.d.ts.map +1 -0
- package/dist/sdk/prompt.js +109 -0
- package/dist/sdk/prompt.js.map +1 -0
- package/dist/sdk/retry.d.ts +12 -0
- package/dist/sdk/retry.d.ts.map +1 -0
- package/dist/sdk/retry.js +31 -0
- package/dist/sdk/retry.js.map +1 -0
- package/dist/sdk/runner.d.ts +22 -199
- package/dist/sdk/runner.d.ts.map +1 -1
- package/dist/sdk/runner.js +26 -884
- package/dist/sdk/runner.js.map +1 -1
- package/dist/sdk/types.d.ts +127 -0
- package/dist/sdk/types.d.ts.map +1 -0
- package/dist/sdk/types.js +5 -0
- package/dist/sdk/types.js.map +1 -0
- package/dist/sdk/usage.d.ts +20 -0
- package/dist/sdk/usage.d.ts.map +1 -0
- package/dist/sdk/usage.js +44 -0
- package/dist/sdk/usage.js.map +1 -0
- package/dist/skills/remote.d.ts.map +1 -1
- package/dist/skills/remote.js +3 -7
- package/dist/skills/remote.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/dist/utils/exec.d.ts +61 -0
- package/dist/utils/exec.d.ts.map +1 -0
- package/dist/utils/exec.js +111 -0
- package/dist/utils/exec.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/package.json +15 -16
- package/.agents/skills/find-bugs/SKILL.md +0 -75
- package/.agents/skills/vercel-react-best-practices/AGENTS.md +0 -2934
- package/.agents/skills/vercel-react-best-practices/SKILL.md +0 -136
- package/.agents/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +0 -55
- package/.agents/skills/vercel-react-best-practices/rules/advanced-init-once.md +0 -42
- package/.agents/skills/vercel-react-best-practices/rules/advanced-use-latest.md +0 -39
- package/.agents/skills/vercel-react-best-practices/rules/async-api-routes.md +0 -38
- package/.agents/skills/vercel-react-best-practices/rules/async-defer-await.md +0 -80
- package/.agents/skills/vercel-react-best-practices/rules/async-dependencies.md +0 -51
- package/.agents/skills/vercel-react-best-practices/rules/async-parallel.md +0 -28
- package/.agents/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +0 -99
- package/.agents/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +0 -59
- package/.agents/skills/vercel-react-best-practices/rules/bundle-conditional.md +0 -31
- package/.agents/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +0 -49
- package/.agents/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +0 -35
- package/.agents/skills/vercel-react-best-practices/rules/bundle-preload.md +0 -50
- package/.agents/skills/vercel-react-best-practices/rules/client-event-listeners.md +0 -74
- package/.agents/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +0 -71
- package/.agents/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +0 -48
- package/.agents/skills/vercel-react-best-practices/rules/client-swr-dedup.md +0 -56
- package/.agents/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +0 -107
- package/.agents/skills/vercel-react-best-practices/rules/js-cache-function-results.md +0 -80
- package/.agents/skills/vercel-react-best-practices/rules/js-cache-property-access.md +0 -28
- package/.agents/skills/vercel-react-best-practices/rules/js-cache-storage.md +0 -70
- package/.agents/skills/vercel-react-best-practices/rules/js-combine-iterations.md +0 -32
- package/.agents/skills/vercel-react-best-practices/rules/js-early-exit.md +0 -50
- package/.agents/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +0 -45
- package/.agents/skills/vercel-react-best-practices/rules/js-index-maps.md +0 -37
- package/.agents/skills/vercel-react-best-practices/rules/js-length-check-first.md +0 -49
- package/.agents/skills/vercel-react-best-practices/rules/js-min-max-loop.md +0 -82
- package/.agents/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +0 -24
- package/.agents/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +0 -57
- package/.agents/skills/vercel-react-best-practices/rules/rendering-activity.md +0 -26
- package/.agents/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +0 -47
- package/.agents/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +0 -40
- package/.agents/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +0 -38
- package/.agents/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +0 -46
- package/.agents/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +0 -82
- package/.agents/skills/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +0 -30
- package/.agents/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +0 -28
- package/.agents/skills/vercel-react-best-practices/rules/rendering-usetransition-loading.md +0 -75
- package/.agents/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +0 -39
- package/.agents/skills/vercel-react-best-practices/rules/rerender-dependencies.md +0 -45
- package/.agents/skills/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +0 -40
- package/.agents/skills/vercel-react-best-practices/rules/rerender-derived-state.md +0 -29
- package/.agents/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +0 -74
- package/.agents/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +0 -58
- package/.agents/skills/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +0 -38
- package/.agents/skills/vercel-react-best-practices/rules/rerender-memo.md +0 -44
- package/.agents/skills/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +0 -45
- package/.agents/skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +0 -35
- package/.agents/skills/vercel-react-best-practices/rules/rerender-transitions.md +0 -40
- package/.agents/skills/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +0 -73
- package/.agents/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +0 -73
- package/.agents/skills/vercel-react-best-practices/rules/server-auth-actions.md +0 -96
- package/.agents/skills/vercel-react-best-practices/rules/server-cache-lru.md +0 -41
- package/.agents/skills/vercel-react-best-practices/rules/server-cache-react.md +0 -76
- package/.agents/skills/vercel-react-best-practices/rules/server-dedup-props.md +0 -65
- package/.agents/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +0 -83
- package/.agents/skills/vercel-react-best-practices/rules/server-serialization.md +0 -38
- package/.claude/settings.json +0 -57
- package/.claude/skills/agent-prompt/SKILL.md +0 -54
- package/.claude/skills/agent-prompt/references/agentic-patterns.md +0 -94
- package/.claude/skills/agent-prompt/references/anti-patterns.md +0 -140
- package/.claude/skills/agent-prompt/references/context-design.md +0 -124
- package/.claude/skills/agent-prompt/references/core-principles.md +0 -75
- package/.claude/skills/agent-prompt/references/model-guidance.md +0 -118
- package/.claude/skills/agent-prompt/references/output-formats.md +0 -98
- package/.claude/skills/agent-prompt/references/skill-structure.md +0 -115
- package/.claude/skills/agent-prompt/references/system-prompts.md +0 -115
- package/.claude/skills/notseer/SKILL.md +0 -131
- package/.claude/skills/skill-writer/SKILL.md +0 -140
- package/.claude/skills/testing-guidelines/SKILL.md +0 -132
- package/.claude/skills/warden-skill/SKILL.md +0 -226
- package/.claude/skills/warden-skill/references/config-schema.md +0 -116
- package/.dex/config.toml +0 -2
- package/.github/workflows/ci.yml +0 -33
- package/.github/workflows/release.yml +0 -59
- package/.github/workflows/warden.yml +0 -40
- package/AGENTS.md +0 -89
- package/CONTRIBUTING.md +0 -60
- package/SPEC.md +0 -263
- package/action.yml +0 -87
- package/assets/favicon.png +0 -0
- package/assets/warden-icon-bw.svg +0 -5
- package/assets/warden-icon-purple.png +0 -0
- package/assets/warden-icon-purple.svg +0 -5
- package/dist/action/159.index.js +0 -523
- package/dist/action/159.index.js.map +0 -1
- package/dist/action/action/index.d.ts +0 -2
- package/dist/action/action/index.d.ts.map +0 -1
- package/dist/action/action/main.d.ts +0 -2
- package/dist/action/action/main.d.ts.map +0 -1
- package/dist/action/cli/args.d.ts +0 -74
- package/dist/action/cli/args.d.ts.map +0 -1
- package/dist/action/cli/args.test.d.ts +0 -2
- package/dist/action/cli/args.test.d.ts.map +0 -1
- package/dist/action/cli/commands/add.d.ts +0 -7
- package/dist/action/cli/commands/add.d.ts.map +0 -1
- package/dist/action/cli/commands/init.d.ts +0 -10
- package/dist/action/cli/commands/init.d.ts.map +0 -1
- package/dist/action/cli/commands/init.test.d.ts +0 -2
- package/dist/action/cli/commands/init.test.d.ts.map +0 -1
- package/dist/action/cli/commands/setup-app/browser.d.ts +0 -9
- package/dist/action/cli/commands/setup-app/browser.d.ts.map +0 -1
- package/dist/action/cli/commands/setup-app/credentials.d.ts +0 -15
- package/dist/action/cli/commands/setup-app/credentials.d.ts.map +0 -1
- package/dist/action/cli/commands/setup-app/manifest.d.ts +0 -24
- package/dist/action/cli/commands/setup-app/manifest.d.ts.map +0 -1
- package/dist/action/cli/commands/setup-app/server.d.ts +0 -28
- package/dist/action/cli/commands/setup-app/server.d.ts.map +0 -1
- package/dist/action/cli/commands/setup-app.d.ts +0 -11
- package/dist/action/cli/commands/setup-app.d.ts.map +0 -1
- package/dist/action/cli/commands/sync.d.ts +0 -9
- package/dist/action/cli/commands/sync.d.ts.map +0 -1
- package/dist/action/cli/context.d.ts +0 -27
- package/dist/action/cli/context.d.ts.map +0 -1
- package/dist/action/cli/files.d.ts +0 -22
- package/dist/action/cli/files.d.ts.map +0 -1
- package/dist/action/cli/files.test.d.ts +0 -2
- package/dist/action/cli/files.test.d.ts.map +0 -1
- package/dist/action/cli/fix.d.ts +0 -41
- package/dist/action/cli/fix.d.ts.map +0 -1
- package/dist/action/cli/fix.test.d.ts +0 -2
- package/dist/action/cli/fix.test.d.ts.map +0 -1
- package/dist/action/cli/git.d.ts +0 -73
- package/dist/action/cli/git.d.ts.map +0 -1
- package/dist/action/cli/git.test.d.ts +0 -2
- package/dist/action/cli/git.test.d.ts.map +0 -1
- package/dist/action/cli/index.d.ts +0 -3
- package/dist/action/cli/index.d.ts.map +0 -1
- package/dist/action/cli/main.d.ts +0 -7
- package/dist/action/cli/main.d.ts.map +0 -1
- package/dist/action/cli/output/box.d.ts +0 -75
- package/dist/action/cli/output/box.d.ts.map +0 -1
- package/dist/action/cli/output/formatters.d.ts +0 -90
- package/dist/action/cli/output/formatters.d.ts.map +0 -1
- package/dist/action/cli/output/formatters.test.d.ts +0 -2
- package/dist/action/cli/output/formatters.test.d.ts.map +0 -1
- package/dist/action/cli/output/icons.d.ts +0 -15
- package/dist/action/cli/output/icons.d.ts.map +0 -1
- package/dist/action/cli/output/index.d.ts +0 -10
- package/dist/action/cli/output/index.d.ts.map +0 -1
- package/dist/action/cli/output/ink-runner.d.ts +0 -29
- package/dist/action/cli/output/ink-runner.d.ts.map +0 -1
- package/dist/action/cli/output/jsonl.d.ts +0 -43
- package/dist/action/cli/output/jsonl.d.ts.map +0 -1
- package/dist/action/cli/output/jsonl.test.d.ts +0 -2
- package/dist/action/cli/output/jsonl.test.d.ts.map +0 -1
- package/dist/action/cli/output/reporter.d.ts +0 -108
- package/dist/action/cli/output/reporter.d.ts.map +0 -1
- package/dist/action/cli/output/tasks.d.ts +0 -89
- package/dist/action/cli/output/tasks.d.ts.map +0 -1
- package/dist/action/cli/output/tty.d.ts +0 -21
- package/dist/action/cli/output/tty.d.ts.map +0 -1
- package/dist/action/cli/output/tty.test.d.ts +0 -2
- package/dist/action/cli/output/tty.test.d.ts.map +0 -1
- package/dist/action/cli/output/verbosity.d.ts +0 -20
- package/dist/action/cli/output/verbosity.d.ts.map +0 -1
- package/dist/action/cli/output/verbosity.test.d.ts +0 -2
- package/dist/action/cli/output/verbosity.test.d.ts.map +0 -1
- package/dist/action/cli/terminal.d.ts +0 -19
- package/dist/action/cli/terminal.d.ts.map +0 -1
- package/dist/action/cli/terminal.test.d.ts +0 -2
- package/dist/action/cli/terminal.test.d.ts.map +0 -1
- package/dist/action/config/index.d.ts +0 -4
- package/dist/action/config/index.d.ts.map +0 -1
- package/dist/action/config/loader.d.ts +0 -27
- package/dist/action/config/loader.d.ts.map +0 -1
- package/dist/action/config/loader.test.d.ts +0 -2
- package/dist/action/config/loader.test.d.ts.map +0 -1
- package/dist/action/config/schema.d.ts +0 -318
- package/dist/action/config/schema.d.ts.map +0 -1
- package/dist/action/config/writer.d.ts +0 -11
- package/dist/action/config/writer.d.ts.map +0 -1
- package/dist/action/config/writer.test.d.ts +0 -2
- package/dist/action/config/writer.test.d.ts.map +0 -1
- package/dist/action/diff/classify.d.ts +0 -29
- package/dist/action/diff/classify.d.ts.map +0 -1
- package/dist/action/diff/classify.test.d.ts +0 -2
- package/dist/action/diff/classify.test.d.ts.map +0 -1
- package/dist/action/diff/coalesce.d.ts +0 -42
- package/dist/action/diff/coalesce.d.ts.map +0 -1
- package/dist/action/diff/coalesce.test.d.ts +0 -2
- package/dist/action/diff/coalesce.test.d.ts.map +0 -1
- package/dist/action/diff/context.d.ts +0 -30
- package/dist/action/diff/context.d.ts.map +0 -1
- package/dist/action/diff/context.test.d.ts +0 -2
- package/dist/action/diff/context.test.d.ts.map +0 -1
- package/dist/action/diff/index.d.ts +0 -5
- package/dist/action/diff/index.d.ts.map +0 -1
- package/dist/action/diff/parser.d.ts +0 -52
- package/dist/action/diff/parser.d.ts.map +0 -1
- package/dist/action/diff/parser.test.d.ts +0 -2
- package/dist/action/diff/parser.test.d.ts.map +0 -1
- package/dist/action/event/context.d.ts +0 -9
- package/dist/action/event/context.d.ts.map +0 -1
- package/dist/action/event/index.d.ts +0 -3
- package/dist/action/event/index.d.ts.map +0 -1
- package/dist/action/event/schedule-context.d.ts +0 -30
- package/dist/action/event/schedule-context.d.ts.map +0 -1
- package/dist/action/examples/examples.integration.test.d.ts +0 -2
- package/dist/action/examples/examples.integration.test.d.ts.map +0 -1
- package/dist/action/examples/index.d.ts +0 -50
- package/dist/action/examples/index.d.ts.map +0 -1
- package/dist/action/examples/index.test.d.ts +0 -2
- package/dist/action/examples/index.test.d.ts.map +0 -1
- package/dist/action/examples/setup.d.ts +0 -2
- package/dist/action/examples/setup.d.ts.map +0 -1
- package/dist/action/index.d.ts +0 -11
- package/dist/action/index.d.ts.map +0 -1
- package/dist/action/index.js +0 -38231
- package/dist/action/index.js.map +0 -1
- package/dist/action/licenses.txt +0 -992
- package/dist/action/main.d.ts +0 -2
- package/dist/action/main.d.ts.map +0 -1
- package/dist/action/main.js +0 -707
- package/dist/action/main.js.map +0 -1
- package/dist/action/output/dedup.d.ts +0 -153
- package/dist/action/output/dedup.d.ts.map +0 -1
- package/dist/action/output/dedup.test.d.ts +0 -2
- package/dist/action/output/dedup.test.d.ts.map +0 -1
- package/dist/action/output/github-checks.d.ts +0 -106
- package/dist/action/output/github-checks.d.ts.map +0 -1
- package/dist/action/output/github-checks.test.d.ts +0 -2
- package/dist/action/output/github-checks.test.d.ts.map +0 -1
- package/dist/action/output/github-issues.d.ts +0 -35
- package/dist/action/output/github-issues.d.ts.map +0 -1
- package/dist/action/output/index.d.ts +0 -6
- package/dist/action/output/index.d.ts.map +0 -1
- package/dist/action/output/issue-renderer.d.ts +0 -20
- package/dist/action/output/issue-renderer.d.ts.map +0 -1
- package/dist/action/output/renderer.d.ts +0 -4
- package/dist/action/output/renderer.d.ts.map +0 -1
- package/dist/action/output/renderer.test.d.ts +0 -2
- package/dist/action/output/renderer.test.d.ts.map +0 -1
- package/dist/action/output/stale.d.ts +0 -31
- package/dist/action/output/stale.d.ts.map +0 -1
- package/dist/action/output/stale.test.d.ts +0 -2
- package/dist/action/output/stale.test.d.ts.map +0 -1
- package/dist/action/output/types.d.ts +0 -31
- package/dist/action/output/types.d.ts.map +0 -1
- package/dist/action/package.json +0 -3
- package/dist/action/sdk/index.d.ts +0 -2
- package/dist/action/sdk/index.d.ts.map +0 -1
- package/dist/action/sdk/runner.d.ts +0 -202
- package/dist/action/sdk/runner.d.ts.map +0 -1
- package/dist/action/sdk/runner.test.d.ts +0 -2
- package/dist/action/sdk/runner.test.d.ts.map +0 -1
- package/dist/action/skills/index.d.ts +0 -5
- package/dist/action/skills/index.d.ts.map +0 -1
- package/dist/action/skills/loader.d.ts +0 -111
- package/dist/action/skills/loader.d.ts.map +0 -1
- package/dist/action/skills/loader.test.d.ts +0 -2
- package/dist/action/skills/loader.test.d.ts.map +0 -1
- package/dist/action/skills/remote.d.ts +0 -117
- package/dist/action/skills/remote.d.ts.map +0 -1
- package/dist/action/skills/remote.test.d.ts +0 -2
- package/dist/action/skills/remote.test.d.ts.map +0 -1
- package/dist/action/sourcemap-register.cjs +0 -1
- package/dist/action/triggers/matcher.d.ts +0 -30
- package/dist/action/triggers/matcher.d.ts.map +0 -1
- package/dist/action/triggers/matcher.test.d.ts +0 -2
- package/dist/action/triggers/matcher.test.d.ts.map +0 -1
- package/dist/action/types/index.d.ts +0 -269
- package/dist/action/types/index.d.ts.map +0 -1
- package/dist/action/utils/async.d.ts +0 -5
- package/dist/action/utils/async.d.ts.map +0 -1
- package/dist/action/utils/index.d.ts +0 -16
- package/dist/action/utils/index.d.ts.map +0 -1
- package/dist/action/utils/index.test.d.ts +0 -2
- package/dist/action/utils/index.test.d.ts.map +0 -1
- package/dist/action/utils/version.d.ts +0 -3
- package/dist/action/utils/version.d.ts.map +0 -1
- package/dist/cli/args.test.d.ts +0 -2
- package/dist/cli/args.test.d.ts.map +0 -1
- package/dist/cli/args.test.js +0 -392
- package/dist/cli/args.test.js.map +0 -1
- package/dist/cli/commands/init.test.d.ts +0 -2
- package/dist/cli/commands/init.test.d.ts.map +0 -1
- package/dist/cli/commands/init.test.js +0 -117
- package/dist/cli/commands/init.test.js.map +0 -1
- package/dist/cli/files.test.d.ts +0 -2
- package/dist/cli/files.test.d.ts.map +0 -1
- package/dist/cli/files.test.js +0 -117
- package/dist/cli/files.test.js.map +0 -1
- package/dist/cli/fix.test.d.ts +0 -2
- package/dist/cli/fix.test.d.ts.map +0 -1
- package/dist/cli/fix.test.js +0 -251
- package/dist/cli/fix.test.js.map +0 -1
- package/dist/cli/git.test.d.ts +0 -2
- package/dist/cli/git.test.d.ts.map +0 -1
- package/dist/cli/git.test.js +0 -96
- package/dist/cli/git.test.js.map +0 -1
- package/dist/cli/output/formatters.test.d.ts +0 -2
- package/dist/cli/output/formatters.test.d.ts.map +0 -1
- package/dist/cli/output/formatters.test.js +0 -152
- package/dist/cli/output/formatters.test.js.map +0 -1
- package/dist/cli/output/jsonl.test.d.ts +0 -2
- package/dist/cli/output/jsonl.test.d.ts.map +0 -1
- package/dist/cli/output/jsonl.test.js +0 -284
- package/dist/cli/output/jsonl.test.js.map +0 -1
- package/dist/cli/output/tty.test.d.ts +0 -2
- package/dist/cli/output/tty.test.d.ts.map +0 -1
- package/dist/cli/output/tty.test.js +0 -105
- package/dist/cli/output/tty.test.js.map +0 -1
- package/dist/cli/output/verbosity.test.d.ts +0 -2
- package/dist/cli/output/verbosity.test.d.ts.map +0 -1
- package/dist/cli/output/verbosity.test.js +0 -35
- package/dist/cli/output/verbosity.test.js.map +0 -1
- package/dist/cli/terminal.test.d.ts +0 -2
- package/dist/cli/terminal.test.d.ts.map +0 -1
- package/dist/cli/terminal.test.js +0 -123
- package/dist/cli/terminal.test.js.map +0 -1
- package/dist/config/loader.test.d.ts +0 -2
- package/dist/config/loader.test.d.ts.map +0 -1
- package/dist/config/loader.test.js +0 -263
- package/dist/config/loader.test.js.map +0 -1
- package/dist/config/writer.test.d.ts +0 -2
- package/dist/config/writer.test.d.ts.map +0 -1
- package/dist/config/writer.test.js +0 -98
- package/dist/config/writer.test.js.map +0 -1
- package/dist/diff/classify.test.d.ts +0 -2
- package/dist/diff/classify.test.d.ts.map +0 -1
- package/dist/diff/classify.test.js +0 -140
- package/dist/diff/classify.test.js.map +0 -1
- package/dist/diff/coalesce.test.d.ts +0 -2
- package/dist/diff/coalesce.test.d.ts.map +0 -1
- package/dist/diff/coalesce.test.js +0 -159
- package/dist/diff/coalesce.test.js.map +0 -1
- package/dist/diff/context.test.d.ts +0 -2
- package/dist/diff/context.test.d.ts.map +0 -1
- package/dist/diff/context.test.js +0 -190
- package/dist/diff/context.test.js.map +0 -1
- package/dist/diff/parser.test.d.ts +0 -2
- package/dist/diff/parser.test.d.ts.map +0 -1
- package/dist/diff/parser.test.js +0 -178
- package/dist/diff/parser.test.js.map +0 -1
- package/dist/examples/examples.integration.test.d.ts +0 -2
- package/dist/examples/examples.integration.test.d.ts.map +0 -1
- package/dist/examples/examples.integration.test.js +0 -55
- package/dist/examples/examples.integration.test.js.map +0 -1
- package/dist/examples/index.test.d.ts +0 -2
- package/dist/examples/index.test.d.ts.map +0 -1
- package/dist/examples/index.test.js +0 -88
- package/dist/examples/index.test.js.map +0 -1
- package/dist/output/dedup.test.d.ts +0 -2
- package/dist/output/dedup.test.d.ts.map +0 -1
- package/dist/output/dedup.test.js +0 -357
- package/dist/output/dedup.test.js.map +0 -1
- package/dist/output/github-checks.test.d.ts +0 -2
- package/dist/output/github-checks.test.d.ts.map +0 -1
- package/dist/output/github-checks.test.js +0 -255
- package/dist/output/github-checks.test.js.map +0 -1
- package/dist/output/renderer.test.d.ts +0 -2
- package/dist/output/renderer.test.d.ts.map +0 -1
- package/dist/output/renderer.test.js +0 -645
- package/dist/output/renderer.test.js.map +0 -1
- package/dist/output/stale.test.d.ts +0 -2
- package/dist/output/stale.test.d.ts.map +0 -1
- package/dist/output/stale.test.js +0 -330
- package/dist/output/stale.test.js.map +0 -1
- package/dist/sdk/runner.test.d.ts +0 -2
- package/dist/sdk/runner.test.d.ts.map +0 -1
- package/dist/sdk/runner.test.js +0 -677
- package/dist/sdk/runner.test.js.map +0 -1
- package/dist/skills/loader.test.d.ts +0 -2
- package/dist/skills/loader.test.d.ts.map +0 -1
- package/dist/skills/loader.test.js +0 -241
- package/dist/skills/loader.test.js.map +0 -1
- package/dist/skills/remote.test.d.ts +0 -2
- package/dist/skills/remote.test.d.ts.map +0 -1
- package/dist/skills/remote.test.js +0 -582
- package/dist/skills/remote.test.js.map +0 -1
- package/dist/triggers/matcher.test.d.ts +0 -2
- package/dist/triggers/matcher.test.d.ts.map +0 -1
- package/dist/triggers/matcher.test.js +0 -234
- package/dist/triggers/matcher.test.js.map +0 -1
- package/dist/utils/index.test.d.ts +0 -2
- package/dist/utils/index.test.d.ts.map +0 -1
- package/dist/utils/index.test.js +0 -68
- package/dist/utils/index.test.js.map +0 -1
- package/docs/astro.config.mjs +0 -43
- package/docs/package.json +0 -19
- package/docs/pnpm-lock.yaml +0 -4000
- package/docs/public/favicon.svg +0 -5
- package/docs/src/components/Code.astro +0 -141
- package/docs/src/components/PackageManagerTabs.astro +0 -183
- package/docs/src/components/Terminal.astro +0 -212
- package/docs/src/layouts/Base.astro +0 -380
- package/docs/src/pages/cli.astro +0 -167
- package/docs/src/pages/config.astro +0 -395
- package/docs/src/pages/guide.astro +0 -450
- package/docs/src/pages/index.astro +0 -490
- package/docs/src/styles/global.css +0 -551
- package/docs/src/utils/version.ts +0 -6
- package/docs/tsconfig.json +0 -3
- package/docs/vercel.json +0 -5
- package/eslint.config.js +0 -33
- package/src/action/index.ts +0 -1
- package/src/action/main.ts +0 -868
- package/src/cli/args.test.ts +0 -477
- package/src/cli/args.ts +0 -414
- package/src/cli/commands/add.ts +0 -447
- package/src/cli/commands/init.test.ts +0 -137
- package/src/cli/commands/init.ts +0 -134
- package/src/cli/commands/setup-app/browser.ts +0 -38
- package/src/cli/commands/setup-app/credentials.ts +0 -45
- package/src/cli/commands/setup-app/manifest.ts +0 -48
- package/src/cli/commands/setup-app/server.ts +0 -172
- package/src/cli/commands/setup-app.ts +0 -156
- package/src/cli/commands/sync.ts +0 -114
- package/src/cli/context.ts +0 -131
- package/src/cli/files.test.ts +0 -155
- package/src/cli/files.ts +0 -89
- package/src/cli/fix.test.ts +0 -310
- package/src/cli/fix.ts +0 -387
- package/src/cli/git.test.ts +0 -119
- package/src/cli/git.ts +0 -318
- package/src/cli/index.ts +0 -14
- package/src/cli/main.ts +0 -672
- package/src/cli/output/box.ts +0 -235
- package/src/cli/output/formatters.test.ts +0 -187
- package/src/cli/output/formatters.ts +0 -269
- package/src/cli/output/icons.ts +0 -19
- package/src/cli/output/index.ts +0 -44
- package/src/cli/output/ink-runner.tsx +0 -366
- package/src/cli/output/jsonl.test.ts +0 -347
- package/src/cli/output/jsonl.ts +0 -126
- package/src/cli/output/reporter.ts +0 -434
- package/src/cli/output/tasks.ts +0 -374
- package/src/cli/output/tty.test.ts +0 -117
- package/src/cli/output/tty.ts +0 -60
- package/src/cli/output/verbosity.test.ts +0 -40
- package/src/cli/output/verbosity.ts +0 -31
- package/src/cli/terminal.test.ts +0 -148
- package/src/cli/terminal.ts +0 -301
- package/src/config/index.ts +0 -3
- package/src/config/loader.test.ts +0 -313
- package/src/config/loader.ts +0 -103
- package/src/config/schema.ts +0 -168
- package/src/config/writer.test.ts +0 -119
- package/src/config/writer.ts +0 -84
- package/src/diff/classify.test.ts +0 -162
- package/src/diff/classify.ts +0 -92
- package/src/diff/coalesce.test.ts +0 -208
- package/src/diff/coalesce.ts +0 -133
- package/src/diff/context.test.ts +0 -226
- package/src/diff/context.ts +0 -201
- package/src/diff/index.ts +0 -4
- package/src/diff/parser.test.ts +0 -212
- package/src/diff/parser.ts +0 -149
- package/src/event/context.ts +0 -132
- package/src/event/index.ts +0 -2
- package/src/event/schedule-context.ts +0 -101
- package/src/examples/examples.integration.test.ts +0 -66
- package/src/examples/index.test.ts +0 -101
- package/src/examples/index.ts +0 -122
- package/src/examples/setup.ts +0 -25
- package/src/index.ts +0 -115
- package/src/output/dedup.test.ts +0 -419
- package/src/output/dedup.ts +0 -607
- package/src/output/github-checks.test.ts +0 -300
- package/src/output/github-checks.ts +0 -476
- package/src/output/github-issues.ts +0 -329
- package/src/output/index.ts +0 -5
- package/src/output/issue-renderer.ts +0 -197
- package/src/output/renderer.test.ts +0 -727
- package/src/output/renderer.ts +0 -217
- package/src/output/stale.test.ts +0 -375
- package/src/output/stale.ts +0 -155
- package/src/output/types.ts +0 -34
- package/src/sdk/index.ts +0 -1
- package/src/sdk/runner.test.ts +0 -806
- package/src/sdk/runner.ts +0 -1232
- package/src/skills/index.ts +0 -36
- package/src/skills/loader.test.ts +0 -300
- package/src/skills/loader.ts +0 -423
- package/src/skills/remote.test.ts +0 -704
- package/src/skills/remote.ts +0 -604
- package/src/triggers/matcher.test.ts +0 -277
- package/src/triggers/matcher.ts +0 -152
- package/src/types/index.ts +0 -194
- package/src/utils/async.ts +0 -18
- package/src/utils/index.test.ts +0 -84
- package/src/utils/index.ts +0 -51
- package/src/utils/version.ts +0 -17
- package/tsconfig.json +0 -25
- package/vitest.config.ts +0 -8
- package/vitest.integration.config.ts +0 -11
- package/warden.toml +0 -19
|
@@ -1,357 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { generateContentHash, generateMarker, parseMarker, parseWardenComment, isWardenComment, deduplicateFindings, findingToExistingComment, parseWardenSkills, updateWardenCommentBody, } from './dedup.js';
|
|
3
|
-
describe('generateContentHash', () => {
|
|
4
|
-
it('generates consistent 8-char hex hash', () => {
|
|
5
|
-
const hash = generateContentHash('SQL Injection', 'User input passed to query');
|
|
6
|
-
expect(hash).toMatch(/^[a-f0-9]{8}$/);
|
|
7
|
-
});
|
|
8
|
-
it('returns same hash for same content', () => {
|
|
9
|
-
const hash1 = generateContentHash('Title', 'Description');
|
|
10
|
-
const hash2 = generateContentHash('Title', 'Description');
|
|
11
|
-
expect(hash1).toBe(hash2);
|
|
12
|
-
});
|
|
13
|
-
it('returns different hash for different content', () => {
|
|
14
|
-
const hash1 = generateContentHash('Title A', 'Description');
|
|
15
|
-
const hash2 = generateContentHash('Title B', 'Description');
|
|
16
|
-
expect(hash1).not.toBe(hash2);
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
describe('generateMarker', () => {
|
|
20
|
-
it('generates marker in expected format', () => {
|
|
21
|
-
const marker = generateMarker('src/db.ts', 42, 'a1b2c3d4');
|
|
22
|
-
expect(marker).toBe('<!-- warden:v1:src/db.ts:42:a1b2c3d4 -->');
|
|
23
|
-
});
|
|
24
|
-
it('handles paths with special characters', () => {
|
|
25
|
-
const marker = generateMarker('src/utils/db-helper.ts', 100, 'abcd1234');
|
|
26
|
-
expect(marker).toBe('<!-- warden:v1:src/utils/db-helper.ts:100:abcd1234 -->');
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
describe('parseMarker', () => {
|
|
30
|
-
it('parses valid marker', () => {
|
|
31
|
-
const body = `**:warning: SQL Injection**
|
|
32
|
-
|
|
33
|
-
User input passed to query.
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
<sub>warden: security-review</sub>
|
|
37
|
-
<!-- warden:v1:src/db.ts:42:a1b2c3d4 -->`;
|
|
38
|
-
const marker = parseMarker(body);
|
|
39
|
-
expect(marker).toEqual({
|
|
40
|
-
path: 'src/db.ts',
|
|
41
|
-
line: 42,
|
|
42
|
-
contentHash: 'a1b2c3d4',
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
it('returns null for body without marker', () => {
|
|
46
|
-
const body = '**:warning: Some Issue**\n\nDescription';
|
|
47
|
-
expect(parseMarker(body)).toBeNull();
|
|
48
|
-
});
|
|
49
|
-
it('returns null for invalid marker format', () => {
|
|
50
|
-
const body = '<!-- warden:invalid -->';
|
|
51
|
-
expect(parseMarker(body)).toBeNull();
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
describe('parseWardenComment', () => {
|
|
55
|
-
it('parses comment with emoji', () => {
|
|
56
|
-
const body = `**:warning: SQL Injection**
|
|
57
|
-
|
|
58
|
-
User input passed directly to query.
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
<sub>warden: security-review</sub>`;
|
|
62
|
-
const parsed = parseWardenComment(body);
|
|
63
|
-
expect(parsed).toEqual({
|
|
64
|
-
title: 'SQL Injection',
|
|
65
|
-
description: 'User input passed directly to query.',
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
it('parses comment without emoji', () => {
|
|
69
|
-
const body = `**Missing Validation**
|
|
70
|
-
|
|
71
|
-
No input validation on user data.
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
<sub>warden: code-review</sub>`;
|
|
75
|
-
const parsed = parseWardenComment(body);
|
|
76
|
-
expect(parsed).toEqual({
|
|
77
|
-
title: 'Missing Validation',
|
|
78
|
-
description: 'No input validation on user data.',
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
it('returns null for non-Warden comment', () => {
|
|
82
|
-
const body = 'This is a regular comment without the expected format.';
|
|
83
|
-
expect(parseWardenComment(body)).toBeNull();
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
describe('isWardenComment', () => {
|
|
87
|
-
it('returns true for comment with attribution', () => {
|
|
88
|
-
const body = `**:warning: Issue**\n\nDescription\n\n---\n<sub>warden: skill</sub>`;
|
|
89
|
-
expect(isWardenComment(body)).toBe(true);
|
|
90
|
-
});
|
|
91
|
-
it('returns true for comment with marker', () => {
|
|
92
|
-
const body = `**Issue**\n\n<!-- warden:v1:file.ts:10:abc12345 -->`;
|
|
93
|
-
expect(isWardenComment(body)).toBe(true);
|
|
94
|
-
});
|
|
95
|
-
it('returns false for regular comment', () => {
|
|
96
|
-
const body = 'This is a regular comment.';
|
|
97
|
-
expect(isWardenComment(body)).toBe(false);
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
describe('deduplicateFindings', () => {
|
|
101
|
-
const baseFinding = {
|
|
102
|
-
id: 'f1',
|
|
103
|
-
severity: 'high',
|
|
104
|
-
title: 'SQL Injection',
|
|
105
|
-
description: 'User input passed to query',
|
|
106
|
-
location: {
|
|
107
|
-
path: 'src/db.ts',
|
|
108
|
-
startLine: 42,
|
|
109
|
-
},
|
|
110
|
-
};
|
|
111
|
-
it('returns all findings when no existing comments', async () => {
|
|
112
|
-
const findings = [baseFinding];
|
|
113
|
-
const result = await deduplicateFindings(findings, [], { hashOnly: true });
|
|
114
|
-
expect(result.newFindings).toHaveLength(1);
|
|
115
|
-
expect(result.newFindings[0]).toBe(baseFinding);
|
|
116
|
-
expect(result.duplicateActions).toHaveLength(0);
|
|
117
|
-
});
|
|
118
|
-
it('returns all findings when findings array is empty', async () => {
|
|
119
|
-
const existingComments = [
|
|
120
|
-
{
|
|
121
|
-
id: 1,
|
|
122
|
-
path: 'src/db.ts',
|
|
123
|
-
line: 42,
|
|
124
|
-
title: 'SQL Injection',
|
|
125
|
-
description: 'User input passed to query',
|
|
126
|
-
contentHash: generateContentHash('SQL Injection', 'User input passed to query'),
|
|
127
|
-
},
|
|
128
|
-
];
|
|
129
|
-
const result = await deduplicateFindings([], existingComments, { hashOnly: true });
|
|
130
|
-
expect(result.newFindings).toHaveLength(0);
|
|
131
|
-
expect(result.duplicateActions).toHaveLength(0);
|
|
132
|
-
});
|
|
133
|
-
it('filters out exact hash matches and creates duplicate action', async () => {
|
|
134
|
-
const existingComments = [
|
|
135
|
-
{
|
|
136
|
-
id: 1,
|
|
137
|
-
path: 'src/db.ts',
|
|
138
|
-
line: 42,
|
|
139
|
-
title: 'SQL Injection',
|
|
140
|
-
description: 'User input passed to query',
|
|
141
|
-
contentHash: generateContentHash('SQL Injection', 'User input passed to query'),
|
|
142
|
-
isWarden: true,
|
|
143
|
-
},
|
|
144
|
-
];
|
|
145
|
-
const result = await deduplicateFindings([baseFinding], existingComments, { hashOnly: true });
|
|
146
|
-
expect(result.newFindings).toHaveLength(0);
|
|
147
|
-
expect(result.duplicateActions).toHaveLength(1);
|
|
148
|
-
expect(result.duplicateActions[0].type).toBe('update_warden');
|
|
149
|
-
expect(result.duplicateActions[0].matchType).toBe('hash');
|
|
150
|
-
});
|
|
151
|
-
it('keeps findings with different content', async () => {
|
|
152
|
-
const existingComments = [
|
|
153
|
-
{
|
|
154
|
-
id: 1,
|
|
155
|
-
path: 'src/db.ts',
|
|
156
|
-
line: 42,
|
|
157
|
-
title: 'SQL Injection',
|
|
158
|
-
description: 'User input passed to query',
|
|
159
|
-
contentHash: generateContentHash('SQL Injection', 'User input passed to query'),
|
|
160
|
-
},
|
|
161
|
-
];
|
|
162
|
-
const differentFinding = {
|
|
163
|
-
...baseFinding,
|
|
164
|
-
id: 'f2',
|
|
165
|
-
title: 'XSS Vulnerability',
|
|
166
|
-
description: 'Unescaped output in HTML',
|
|
167
|
-
};
|
|
168
|
-
const result = await deduplicateFindings([differentFinding], existingComments, {
|
|
169
|
-
hashOnly: true,
|
|
170
|
-
});
|
|
171
|
-
expect(result.newFindings).toHaveLength(1);
|
|
172
|
-
expect(result.newFindings[0].title).toBe('XSS Vulnerability');
|
|
173
|
-
expect(result.duplicateActions).toHaveLength(0);
|
|
174
|
-
});
|
|
175
|
-
it('filters multiple duplicates and keeps unique findings', async () => {
|
|
176
|
-
const finding1 = {
|
|
177
|
-
id: 'f1',
|
|
178
|
-
severity: 'high',
|
|
179
|
-
title: 'SQL Injection',
|
|
180
|
-
description: 'User input passed to query',
|
|
181
|
-
location: { path: 'src/db.ts', startLine: 42 },
|
|
182
|
-
};
|
|
183
|
-
const finding2 = {
|
|
184
|
-
id: 'f2',
|
|
185
|
-
severity: 'medium',
|
|
186
|
-
title: 'Missing Error Handling',
|
|
187
|
-
description: 'No try-catch block',
|
|
188
|
-
location: { path: 'src/api.ts', startLine: 100 },
|
|
189
|
-
};
|
|
190
|
-
const finding3 = {
|
|
191
|
-
id: 'f3',
|
|
192
|
-
severity: 'low',
|
|
193
|
-
title: 'Code Style',
|
|
194
|
-
description: 'Inconsistent indentation',
|
|
195
|
-
location: { path: 'src/utils.ts', startLine: 50 },
|
|
196
|
-
};
|
|
197
|
-
const existingComments = [
|
|
198
|
-
{
|
|
199
|
-
id: 1,
|
|
200
|
-
path: 'src/db.ts',
|
|
201
|
-
line: 42,
|
|
202
|
-
title: 'SQL Injection',
|
|
203
|
-
description: 'User input passed to query',
|
|
204
|
-
contentHash: generateContentHash('SQL Injection', 'User input passed to query'),
|
|
205
|
-
isWarden: true,
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
id: 2,
|
|
209
|
-
path: 'src/utils.ts',
|
|
210
|
-
line: 50,
|
|
211
|
-
title: 'Code Style',
|
|
212
|
-
description: 'Inconsistent indentation',
|
|
213
|
-
contentHash: generateContentHash('Code Style', 'Inconsistent indentation'),
|
|
214
|
-
isWarden: false,
|
|
215
|
-
},
|
|
216
|
-
];
|
|
217
|
-
const result = await deduplicateFindings([finding1, finding2, finding3], existingComments, {
|
|
218
|
-
hashOnly: true,
|
|
219
|
-
});
|
|
220
|
-
expect(result.newFindings).toHaveLength(1);
|
|
221
|
-
expect(result.newFindings[0].id).toBe('f2');
|
|
222
|
-
expect(result.duplicateActions).toHaveLength(2);
|
|
223
|
-
// First should be update_warden (isWarden: true)
|
|
224
|
-
expect(result.duplicateActions[0].type).toBe('update_warden');
|
|
225
|
-
// Second should be react_external (isWarden: false)
|
|
226
|
-
expect(result.duplicateActions[1].type).toBe('react_external');
|
|
227
|
-
});
|
|
228
|
-
it('works without API key (hash-only mode)', async () => {
|
|
229
|
-
const findings = [baseFinding];
|
|
230
|
-
const existingComments = [];
|
|
231
|
-
const result = await deduplicateFindings(findings, existingComments, {});
|
|
232
|
-
expect(result.newFindings).toHaveLength(1);
|
|
233
|
-
});
|
|
234
|
-
});
|
|
235
|
-
describe('parseWardenSkills', () => {
|
|
236
|
-
it('parses single skill', () => {
|
|
237
|
-
const body = `**:warning: Issue**\n\nDescription\n\n---\n<sub>warden: security-review</sub>`;
|
|
238
|
-
expect(parseWardenSkills(body)).toEqual(['security-review']);
|
|
239
|
-
});
|
|
240
|
-
it('parses multiple skills', () => {
|
|
241
|
-
const body = `**:warning: Issue**\n\nDescription\n\n---\n<sub>warden: security-review, code-quality, performance</sub>`;
|
|
242
|
-
expect(parseWardenSkills(body)).toEqual(['security-review', 'code-quality', 'performance']);
|
|
243
|
-
});
|
|
244
|
-
it('handles extra whitespace', () => {
|
|
245
|
-
const body = `<sub>warden: skill1 , skill2 </sub>`;
|
|
246
|
-
expect(parseWardenSkills(body)).toEqual(['skill1', 'skill2']);
|
|
247
|
-
});
|
|
248
|
-
it('returns empty array for non-Warden comment', () => {
|
|
249
|
-
const body = 'Regular comment without attribution';
|
|
250
|
-
expect(parseWardenSkills(body)).toEqual([]);
|
|
251
|
-
});
|
|
252
|
-
});
|
|
253
|
-
describe('updateWardenCommentBody', () => {
|
|
254
|
-
it('adds new skill to attribution', () => {
|
|
255
|
-
const body = `**:warning: Issue**\n\nDescription\n\n---\n<sub>warden: skill1</sub>`;
|
|
256
|
-
const result = updateWardenCommentBody(body, 'skill2');
|
|
257
|
-
expect(result).toContain('<sub>warden: skill1, skill2</sub>');
|
|
258
|
-
});
|
|
259
|
-
it('returns null if skill already listed', () => {
|
|
260
|
-
const body = `<sub>warden: skill1, skill2</sub>`;
|
|
261
|
-
const result = updateWardenCommentBody(body, 'skill1');
|
|
262
|
-
expect(result).toBeNull();
|
|
263
|
-
});
|
|
264
|
-
it('preserves rest of comment body', () => {
|
|
265
|
-
const body = `**:warning: SQL Injection**\n\nUser input passed to query\n\n---\n<sub>warden: security-review</sub>\n<!-- warden:v1:file.ts:10:abc123 -->`;
|
|
266
|
-
const result = updateWardenCommentBody(body, 'code-quality');
|
|
267
|
-
expect(result).toContain('**:warning: SQL Injection**');
|
|
268
|
-
expect(result).toContain('User input passed to query');
|
|
269
|
-
expect(result).toContain('<sub>warden: security-review, code-quality</sub>');
|
|
270
|
-
expect(result).toContain('<!-- warden:v1:file.ts:10:abc123 -->');
|
|
271
|
-
});
|
|
272
|
-
});
|
|
273
|
-
describe('findingToExistingComment', () => {
|
|
274
|
-
it('converts finding with location to ExistingComment', () => {
|
|
275
|
-
const finding = {
|
|
276
|
-
id: 'f1',
|
|
277
|
-
severity: 'high',
|
|
278
|
-
title: 'SQL Injection',
|
|
279
|
-
description: 'User input passed to query',
|
|
280
|
-
location: {
|
|
281
|
-
path: 'src/db.ts',
|
|
282
|
-
startLine: 42,
|
|
283
|
-
endLine: 45,
|
|
284
|
-
},
|
|
285
|
-
};
|
|
286
|
-
const comment = findingToExistingComment(finding);
|
|
287
|
-
expect(comment).toEqual({
|
|
288
|
-
id: -1,
|
|
289
|
-
path: 'src/db.ts',
|
|
290
|
-
line: 45,
|
|
291
|
-
title: 'SQL Injection',
|
|
292
|
-
description: 'User input passed to query',
|
|
293
|
-
contentHash: generateContentHash('SQL Injection', 'User input passed to query'),
|
|
294
|
-
isWarden: true,
|
|
295
|
-
skills: [],
|
|
296
|
-
});
|
|
297
|
-
});
|
|
298
|
-
it('includes skill when provided', () => {
|
|
299
|
-
const finding = {
|
|
300
|
-
id: 'f1',
|
|
301
|
-
severity: 'high',
|
|
302
|
-
title: 'SQL Injection',
|
|
303
|
-
description: 'User input passed to query',
|
|
304
|
-
location: {
|
|
305
|
-
path: 'src/db.ts',
|
|
306
|
-
startLine: 42,
|
|
307
|
-
},
|
|
308
|
-
};
|
|
309
|
-
const comment = findingToExistingComment(finding, 'security-review');
|
|
310
|
-
expect(comment).not.toBeNull();
|
|
311
|
-
expect(comment.isWarden).toBe(true);
|
|
312
|
-
expect(comment.skills).toEqual(['security-review']);
|
|
313
|
-
});
|
|
314
|
-
it('uses startLine when endLine is not set', () => {
|
|
315
|
-
const finding = {
|
|
316
|
-
id: 'f1',
|
|
317
|
-
severity: 'medium',
|
|
318
|
-
title: 'Missing Error Handling',
|
|
319
|
-
description: 'No try-catch block',
|
|
320
|
-
location: {
|
|
321
|
-
path: 'src/api.ts',
|
|
322
|
-
startLine: 100,
|
|
323
|
-
},
|
|
324
|
-
};
|
|
325
|
-
const comment = findingToExistingComment(finding);
|
|
326
|
-
expect(comment).not.toBeNull();
|
|
327
|
-
expect(comment.line).toBe(100);
|
|
328
|
-
});
|
|
329
|
-
it('returns null for finding without location', () => {
|
|
330
|
-
const finding = {
|
|
331
|
-
id: 'f1',
|
|
332
|
-
severity: 'low',
|
|
333
|
-
title: 'General Issue',
|
|
334
|
-
description: 'Some general finding',
|
|
335
|
-
};
|
|
336
|
-
const comment = findingToExistingComment(finding);
|
|
337
|
-
expect(comment).toBeNull();
|
|
338
|
-
});
|
|
339
|
-
});
|
|
340
|
-
describe('renderer marker integration', () => {
|
|
341
|
-
it('marker can be parsed after being generated', () => {
|
|
342
|
-
const path = 'src/db.ts';
|
|
343
|
-
const line = 42;
|
|
344
|
-
const hash = generateContentHash('SQL Injection', 'User input passed to query');
|
|
345
|
-
const marker = generateMarker(path, line, hash);
|
|
346
|
-
const body = `**:warning: SQL Injection**
|
|
347
|
-
|
|
348
|
-
User input passed to query
|
|
349
|
-
|
|
350
|
-
---
|
|
351
|
-
<sub>warden: security-review</sub>
|
|
352
|
-
${marker}`;
|
|
353
|
-
const parsed = parseMarker(body);
|
|
354
|
-
expect(parsed).toEqual({ path, line, contentHash: hash });
|
|
355
|
-
});
|
|
356
|
-
});
|
|
357
|
-
//# sourceMappingURL=dedup.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dedup.test.js","sourceRoot":"","sources":["../../src/output/dedup.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,iBAAiB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ourceRoot":"","sources":["../../src/output/github-checks.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { severityToAnnotationLevel, findingsToAnnotations, determineConclusion, aggregateSeverityCounts, } from './github-checks.js';
|
|
3
|
-
describe('severityToAnnotationLevel', () => {
|
|
4
|
-
it('maps critical to failure', () => {
|
|
5
|
-
expect(severityToAnnotationLevel('critical')).toBe('failure');
|
|
6
|
-
});
|
|
7
|
-
it('maps high to failure', () => {
|
|
8
|
-
expect(severityToAnnotationLevel('high')).toBe('failure');
|
|
9
|
-
});
|
|
10
|
-
it('maps medium to warning', () => {
|
|
11
|
-
expect(severityToAnnotationLevel('medium')).toBe('warning');
|
|
12
|
-
});
|
|
13
|
-
it('maps low to notice', () => {
|
|
14
|
-
expect(severityToAnnotationLevel('low')).toBe('notice');
|
|
15
|
-
});
|
|
16
|
-
it('maps info to notice', () => {
|
|
17
|
-
expect(severityToAnnotationLevel('info')).toBe('notice');
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
describe('findingsToAnnotations', () => {
|
|
21
|
-
it('converts findings with location to annotations', () => {
|
|
22
|
-
const findings = [
|
|
23
|
-
{
|
|
24
|
-
id: 'f1',
|
|
25
|
-
severity: 'high',
|
|
26
|
-
title: 'Security Issue',
|
|
27
|
-
description: 'Details about the issue',
|
|
28
|
-
location: {
|
|
29
|
-
path: 'src/file.ts',
|
|
30
|
-
startLine: 10,
|
|
31
|
-
endLine: 15,
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
];
|
|
35
|
-
const annotations = findingsToAnnotations(findings);
|
|
36
|
-
expect(annotations).toHaveLength(1);
|
|
37
|
-
expect(annotations[0]).toEqual({
|
|
38
|
-
path: 'src/file.ts',
|
|
39
|
-
start_line: 10,
|
|
40
|
-
end_line: 15,
|
|
41
|
-
annotation_level: 'failure',
|
|
42
|
-
message: 'Details about the issue',
|
|
43
|
-
title: 'Security Issue',
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
it('uses startLine for end_line when endLine not provided', () => {
|
|
47
|
-
const findings = [
|
|
48
|
-
{
|
|
49
|
-
id: 'f1',
|
|
50
|
-
severity: 'medium',
|
|
51
|
-
title: 'Issue',
|
|
52
|
-
description: 'Details',
|
|
53
|
-
location: {
|
|
54
|
-
path: 'src/file.ts',
|
|
55
|
-
startLine: 25,
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
];
|
|
59
|
-
const annotations = findingsToAnnotations(findings);
|
|
60
|
-
expect(annotations[0].start_line).toBe(25);
|
|
61
|
-
expect(annotations[0].end_line).toBe(25);
|
|
62
|
-
});
|
|
63
|
-
it('filters out findings without location', () => {
|
|
64
|
-
const findings = [
|
|
65
|
-
{
|
|
66
|
-
id: 'f1',
|
|
67
|
-
severity: 'high',
|
|
68
|
-
title: 'General Issue',
|
|
69
|
-
description: 'No location',
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
id: 'f2',
|
|
73
|
-
severity: 'medium',
|
|
74
|
-
title: 'Located Issue',
|
|
75
|
-
description: 'Has location',
|
|
76
|
-
location: {
|
|
77
|
-
path: 'src/file.ts',
|
|
78
|
-
startLine: 5,
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
];
|
|
82
|
-
const annotations = findingsToAnnotations(findings);
|
|
83
|
-
expect(annotations).toHaveLength(1);
|
|
84
|
-
expect(annotations[0].title).toBe('Located Issue');
|
|
85
|
-
});
|
|
86
|
-
it('sorts by severity (most severe first)', () => {
|
|
87
|
-
const findings = [
|
|
88
|
-
{
|
|
89
|
-
id: 'f1',
|
|
90
|
-
severity: 'low',
|
|
91
|
-
title: 'Low',
|
|
92
|
-
description: 'Low severity',
|
|
93
|
-
location: { path: 'a.ts', startLine: 1 },
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
id: 'f2',
|
|
97
|
-
severity: 'critical',
|
|
98
|
-
title: 'Critical',
|
|
99
|
-
description: 'Critical severity',
|
|
100
|
-
location: { path: 'b.ts', startLine: 2 },
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
id: 'f3',
|
|
104
|
-
severity: 'medium',
|
|
105
|
-
title: 'Medium',
|
|
106
|
-
description: 'Medium severity',
|
|
107
|
-
location: { path: 'c.ts', startLine: 3 },
|
|
108
|
-
},
|
|
109
|
-
];
|
|
110
|
-
const annotations = findingsToAnnotations(findings);
|
|
111
|
-
expect(annotations[0].title).toBe('Critical');
|
|
112
|
-
expect(annotations[1].title).toBe('Medium');
|
|
113
|
-
expect(annotations[2].title).toBe('Low');
|
|
114
|
-
});
|
|
115
|
-
it('limits to 50 annotations', () => {
|
|
116
|
-
const findings = Array.from({ length: 60 }, (_, i) => ({
|
|
117
|
-
id: `f${i}`,
|
|
118
|
-
severity: 'info',
|
|
119
|
-
title: `Finding ${i}`,
|
|
120
|
-
description: `Description ${i}`,
|
|
121
|
-
location: { path: `file${i}.ts`, startLine: i + 1 },
|
|
122
|
-
}));
|
|
123
|
-
const annotations = findingsToAnnotations(findings);
|
|
124
|
-
expect(annotations).toHaveLength(50);
|
|
125
|
-
});
|
|
126
|
-
it('filters by commentOn threshold', () => {
|
|
127
|
-
const findings = [
|
|
128
|
-
{
|
|
129
|
-
id: 'f1',
|
|
130
|
-
severity: 'critical',
|
|
131
|
-
title: 'Critical',
|
|
132
|
-
description: 'Critical issue',
|
|
133
|
-
location: { path: 'a.ts', startLine: 1 },
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
id: 'f2',
|
|
137
|
-
severity: 'high',
|
|
138
|
-
title: 'High',
|
|
139
|
-
description: 'High issue',
|
|
140
|
-
location: { path: 'b.ts', startLine: 2 },
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
id: 'f3',
|
|
144
|
-
severity: 'medium',
|
|
145
|
-
title: 'Medium',
|
|
146
|
-
description: 'Medium issue',
|
|
147
|
-
location: { path: 'c.ts', startLine: 3 },
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
id: 'f4',
|
|
151
|
-
severity: 'low',
|
|
152
|
-
title: 'Low',
|
|
153
|
-
description: 'Low issue',
|
|
154
|
-
location: { path: 'd.ts', startLine: 4 },
|
|
155
|
-
},
|
|
156
|
-
];
|
|
157
|
-
// commentOn='high' should only include critical and high
|
|
158
|
-
const annotations = findingsToAnnotations(findings, 'high');
|
|
159
|
-
expect(annotations).toHaveLength(2);
|
|
160
|
-
expect(annotations.map((a) => a.title)).toEqual(['Critical', 'High']);
|
|
161
|
-
});
|
|
162
|
-
it('returns all findings when commentOn is undefined', () => {
|
|
163
|
-
const findings = [
|
|
164
|
-
{
|
|
165
|
-
id: 'f1',
|
|
166
|
-
severity: 'critical',
|
|
167
|
-
title: 'Critical',
|
|
168
|
-
description: 'Critical issue',
|
|
169
|
-
location: { path: 'a.ts', startLine: 1 },
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
id: 'f2',
|
|
173
|
-
severity: 'info',
|
|
174
|
-
title: 'Info',
|
|
175
|
-
description: 'Info issue',
|
|
176
|
-
location: { path: 'b.ts', startLine: 2 },
|
|
177
|
-
},
|
|
178
|
-
];
|
|
179
|
-
const annotations = findingsToAnnotations(findings, undefined);
|
|
180
|
-
expect(annotations).toHaveLength(2);
|
|
181
|
-
});
|
|
182
|
-
});
|
|
183
|
-
describe('determineConclusion', () => {
|
|
184
|
-
it('returns success for empty findings', () => {
|
|
185
|
-
expect(determineConclusion([], 'high')).toBe('success');
|
|
186
|
-
});
|
|
187
|
-
it('returns neutral when no failOn threshold', () => {
|
|
188
|
-
const findings = [
|
|
189
|
-
{ id: 'f1', severity: 'critical', title: 'Issue', description: 'Details' },
|
|
190
|
-
];
|
|
191
|
-
expect(determineConclusion(findings, undefined)).toBe('neutral');
|
|
192
|
-
});
|
|
193
|
-
it('returns failure when findings meet threshold', () => {
|
|
194
|
-
const findings = [
|
|
195
|
-
{ id: 'f1', severity: 'high', title: 'High Issue', description: 'Details' },
|
|
196
|
-
];
|
|
197
|
-
expect(determineConclusion(findings, 'high')).toBe('failure');
|
|
198
|
-
expect(determineConclusion(findings, 'medium')).toBe('failure');
|
|
199
|
-
});
|
|
200
|
-
it('returns neutral when findings below threshold', () => {
|
|
201
|
-
const findings = [
|
|
202
|
-
{ id: 'f1', severity: 'medium', title: 'Medium Issue', description: 'Details' },
|
|
203
|
-
];
|
|
204
|
-
expect(determineConclusion(findings, 'high')).toBe('neutral');
|
|
205
|
-
expect(determineConclusion(findings, 'critical')).toBe('neutral');
|
|
206
|
-
});
|
|
207
|
-
it('considers critical more severe than high', () => {
|
|
208
|
-
const findings = [
|
|
209
|
-
{ id: 'f1', severity: 'critical', title: 'Critical', description: 'Details' },
|
|
210
|
-
];
|
|
211
|
-
expect(determineConclusion(findings, 'high')).toBe('failure');
|
|
212
|
-
});
|
|
213
|
-
});
|
|
214
|
-
describe('aggregateSeverityCounts', () => {
|
|
215
|
-
it('counts findings by severity across reports', () => {
|
|
216
|
-
const reports = [
|
|
217
|
-
{
|
|
218
|
-
skill: 'skill-1',
|
|
219
|
-
summary: 'Summary 1',
|
|
220
|
-
findings: [
|
|
221
|
-
{ id: 'f1', severity: 'critical', title: 'A', description: 'D' },
|
|
222
|
-
{ id: 'f2', severity: 'high', title: 'B', description: 'D' },
|
|
223
|
-
],
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
skill: 'skill-2',
|
|
227
|
-
summary: 'Summary 2',
|
|
228
|
-
findings: [
|
|
229
|
-
{ id: 'f3', severity: 'high', title: 'C', description: 'D' },
|
|
230
|
-
{ id: 'f4', severity: 'medium', title: 'E', description: 'D' },
|
|
231
|
-
{ id: 'f5', severity: 'info', title: 'F', description: 'D' },
|
|
232
|
-
],
|
|
233
|
-
},
|
|
234
|
-
];
|
|
235
|
-
const counts = aggregateSeverityCounts(reports);
|
|
236
|
-
expect(counts).toEqual({
|
|
237
|
-
critical: 1,
|
|
238
|
-
high: 2,
|
|
239
|
-
medium: 1,
|
|
240
|
-
low: 0,
|
|
241
|
-
info: 1,
|
|
242
|
-
});
|
|
243
|
-
});
|
|
244
|
-
it('returns all zeros for empty reports', () => {
|
|
245
|
-
const counts = aggregateSeverityCounts([]);
|
|
246
|
-
expect(counts).toEqual({
|
|
247
|
-
critical: 0,
|
|
248
|
-
high: 0,
|
|
249
|
-
medium: 0,
|
|
250
|
-
low: 0,
|
|
251
|
-
info: 0,
|
|
252
|
-
});
|
|
253
|
-
});
|
|
254
|
-
});
|
|
255
|
-
//# sourceMappingURL=github-checks.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"github-checks.test.js","sourceRoot":"","sources":["../../src/output/github-checks.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAG5B,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACzC,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QAClC,MAAM,CAAC,yBAAyB,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sBAAsB,EAAE,GAAG,EAAE;QAC9B,MAAM,CAAC,yBAAyB,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wBAAwB,EAAE,GAAG,EAAE;QAChC,MAAM,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oBAAoB,EAAE,GAAG,EAAE;QAC5B,MAAM,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC,CA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