From 631fde4868e4fe5e0b8f7c779d8d079093a70c3b Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 8 Sep 2023 08:49:41 -0400 Subject: [PATCH] fix: update imports to be local --- src/kernel/auth.ts | 2 +- src/kernel/queries.ts | 4 ++-- src/kernel/query/version.ts | 2 +- src/module/client.ts | 2 +- src/module/log.ts | 2 +- src/module/messages.ts | 3 ++- src/module/queries.ts | 4 ++-- 7 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/kernel/auth.ts b/src/kernel/auth.ts index 300ed0a..546b644 100644 --- a/src/kernel/auth.ts +++ b/src/kernel/auth.ts @@ -5,7 +5,7 @@ import { loginPromise, logoutPromise, } from "./queries.js"; -import { Err } from "../types.js"; +import { Err } from "#types.js"; // There are 5 stages of auth. // diff --git a/src/kernel/queries.ts b/src/kernel/queries.ts index 4f02959..9adedb3 100644 --- a/src/kernel/queries.ts +++ b/src/kernel/queries.ts @@ -1,6 +1,6 @@ import { log, logErr } from "./log.js"; -import { DataFn, Err, ErrTuple } from "../types.js"; -import { bufToB64, encodeU64 } from "../util.js"; +import { DataFn, Err, ErrTuple } from "#types.js"; +import { bufToB64, encodeU64 } from "#util.js"; // queryResolve is the 'resolve' value of a promise that returns an ErrTuple. // It gets called when a query sends a 'response' message. diff --git a/src/kernel/query/version.ts b/src/kernel/query/version.ts index 55fccde..c3cfcfc 100644 --- a/src/kernel/query/version.ts +++ b/src/kernel/query/version.ts @@ -1,5 +1,5 @@ import { newKernelQuery } from "../queries.js"; -import { Err } from "@lumeweb/libweb"; +import { Err } from "#types.js"; // kernelVersion will fetch the version number of the kernel. If successful, // the returned value will be an object containing a field 'version' with a diff --git a/src/module/client.ts b/src/module/client.ts index daa64c7..6d37d4e 100644 --- a/src/module/client.ts +++ b/src/module/client.ts @@ -1,6 +1,6 @@ import Emittery from "emittery"; import { callModule, connectModule, log, logErr } from "../api.js"; -import { DataFn, ErrTuple } from "@lumeweb/libweb"; +import { DataFn, ErrTuple } from "#types.js"; export type callModuleBound = (method: string, data?: any) => Promise; export type connectModuleBound = ( diff --git a/src/module/log.ts b/src/module/log.ts index 80ae2a5..cb1a2f2 100644 --- a/src/module/log.ts +++ b/src/module/log.ts @@ -1,4 +1,4 @@ -import { objAsString } from "@lumeweb/libweb"; +import { objAsString } from "#util.js"; // logHelper is a helper function that runs the code for both log and logErr. // It takes a boolean indiciating whether the log should be an error, and then diff --git a/src/module/messages.ts b/src/module/messages.ts index f168907..2ced617 100644 --- a/src/module/messages.ts +++ b/src/module/messages.ts @@ -9,7 +9,8 @@ import { handleResponseUpdate, } from "./queries.js"; import { handlePresentKey } from "./key.js"; -import { DataFn, ErrFn, addContextToErr, objAsString } from "@lumeweb/libweb"; +import type { DataFn, ErrFn } from "#types.js"; +import { addContextToErr, objAsString } from "#util.js"; // handlerFn takes an ActiveQuery as input and has no return value. The return // is expected to come in the form of calling aq.accept or aq.reject. diff --git a/src/module/queries.ts b/src/module/queries.ts index 8096b21..1b3793e 100644 --- a/src/module/queries.ts +++ b/src/module/queries.ts @@ -1,6 +1,6 @@ import { log, logErr } from "./log.js"; -import { DataFn } from "./messages.js"; -import { ErrTuple, objAsString } from "@lumeweb/libweb"; +import type { DataFn, ErrTuple } from "#types.js"; +import { objAsString } from "#util.js"; // queryResolve defines the function that gets called to resolve a query. It's // the 'resolve' field of a promise that returns a tuple containing some data