toolbox/Package.swift
Francesco Paolo Severino 7998dd4acc
New simplified rewrite of the Vapor Toolbox (#471)
* New simplified rewrite of the Vapor Toolbox

* Fix CI

* Refactor `TemplateRenderer` to dynamically handle Fluent database options

* Align `template` option name to old Toolbox

* Fix command name

* First attempt at dynamic arguments

* Support nested variable conditions for file rendering in `manifest.yml`

* Use Swift 6 language mode

* Remove `Mutex`

* swift format

* Remove redundant calls

* Group mandatory options in help view

* Try using `ubuntu-22.04` in CI

* Try using `latest` Swift in CI

* Add basic tests

* Update Dockerfile

* Update README

* Fix default value to `false` for top level of nested variables

* Fix nested variables bug

* Update README

* First attempt at asking unresolved variables to user

* Add `-n` flag

* Refactor `which` and add more docs

* Dynamically get Toolbox version via Homebrew

* Add test for issue `which` fails on macOS #403

* Remove Ubuntu CodeQL job

* Use new Swift Regex API

* Add unit testing in CI

* Try fixing CI

* Fix CI

* Move entrypoint to `Vapor`

* Improve documentation

* Make option description optional

* Improve documentation

* Add centered prints

* Add `--manifest` flag to specify manifest file path

* Add `--json` flag

* Make the linter happy

* Make it run on Musl

* Rename `--json` to `--dump-variables`

* Improve `which` test

* Update README.md

Co-authored-by: Tim Condon <0xTim@users.noreply.github.com>

* Update Sources/VaporToolbox/Util/PrintUtilities.swift

Co-authored-by: Tim Condon <0xTim@users.noreply.github.com>

* Remove custom `TemplateManifest.Variable` equality operator

* Handle UTF-8 encoding error when dumping JSON

* Add short lowercase flag for `--template`

* Remove unused `import`s

* Add again uppercase short flag for `--template`

* Update Package.swift

Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>

* Update README.md

Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>

* Update README.md

Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>

* Update New.swift

Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>

* Update New.swift

Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>

* Update New.swift

Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>

* Update New.swift

Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>

* Update TemplateManifest.swift

Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>

* Update TemplateRenderer.swift

Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>

* Update TemplateRenderer.swift

Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>

* Update TemplateRenderer.swift

Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>

* Update PrintUtilities.swift

Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>

* Update PrintUtilities.swift

Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>

* Update PrintUtilities.swift

Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>

* Update PrintUtilities.swift

Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>

* Update PrintUtilities.swift

Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>

* Update Vapor.swift

Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>

* Update PrintUtilities.swift

Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>

* Fix typo

* Remove uppercase template flag

* Add Android and Windows to CI

* Remove CodeQL

* Try fixing Android

* Remove MongoDB integration tests

* Enable MySQL Linux integration in CI

* Disable MySQL Linux integration in CI

* Fix typo in README

* Fix bug in first commit

* Try fixing Windows build

* Remove Windows CI

---------

Co-authored-by: Tim Condon <0xTim@users.noreply.github.com>
Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
2025-03-17 20:25:05 +00:00

45 lines
1.3 KiB
Swift

// swift-tools-version:6.0
import PackageDescription
let package = Package(
name: "toolbox",
platforms: [
.macOS(.v13)
],
products: [
.executable(name: "vapor", targets: ["VaporToolbox"])
],
dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.5.0"),
.package(url: "https://github.com/hummingbird-project/swift-mustache.git", from: "2.0.0"),
.package(url: "https://github.com/jpsim/Yams.git", from: "5.3.1"),
],
targets: [
.executableTarget(
name: "VaporToolbox",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "Mustache", package: "swift-mustache"),
.product(name: "Yams", package: "yams"),
],
swiftSettings: swiftSettings
),
.testTarget(
name: "VaporToolboxTests",
dependencies: [
.target(name: "VaporToolbox")
],
resources: [
.copy("manifest.yml")
],
swiftSettings: swiftSettings
),
]
)
var swiftSettings: [SwiftSetting] {
[
.enableUpcomingFeature("ExistentialAny")
]
}