From 001b90744b28ba85c3b611657a82cd0556e35546 Mon Sep 17 00:00:00 2001 From: Emma Date: Tue, 20 May 2025 15:13:36 -0600 Subject: [PATCH] fix: jsr install breaks because of missing asciiart file --- deno.json | 2 +- util/asciiArt.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/deno.json b/deno.json index b1961f9..fc0d08d 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@bearmetal/pdf-tools", - "version": "1.0.2", + "version": "1.0.3", "license": "GPL 3.0", "tasks": { "dev": "deno run -A --env-file=.env main.ts", diff --git a/util/asciiArt.ts b/util/asciiArt.ts index aaaacc6..7f6a8bd 100644 --- a/util/asciiArt.ts +++ b/util/asciiArt.ts @@ -3,8 +3,10 @@ import { join } from "@std/path"; export async function getAsciiArt(art: string) { try { - const artFilePath = Deno.env.get("BEARMETAL_ASCII_PATH") || - join(import.meta.dirname || "", "../asciiart.txt"); + const artFilePath = + Deno.env.get("BEARMETAL_ASCII_PATH") || import.meta.dirname + ? join(import.meta.dirname || "", "../asciiart.txt") + : "https://git.cyborggrizzly.com/BearMetal/pdf-tools/raw/branch/main/asciiart.txt"; let artFileText: string; if (artFilePath?.startsWith("http")) { artFileText = await fetch(artFilePath).then((res) => res.text()); -- 2.47.2