diff --git a/packages/silverbullet-common/manifest.ts b/packages/silverbullet-common/manifest.ts index e7ef898..2cd2b13 100644 --- a/packages/silverbullet-common/manifest.ts +++ b/packages/silverbullet-common/manifest.ts @@ -2,8 +2,8 @@ import * as plugos from "../plugos/types"; import { EndpointHookT } from "../plugos/hooks/endpoint"; import { CronHookT } from "../plugos/hooks/node_cron"; import { EventHookT } from "../plugos/hooks/event"; -import { CommandHookT } from "../silverbullet-webapp/hooks/command"; -import { SlashCommandHookT } from "../silverbullet-webapp/hooks/slash_command"; +import { CommandHookT } from "@silverbulletmd/web/hooks/command"; +import { SlashCommandHookT } from "@silverbulletmd/web/hooks/slash_command"; export type SilverBulletHooks = CommandHookT & SlashCommandHookT & diff --git a/packages/silverbullet-common/spaces/space.ts b/packages/silverbullet-common/spaces/space.ts index bf8ea14..9423a18 100644 --- a/packages/silverbullet-common/spaces/space.ts +++ b/packages/silverbullet-common/spaces/space.ts @@ -1,10 +1,10 @@ import { SpacePrimitives } from "./space_primitives"; -import { safeRun } from "@silverbulletmd/web/util"; import { PageMeta } from "../types"; import { EventEmitter } from "../event"; import { Plug } from "../../plugos/plug"; import { Manifest } from "../manifest"; import { plugPrefix, trashPrefix } from "./constants"; +import { safeRun } from "../util"; const pageWatchInterval = 2000; diff --git a/packages/silverbullet-common/tree.test.ts b/packages/silverbullet-common/tree.test.ts index 532b0ae..24da021 100644 --- a/packages/silverbullet-common/tree.test.ts +++ b/packages/silverbullet-common/tree.test.ts @@ -9,7 +9,7 @@ import { renderToText, replaceNodesMatching } from "./tree"; -import wikiMarkdownLang from "../silverbullet-webapp/parser"; +import wikiMarkdownLang from "@silverbulletmd/web/parser"; const mdTest1 = ` # Heading diff --git a/packages/silverbullet-web/util.ts b/packages/silverbullet-common/util.ts similarity index 100% rename from packages/silverbullet-web/util.ts rename to packages/silverbullet-common/util.ts diff --git a/packages/silverbullet-server/api_server.ts b/packages/silverbullet-server/api_server.ts index 00056a0..5df278c 100644 --- a/packages/silverbullet-server/api_server.ts +++ b/packages/silverbullet-server/api_server.ts @@ -17,7 +17,7 @@ import { NodeCronHook } from "@silverbulletmd/plugos/hooks/node_cron"; import { markdownSyscalls } from "@silverbulletmd/common/syscalls/markdown"; import { EventedSpacePrimitives } from "@silverbulletmd/common/spaces/evented_space_primitives"; import { Space } from "@silverbulletmd/common/spaces/space"; -import { safeRun, throttle } from "@silverbulletmd/web/util"; +import { safeRun, throttle } from "@silverbulletmd/common/util"; import { createSandbox } from "@silverbulletmd/plugos/environments/node_sandbox"; import { jwtSyscalls } from "@silverbulletmd/plugos/syscalls/jwt"; import { fetchSyscalls } from "@silverbulletmd/plugos/syscalls/fetch.node"; diff --git a/packages/silverbullet-server/syscalls/space.ts b/packages/silverbullet-server/syscalls/space.ts index c4d362e..3a4f349 100644 --- a/packages/silverbullet-server/syscalls/space.ts +++ b/packages/silverbullet-server/syscalls/space.ts @@ -1,6 +1,6 @@ -import { PageMeta } from "../../common/types"; -import { SysCallMapping } from "../../plugos/system"; -import { Space } from "../../common/spaces/space"; +import { PageMeta } from "@silverbulletmd/common/types"; +import { SysCallMapping } from "@silverbulletmd/plugos/system"; +import { Space } from "@silverbulletmd/common/spaces/space"; export default (space: Space): SysCallMapping => { return { diff --git a/packages/silverbullet-web/boot.ts b/packages/silverbullet-web/boot.ts index d8141b1..f9c0601 100644 --- a/packages/silverbullet-web/boot.ts +++ b/packages/silverbullet-web/boot.ts @@ -1,5 +1,5 @@ import { Editor } from "./editor"; -import { safeRun } from "./util"; +import { safeRun } from "../silverbullet-common/util"; import { Space } from "@silverbulletmd/common/spaces/space"; import { HttpSpacePrimitives } from "@silverbulletmd/common/spaces/http_space_primitives"; diff --git a/packages/silverbullet-web/components/command_palette.tsx b/packages/silverbullet-web/components/command_palette.tsx index 3f67b2a..260f823 100644 --- a/packages/silverbullet-web/components/command_palette.tsx +++ b/packages/silverbullet-web/components/command_palette.tsx @@ -1,4 +1,4 @@ -import { isMacLike } from "../util"; +import { isMacLike } from "../../silverbullet-common/util"; import { FilterList } from "./filter"; import { faPersonRunning } from "@fortawesome/free-solid-svg-icons"; import { AppCommand } from "../hooks/command"; diff --git a/packages/silverbullet-web/components/status_bar.tsx b/packages/silverbullet-web/components/status_bar.tsx index 169e843..de67129 100644 --- a/packages/silverbullet-web/components/status_bar.tsx +++ b/packages/silverbullet-web/components/status_bar.tsx @@ -1,5 +1,5 @@ import { EditorView } from "@codemirror/view"; -import * as util from "../util"; +import * as util from "../../silverbullet-common/util"; export function StatusBar({ editorView }: { editorView?: EditorView }) { let wordCount = 0, diff --git a/packages/silverbullet-web/editor.tsx b/packages/silverbullet-web/editor.tsx index 8c4b7f8..39fbaa3 100644 --- a/packages/silverbullet-web/editor.tsx +++ b/packages/silverbullet-web/editor.tsx @@ -37,7 +37,7 @@ import { indexerSyscalls } from "./syscalls"; import { spaceSyscalls } from "./syscalls/space"; import { Action, AppViewState, initialViewState } from "./types"; import { SilverBulletHooks } from "@silverbulletmd/common/manifest"; -import { safeRun, throttle } from "./util"; +import { safeRun, throttle } from "../silverbullet-common/util"; import { System } from "../plugos/system"; import { EventHook } from "../plugos/hooks/event"; import { systemSyscalls } from "./syscalls/system"; diff --git a/packages/silverbullet-web/hooks/slash_command.ts b/packages/silverbullet-web/hooks/slash_command.ts index 70c1e12..dcc7a37 100644 --- a/packages/silverbullet-web/hooks/slash_command.ts +++ b/packages/silverbullet-web/hooks/slash_command.ts @@ -2,7 +2,7 @@ import { Hook, Manifest } from "../../plugos/types"; import { System } from "../../plugos/system"; import { Completion, CompletionContext, CompletionResult } from "@codemirror/autocomplete"; import { slashCommandRegexp } from "../types"; -import { safeRun } from "../util"; +import { safeRun } from "../../silverbullet-common/util"; import { Editor } from "../editor"; export type SlashCommandDef = { diff --git a/packages/silverbullet-web/navigator.ts b/packages/silverbullet-web/navigator.ts index 05183de..02e36ee 100644 --- a/packages/silverbullet-web/navigator.ts +++ b/packages/silverbullet-web/navigator.ts @@ -1,4 +1,4 @@ -import { safeRun } from "./util"; +import { safeRun } from "../silverbullet-common/util"; function encodePageUrl(name: string): string { return name.replaceAll(" ", "_"); diff --git a/tsconfig.json b/tsconfig.json index 02c2abf..84737fb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,11 @@ { - "include": ["webapp/**/*", "server/**/*", "plugos/**/*", "plugs/**/*", "common/**/*"], + "include": ["packages/**/*"], "compilerOptions": { "target": "esnext", "strict": true, "moduleResolution": "node", "module": "esnext", + "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "resolveJsonModule": true,