@space-lens/cli 0.2.8 → 0.3.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 +32 -3
- package/dist/assets/{model-bnrjCFAW.js → model-Ccco3751.js} +43 -5
- package/dist/assets/{scanner-CZbLKIYe.js → scanner-BTf4LsFZ.js} +9 -2
- package/dist/assets/serve-entry-Dk9zwise.js +10837 -0
- package/dist/cli.mjs +231 -71
- package/dist/index.mjs +1 -1
- package/package.json +3 -2
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as formatBytes, c as SORT_MODES, i as createScanViewModel, l as normalizeCliConfig, n as createCleanViewModel, o as getSelectedEntries, r as createInitialTuiState, t as applyTuiAction } from "./assets/model-
|
|
2
|
+
import { a as formatBytes, c as SORT_MODES, i as createScanViewModel, l as normalizeCliConfig, n as createCleanViewModel, o as getSelectedEntries, r as createInitialTuiState, t as applyTuiAction } from "./assets/model-Ccco3751.js";
|
|
3
|
+
import "node:module";
|
|
3
4
|
import * as ChildProcess from "node:child_process";
|
|
4
5
|
import * as Crypto from "node:crypto";
|
|
5
6
|
import * as NFS from "node:fs";
|
|
@@ -3646,7 +3647,7 @@ var dedupe = (self) => dedupeWith(self, equivalence());
|
|
|
3646
3647
|
* @since 2.0.0
|
|
3647
3648
|
* @category folding
|
|
3648
3649
|
*/
|
|
3649
|
-
var join$
|
|
3650
|
+
var join$4 = /*#__PURE__*/ dual(2, (self, sep) => fromIterable$6(self).join(sep));
|
|
3650
3651
|
/** @internal */
|
|
3651
3652
|
var OP_INVALID_DATA = "InvalidData";
|
|
3652
3653
|
/** @internal */
|
|
@@ -3711,7 +3712,7 @@ var InvalidData = (path, message, options = { pathDelim: "." }) => {
|
|
|
3711
3712
|
Object.defineProperty(error, "toString", {
|
|
3712
3713
|
enumerable: false,
|
|
3713
3714
|
value() {
|
|
3714
|
-
return `(Invalid data at ${pipe(this.path, join$
|
|
3715
|
+
return `(Invalid data at ${pipe(this.path, join$4(options.pathDelim))}: "${this.message}")`;
|
|
3715
3716
|
}
|
|
3716
3717
|
});
|
|
3717
3718
|
return error;
|
|
@@ -3725,7 +3726,7 @@ var MissingData = (path, message, options = { pathDelim: "." }) => {
|
|
|
3725
3726
|
Object.defineProperty(error, "toString", {
|
|
3726
3727
|
enumerable: false,
|
|
3727
3728
|
value() {
|
|
3728
|
-
return `(Missing data at ${pipe(this.path, join$
|
|
3729
|
+
return `(Missing data at ${pipe(this.path, join$4(options.pathDelim))}: "${this.message}")`;
|
|
3729
3730
|
}
|
|
3730
3731
|
});
|
|
3731
3732
|
return error;
|
|
@@ -3740,7 +3741,7 @@ var SourceUnavailable = (path, message, cause, options = { pathDelim: "." }) =>
|
|
|
3740
3741
|
Object.defineProperty(error, "toString", {
|
|
3741
3742
|
enumerable: false,
|
|
3742
3743
|
value() {
|
|
3743
|
-
return `(Source unavailable at ${pipe(this.path, join$
|
|
3744
|
+
return `(Source unavailable at ${pipe(this.path, join$4(options.pathDelim))}: "${this.message}")`;
|
|
3744
3745
|
}
|
|
3745
3746
|
});
|
|
3746
3747
|
return error;
|
|
@@ -3754,7 +3755,7 @@ var Unsupported = (path, message, options = { pathDelim: "." }) => {
|
|
|
3754
3755
|
Object.defineProperty(error, "toString", {
|
|
3755
3756
|
enumerable: false,
|
|
3756
3757
|
value() {
|
|
3757
|
-
return `(Unsupported operation at ${pipe(this.path, join$
|
|
3758
|
+
return `(Unsupported operation at ${pipe(this.path, join$4(options.pathDelim))}: "${this.message}")`;
|
|
3758
3759
|
}
|
|
3759
3760
|
});
|
|
3760
3761
|
return error;
|
|
@@ -9530,7 +9531,7 @@ var fromEnv = (options) => {
|
|
|
9530
9531
|
pathDelim: "_",
|
|
9531
9532
|
seqDelim: ","
|
|
9532
9533
|
}, options);
|
|
9533
|
-
const makePathString = (path) => pipe(path, join$
|
|
9534
|
+
const makePathString = (path) => pipe(path, join$4(pathDelim));
|
|
9534
9535
|
const unmakePathString = (pathString) => pathString.split(pathDelim);
|
|
9535
9536
|
const getEnv = () => typeof process !== "undefined" && "env" in process && typeof process.env === "object" ? process.env : {};
|
|
9536
9537
|
const load = (path, primitive, split = true) => {
|
|
@@ -9621,7 +9622,7 @@ var fromFlatLoop = (flat, prefix, config, split) => {
|
|
|
9621
9622
|
if (isLeft(left) && isRight(right$9)) return fail$8(left.left);
|
|
9622
9623
|
if (isRight(left) && isLeft(right$9)) return fail$8(right$9.left);
|
|
9623
9624
|
if (isRight(left) && isRight(right$9)) {
|
|
9624
|
-
const fail = fromFlatLoopFail(prefix, pipe(prefix, join$
|
|
9625
|
+
const fail = fromFlatLoopFail(prefix, pipe(prefix, join$4(".")));
|
|
9625
9626
|
const [lefts, rights] = extend$2(fail, fail, pipe(left.right, map$17(right)), pipe(right$9.right, map$17(right)));
|
|
9626
9627
|
return pipe(lefts, zip$4(rights), forEachSequential(([left, right]) => pipe(zip$3(left, right), map$12(([left, right]) => op.zip(left, right)))));
|
|
9627
9628
|
}
|
|
@@ -11827,7 +11828,7 @@ var interruptAllAs$1 = /*#__PURE__*/ dual(2, /*#__PURE__*/ fnUntraced$1(function
|
|
|
11827
11828
|
}
|
|
11828
11829
|
}));
|
|
11829
11830
|
/** @internal */
|
|
11830
|
-
var join$
|
|
11831
|
+
var join$3 = (self) => zipLeft$1(flatten$7(self.await), self.inheritAll);
|
|
11831
11832
|
({ ...CommitPrototype$1 }), { ...fiberProto };
|
|
11832
11833
|
/** @internal */
|
|
11833
11834
|
var currentFiberURI = "effect/FiberCurrent";
|
|
@@ -13239,7 +13240,7 @@ var FiberRuntime = class extends Class {
|
|
|
13239
13240
|
this.refreshRefCache();
|
|
13240
13241
|
}
|
|
13241
13242
|
commit() {
|
|
13242
|
-
return join$
|
|
13243
|
+
return join$3(this);
|
|
13243
13244
|
}
|
|
13244
13245
|
/**
|
|
13245
13246
|
* The identity of the fiber.
|
|
@@ -14245,7 +14246,7 @@ var forEachConcurrentDiscard = (self, f, batching, processAll, n) => uninterrupt
|
|
|
14245
14246
|
};
|
|
14246
14247
|
for (let i = 0; i < fibersCount; i++) next();
|
|
14247
14248
|
}));
|
|
14248
|
-
return asVoid$1(onExit$1(flatten$7(restore(join$
|
|
14249
|
+
return asVoid$1(onExit$1(flatten$7(restore(join$3(processingFiber))), exitMatch({
|
|
14249
14250
|
onFailure: (cause) => {
|
|
14250
14251
|
onInterruptSignal();
|
|
14251
14252
|
const target = residual.length + 1;
|
|
@@ -14452,11 +14453,11 @@ var raceWith$1 = /*#__PURE__*/ dual(3, (self, other, options) => raceFibersWith(
|
|
|
14452
14453
|
/** @internal */
|
|
14453
14454
|
var race$1 = /*#__PURE__*/ dual(2, (self, that) => fiberIdWith$1((parentFiberId) => raceWith$1(self, that, {
|
|
14454
14455
|
onSelfDone: (exit, right) => exitMatchEffect(exit, {
|
|
14455
|
-
onFailure: (cause) => pipe(join$
|
|
14456
|
+
onFailure: (cause) => pipe(join$3(right), mapErrorCause((cause2) => parallel$3(cause, cause2))),
|
|
14456
14457
|
onSuccess: (value) => pipe(right, interruptAsFiber(parentFiberId), as$1(value))
|
|
14457
14458
|
}),
|
|
14458
14459
|
onOtherDone: (exit, left) => exitMatchEffect(exit, {
|
|
14459
|
-
onFailure: (cause) => pipe(join$
|
|
14460
|
+
onFailure: (cause) => pipe(join$3(left), mapErrorCause((cause2) => parallel$3(cause2, cause))),
|
|
14460
14461
|
onSuccess: (value) => pipe(left, interruptAsFiber(parentFiberId), as$1(value))
|
|
14461
14462
|
})
|
|
14462
14463
|
})));
|
|
@@ -15396,7 +15397,7 @@ var interruptAllAs = interruptAllAs$1;
|
|
|
15396
15397
|
* @since 2.0.0
|
|
15397
15398
|
* @category destructors
|
|
15398
15399
|
*/
|
|
15399
|
-
var join$
|
|
15400
|
+
var join$2 = join$3;
|
|
15400
15401
|
//#endregion
|
|
15401
15402
|
//#region ../../node_modules/effect/dist/esm/internal/runtime.js
|
|
15402
15403
|
var makeDual = (f) => function() {
|
|
@@ -25796,7 +25797,7 @@ var mergeWith = /*#__PURE__*/ dual(2, (self, options) => {
|
|
|
25796
25797
|
}
|
|
25797
25798
|
function go(state) {
|
|
25798
25799
|
switch (state._tag) {
|
|
25799
|
-
case OP_BOTH_RUNNING: return unwrap$2(raceWith(interruptible(join$
|
|
25800
|
+
case OP_BOTH_RUNNING: return unwrap$2(raceWith(interruptible(join$2(state.left)), interruptible(join$2(state.right)), {
|
|
25800
25801
|
onSelfDone: (leftExit, rf) => zipRight$1(interrupt$2(rf), handleSide(leftExit, state.right, pullL)(options.onSelfDone, BothRunning, (f) => LeftDone(f))),
|
|
25801
25802
|
onOtherDone: (rightExit, lf) => zipRight$1(interrupt$2(lf), handleSide(rightExit, state.left, pullR)(options.onOtherDone, (left, right) => BothRunning(right, left), (f) => RightDone(f)))
|
|
25802
25803
|
}));
|
|
@@ -27029,7 +27030,7 @@ var TypeId$10 = /*#__PURE__*/ Symbol.for("effect/BigDecimal");
|
|
|
27029
27030
|
var BigDecimalProto = {
|
|
27030
27031
|
[TypeId$10]: TypeId$10,
|
|
27031
27032
|
[symbol$1]() {
|
|
27032
|
-
const normalized = normalize$
|
|
27033
|
+
const normalized = normalize$2(this);
|
|
27033
27034
|
return pipe(hash(normalized.value), combine$9(number$1(normalized.scale)), cached(this));
|
|
27034
27035
|
},
|
|
27035
27036
|
[symbol](that) {
|
|
@@ -27101,7 +27102,7 @@ var zero = /*#__PURE__*/ unsafeMakeNormalized(bigint0, 0);
|
|
|
27101
27102
|
* @since 2.0.0
|
|
27102
27103
|
* @category scaling
|
|
27103
27104
|
*/
|
|
27104
|
-
var normalize$
|
|
27105
|
+
var normalize$2 = (self) => {
|
|
27105
27106
|
if (self.normalized === void 0) {
|
|
27106
27107
|
if (self.value === bigint0) self.normalized = zero;
|
|
27107
27108
|
else {
|
|
@@ -27278,7 +27279,7 @@ var fromString$3 = (s) => {
|
|
|
27278
27279
|
* @category conversions
|
|
27279
27280
|
*/
|
|
27280
27281
|
var format$1 = (n) => {
|
|
27281
|
-
const normalized = normalize$
|
|
27282
|
+
const normalized = normalize$2(n);
|
|
27282
27283
|
if (Math.abs(normalized.scale) >= 16) return toExponential(normalized);
|
|
27283
27284
|
const negative = normalized.value < bigint0;
|
|
27284
27285
|
const absolute = negative ? `${normalized.value}`.substring(1) : `${normalized.value}`;
|
|
@@ -27317,7 +27318,7 @@ var format$1 = (n) => {
|
|
|
27317
27318
|
*/
|
|
27318
27319
|
var toExponential = (n) => {
|
|
27319
27320
|
if (isZero(n)) return "0e+0";
|
|
27320
|
-
const normalized = normalize$
|
|
27321
|
+
const normalized = normalize$2(n);
|
|
27321
27322
|
const digits = `${abs(normalized).value}`;
|
|
27322
27323
|
const head = digits.slice(0, 1);
|
|
27323
27324
|
const tail = digits.slice(1);
|
|
@@ -29498,7 +29499,7 @@ transform(String$, /*#__PURE__*/ OptionFromSelf(NonEmptyTrimmedString), {
|
|
|
29498
29499
|
decode: (i) => filter$5(some$1(i.trim()), isNonEmpty$1),
|
|
29499
29500
|
encode: (a) => getOrElse(a, () => "")
|
|
29500
29501
|
});
|
|
29501
|
-
var bigDecimalPretty = () => (val) => `BigDecimal(${format$1(normalize$
|
|
29502
|
+
var bigDecimalPretty = () => (val) => `BigDecimal(${format$1(normalize$2(val))})`;
|
|
29502
29503
|
var bigDecimalArbitrary = () => (fc) => fc.tuple(fc.bigInt(), fc.integer({
|
|
29503
29504
|
min: -18,
|
|
29504
29505
|
max: 18
|
|
@@ -29518,9 +29519,9 @@ transformOrFail(String$.annotations({ description: "a string to be decoded into
|
|
|
29518
29519
|
strict: true,
|
|
29519
29520
|
decode: (i, _, ast) => fromString$3(i).pipe(match$9({
|
|
29520
29521
|
onNone: () => fail$2(new Type(ast, i, `Unable to decode ${JSON.stringify(i)} into a BigDecimal`)),
|
|
29521
|
-
onSome: (val) => succeed$3(normalize$
|
|
29522
|
+
onSome: (val) => succeed$3(normalize$2(val))
|
|
29522
29523
|
})),
|
|
29523
|
-
encode: (a) => succeed$3(format$1(normalize$
|
|
29524
|
+
encode: (a) => succeed$3(format$1(normalize$2(a)))
|
|
29524
29525
|
}).annotations({ identifier: "BigDecimal" });
|
|
29525
29526
|
transform(Number$.annotations({ description: "a number to be decoded into a BigDecimal" }), BigDecimalFromSelf, {
|
|
29526
29527
|
strict: true,
|
|
@@ -30499,7 +30500,7 @@ var stringifyInternal = (self) => {
|
|
|
30499
30500
|
self.italicized,
|
|
30500
30501
|
self.strikethrough,
|
|
30501
30502
|
self.underlined
|
|
30502
|
-
]))}${join$
|
|
30503
|
+
]))}${join$4(self.commands, "")}`;
|
|
30503
30504
|
};
|
|
30504
30505
|
//#endregion
|
|
30505
30506
|
//#region ../../node_modules/@effect/printer-ansi/dist/esm/Ansi.js
|
|
@@ -34088,7 +34089,7 @@ var wizard$3 = /*#__PURE__*/ dual(2, (self, help) => wizardInternal$3(self, help
|
|
|
34088
34089
|
var getChoicesInternal = (self) => {
|
|
34089
34090
|
switch (self._tag) {
|
|
34090
34091
|
case "Bool": return some$1("true | false");
|
|
34091
|
-
case "Choice": return some$1(pipe(map$17(self.alternatives, ([choice]) => choice), join$
|
|
34092
|
+
case "Choice": return some$1(pipe(map$17(self.alternatives, ([choice]) => choice), join$4(" | ")));
|
|
34092
34093
|
case "DateTime": return some$1("date");
|
|
34093
34094
|
case "Float":
|
|
34094
34095
|
case "Integer":
|
|
@@ -34101,7 +34102,7 @@ var getChoicesInternal = (self) => {
|
|
|
34101
34102
|
var getHelpInternal$3 = (self) => {
|
|
34102
34103
|
switch (self._tag) {
|
|
34103
34104
|
case "Bool": return text$6("A true or false value.");
|
|
34104
|
-
case "Choice": return text$6(`One of the following: ${pipe(map$17(self.alternatives, ([choice]) => choice), join$
|
|
34105
|
+
case "Choice": return text$6(`One of the following: ${pipe(map$17(self.alternatives, ([choice]) => choice), join$4(", "))}`);
|
|
34105
34106
|
case "DateTime": return text$6("A date without a time-zone in the ISO-8601 format, such as 2007-12-03T10:15:30.");
|
|
34106
34107
|
case "Float": return text$6("A floating point number.");
|
|
34107
34108
|
case "Integer": return text$6("An integer.");
|
|
@@ -34144,7 +34145,7 @@ var validateInternal$1 = (self, value, config) => {
|
|
|
34144
34145
|
}));
|
|
34145
34146
|
case "Choice": return orElseFail(value, () => `Choice options to not have a default value`).pipe(flatMap$5((value) => findFirst(self.alternatives, ([choice]) => choice === value)), mapBoth$1({
|
|
34146
34147
|
onFailure: () => {
|
|
34147
|
-
return `Expected one of the following cases: ${pipe(map$17(self.alternatives, ([choice]) => choice), join$
|
|
34148
|
+
return `Expected one of the following cases: ${pipe(map$17(self.alternatives, ([choice]) => choice), join$4(", "))}`;
|
|
34148
34149
|
},
|
|
34149
34150
|
onSuccess: ([, value]) => value
|
|
34150
34151
|
}));
|
|
@@ -34231,7 +34232,7 @@ var getBashCompletions$2 = (self) => {
|
|
|
34231
34232
|
case "directory": return self.pathExists === "yes" || self.pathExists === "either" ? "$(compgen -d \"${cur}\")" : "";
|
|
34232
34233
|
case "either": return self.pathExists === "yes" || self.pathExists === "either" ? "$(compgen -f \"${cur}\")" : "";
|
|
34233
34234
|
}
|
|
34234
|
-
case "Choice": return `$(compgen -W "${pipe(map$17(self.alternatives, ([choice]) => choice), join$
|
|
34235
|
+
case "Choice": return `$(compgen -W "${pipe(map$17(self.alternatives, ([choice]) => choice), join$4(","))}" -- "\${cur}")`;
|
|
34235
34236
|
}
|
|
34236
34237
|
};
|
|
34237
34238
|
/** @internal */
|
|
@@ -34249,14 +34250,14 @@ var getFishCompletions$3 = (self) => {
|
|
|
34249
34250
|
case "directory": return self.pathExists === "yes" || self.pathExists === "either" ? make$57("-r", "-f", "-a", `"(__fish_complete_directories (commandline -ct))"`) : make$57("-r");
|
|
34250
34251
|
case "either": return self.pathExists === "yes" || self.pathExists === "either" ? make$57("-r", "-F") : make$57("-r");
|
|
34251
34252
|
}
|
|
34252
|
-
case "Choice": return make$57("-r", "-f", "-a", `"{${pipe(map$17(self.alternatives, ([choice]) => `${choice}''`), join$
|
|
34253
|
+
case "Choice": return make$57("-r", "-f", "-a", `"{${pipe(map$17(self.alternatives, ([choice]) => `${choice}''`), join$4(","))}}"`);
|
|
34253
34254
|
}
|
|
34254
34255
|
};
|
|
34255
34256
|
/** @internal */
|
|
34256
34257
|
var getZshCompletions$3 = (self) => {
|
|
34257
34258
|
switch (self._tag) {
|
|
34258
34259
|
case "Bool": return "";
|
|
34259
|
-
case "Choice": return `:CHOICE:(${pipe(map$17(self.alternatives, ([name]) => name), join$
|
|
34260
|
+
case "Choice": return `:CHOICE:(${pipe(map$17(self.alternatives, ([name]) => name), join$4(" "))})`;
|
|
34260
34261
|
case "DateTime": return "";
|
|
34261
34262
|
case "Float": return "";
|
|
34262
34263
|
case "Integer": return "";
|
|
@@ -34352,7 +34353,7 @@ var render$1 = (self, config) => {
|
|
|
34352
34353
|
onNone: () => empty$2,
|
|
34353
34354
|
onSome: (s) => concat$2(space, text$6(s))
|
|
34354
34355
|
}) : empty$2;
|
|
34355
|
-
const nameInfo = text$6(join$
|
|
34356
|
+
const nameInfo = text$6(join$4(config.showAllNames ? self.names : self.names.length > 1 ? pipe(filter$4(self.names, (name) => name.startsWith("--")), head$1, map$18(of$3), getOrElse(() => self.names)) : self.names, ", "));
|
|
34356
34357
|
return config.showAllNames && self.names.length > 1 ? of$3(spans([
|
|
34357
34358
|
text$6("("),
|
|
34358
34359
|
nameInfo,
|
|
@@ -34759,7 +34760,7 @@ var getFishCompletions$2 = (self) => {
|
|
|
34759
34760
|
case "Empty": return empty$31();
|
|
34760
34761
|
case "Single": {
|
|
34761
34762
|
const description = getShortDescription$2(self);
|
|
34762
|
-
return pipe(getFishCompletions$3(self.primitiveType), appendAll$2(description.length === 0 ? empty$31() : of$3(`-d '${description}'`)), join$
|
|
34763
|
+
return pipe(getFishCompletions$3(self.primitiveType), appendAll$2(description.length === 0 ? empty$31() : of$3(`-d '${description}'`)), join$4(" "), of$3);
|
|
34763
34764
|
}
|
|
34764
34765
|
case "Both": return pipe(getFishCompletions$2(self.left), appendAll$2(getFishCompletions$2(self.right)));
|
|
34765
34766
|
case "Map":
|
|
@@ -34998,7 +34999,7 @@ var getIdentifierInternal = (self) => {
|
|
|
34998
34999
|
case "Both":
|
|
34999
35000
|
case "OrElse": return match$8(getSomes([getIdentifierInternal(self.left), getIdentifierInternal(self.right)]), {
|
|
35000
35001
|
onEmpty: () => none$7(),
|
|
35001
|
-
onNonEmpty: (ids) => some$1(join$
|
|
35002
|
+
onNonEmpty: (ids) => some$1(join$4(ids, ", "))
|
|
35002
35003
|
});
|
|
35003
35004
|
case "KeyValueMap":
|
|
35004
35005
|
case "Variadic": return getIdentifierInternal(self.argumentOption);
|
|
@@ -35732,7 +35733,7 @@ var getBashCompletions$1 = (self) => {
|
|
|
35732
35733
|
switch (self._tag) {
|
|
35733
35734
|
case "Empty": return empty$31();
|
|
35734
35735
|
case "Single": {
|
|
35735
|
-
const cases = join$
|
|
35736
|
+
const cases = join$4(getNames$1(self), "|");
|
|
35736
35737
|
const compgen = getBashCompletions$2(self.primitiveType);
|
|
35737
35738
|
return make$57(`${cases})`, ` COMPREPLY=( ${compgen} )`, ` return 0`, ` ;;`);
|
|
35738
35739
|
}
|
|
@@ -35752,7 +35753,7 @@ var getFishCompletions$1 = (self) => {
|
|
|
35752
35753
|
case "Single": {
|
|
35753
35754
|
const description = getShortDescription$1(self);
|
|
35754
35755
|
const order = mapInput(boolean$3, (tuple) => !tuple[0]);
|
|
35755
|
-
return pipe(prepend$2(self.aliases, self.name), map$17((name) => [name.length === 1, name]), sort(order), flatMap$9(([isShort, name]) => make$57(isShort ? "-s" : "-l", name)), appendAll$2(getFishCompletions$3(self.primitiveType)), appendAll$2(description.length === 0 ? empty$31() : of$3(`-d '${description}'`)), join$
|
|
35756
|
+
return pipe(prepend$2(self.aliases, self.name), map$17((name) => [name.length === 1, name]), sort(order), flatMap$9(([isShort, name]) => make$57(isShort ? "-s" : "-l", name)), appendAll$2(getFishCompletions$3(self.primitiveType)), appendAll$2(description.length === 0 ? empty$31() : of$3(`-d '${description}'`)), join$4(" "), of$3);
|
|
35756
35757
|
}
|
|
35757
35758
|
case "KeyValueMap":
|
|
35758
35759
|
case "Variadic": return getFishCompletions$1(self.argumentOption);
|
|
@@ -35775,7 +35776,7 @@ var getZshCompletions$1 = (self, state = {
|
|
|
35775
35776
|
const description = getShortDescription$1(self);
|
|
35776
35777
|
const possibleValues = getZshCompletions$3(self.primitiveType);
|
|
35777
35778
|
const multiple = state.multiple ? "*" : "";
|
|
35778
|
-
const conflicts = isNonEmptyReadonlyArray(state.conflicts) ? `(${join$
|
|
35779
|
+
const conflicts = isNonEmptyReadonlyArray(state.conflicts) ? `(${join$4(state.conflicts, " ")})` : "";
|
|
35779
35780
|
return map$17(names, (name) => `${conflicts}${multiple}${name}[${escape$1(description)}]${possibleValues}`);
|
|
35780
35781
|
}
|
|
35781
35782
|
case "KeyValueMap": return getZshCompletions$1(self.argumentOption, {
|
|
@@ -36254,7 +36255,7 @@ var parseInternal = (self, args, config) => {
|
|
|
36254
36255
|
if (isCommandMismatch(err)) {
|
|
36255
36256
|
const parentName = getOrElse(head$1(names), () => "");
|
|
36256
36257
|
const childNames = map$17(subcommands, ([name]) => `'${name}'`);
|
|
36257
|
-
return fail$3(commandMismatch(p$1(`Invalid subcommand for ${parentName} - use${childNames.length === 1 ? "" : " one of"} ${join$
|
|
36258
|
+
return fail$3(commandMismatch(p$1(`Invalid subcommand for ${parentName} - use${childNames.length === 1 ? "" : " one of"} ${join$4(childNames, ", ")}`)));
|
|
36258
36259
|
}
|
|
36259
36260
|
return fail$3(err);
|
|
36260
36261
|
}));
|
|
@@ -36311,7 +36312,7 @@ var wizardInternal = (self, prefix, config) => {
|
|
|
36311
36312
|
case "GetUserInput":
|
|
36312
36313
|
case "Standard": return gen(function* () {
|
|
36313
36314
|
const logCurrentCommand = get$4(commandLineRef).pipe(flatMap$5((commandLine) => {
|
|
36314
|
-
return log(toAnsiText(p$1(pipe(strong(highlight("COMMAND:", cyan)), concat$2(space), concat$2(highlight(join$
|
|
36315
|
+
return log(toAnsiText(p$1(pipe(strong(highlight("COMMAND:", cyan)), concat$2(space), concat$2(highlight(join$4(commandLine, " "), magenta))))));
|
|
36315
36316
|
}));
|
|
36316
36317
|
if (isStandard(self)) {
|
|
36317
36318
|
yield* logCurrentCommand;
|
|
@@ -36399,15 +36400,15 @@ var getBashCompletionsInternal = (self, executable) => traverseCommand(self, emp
|
|
|
36399
36400
|
const optionCases = isStandard(info.command) ? getBashCompletions$1(info.command.options) : empty$31();
|
|
36400
36401
|
const wordList = appendAll$2(optionNames, pipe(info.subcommands, map$17(([name]) => name), sort(string)));
|
|
36401
36402
|
const preformatted = isEmptyReadonlyArray(info.parentCommands) ? of$3(info.command.name) : pipe(info.parentCommands, append$2(info.command.name), map$17((command) => command.replaceAll("-", "__")));
|
|
36402
|
-
const caseName = join$
|
|
36403
|
-
const funcName = join$
|
|
36403
|
+
const caseName = join$4(preformatted, ",");
|
|
36404
|
+
const funcName = join$4(preformatted, "__");
|
|
36404
36405
|
return succeed$4(append$2(state, [isEmptyReadonlyArray(info.parentCommands) ? empty$31() : [
|
|
36405
36406
|
`${caseName})`,
|
|
36406
36407
|
` cmd="${funcName}"`,
|
|
36407
36408
|
" ;;"
|
|
36408
36409
|
], [
|
|
36409
36410
|
`${funcName})`,
|
|
36410
|
-
` opts="${join$
|
|
36411
|
+
` opts="${join$4(wordList, " ")}"`,
|
|
36411
36412
|
` if [[ \${cur} == -* || \${COMP_CWORD} -eq ${info.level + 1} ]] ; then`,
|
|
36412
36413
|
" COMPREPLY=( $(compgen -W \"${opts}\" -- \"${cur}\") )",
|
|
36413
36414
|
" return 0",
|
|
@@ -36456,26 +36457,26 @@ var getFishCompletionsInternal = (self, executable) => traverseCommand(self, emp
|
|
|
36456
36457
|
const baseTemplate = make$57("complete", "-c", executable);
|
|
36457
36458
|
const optionsCompletions = getFishCompletions$1(isStandard(info.command) ? all$1([builtIns$1, info.command.options]) : builtIns$1);
|
|
36458
36459
|
const argsCompletions = isStandard(info.command) ? getFishCompletions$2(info.command.args) : empty$31();
|
|
36459
|
-
const rootCompletions = (conditionals) => pipe(map$17(optionsCompletions, (option) => pipe(baseTemplate, appendAll$2(conditionals), append$2(option), join$
|
|
36460
|
+
const rootCompletions = (conditionals) => pipe(map$17(optionsCompletions, (option) => pipe(baseTemplate, appendAll$2(conditionals), append$2(option), join$4(" "))), appendAll$2(map$17(argsCompletions, (option) => pipe(baseTemplate, appendAll$2(conditionals), append$2(option), join$4(" ")))));
|
|
36460
36461
|
const subcommandCompletions = (conditionals) => map$17(info.subcommands, ([name, subcommand]) => {
|
|
36461
36462
|
const description = getShortDescription(subcommand);
|
|
36462
|
-
return pipe(baseTemplate, appendAll$2(conditionals), appendAll$2(make$57("-f", "-a", `"${name}"`)), appendAll$2(description.length === 0 ? empty$31() : make$57("-d", `'${description}'`)), join$
|
|
36463
|
+
return pipe(baseTemplate, appendAll$2(conditionals), appendAll$2(make$57("-f", "-a", `"${name}"`)), appendAll$2(description.length === 0 ? empty$31() : make$57("-d", `'${description}'`)), join$4(" "));
|
|
36463
36464
|
});
|
|
36464
36465
|
if (isEmptyReadonlyArray(info.parentCommands)) {
|
|
36465
36466
|
const conditionals = make$57("-n", "\"__fish_use_subcommand\"");
|
|
36466
36467
|
return succeed$4(pipe(state, appendAll$2(rootCompletions(conditionals)), appendAll$2(subcommandCompletions(conditionals))));
|
|
36467
36468
|
}
|
|
36468
|
-
const conditionals = make$57("-n", `"${pipe(appendAll$2(pipe(info.parentCommands, drop$1(1), append$2(info.command.name), map$17((command) => `__fish_seen_subcommand_from ${command}`)), map$17(info.subcommands, ([name]) => `not __fish_seen_subcommand_from ${name}`)), join$
|
|
36469
|
+
const conditionals = make$57("-n", `"${pipe(appendAll$2(pipe(info.parentCommands, drop$1(1), append$2(info.command.name), map$17((command) => `__fish_seen_subcommand_from ${command}`)), map$17(info.subcommands, ([name]) => `not __fish_seen_subcommand_from ${name}`)), join$4("; and "))}"`);
|
|
36469
36470
|
return succeed$4(pipe(state, appendAll$2(rootCompletions(conditionals)), appendAll$2(subcommandCompletions(conditionals))));
|
|
36470
36471
|
});
|
|
36471
36472
|
var getZshCompletionsInternal = (self, executable) => traverseCommand(self, empty$31(), (state, info) => {
|
|
36472
36473
|
const preformatted = isEmptyReadonlyArray(info.parentCommands) ? of$3(info.command.name) : pipe(info.parentCommands, append$2(info.command.name), map$17((command) => command.replaceAll("-", "__")));
|
|
36473
|
-
const underscoreName = join$
|
|
36474
|
-
const spaceName = join$
|
|
36474
|
+
const underscoreName = join$4(preformatted, "__");
|
|
36475
|
+
const spaceName = join$4(preformatted, " ");
|
|
36475
36476
|
const subcommands = pipe(info.subcommands, map$17(([name, subcommand]) => {
|
|
36476
36477
|
return `'${name}:${getShortDescription(subcommand)}' \\`;
|
|
36477
36478
|
}));
|
|
36478
|
-
const commands = isEmptyReadonlyArray(subcommands) ? `commands=()` : `commands=(\n${join$
|
|
36479
|
+
const commands = isEmptyReadonlyArray(subcommands) ? `commands=()` : `commands=(\n${join$4(indentAll(subcommands, 8), "\n")}\n )`;
|
|
36479
36480
|
return succeed$4(appendAll$2(state, [
|
|
36480
36481
|
`(( $+functions[_${underscoreName}_commands] )) ||`,
|
|
36481
36482
|
`_${underscoreName}_commands() {`,
|
|
@@ -36556,7 +36557,7 @@ var getZshSubcommandCases = (self, parentCommands, subcommands) => {
|
|
|
36556
36557
|
const parentNames = getNamesInternal(self.parent);
|
|
36557
36558
|
const parentLines = getZshSubcommandCases(self.parent, parentCommands, appendAll$2(subcommands, nextSubcommands));
|
|
36558
36559
|
const childCases = pipe(self.children, flatMap$9((child) => getZshSubcommandCases(child, appendAll$2(parentCommands, parentNames), subcommands)));
|
|
36559
|
-
const hyphenName = pipe(appendAll$2(parentCommands, parentNames), join$
|
|
36560
|
+
const hyphenName = pipe(appendAll$2(parentCommands, parentNames), join$4("-"));
|
|
36560
36561
|
return appendAll$2(parentLines, pipe(parentNames, flatMap$9((parentName) => [
|
|
36561
36562
|
"case $state in",
|
|
36562
36563
|
` (${parentName})`,
|
|
@@ -36648,9 +36649,9 @@ var handleBuiltInOption = (self, executable, args, builtIn, execute, config, ori
|
|
|
36648
36649
|
case "ShowCompletions": {
|
|
36649
36650
|
const command = fromIterable$6(getNames(self.command))[0];
|
|
36650
36651
|
switch (builtIn.shellType) {
|
|
36651
|
-
case "bash": return getBashCompletions(self.command, command).pipe(flatMap$5((completions) => log(join$
|
|
36652
|
-
case "fish": return getFishCompletions(self.command, command).pipe(flatMap$5((completions) => log(join$
|
|
36653
|
-
case "zsh": return getZshCompletions(self.command, command).pipe(flatMap$5((completions) => log(join$
|
|
36652
|
+
case "bash": return getBashCompletions(self.command, command).pipe(flatMap$5((completions) => log(join$4(completions, "\n"))));
|
|
36653
|
+
case "fish": return getFishCompletions(self.command, command).pipe(flatMap$5((completions) => log(join$4(completions, "\n"))));
|
|
36654
|
+
case "zsh": return getZshCompletions(self.command, command).pipe(flatMap$5((completions) => log(join$4(completions, "\n"))));
|
|
36654
36655
|
}
|
|
36655
36656
|
}
|
|
36656
36657
|
case "ShowWizard": {
|
|
@@ -36722,7 +36723,7 @@ var getWizardPrefix = (builtIn, rootCommand, commandLineArgs) => {
|
|
|
36722
36723
|
return appendAll$2(rootCommand.split(/\s+/), args);
|
|
36723
36724
|
};
|
|
36724
36725
|
var renderWizardArgs = (args) => {
|
|
36725
|
-
const params = pipe(filter$4(args, (param) => param.length > 0), join$
|
|
36726
|
+
const params = pipe(filter$4(args, (param) => param.length > 0), join$4(" "));
|
|
36726
36727
|
const executeMsg = text$6("You may now execute your command directly with the following options and arguments:");
|
|
36727
36728
|
return blocks([
|
|
36728
36729
|
p$1(strong(code("Wizard Mode Complete!"))),
|
|
@@ -37880,7 +37881,7 @@ var unsafeAdd = /*#__PURE__*/ dual((args) => isFiberSet(args[0]), (self, fiber,
|
|
|
37880
37881
|
* });
|
|
37881
37882
|
* ```
|
|
37882
37883
|
*/
|
|
37883
|
-
var join = (self) => _await(self.deferred);
|
|
37884
|
+
var join$1 = (self) => _await(self.deferred);
|
|
37884
37885
|
//#endregion
|
|
37885
37886
|
//#region ../../node_modules/@effect/platform/dist/esm/Transferable.js
|
|
37886
37887
|
/**
|
|
@@ -38086,7 +38087,7 @@ var makePlatform$1 = () => (options) => PlatformWorker$1.of({
|
|
|
38086
38087
|
for (const [message, transfers] of buffer) port.postMessage([0, message], transfers);
|
|
38087
38088
|
buffer.length = 0;
|
|
38088
38089
|
}
|
|
38089
|
-
return yield* restore(join(fiberSet));
|
|
38090
|
+
return yield* restore(join$1(fiberSet));
|
|
38090
38091
|
}).pipe(scoped$3));
|
|
38091
38092
|
const send = (message, transfers) => try_({
|
|
38092
38093
|
try: () => {
|
|
@@ -42851,7 +42852,7 @@ var Wrap = /*#__PURE__*/ function(Wrap) {
|
|
|
42851
42852
|
Wrap[Wrap["WrapReverse"] = 2] = "WrapReverse";
|
|
42852
42853
|
return Wrap;
|
|
42853
42854
|
}({});
|
|
42854
|
-
var constants = {
|
|
42855
|
+
var constants$1 = {
|
|
42855
42856
|
ALIGN_AUTO: Align.Auto,
|
|
42856
42857
|
ALIGN_FLEX_START: Align.FlexStart,
|
|
42857
42858
|
ALIGN_CENTER: Align.Center,
|
|
@@ -43022,7 +43023,7 @@ function wrapAssembly(lib) {
|
|
|
43022
43023
|
return {
|
|
43023
43024
|
Config: lib.Config,
|
|
43024
43025
|
Node: lib.Node,
|
|
43025
|
-
...constants
|
|
43026
|
+
...constants$1
|
|
43026
43027
|
};
|
|
43027
43028
|
}
|
|
43028
43029
|
//#endregion
|
|
@@ -43426,7 +43427,7 @@ var BOOLEAN_KEYS = [
|
|
|
43426
43427
|
"hidden"
|
|
43427
43428
|
];
|
|
43428
43429
|
/** Drop falsy/undefined attributes so equal styles compare equal. */
|
|
43429
|
-
function normalize(style) {
|
|
43430
|
+
function normalize$1(style) {
|
|
43430
43431
|
const out = {};
|
|
43431
43432
|
if (style.fg !== void 0) out.fg = style.fg;
|
|
43432
43433
|
if (style.bg !== void 0) out.bg = style.bg;
|
|
@@ -43454,7 +43455,7 @@ var StyleTable = class {
|
|
|
43454
43455
|
}
|
|
43455
43456
|
/** Intern a style, returning its stable id. */
|
|
43456
43457
|
intern(style) {
|
|
43457
|
-
const normalized = normalize(style);
|
|
43458
|
+
const normalized = normalize$1(style);
|
|
43458
43459
|
const key = keyOf(normalized);
|
|
43459
43460
|
const existing = this.ids.get(key);
|
|
43460
43461
|
if (existing !== void 0) return existing;
|
|
@@ -43889,7 +43890,7 @@ function isReverse(style) {
|
|
|
43889
43890
|
const dir = style.flexDirection ?? "column";
|
|
43890
43891
|
return dir === "row-reverse" || dir === "column-reverse";
|
|
43891
43892
|
}
|
|
43892
|
-
function isAbsolute(node) {
|
|
43893
|
+
function isAbsolute$1(node) {
|
|
43893
43894
|
return node.style?.position === "absolute";
|
|
43894
43895
|
}
|
|
43895
43896
|
/** Resolve the box of an absolutely-positioned child within its parent's inner area. */
|
|
@@ -43993,7 +43994,7 @@ function contentSize(node, inner) {
|
|
|
43993
43994
|
let cross = 0;
|
|
43994
43995
|
let count = 0;
|
|
43995
43996
|
children.forEach((child) => {
|
|
43996
|
-
if (isAbsolute(child)) return;
|
|
43997
|
+
if (isAbsolute$1(child)) return;
|
|
43997
43998
|
const size = intrinsicSize(child, inner);
|
|
43998
43999
|
const childMain = horizontal ? size.width : size.height;
|
|
43999
44000
|
const childCross = horizontal ? size.height : size.width;
|
|
@@ -44029,7 +44030,7 @@ function arrange(node, box) {
|
|
|
44029
44030
|
};
|
|
44030
44031
|
const flowIndices = [];
|
|
44031
44032
|
children.forEach((c, i) => {
|
|
44032
|
-
if (!isAbsolute(c)) flowIndices.push(i);
|
|
44033
|
+
if (!isAbsolute$1(c)) flowIndices.push(i);
|
|
44033
44034
|
});
|
|
44034
44035
|
const flow = flowIndices.map((i) => children[i]);
|
|
44035
44036
|
const horizontal = isHorizontal(style);
|
|
@@ -44134,7 +44135,7 @@ function arrange(node, box) {
|
|
|
44134
44135
|
cursor += childMain + betweenGap;
|
|
44135
44136
|
});
|
|
44136
44137
|
children.forEach((child, i) => {
|
|
44137
|
-
if (isAbsolute(child)) results[i] = arrange(child, absoluteBox(child, inner));
|
|
44138
|
+
if (isAbsolute$1(child)) results[i] = arrange(child, absoluteBox(child, inner));
|
|
44138
44139
|
});
|
|
44139
44140
|
return {
|
|
44140
44141
|
input: node,
|
|
@@ -62756,7 +62757,7 @@ function SpaceLensApp(props) {
|
|
|
62756
62757
|
onCleanup(() => props.registerTabHandler?.(void 0));
|
|
62757
62758
|
const scan = createMemo(() => {
|
|
62758
62759
|
revision();
|
|
62759
|
-
return createScanViewModel(data().scanTrees, state);
|
|
62760
|
+
return createScanViewModel(data().scanTrees, state, new Map(data().plan.entries.map((entry) => [entry.path, entry.preset])));
|
|
62760
62761
|
});
|
|
62761
62762
|
const clean = createMemo(() => {
|
|
62762
62763
|
revision();
|
|
@@ -62783,6 +62784,14 @@ function SpaceLensApp(props) {
|
|
|
62783
62784
|
revision();
|
|
62784
62785
|
return state.confirmExecute;
|
|
62785
62786
|
};
|
|
62787
|
+
const confirmDelete = () => {
|
|
62788
|
+
revision();
|
|
62789
|
+
return state.confirmDelete;
|
|
62790
|
+
};
|
|
62791
|
+
const confirmDeleteAll = () => {
|
|
62792
|
+
revision();
|
|
62793
|
+
return state.confirmDeleteAll;
|
|
62794
|
+
};
|
|
62786
62795
|
const move = (delta) => {
|
|
62787
62796
|
act({
|
|
62788
62797
|
type: "move",
|
|
@@ -62809,6 +62818,37 @@ function SpaceLensApp(props) {
|
|
|
62809
62818
|
const row = scan().rows[scan().cursor];
|
|
62810
62819
|
if (row?.expandable) toggleScanPath(row.path);
|
|
62811
62820
|
};
|
|
62821
|
+
const focusScanRow = (index) => {
|
|
62822
|
+
act({
|
|
62823
|
+
type: "focus-row",
|
|
62824
|
+
index,
|
|
62825
|
+
rowCount: scan().rows.length
|
|
62826
|
+
});
|
|
62827
|
+
};
|
|
62828
|
+
const requestDeleteCurrent = () => {
|
|
62829
|
+
if (activeMode() !== "scan") return;
|
|
62830
|
+
const row = scan().rows[scan().cursor];
|
|
62831
|
+
if (!row) return;
|
|
62832
|
+
if (row.depth === 0) return act({
|
|
62833
|
+
type: "set-status",
|
|
62834
|
+
status: "Cannot delete the scan root."
|
|
62835
|
+
});
|
|
62836
|
+
act({
|
|
62837
|
+
type: "request-delete",
|
|
62838
|
+
target: {
|
|
62839
|
+
path: row.path,
|
|
62840
|
+
size: row.size,
|
|
62841
|
+
directory: row.directory
|
|
62842
|
+
}
|
|
62843
|
+
});
|
|
62844
|
+
};
|
|
62845
|
+
const requestDeleteAll = () => {
|
|
62846
|
+
if (data().plan.entries.length === 0) return act({
|
|
62847
|
+
type: "set-status",
|
|
62848
|
+
status: "No preset candidates found."
|
|
62849
|
+
});
|
|
62850
|
+
act({ type: "request-delete-all" });
|
|
62851
|
+
};
|
|
62812
62852
|
const executeSelected = () => {
|
|
62813
62853
|
const entries = selected();
|
|
62814
62854
|
if (entries.length === 0) {
|
|
@@ -62840,15 +62880,76 @@ function SpaceLensApp(props) {
|
|
|
62840
62880
|
setExecuting(false);
|
|
62841
62881
|
}
|
|
62842
62882
|
};
|
|
62883
|
+
const executeDeletePath = () => {
|
|
62884
|
+
const target = confirmDelete();
|
|
62885
|
+
if (!target) return;
|
|
62886
|
+
setExecuting(true);
|
|
62887
|
+
act({
|
|
62888
|
+
type: "set-status",
|
|
62889
|
+
status: "Removing " + target.path + "..."
|
|
62890
|
+
});
|
|
62891
|
+
try {
|
|
62892
|
+
const outcome = props.options.deletePath(target);
|
|
62893
|
+
setData(props.options.refreshData());
|
|
62894
|
+
act({ type: "cancel-delete" });
|
|
62895
|
+
act({
|
|
62896
|
+
type: "set-status",
|
|
62897
|
+
status: "Removed " + outcome.path + ", " + formatBytes(outcome.bytesRemoved) + "."
|
|
62898
|
+
});
|
|
62899
|
+
} catch (error) {
|
|
62900
|
+
act({
|
|
62901
|
+
type: "set-status",
|
|
62902
|
+
status: "Delete failed: " + (error instanceof Error ? error.message : String(error))
|
|
62903
|
+
});
|
|
62904
|
+
} finally {
|
|
62905
|
+
setExecuting(false);
|
|
62906
|
+
}
|
|
62907
|
+
};
|
|
62908
|
+
const executeAllPresetCandidates = () => {
|
|
62909
|
+
const entries = data().plan.entries;
|
|
62910
|
+
if (entries.length === 0) return act({
|
|
62911
|
+
type: "set-status",
|
|
62912
|
+
status: "No preset candidates found."
|
|
62913
|
+
});
|
|
62914
|
+
setExecuting(true);
|
|
62915
|
+
act({
|
|
62916
|
+
type: "set-status",
|
|
62917
|
+
status: "Removing " + entries.length + " preset candidates..."
|
|
62918
|
+
});
|
|
62919
|
+
try {
|
|
62920
|
+
const outcome = props.options.executeEntries(entries);
|
|
62921
|
+
setData(props.options.refreshData());
|
|
62922
|
+
act({ type: "clear-selection" });
|
|
62923
|
+
act({
|
|
62924
|
+
type: "set-status",
|
|
62925
|
+
status: removalStatus(outcome)
|
|
62926
|
+
});
|
|
62927
|
+
} catch (error) {
|
|
62928
|
+
act({
|
|
62929
|
+
type: "set-status",
|
|
62930
|
+
status: "Delete failed: " + (error instanceof Error ? error.message : String(error))
|
|
62931
|
+
});
|
|
62932
|
+
} finally {
|
|
62933
|
+
setExecuting(false);
|
|
62934
|
+
}
|
|
62935
|
+
};
|
|
62936
|
+
const cancelConfirmations = () => {
|
|
62937
|
+
act({ type: "cancel-execute" });
|
|
62938
|
+
act({ type: "cancel-delete" });
|
|
62939
|
+
};
|
|
62843
62940
|
useInput((input, key) => {
|
|
62844
62941
|
if (executing()) return;
|
|
62845
62942
|
if (key.ctrl) return props.onQuit();
|
|
62846
62943
|
if (key.tab) return act({ type: "switch-mode" });
|
|
62847
62944
|
if (key.return) {
|
|
62848
|
-
if (activeMode() === "scan")
|
|
62945
|
+
if (activeMode() === "scan") {
|
|
62946
|
+
if (confirmDelete()) return executeDeletePath();
|
|
62947
|
+
if (confirmDeleteAll()) return executeAllPresetCandidates();
|
|
62948
|
+
return toggleScanCurrent();
|
|
62949
|
+
}
|
|
62849
62950
|
return confirmExecute() ? executeSelected() : void 0;
|
|
62850
62951
|
}
|
|
62851
|
-
if (key.escape) return
|
|
62952
|
+
if (key.escape) return cancelConfirmations();
|
|
62852
62953
|
if (input === "q") return props.onQuit();
|
|
62853
62954
|
if (input === "j" || key.downArrow) return move(1);
|
|
62854
62955
|
if (input === "k" || key.upArrow) return move(-1);
|
|
@@ -62859,6 +62960,8 @@ function SpaceLensApp(props) {
|
|
|
62859
62960
|
type: "toggle-all",
|
|
62860
62961
|
paths: clean().rows.map((row) => row.path)
|
|
62861
62962
|
});
|
|
62963
|
+
if (input === "d" && activeMode() === "scan") return requestDeleteCurrent();
|
|
62964
|
+
if (input === "A" && activeMode() === "scan") return requestDeleteAll();
|
|
62862
62965
|
if (input === "x" && activeMode() === "clean") return act({ type: "request-execute" });
|
|
62863
62966
|
});
|
|
62864
62967
|
return createComponent$1(Box, {
|
|
@@ -62877,7 +62980,7 @@ function SpaceLensApp(props) {
|
|
|
62877
62980
|
memo(() => activeMode() === "scan" ? "SCAN" : "CLEAN"),
|
|
62878
62981
|
" | tab switch | j/k move |",
|
|
62879
62982
|
" ",
|
|
62880
|
-
memo(() => activeMode() === "scan" ? "enter expand" : "space select"),
|
|
62983
|
+
memo(() => activeMode() === "scan" ? "enter expand | d delete | A all presets" : "space select"),
|
|
62881
62984
|
" | q quit"
|
|
62882
62985
|
];
|
|
62883
62986
|
}
|
|
@@ -62890,7 +62993,7 @@ function SpaceLensApp(props) {
|
|
|
62890
62993
|
}),
|
|
62891
62994
|
createComponent$1(Text, {
|
|
62892
62995
|
get color() {
|
|
62893
|
-
return confirmExecute() ? "red" : "gray";
|
|
62996
|
+
return confirmExecute() || confirmDelete() || confirmDeleteAll() ? "red" : "gray";
|
|
62894
62997
|
},
|
|
62895
62998
|
get children() {
|
|
62896
62999
|
return statusLine(selected(), confirmExecute(), executing(), status());
|
|
@@ -62941,12 +63044,13 @@ function SpaceLensApp(props) {
|
|
|
62941
63044
|
return viewportHeight();
|
|
62942
63045
|
},
|
|
62943
63046
|
empty: "No scan results.",
|
|
62944
|
-
renderRow: (row) => createComponent$1(Text, {
|
|
63047
|
+
renderRow: (row, index) => createComponent$1(Text, {
|
|
62945
63048
|
get color() {
|
|
62946
|
-
return memo(() => !!row.active)() ? "cyan" : row.ignored ? "yellow" : "white";
|
|
63049
|
+
return memo(() => !!row.active)() ? "cyan" : memo(() => !!row.preset)() ? "red" : row.ignored ? "yellow" : "white";
|
|
62947
63050
|
},
|
|
62948
63051
|
selectable: false,
|
|
62949
63052
|
onClick: () => {
|
|
63053
|
+
focusScanRow(index);
|
|
62950
63054
|
if (row.expandable) toggleScanPath(row.path);
|
|
62951
63055
|
},
|
|
62952
63056
|
get children() {
|
|
@@ -62956,6 +63060,50 @@ function SpaceLensApp(props) {
|
|
|
62956
63060
|
});
|
|
62957
63061
|
}
|
|
62958
63062
|
}),
|
|
63063
|
+
createComponent$1(Show, {
|
|
63064
|
+
get when() {
|
|
63065
|
+
return memo(() => activeMode() === "scan")() && confirmDelete();
|
|
63066
|
+
},
|
|
63067
|
+
get children() {
|
|
63068
|
+
return createComponent$1(Panel, {
|
|
63069
|
+
title: "Confirm delete",
|
|
63070
|
+
borderColor: "red",
|
|
63071
|
+
get children() {
|
|
63072
|
+
return [createComponent$1(Text, {
|
|
63073
|
+
color: "red",
|
|
63074
|
+
get children() {
|
|
63075
|
+
return "Delete " + (confirmDelete()?.directory ? "directory " : "file ") + confirmDelete()?.path + " (" + formatBytes(confirmDelete()?.size ?? 0) + ")";
|
|
63076
|
+
}
|
|
63077
|
+
}), createComponent$1(Text, {
|
|
63078
|
+
color: "red",
|
|
63079
|
+
children: "Enter confirm | Esc cancel"
|
|
63080
|
+
})];
|
|
63081
|
+
}
|
|
63082
|
+
});
|
|
63083
|
+
}
|
|
63084
|
+
}),
|
|
63085
|
+
createComponent$1(Show, {
|
|
63086
|
+
get when() {
|
|
63087
|
+
return memo(() => activeMode() === "scan")() && confirmDeleteAll();
|
|
63088
|
+
},
|
|
63089
|
+
get children() {
|
|
63090
|
+
return createComponent$1(Panel, {
|
|
63091
|
+
title: "Delete all preset candidates",
|
|
63092
|
+
borderColor: "red",
|
|
63093
|
+
get children() {
|
|
63094
|
+
return [createComponent$1(Text, {
|
|
63095
|
+
color: "red",
|
|
63096
|
+
get children() {
|
|
63097
|
+
return data().plan.entries.length + " paths (" + formatBytes(data().plan.totalSize) + ") will be deleted.";
|
|
63098
|
+
}
|
|
63099
|
+
}), createComponent$1(Text, {
|
|
63100
|
+
color: "red",
|
|
63101
|
+
children: "Enter confirm | Esc cancel"
|
|
63102
|
+
})];
|
|
63103
|
+
}
|
|
63104
|
+
});
|
|
63105
|
+
}
|
|
63106
|
+
}),
|
|
62959
63107
|
createComponent$1(For, {
|
|
62960
63108
|
get each() {
|
|
62961
63109
|
return clean().errors;
|
|
@@ -63090,11 +63238,22 @@ var cli = run(make$3("spacelens", {
|
|
|
63090
63238
|
version: "0.2.8"
|
|
63091
63239
|
});
|
|
63092
63240
|
function runCli(argv = process.argv) {
|
|
63241
|
+
if (argv[2] === "serve") {
|
|
63242
|
+
(async () => {
|
|
63243
|
+
try {
|
|
63244
|
+
await (await import("./assets/serve-entry-Dk9zwise.js")).runServe(argv.slice(3));
|
|
63245
|
+
} catch (error) {
|
|
63246
|
+
const { reportServeError } = await import("./assets/serve-entry-Dk9zwise.js");
|
|
63247
|
+
reportServeError(error);
|
|
63248
|
+
}
|
|
63249
|
+
})();
|
|
63250
|
+
return;
|
|
63251
|
+
}
|
|
63093
63252
|
runMain(cli(argv).pipe(provide$1(layer)));
|
|
63094
63253
|
}
|
|
63095
63254
|
var runTuiProgram = fn("runTuiProgram")((options) => gen(function* () {
|
|
63096
|
-
const [{ executeCleanupEntries, loadSpaceLensData }] = yield* tryPromise({
|
|
63097
|
-
try: () => Promise.all([import("./assets/scanner-
|
|
63255
|
+
const [{ deleteScanPath, executeCleanupEntries, loadSpaceLensData }] = yield* tryPromise({
|
|
63256
|
+
try: () => Promise.all([import("./assets/scanner-BTf4LsFZ.js")]),
|
|
63098
63257
|
catch: toError
|
|
63099
63258
|
});
|
|
63100
63259
|
const initialData = yield* try_({
|
|
@@ -63106,7 +63265,8 @@ var runTuiProgram = fn("runTuiProgram")((options) => gen(function* () {
|
|
|
63106
63265
|
initialData,
|
|
63107
63266
|
sort: options.sort,
|
|
63108
63267
|
refreshData: () => loadSpaceLensData(options),
|
|
63109
|
-
executeEntries: executeCleanupEntries
|
|
63268
|
+
executeEntries: executeCleanupEntries,
|
|
63269
|
+
deletePath: deleteScanPath
|
|
63110
63270
|
}),
|
|
63111
63271
|
catch: toError
|
|
63112
63272
|
});
|