logshield-cli 0.2.4 → 0.2.6
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/index.cjs +2 -3
- package/package.json +1 -1
package/dist/cli/index.cjs
CHANGED
|
@@ -346,13 +346,12 @@ var init_sanitizeLog = __esm({
|
|
|
346
346
|
});
|
|
347
347
|
|
|
348
348
|
// src/cli/index.ts
|
|
349
|
-
var import_fs = require("fs");
|
|
349
|
+
var import_fs = __toESM(require("fs"));
|
|
350
350
|
var import_path = __toESM(require("path"));
|
|
351
351
|
var { readInput: readInput2 } = (init_readInput(), __toCommonJS(readInput_exports));
|
|
352
352
|
var { writeOutput: writeOutput2 } = (init_writeOutput(), __toCommonJS(writeOutput_exports));
|
|
353
353
|
var { printSummary: printSummary2 } = (init_summary(), __toCommonJS(summary_exports));
|
|
354
354
|
var { sanitizeLog: sanitizeLog2 } = (init_sanitizeLog(), __toCommonJS(sanitizeLog_exports));
|
|
355
|
-
var __dirname = import_path.default.dirname(process.argv[1]);
|
|
356
355
|
var args = process.argv.slice(2);
|
|
357
356
|
function hasFlag(flag) {
|
|
358
357
|
return args.includes(flag);
|
|
@@ -360,7 +359,7 @@ function hasFlag(flag) {
|
|
|
360
359
|
function getVersion() {
|
|
361
360
|
try {
|
|
362
361
|
const pkgPath = import_path.default.resolve(__dirname, "../../package.json");
|
|
363
|
-
const pkg = JSON.parse(
|
|
362
|
+
const pkg = JSON.parse(import_fs.default.readFileSync(pkgPath, "utf8"));
|
|
364
363
|
return pkg.version;
|
|
365
364
|
} catch {
|
|
366
365
|
return "unknown";
|