@goodbyenjn/utils 26.2.0 → 26.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/remeda.js CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as t$84, $n as n$4, $t as e$24, A as awaitAll, An as e$9, Ar as t$4, At as t$62, B as t$89, Bn as e$3, Bt as t$53, C as toIteratorAsync, Cn as e$16, Cr as e, Ct as t$68, D as concurrency, Dn as e$12, Dr as t$6, Dt as n$13, E as buffer, En as e$13, Er as t$7, Et as t$65, F as isFunction, Fn as e$4, Fr as t$59, Ft as t$58, G as e$33, Gn as n$7, Gt as t$50, H as n$25, Hn as t$32, Ht as t$51, I as hasOwnProperty, In as t$31, It as e$28, J as n$22, Jn as t$24, Jt as n$12, K as t$87, Kn as t$26, Kt as e$25, L as t$91, Ln as n$9, Lt as t$57, M as toArrayAsync, Mn as e$7, Mr as t$2, Mt as t$60, N as compose, Nn as e$6, Nr as t$1, Nt as e$30, O as throttle, On as e$11, Or as t$5, Ot as t$64, P as isPromiseLike, Pn as e$5, Pr as t, Pt as e$29, Q as t$85, Qn as n$5, Qt as n$11, R as t$90, Rn as r$4, Rt as t$56, S as serializeAsync, Sn as e$17, Sr as t$10, St as e$31, T as chunkAsync, Tn as e$14, Tr as t$8, Tt as t$66, U as n$24, Un as t$28, Ut as e$27, V as n$26, Vn as n$8, Vt as t$52, W as t$88, Wn as t$27, Wt as e$26, X as n$21, Xn as n$6, Xt as a, Y as t$86, Yn as t$23, Yt as t$48, Z as n$20, Zn as t$22, Zt as t$47, _ as uniqueWithAsync, _n as t$34, _r as n$1, _t as n$16, a as forEachAsync, an as t$43, ar as n$2, at as t$80, b as uniqueAsync, bn as e$19, br as t$11, bt as t$70, c as everyAsync, cn as t$40, cr as t$16, ct as t$76, d as intersectionWithAsync, dn as t$37, dr as t$13, dt as t$73, en as t$46, er as n$3, et as t$83, f as intersectionByAsync, fn as t$36, fr as r$2, ft as t$72, g as differenceAsync, gn as e$21, gr as t$12, gt as n$17, h as differenceByAsync, hn as e$22, hr as e$2, ht as n$18, i as peekAsync, in as t$77, ir as r$3, it as n$19, j as executeAsync, jn as e$8, jr as t$3, jt as t$61, k as accumulateAsync, kn as e$10, kr as n, kt as t$63, l as mapAsync, ln as t$39, lr as t$15, lt as t$75, m as differenceWithAsync, mn as e$23, mr as r$1, mt as t$71, n as dropAsync, nn as t$44, nr as t$20, nt as t$81, o as reduceAsync, on as t$42, or as t$18, ot as t$79, p as intersectionAsync, pn as t$35, pr as t$29, pt as e$32, q as n$23, qn as t$25, qt as t$49, r as concatAsync, rn as n$10, rr as t$19, rt as r$5, s as findAsync, sn as t$41, sr as t$17, st as t$78, t as takeAsync, tn as t$45, tr as t$21, tt as t$82, u as flatMapAsync, un as t$38, ur as t$14, ut as t$74, v as someAsync, vn as t$33, vr as r, vt as n$15, w as flattenAsync, wn as e$15, wr as t$9, wt as t$67, x as filterAsync, xn as e$18, xr as e$1, xt as t$69, y as uniqueByAsync, yn as e$20, yr as t$55, yt as n$14, z as e$34, zn as t$30, zt as t$54 } from "./chunks/chunk-b970a8d0.js";
1
+ import { $ as firstBy, $n as sortedIndexWith, $t as mapKeys, A as divide, An as purry, Ar as toTitleCase, At as isDefined, B as every, Bn as sample, Br as values, Bt as isObjectType, C as defaultTo, Cn as pick, Cr as toArrayP, Ct as intersectionWithP, D as differenceP, Dn as product, Dr as toKebabCase, Dt as isBoolean, E as differenceByP, En as piped, Er as toIteratorP, Et as isBigInt, F as dropLastWhile, Fn as rankBy, Fr as uniqueBy, Ft as isNonNull, G as filter, Gn as shuffle, Gr as isFunction, Gt as isString, H as evolve, Hn as serializeP, Hr as zip, Ht as isPromise, I as dropP, In as reduce, Ir as uniqueByP, It as isNonNullish, J as findIndex, Jn as someP, Jt as join, K as filterP, Kn as sliceString, Kr as hasOwnProperty, Kt as isSymbol, L as dropWhile, Ln as reduceP, Lr as uniqueP, Lt as isNot, M as drop, Mn as randomInteger, Mr as truncate, Mt as isEmptyish, N as dropFirstBy, Nn as randomString, Nr as uncapitalize, Nt as isError, O as differenceWith, On as prop, Or as toLowerCase, Ot as isDate, P as dropLast, Pn as range, Pr as unique, Pt as isIncludedIn, Q as first, Qn as sortedIndexBy, Qt as map, R as endsWith, Rn as reverse, Rr as uniqueWith, Rt as isNullish, S as debounce, Sn as peekP, Sr as toArray, St as intersectionWith, T as differenceBy, Tn as pipe, Tr as toIterator, Tt as isArray, U as execute, Un as set, Ur as zipWith, Ut as isShallowEqual, V as everyP, Vn as serialize, Vr as when, Vt as isPlainObject, W as executeP, Wn as setPath, Wr as isPromiseLike, Wt as isStrictEqual, X as findLastIndex, Xn as sortBy, Xt as last, Y as findLast, Yn as sort, Yt as keys, Z as findP, Zn as sortedIndex, Zt as length, _ as concatP, _n as partialBind, _r as takeP, _t as indexBy, a as allPass, an as meanBy, ar as splitWhen, at as floor, b as constant, bn as pathOr, br as throttle, bt as intersectionByP, c as buffer, cn as mergeAll, cr as subtract, ct as forEachP, d as chunk, dn as nthBy, dr as swapIndices, dt as funnel, en as mapP, er as sortedLastIndex, et as flat, f as chunkP, fn as objOf, fr as swapProps, ft as groupBy, g as concat, gn as only, gr as takeLastWhile, gt as identity, h as compose, hn as once, hr as takeLast, ht as hasSubObject, i as addProp, in as mean, ir as splitAt, it as flattenP, j as doNothing, jn as randomBigInt, jr as toUpperCase, jt as isEmpty, k as differenceWithP, kn as pullObject, kr as toSnakeCase, kt as isDeepEqual, l as capitalize, ln as mergeDeep, lr as sum, lt as fromEntries, m as clone, mn as omitBy, mr as takeFirstBy, mt as hasAtLeast, n as accumulateP, nn as mapValues, nr as splice, nt as flatMapP, o as anyPass, on as median, or as startsWith, ot as forEach, p as clamp, pn as omit, pr as take, pt as groupByProp, q as find, qn as some, qt as isTruthy, r as add, rn as mapWithFeedback, rr as split, rt as flatten, s as awaitAll, sn as merge, sr as stringToPath, st as forEachObj, t as accumulate, tn as mapToObj, tr as sortedLastIndexBy, tt as flatMap, u as ceil, un as multiply, ur as sumBy, ut as fromKeys, v as concurrency, vn as partialLastBind, vr as takeWhile, vt as intersection, w as difference, wn as pickBy, wr as toCamelCase, wt as invert, x as countBy, xn as peek, xr as times, xt as intersectionP, y as conditional, yn as partition, yr as tap, yt as intersectionBy, z as entries, zn as round, zr as uniqueWithP, zt as isNumber } from "./chunks/chunk-b61db0a7.js";
2
2
 
3
- export { accumulateAsync as accumulateP, t as add, t$1 as addProp, t$2 as allPass, t$3 as anyPass, awaitAll, buffer, t$4 as capitalize, n as ceil, t$5 as chunk, chunkAsync as chunkP, t$6 as clamp, t$7 as clone, compose, t$8 as concat, concatAsync as concatP, concurrency, t$9 as conditional, e as constant, t$10 as countBy, e$1 as debounce, t$11 as defaultTo, r as difference, differenceByAsync as differenceByP, differenceAsync as differenceP, n$1 as differenceWith, differenceWithAsync as differenceWithP, t$12 as divide, e$2 as doNothing, r$1 as drop, r$2 as dropFirstBy, t$13 as dropLast, t$14 as dropLastWhile, dropAsync as dropP, t$15 as dropWhile, t$16 as endsWith, t$17 as entries, everyAsync as everyP, t$18 as evolve, executeAsync as executeP, n$2 as filter, filterAsync as filterP, r$3 as find, t$19 as findIndex, t$20 as findLast, t$21 as findLastIndex, findAsync as findP, n$3 as first, n$4 as firstBy, n$5 as flat, t$22 as flatMap, flatMapAsync as flatMapP, flattenAsync as flattenP, n$6 as floor, t$23 as forEach, t$24 as forEachObj, forEachAsync as forEachP, t$25 as fromEntries, t$26 as fromKeys, n$7 as funnel, t$27 as groupBy, t$28 as groupByProp, t$29 as hasAtLeast, hasOwnProperty, n$8 as hasSubObject, e$3 as identity, t$30 as indexBy, r$4 as intersection, intersectionByAsync as intersectionByP, intersectionAsync as intersectionP, n$9 as intersectionWith, intersectionWithAsync as intersectionWithP, t$31 as invert, e$4 as isArray, e$5 as isBigInt, e$6 as isBoolean, e$7 as isDate, t$32 as isDeepEqual, e$8 as isDefined, e$9 as isEmpty, e$10 as isEmptyish, e$11 as isError, isFunction, e$12 as isIncludedIn, e$13 as isNonNull, e$14 as isNonNullish, e$15 as isNot, e$16 as isNullish, e$17 as isNumber, e$18 as isObjectType, e$19 as isPlainObject, e$20 as isPromise, isPromiseLike, t$33 as isShallowEqual, t$34 as isStrictEqual, e$21 as isString, e$22 as isSymbol, e$23 as isTruthy, t$35 as join, t$36 as keys, t$37 as last, t$38 as length, t$39 as map, t$40 as mapKeys, mapAsync as mapP, t$41 as mapToObj, t$42 as mapValues, t$43 as mapWithFeedback, n$10 as mean, t$44 as meanBy, t$45 as median, t$46 as merge, e$24 as mergeAll, n$11 as mergeDeep, t$47 as multiply, a as nthBy, t$48 as objOf, n$12 as omit, t$49 as omitBy, e$25 as once, t$50 as only, e$26 as partialBind, e$27 as partialLastBind, t$51 as partition, t$52 as pathOr, t$53 as pick, t$54 as pickBy, t$55 as pipe, t$56 as piped, t$57 as product, e$28 as prop, t$58 as pullObject, t$59 as purry, e$29 as randomBigInt, e$30 as randomInteger, t$60 as randomString, t$61 as range, t$62 as rankBy, t$63 as reduce, reduceAsync as reduceP, t$64 as reverse, n$13 as round, t$65 as sample, serializeAsync as serializeP, t$66 as set, t$67 as setPath, t$68 as shuffle, e$31 as sliceString, someAsync as someP, t$69 as sort, t$70 as sortBy, n$14 as sortedIndex, n$15 as sortedIndexBy, n$16 as sortedIndexWith, n$17 as sortedLastIndex, n$18 as sortedLastIndexBy, t$71 as splice, e$32 as split, t$72 as splitAt, t$73 as splitWhen, t$74 as startsWith, t$75 as stringToPath, t$76 as subtract, t$77 as sum, t$78 as sumBy, t$79 as swapIndices, t$80 as swapProps, n$19 as take, r$5 as takeFirstBy, t$81 as takeLast, t$82 as takeLastWhile, takeAsync as takeP, t$83 as takeWhile, t$84 as tap, peekAsync as tapP, throttle, t$85 as times, toArrayAsync as toArrayP, n$20 as toCamelCase, toIteratorAsync as toIteratorP, n$21 as toKebabCase, t$86 as toLowerCase, n$22 as toSnakeCase, n$23 as toTitleCase, t$87 as toUpperCase, e$33 as truncate, t$88 as uncapitalize, n$24 as unique, n$25 as uniqueBy, uniqueByAsync as uniqueByP, uniqueAsync as uniqueP, n$26 as uniqueWith, uniqueWithAsync as uniqueWithP, t$89 as values, e$34 as when, t$90 as zip, t$91 as zipWith };
3
+ export { accumulate, accumulateP, add, addProp, allPass, anyPass, awaitAll, buffer, capitalize, ceil, chunk, chunkP, clamp, clone, compose, concat, concatP, concurrency, conditional, constant, countBy, debounce, defaultTo, difference, differenceBy, differenceByP, differenceP, differenceWith, differenceWithP, divide, doNothing, drop, dropFirstBy, dropLast, dropLastWhile, dropP, dropWhile, endsWith, entries, every, everyP, evolve, execute, executeP, filter, filterP, find, findIndex, findLast, findLastIndex, findP, first, firstBy, flat, flatMap, flatMapP, flatten, flattenP, floor, forEach, forEachObj, forEachP, fromEntries, fromKeys, funnel, groupBy, groupByProp, hasAtLeast, hasOwnProperty, hasSubObject, identity, indexBy, intersection, intersectionBy, intersectionByP, intersectionP, intersectionWith, intersectionWithP, invert, isArray, isBigInt, isBoolean, isDate, isDeepEqual, isDefined, isEmpty, isEmptyish, isError, isFunction, isIncludedIn, isNonNull, isNonNullish, isNot, isNullish, isNumber, isObjectType, isPlainObject, isPromise, isPromiseLike, isShallowEqual, isStrictEqual, isString, isSymbol, isTruthy, join, keys, last, length, map, mapKeys, mapP, mapToObj, mapValues, mapWithFeedback, mean, meanBy, median, merge, mergeAll, mergeDeep, multiply, nthBy, objOf, omit, omitBy, once, only, partialBind, partialLastBind, partition, pathOr, peek, peekP, pick, pickBy, pipe, piped, product, prop, pullObject, purry, randomBigInt, randomInteger, randomString, range, rankBy, reduce, reduceP, reverse, round, sample, serialize, serializeP, set, setPath, shuffle, sliceString, some, someP, sort, sortBy, sortedIndex, sortedIndexBy, sortedIndexWith, sortedLastIndex, sortedLastIndexBy, splice, split, splitAt, splitWhen, startsWith, stringToPath, subtract, sum, sumBy, swapIndices, swapProps, take, takeFirstBy, takeLast, takeLastWhile, takeP, takeWhile, tap, throttle, times, toArray, toArrayP, toCamelCase, toIterator, toIteratorP, toKebabCase, toLowerCase, toSnakeCase, toTitleCase, toUpperCase, truncate, uncapitalize, unique, uniqueBy, uniqueByP, uniqueP, uniqueWith, uniqueWithP, values, when, zip, zipWith };
package/dist/result.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as err, c as ExtractOkTypes, d as ResultAll, f as ResultError, i as Result, l as InferErrType, n as Err, o as ok, r as Ok, s as ExtractErrTypes, t as safeTry, u as InferOkType } from "./chunks/chunk-d1860346.js";
2
- export { Err, ExtractErrTypes, ExtractOkTypes, InferErrType, InferOkType, Ok, Result, ResultAll, ResultError, err, ok, safeTry };
1
+ import { a as err, c as ExtractOkTypes, d as ResultAll, i as Result, l as InferErrType, n as Err, o as ok, r as Ok, s as ExtractErrTypes, t as ResultError, u as InferOkType } from "./chunks/chunk-704a1835.js";
2
+ export { Err, ExtractErrTypes, ExtractOkTypes, InferErrType, InferOkType, Ok, Result, ResultAll, ResultError, err, ok };
package/dist/result.js CHANGED
@@ -1,3 +1,3 @@
1
- import { A as Result, M as ok, N as safeTry, P as ResultError, j as err } from "./chunks/chunk-5ed3bc8a.js";
1
+ import { A as Result, M as ok, N as ResultError, j as err } from "./chunks/chunk-486f65b0.js";
2
2
 
3
- export { Result, ResultError, err, ok, safeTry };
3
+ export { Result, ResultError, err, ok };
package/dist/shell.d.ts CHANGED
@@ -1,18 +1,16 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
+ import { p as TemplateFn } from "./chunks/chunk-3c6f28c7.js";
2
3
  import { ChildProcess, SpawnOptions } from "node:child_process";
3
4
  import { Readable } from "node:stream";
4
5
 
5
6
  //#region node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.d.ts
6
-
7
7
  //#region src/non-zero-exit-error.d.ts
8
8
  declare class NonZeroExitError extends Error {
9
9
  readonly result: Result;
10
10
  readonly output?: Output;
11
11
  get exitCode(): number | undefined;
12
12
  constructor(result: Result, output?: Output);
13
- }
14
-
15
- //#endregion
13
+ } //#endregion
16
14
  //#region src/main.d.ts
17
15
  interface Output {
18
16
  stderr: string;
@@ -68,15 +66,7 @@ declare class ExecProcess implements Result {
68
66
  }
69
67
  //#endregion
70
68
  //#region src/shell/types.d.ts
71
- interface StringOrTemplateFunction {
72
- (command: string): ShellResult;
73
- (template: TemplateStringsArray, ...values: any[]): ShellResult;
74
- }
75
- interface ShellExec {
76
- (command: string, args?: string[], options?: Partial<PipeOptions>): ShellResult;
77
- (template: TemplateStringsArray, ...values: any[]): ShellResult;
78
- (options: Partial<Options>): StringOrTemplateFunction;
79
- }
69
+ type ShellExec = TemplateFn<ShellResult> & ((command: string, args?: string[], options?: Partial<PipeOptions>) => ShellResult) & ((options: Partial<Options>) => TemplateFn<ShellResult> & ((command: string) => ShellResult));
80
70
  interface ShellOutputApi extends OutputApi {
81
71
  pipe: ShellExec;
82
72
  }
@@ -87,7 +77,7 @@ declare class ShellExecProcess extends ExecProcess implements ShellResult {
87
77
  constructor(command: string, args?: string[], options?: Partial<Options>);
88
78
  pipe(command: string, args?: string[], options?: Partial<PipeOptions>): ShellResult;
89
79
  pipe(template: TemplateStringsArray, ...values: any[]): ShellResult;
90
- pipe(options: Partial<Options>): StringOrTemplateFunction;
80
+ pipe(options: Partial<Options>): TemplateFn<ShellResult> & ((command: string) => ShellResult);
91
81
  [Symbol.asyncIterator](): AsyncIterator<string>;
92
82
  protected _waitForOutput(): Promise<Output>;
93
83
  }