Repository navigation
feat(cli): add scenario inspection, stdin validation, directory validation, and list filtering - #133
Merged
udoyechinenyevictoria merged 2 commits intoOct 22, 2026
Conversation
…and list filtering - Add 'show <scenario-id>' command to inspect bundled scenarios offline - Add '--search' and '--sort id' flags to 'list' command for deterministic filtering - Add '--stdin' option with required '--format' to 'validate' command with byte bounds - Add 'validate-directory <dir>' command with per-file summaries and duplicate detection - Document new CLI commands and options in README.md and '--help' - Add comprehensive test coverage in esure-cli/test/cli.test.ts Closes Esureorg#61, Closes Esureorg#63, Closes Esureorg#64, Closes Esureorg#65
|
@serverlessdomain-hash is attempting to deploy a commit to the Favour Chigozirim's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@serverlessdomain-hash Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Outcome
This pull request enhances the
esureCLI toolkit with essential scenario inspection, offline directory validation, stdin pipeline integration, and deterministic catalogue filtering without network overhead, solving issues #61, #63, #64, and #65.Closes #61
Closes #63
Closes #64
Closes #65
Changes
1. Show command for bundled scenarios (
esure show <scenario-id>) - #61show <scenario-id>command to inspect scenario definitions offline via the local scenario registry without triggering network calls or gateway construction.--output json).showwith usage examples in CLI--helpand rootREADME.md.2. Standard input scenario validation (
esure validate --stdin --format <format>) - #63--stdinsupport to thevalidatecommand for reading scenario definitions from pipes and CI streams.--format(jsonoryaml) to prevent ambiguous parsing.SCENARIO_LIMITS.definitionBytes = 16,384 bytes), throwing validation errors immediately if exceeded.process.stdin.isTTY) and fails fast with a helpful error message rather than hanging silently.{ valid: false, error: ... }when--output jsonis requested.3. Offline directory validation (
esure validate-directory <dir>) - #64validate-directory <dir>command to validate collections of.json,.yaml, and.ymlscenario files in a single invocation.localeCompare).maxFilesPerDirectory = 100) and individual definition size limits (SCENARIO_LIMITS.definitionBytes).summary: { total, passed, failed }) and human-readable reporting.4. Deterministic filtering and sorting for list command - #65
--search <term>across scenarioid,name, anddescriptionwithout regex execution.--sort id.5. Documentation & Test Suite
README.mdCLI usage section with minimal examples forshow,list --search,validate --stdin, andvalidate-directory.esure-cli/test/cli.test.tscovering valid inputs, invalid schemas, error handling, bounds checking, empty inputs, duplicate detection, and CLI help/options parity (43 tests passing).Verification
npm run typecheck,npm run build,npm testinesure-cliandnpm testinesure-backend)esure-cli/test/cli.test.ts)README.mdand CLI--help).envfiles, or generated account keys are includedScope