Skip to content

New simplified rewrite of the Vapor Toolbox#471

Merged
0xTim merged 78 commits intovapor:mainfrom
fpseverino:rewrite
Mar 17, 2025
Merged

New simplified rewrite of the Vapor Toolbox#471
0xTim merged 78 commits intovapor:mainfrom
fpseverino:rewrite

Conversation

@fpseverino
Copy link
Copy Markdown
Member

@fpseverino fpseverino commented Jan 19, 2025

New simplified rewrite of the Vapor Toolbox

  • Remove all commands except for new
  • Add support for nested variable conditions for file rendering in manifest.yml
  • Add --manifest flag to specify manifest file path
  • Drop ConsoleKit dependency in favor of swift-argument-parser
  • Switch from vapor-community/mustache to hummingbird-project/swift-mustache for template rendering
  • Update to Swift 6
  • Add --verbose flag that defaults to false; the new default prints only key steps in template generation
  • Add hidden --dump-variables flag that dumps the manifest variables as JSON and exits
  • Update CI and Dockerfile

Closes #369, closes #335, closes #403, closes #441

@fpseverino fpseverino marked this pull request as draft January 19, 2025 21:38
@github-advanced-security
Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@fpseverino fpseverino marked this pull request as ready for review January 24, 2025 17:44
@fpseverino fpseverino requested a review from 0xTim January 24, 2025 17:44
@fpseverino
Copy link
Copy Markdown
Member Author

As it stands, two of the differences between this rewrite and the original are:

  • There is no support for asking for dynamic variables (e.g. fluent, leaf) via terminal input. All variables (which all appear in the --help menu) must be entered as arguments to the command
  • All variables that have a boolean value associated with them, including top-level nested variables (e.g. if --no-fluent is given its nested variable db is not required) are considered false by default. For this reason the -n flag, which in the original Toolbox set all boolean flags to false, has not been implemented

@0xTim
Copy link
Copy Markdown
Member

0xTim commented Jan 25, 2025

@fpseverino Does that mean there's no interactivity any more? So if I type vapor new MyProject it doesn't ask me questions anymore?

@fpseverino
Copy link
Copy Markdown
Member Author

fpseverino commented Jan 25, 2025

@fpseverino Does that mean there's no interactivity any more? So if I type vapor new MyProject it doesn't ask me questions anymore?

Yes, if required variables (in vapor/template there aren't any) are missing it will return an error.

If that functionality is required I can work on it, but it's not supported by swift-argument-parser

fpseverino and others added 9 commits March 9, 2025 01:15
Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
@fpseverino fpseverino requested review from 0xTim and gwynne March 9, 2025 22:11
Copy link
Copy Markdown
Member

@gwynne gwynne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no more notes at this time 🙂

@gwynne
Copy link
Copy Markdown
Member

gwynne commented Mar 11, 2025

I've removed the Mongo and CodeQL tests from the "required checks" list.

Copy link
Copy Markdown
Member

@0xTim 0xTim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@0xTim 0xTim merged commit 7998dd4 into vapor:main Mar 17, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow cloning local templates which fails on macOS Swift-argument-parser support Command line ordering too picky.

4 participants