Repository navigation
fly: docs generation, pseudo-parameters, init templates (#770 partial) - #781
Merged
Merged
Conversation
Close three of the LexiconPlugin parity gaps between fly and the mature peers.
- Docs generation: implement serviceFromType / resourceTypeUrl in
src/codegen/docs.ts (they were scaffold TODOs) and add the docs-cli entry the
package `docs` script referenced. The fly docs site was a stub index.mdx; it
now generates real pages (Overview, Resource Reference, Pseudo-parameters,
Lint Rules, Serialization) with a sidebar, matching the aws/gcp/k8s sites
(incl. the shared rehype-base-url base-path plugin).
- Pseudo-parameters: Fly.Region / Fly.OrgSlug / Fly.AppName, mirroring gcp's
GCP namespace. Wired via pseudoParameters() and resolved in the serializer
from env vars (FLY_REGION/FLY_ORG/FLY_APP_NAME) with fallbacks, so
`new Machine({ region: Fly.Region })` serializes to the resolved value.
- Init templates: initTemplates() with default (App + Machine), "volume"
(App + Volume + mounted Machine), and "service" (public HTTPS service).
Also records the self-upgrade pin item as N/A: fly's spec is an unversioned
live URL (docs.machines.dev/openapi.json), so there is no version constant to
bump and no upstreamPin applies (noted in src/spec/fetch.ts).
Not in this PR: the `chant import` capability (templateParser/generator) —
the remaining #770 item, a separate follow-up that can build on describeResources.
101 fly tests pass; validate clean; check-lexicon Tier 1 unchanged, the
initTemplates Tier-2 checks flip to PASS.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
8 tasks
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.
Closes three of the five parity gaps in #770. The
chant importitem is left as a separate follow-up (it can build on thedescribeResourcesfrom #767).Docs generation
src/codegen/docs.tshad scaffold TODOs forserviceFromType/resourceTypeUrl. Implemented, plus the missingdocs-clientry. The fly docs site was a stubindex.mdx; it now generates real pages (Overview, Resource Reference, Pseudo-parameters, Lint Rules, Serialization) with a sidebar, matching the aws/gcp/k8s sites — including the sharedrehype-base-urlbase-path plugin the peers use.Pseudo-parameters
Fly.Region/Fly.OrgSlug/Fly.AppName, mirroring gcp'sGCPnamespace. Wired viapseudoParameters()and resolved in the serializer from env vars (FLY_REGION/FLY_ORG/FLY_APP_NAME) with fallbacks, sonew Machine({ region: Fly.Region })serializes to the resolved value.Init templates
initTemplates()withdefault(App + Machine),volume(App + Volume + mounted Machine), andservice(public HTTPS service). Region usesFly.Regionso the template passes the FLY001 region rule.Self-upgrade pin: N/A
fly's spec is an unversioned live URL (
docs.machines.dev/openapi.json) — no version constant to bump, so noupstreamPin/ #685 auto-bump applies (unlike gcp'sKCC_VERSION). Recorded as a note insrc/spec/fetch.ts.Verification
101 fly tests pass;
validateclean;check-lexiconTier 1 unchanged, the twoinitTemplatesTier-2 checks flip to PASS. Docs generate with no TODO stubs.🤖 Generated with Claude Code