tileflow 0.1.0-alpha.21 → 0.1.0-alpha.22

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.
@@ -0,0 +1,16 @@
1
+ // src/cli-version.ts
2
+ import { readFileSync } from "fs";
3
+ function isRootCliVersionRequest(arguments_) {
4
+ return arguments_.length === 1 && (arguments_[0] === "--version" || arguments_[0] === "-V");
5
+ }
6
+ function getCliVersion() {
7
+ const document = JSON.parse(
8
+ readFileSync(new URL("../package.json", import.meta.url), "utf8")
9
+ );
10
+ return document.version;
11
+ }
12
+
13
+ export {
14
+ isRootCliVersionRequest,
15
+ getCliVersion
16
+ };