fix: Remove stupid toml
All checks were successful
Release / Release (push) Successful in 33s

This commit is contained in:
Jan K9f 2025-06-19 16:16:17 +02:00
commit a38aedc248
Signed by: jank
GPG key ID: 22BEAC760B3333D6
3 changed files with 1263 additions and 15 deletions

1264
bun.lock

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,5 @@
import fs from "fs"; import fs from "fs";
import os from "os"; import os from "os";
import * as toml from "@std/toml";
export const configPath = os.homedir() + "/.config/project-cli/"; export const configPath = os.homedir() + "/.config/project-cli/";
@ -21,9 +20,9 @@ export function getProjects(): Project[] {
} }
export function getConfiguration(): Configuration { export function getConfiguration(): Configuration {
return toml.parse( return JSON.parse(
fs.readFileSync(configPath + "config.toml").toString(), fs.readFileSync(configPath + "config.json").toString(),
) as unknown as Configuration; ) as Configuration;
} }
export function addProject(project: Project) { export function addProject(project: Project) {
@ -45,10 +44,8 @@ export function generateDefaultConfig() {
cloningCommand: "git clone %s %n", cloningCommand: "git clone %s %n",
}; };
const configString = toml.stringify( const configString = JSON.stringify(defaultConfig);
defaultConfig as unknown as Record<string, unknown>, fs.writeFileSync(configPath + "config.json", configString);
);
fs.writeFileSync(configPath + "config.toml", configString);
const projects: Project[] = []; const projects: Project[] = [];
saveProjects(projects); saveProjects(projects);

View file

@ -25,7 +25,6 @@
"@semantic-release/changelog": "^6.0.3", "@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1", "@semantic-release/git": "^10.0.1",
"@semantic-release/release-notes-generator": "^14.0.3", "@semantic-release/release-notes-generator": "^14.0.3",
"@std/toml": "npm:@jsr/std__toml",
"@types/commander": "^2.12.5", "@types/commander": "^2.12.5",
"@types/inquirer": "^9.0.8", "@types/inquirer": "^9.0.8",
"commander": "^14.0.0", "commander": "^14.0.0",