Skip to content

Commit

Permalink
Update deps (v0.1.10)
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeOShannessy committed Jun 22, 2024
1 parent 16eafa1 commit 9a1ba5f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 77 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@smoke-cloud/fds-inspect-cli",
"version": "0.1.7",
"version": "0.1.10",
"exports": "./main.ts",
"tasks": {
"dev": "deno run --watch main.ts"
Expand Down
62 changes: 7 additions & 55 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 18 additions & 21 deletions main.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
import {
type FdsFile,
verifyInput,
} from "jsr:@smoke-cloud/[email protected]";
import * as fdsInspect from "jsr:@smoke-cloud/[email protected]";
import * as fdsInspectCore from "jsr:@smoke-cloud/[email protected]";
import * as fdsInspect from "jsr:@smoke-cloud/[email protected]";
import { Command } from "jsr:@cliffy/[email protected]";
import { open } from "./open.ts";
import {
getJson,
getJsonTemp,
renderTypstPdf,
renderVerificationTypst,
} from "jsr:@smoke-cloud/[email protected]";

await new Command()
.name("tway-server-manager")
Expand All @@ -28,10 +19,10 @@ await new Command()
.command("count-cells", "Count the total number of cells")
// .option("-f, --foo", "Foo option.")
.arguments("<input-path:string>")
.action(async (_options, ...args) => {
const fdsFile = await getJson(args[0]);
const nCells = fdsInspect.summary.countCells(fdsFile);
console.log(nCells);
.action(async () => {
// const fdsData = await getJsonTemp(args[0]);
// const nCells = fdsInspect.summary.countCells(fdsData);
// console.log(nCells);
})
// Get Threadway Send
.command("meshes", "Display information on each mesh")
Expand Down Expand Up @@ -130,16 +121,22 @@ await new Command()
.arguments("<input-path:string>")
.action(async (_options, ...args) => {
const inputPath = args[0];
const fdsFile: FdsFile = await getJsonTemp(inputPath);
const verificationSummary = verifyInput(fdsFile);
const inputSummary = fdsInspect.summary.summarise_input(fdsFile);
const typst = renderVerificationTypst(inputSummary, verificationSummary);
const fdsData = await fdsInspect.getJsonTemp(inputPath);
const verificationSummary = fdsInspectCore.verifyInput(
fdsData,
fdsInspectCore.stdTestList,
);
const inputSummary = fdsInspectCore.summary.summarise_input(fdsData);
const typst = fdsInspect.renderVerificationTypst(
inputSummary,
verificationSummary,
);
const tempFile = await Deno.makeTempFile({
prefix: fdsFile.chid,
prefix: fdsData.chid,
suffix: "_Verification.pdf",
});
try {
await renderTypstPdf(tempFile, typst);
await fdsInspect.renderTypstPdf(tempFile, typst);
await open(tempFile);
} catch (e) {
console.error(e.message);
Expand Down

0 comments on commit 9a1ba5f

Please sign in to comment.