Revert "It builds, but now the page crashes 🔥"

This reverts commit b716dc5b35.
This commit is contained in:
MotorTruck1221 2024-09-28 15:12:27 -06:00
parent b716dc5b35
commit 9a2306a9a8
No known key found for this signature in database
GPG key ID: 08F417E2B8B61EA4
6 changed files with 25 additions and 22 deletions

View file

@ -19,7 +19,7 @@
"@fastify/static": "^7.0.4", "@fastify/static": "^7.0.4",
"@iconify-json/ph": "^1.2.0", "@iconify-json/ph": "^1.2.0",
"@mercuryworkshop/bare-mux": "1.1.1", "@mercuryworkshop/bare-mux": "1.1.1",
"@mercuryworkshop/epoxy-tls": "2.0.0-3", "@mercuryworkshop/epoxy-tls": "2.1.4-1",
"@mercuryworkshop/epoxy-transport": "2.0.1", "@mercuryworkshop/epoxy-transport": "2.0.1",
"@titaniumnetwork-dev/ultraviolet": "3.1.2", "@titaniumnetwork-dev/ultraviolet": "3.1.2",
"astro": "^4.15.9", "astro": "^4.15.9",

9
pnpm-lock.yaml generated
View file

@ -33,8 +33,8 @@ importers:
specifier: 1.1.1 specifier: 1.1.1
version: 1.1.1 version: 1.1.1
'@mercuryworkshop/epoxy-tls': '@mercuryworkshop/epoxy-tls':
specifier: 2.0.0-3 specifier: 2.1.4-1
version: 2.0.0-3 version: 2.1.4-1
'@mercuryworkshop/epoxy-transport': '@mercuryworkshop/epoxy-transport':
specifier: 2.0.1 specifier: 2.0.1
version: 2.0.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@6.0.4) version: 2.0.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@6.0.4)
@ -597,6 +597,9 @@ packages:
'@mercuryworkshop/epoxy-tls@2.0.0-3': '@mercuryworkshop/epoxy-tls@2.0.0-3':
resolution: {integrity: sha512-iC5CViTh2xn44xtjvDW4YW9qoeoJcCBOqcNmffBx3RHdK7FAzAWFHLTUBtdlnMVv6cjYZtV+eUTzxyreqlgOVA==} resolution: {integrity: sha512-iC5CViTh2xn44xtjvDW4YW9qoeoJcCBOqcNmffBx3RHdK7FAzAWFHLTUBtdlnMVv6cjYZtV+eUTzxyreqlgOVA==}
'@mercuryworkshop/epoxy-tls@2.1.4-1':
resolution: {integrity: sha512-kRbW12tU4TAf9GuoLfyFYvUATqFZq6n9ScRSfwAECceOBWDlr+bACnSH45lLDXvjBKwxZotTyYE5aNc+Ow+M3Q==}
'@mercuryworkshop/epoxy-transport@2.0.1': '@mercuryworkshop/epoxy-transport@2.0.1':
resolution: {integrity: sha512-iGuH/CT5hCVRYBa+5ZrlTG0DWII9VOCMHnmv9CPFLM17obE84y9EUXpTp9hXdfENnuAcNzQVPizjwVas7HiYQA==} resolution: {integrity: sha512-iGuH/CT5hCVRYBa+5ZrlTG0DWII9VOCMHnmv9CPFLM17obE84y9EUXpTp9hXdfENnuAcNzQVPizjwVas7HiYQA==}
@ -4128,6 +4131,8 @@ snapshots:
'@mercuryworkshop/epoxy-tls@2.0.0-3': {} '@mercuryworkshop/epoxy-tls@2.0.0-3': {}
'@mercuryworkshop/epoxy-tls@2.1.4-1': {}
'@mercuryworkshop/epoxy-transport@2.0.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@6.0.4)': '@mercuryworkshop/epoxy-transport@2.0.1(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@6.0.4)':
dependencies: dependencies:
'@mercuryworkshop/epoxy-tls': 2.0.0-3 '@mercuryworkshop/epoxy-tls': 2.0.0-3

View file

@ -46,7 +46,7 @@ const { title, description, input, select, button } = Astro.props;
))} ))}
</select> </select>
} }
<button id={button.id} class="w-36 h-10 rounded-md border border-input-border-color text-input-text bg-input hover:border-input hover:bg-input-border-color hover:text-input hover:font-bold active:bg-input active:text-input-text transition-all duration-200"> <button id={button.id.replace(/[^a-zA-Z0-9]/g, '').toLowerCase()} class="w-36 h-10 rounded-md border border-input-border-color text-input-text bg-input hover:border-input hover:bg-input-border-color hover:text-input hover:font-bold active:bg-input active:text-input-text transition-all duration-200">
{button.name} {button.name}
</button> </button>
</div> </div>

View file

@ -43,12 +43,11 @@ const t = useTranslations(lang);
<script> <script>
import { initSw, wispUrl } from "@utils/registerSW.ts"; //../../utils/registerSW.ts import { initSw, wispUrl } from "@utils/registerSW.ts"; //../../utils/registerSW.ts
import { search } from "@utils/search.ts"; //../../utils/search.ts import { search } from "@utils/search.ts"; //../../utils/search.ts
import epoxy from "@mercuryworkshop/epoxy-tls"; import initEpoxy, { EpoxyClient, EpoxyClientOptions } from "@mercuryworkshop/epoxy-tls";
//@ts-ignore
import ROOTS from "@mercuryworkshop/epoxy-tls/certs";
type Suggestion = { type Suggestion = {
phrase: string phrase: string
} }
await initEpoxy();
function proxy(term: string) { function proxy(term: string) {
return __uv$config!.prefix + __uv$config.encodeUrl!(search(term, "https://www.google.com/search?q=%s")); return __uv$config!.prefix + __uv$config.encodeUrl!(search(term, "https://www.google.com/search?q=%s"));
} }
@ -71,12 +70,11 @@ const t = useTranslations(lang);
}) })
input?.addEventListener("input", async function() { input?.addEventListener("input", async function() {
console.log("EA"); console.log("EA");
const { EpoxyClient, EpoxyClientOptions } = await epoxy(); //This ONLY runs once await initEpoxy(); //This ONLY runs once
if (!epoxyClient) { if (!epoxyClient) {
console.debug("Creating epoxy client"); console.debug("Creating epoxy client");
epoxyClientOptions = await new EpoxyClientOptions(); epoxyClientOptions = new EpoxyClientOptions();
epoxyClientOptions.udp_extension_required = false; epoxyClient = new EpoxyClient(wispUrl, epoxyClientOptions);
epoxyClient = await new EpoxyClient(wispUrl, ROOTS, epoxyClientOptions);
} }
const value = input?.value; const value = input?.value;
console.log(value); console.log(value);

View file

@ -30,7 +30,7 @@ export const prerender = true;
{name: 'Google', value: 'google', disabled: false }, {name: 'Google', value: 'google', disabled: false },
{ name: 'Wikipedia', value: 'wikipedia', disabled: false} { name: 'Wikipedia', value: 'wikipedia', disabled: false}
] }}> ] }}>
</SettingsCard> </SettingsCard
<SettingsCard <SettingsCard
title="A:B & Blob" title="A:B & Blob"
description="Choose to open your tab in about:blank or blob" description="Choose to open your tab in about:blank or blob"

View file

@ -1,12 +1,12 @@
{ {
"extends": "astro/tsconfigs/strict", "extends": "astro/tsconfigs/strict",
"exclude": ["dist/**", "node_modules/**", "public/**", "src/ts/rammerhead.ts"], "include": ["src"],
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"@components/*": ["src/components/*"], "@components/*": ["src/components/*"],
"@layouts/*": ["src/layouts/*"], "@layouts/*": ["src/layouts/*"],
"@utils/*": ["src/utils/*"] "@utils/*" : ["src/utils/*"]
} }
} }
} }