logshield-cli 0.2.4 → 0.2.5

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.
Files changed (2) hide show
  1. package/dist/cli/index.cjs +1 -10
  2. package/package.json +1 -1
@@ -346,25 +346,16 @@ var init_sanitizeLog = __esm({
346
346
  });
347
347
 
348
348
  // src/cli/index.ts
349
- var import_fs = require("fs");
350
- var import_path = __toESM(require("path"));
351
349
  var { readInput: readInput2 } = (init_readInput(), __toCommonJS(readInput_exports));
352
350
  var { writeOutput: writeOutput2 } = (init_writeOutput(), __toCommonJS(writeOutput_exports));
353
351
  var { printSummary: printSummary2 } = (init_summary(), __toCommonJS(summary_exports));
354
352
  var { sanitizeLog: sanitizeLog2 } = (init_sanitizeLog(), __toCommonJS(sanitizeLog_exports));
355
- var __dirname = import_path.default.dirname(process.argv[1]);
356
353
  var args = process.argv.slice(2);
357
354
  function hasFlag(flag) {
358
355
  return args.includes(flag);
359
356
  }
360
357
  function getVersion() {
361
- try {
362
- const pkgPath = import_path.default.resolve(__dirname, "../../package.json");
363
- const pkg = JSON.parse((0, import_fs.readFileSync)(pkgPath, "utf8"));
364
- return pkg.version;
365
- } catch {
366
- return "unknown";
367
- }
358
+ return process.env.npm_package_version || "unknown";
368
359
  }
369
360
  function getFileArg() {
370
361
  const file = args[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "logshield-cli",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "type": "commonjs",
5
5
  "bin": {
6
6
  "logshield": "dist/cli/index.cjs"