feat(dns): manage Scriptable DNS scripts with ambient runtime types#104
Conversation
🦋 Changeset detectedLatest commit: d775ff3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@codex review |
Greptile SummaryThis PR adds Scriptable DNS script management to the CLI. The main changes are:
Confidence Score: 4/5This is close, but the manifest validation gap should be fixed before merging.
packages/cli/src/commands/dns/scripts/interactive.ts Important Files Changed
Reviews (6): Last reviewed commit: "add comment about publish script" | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9171b922fd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (manifest.id) { | ||
| logger.dim(`Using linked DNS script ${manifest.name ?? manifest.id}.`); | ||
| return manifest.id; | ||
| } |
There was a problem hiding this comment.
The linked-manifest path returns manifest.id without checking that the remote script is still a Scriptable DNS script. deploy and attach commonly omit the ID and rely on this branch, so an older or hand-edited .bunny/dns-script.json can still point at a regular Edge Script and cause DNS code to be uploaded or a SCRIPT record to be attached to the wrong script type. Validate the manifest ID through fetchDnsScript before returning it, matching the explicit-ID path above.
| if (manifest.id) { | |
| logger.dim(`Using linked DNS script ${manifest.name ?? manifest.id}.`); | |
| return manifest.id; | |
| } | |
| if (manifest.id) { | |
| await fetchDnsScript(client, manifest.id); | |
| logger.dim(`Using linked DNS script ${manifest.name ?? manifest.id}.`); | |
| return manifest.id; | |
| } |
No description provided.