feat(init): learn the mobile template kind - #205
Merged
Conversation
seamless-templates gains a third kind next to web and api, starting with an Expo starter. The CLI treated an unknown kind as if it were not there: the alias resolver skipped it, the prompts never offered it, and verify filtered it out without a word. A mobile starter is optional. init asks after the backend, defaulting to none; --mobile=<id|alias> or the bare alias includes one; --yes scaffolds without, since a native app brings prerequisites an unattended run should not opt into; and a registry that predates the kind offers nothing. A chosen starter lands at mobile/, is recorded as services.mobile, is checked by seamless check only when recorded, and is called out in the success output. verify announces the mobile templates it cannot drive. Closes #161.
13 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.
Summary
Closes #161 (the CLI half of fells-code/seamless-templates#40). Pairs with fells-code/seamless-templates#90, which adds
kind: "mobile"and the Expo starter. This PR is safe to merge ahead of that one: with today's registry there is no mobile template, so nothing new is asked or placed. TheSEAMLESS_TEMPLATES_REFbump to the release that carries the starter is a separate, later PR.TemplateKindgainsmobile;resolveTemplateAliasesandresolveTemplateSelectionbecome generic over the three kinds (--mobile=<id|alias>, bare--mobile/--expo, conflict detection per kind);parseInitArgsaccepts--mobile.runProjectSetupPrompts/runManagedTemplatePromptsask "Mobile app" after the backend with none first (andinitialValue: none); a flag answers outright;--yestakes none, since a native app brings prerequisites (an associated domain for passkeys) an unattended run should not opt into; a registry with no mobile template asks nothing. Both returnmobileTemplateId?.resolveSelectedTemplatestakes the list of ids and skips undefined ones; a chosen starter lands at its manifest'stargetDir(mobile/) with.envfilled from the same scaffold context (EXPO_PUBLIC_API_URLfrom{{apiUrl}}).seamless.config.jsonrecordsservices.mobile = { framework, path: "./mobile" }only when chosen;seamless checkreports the mobile project only when recorded.seamless verifyannounces the mobile templates it cannot drive instead of filtering them out silently..expo,ios,android. Help text and README updated.Test plan
npm run coverage: 1019 passing, 99.40 / 96.75 / 99.46 / 99.40 (floor 99 / 95)--yesnone, absent from registry), alias/flag resolution and conflicts for mobile, local and managed scaffolds placing a third template, config generator,checkdetected/missing/absent,verifyskip message,parseInitArgsnpm run build,npx eslint src