@levr-one/cli 0.12.3 → 0.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { COMPLETION_SHELLS } from "./completionHandler-O2G_WZLf.js";
|
|
3
|
-
import { gatesInspectCommand } from "./inspect-
|
|
3
|
+
import { gatesInspectCommand } from "./inspect-BbL7kDe-.js";
|
|
4
4
|
import { buildApplication, buildCommand, buildRouteMap, proposeCompletions, run, text_en } from "@stricli/core";
|
|
5
5
|
import chalk from "chalk";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -718,7 +718,7 @@ Examples:
|
|
|
718
718
|
}
|
|
719
719
|
},
|
|
720
720
|
loader: async () => {
|
|
721
|
-
const { gatesRunHandler } = await import("./runHandler-
|
|
721
|
+
const { gatesRunHandler } = await import("./runHandler-IyPhhiGs.js");
|
|
722
722
|
return gatesRunHandler;
|
|
723
723
|
}
|
|
724
724
|
});
|
|
@@ -914,7 +914,7 @@ Examples:
|
|
|
914
914
|
|
|
915
915
|
//#endregion
|
|
916
916
|
//#region package.json
|
|
917
|
-
var version = "0.12.
|
|
917
|
+
var version = "0.12.4";
|
|
918
918
|
|
|
919
919
|
//#endregion
|
|
920
920
|
//#region src/app.ts
|
|
@@ -894,9 +894,17 @@ function matcherFor(params, insensitive) {
|
|
|
894
894
|
}
|
|
895
895
|
return finish(1, "ERROR: pattern or keywords is required");
|
|
896
896
|
}
|
|
897
|
+
/**
|
|
898
|
+
* Lines as `grep -c` counts them (ENG-7271): a final newline ENDS the last
|
|
899
|
+
* line, it does not start an empty one. `split('\n')` yields that phantom
|
|
900
|
+
* empty element, which a `^$`-style pattern matched, so the CLI counted one
|
|
901
|
+
* more than grep on every newline-terminated file.
|
|
902
|
+
*/
|
|
897
903
|
function countLines(text, re) {
|
|
904
|
+
const lines = text.split("\n");
|
|
905
|
+
if (lines[lines.length - 1] === "") lines.pop();
|
|
898
906
|
let count = 0;
|
|
899
|
-
for (const line of
|
|
907
|
+
for (const line of lines) if (re.test(line)) count += 1;
|
|
900
908
|
return count;
|
|
901
909
|
}
|
|
902
910
|
const MAX_WALK_FILES = 1e5;
|
|
@@ -1123,7 +1131,7 @@ Examples:
|
|
|
1123
1131
|
flags: {}
|
|
1124
1132
|
},
|
|
1125
1133
|
loader: async () => {
|
|
1126
|
-
const { gatesInspectHandler: handler } = await import("./inspect-
|
|
1134
|
+
const { gatesInspectHandler: handler } = await import("./inspect-EGW-cgVD.js");
|
|
1127
1135
|
return handler;
|
|
1128
1136
|
}
|
|
1129
1137
|
});
|