format with Prettier

This commit is contained in:
Brian Beck 2025-11-29 09:08:20 -08:00
parent c5c43d92d9
commit c8391a1056
37 changed files with 1013 additions and 91 deletions

View file

@ -43,7 +43,7 @@ async function run({ onlyNew }: { onlyNew: boolean }) {
"--", // args after here go to the script
...inputFiles,
],
{ stdio: "inherit" }
{ stdio: "inherit" },
);
}

View file

@ -27,7 +27,7 @@ async function run() {
// "--no-anims",
// "--only-visible",
],
{ stdio: "inherit" }
{ stdio: "inherit" },
);
}
}

View file

@ -23,7 +23,7 @@ async function buildExtractedGameDataFolder() {
archives.set(source, archive);
}
const entry = archive.files.find(
(entry) => normalizePath(entry.path) === filePath
(entry) => normalizePath(entry.path) === filePath,
);
const inFile = `${inputBaseDir}/${source}:${filePath}`;
if (!entry) {

View file

@ -24,7 +24,7 @@ async function walkDirectory(
entry: Dirent<string>;
fullPath: string;
}) => boolean | Promise<boolean>;
}
},
): Promise<void> {
const entries = await fs.readdir(dir, { withFileTypes: true });
@ -102,12 +102,12 @@ async function buildManifest() {
archiveDirs = orderBy(
archiveDirs,
[(fullPath) => path.basename(fullPath).toLowerCase()],
["asc"]
["asc"],
);
for (const archivePath of archiveDirs) {
const relativeArchivePath = normalizePath(
path.relative(`${baseDir}/@vl2`, archivePath)
path.relative(`${baseDir}/@vl2`, archivePath),
);
await walkDirectory(archivePath, {
onFile: ({ dir, entry, fullPath }) => {
@ -140,7 +140,7 @@ async function buildManifest() {
.map((source) => ` ❗️ ${source}`)
.join("")
: ""
}`
}`,
);
const resolvedPath = lastSource

View file

@ -30,7 +30,7 @@ async function run() {
.map((f) => f.match(/^textures\/skins\/(.+)\.ifl$/))
.filter(Boolean)
.map((match) => match[1])
.join("\n")
.join("\n"),
);
return;
} else if (
@ -38,7 +38,7 @@ async function run() {
(!values.name && !positionals[0])
) {
console.error(
"Must specify exactly one of --name (-n) or a positional filename."
"Must specify exactly one of --name (-n) or a positional filename.",
);
return 1;
}
@ -53,7 +53,7 @@ async function run() {
inspect(parseImageFrameList(missionScript), {
colors: true,
depth: Infinity,
})
}),
);
}

View file

@ -6,12 +6,12 @@ const interiorFile = process.argv[2];
const interiorBuffer = fs.readFileSync(interiorFile);
const interiorArrayBuffer = interiorBuffer.buffer.slice(
interiorBuffer.byteOffset,
interiorBuffer.byteOffset + interiorBuffer.byteLength
interiorBuffer.byteOffset + interiorBuffer.byteLength,
);
console.log(
inspect(parseInteriorBuffer(interiorArrayBuffer), {
colors: true,
depth: Infinity,
})
}),
);

View file

@ -30,7 +30,7 @@ async function run() {
.map((f) => f.match(/^missions\/(.+)\.mis$/))
.filter(Boolean)
.map((match) => match[1])
.join("\n")
.join("\n"),
);
return;
} else if (
@ -38,7 +38,7 @@ async function run() {
(!values.name && !positionals[0])
) {
console.error(
"Must specify exactly one of --name (-n) or a positional filename."
"Must specify exactly one of --name (-n) or a positional filename.",
);
return 1;
}
@ -53,7 +53,7 @@ async function run() {
inspect(parseMissionScript(missionScript), {
colors: true,
depth: Infinity,
})
}),
);
}

View file

@ -30,7 +30,7 @@ async function run() {
.map((f) => f.match(/^terrains\/(.+)\.ter$/))
.filter(Boolean)
.map((match) => match[1])
.join("\n")
.join("\n"),
);
return;
} else if (
@ -38,7 +38,7 @@ async function run() {
(!values.name && !positionals[0])
) {
console.error(
"Must specify exactly one of --name (-n) or a positional filename."
"Must specify exactly one of --name (-n) or a positional filename.",
);
return 1;
}
@ -51,14 +51,14 @@ async function run() {
const terrainBuffer = fs.readFileSync(terrainFile);
const terrainArrayBuffer = terrainBuffer.buffer.slice(
terrainBuffer.byteOffset,
terrainBuffer.byteOffset + terrainBuffer.byteLength
terrainBuffer.byteOffset + terrainBuffer.byteLength,
);
console.log(
inspect(parseTerrainBuffer(terrainArrayBuffer), {
colors: true,
depth: Infinity,
})
}),
);
}

View file

@ -62,7 +62,7 @@ async function run({
console.log(property.value);
} else {
console.log(
`${baseName} > ${consoleObject.className} > ${property.target.name} = ${property.value}`
`${baseName} > ${consoleObject.className} > ${property.target.name} = ${property.value}`,
);
}
}