@k67/kaitai-struct-ts 0.7.2 → 0.7.3
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 +10 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
@@ -2424,7 +2424,16 @@ function parse(ksyYaml, buffer, options = {}) {
|
|
2424
2424
|
}
|
2425
2425
|
|
2426
2426
|
// src/cli.ts
|
2427
|
-
|
2427
|
+
function getVersion() {
|
2428
|
+
try {
|
2429
|
+
const packageJsonPath = (0, import_path.join)(__dirname, "..", "package.json");
|
2430
|
+
const packageJson = JSON.parse((0, import_fs.readFileSync)(packageJsonPath, "utf-8"));
|
2431
|
+
return packageJson.version;
|
2432
|
+
} catch {
|
2433
|
+
return "unknown";
|
2434
|
+
}
|
2435
|
+
}
|
2436
|
+
var VERSION = getVersion();
|
2428
2437
|
var HELP_TEXT = `
|
2429
2438
|
kaitai - Parse binary files using Kaitai Struct definitions
|
2430
2439
|
|
package/package.json
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
"access": "public",
|
5
5
|
"registry": "https://registry.npmjs.org/"
|
6
6
|
},
|
7
|
-
"version": "0.7.
|
7
|
+
"version": "0.7.3",
|
8
8
|
"description": "Runtime interpreter for Kaitai Struct binary format definitions in TypeScript",
|
9
9
|
"main": "./dist/index.js",
|
10
10
|
"module": "./dist/index.mjs",
|