fix: builder ID showing unknown after registration#44
Merged
Conversation
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.
Summary
After running
npm run register-builder, the output displaysBuilder ID: unknowninstead of the actual builder ID. This makes it impossible for users to confirm their registration succeeded or to reference their builder ID for downstream configuration.Root Cause
The gateway returns builder registrations with a
builderIdproperty, but the script was reading.idfrom the response body, which doesn't exist — causing the nullish coalescing to fall through to"unknown".Additionally, the 409 conflict error message was misleading: it stated "This app URL is already registered with a different key", but the gateway's 409 is actually triggered by a duplicate
granteeAddress, not a duplicateappUrl.Changes
scripts/register-builder.ts.builderIdinstead of.idfrom the gateway response, fixing the "unknown" outputsignTypedDatamessage parameter to fix a preexisting TS2322 errorscripts/register-server.tssignTypedDatamessage type cast fix (preexisting TS2322)scripts/tsconfig.json(new)tsconfig.base.json, so scripts get proper type-checking withskipLibCheckandstrictmodetsconfig.jsonscriptsto project references sotsc --buildcovers the scripts directoryValidation
tsc --buildpasses with zero errorstsc --noEmit -p scripts/tsconfig.jsonpasses with zero errors