* Looks for `$GITHUB_TOKEN` env var, and if not found, tries to run `gh
auth token` to get the token from the GitHub CLI.
* Made a conditional `start` method for the bar, which was previously
missed.
Tools are now stored in the `~/.pesde/bin/.tool_storage` directory, in
order to prevent naming conflicts with other tool linkers. An old
tool_storage directory gets migrated to the new path if present.
* Made bar related conditional operations get constructed by a
`makeCondBar` which returns a table of functions to conditionally handle
a progress bar.
* Moved progress bar boolean out of function args for `installTool` into
global state.
Formerly, we used metatables to get custom `Option` and `Result` objects
which were difficult to type properly, leading to a lot of `unknown` and
`any` casts.
This refactor fixes it by making extensions opt-in, where we import the
extension methods separately from the original implementations, thereby
allowing us to not have to typecast things everywhere.
Previously, we assumed that the tools followed semver, and hence parsed
their versions for comparison. Some tools may not follow semver, and we
should not impose such a requirement as a toolchain management library.
Therefore, we now only check if the requested version string matches an
asset version tag. In order to ensure backwards compatibility, we strip
the leading `v` from the version if present.
* Also breaks down `GithubReleases` into array of `GithubRelease` type
* Adds a `Custom` operation type for internal `Github` class, allowing
user to mention custom request data
* Fix for tools which don't already provide zips with binaries that have
their executable bit set, by executing chmod before attempting to run.
* Uses a different tool_storage structure to prevent changing the tool
name and causing confusion for tools which change their help menu
binary name based on the current exe name.
* Decompression on windows failed since the `Start-Process` cmdlet exited
immediately after spawning the process. Fixed by including the `-Wait`
argument.
* We were using `unzip` on all platforms, and it does not exist on
Windows. Instead, now we use the `Expand-Archive` cmdlet for
decompression on windows.
* Fixes a bug which caused binary parsing fallbacks to not work as
expected, due to a field unexpectedly being `None`.
* Fixed lint error to do with warn being potentially none by defining
our own warn function instead. Also updated fallback binary parsing
fallback warn message to be clearer.
* Fixed decompression error for non-supported artifacts by only
decompressing those we support.
* Adds dev lune scripts to execute tooling in dev env, also a nice way
to dogfood the project.
* Disables all lints in luaurc temporarily, since luau-lsp analysis displays
lint errors even for ignored files for some reason.
* Fixes a few `TypeError`s.
Also does this following:
* Properly types metatable return
* Runs tool after installation, previously the tool would not get
executed post installation
* Further removal of manual alias handling
* Restructures monorepo packages
* Updated pesde manifests with scope and other metadata
* Consolidated all interactive install logic into __call metamethod for
one liner bin re-exports
* Renamed binlib->toolchainlib
* Introduced first real world package - stylua (!!)