@sorrell/cli-utilities 1.0.55 → 1.0.57
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.js +1 -1
- package/Distribution/Command/Command.js.map +1 -1
- package/package.json +2 -2
- package/tsconfig.json +1 -1
- package/Distribution/Confirm.Types.d.ts +0 -9
- package/Distribution/Confirm.Types.d.ts.map +0 -1
- package/Distribution/Confirm.Types.js +0 -7
- package/Distribution/Confirm.Types.js.map +0 -1
- package/Distribution/Confirm.d.ts +0 -11
- package/Distribution/Confirm.d.ts.map +0 -1
- package/Distribution/Confirm.js +0 -64
- package/Distribution/Confirm.js.map +0 -1
- package/Distribution/English.Types.d.ts +0 -2
- package/Distribution/English.Types.d.ts.map +0 -1
- package/Distribution/English.Types.js +0 -8
- package/Distribution/English.Types.js.map +0 -1
- package/Distribution/English.d.ts +0 -2
- package/Distribution/English.d.ts.map +0 -1
- package/Distribution/English.js +0 -2
- package/Distribution/English.js.map +0 -1
- package/Distribution/FileSelector.Types.d.ts +0 -9
- package/Distribution/FileSelector.Types.d.ts.map +0 -1
- package/Distribution/FileSelector.Types.js +0 -7
- package/Distribution/FileSelector.Types.js.map +0 -1
- package/Distribution/FileSelector.d.ts +0 -4
- package/Distribution/FileSelector.d.ts.map +0 -1
- package/Distribution/FileSelector.js +0 -46
- package/Distribution/FileSelector.js.map +0 -1
- package/Distribution/FileSystem/FileSystem.Types.Internal.d.ts +0 -23
- package/Distribution/FileSystem/FileSystem.Types.Internal.d.ts.map +0 -1
- package/Distribution/FileSystem/FileSystem.Types.Internal.js +0 -8
- package/Distribution/FileSystem/FileSystem.Types.Internal.js.map +0 -1
- package/Distribution/Inquirer/Confirm.Types.d.ts +0 -15
- package/Distribution/Inquirer/Confirm.Types.d.ts.map +0 -1
- package/Distribution/Inquirer/Confirm.Types.js +0 -8
- package/Distribution/Inquirer/Confirm.Types.js.map +0 -1
- package/Distribution/Inquirer/Confirm.d.ts +0 -17
- package/Distribution/Inquirer/Confirm.d.ts.map +0 -1
- package/Distribution/Inquirer/Confirm.js +0 -65
- package/Distribution/Inquirer/Confirm.js.map +0 -1
- package/Distribution/Inquirer/FileSelector.Types.d.ts +0 -15
- package/Distribution/Inquirer/FileSelector.Types.d.ts.map +0 -1
- package/Distribution/Inquirer/FileSelector.Types.js +0 -8
- package/Distribution/Inquirer/FileSelector.Types.js.map +0 -1
- package/Distribution/Inquirer/FileSelector.d.ts +0 -21
- package/Distribution/Inquirer/FileSelector.d.ts.map +0 -1
- package/Distribution/Inquirer/FileSelector.js +0 -58
- package/Distribution/Inquirer/FileSelector.js.map +0 -1
- package/Distribution/Inquirer/index.d.ts +0 -11
- package/Distribution/Inquirer/index.d.ts.map +0 -1
- package/Distribution/Inquirer/index.js +0 -11
- package/Distribution/Inquirer/index.js.map +0 -1
- package/Distribution/Listr.Types.d.ts +0 -4
- package/Distribution/Listr.Types.d.ts.map +0 -1
- package/Distribution/Listr.Types.js +0 -7
- package/Distribution/Listr.Types.js.map +0 -1
- package/Distribution/Listr.d.ts +0 -22
- package/Distribution/Listr.d.ts.map +0 -1
- package/Distribution/Listr.js +0 -57
- package/Distribution/Listr.js.map +0 -1
- package/Distribution/Ora.Types.d.ts +0 -10
- package/Distribution/Ora.Types.d.ts.map +0 -1
- package/Distribution/Ora.Types.js +0 -7
- package/Distribution/Ora.Types.js.map +0 -1
- package/Distribution/Ora.d.ts +0 -27
- package/Distribution/Ora.d.ts.map +0 -1
- package/Distribution/Ora.js +0 -75
- package/Distribution/Ora.js.map +0 -1
- package/Distribution/PackageConfig/Index.Inner.d.ts +0 -8
- package/Distribution/PackageConfig/Index.Inner.d.ts.map +0 -1
- package/Distribution/PackageConfig/Index.Inner.js +0 -8
- package/Distribution/PackageConfig/Index.Inner.js.map +0 -1
- package/Distribution/PackageConfig/PackageConfig.Types.d.ts +0 -8
- package/Distribution/PackageConfig/PackageConfig.Types.d.ts.map +0 -1
- package/Distribution/PackageConfig/PackageConfig.Types.js +0 -8
- package/Distribution/PackageConfig/PackageConfig.Types.js.map +0 -1
- package/Distribution/Print/Print.Internal.Types.d.ts +0 -4
- package/Distribution/Print/Print.Internal.Types.d.ts.map +0 -1
- package/Distribution/Print/Print.Internal.Types.js +0 -7
- package/Distribution/Print/Print.Internal.Types.js.map +0 -1
- package/Distribution/Print/Print.Internal.d.ts +0 -14
- package/Distribution/Print/Print.Internal.d.ts.map +0 -1
- package/Distribution/Print/Print.Internal.js +0 -78
- package/Distribution/Print/Print.Internal.js.map +0 -1
- package/Distribution/Print/Print.Types.d.ts +0 -13
- package/Distribution/Print/Print.Types.d.ts.map +0 -1
- package/Distribution/Print/Print.Types.js +0 -7
- package/Distribution/Print/Print.Types.js.map +0 -1
- package/Distribution/Print/Print.d.ts +0 -42
- package/Distribution/Print/Print.d.ts.map +0 -1
- package/Distribution/Print/Print.js +0 -95
- package/Distribution/Print/Print.js.map +0 -1
- package/Distribution/Print/index.d.ts +0 -3
- package/Distribution/Print/index.d.ts.map +0 -1
- package/Distribution/Print/index.js +0 -8
- package/Distribution/Print/index.js.map +0 -1
- package/Distribution/Print.d.ts +0 -3
- package/Distribution/Print.d.ts.map +0 -1
- package/Distribution/Print.js +0 -16
- package/Distribution/Print.js.map +0 -1
|
@@ -68,7 +68,7 @@ export function RunCli(Name, Version, SubCommands) {
|
|
|
68
68
|
/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */
|
|
69
69
|
const MainCommand = Command.make(Name, {}, (_) => Effect.succeed(undefined));
|
|
70
70
|
const CliRunnable = Command.run(MainCommand.pipe(Command.withSubcommands(SubCommands)), {
|
|
71
|
-
name:
|
|
71
|
+
name: Name,
|
|
72
72
|
version: Version
|
|
73
73
|
});
|
|
74
74
|
CliRunnable(process.argv).pipe(Effect.provide(NodeContext.layer), NodeRuntime.runMain);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Command.js","sourceRoot":"","sources":["../../Source/Command/Command.ts"],"names":[],"mappings":"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,OAAO,CACtB,CAAC;AACN,CAAC;AAED,yCAAyC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sorrell/cli-utilities",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.57",
|
|
4
4
|
"bin": {
|
|
5
5
|
"cli-utilities": "./Distribution/Bin/Bin.js"
|
|
6
6
|
},
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"@effect/cli": "0.75.1",
|
|
96
96
|
"@effect/platform": "^0.96.0",
|
|
97
97
|
"@listr2/prompt-adapter-enquirer": "^4.2.1",
|
|
98
|
-
"@sorrell/utilities": "1.2.
|
|
98
|
+
"@sorrell/utilities": "1.2.14",
|
|
99
99
|
"chalk": "^5.6.2",
|
|
100
100
|
"cli-table3": "^0.6.5",
|
|
101
101
|
"clipboardy": "^5.3.1",
|
package/tsconfig.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { PartialDeep } from "@inquirer/type";
|
|
2
|
-
import type { Theme } from "@inquirer/core";
|
|
3
|
-
/** The configuration object for {@link Confirm}. */
|
|
4
|
-
export type FConfirmConfig = {
|
|
5
|
-
message: string;
|
|
6
|
-
default?: boolean;
|
|
7
|
-
theme?: PartialDeep<Theme>;
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=Confirm.Types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Confirm.Types.d.ts","sourceRoot":"","sources":["../Source/Confirm.Types.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,oDAAoD;AACpD,MAAM,MAAM,cAAc,GACtB;IACI,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;CAC9B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Confirm.Types.js","sourceRoot":"","sources":["../Source/Confirm.Types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { FConfirmConfig } from "./index.js";
|
|
2
|
-
import type { Prompt } from "@inquirer/type";
|
|
3
|
-
/**
|
|
4
|
-
* An `inquirer` prompt identical to `confirm`, but with more natural handling of keypresses.
|
|
5
|
-
*
|
|
6
|
-
* @param config - The configuration for this prompt.
|
|
7
|
-
*
|
|
8
|
-
* @returns The `boolean` corresponding to the user's choice.
|
|
9
|
-
*/
|
|
10
|
-
export declare const Confirm: Prompt<boolean, FConfirmConfig>;
|
|
11
|
-
//# sourceMappingURL=Confirm.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Confirm.d.ts","sourceRoot":"","sources":["../Source/Confirm.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAa7C;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,cAAc,CAwDnD,CAAC"}
|
package/Distribution/Confirm.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/* File: Confirm.ts
|
|
2
|
-
* Author: Gage Sorrell <gage@sorrell.sh>
|
|
3
|
-
* Copyright: (c) 2026 Gage Sorrell
|
|
4
|
-
* License: MIT
|
|
5
|
-
*/
|
|
6
|
-
import { createPrompt, isEnterKey, makeTheme, useKeypress, usePrefix, useState } from "@inquirer/core";
|
|
7
|
-
/**
|
|
8
|
-
* @param Value - The answer.
|
|
9
|
-
* @returns The string to display for the given answer.
|
|
10
|
-
*/
|
|
11
|
-
function GetAnswerString(Value) {
|
|
12
|
-
return Value ? "Yes" : "No";
|
|
13
|
-
}
|
|
14
|
-
/* eslint-disable jsdoc/require-jsdoc */
|
|
15
|
-
/**
|
|
16
|
-
* An `inquirer` prompt identical to `confirm`, but with more natural handling of keypresses.
|
|
17
|
-
*
|
|
18
|
-
* @param config - The configuration for this prompt.
|
|
19
|
-
*
|
|
20
|
-
* @returns The `boolean` corresponding to the user's choice.
|
|
21
|
-
*/
|
|
22
|
-
export const Confirm = createPrompt((Configuration, Done) => {
|
|
23
|
-
const [status, SetStatus] = useState("idle");
|
|
24
|
-
const [DisplayValue, SetDisplayValue] = useState("");
|
|
25
|
-
const theme = makeTheme(Configuration.theme);
|
|
26
|
-
const Prefix = usePrefix({ status, theme });
|
|
27
|
-
useKeypress((Key) => {
|
|
28
|
-
if (status !== "idle") {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
const KeyName = Key.name?.toLowerCase();
|
|
32
|
-
if (KeyName === "y") {
|
|
33
|
-
SetDisplayValue(theme.style.answer("Yes"));
|
|
34
|
-
SetStatus("done");
|
|
35
|
-
Done(true);
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
if (KeyName === "n") {
|
|
39
|
-
SetDisplayValue(theme.style.answer("No"));
|
|
40
|
-
SetStatus("done");
|
|
41
|
-
Done(false);
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
if (isEnterKey(Key)) {
|
|
45
|
-
const Answer = Configuration.default ?? true;
|
|
46
|
-
SetDisplayValue(theme.style.answer(GetAnswerString(Answer)));
|
|
47
|
-
SetStatus("done");
|
|
48
|
-
Done(Answer);
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
const DefaultHint = status === "idle"
|
|
52
|
-
? ` ${theme.style.defaultAnswer(Configuration.default === false ? "y/N" : "Y/n")}`
|
|
53
|
-
: "";
|
|
54
|
-
return [
|
|
55
|
-
Prefix,
|
|
56
|
-
" ",
|
|
57
|
-
theme.style.message(Configuration.message, status),
|
|
58
|
-
DefaultHint,
|
|
59
|
-
" ",
|
|
60
|
-
DisplayValue
|
|
61
|
-
].join("");
|
|
62
|
-
});
|
|
63
|
-
/* eslint-enable jsdoc/require-jsdoc */
|
|
64
|
-
//# sourceMappingURL=Confirm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Confirm.js","sourceRoot":"","sources":["../Source/Confirm.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAIH,YAAY,EACZ,UAAU,EACV,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAIrC;;;GAGG;AACH,SAAS,eAAe,CAAC,KAAc;IAEnC,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAChC,CAAC;AAED,wCAAwC;AAExC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,OAAO,GAAoC,YAAY,CAChE,CAAC,aAA6B,EAAE,IAAgC,EAAE,EAAE;IAEhE,MAAM,CAAE,MAAM,EAAE,SAAS,CAAE,GAAG,QAAQ,CAAS,MAAM,CAAC,CAAC;IACvD,MAAM,CAAE,YAAY,EAAE,eAAe,CAAE,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvD,MAAM,KAAK,GAAU,SAAS,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,MAAM,GAAW,SAAS,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IAEpD,WAAW,CAAC,CAAC,GAAkB,EAAE,EAAE;QAE/B,IAAI,MAAM,KAAK,MAAM,EACrB,CAAC;YACG,OAAO;QACX,CAAC;QAED,MAAM,OAAO,GAAW,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,CAAC;QAEhD,IAAI,OAAO,KAAK,GAAG,EACnB,CAAC;YACG,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAC3C,SAAS,CAAC,MAAM,CAAC,CAAC;YAClB,IAAI,CAAC,IAAI,CAAC,CAAC;YACX,OAAO;QACX,CAAC;QAED,IAAI,OAAO,KAAK,GAAG,EACnB,CAAC;YACG,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;YAC1C,SAAS,CAAC,MAAM,CAAC,CAAC;YAClB,IAAI,CAAC,KAAK,CAAC,CAAC;YACZ,OAAO;QACX,CAAC;QAED,IAAI,UAAU,CAAC,GAAG,CAAC,EACnB,CAAC;YACG,MAAM,MAAM,GAAY,aAAa,CAAC,OAAO,IAAI,IAAI,CAAC;YACtD,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC7D,SAAS,CAAC,MAAM,CAAC,CAAC;YAClB,IAAI,CAAC,MAAM,CAAC,CAAC;QACjB,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,MAAM,WAAW,GACb,MAAM,KAAK,MAAM;QACb,CAAC,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE;QAClF,CAAC,CAAC,EAAE,CAAC;IAEb,OAAO;QACH,MAAM;QACN,GAAG;QACH,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC;QAClD,WAAW;QACX,GAAG;QACH,YAAY;KACf,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACf,CAAC,CACJ,CAAC;AAEF,uCAAuC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"English.Types.d.ts","sourceRoot":"","sources":["../Source/English.Types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"English.Types.js","sourceRoot":"","sources":["../Source/English.Types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,kCAAkC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"English.d.ts","sourceRoot":"","sources":["../Source/English.ts"],"names":[],"mappings":""}
|
package/Distribution/English.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"English.js","sourceRoot":"","sources":["../Source/English.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { PromptConfig } from "@sorrell/inquirer-file-selector";
|
|
2
|
-
export type { Item } from "@sorrell/inquirer-file-selector";
|
|
3
|
-
export type FFileSelectorConfigFull = PromptConfig & {
|
|
4
|
-
allowCancel?: false;
|
|
5
|
-
multiple?: false;
|
|
6
|
-
};
|
|
7
|
-
export type FFileSelectorConfigBase = Omit<FFileSelectorConfigFull, "message" | "allowCancel">;
|
|
8
|
-
export type FFileSelectorConfig = Pick<FFileSelectorConfigFull, "filter" | "message" | "type" | "theme"> & Partial<Pick<FFileSelectorConfigFull, "allowCancel" | "basePath">>;
|
|
9
|
-
//# sourceMappingURL=FileSelector.Types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileSelector.Types.d.ts","sourceRoot":"","sources":["../Source/FileSelector.Types.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,YAAY,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC;AAE5D,MAAM,MAAM,uBAAuB,GAC/B,YAAY,GACZ;IACI,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC;CACpB,CAAC;AAEN,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,uBAAuB,EAAG,SAAS,GAAG,aAAa,CAAC,CAAC;AAEhG,MAAM,MAAM,mBAAmB,GAC3B,IAAI,CAAC,uBAAuB,EACtB,QAAQ,GACR,SAAS,GACT,MAAM,GACN,OAAO,CACZ,GACD,OAAO,CAAC,IAAI,CACR,uBAAuB,EACrB,aAAa,GACb,UAAU,CACf,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileSelector.Types.js","sourceRoot":"","sources":["../Source/FileSelector.Types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileSelector.d.ts","sourceRoot":"","sources":["../Source/FileSelector.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACR,mBAAmB,EAEM,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,KAAK,IAAI,EAAkC,MAAM,iCAAiC,CAAC;AAI5F,wBAAsB,YAAY,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsD7E"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/* File: FileSelector.ts
|
|
2
|
-
* Author: Gage Sorrell <gage@sorrell.sh>
|
|
3
|
-
* Copyright: (c) 2026 Gage Sorrell
|
|
4
|
-
* License: MIT
|
|
5
|
-
*/
|
|
6
|
-
import { fileSelector } from "@sorrell/inquirer-file-selector";
|
|
7
|
-
export async function FileSelector(Config) {
|
|
8
|
-
const { theme: InTheme, ...RemainingConfig } = Config;
|
|
9
|
-
const InThemeKeys = InTheme?.labels?.keys;
|
|
10
|
-
const BaseThemeKeys = {
|
|
11
|
-
back: "←",
|
|
12
|
-
down: "↓",
|
|
13
|
-
forward: "→",
|
|
14
|
-
up: "↑"
|
|
15
|
-
};
|
|
16
|
-
const keys = InThemeKeys === undefined
|
|
17
|
-
? BaseThemeKeys
|
|
18
|
-
: { ...BaseThemeKeys, ...InThemeKeys };
|
|
19
|
-
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
|
|
20
|
-
const { keys: _Keys, ...RemainingInLabels } = InTheme?.labels || { labels: {} };
|
|
21
|
-
const theme = {
|
|
22
|
-
labels: {
|
|
23
|
-
keys,
|
|
24
|
-
...RemainingInLabels
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
const BaseConfig = {
|
|
28
|
-
keybinds: {
|
|
29
|
-
back: ["left"],
|
|
30
|
-
confirm: ["enter", "return"],
|
|
31
|
-
down: ["down"],
|
|
32
|
-
forward: ["right"],
|
|
33
|
-
up: ["up"]
|
|
34
|
-
},
|
|
35
|
-
loop: false,
|
|
36
|
-
multiple: false,
|
|
37
|
-
theme,
|
|
38
|
-
type: "directory"
|
|
39
|
-
};
|
|
40
|
-
const MergedConfig = {
|
|
41
|
-
...BaseConfig,
|
|
42
|
-
...RemainingConfig
|
|
43
|
-
};
|
|
44
|
-
return await fileSelector(MergedConfig);
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=FileSelector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileSelector.js","sourceRoot":"","sources":["../Source/FileSelector.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAA+B,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAI5F,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAA2B;IAE1D,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,eAAe,EAAE,GAAG,MAAM,CAAC;IAEtD,MAAM,WAAW,GACb,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC;IAE1B,MAAM,aAAa,GACf;QACI,IAAI,EAAE,GAAG;QACT,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,GAAG;QACZ,EAAE,EAAE,GAAG;KACV,CAAC;IAEN,MAAM,IAAI,GAA2C,WAAW,KAAK,SAAS;QAC1E,CAAC,CAAC,aAAa;QACf,CAAC,CAAC,EAAE,GAAG,aAAa,EAAE,GAAG,WAAW,EAAE,CAAC;IAE3C,gEAAgE;IAChE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,iBAAiB,EAAE,GAAG,OAAO,EAAE,MAAM,IAAI,EAAE,MAAM,EAAE,EAAG,EAAE,CAAC;IAEjF,MAAM,KAAK,GACP;QACI,MAAM,EACN;YACI,IAAI;YACJ,GAAG,iBAAiB;SACvB;KACJ,CAAC;IAEN,MAAM,UAAU,GACZ;QACI,QAAQ,EACR;YACI,IAAI,EAAE,CAAE,MAAM,CAAE;YAChB,OAAO,EAAE,CAAE,OAAO,EAAE,QAAQ,CAAE;YAC9B,IAAI,EAAE,CAAE,MAAM,CAAE;YAChB,OAAO,EAAE,CAAE,OAAO,CAAE;YACpB,EAAE,EAAE,CAAE,IAAI,CAAE;SACf;QACD,IAAI,EAAE,KAAK;QACX,QAAQ,EAAE,KAAK;QACf,KAAK;QACL,IAAI,EAAE,WAAW;KACpB,CAAC;IAEN,MAAM,YAAY,GACd;QACI,GAAG,UAAU;QACb,GAAG,eAAe;KACrB,CAAC;IAEN,OAAO,MAAM,YAAY,CAAC,YAAY,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file FileSystem.Types.Internal.ts
|
|
3
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/
|
|
7
|
-
export type FDeletePhase = "Scanning" | "Deleting" | "Done";
|
|
8
|
-
export type FDeleteEntryKind = "File" | "Directory" | "Other";
|
|
9
|
-
export type FDeleteEntry = {
|
|
10
|
-
EntryPath: string;
|
|
11
|
-
Kind: FDeleteEntryKind;
|
|
12
|
-
Size: number;
|
|
13
|
-
};
|
|
14
|
-
export type FDeleteProgress = {
|
|
15
|
-
Phase: FDeletePhase;
|
|
16
|
-
CurrentPath: string | null;
|
|
17
|
-
DiscoveredEntries: number;
|
|
18
|
-
TotalEntries: number;
|
|
19
|
-
DeletedEntries: number;
|
|
20
|
-
TotalBytes: number;
|
|
21
|
-
DeletedBytes: number;
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=FileSystem.Types.Internal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileSystem.Types.Internal.d.ts","sourceRoot":"","sources":["../../Source/FileSystem/FileSystem.Types.Internal.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,YAAY,GAClB,UAAU,GACV,UAAU,GACV,MAAM,CAAC;AAEb,MAAM,MAAM,gBAAgB,GACtB,MAAM,GACN,WAAW,GACX,OAAO,CAAC;AAEd,MAAM,MAAM,YAAY,GACpB;IACI,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,gBAAgB,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC;AAEN,MAAM,MAAM,eAAe,GACvB;IACI,KAAK,EAAE,YAAY,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileSystem.Types.Internal.js","sourceRoot":"","sources":["../../Source/FileSystem/FileSystem.Types.Internal.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Confirm.Types.ts
|
|
3
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/
|
|
7
|
-
import type { PartialDeep } from "@inquirer/type";
|
|
8
|
-
import type { Theme } from "@inquirer/core";
|
|
9
|
-
/** The configuration object for {@link Confirm}. */
|
|
10
|
-
export type FConfirmConfig = {
|
|
11
|
-
message: string;
|
|
12
|
-
default?: boolean;
|
|
13
|
-
theme?: PartialDeep<Theme>;
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=Confirm.Types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Confirm.Types.d.ts","sourceRoot":"","sources":["../../Source/Inquirer/Confirm.Types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,oDAAoD;AACpD,MAAM,MAAM,cAAc,GACtB;IACI,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;CAC9B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Confirm.Types.js","sourceRoot":"","sources":["../../Source/Inquirer/Confirm.Types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Confirm.ts
|
|
3
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/
|
|
7
|
-
import type { FConfirmConfig } from "./Confirm.Types.js";
|
|
8
|
-
import type { Prompt } from "@inquirer/type";
|
|
9
|
-
/**
|
|
10
|
-
* An `inquirer` prompt identical to `confirm`, but with more natural handling of keypresses.
|
|
11
|
-
*
|
|
12
|
-
* @param config - The configuration for this prompt.
|
|
13
|
-
*
|
|
14
|
-
* @returns The `boolean` corresponding to the user's choice.
|
|
15
|
-
*/
|
|
16
|
-
export declare const Confirm: Prompt<boolean, FConfirmConfig>;
|
|
17
|
-
//# sourceMappingURL=Confirm.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Confirm.d.ts","sourceRoot":"","sources":["../../Source/Inquirer/Confirm.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAYH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAa7C;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,cAAc,CAwDnD,CAAC"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Confirm.ts
|
|
3
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/
|
|
7
|
-
import { createPrompt, isEnterKey, makeTheme, useKeypress, usePrefix, useState } from "@inquirer/core";
|
|
8
|
-
/**
|
|
9
|
-
* @param Value - The answer.
|
|
10
|
-
* @returns The string to display for the given answer.
|
|
11
|
-
*/
|
|
12
|
-
function GetAnswerString(Value) {
|
|
13
|
-
return Value ? "Yes" : "No";
|
|
14
|
-
}
|
|
15
|
-
/* eslint-disable jsdoc/require-jsdoc */
|
|
16
|
-
/**
|
|
17
|
-
* An `inquirer` prompt identical to `confirm`, but with more natural handling of keypresses.
|
|
18
|
-
*
|
|
19
|
-
* @param config - The configuration for this prompt.
|
|
20
|
-
*
|
|
21
|
-
* @returns The `boolean` corresponding to the user's choice.
|
|
22
|
-
*/
|
|
23
|
-
export const Confirm = createPrompt((Configuration, Done) => {
|
|
24
|
-
const [status, SetStatus] = useState("idle");
|
|
25
|
-
const [DisplayValue, SetDisplayValue] = useState("");
|
|
26
|
-
const theme = makeTheme(Configuration.theme);
|
|
27
|
-
const Prefix = usePrefix({ status, theme });
|
|
28
|
-
useKeypress((Key) => {
|
|
29
|
-
if (status !== "idle") {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
const KeyName = Key.name?.toLowerCase();
|
|
33
|
-
if (KeyName === "y") {
|
|
34
|
-
SetDisplayValue(theme.style.answer("Yes"));
|
|
35
|
-
SetStatus("done");
|
|
36
|
-
Done(true);
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
if (KeyName === "n") {
|
|
40
|
-
SetDisplayValue(theme.style.answer("No"));
|
|
41
|
-
SetStatus("done");
|
|
42
|
-
Done(false);
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
if (isEnterKey(Key)) {
|
|
46
|
-
const Answer = Configuration.default ?? true;
|
|
47
|
-
SetDisplayValue(theme.style.answer(GetAnswerString(Answer)));
|
|
48
|
-
SetStatus("done");
|
|
49
|
-
Done(Answer);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
const DefaultHint = status === "idle"
|
|
53
|
-
? ` ${theme.style.defaultAnswer(Configuration.default === false ? "y/N" : "Y/n")}`
|
|
54
|
-
: "";
|
|
55
|
-
return [
|
|
56
|
-
Prefix,
|
|
57
|
-
" ",
|
|
58
|
-
theme.style.message(Configuration.message, status),
|
|
59
|
-
DefaultHint,
|
|
60
|
-
" ",
|
|
61
|
-
DisplayValue
|
|
62
|
-
].join("");
|
|
63
|
-
});
|
|
64
|
-
/* eslint-enable jsdoc/require-jsdoc */
|
|
65
|
-
//# sourceMappingURL=Confirm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Confirm.js","sourceRoot":"","sources":["../../Source/Inquirer/Confirm.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAIH,YAAY,EACZ,UAAU,EACV,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAIrC;;;GAGG;AACH,SAAS,eAAe,CAAC,KAAc;IAEnC,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAChC,CAAC;AAED,wCAAwC;AAExC;;;;;;GAMG;AACH,MAAM,CAAC,M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C,MAAM,CAAC,CAAC;QACjB,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,MAAM,WAAW,GACb,MAAM,KAAK,MAAM;QACb,CAAC,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE;QAClF,CAAC,CAAC,EAAE,CAAC;IAEb,OAAO;QACH,MAAM;QACN,GAAG;QACH,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC;QAClD,WAAW;QACX,GAAG;QACH,YAAY;KACf,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACf,CAAC,CACJ,CAAC;AAEF,uCAAuC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file FileSelector.Types.ts
|
|
3
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/
|
|
7
|
-
import type { PromptConfig } from "@sorrell/inquirer-file-selector";
|
|
8
|
-
export type { Item } from "@sorrell/inquirer-file-selector";
|
|
9
|
-
export type FFileSelectorConfigFull = PromptConfig & {
|
|
10
|
-
allowCancel?: false;
|
|
11
|
-
multiple?: false;
|
|
12
|
-
};
|
|
13
|
-
export type FFileSelectorConfigBase = Omit<FFileSelectorConfigFull, "message" | "allowCancel">;
|
|
14
|
-
export type FFileSelectorConfig = Pick<FFileSelectorConfigFull, "filter" | "message" | "type" | "theme"> & Partial<Pick<FFileSelectorConfigFull, "allowCancel" | "basePath">>;
|
|
15
|
-
//# sourceMappingURL=FileSelector.Types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileSelector.Types.d.ts","sourceRoot":"","sources":["../../Source/Inquirer/FileSelector.Types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,YAAY,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC;AAE5D,MAAM,MAAM,uBAAuB,GAC/B,YAAY,GACZ;IACI,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC;CACpB,CAAC;AAEN,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,uBAAuB,EAAG,SAAS,GAAG,aAAa,CAAC,CAAC;AAEhG,MAAM,MAAM,mBAAmB,GAC3B,IAAI,CAAC,uBAAuB,EACtB,QAAQ,GACR,SAAS,GACT,MAAM,GACN,OAAO,CACZ,GACD,OAAO,CAAC,IAAI,CACR,uBAAuB,EACrB,aAAa,GACb,UAAU,CACf,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileSelector.Types.js","sourceRoot":"","sources":["../../Source/Inquirer/FileSelector.Types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file FileSelector.ts
|
|
3
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/
|
|
7
|
-
import type { FFileSelectorConfig } from "./FileSelector.Types.js";
|
|
8
|
-
import { type Item } from "@sorrell/inquirer-file-selector";
|
|
9
|
-
/**
|
|
10
|
-
* Create an {@link https://www.npmjs.com/package/@inquirer/prompts | Inquirer} prompt for
|
|
11
|
-
* browsing and selecting a file or directory.
|
|
12
|
-
*
|
|
13
|
-
* This wraps {@link https://www.npmjs.com/package/inquirer-file-selector | inquirer-file-selector}.
|
|
14
|
-
*
|
|
15
|
-
* @deprecated An enquirer-based alternative needs to be found or built.
|
|
16
|
-
*
|
|
17
|
-
* @param Config - The options for the prompt.
|
|
18
|
-
* @returns The `Item` selected by the user via the prompt.
|
|
19
|
-
*/
|
|
20
|
-
export declare function FileSelector(Config: FFileSelectorConfig): Promise<Item>;
|
|
21
|
-
//# sourceMappingURL=FileSelector.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileSelector.d.ts","sourceRoot":"","sources":["../../Source/Inquirer/FileSelector.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACR,mBAAmB,EAEM,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,KAAK,IAAI,EAAkC,MAAM,iCAAiC,CAAC;AAI5F;;;;;;;;;;GAUG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsD7E"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file FileSelector.ts
|
|
3
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/
|
|
7
|
-
import { fileSelector } from "@sorrell/inquirer-file-selector";
|
|
8
|
-
/**
|
|
9
|
-
* Create an {@link https://www.npmjs.com/package/@inquirer/prompts | Inquirer} prompt for
|
|
10
|
-
* browsing and selecting a file or directory.
|
|
11
|
-
*
|
|
12
|
-
* This wraps {@link https://www.npmjs.com/package/inquirer-file-selector | inquirer-file-selector}.
|
|
13
|
-
*
|
|
14
|
-
* @deprecated An enquirer-based alternative needs to be found or built.
|
|
15
|
-
*
|
|
16
|
-
* @param Config - The options for the prompt.
|
|
17
|
-
* @returns The `Item` selected by the user via the prompt.
|
|
18
|
-
*/
|
|
19
|
-
export async function FileSelector(Config) {
|
|
20
|
-
const { theme: InTheme, ...RemainingConfig } = Config;
|
|
21
|
-
const InThemeKeys = InTheme?.labels?.keys;
|
|
22
|
-
const BaseThemeKeys = {
|
|
23
|
-
back: "←",
|
|
24
|
-
down: "↓",
|
|
25
|
-
forward: "→",
|
|
26
|
-
up: "↑"
|
|
27
|
-
};
|
|
28
|
-
const keys = InThemeKeys === undefined
|
|
29
|
-
? BaseThemeKeys
|
|
30
|
-
: { ...BaseThemeKeys, ...InThemeKeys };
|
|
31
|
-
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
|
|
32
|
-
const { keys: _Keys, ...RemainingInLabels } = InTheme?.labels || { labels: {} };
|
|
33
|
-
const theme = {
|
|
34
|
-
labels: {
|
|
35
|
-
keys,
|
|
36
|
-
...RemainingInLabels
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
const BaseConfig = {
|
|
40
|
-
keybinds: {
|
|
41
|
-
back: ["left"],
|
|
42
|
-
confirm: ["enter", "return"],
|
|
43
|
-
down: ["down"],
|
|
44
|
-
forward: ["right"],
|
|
45
|
-
up: ["up"]
|
|
46
|
-
},
|
|
47
|
-
loop: false,
|
|
48
|
-
multiple: false,
|
|
49
|
-
theme,
|
|
50
|
-
type: "directory"
|
|
51
|
-
};
|
|
52
|
-
const MergedConfig = {
|
|
53
|
-
...BaseConfig,
|
|
54
|
-
...RemainingConfig
|
|
55
|
-
};
|
|
56
|
-
return await fileSelector(MergedConfig);
|
|
57
|
-
}
|
|
58
|
-
//# sourceMappingURL=FileSelector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileSelector.js","sourceRoot":"","sources":["../../Source/Inquirer/FileSelector.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAA+B,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAI5F;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAA2B;IAE1D,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,eAAe,EAAE,GAAG,MAAM,CAAC;IAEtD,MAAM,WAAW,GACb,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC;IAE1B,MAAM,aAAa,GACf;QACI,IAAI,EAAE,GAAG;QACT,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,GAAG;QACZ,EAAE,EAAE,GAAG;KACV,CAAC;IAEN,MAAM,IAAI,GAA2C,WAAW,KAAK,SAAS;QAC1E,CAAC,CAAC,aAAa;QACf,CAAC,CAAC,EAAE,GAAG,aAAa,EAAE,GAAG,WAAW,EAAE,CAAC;IAE3C,gEAAgE;IAChE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,iBAAiB,EAAE,GAAG,OAAO,EAAE,MAAM,IAAI,EAAE,MAAM,EAAE,EAAG,EAAE,CAAC;IAEjF,MAAM,KAAK,GACP;QACI,MAAM,EACN;YACI,IAAI;YACJ,GAAG,iBAAiB;SACvB;KACJ,CAAC;IAEN,MAAM,UAAU,GACZ;QACI,QAAQ,EACR;YACI,IAAI,EAAE,CAAE,MAAM,CAAE;YAChB,OAAO,EAAE,CAAE,OAAO,EAAE,QAAQ,CAAE;YAC9B,IAAI,EAAE,CAAE,MAAM,CAAE;YAChB,OAAO,EAAE,CAAE,OAAO,CAAE;YACpB,EAAE,EAAE,CAAE,IAAI,CAAE;SACf;QACD,IAAI,EAAE,KAAK;QACX,QAAQ,EAAE,KAAK;QACf,KAAK;QACL,IAAI,EAAE,WAAW;KACpB,CAAC;IAEN,MAAM,YAAY,GACd;QACI,GAAG,UAAU;QACb,GAAG,eAAe;KACrB,CAAC;IAEN,OAAO,MAAM,YAAY,CAAC,YAAY,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file index.ts
|
|
3
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/
|
|
7
|
-
export * from "./Confirm.js";
|
|
8
|
-
export * from "./Confirm.Types.js";
|
|
9
|
-
export * from "./FileSelector.js";
|
|
10
|
-
export * from "./FileSelector.Types.js";
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../Source/Inquirer/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file index.ts
|
|
3
|
-
* @author Gage Sorrell <gage@sorrell.sh>
|
|
4
|
-
* @copyright (c) 2026 Gage Sorrell
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/
|
|
7
|
-
export * from "./Confirm.js";
|
|
8
|
-
export * from "./Confirm.Types.js";
|
|
9
|
-
export * from "./FileSelector.js";
|
|
10
|
-
export * from "./FileSelector.Types.js";
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../Source/Inquirer/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { DefaultRenderer, ListrDefaultRenderer, ListrGetRendererClassFromValue, ListrTask, ListrTaskWrapper } from "listr2";
|
|
2
|
-
export type Wrapper<ContextType> = ListrTaskWrapper<ContextType, ListrDefaultRenderer, ListrDefaultRenderer>;
|
|
3
|
-
export type ListrConstructorTask<ContextType> = ListrTask<ContextType, ListrGetRendererClassFromValue<typeof DefaultRenderer>, ListrGetRendererClassFromValue<typeof DefaultRenderer>> | Array<ListrTask<ContextType, ListrGetRendererClassFromValue<typeof DefaultRenderer>, ListrGetRendererClassFromValue<typeof DefaultRenderer>>>;
|
|
4
|
-
//# sourceMappingURL=Listr.Types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Listr.Types.d.ts","sourceRoot":"","sources":["../Source/Listr.Types.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACR,eAAe,EACf,oBAAoB,EACpB,8BAA8B,EAC9B,SAAS,EACT,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAErC,MAAM,MAAM,OAAO,CAAC,WAAW,IAAI,gBAAgB,CAC/C,WAAW,EACX,oBAAoB,EACpB,oBAAoB,CACvB,CAAC;AAEF,MAAM,MAAM,oBAAoB,CAAC,WAAW,IACtC,SAAS,CACP,WAAW,EACX,8BAA8B,CAAC,OAAO,eAAe,CAAC,EACtD,8BAA8B,CAAC,OAAO,eAAe,CAAC,CAAC,GACzD,KAAK,CAAC,SAAS,CACb,WAAW,EACX,8BAA8B,CAAC,OAAO,eAAe,CAAC,EACtD,8BAA8B,CAAC,OAAO,eAAe,CAAC,CAAC,CAC1D,CAAC"}
|