@sorrell/cli-utilities 1.0.36 → 1.0.38
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/Distribution/Command/Command.d.ts +33 -0
- package/Distribution/Command/Command.d.ts.map +1 -0
- package/Distribution/Command/Command.js +37 -0
- package/Distribution/Command/Command.js.map +1 -0
- package/Distribution/Command/index.d.ts +8 -0
- package/Distribution/Command/index.d.ts.map +1 -0
- package/Distribution/Command/index.js +8 -0
- package/Distribution/Command/index.js.map +1 -0
- package/Distribution/English/English.Types.d.ts +6 -0
- package/Distribution/English/English.Types.d.ts.map +1 -1
- package/Distribution/English/English.Types.js +5 -4
- package/Distribution/English/English.Types.js.map +1 -1
- package/Distribution/English/English.d.ts +6 -0
- package/Distribution/English/English.d.ts.map +1 -1
- package/Distribution/English/English.js +5 -4
- package/Distribution/English/English.js.map +1 -1
- package/Distribution/English/index.d.ts +6 -0
- package/Distribution/English/index.d.ts.map +1 -1
- package/Distribution/English/index.js +5 -4
- package/Distribution/English/index.js.map +1 -1
- package/Distribution/Format/Format.Internal.Types.d.ts +6 -0
- package/Distribution/Format/Format.Internal.Types.d.ts.map +1 -1
- package/Distribution/Format/Format.Internal.Types.js +5 -4
- package/Distribution/Format/Format.Internal.Types.js.map +1 -1
- package/Distribution/Format/Format.Internal.d.ts +6 -0
- package/Distribution/Format/Format.Internal.d.ts.map +1 -1
- package/Distribution/Format/Format.Internal.js +5 -4
- package/Distribution/Format/Format.Internal.js.map +1 -1
- package/Distribution/Format/Format.Types.d.ts +6 -0
- package/Distribution/Format/Format.Types.d.ts.map +1 -1
- package/Distribution/Format/Format.Types.js +5 -4
- package/Distribution/Format/Format.Types.js.map +1 -1
- package/Distribution/Format/Format.d.ts +8 -0
- package/Distribution/Format/Format.d.ts.map +1 -1
- package/Distribution/Format/Format.js +5 -4
- package/Distribution/Format/Format.js.map +1 -1
- package/Distribution/Format/index.d.ts +6 -0
- package/Distribution/Format/index.d.ts.map +1 -1
- package/Distribution/Format/index.js +5 -4
- package/Distribution/Format/index.js.map +1 -1
- package/Distribution/Inquirer/Confirm.Types.d.ts +6 -0
- package/Distribution/Inquirer/Confirm.Types.d.ts.map +1 -1
- package/Distribution/Inquirer/Confirm.Types.js +5 -4
- package/Distribution/Inquirer/Confirm.Types.js.map +1 -1
- package/Distribution/Inquirer/Confirm.d.ts +6 -0
- package/Distribution/Inquirer/Confirm.d.ts.map +1 -1
- package/Distribution/Inquirer/Confirm.js +5 -4
- package/Distribution/Inquirer/Confirm.js.map +1 -1
- package/Distribution/Inquirer/FileSelector.Types.d.ts +6 -0
- package/Distribution/Inquirer/FileSelector.Types.d.ts.map +1 -1
- package/Distribution/Inquirer/FileSelector.Types.js +5 -4
- package/Distribution/Inquirer/FileSelector.Types.js.map +1 -1
- package/Distribution/Inquirer/FileSelector.d.ts +6 -0
- package/Distribution/Inquirer/FileSelector.d.ts.map +1 -1
- package/Distribution/Inquirer/FileSelector.js +5 -4
- package/Distribution/Inquirer/FileSelector.js.map +1 -1
- package/Distribution/Inquirer/index.d.ts +6 -0
- package/Distribution/Inquirer/index.d.ts.map +1 -1
- package/Distribution/Inquirer/index.js +5 -4
- package/Distribution/Inquirer/index.js.map +1 -1
- package/Distribution/Listr/Listr.Experimental.Internal.d.ts +10 -0
- package/Distribution/Listr/Listr.Experimental.Internal.d.ts.map +1 -0
- package/Distribution/Listr/Listr.Experimental.Internal.js +10 -0
- package/Distribution/Listr/Listr.Experimental.Internal.js.map +1 -0
- package/Distribution/Listr/Listr.Experimental.Types.d.ts +8 -0
- package/Distribution/Listr/Listr.Experimental.Types.d.ts.map +1 -0
- package/Distribution/Listr/Listr.Experimental.Types.js +25 -0
- package/Distribution/Listr/Listr.Experimental.Types.js.map +1 -0
- package/Distribution/Listr/Listr.Experimental.d.ts +8 -0
- package/Distribution/Listr/Listr.Experimental.d.ts.map +1 -0
- package/Distribution/Listr/Listr.Experimental.js +30 -0
- package/Distribution/Listr/Listr.Experimental.js.map +1 -0
- package/Distribution/Listr/Listr.Types.d.ts +13 -2
- package/Distribution/Listr/Listr.Types.d.ts.map +1 -1
- package/Distribution/Listr/Listr.Types.js +5 -4
- package/Distribution/Listr/Listr.Types.js.map +1 -1
- package/Distribution/Listr/Listr.d.ts +8 -2
- package/Distribution/Listr/Listr.d.ts.map +1 -1
- package/Distribution/Listr/Listr.js +22 -8
- package/Distribution/Listr/Listr.js.map +1 -1
- package/Distribution/Listr/index.d.ts +6 -0
- package/Distribution/Listr/index.d.ts.map +1 -1
- package/Distribution/Listr/index.js +5 -4
- package/Distribution/Listr/index.js.map +1 -1
- package/Distribution/Ora/Ora.Types.d.ts +7 -1
- package/Distribution/Ora/Ora.Types.d.ts.map +1 -1
- package/Distribution/Ora/Ora.Types.js +5 -4
- package/Distribution/Ora/Ora.Types.js.map +1 -1
- package/Distribution/Ora/Ora.d.ts +7 -1
- package/Distribution/Ora/Ora.d.ts.map +1 -1
- package/Distribution/Ora/Ora.js +6 -5
- package/Distribution/Ora/Ora.js.map +1 -1
- package/Distribution/Ora/index.d.ts +6 -0
- package/Distribution/Ora/index.d.ts.map +1 -1
- package/Distribution/Ora/index.js +5 -4
- package/Distribution/Ora/index.js.map +1 -1
- package/Distribution/PseudoTerminal/PseudoTerminal.Types.d.ts +6 -0
- package/Distribution/PseudoTerminal/PseudoTerminal.Types.d.ts.map +1 -1
- package/Distribution/PseudoTerminal/PseudoTerminal.Types.js +5 -4
- package/Distribution/PseudoTerminal/PseudoTerminal.Types.js.map +1 -1
- package/Distribution/PseudoTerminal/PseudoTerminal.d.ts +8 -1
- package/Distribution/PseudoTerminal/PseudoTerminal.d.ts.map +1 -1
- package/Distribution/PseudoTerminal/PseudoTerminal.js +20 -8
- package/Distribution/PseudoTerminal/PseudoTerminal.js.map +1 -1
- package/Distribution/PseudoTerminal/index.d.ts +6 -0
- package/Distribution/PseudoTerminal/index.d.ts.map +1 -1
- package/Distribution/PseudoTerminal/index.js +5 -4
- package/Distribution/PseudoTerminal/index.js.map +1 -1
- package/Distribution/index.d.ts +8 -0
- package/Distribution/index.d.ts.map +1 -1
- package/Distribution/index.js +7 -4
- package/Distribution/index.js.map +1 -1
- package/package.json +8 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Listr.Experimental.Internal.d.ts","sourceRoot":"","sources":["../../Source/Listr/Listr.Experimental.Internal.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,UAAU,EAAE,OAAO,MAA6B,CAAC;AAC9D,eAAO,MAAM,aAAa,EAAE,OAAO,MAAgC,CAAC;AACpE,eAAO,MAAM,aAAa,EAAE,OAAO,MAAgC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Listr.Experimental.Internal.ts
|
|
3
|
+
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
+
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
+
* @license: MIT
|
|
6
|
+
*/
|
|
7
|
+
export const ExitSymbol = Symbol("ExitSymbol");
|
|
8
|
+
export const FailureSymbol = Symbol("FailureSymbol");
|
|
9
|
+
export const SuccessSymbol = Symbol("SuccessSymbol");
|
|
10
|
+
//# sourceMappingURL=Listr.Experimental.Internal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Listr.Experimental.Internal.js","sourceRoot":"","sources":["../../Source/Listr/Listr.Experimental.Internal.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,UAAU,GAAkB,MAAM,CAAC,YAAY,CAAC,CAAC;AAC9D,MAAM,CAAC,MAAM,aAAa,GAAkB,MAAM,CAAC,eAAe,CAAC,CAAC;AACpE,MAAM,CAAC,MAAM,aAAa,GAAkB,MAAM,CAAC,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Listr.Experimental.Types.d.ts","sourceRoot":"","sources":["../../Source/Listr/Listr.Experimental.Types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,qCAAqC,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Listr.Experimental.Types.ts
|
|
3
|
+
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
+
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
8
|
+
// import type { ExitSymbol, FailureSymbol, SuccessSymbol } from "./Listr.Experimental.Internal.js";
|
|
9
|
+
// type Exit = typeof ExitSymbol;
|
|
10
|
+
// type Failure = typeof FailureSymbol;
|
|
11
|
+
// type Success = typeof SuccessSymbol;
|
|
12
|
+
// export type Return =
|
|
13
|
+
// {
|
|
14
|
+
// Exit: Exit;
|
|
15
|
+
// Failure: Failure;
|
|
16
|
+
// Subtasks:
|
|
17
|
+
// {
|
|
18
|
+
// <NewContextType>(Subtasks: Array<ListrTask<NewContextType>>): void;
|
|
19
|
+
// };
|
|
20
|
+
// Success: Success;
|
|
21
|
+
// };
|
|
22
|
+
// export type ListrCtorArgument<ContextType> =
|
|
23
|
+
// {
|
|
24
|
+
// };
|
|
25
|
+
//# sourceMappingURL=Listr.Experimental.Types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Listr.Experimental.Types.js","sourceRoot":"","sources":["../../Source/Listr/Listr.Experimental.Types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAIH,oGAAoG;AAEpG,iCAAiC;AACjC,uCAAuC;AACvC,uCAAuC;AAEvC,uBAAuB;AACvB,QAAQ;AACR,sBAAsB;AACtB,4BAA4B;AAC5B,oBAAoB;AACpB,gBAAgB;AAChB,sFAAsF;AACtF,iBAAiB;AACjB,4BAA4B;AAC5B,SAAS;AAET,+CAA+C;AAC/C,QAAQ;AAER,SAAS"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Listr.Experimental.d.ts","sourceRoot":"","sources":["../../Source/Listr/Listr.Experimental.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,eAAO,MAAM,+BAA+B,EAAE,MAAW,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Listr.Experimental.ts
|
|
3
|
+
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
+
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
// import type { TMaybeArray } from "@sorrell/utilities/misc";
|
|
8
|
+
// import { ExitSymbol, FailureSymbol, SuccessSymbol } from "./Listr.Experimental.Internal.js";
|
|
9
|
+
// import type { ListrCtorArgument, Return } from "./Listr.Experimental.Types.js";
|
|
10
|
+
export const __DummyExport_ListrExperimental = "";
|
|
11
|
+
// Factory function
|
|
12
|
+
// Ability to set title declaratively as constant or as function of `Context`.
|
|
13
|
+
// Optional `tensed` property
|
|
14
|
+
// Static properties for return values (`Success, `Fail`, `Exit`, `Subtasks`)
|
|
15
|
+
// export class Listr<ContextType>
|
|
16
|
+
// {
|
|
17
|
+
// public constructor(Tasks: ListrCtorArgument<ContextType>)
|
|
18
|
+
// {
|
|
19
|
+
// }
|
|
20
|
+
// public static Return: Return =
|
|
21
|
+
// {
|
|
22
|
+
// Exit: ExitSymbol,
|
|
23
|
+
// Failure: FailureSymbol,
|
|
24
|
+
// Subtasks<NewContextType>(Subtasks: Array<Listr<NewContextType>>): void
|
|
25
|
+
// {
|
|
26
|
+
// },
|
|
27
|
+
// Success: SuccessSymbol
|
|
28
|
+
// };
|
|
29
|
+
// };
|
|
30
|
+
//# sourceMappingURL=Listr.Experimental.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Listr.Experimental.js","sourceRoot":"","sources":["../../Source/Listr/Listr.Experimental.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,8DAA8D;AAC9D,+FAA+F;AAC/F,kFAAkF;AAElF,MAAM,CAAC,MAAM,+BAA+B,GAAW,EAAE,CAAC;AAE1D,mBAAmB;AACnB,8EAA8E;AAC9E,6BAA6B;AAC7B,6EAA6E;AAE7E,kCAAkC;AAClC,IAAI;AACJ,gEAAgE;AAChE,QAAQ;AAER,QAAQ;AAER,qCAAqC;AACrC,YAAY;AACZ,gCAAgC;AAChC,sCAAsC;AACtC,qFAAqF;AACrF,gBAAgB;AAEhB,iBAAiB;AACjB,qCAAqC;AACrC,aAAa;AACb,KAAK"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Listr.Types.ts
|
|
3
|
+
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
+
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
1
7
|
import type { ListrDefaultRenderer, ListrTask as ListrTaskOriginal, ListrTaskObject as ListrTaskObjectOriginal, ListrTaskFn as ListrTaskFnOriginal, ListrTaskResult, ListrTaskWrapper as ListrTaskWrapperOriginal, ListrBaseClassOptions } from "listr2";
|
|
2
8
|
export type ListrTaskFn<ContextType> = ListrTaskFnOriginal<ContextType, ListrDefaultRenderer, ListrDefaultRenderer>;
|
|
3
9
|
export type ListrTaskNative<ContextType> = ListrTaskOriginal<ContextType, ListrDefaultRenderer, ListrDefaultRenderer>;
|
|
@@ -9,6 +15,9 @@ export type ListrTaskWrapper<ContextType> = ListrTaskWrapperOriginal<ContextType
|
|
|
9
15
|
export type ListrConstructorTask<ContextType> = ListrTaskNative<ContextType> | Array<ListrTaskNative<ContextType>>;
|
|
10
16
|
export type TensedTitle = `${string}ing ${string}.`;
|
|
11
17
|
export declare namespace ListrTaskTensedCallbackReturnType {
|
|
18
|
+
type NewListr<ContextType> = {
|
|
19
|
+
(Argument: NewListrFn<ContextType>): ListrTaskTensedResult<ContextType>;
|
|
20
|
+
};
|
|
12
21
|
type FailureOptions = {} | {
|
|
13
22
|
Throw: false;
|
|
14
23
|
} | {
|
|
@@ -49,6 +58,7 @@ export declare namespace ListrTaskTensedCallbackReturnType {
|
|
|
49
58
|
export type ListrTaskTensedCallbacks<ContextType> = {
|
|
50
59
|
Exit: ListrTaskTensedCallbackReturnType.Exit<ContextType>;
|
|
51
60
|
Fail: ListrTaskTensedCallbackReturnType.Failure<ContextType>;
|
|
61
|
+
NewListr: ListrTaskTensedCallbackReturnType.NewListr<ContextType>;
|
|
52
62
|
Succeed: ListrTaskTensedCallbackReturnType.Success<ContextType>;
|
|
53
63
|
};
|
|
54
64
|
export type ListrTaskTensedFunction<ContextType> = {
|
|
@@ -61,8 +71,9 @@ export type ListrTaskTensed<ContextType> = Omit<ListrTaskNative<ContextType>, "t
|
|
|
61
71
|
};
|
|
62
72
|
export type ListrTaskTensedArgument<ContextType> = Omit<ListrTaskTensed<ContextType>, "tensed">;
|
|
63
73
|
export type ListrTaskObject<ContextType> = ListrTaskObjectOriginal<ContextType, ListrDefaultRenderer, ListrDefaultRenderer>;
|
|
74
|
+
export type NewListrFn<ContextType> = Extract<Parameters<ListrTaskWrapper<ContextType>["newListr"]>[0], Function>;
|
|
64
75
|
export type ListrTaskTensedResult<ContextType> = {
|
|
65
|
-
Result: ListrTaskResult<ContextType> | undefined;
|
|
66
|
-
Status: "Success" | "Failure" | "Exit";
|
|
76
|
+
Result: ListrTaskResult<ContextType> | NewListrFn<ContextType> | undefined;
|
|
77
|
+
Status: "Success" | "Failure" | "Exit" | "NewListr";
|
|
67
78
|
};
|
|
68
79
|
//# sourceMappingURL=Listr.Types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Listr.Types.d.ts","sourceRoot":"","sources":["../../Source/Listr/Listr.Types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Listr.Types.d.ts","sourceRoot":"","sources":["../../Source/Listr/Listr.Types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,E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CAAC,CAAC,CAAC;CAClD,CAAC;AAEN,MAAM,MAAM,eAAe,CAAC,WAAW,IACnC,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GACpD;IACI,IAAI,EAAE,uBAAuB,CAAC,WAAW,CAAC,CAAC;IAC3C,MAAM,EAAE,IAAI,CAAC;IACb,KAAK,EAAE,WAAW,CAAC;CACtB,CAAC;AAEN,MAAM,MAAM,uBAAuB,CAAC,WAAW,IAC3C,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAC;AAEjD,MAAM,MAAM,eAAe,CAAC,WAAW,IACnC,uBAAuB,CACnB,WAAW,EACX,oBAAoB,EACpB,oBAAoB,CACvB,CAAC;AAEN,MAAM,MAAM,UAAU,CAAC,WAAW,IAC9B,OAAO,CACH,UAAU,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,EACxD,QAAQ,CACX,CAAC;AAEN,MAAM,MAAM,qBAAqB,CAAC,WAAW,IACzC;IACI,MAAM,EACA,eAAe,CAAC,WAAW,CAAC,GAC5B,UAAU,CAAC,WAAW,CAAC,GACvB,SAAS,CAAC;IAChB,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC;CACvD,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
1
|
+
/**
|
|
2
|
+
* @file Listr.Types.ts
|
|
3
|
+
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
+
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
+
* @license MIT
|
|
5
6
|
*/
|
|
6
7
|
export {};
|
|
7
8
|
//# sourceMappingURL=Listr.Types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Listr.Types.js","sourceRoot":"","sources":["../../Source/Listr/Listr.Types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"Listr.Types.js","sourceRoot":"","sources":["../../Source/Listr/Listr.Types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Listr.ts
|
|
3
|
+
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
+
* @copyright 2026 Gage Sorrell
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
1
7
|
import { type ListrDefaultRenderer, type ListrTask as ListrTaskOriginal } from "listr2";
|
|
2
8
|
import type { ListrOptions, ListrTask, ListrTaskNative, ListrTaskObject, ListrTaskTensedArgument } from "./Listr.Types.js";
|
|
3
9
|
/**
|
|
4
10
|
* A wrapper for `new Listr` that handles errors nicely.
|
|
5
11
|
*
|
|
6
|
-
* @
|
|
12
|
+
* @template ContextType - The type of the `listr2` context used by the {@link Task}.
|
|
7
13
|
*
|
|
8
14
|
* @param Task - The task(s) to run.
|
|
9
15
|
* @param GenericErrorMessage - The error message that is shown if the {@link Task | task(s)} throw(s)
|
|
@@ -18,7 +24,7 @@ export declare function NewListrTask<ContextType = unknown>(Task: ListrTask<Cont
|
|
|
18
24
|
/**
|
|
19
25
|
* @TODO Write this comment.
|
|
20
26
|
*
|
|
21
|
-
* @
|
|
27
|
+
* @template ContextType -
|
|
22
28
|
* @param Task -
|
|
23
29
|
*
|
|
24
30
|
* @returns
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Listr.d.ts","sourceRoot":"","sources":["../../Source/Listr/Listr.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Listr.d.ts","sourceRoot":"","sources":["../../Source/Listr/Listr.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAEH,KAAK,oBAAoB,EACzB,KAAK,SAAS,IAAI,iBAAiB,EAEX,MAAM,QAAQ,CAAC;AAC3C,OAAO,KAAK,EAER,YAAY,EACZ,SAAS,EACT,eAAe,EACf,eAAe,EAEf,uBAAuB,EAIX,MAAM,kBAAkB,CAAC;AA8CzC;;;;;;;;;;;;GAYG;AACH,wBAAsB,QAAQ,CAAC,WAAW,GAAG,OAAO,EAChD,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,EACpC,OAAO,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,EACnC,UAAU,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,GACtC,OAAO,CAAC,IAAI,CAAC,CAAC;AAoDjB,wBAAgB,YAAY,CAAC,WAAW,GAAG,OAAO,EAC9C,IAAI,EAAE,SAAS,CAAC,WAAW,CAAC,GAC7B,iBAAiB,CAAC,WAAW,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,CAAA;AAuB7E;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,GAAG,OAAO,EACpD,IAAI,EAAE,uBAAuB,CAAC,WAAW,CAAC,GAC3C,eAAe,CAAC,WAAW,CAAC,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
1
|
+
/**
|
|
2
|
+
* @file Listr.ts
|
|
3
|
+
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
+
* @copyright 2026 Gage Sorrell
|
|
5
|
+
* @license MIT
|
|
5
6
|
*/
|
|
6
7
|
import { Listr as ListrOriginal } from "listr2";
|
|
7
8
|
import { Inflectors } from "en-inflectors";
|
|
@@ -15,7 +16,7 @@ class ListrTaskError extends Error {
|
|
|
15
16
|
Message;
|
|
16
17
|
}
|
|
17
18
|
;
|
|
18
|
-
class
|
|
19
|
+
class ListrInternal extends ListrOriginal {
|
|
19
20
|
constructor(Task, Options, ParentTask) {
|
|
20
21
|
if (Options === undefined && ParentTask === undefined) {
|
|
21
22
|
super(Task);
|
|
@@ -39,7 +40,7 @@ export async function RunListr(Tasks, InOptions, ParentTask) {
|
|
|
39
40
|
};
|
|
40
41
|
try {
|
|
41
42
|
const HandledTasks = Tasks.map(NewListrTask);
|
|
42
|
-
await new
|
|
43
|
+
await new ListrInternal(HandledTasks, Options, ParentTask).run();
|
|
43
44
|
}
|
|
44
45
|
catch (ListrError) {
|
|
45
46
|
if (!Options.exitOnError) {
|
|
@@ -169,8 +170,21 @@ export function NewListrTaskTensed(InTask) {
|
|
|
169
170
|
Status: "Exit"
|
|
170
171
|
};
|
|
171
172
|
}
|
|
172
|
-
|
|
173
|
-
|
|
173
|
+
function NewListr(Argument) {
|
|
174
|
+
return {
|
|
175
|
+
Result: Argument,
|
|
176
|
+
Status: "NewListr"
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
const Result = await InTask.task(Context, Task, { Exit, Fail, NewListr, Succeed });
|
|
180
|
+
if (Result.Status === "NewListr") {
|
|
181
|
+
await Result.Result;
|
|
182
|
+
}
|
|
183
|
+
if (typeof Result === "object" && Result !== null && "Result" in Result && "Status" in Result) {
|
|
184
|
+
return Result;
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
}
|
|
174
188
|
};
|
|
175
189
|
return {
|
|
176
190
|
...InTask,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Listr.js","sourceRoot":"","sources":["../../Source/Listr/Listr.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"Listr.js","sourceRoot":"","sources":["../../Source/Listr/Listr.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAKH,KAAK,IAAI,aAAa,EAAE,MAAM,QAAQ,CAAC;AAa3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,cAAe,SAAQ,KAAK;IAE9B,YAAmB,EACf,OAAO,EACP,aAAa,EAIhB;QAEG,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,OAA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C3D,CAAC;YACL,CAAC;YAED,OAAO;gBACH,MAAM;gBACN,MAAM,EAAE,SAAS;aACpB,CAAC;QACN,CAAC;QAED;;;;;;;;;;WAUG;QACH,SAAS,OAAO,CAAC,MAAqC;YAElD,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;YAElC,OAAO;gBACH,MAAM;gBACN,MAAM,EAAE,SAAS;aACpB,CAAC;QACN,CAAC;QAED;;;;;;;;;;;;;;;;WAgBG;QACH,SAAS,IAAI,CACT,SAAiB,EACjB,MAAqC;YAGrC,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;YAEvB,OAAO;gBACH,MAAM;gBACN,MAAM,EAAE,MAAM;aACjB,CAAC;QACN,CAAC;QAED,SAAS,QAAQ,CACb,QAAiC;YAGjC,OAAO;gBACH,MAAM,EAAE,QAAQ;gBAChB,MAAM,EAAE,UAAU;aACrB,CAAC;QACN,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;QACnF,IAAI,MAAM,CAAC,MAAM,KAAK,UAAU,EAChC,CAAC;YACG,MAAM,MAAM,CAAC,MAAM,CAAC;QACxB,CAAC;QACD,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,IAAI,QAAQ,IAAI,MAAM,IAAI,QAAQ,IAAI,MAAM,EAC7F,CAAC;YACG,OAAO,MAAM,CAAC;QAClB,CAAC;aAED,CAAC;QACD,CAAC;IACL,CAAC,CAAC;IAEF,OAAO;QACH,GAAG,MAAM;QACT,IAAI,EAAE,WAAW;KACpB,CAAC;AACN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../Source/Listr/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../Source/Listr/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
1
|
+
/**
|
|
2
|
+
* @file index.ts
|
|
3
|
+
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
+
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
+
* @license MIT
|
|
5
6
|
*/
|
|
6
7
|
export * from "./Listr.js";
|
|
7
8
|
export * from "./Listr.Types.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../Source/Listr/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../Source/Listr/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Ora.Types.ts
|
|
3
|
+
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
+
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
1
7
|
import type ora from "ora";
|
|
2
8
|
/** The options object of {@link Ora}. */
|
|
3
9
|
export type FOraOptions = Extract<Parameters<typeof ora>[0], object>;
|
|
4
10
|
/**
|
|
5
11
|
* The `async` function or `Promise` passed to {@link Ora}.
|
|
6
12
|
*
|
|
7
|
-
* @
|
|
13
|
+
* @template Type - The type of the value returned by the task.
|
|
8
14
|
*/
|
|
9
15
|
export type TOraTaskArgument<Type> = (() => Promise<Type>) | Promise<Type> | ((SetPersistText: ((In: string) => void)) => Promise<Type>);
|
|
10
16
|
//# sourceMappingURL=Ora.Types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ora.Types.d.ts","sourceRoot":"","sources":["../../Source/Ora/Ora.Types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Ora.Types.d.ts","sourceRoot":"","sources":["../../Source/Ora/Ora.Types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B,yCAAyC;AACzC,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AAErE;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,CAAC,IAAI,IAC3B,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,GACrB,OAAO,CAAC,IAAI,CAAC,GACb,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
1
|
+
/**
|
|
2
|
+
* @file Ora.Types.ts
|
|
3
|
+
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
+
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
+
* @license MIT
|
|
5
6
|
*/
|
|
6
7
|
export {};
|
|
7
8
|
//# sourceMappingURL=Ora.Types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ora.Types.js","sourceRoot":"","sources":["../../Source/Ora/Ora.Types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"Ora.Types.js","sourceRoot":"","sources":["../../Source/Ora/Ora.Types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Ora.ts
|
|
3
|
+
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
+
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
1
7
|
import type { FOraOptions, TOraTaskArgument } from "./Ora.Types.js";
|
|
2
8
|
import { type TTryResult } from "@sorrell/utilities/async";
|
|
3
9
|
import { type Ora as IOra } from "ora";
|
|
@@ -14,7 +20,7 @@ export declare function Ora(Argument: FOraOptions): IOra;
|
|
|
14
20
|
*
|
|
15
21
|
* Executes an `async` function or `Promise` with a progress indicator.
|
|
16
22
|
*
|
|
17
|
-
* @
|
|
23
|
+
* @template Type - The type of the data to which the given {@link AsyncSource} resolves.
|
|
18
24
|
*
|
|
19
25
|
* @param AsyncSource - The `async` function or `Promise` whose state is conveyed
|
|
20
26
|
* by the returned instance of `Ora`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ora.d.ts","sourceRoot":"","sources":["../../Source/Ora/Ora.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Ora.d.ts","sourceRoot":"","sources":["../../Source/Ora/Ora.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,KAAK,UAAU,EAAoC,MAAM,0BAA0B,CAAC;AAC7F,OAAY,EAAE,KAAK,GAAG,IAAI,IAAI,EAAE,MAAM,KAAK,CAAC;AAE5C;;;;;;GAMG;AACH,wBAAgB,GAAG,CAAC,QAAQ,EAAE,WAAW,GAAG,IAAI,CAoB/C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAC9B,WAAW,EAAE,gBAAgB,CAAC,IAAI,CAAC,EACnC,eAAe,EAAE,MAAM,GACxB,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CA2C3B"}
|
package/Distribution/Ora/Ora.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
1
|
+
/**
|
|
2
|
+
* @file Ora.ts
|
|
3
|
+
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
+
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
+
* @license MIT
|
|
5
6
|
*/
|
|
6
7
|
import { Try as TryAsync } from "@sorrell/utilities/async";
|
|
7
8
|
import ora from "ora";
|
|
@@ -31,7 +32,7 @@ export function Ora(Argument) {
|
|
|
31
32
|
*
|
|
32
33
|
* Executes an `async` function or `Promise` with a progress indicator.
|
|
33
34
|
*
|
|
34
|
-
* @
|
|
35
|
+
* @template Type - The type of the data to which the given {@link AsyncSource} resolves.
|
|
35
36
|
*
|
|
36
37
|
* @param AsyncSource - The `async` function or `Promise` whose state is conveyed
|
|
37
38
|
* by the returned instance of `Ora`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ora.js","sourceRoot":"","sources":["../../Source/Ora/Ora.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"Ora.js","sourceRoot":"","sources":["../../Source/Ora/Ora.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAoC,GAAG,IAAI,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAC7F,OAAO,GAAyB,MAAM,KAAK,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,UAAU,GAAG,CAAC,QAAqB;IAErC,MAAM,cAAc,GAChB;QACI,UAAU,EAAE,IAAI;KACnB,CAAC;IAEN,MAAM,eAAe,GACjB;QACI,OAAO,EAAE,OAAO;KACnB,CAAC;IAEN,MAAM,OAAO,GACT;QACI,GAAG,cAAc;QACjB,GAAG,QAAQ;QACX,GAAG,eAAe;KACrB,CAAC;IAEN,OAAO,GAAG,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC;AAChC,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAA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file":"index.d.ts","sourceRoot":"","sources":["../../Source/Ora/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
1
|
+
/**
|
|
2
|
+
* @file index.ts
|
|
3
|
+
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
+
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
+
* @license MIT
|
|
5
6
|
*/
|
|
6
7
|
export * from "./Ora.js";
|
|
7
8
|
export * from "./Ora.Types.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../Source/Ora/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../Source/Ora/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PseudoTerminal.Types.d.ts","sourceRoot":"","sources":["../../Source/PseudoTerminal/PseudoTerminal.Types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"PseudoTerminal.Types.d.ts","sourceRoot":"","sources":["../../Source/PseudoTerminal/PseudoTerminal.Types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
1
|
+
/**
|
|
2
|
+
* @file PseudoTerminal.Types.ts
|
|
3
|
+
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
+
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
+
* @license MIT
|
|
5
6
|
*/
|
|
6
7
|
export {};
|
|
7
8
|
//# sourceMappingURL=PseudoTerminal.Types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PseudoTerminal.Types.js","sourceRoot":"","sources":["../../Source/PseudoTerminal/PseudoTerminal.Types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"PseudoTerminal.Types.js","sourceRoot":"","sources":["../../Source/PseudoTerminal/PseudoTerminal.Types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @file PseudoTerminal.ts
|
|
3
|
+
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
+
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
import { type IPty, type IPtyForkOptions, type IWindowsPtyForkOptions } from "node-pty";
|
|
8
|
+
export declare function Spawn(Command: string, Arguments: Array<string>, Options: IPtyForkOptions | IWindowsPtyForkOptions): IPty;
|
|
2
9
|
//# sourceMappingURL=PseudoTerminal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PseudoTerminal.d.ts","sourceRoot":"","sources":["../../Source/PseudoTerminal/PseudoTerminal.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PseudoTerminal.d.ts","sourceRoot":"","sources":["../../Source/PseudoTerminal/PseudoTerminal.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,eAAe,EAAE,KAAK,sBAAsB,EAAS,MAAM,UAAU,CAAC;AAE/F,wBAAgB,KAAK,CACjB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,EACxB,OAAO,EAAE,eAAe,GAAG,sBAAsB,GAClD,IAAI,CAkBN"}
|
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
1
|
+
/**
|
|
2
|
+
* @file PseudoTerminal.ts
|
|
3
|
+
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
+
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
+
* @license MIT
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
import { spawn } from "node-pty";
|
|
8
|
+
export function Spawn(Command, Arguments, Options) {
|
|
9
|
+
const DefaultOptions = {
|
|
10
|
+
cols: process.stdout.columns || 80,
|
|
11
|
+
cwd: process.cwd(),
|
|
12
|
+
env: process.env,
|
|
13
|
+
name: "xterm-color",
|
|
14
|
+
rows: process.stdout.rows || 30
|
|
15
|
+
};
|
|
16
|
+
const OutOptions = {
|
|
17
|
+
...DefaultOptions,
|
|
18
|
+
...Options
|
|
19
|
+
};
|
|
20
|
+
return spawn(Command, Arguments, OutOptions);
|
|
21
|
+
}
|
|
10
22
|
//# sourceMappingURL=PseudoTerminal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PseudoTerminal.js","sourceRoot":"","sources":["../../Source/PseudoTerminal/PseudoTerminal.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"PseudoTerminal.js","sourceRoot":"","sources":["../../Source/PseudoTerminal/PseudoTerminal.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAgE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE/F,MAAM,UAAU,KAAK,CACjB,OAAe,EACf,SAAwB,EACxB,OAAiD;IAGjD,MAAM,cAAc,GAChB;QACI,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE;QAClC,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;QAClB,GAAG,EAAE,OAAO,CAAC,GAA6B;QAC1C,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE;KAClC,CAAC;IAEN,MAAM,UAAU,GACZ;QACI,GAAG,cAAc;QACjB,GAAG,OAAO;KACb,CAAC;IAEN,OAAO,KAAK,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../Source/PseudoTerminal/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../Source/PseudoTerminal/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
1
|
+
/**
|
|
2
|
+
* @file index.ts
|
|
3
|
+
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
+
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
+
* @license MIT
|
|
5
6
|
*/
|
|
6
7
|
export * from "./PseudoTerminal.js";
|
|
7
8
|
export * from "./PseudoTerminal.Types.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../Source/PseudoTerminal/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../Source/PseudoTerminal/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC"}
|
package/Distribution/index.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file index.ts
|
|
3
|
+
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
+
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
1
7
|
export * from "./Inquirer/Confirm.js";
|
|
8
|
+
export * as Command from "./Command/index.js";
|
|
2
9
|
export * as Listr from "./Listr/index.js";
|
|
3
10
|
export * as Inquirer from "./Inquirer/index.js";
|
|
11
|
+
export * as PseudoTerminal from "./PseudoTerminal/index.js";
|
|
4
12
|
export * as Format from "./Format/index.js";
|
|
5
13
|
export * as Ora from "./Ora/index.js";
|
|
6
14
|
//# sourceMappingURL=index.d.ts.map
|