This splits indexing into two phases: * preindex (where only pages, space lua, space styles are indexed) * index (where everything else is indexed) The goal is to get to more-or-less operational state quicker this way, because probably most functionality can already be enabled after the pre-index phase.
25 lines
547 B
TypeScript
25 lines
547 B
TypeScript
import type { ParseTree } from "@silverbulletmd/silverbullet/lib/tree";
|
|
import type { EventSubscriptionDef } from "./manifest.ts";
|
|
|
|
export type IndexTreeEvent = {
|
|
name: string;
|
|
tree: ParseTree;
|
|
};
|
|
|
|
export type PageCreatingEvent = {
|
|
name: string;
|
|
};
|
|
|
|
export type PageCreatingContent = {
|
|
text: string;
|
|
perm: "ro" | "rw";
|
|
};
|
|
export type EventSubscription = EventSubscriptionDef & {
|
|
run: (...args: any[]) => Promise<any>;
|
|
};
|
|
|
|
export type ResolvedPlug = {
|
|
code: string;
|
|
name?: string; // This will only dictate the filename
|
|
} | string;
|