Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
bwireman committed Dec 4, 2024
1 parent d50b759 commit df8f158
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 38 deletions.
8 changes: 4 additions & 4 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
gleam 1.6.1
erlang 27.0
nodejs 20.17.0
deno 2.0.0
gleam 1.6.2
erlang 27.1.2
nodejs 22.11.0
deno 2.1.1
52 changes: 26 additions & 26 deletions dist/delay.d.mts
Original file line number Diff line number Diff line change
Expand Up @@ -2,65 +2,65 @@
/**
* Type representing a delayed effect to be lazily evaluated
*/
export type Delay$<MMK, MMJ> = Continue<MMJ, MMK> | Stop<MMK>
export type Delay$<MKH, MKI> = Continue<MKH, MKI> | Stop<MKI>


/**
* Stores an effect to be run later, short circuiting on errors
*/
export function delay_effect<MML, MMM>(func: () => Result<MML, MMM>): Delay$<MML, MMM>
export function delay_effect<MKJ, MKK>(func: () => Result<MKJ, MKK>): Delay$<MKJ, MKK>


/**
* Chains an operation onto an existing delay. The result of the current delay will be lazily passed to `func`
* `func` will not be called if the delay has already returned an error
*/
export function map<MMR, MMS, MMV>(delayed: Delay$<MMR, MMS>, func: (x0: MMR) => Result<MMV, MMS>): Delay$<MMV, MMS>
export function map<MKP, MKQ, MKT>(delayed: Delay$<MKP, MKQ>, func: (x0: MKP) => Result<MKT, MKQ>): Delay$<MKT, MKQ>


/**
* flatten a nested Delay
*/
export function flatten<MNJ, MNK>(delayed: Delay$<Delay$<MNJ, MNK>, MNK>): Delay$<MNJ, MNK>
export function flatten<MLH, MLI>(delayed: Delay$<Delay$<MLH, MLI>, MLI>): Delay$<MLH, MLI>


/**
* Map and then flatten `delayed`
*/
export function flat_map<MNR, MNS, MNV>(
delayed: Delay$<MNR, MNS>,
func: (x0: MNR) => Result<Delay$<MNV, MNS>, MNS>
): Delay$<MNV, MNS>
export function flat_map<MLP, MLQ, MLT>(
delayed: Delay$<MLP, MLQ>,
func: (x0: MLP) => Result<Delay$<MLT, MLQ>, MLQ>
): Delay$<MLT, MLQ>


/**
* Run a delayed effect and get the result
* short-circuiting if any in delay in the chain returns an Error
*/
export function run<MPG, MPH>(delayed: Delay$<MPG, MPH>): Result<MPG, MPH>
export function run<MNE, MNF>(delayed: Delay$<MNE, MNF>): Result<MNE, MNF>


/**
* returns a delay, that joins two delays. If `left` fails `right` will not be run, if either fails the result will be an Error
*/
export function join<MOC, MOD, MOG, MOH>(
left: Delay$<MOC, MOD>,
right: Delay$<MOG, MOH>
): Delay$<[MOC, MOG], [Option$<MOD>, Option$<MOH>]>
export function join<MMA, MMB, MME, MMF>(
left: Delay$<MMA, MMB>,
right: Delay$<MME, MMF>
): Delay$<[MMA, MME], [Option$<MMB>, Option$<MMF>]>


/**
* Returns a new Delay that will be re-attempted `retries` times with `delay` ms in-between
* Note: JS uses busy waiting
*/
export function retry<MOO, MOP>(delayed: Delay$<MOO, MOP>, retries: number, delay: number): Delay$<MOO, MOP>
export function retry<MMM, MMN>(delayed: Delay$<MMM, MMN>, retries: number, delay: number): Delay$<MMM, MMN>


/**
* Returns a new Delay that will be re-attempted `retries` times with `delay` ms in-between
* Note: JS uses busy waiting
*/
export function retry_with_backoff<MOU, MOV>(delayed: Delay$<MOU, MOV>, retries: number): Delay$<MOU, MOV>
export function retry_with_backoff<MMS, MMT>(delayed: Delay$<MMS, MMT>, retries: number): Delay$<MMS, MMT>


/**
Expand All @@ -73,13 +73,13 @@ export function drain(delayed: Delay$<any, any>): undefined
/**
* Run every effect in sequence and get their results
*/
export function every<MPX, MPY>(effects: List<Delay$<MPX, MPY>>): List<Result<MPX, MPY>>
export function every<MNV, MNW>(effects: List<Delay$<MNV, MNW>>): List<Result<MNV, MNW>>


/**
* Repeat a Delay and return the results in a list
*/
export function repeat<MPQ, MPR>(delayed: Delay$<MPQ, MPR>, repetition: number): List<Result<MPQ, MPR>>
export function repeat<MNO, MNP>(delayed: Delay$<MNO, MNP>, repetition: number): List<Result<MNO, MNP>>


/**
Expand All @@ -100,24 +100,24 @@ export function any(effects: List<Delay$<any, any>>): boolean
* Attempt multiple Delays until one returns an Ok
* unlike `any/1` this will short circuit on the first Ok
*/
export function fallthrough<MRA, MRB>(effects: List<Delay$<MRA, MRB>>): Result<MRA, MRB>
export function fallthrough<MOY, MOZ>(effects: List<Delay$<MOY, MOZ>>): Result<MOY, MOZ>

export class Continue<MMJ, MMK> extends CustomType {
export class Continue<MKH, MKI> extends CustomType {
constructor(effect: () => Result<any, any>)
effect(): Result<any, any>
}

export class Stop<MMK> extends CustomType {
constructor(err: MMK)
err: MMK
export class Stop<MKI> extends CustomType {
constructor(err: MKI)
err: MKI
}

export class Result<T, E> extends CustomType {
static isResult(data: unknown): boolean
isOk(): boolean
}

export type Option$<FV> = Some<FV> | None
export type Option$<FQ> = Some<FQ> | None

export class List<T> implements any {
head: T
Expand All @@ -136,9 +136,9 @@ export class CustomType {
}): this
}

export class Some<FV> extends CustomType {
constructor(argument$0: FV)
0: FV
export class Some<FQ> extends CustomType {
constructor(argument$0: FQ)
0: FQ
}

export class None extends CustomType {}
3 changes: 3 additions & 0 deletions dist/delay.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ var unicode_whitespaces = [
"\u2029"
// Paragraph separator
].join("")
var trim_start_regex = new RegExp(`^[${unicode_whitespaces}]*`)
var trim_end_regex = new RegExp(`[${unicode_whitespaces}]*$`)
var trim_regex = new RegExp(`^[${unicode_whitespaces}]*(.*?)[${unicode_whitespaces}]*$`)

function length_loop(loop$list, loop$count) {
while (true) {
Expand Down
4 changes: 2 additions & 2 deletions manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ packages = [
{ name = "filepath", version = "1.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "filepath", source = "hex", outer_checksum = "67A6D15FB39EEB69DD31F8C145BB5A421790581BD6AA14B33D64D5A55DBD6587" },
{ name = "gleam_hexpm", version = "1.1.0", build_tools = ["gleam"], requirements = ["birl", "gleam_stdlib"], otp_app = "gleam_hexpm", source = "hex", outer_checksum = "D32439FD6AD683FE1094922737904EC2091E2D7B1F236AD23815935694A5221A" },
{ name = "gleam_json", version = "2.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_json", source = "hex", outer_checksum = "0A57FB5666E695FD2BEE74C0428A98B0FC11A395D2C7B4CDF5E22C5DD32C74C6" },
{ name = "gleam_stdlib", version = "0.43.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "69EF22E78FDCA9097CBE7DF91C05B2A8B5436826D9F66680D879182C0860A747" },
{ name = "gleam_stdlib", version = "0.45.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "206FCE1A76974AECFC55AEBCD0217D59EDE4E408C016E2CFCCC8FF51278F186E" },
{ name = "gleamsver", version = "1.0.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleamsver", source = "hex", outer_checksum = "EA74FDC66BF15CB2CF4F8FF9B6FA01D511712EE2B1F4BE0371076ED3F685EEAE" },
{ name = "gleeunit", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "F7A7228925D3EE7D0813C922E062BFD6D7E9310F0BEE585D3A42F3307E3CFD13" },
{ name = "gleither", version = "2.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleither", source = "hex", outer_checksum = "86606790899097D8588C0F70C654D9626C634AF14E18F618F4C351FEC6FDA773" },
{ name = "go_over", version = "2.2.1", build_tools = ["gleam"], requirements = ["birl", "filepath", "gleam_hexpm", "gleam_json", "gleam_stdlib", "gleamsver", "shellout", "simplifile", "tom", "yamerl"], otp_app = "go_over", source = "hex", outer_checksum = "54912703439B30EF8769EA7B5912B9A1405D5D745EACAA7C06305901C6F43CE8" },
{ name = "ranger", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "ranger", source = "hex", outer_checksum = "1566C272B1D141B3BBA38B25CB761EF56E312E79EC0E2DFD4D3C19FB0CC1F98C" },
{ name = "ranger", version = "1.3.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "ranger", source = "hex", outer_checksum = "B8F3AFF23A3A5B5D9526B8D18E7C43A7DFD3902B151B97EC65397FE29192B695" },
{ name = "shellout", version = "1.6.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "shellout", source = "hex", outer_checksum = "E2FCD18957F0E9F67E1F497FC9FF57393392F8A9BAEAEA4779541DE7A68DD7E0" },
{ name = "simplifile", version = "2.2.0", build_tools = ["gleam"], requirements = ["filepath", "gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "0DFABEF7DC7A9E2FF4BB27B108034E60C81BEBFCB7AB816B9E7E18ED4503ACD8" },
{ name = "tom", version = "1.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "tom", source = "hex", outer_checksum = "228E667239504B57AD05EC3C332C930391592F6C974D0EFECF32FFD0F3629A27" },
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@


"@cross/test@npm:@jsr/cross__test":
version "0.0.9"
resolved "https://npm.jsr.io/~/11/@jsr/cross__test/0.0.9.tgz#93F4D173201B1BE0B5632FE89545E9E0D7062EE1"
integrity sha512-zwDSXQHw8n6k/gBj1Q67Td34Lb1PfkzLTggXnNZzcRO9SxcdAlzyOKFCF62kTFM7ZjVPqYvqu2gHzMLtj6cayw==
version "0.0.10"
resolved "https://npm.jsr.io/~/11/@jsr/cross__test/0.0.10.tgz#19705E86199028D116259EE7C9C19A5CF822931F"
integrity sha512-FjyJN1OxI6lPZGOYK3/iGuDzljPYUZN2Cm2eHaAHIvGPEYYBYLH4VI5ww0LDjM9GdXymitPh6PLhP8dwbNJGFw==
dependencies:
"@jsr/cross__runtime" "^1.0.0"

Expand Down Expand Up @@ -845,9 +845,9 @@ type-fest@^0.20.2:
integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==

typescript@^5.3.3:
version "5.6.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b"
integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==
version "5.7.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.2.tgz#3169cf8c4c8a828cde53ba9ecb3d2b1d5dd67be6"
integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==

uri-js@^4.2.2:
version "4.4.1"
Expand Down

0 comments on commit df8f158

Please sign in to comment.