@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/README.md +53 -31
- package/dist/chunks/chunk-3c6f28c7.d.ts +39 -0
- package/dist/chunks/{chunk-5ed3bc8a.js → chunk-486f65b0.js} +190 -324
- package/dist/chunks/chunk-704a1835.d.ts +174 -0
- package/dist/chunks/chunk-7ffde8d4.js +43 -0
- package/dist/chunks/chunk-b61db0a7.js +27 -0
- package/dist/common.d.ts +8 -16
- package/dist/common.js +1 -1
- package/dist/fs.d.ts +2 -5
- package/dist/fs.js +246 -593
- package/dist/global-types.d.ts +89 -59
- package/dist/remeda.d.ts +10 -12288
- package/dist/remeda.js +2 -2
- package/dist/result.d.ts +2 -2
- package/dist/result.js +2 -2
- package/dist/shell.d.ts +4 -14
- package/dist/shell.js +290 -290
- package/dist/types.d.ts +3 -2
- package/package.json +14 -11
- package/dist/chunks/chunk-b970a8d0.js +0 -2782
- package/dist/chunks/chunk-d1860346.d.ts +0 -154
- package/dist/chunks/chunk-e931fe39.d.ts +0 -11978
package/dist/remeda.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as
|
|
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 {
|
|
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,
|
|
2
|
-
export { Err, ExtractErrTypes, ExtractOkTypes, InferErrType, InferOkType, Ok, Result, ResultAll, ResultError, err, ok
|
|
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
|
|
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
|
|
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
|
-
|
|
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>):
|
|
80
|
+
pipe(options: Partial<Options>): TemplateFn<ShellResult> & ((command: string) => ShellResult);
|
|
91
81
|
[Symbol.asyncIterator](): AsyncIterator<string>;
|
|
92
82
|
protected _waitForOutput(): Promise<Output>;
|
|
93
83
|
}
|