Swiftpack.co - Package - vapor/console-kit

Github

link
Stars: 189

Dependencies

Used By

Total: 0

Releases

ConsoleKit 4.0.0 Beta 2 - 2019-12-09 14:22:21

  • Removed CommandConfiguration struct (#124)

Commands struct gained the use(_:as:) method previously on CommandConfiguration.

  • Allow checking to see if an Optional is present in command call (#125)
  • Enabled test discovery on Linux (#127))

ConsoleKit 4.0.0 Beta 1 - 2019-10-24 18:55:04

  • CommandError is now an enum. (#122)
  • ConsoleLogger now stores the logging bootstrap's label during creation. (#123)

Notes: This change allows ConsoleLogger to print the label used for its creation when at .trace log level.

ConsoleKit v4.0.0-alpha.3 - 2019-10-16 22:34:56

Maybe You Meant 'Beta'?

No, this isn't supposed to be a beta release; but we do have suggestions! Command suggestions at that! If pass in a command that doesn't exist, ConsoleKit will automatically check to see if there are any commands with a similar name and suggest that maybe you meant one of them instead.

A big thanks to @tkrajacic for implementing this feature!

ConsoleKit 4.0.0 Alpha 2.1 - 2019-08-28 15:52:45

  • Added projectedValue to @Argument, @Option, and @Flag property wrappers. (#118)

Notes: This allows for the property wrapper backing for these signature arguments to be accessed from the command. To access, prefix the argument name with $.

ConsoleKit 4.0.0 Alpha 2 - 2019-08-27 22:19:07

  • Command signatures are now declared using property wrappers (#116, #115)

Here's an example command signature using the new API:

struct Cowsay: Command {
    struct Signature: CommandSignature {
        @Argument(name: "message", help: "What the cow should say") 
        var message: String

        @Option(name: "eyes", short: "e", help: "Change the cow's eyes")
        var eyes: String?

        @Option(name: "tongue", short: "t", help: "Change the cow's tongue")
        var tongue: String?

        @Flag(name: "borg", help: "uses == for cow's eyes")
        var borg: Bool

        init() { }
    }

    let help = "Prints an ASCII cow with a message"

    func run(context: CommandContext, signature: Signature) throws {
        print(signature.message) // String
        print(signature.eyes) // String?
        print(signature.tongue) // String?
        print(signature.borg) // Bool
    }
}
  • New type-erased protocols for Command and Group allow for dynamic commands to be implemented (#115, #113)
struct DynamicCommand: AnyCommand {
    var help: String = ""

    func run(using context: inout CommandContext) throws {
        XCTAssertEqual(context.input.arguments, ["true", "--count", "42"])
    }
}

ConsoleKit 4.0.0 Alpha 1 - 2019-05-29 16:03:36

More information on Vapor 4 alpha releases:

https://medium.com/@codevapor/vapor-4-alpha-1-releases-begin-94a4bc79dd9a

API Docs:

https://api.vapor.codes/console-kit/master/ConsoleKit/index.html

Console 3.1.1 - 2019-03-22 13:22:34

Fixed

  • Only extract a short flag if the raw flag string is -<short> (https://github.com/vapor/console/pull/94)

Console 3.1.0 - 2018-11-08 20:52:13

New:

  • Created CustomActivity activity indicator type. this lets you easily create custom activity indicators with a series of characters that are looped over for the animation.
  • Added a customActivity method to the Console protocol, which initializes a new CustomActivity instance.
let indicator = context.console.customActivity(frames: ["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"])
_ = try indicator.start(on: context.container)
// Do something that takes a long time.
indicator.succeed()

Console 3.0.4 - 2018-11-06 14:35:45

Only logs command help when there are errors in command usage, no longer logs errors in the command execution.

Console 3.0.3 - 2018-10-30 21:32:20

Fixed:

  • Fixes an issue where ephemeral messages would not clear correctly. (#80)

Console 2.3.2 - 2018-05-30 01:29:03

Fixed:

  • Eliminate Swift 4.1 deprecation warnings.

Console 3.0.2 - 2018-05-02 20:30:53

New:

  • -e short flag now supported for setting environment.

Console 3.0.1 - 2018-04-20 02:28:42

Fixed:

  • Console.output(...) now correctly defaults to printing a newline (#70).

Console 3.0.0 - 2018-04-05 20:05:53

💻 Console 3.0 (APIs for creating interactive CLI tools) is here!

Getting Started: https://docs.vapor.codes/3.0/console/getting-started/ https://docs.vapor.codes/3.0/command/getting-started/ https://docs.vapor.codes/3.0/logging/getting-started/

API Docs: https://api.vapor.codes/console/latest/Console https://api.vapor.codes/console/latest/Command https://api.vapor.codes/console/latest/Logging


Changes since final pre-release.

New:

  • Added ConsoleText type for creating collections of differently styled strings. This makes it possible to output text with interpolated styles in one call to console.output(_:)
  • Cleaned up the loading and progress bars, now using an ActivityIndicator protocol.
  • Added lots of missing docblocks, made some APIs internal where possible to reduce API surface.

Milestone: 3.0.0

Console 3.0.0 RC 2.2 - 2018-03-27 15:29:14

New:

Fixed:

  • Makes console.confirm non-throwing

API Docs: https://api.vapor.codes/console/3.0.0-rc.2.2/Command/

Milestone: 3.0.0-rc.2.2

Console 3.0.0 RC 2.1.1 - 2018-03-27 00:10:19

New:

  • Adds support for -y, --yes and -n, --no flags for auto-answering console confirmations.

Console 3.0.0 RC 2.1 - 2018-03-25 04:06:16

New:

  • Adds a commandLine settable computed property to Environment for parsing the environment's CLI arguments.

API Docs: https://api.vapor.codes/console/3.0.0-rc.2.1/Console/ https://api.vapor.codes/console/3.0.0-rc.2.1/Command/

Milestone: 3.0.0-rc.2.1

Console 3.0.0 RC 2.0.1 - 2018-03-22 00:41:56

Fixed:

  • Synchronizes printed log output to avoid garbled messages.

Console 3.0.0 RC 2 - 2018-03-21 20:28:23

New:

  • Vapor is now running on Swift NIO!

Fixed:

  • Fixed an issue parsing short flags.

Milestone

Console 3.0.0 RC 1 - 2018-02-23 04:09:53

Console 3.0.0 Beta 2 - 2018-02-22 01:11:17

Fixed:

  • Update to latest core package.
  • Update error structs.

Console 3.0.0 Beta 1.1 - 2018-02-15 01:00:50

Console 3.0.0 Beta 1 - 2018-02-10 00:51:43

Console 2.3.1 - 2017-12-21 01:18:47

Fixed:

  • Remove Swift warnings.

Milestone

Console 2.3.0 - 2017-11-15 01:21:43

New:

  • Adds "short" options using a single hyphen. Add short: to the option's init.

Fixed:

  • Fixed Swift 4 warnings.
  • Fixed an issue with group arguments.
  • Fixed a typo.

Milestone

Console 2.2.0 - 2017-08-10 00:03:56

New:

  • Preliminary Swift 4 support.

Milestone

Console 2.1 - 2017-05-25 16:15:58

New:

  • --help layout has been redone.
  • Push and pop ephemeral state to track and clear text printed to the console.

Fixed:

  • Loading bar messages are now truncated if the text is too long.

Milestone

Console 2.0 - 2017-05-17 12:34:28

🎉

Console 2.0 refines some of the original ideas of console, adds a few new conveniences, and some handy bits of functionality like secure entry.

Check out the full diff here

Console 2.0 Beta 4 - 2017-04-19 12:32:59

New:

  • Groups can have a fallback

#34

Console 2.0 Beta 4 - 2017-04-10 13:53:57

New:

  • secure entry