@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-DI7vOwHq.js";
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-Dr_i9flr.js");
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.3";
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 text.split("\n")) if (re.test(line)) count += 1;
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-BJHoBVvi.js");
1134
+ const { gatesInspectHandler: handler } = await import("./inspect-EGW-cgVD.js");
1127
1135
  return handler;
1128
1136
  }
1129
1137
  });
@@ -1,3 +1,3 @@
1
- import { executeInspect, gatesInspectCommand, gatesInspectHandler } from "./inspect-DI7vOwHq.js";
1
+ import { executeInspect, gatesInspectCommand, gatesInspectHandler } from "./inspect-BbL7kDe-.js";
2
2
 
3
3
  export { gatesInspectHandler };
@@ -1,4 +1,4 @@
1
- import { executeInspect } from "./inspect-DI7vOwHq.js";
1
+ import { executeInspect } from "./inspect-BbL7kDe-.js";
2
2
  import { client, configureClient } from "./sdk-client-B4FMd_Fa.js";
3
3
  import "./env-CvjMSRd7.js";
4
4
  import "./token-refresh-CJB7Qlxy.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@levr-one/cli",
3
- "version": "0.12.3",
3
+ "version": "0.12.4",
4
4
  "description": "The command-line interface for Levr",
5
5
  "type": "module",
6
6
  "license": "MIT",