diff --git a/scripts/openapi.js b/scripts/openapi.js
index ab7de525..39396d8d 100644
--- a/scripts/openapi.js
+++ b/scripts/openapi.js
@@ -243,7 +243,16 @@ async function main() {
fs.writeFileSync(openapiPath, JSON.stringify(specification, null, 4).replaceAll("#/definitions", "#/components/schemas").replaceAll("bigint", "number"));
console.log("Wrote OpenAPI specification to", openapiPath);
- console.log("Specification contains", Object.keys(specification.paths).length, "paths and", Object.keys(specification.components.schemas).length, "schemas in", Number(totalSw.elapsed().totalMilliseconds + "." + totalSw.elapsed().microseconds), "ms.");
+ const elapsedMs = Number(totalSw.elapsed().totalMilliseconds + "." + totalSw.elapsed().microseconds);
+ console.log(
+ "Specification contains",
+ Object.keys(specification.paths).length,
+ "paths and",
+ Object.keys(specification.components.schemas).length,
+ "schemas in",
+ elapsedMs,
+ "ms.",
+ );
}
main();
diff --git a/scripts/schema.js b/scripts/schema.js
index d123ad8b..1779c8d6 100644
--- a/scripts/schema.js
+++ b/scripts/schema.js
@@ -237,7 +237,9 @@ async function main() {
mergeDefs(name, part);
const elapsed = schemaSw.getElapsedAndReset();
- process.stdout.write("Done in " + yellowBright(elapsed.totalMilliseconds + "." + elapsed.microseconds) + " ms, " + yellowBright(JSON.stringify(part).length) + " bytes (unformatted) ");
+ process.stdout.write(
+ "Done in " + yellowBright(elapsed.totalMilliseconds + "." + elapsed.microseconds) + " ms, " + yellowBright(JSON.stringify(part).length) + " bytes (unformatted) ",
+ );
if (elapsed.totalMilliseconds >= 20) console.log(bgRedBright("\x1b[5m[SLOW]\x1b[25m"));
else console.log();
@@ -307,7 +309,8 @@ async function main() {
fs.writeFileSync(schemaPath, JSON.stringify(definitions, null, 4));
fs.writeFileSync(__dirname + "/schemaExclusions.json", JSON.stringify(exclusionList, null, 4));
- console.log("\nSuccessfully wrote", Object.keys(definitions).length, "schemas to", schemaPath, "in", Number(totalSw.elapsed().totalMilliseconds + "." + totalSw.elapsed().microseconds), "ms,", fs.statSync(schemaPath).size, "bytes.");
+ const elapsedMs = Number(totalSw.elapsed().totalMilliseconds + "." + totalSw.elapsed().microseconds);
+ console.log("\nSuccessfully wrote", Object.keys(definitions).length, "schemas to", schemaPath, "in", elapsedMs, "ms,", fs.statSync(schemaPath).size, "bytes.");
}
function deleteOneOfKindUndefinedRecursive(obj, path) {
|