refactor: rewrite on typescript

This commit is contained in:
2026-10-13 21:11:57 +03:00
parent be54ce5d25
commit f735be8bf9
40 changed files with 2333 additions and 2175 deletions
+19
View File
@@ -0,0 +1,19 @@
import path from "path";
export class Env {
static set(key: string, value: string) {
process.env[key] = value;
}
static get(key: string) {
return process.env[key];
}
static addPath(value: string, key = "PATH") {
if (!process.env[key]) {
process.env[key] = value;
} else if (process.env[key].split(path.delimiter).indexOf(value) === -1) {
process.env[key] = [process.env[key], value].join(path.delimiter);
}
}
}