Compare commits
No commits in common. "6a2a1a736665001141e023d5bb9259b88bb7e198" and "be02d685e53320f287c36119b2c8993438179c3b" have entirely different histories.
6a2a1a7366
...
be02d685e5
|
@ -52,7 +52,6 @@
|
||||||
vscodium.fhs
|
vscodium.fhs
|
||||||
xarchiver
|
xarchiver
|
||||||
xclip
|
xclip
|
||||||
xdotool
|
|
||||||
xfce.xfce4-pulseaudio-plugin
|
xfce.xfce4-pulseaudio-plugin
|
||||||
xfce.xfce4-timer-plugin
|
xfce.xfce4-timer-plugin
|
||||||
xfce.xfce4-whiskermenu-plugin
|
xfce.xfce4-whiskermenu-plugin
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
import { Command } from "https://deno.land/x/cliffy@v0.25.5/command/mod.ts";
|
import { Command } from "https://deno.land/x/cliffy@v0.25.5/command/mod.ts";
|
||||||
import * as prompt from "https://deno.land/x/cliffy@v0.25.5/prompt/mod.ts";
|
import * as prompt from "https://deno.land/x/cliffy@v0.25.5/prompt/mod.ts";
|
||||||
|
|
||||||
import { stringifyJsonPretty } from "./utilities.ts";
|
|
||||||
|
|
||||||
const CaveComplexity = [1, 2, 3] as const;
|
const CaveComplexity = [1, 2, 3] as const;
|
||||||
const CaveLength = [1, 2, 3] as const;
|
const CaveLength = [1, 2, 3] as const;
|
||||||
const HazardLevel = [1, 2, 3, 4, 5] as const;
|
const HazardLevel = [1, 2, 3, 4, 5] as const;
|
||||||
|
@ -508,14 +506,14 @@ async function main(): Promise<void> {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (options.testing) {
|
if (options.testing) {
|
||||||
console.log(stringifyJsonPretty(newMission));
|
console.log(newMission);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dataMissions.push(newMission);
|
dataMissions.push(newMission);
|
||||||
await Deno.writeTextFile(
|
await Deno.writeTextFile(
|
||||||
options.dataFile,
|
options.dataFile,
|
||||||
stringifyJsonPretty(dataMissions) + "\n",
|
JSON.stringify(dataMissions, null, 2) + "\n",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
import { parse } from "https://deno.land/std@0.167.0/encoding/toml.ts";
|
import { parse } from "https://deno.land/std@0.167.0/encoding/toml.ts";
|
||||||
import { TextDecoder } from "https://deno.land/std@0.167.0/node/util.ts";
|
import { TextDecoder } from "https://deno.land/std@0.167.0/node/util.ts";
|
||||||
|
|
||||||
export function stringifyJsonPretty(input: unknown): string {
|
|
||||||
return JSON.stringify(input, null, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function runAndReturnStdout(
|
export async function runAndReturnStdout(
|
||||||
options: Deno.RunOptions,
|
options: Deno.RunOptions,
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
|
|
Loading…
Reference in New Issue