Harden napp init validation and docs build#139
Merged
Conversation
The PR added scriptable NIP-5B setup, but the command-level structural validator did not cover indexerRelays. That let `nsyte napp init --indexer-relay nope` write a config that later failed schema loading. This aligns structural validation with the JSON schema and keeps the docs build green by marking GitHub Actions expressions as literal Vue content. Constraint: `napp init` validates with validateNappConfig before writeProjectFile, not a full AJV schema pass Rejected: Validate indexer relays only in the CLI action | would leave isNapp and other structural callers inconsistent Confidence: high Scope-risk: narrow Directive: Keep validateNappConfig and config.schema.json aligned for every field writeProjectFile can persist Tested: deno test --allow-all --no-check tests/unit/napp/detect_test.ts tests/unit/napp/schema_test.ts tests/unit/napp/napp_init_command_test.ts Tested: invalid napp init --indexer-relay nope exits 1 and leaves config unchanged Tested: deno task test Tested: deno task check-doc-drift Tested: deno lint src/lib/napp/detect.ts tests/unit/napp/detect_test.ts tests/unit/napp/schema_test.ts Tested: deno fmt --check src/lib/napp/detect.ts tests/unit/napp/detect_test.ts tests/unit/napp/schema_test.ts Tested: deno task site:build Tested: deno task compile Tested: git diff --check Not-tested: Live relay publish of kind 37348/39108
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.
Review findings fixed
napp.indexerRelaysin structural validation sonsyte napp init --indexer-relay nopecannot write a config that later fails schema loading.docs/RELEASING.mdwithv-preso VitePress SSR does not evaluatesecrets.RELEASE_TOKEN.Verification
deno test --allow-all --no-check tests/unit/napp/detect_test.ts tests/unit/napp/schema_test.ts tests/unit/napp/napp_init_command_test.tsnapp init --indexer-relay noperepro exits 1 and leaves config unchangeddeno task testdeno task check-doc-driftdeno lint src/lib/napp/detect.ts tests/unit/napp/detect_test.ts tests/unit/napp/schema_test.tsdeno fmt --check src/lib/napp/detect.ts tests/unit/napp/detect_test.ts tests/unit/napp/schema_test.tsdeno task site:builddeno task compilegit diff --checkNotes