diff --git a/checker.tsx b/checker.tsx index b0673ed..02f9cd5 100644 --- a/checker.tsx +++ b/checker.tsx @@ -3,7 +3,9 @@ import { parse as JSONC } from "https://deno.land/x/jsonct@v0.1.0/mod.ts"; type ConfigCheck = {path?:string, text?:string, json?:Record>}; type ConfigCheckPair = [config:ConfigCheck, imports:ConfigCheck]; +/** The full url location of checker.tsx wherever it is hosted */ export const RootHost = import.meta.resolve("./"); +/** The file system url where deno is currently running */ export const Root = new URL(`file://${Deno.cwd().replaceAll("\\", "/")}`).toString(); export async function HuntConfig() { @@ -58,7 +60,7 @@ export async function HuntConfig() } } - let imports:ConfigCheck = {}; + const imports:ConfigCheck = {}; if(json && json.imports) { // config.imports @@ -116,7 +118,7 @@ export async function Install(file:string, overrideName?:string, handler?:(conte export async function Check() { - let [config, imports] = await HuntConfig(); + const [config, imports] = await HuntConfig(); try { @@ -167,7 +169,7 @@ export async function Check() const importMap = imports.json.imports as Record; const bake =async(obj:ConfigCheck)=> await Deno.writeTextFile(Deno.cwd()+"/"+obj.path, JSON.stringify(obj.json, null, "\t")); - importMap["react"] = `https://esm.sh/preact@10.18.2/compat`; + importMap["react"] = `https://esm.sh/preact@10.20.2/compat`; importMap["react/"] = `https://esm.sh/preact@10.20.2/compat/`; importMap["@preact/signals"] = `https://esm.sh/@preact/signals@1.2.3`; importMap["@twind/core"] = `https://esm.sh/@twind/core@1.1.3`;