Improve login

This commit is contained in:
Joseph Garrone
2024-05-18 10:24:55 +02:00
parent 2c5473da27
commit af829e9ac9
7 changed files with 20 additions and 52 deletions

View File

@ -0,0 +1,12 @@
import { getThisCodebaseRootDirPath } from "./getThisCodebaseRootDirPath";
import { assert } from "tsafe/assert";
import * as fs from "fs";
import { join as pathJoin } from "path";
export function readThisNpmPackageVersion(): string {
const version = JSON.parse(fs.readFileSync(pathJoin(getThisCodebaseRootDirPath(), "package.json")).toString("utf8"))["version"];
assert(typeof version === "string");
return version;
}