Skip to content

Commit

Permalink
update glint
Browse files Browse the repository at this point in the history
  • Loading branch information
TanklesXL committed Jun 21, 2024
1 parent be8086e commit 4648c21
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion gleam.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ internal_modules = ["gladvent/internal/*"]
gleam = "~> 1.0"

[dependencies]
glint = "1.0.0-rc3"
glint = "1.0.0-rc4"
simplifile = "~> 1.0"
argv = "~> 1.0"
shellout = "~> 1.6"
Expand Down
8 changes: 4 additions & 4 deletions manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ packages = [
{ name = "gleam_erlang", version = "0.25.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_erlang", source = "hex", outer_checksum = "054D571A7092D2A9727B3E5D183B7507DAB0DA41556EC9133606F09C15497373" },
{ name = "gleam_json", version = "1.0.1", build_tools = ["gleam"], requirements = ["gleam_stdlib", "thoas"], otp_app = "gleam_json", source = "hex", outer_checksum = "9063D14D25406326C0255BDA0021541E797D8A7A12573D849462CAFED459F6EB" },
{ name = "gleam_otp", version = "0.10.0", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_stdlib"], otp_app = "gleam_otp", source = "hex", outer_checksum = "0B04FE915ACECE539B317F9652CAADBBC0F000184D586AAAF2D94C100945D72B" },
{ name = "gleam_package_interface", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_json", "gleam_stdlib"], otp_app = "gleam_package_interface", source = "hex", outer_checksum = "52A721BCA972C8099BB881195D821AAA64B9F2655BECC102165D5A1097731F01" },
{ name = "gleam_package_interface", version = "1.1.0", build_tools = ["gleam"], requirements = ["gleam_json", "gleam_stdlib"], otp_app = "gleam_package_interface", source = "hex", outer_checksum = "CF3BFC5D0997750D9550D8D73A90F4B8D71C6C081B20ED4E70FFBE1E99AFC3C2" },
{ name = "gleam_stdlib", version = "0.38.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "663CF11861179AF415A625307447775C09404E752FF99A24E2057C835319F1BE" },
{ name = "glearray", version = "0.2.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "glearray", source = "hex", outer_checksum = "9C207E05F38D724F464FA921378DB3ABC2B0A2F5821116D8BC8B2CACC68930D5" },
{ name = "gleeunit", version = "1.1.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "72CDC3D3F719478F26C4E2C5FED3E657AC81EC14A47D2D2DEBB8693CA3220C3B" },
{ name = "glint", version = "1.0.0-rc3", build_tools = ["gleam"], requirements = ["gleam_community_ansi", "gleam_community_colour", "gleam_stdlib", "snag"], otp_app = "glint", source = "hex", outer_checksum = "0252CB1615264316BD448E5425A58A56DF43BAC02C7E12A1585A928FC6B3B3F1" },
{ name = "gleeunit", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "F7A7228925D3EE7D0813C922E062BFD6D7E9310F0BEE585D3A42F3307E3CFD13" },
{ name = "glint", version = "1.0.0-rc4", build_tools = ["gleam"], requirements = ["gleam_community_ansi", "gleam_community_colour", "gleam_stdlib", "snag"], otp_app = "glint", source = "hex", outer_checksum = "7D983CF54CEA5F31B9F2143E1BD42ACC958B0EA74957F4E1CD3BE2B50B4B6F48" },
{ name = "parallel_map", version = "2.0.0", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_otp", "gleam_stdlib"], otp_app = "parallel_map", source = "hex", outer_checksum = "653714A9FD63EACD1A9D0A6582A972B0EC109AE275CDDD2E99CFC3DFAFAB9225" },
{ name = "repeatedly", version = "2.1.1", build_tools = ["gleam"], requirements = [], otp_app = "repeatedly", source = "hex", outer_checksum = "38808C3EC382B0CD981336D5879C24ECB37FCB9C1D1BD128F7A80B0F74404D79" },
{ name = "shellout", version = "1.6.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "shellout", source = "hex", outer_checksum = "E2FCD18957F0E9F67E1F497FC9FF57393392F8A9BAEAEA4779541DE7A68DD7E0" },
Expand All @@ -33,7 +33,7 @@ gleam_otp = { version = "~> 0.4" }
gleam_package_interface = { version = "~> 1.0" }
gleam_stdlib = { version = "~> 0.36 or ~> 1.0" }
gleeunit = { version = "~> 1.0" }
glint = { version = "1.0.0-rc3" }
glint = { version = "1.0.0-rc4" }
parallel_map = { version = ">= 2.0.0 and < 3.0.0" }
shellout = { version = "~> 1.6" }
simplifile = { version = "~> 1.0" }
Expand Down
7 changes: 2 additions & 5 deletions src/gladvent.gleam
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import argv
import gladvent/internal/cmd
import gladvent/internal/cmd/new
import gladvent/internal/cmd/run
import gleam/io
Expand All @@ -15,13 +14,11 @@ pub fn main() {
glint.new()
|> glint.path_help(
[],
"gladvent is an advent of code runner and generator for gleam.
Please use either the 'run' or 'new' commands.",
"gladvent is an advent of code runner and generator for gleam. Please use either the 'run' or 'new' commands.",
)
|> glint.with_name("gladvent")
|> glint.as_module
|> glint.group_flag(at: [], of: cmd.year_flag())
|> glint.with_min_first_column_width(10)
|> glint.pretty_help(glint.default_pretty_help())
|> glint.add(at: ["new"], do: new.new_command())
|> glint.group_flag(at: ["run"], of: run.timeout_flag())
Expand Down
5 changes: 3 additions & 2 deletions src/gladvent/internal/runners.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,9 @@ pub fn get_day(

use runner_param_type <- result.try(case parse {
Error(Nil) -> Ok(string)
Ok(package_interface.Function(parameters: [param], return: return, ..)) if param.type_
== string -> Ok(return)
Ok(package_interface.Function(parameters: [param], return: return, ..))
if param.type_ == string
-> Ok(return)
_ ->
Error(ParseFunctionInvalid(
"parse function must have 1 input parameter of type String",
Expand Down

0 comments on commit 4648c21

Please sign in to comment.