build: bump deps

This commit is contained in:
Jozef Steinhübl 2024-05-07 17:36:32 +02:00
parent 45b9a027d5
commit 4136d52f67
No known key found for this signature in database
GPG key ID: E6BC90C91973B08F
3 changed files with 6 additions and 17 deletions

BIN
bun.lockb

Binary file not shown.

View file

@ -18,6 +18,6 @@
"algoliasearch": "^4.23.2",
"bun-tracestrings": "github:oven-sh/bun.report",
"gray-matter": "^4.0.3",
"lilybird": "^0.6.0"
"lilybird": "^0.6.1"
}
}

View file

@ -1,6 +1,6 @@
import { GuildMember } from "@lilybird/transformers";
import { BUN_EMOJIS } from "./constants.ts";
import { parse, formatMarkdown } from "bun-tracestrings";
import { parseAndRemap, formatMarkdown } from "bun-tracestrings";
const URL_REGEX = /\(\s*(https?:\/\/[^\s\[\]]+)\s*\)/gi;
@ -53,22 +53,11 @@ export function sliceIfStartsWith(input: string, startsWith: string) {
export async function getBunReportDetailsInMarkdown(
url: string
): Promise<string> {
const parsed = await parse(url);
const remap = await parseAndRemap(url);
if (!Array.isArray(remap.features)) remap.features = []; // temporary fix
const res = await fetch("https://bun.report/remap", {
method: "POST",
body: url,
});
if (!res.ok) {
return `Failed to get details from bun.report: ${res.statusText}`;
}
const json = await res.json();
let content = formatMarkdown({
...parsed,
...json,
let content = formatMarkdown(remap, {
source: url,
});
for (const match of content.matchAll(URL_REGEX)) {