Lint error removal
parent
9f353f7de1
commit
c111f72e09
|
@ -1,7 +1,7 @@
|
|||
import { resolve } from "@std/path";
|
||||
import assets from "../dist/plug_asset_bundle.json" with { type: "json" };
|
||||
import { determineDatabaseBackend } from "../server/db_backend.ts";
|
||||
import { KvPrimitives } from "$lib/data/kv_primitives.ts";
|
||||
import type { KvPrimitives } from "$lib/data/kv_primitives.ts";
|
||||
import { DiskSpacePrimitives } from "$common/spaces/disk_space_primitives.ts";
|
||||
|
||||
import { ServerSystem } from "../server/server_system.ts";
|
||||
|
|
|
@ -5,10 +5,10 @@ import clientAssetBundle from "../dist/client_asset_bundle.json" with {
|
|||
import plugAssetBundle from "../dist/plug_asset_bundle.json" with {
|
||||
type: "json",
|
||||
};
|
||||
import { AssetBundle, AssetJson } from "../lib/asset_bundle/bundle.ts";
|
||||
import { AssetBundle, type AssetJson } from "../lib/asset_bundle/bundle.ts";
|
||||
|
||||
import { determineDatabaseBackend } from "../server/db_backend.ts";
|
||||
import { SpaceServerConfig } from "../server/instance.ts";
|
||||
import type { SpaceServerConfig } from "../server/instance.ts";
|
||||
import { runPlug } from "../cmd/plug_run.ts";
|
||||
import { PrefixedKvPrimitives } from "$lib/data/prefixed_kv_primitives.ts";
|
||||
import { sleep } from "$lib/async.ts";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { SpaceSync, SyncStatusItem } from "$common/spaces/sync.ts";
|
||||
import { SpaceSync, type SyncStatusItem } from "$common/spaces/sync.ts";
|
||||
import { MemoryKvPrimitives } from "$lib/data/memory_kv_primitives.ts";
|
||||
import { determineStorageBackend } from "../server/storage_backend.ts";
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
createSandbox as createNoSandbox,
|
||||
runWithSystemLock,
|
||||
} from "../../lib/plugos/sandboxes/no_sandbox.ts";
|
||||
import { SysCallMapping } from "../../lib/plugos/system.ts";
|
||||
import type { SysCallMapping } from "../../lib/plugos/system.ts";
|
||||
import { sleep } from "../../lib/async.ts";
|
||||
|
||||
Deno.test("Run a deno sandbox", {
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
import { AppCommand } from "$lib/command.ts";
|
||||
import { CommandHook } from "./hooks/command.ts";
|
||||
import { PlugNamespaceHook } from "$common/hooks/plug_namespace.ts";
|
||||
import { SilverBulletHooks } from "../lib/manifest.ts";
|
||||
import type { AppCommand } from "$lib/command.ts";
|
||||
import type { CommandHook } from "./hooks/command.ts";
|
||||
import type { PlugNamespaceHook } from "$common/hooks/plug_namespace.ts";
|
||||
import type { SilverBulletHooks } from "../lib/manifest.ts";
|
||||
import { buildQueryFunctions } from "./query_functions.ts";
|
||||
import { ScriptEnvironment } from "./space_script.ts";
|
||||
import { EventHook } from "./hooks/event.ts";
|
||||
import { DataStore } from "$lib/data/datastore.ts";
|
||||
import { System } from "$lib/plugos/system.ts";
|
||||
import { CodeWidgetHook } from "../web/hooks/code_widget.ts";
|
||||
import { PanelWidgetHook } from "../web/hooks/panel_widget.ts";
|
||||
import { SlashCommandHook } from "../web/hooks/slash_command.ts";
|
||||
import { DataStoreMQ } from "$lib/data/mq.datastore.ts";
|
||||
import { ParseTree } from "../plug-api/lib/tree.ts";
|
||||
import type { EventHook } from "./hooks/event.ts";
|
||||
import type { DataStore } from "$lib/data/datastore.ts";
|
||||
import type { System } from "$lib/plugos/system.ts";
|
||||
import type { CodeWidgetHook } from "../web/hooks/code_widget.ts";
|
||||
import type { PanelWidgetHook } from "../web/hooks/panel_widget.ts";
|
||||
import type { SlashCommandHook } from "../web/hooks/slash_command.ts";
|
||||
import type { DataStoreMQ } from "$lib/data/mq.datastore.ts";
|
||||
import type { ParseTree } from "../plug-api/lib/tree.ts";
|
||||
|
||||
const mqTimeout = 10000; // 10s
|
||||
const mqTimeoutRetry = 3;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { QueryExpression } from "$sb/types.ts";
|
||||
import type { QueryExpression } from "$sb/types.ts";
|
||||
import { parseTreeToAST } from "$sb/lib/tree.ts";
|
||||
import { expressionLanguage } from "$common/template/template_parser.ts";
|
||||
import { expressionToKvQueryExpression } from "$sb/lib/parse-query.ts";
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import { Hook, Manifest } from "../../lib/plugos/types.ts";
|
||||
import { System } from "../../lib/plugos/system.ts";
|
||||
import type { Hook, Manifest } from "../../lib/plugos/types.ts";
|
||||
import type { System } from "../../lib/plugos/system.ts";
|
||||
import { EventEmitter } from "../../lib/plugos/event.ts";
|
||||
import { ObjectValue } from "../../plug-api/types.ts";
|
||||
import type { ObjectValue } from "../../plug-api/types.ts";
|
||||
import {
|
||||
FrontmatterConfig,
|
||||
type FrontmatterConfig,
|
||||
SnippetConfig,
|
||||
} from "../../plugs/template/types.ts";
|
||||
import { NewPageConfig } from "../../plugs/template/types.ts";
|
||||
import { throttle } from "../../lib/async.ts";
|
||||
import { AppCommand, CommandHookEvents } from "../../lib/command.ts";
|
||||
import { CommandHookT } from "$lib/manifest.ts";
|
||||
import type { AppCommand, CommandHookEvents } from "../../lib/command.ts";
|
||||
import type { CommandHookT } from "$lib/manifest.ts";
|
||||
|
||||
export class CommandHook extends EventEmitter<CommandHookEvents>
|
||||
implements Hook<CommandHookT> {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import type { Manifest } from "$lib/plugos/types.ts";
|
||||
import { System } from "$lib/plugos/system.ts";
|
||||
import { ScriptEnvironment } from "$common/space_script.ts";
|
||||
import { EventHookI } from "$lib/plugos/eventhook.ts";
|
||||
import { EventHookT } from "$lib/manifest.ts";
|
||||
import type { System } from "$lib/plugos/system.ts";
|
||||
import type { ScriptEnvironment } from "$common/space_script.ts";
|
||||
import type { EventHookI } from "$lib/plugos/eventhook.ts";
|
||||
import type { EventHookT } from "$lib/manifest.ts";
|
||||
|
||||
// System events:
|
||||
// - plug:load (plugName: string)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { NamespaceOperation } from "$lib/plugos/namespace.ts";
|
||||
import { PlugNamespaceHookT } from "$lib/manifest.ts";
|
||||
import { Plug } from "../../lib/plugos/plug.ts";
|
||||
import { System } from "../../lib/plugos/system.ts";
|
||||
import { Hook, Manifest } from "../../lib/plugos/types.ts";
|
||||
import type { NamespaceOperation } from "$lib/plugos/namespace.ts";
|
||||
import type { PlugNamespaceHookT } from "$lib/manifest.ts";
|
||||
import type { Plug } from "../../lib/plugos/plug.ts";
|
||||
import type { System } from "../../lib/plugos/system.ts";
|
||||
import type { Hook, Manifest } from "../../lib/plugos/types.ts";
|
||||
|
||||
type SpaceFunction = {
|
||||
operation: NamespaceOperation;
|
||||
|
|
|
@ -34,7 +34,7 @@ import {
|
|||
objectiveCpp as objectiveCppLanguage,
|
||||
scala as scalaLanguage,
|
||||
} from "@codemirror/legacy-modes/mode/clike?external=@codemirror/language&target=es2022";
|
||||
import { Language, StreamLanguage } from "@codemirror/language";
|
||||
import { type Language, StreamLanguage } from "@codemirror/language";
|
||||
import {
|
||||
javascriptLanguage,
|
||||
typescriptLanguage,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {
|
||||
import type {
|
||||
BlockContext,
|
||||
LeafBlock,
|
||||
LeafBlockParser,
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { commandLinkRegex } from "../command.ts";
|
||||
import { yaml as yamlLanguage } from "@codemirror/legacy-modes/mode/yaml?external=@codemirror/language&target=es2022";
|
||||
import { styleTags, Tag, tags as t } from "@lezer/highlight";
|
||||
import { styleTags, type Tag, tags as t } from "@lezer/highlight";
|
||||
import {
|
||||
BlockContext,
|
||||
LeafBlock,
|
||||
LeafBlockParser,
|
||||
Line,
|
||||
MarkdownConfig,
|
||||
type BlockContext,
|
||||
type LeafBlock,
|
||||
type LeafBlockParser,
|
||||
type Line,
|
||||
type MarkdownConfig,
|
||||
Strikethrough,
|
||||
Subscript,
|
||||
Superscript,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {
|
||||
import type {
|
||||
BlockContext,
|
||||
Element,
|
||||
LeafBlock,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { FunctionMap, Query } from "$sb/types.ts";
|
||||
import type { FunctionMap, Query } from "$sb/types.ts";
|
||||
import { builtinFunctions } from "$lib/builtin_query_functions.ts";
|
||||
import { System } from "$lib/plugos/system.ts";
|
||||
import type { System } from "$lib/plugos/system.ts";
|
||||
import { LimitedMap } from "$lib/limited_map.ts";
|
||||
import { parsePageRef, positionOfLine } from "$sb/lib/page_ref.ts";
|
||||
import { parse } from "$common/markdown_parser/parse_tree.ts";
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import YAML from "js-yaml";
|
||||
import { INDEX_TEMPLATE, SETTINGS_TEMPLATE } from "./PAGE_TEMPLATES.ts";
|
||||
import { SpacePrimitives } from "./spaces/space_primitives.ts";
|
||||
import type { SpacePrimitives } from "./spaces/space_primitives.ts";
|
||||
import { cleanupJSON } from "../plug-api/lib/json.ts";
|
||||
import { BuiltinSettings } from "$type/settings.ts";
|
||||
import { DataStore, ObjectEnricher } from "$lib/data/datastore.ts";
|
||||
import type { BuiltinSettings } from "$type/settings.ts";
|
||||
import type { DataStore, ObjectEnricher } from "$lib/data/datastore.ts";
|
||||
import { parseExpression } from "$common/expression_parser.ts";
|
||||
import { QueryExpression } from "$sb/types.ts";
|
||||
import type { QueryExpression } from "$sb/types.ts";
|
||||
|
||||
const yamlSettingsRegex = /^(```+|~~~+)ya?ml\r?\n([\S\s]+?)\1/m;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { SpacePrimitives } from "$common/spaces/space_primitives.ts";
|
||||
import type { SpacePrimitives } from "$common/spaces/space_primitives.ts";
|
||||
import { plugPrefix } from "$common/spaces/constants.ts";
|
||||
|
||||
import { AttachmentMeta, FileMeta, PageMeta } from "../plug-api/types.ts";
|
||||
import { EventHook } from "./hooks/event.ts";
|
||||
import type { AttachmentMeta, FileMeta, PageMeta } from "../plug-api/types.ts";
|
||||
import type { EventHook } from "./hooks/event.ts";
|
||||
import { safeRun } from "../lib/async.ts";
|
||||
|
||||
const pageWatchInterval = 5000;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { DataStore } from "$lib/data/datastore.ts";
|
||||
import { System } from "$lib/plugos/system.ts";
|
||||
import type { DataStore } from "$lib/data/datastore.ts";
|
||||
import type { System } from "$lib/plugos/system.ts";
|
||||
|
||||
const indexVersionKey = ["$indexVersion"];
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { System } from "../lib/plugos/system.ts";
|
||||
import { ParseTree } from "../plug-api/lib/tree.ts";
|
||||
import { ScriptObject } from "../plugs/index/script.ts";
|
||||
import { AppCommand, CommandDef } from "$lib/command.ts";
|
||||
import type { System } from "../lib/plugos/system.ts";
|
||||
import type { ParseTree } from "../plug-api/lib/tree.ts";
|
||||
import type { ScriptObject } from "../plugs/index/script.ts";
|
||||
import type { AppCommand, CommandDef } from "$lib/command.ts";
|
||||
import { Intl, Temporal, toTemporalInstant } from "@js-temporal/polyfill";
|
||||
|
||||
// @ts-ignore: Temporal polyfill
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { SpacePrimitives } from "./space_primitives.ts";
|
||||
import { AssetBundle } from "../../lib/asset_bundle/bundle.ts";
|
||||
import { FileMeta } from "../../plug-api/types.ts";
|
||||
import type { SpacePrimitives } from "./space_primitives.ts";
|
||||
import type { AssetBundle } from "../../lib/asset_bundle/bundle.ts";
|
||||
import type { FileMeta } from "../../plug-api/types.ts";
|
||||
|
||||
export class AssetBundlePlugSpacePrimitives implements SpacePrimitives {
|
||||
constructor(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { SpacePrimitives } from "./space_primitives.ts";
|
||||
import { KvKey } from "../../plug-api/types.ts";
|
||||
import { KvPrimitives } from "$lib/data/kv_primitives.ts";
|
||||
import type { KvKey } from "../../plug-api/types.ts";
|
||||
import type { KvPrimitives } from "$lib/data/kv_primitives.ts";
|
||||
import { KvMetaSpacePrimitives } from "./kv_meta_space_primitives.ts";
|
||||
import { PrefixedKvPrimitives } from "$lib/data/prefixed_kv_primitives.ts";
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import type { SpacePrimitives } from "./space_primitives.ts";
|
||||
import { mime } from "mimetypes";
|
||||
import { FileMeta } from "../../plug-api/types.ts";
|
||||
import { DataStore } from "$lib/data/datastore.ts";
|
||||
import type { FileMeta } from "../../plug-api/types.ts";
|
||||
import type { DataStore } from "$lib/data/datastore.ts";
|
||||
|
||||
export type FileContent = {
|
||||
name: string;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as path from "@std/path";
|
||||
import { readAll } from "@std/io/read-all";
|
||||
import { SpacePrimitives } from "./space_primitives.ts";
|
||||
import type { SpacePrimitives } from "./space_primitives.ts";
|
||||
import { mime } from "mimetypes";
|
||||
import { FileMeta } from "../../plug-api/types.ts";
|
||||
import type { FileMeta } from "../../plug-api/types.ts";
|
||||
|
||||
function lookupContentType(path: string): string {
|
||||
return mime.getType(path) || "application/octet-stream";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { FileMeta } from "$sb/types.ts";
|
||||
import { EventHook } from "$common/hooks/event.ts";
|
||||
import type { FileMeta } from "$sb/types.ts";
|
||||
import type { EventHook } from "$common/hooks/event.ts";
|
||||
import { plugPrefix } from "$common/spaces/constants.ts";
|
||||
|
||||
import type { SpacePrimitives } from "./space_primitives.ts";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { FileMeta } from "../../plug-api/types.ts";
|
||||
import type { FileMeta } from "../../plug-api/types.ts";
|
||||
import type { SpacePrimitives } from "./space_primitives.ts";
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { FileMeta } from "../../plug-api/types.ts";
|
||||
import { SpacePrimitives } from "./space_primitives.ts";
|
||||
import type { FileMeta } from "../../plug-api/types.ts";
|
||||
import type { SpacePrimitives } from "./space_primitives.ts";
|
||||
|
||||
export class FilteredSpacePrimitives implements SpacePrimitives {
|
||||
constructor(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { SpacePrimitives } from "./space_primitives.ts";
|
||||
import { FileMeta } from "../../plug-api/types.ts";
|
||||
import type { SpacePrimitives } from "./space_primitives.ts";
|
||||
import type { FileMeta } from "../../plug-api/types.ts";
|
||||
import { flushCachesAndUnregisterServiceWorker } from "../sw_util.ts";
|
||||
|
||||
const fetchTimeout = 5000;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { FileMeta } from "../../plug-api/types.ts";
|
||||
import type { FileMeta } from "../../plug-api/types.ts";
|
||||
import { mime } from "mimetypes";
|
||||
import { KvPrimitives } from "$lib/data/kv_primitives.ts";
|
||||
import { SpacePrimitives } from "./space_primitives.ts";
|
||||
import type { KvPrimitives } from "$lib/data/kv_primitives.ts";
|
||||
import type { SpacePrimitives } from "./space_primitives.ts";
|
||||
|
||||
export type KvMetaSpacePrimitivesCallbacks = {
|
||||
readFile: (
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { SpacePrimitives } from "$common/spaces/space_primitives.ts";
|
||||
import { NamespaceOperation } from "$lib/plugos/namespace.ts";
|
||||
import { FileMeta } from "../../plug-api/types.ts";
|
||||
import { PlugNamespaceHook } from "../hooks/plug_namespace.ts";
|
||||
import type { SpacePrimitives } from "$common/spaces/space_primitives.ts";
|
||||
import type { NamespaceOperation } from "$lib/plugos/namespace.ts";
|
||||
import type { FileMeta } from "../../plug-api/types.ts";
|
||||
import type { PlugNamespaceHook } from "../hooks/plug_namespace.ts";
|
||||
|
||||
export class PlugSpacePrimitives implements SpacePrimitives {
|
||||
constructor(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { FileMeta } from "../../plug-api/types.ts";
|
||||
import { SpacePrimitives } from "./space_primitives.ts";
|
||||
import type { FileMeta } from "../../plug-api/types.ts";
|
||||
import type { SpacePrimitives } from "./space_primitives.ts";
|
||||
|
||||
export class ReadOnlySpacePrimitives implements SpacePrimitives {
|
||||
wrapped: SpacePrimitives;
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
import { S3Client } from "s3_lite_client/mod.ts";
|
||||
import type { ClientOptions } from "s3_lite_client/client.ts";
|
||||
import { KvMetaSpacePrimitives } from "./kv_meta_space_primitives.ts";
|
||||
import { KvPrimitives } from "$lib/data/kv_primitives.ts";
|
||||
import type { KvPrimitives } from "$lib/data/kv_primitives.ts";
|
||||
import { mime } from "mimetypes";
|
||||
import { KV, KvKey } from "../../plug-api/types.ts";
|
||||
import type { KV, KvKey } from "../../plug-api/types.ts";
|
||||
import { PrefixedKvPrimitives } from "$lib/data/prefixed_kv_primitives.ts";
|
||||
|
||||
export type S3SpacePrimitivesOptions = ClientOptions;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { assert, assertEquals } from "@std/assert";
|
||||
import { SpacePrimitives } from "./space_primitives.ts";
|
||||
import type { SpacePrimitives } from "./space_primitives.ts";
|
||||
|
||||
export async function testSpacePrimitives(spacePrimitives: SpacePrimitives) {
|
||||
const files = await spacePrimitives.fetchFileList();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { SpaceSync, SyncStatusItem } from "./sync.ts";
|
||||
import { SpaceSync, type SyncStatusItem } from "./sync.ts";
|
||||
import { DiskSpacePrimitives } from "./disk_space_primitives.ts";
|
||||
import { assertEquals } from "@std/assert";
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { SpacePrimitives } from "./space_primitives.ts";
|
||||
import type { SpacePrimitives } from "./space_primitives.ts";
|
||||
import { EventEmitter } from "../../lib/plugos/event.ts";
|
||||
import { FileMeta } from "../../plug-api/types.ts";
|
||||
import type { FileMeta } from "../../plug-api/types.ts";
|
||||
import { plugPrefix } from "./constants.ts";
|
||||
|
||||
type SyncHash = number;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { SysCallMapping } from "../../lib/plugos/system.ts";
|
||||
import type { SysCallMapping } from "../../lib/plugos/system.ts";
|
||||
import { parse } from "../markdown_parser/parse_tree.ts";
|
||||
import type { ParseTree } from "../../plug-api/lib/tree.ts";
|
||||
import { builtinLanguages, languageFor } from "../languages.ts";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { SysCallMapping } from "../../lib/plugos/system.ts";
|
||||
import type { SysCallMapping } from "../../lib/plugos/system.ts";
|
||||
import { parse } from "../markdown_parser/parse_tree.ts";
|
||||
import type { ParseTree } from "../../plug-api/lib/tree.ts";
|
||||
import { extendedMarkdownLanguage } from "../markdown_parser/parser.ts";
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { SyscallMeta } from "../../plug-api/types.ts";
|
||||
import { SysCallMapping, System } from "../../lib/plugos/system.ts";
|
||||
import type { SyscallMeta } from "../../plug-api/types.ts";
|
||||
import type { SysCallMapping, System } from "../../lib/plugos/system.ts";
|
||||
import type { Client } from "../../web/client.ts";
|
||||
import { CommandDef } from "$lib/command.ts";
|
||||
import type { CommandDef } from "$lib/command.ts";
|
||||
import { proxySyscall } from "../../web/syscalls/util.ts";
|
||||
import type { CommonSystem } from "../common_system.ts";
|
||||
import { version } from "../../version.ts";
|
||||
import { ParseTree } from "../../plug-api/lib/tree.ts";
|
||||
import type { ParseTree } from "../../plug-api/lib/tree.ts";
|
||||
|
||||
export function systemSyscalls(
|
||||
system: System<any>,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { FunctionMap } from "../../plug-api/types.ts";
|
||||
import { AST } from "../../plug-api/lib/tree.ts";
|
||||
import { SysCallMapping } from "$lib/plugos/system.ts";
|
||||
import type { FunctionMap } from "../../plug-api/types.ts";
|
||||
import type { AST } from "../../plug-api/lib/tree.ts";
|
||||
import type { SysCallMapping } from "$lib/plugos/system.ts";
|
||||
import { renderTemplate } from "$common/template/render.ts";
|
||||
import { parseTemplate } from "$common/template/template_parser.ts";
|
||||
import { DataStore } from "$lib/data/datastore.ts";
|
||||
import type { DataStore } from "$lib/data/datastore.ts";
|
||||
|
||||
export function templateSyscalls(ds: DataStore): SysCallMapping {
|
||||
return {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { SysCallMapping } from "../../lib/plugos/system.ts";
|
||||
import type { SysCallMapping } from "../../lib/plugos/system.ts";
|
||||
import YAML from "js-yaml";
|
||||
|
||||
type YamlStringifyOptions = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { AST } from "../../plug-api/lib/tree.ts";
|
||||
import type { AST } from "../../plug-api/lib/tree.ts";
|
||||
import { evalQueryExpression } from "$sb/lib/query_expression.ts";
|
||||
import { expressionToKvQueryExpression } from "$sb/lib/parse-query.ts";
|
||||
import { FunctionMap } from "../../plug-api/types.ts";
|
||||
import type { FunctionMap } from "../../plug-api/types.ts";
|
||||
import { jsonToMDTable } from "../../plugs/template/util.ts";
|
||||
|
||||
export async function renderTemplate(
|
||||
|
|
|
@ -4,7 +4,7 @@ import { parse } from "../markdown_parser/parse_tree.ts";
|
|||
import { parser as templateParser } from "./parse-template.js";
|
||||
import { parser as expressionParser } from "../markdown_parser/parse-expression.js";
|
||||
import { parser as queryParser } from "../markdown_parser/parse-query.js";
|
||||
import { AST, parseTreeToAST } from "../../plug-api/lib/tree.ts";
|
||||
import { type AST, parseTreeToAST } from "../../plug-api/lib/tree.ts";
|
||||
import { deepEqual } from "../../plug-api/lib/json.ts";
|
||||
|
||||
export const templateLanguage = LRLanguage.define({
|
||||
|
|
|
@ -2,10 +2,10 @@ import "fake-indexeddb/auto";
|
|||
import { IndexedDBKvPrimitives } from "../data/indexeddb_kv_primitives.ts";
|
||||
import { cleanupEmptyObjects, DataStore } from "../data/datastore.ts";
|
||||
import { DenoKvPrimitives } from "../data/deno_kv_primitives.ts";
|
||||
import { KvPrimitives } from "../data/kv_primitives.ts";
|
||||
import type { KvPrimitives } from "../data/kv_primitives.ts";
|
||||
import { assertEquals, assertThrows } from "@std/assert";
|
||||
import { PrefixedKvPrimitives } from "../data/prefixed_kv_primitives.ts";
|
||||
import { Query } from "../../plug-api/types.ts";
|
||||
import type { Query } from "../../plug-api/types.ts";
|
||||
|
||||
async function test(db: KvPrimitives) {
|
||||
const datastore = new DataStore(new PrefixedKvPrimitives(db, ["ds"]), {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { applyQueryNoFilterKV } from "../../plug-api/lib/query.ts";
|
||||
import {
|
||||
import type {
|
||||
FunctionMap,
|
||||
KV,
|
||||
KvKey,
|
||||
|
@ -7,7 +7,7 @@ import {
|
|||
QueryExpression,
|
||||
} from "../../plug-api/types.ts";
|
||||
import { builtinFunctions } from "../builtin_query_functions.ts";
|
||||
import { KvPrimitives } from "./kv_primitives.ts";
|
||||
import type { KvPrimitives } from "./kv_primitives.ts";
|
||||
import { evalQueryExpression } from "../../plug-api/lib/query_expression.ts";
|
||||
/**
|
||||
* This is the data store class you'll actually want to use, wrapping the primitives
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/// <reference lib="deno.unstable" />
|
||||
|
||||
import { KV, KvKey } from "../../plug-api/types.ts";
|
||||
import { KvPrimitives, KvQueryOptions } from "./kv_primitives.ts";
|
||||
import type { KV, KvKey } from "../../plug-api/types.ts";
|
||||
import type { KvPrimitives, KvQueryOptions } from "./kv_primitives.ts";
|
||||
|
||||
const kvBatchSize = 100;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { KV, KvKey } from "../../plug-api/types.ts";
|
||||
import { KvPrimitives, KvQueryOptions } from "./kv_primitives.ts";
|
||||
import type { KV, KvKey } from "../../plug-api/types.ts";
|
||||
import type { KvPrimitives, KvQueryOptions } from "./kv_primitives.ts";
|
||||
import { type IDBPDatabase, openDB } from "../deps_client.ts";
|
||||
|
||||
const sep = "\0";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { KvPrimitives } from "./kv_primitives.ts";
|
||||
import type { KvPrimitives } from "./kv_primitives.ts";
|
||||
import { assertEquals } from "@std/assert";
|
||||
import { KV } from "../../plug-api/types.ts";
|
||||
import type { KV } from "../../plug-api/types.ts";
|
||||
|
||||
export async function allTests(db: KvPrimitives) {
|
||||
await db.batchSet([
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { KV, KvKey } from "../../plug-api/types.ts";
|
||||
import type { KV, KvKey } from "../../plug-api/types.ts";
|
||||
|
||||
export type KvQueryOptions = {
|
||||
prefix?: KvKey;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { KV, KvKey } from "../../plug-api/types.ts";
|
||||
import { KvPrimitives, KvQueryOptions } from "./kv_primitives.ts";
|
||||
import type { KV, KvKey } from "../../plug-api/types.ts";
|
||||
import type { KvPrimitives, KvQueryOptions } from "./kv_primitives.ts";
|
||||
|
||||
const memoryKeySeparator = "\0";
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import {
|
||||
import type {
|
||||
KV,
|
||||
MQMessage,
|
||||
MQStats,
|
||||
MQSubscribeOptions,
|
||||
} from "../../plug-api/types.ts";
|
||||
import { MessageQueue } from "./mq.ts";
|
||||
import { DataStore } from "./datastore.ts";
|
||||
import type { MessageQueue } from "./mq.ts";
|
||||
import type { DataStore } from "./datastore.ts";
|
||||
|
||||
export type ProcessingMessage = MQMessage & {
|
||||
ts: number;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {
|
||||
import type {
|
||||
MQMessage,
|
||||
MQStats,
|
||||
MQSubscribeOptions,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { KV, KvKey } from "../../plug-api/types.ts";
|
||||
import { KvPrimitives, KvQueryOptions } from "./kv_primitives.ts";
|
||||
import type { KV, KvKey } from "../../plug-api/types.ts";
|
||||
import type { KvPrimitives, KvQueryOptions } from "./kv_primitives.ts";
|
||||
|
||||
/**
|
||||
* Turns any KvPrimitives into a KvPrimitives that automatically prefixes all keys (and removes them again when reading)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Manifest as PlugosManifest } from "./plugos/types.ts";
|
||||
import { CommandDef } from "./command.ts";
|
||||
import { NamespaceOperation } from "./plugos/namespace.ts";
|
||||
import type { Manifest as PlugosManifest } from "./plugos/types.ts";
|
||||
import type { CommandDef } from "./command.ts";
|
||||
import type { NamespaceOperation } from "./plugos/namespace.ts";
|
||||
|
||||
export type CodeWidgetT = {
|
||||
codeWidget?: string;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { EventHookT } from "$lib/manifest.ts";
|
||||
import { Hook } from "./types.ts";
|
||||
import type { EventHookT } from "$lib/manifest.ts";
|
||||
import type { Hook } from "./types.ts";
|
||||
|
||||
export interface EventHookI extends Hook<EventHookT> {
|
||||
dispatchEvent(eventName: string, ...args: unknown[]): Promise<unknown[]>;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Hook, Manifest } from "../types.ts";
|
||||
import type { Hook, Manifest } from "../types.ts";
|
||||
import { Cron } from "../../deps_server.ts";
|
||||
import { System } from "../system.ts";
|
||||
import { CronHookT } from "$lib/manifest.ts";
|
||||
import type { System } from "../system.ts";
|
||||
import type { CronHookT } from "$lib/manifest.ts";
|
||||
|
||||
export class CronHook implements Hook<CronHookT> {
|
||||
tasks: Cron[] = [];
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { Hook, Manifest } from "../types.ts";
|
||||
import { System } from "../system.ts";
|
||||
import { MQMessage } from "../../../plug-api/types.ts";
|
||||
import { MessageQueue } from "../../data/mq.ts";
|
||||
import type { Hook, Manifest } from "../types.ts";
|
||||
import type { System } from "../system.ts";
|
||||
import type { MQMessage } from "../../../plug-api/types.ts";
|
||||
import type { MessageQueue } from "../../data/mq.ts";
|
||||
import { throttle } from "../../async.ts";
|
||||
import { MQHookT } from "$lib/manifest.ts";
|
||||
import type { MQHookT } from "$lib/manifest.ts";
|
||||
|
||||
export class MQHook implements Hook<MQHookT> {
|
||||
subscriptions: (() => void)[] = [];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { KvPrimitives } from "../data/kv_primitives.ts";
|
||||
import { Plug } from "./plug.ts";
|
||||
import { Manifest } from "./types.ts";
|
||||
import type { KvPrimitives } from "../data/kv_primitives.ts";
|
||||
import type { Plug } from "./plug.ts";
|
||||
import type { Manifest } from "./types.ts";
|
||||
|
||||
export interface ManifestCache<T> {
|
||||
getManifest(plug: Plug<T>, hash: number): Promise<Manifest<T>>;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Manifest } from "./types.ts";
|
||||
import { System } from "./system.ts";
|
||||
import { AssetBundle } from "../asset_bundle/bundle.ts";
|
||||
import { Sandbox, SandboxFactory } from "./sandboxes/sandbox.ts";
|
||||
import type { Manifest } from "./types.ts";
|
||||
import type { System } from "./system.ts";
|
||||
import type { AssetBundle } from "../asset_bundle/bundle.ts";
|
||||
import type { Sandbox, SandboxFactory } from "./sandboxes/sandbox.ts";
|
||||
|
||||
export class Plug<HookT> {
|
||||
readonly runtimeEnv?: string;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Plug } from "../plug.ts";
|
||||
import { Sandbox } from "./sandbox.ts";
|
||||
import { Manifest } from "../types.ts";
|
||||
import { System } from "../system.ts";
|
||||
import { SandboxFactory } from "./sandbox.ts";
|
||||
import type { Plug } from "../plug.ts";
|
||||
import type { Sandbox } from "./sandbox.ts";
|
||||
import type { Manifest } from "../types.ts";
|
||||
import type { System } from "../system.ts";
|
||||
import type { SandboxFactory } from "./sandbox.ts";
|
||||
import { PromiseQueue } from "../../async.ts";
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Plug } from "../plug.ts";
|
||||
import { Manifest } from "../types.ts";
|
||||
import type { Plug } from "../plug.ts";
|
||||
import type { Manifest } from "../types.ts";
|
||||
|
||||
export type SandboxFactory<HookT> = (plug: Plug<HookT>) => Sandbox<HookT>;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Manifest } from "../types.ts";
|
||||
import { ControllerMessage, WorkerMessage } from "../protocol.ts";
|
||||
import { Plug } from "../plug.ts";
|
||||
import { AssetBundle, AssetJson } from "../../asset_bundle/bundle.ts";
|
||||
import { Sandbox } from "./sandbox.ts";
|
||||
import type { Manifest } from "../types.ts";
|
||||
import type { ControllerMessage, WorkerMessage } from "../protocol.ts";
|
||||
import type { Plug } from "../plug.ts";
|
||||
import { AssetBundle, type AssetJson } from "../../asset_bundle/bundle.ts";
|
||||
import type { Sandbox } from "./sandbox.ts";
|
||||
|
||||
/**
|
||||
* Represents a "safe" execution environment for plug code
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { SysCallMapping, System } from "../system.ts";
|
||||
import type { SysCallMapping, System } from "../system.ts";
|
||||
|
||||
export default function assetSyscalls(system: System<any>): SysCallMapping {
|
||||
return {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { KV, KvKey, KvQuery } from "../../../plug-api/types.ts";
|
||||
import type { KV, KvKey, KvQuery } from "../../../plug-api/types.ts";
|
||||
import type { DataStore } from "../../data/datastore.ts";
|
||||
import type { SysCallMapping } from "../system.ts";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { SysCallMapping } from "../system.ts";
|
||||
import { EventHookI } from "../eventhook.ts";
|
||||
import type { SysCallMapping } from "../system.ts";
|
||||
import type { EventHookI } from "../eventhook.ts";
|
||||
|
||||
export function eventSyscalls(eventHook: EventHookI): SysCallMapping {
|
||||
return {
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
import type { SysCallMapping } from "../system.ts";
|
||||
import { ProxyFetchRequest, ProxyFetchResponse } from "../../proxy_fetch.ts";
|
||||
import type {
|
||||
ProxyFetchRequest,
|
||||
ProxyFetchResponse,
|
||||
} from "../../proxy_fetch.ts";
|
||||
import { base64Encode } from "../../crypto.ts";
|
||||
|
||||
export function sandboxFetchSyscalls(): SysCallMapping {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { FileMeta } from "../../../plug-api/types.ts";
|
||||
import type { FileMeta } from "../../../plug-api/types.ts";
|
||||
import { assert } from "@std/assert";
|
||||
import { path } from "../../deps_server.ts";
|
||||
import fileSystemSyscalls from "./fs.deno.ts";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { SysCallMapping } from "../system.ts";
|
||||
import { mime, path, walk } from "../../deps_server.ts";
|
||||
import { FileMeta } from "../../../plug-api/types.ts";
|
||||
import type { FileMeta } from "../../../plug-api/types.ts";
|
||||
import { base64DecodeDataUrl, base64Encode } from "../../crypto.ts";
|
||||
|
||||
export default function fileSystemSyscalls(root = "/"): SysCallMapping {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { SysCallMapping } from "../system.ts";
|
||||
import { MessageQueue } from "../../data/mq.ts";
|
||||
import type { SysCallMapping } from "../system.ts";
|
||||
import type { MessageQueue } from "../../data/mq.ts";
|
||||
|
||||
export function mqSyscalls(
|
||||
mq: MessageQueue,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Hook } from "./types.ts";
|
||||
import type { Hook } from "./types.ts";
|
||||
import { EventEmitter } from "./event.ts";
|
||||
import type { SandboxFactory } from "./sandboxes/sandbox.ts";
|
||||
import { Plug } from "./plug.ts";
|
||||
import { InMemoryManifestCache, ManifestCache } from "./manifest_cache.ts";
|
||||
import { InMemoryManifestCache, type ManifestCache } from "./manifest_cache.ts";
|
||||
|
||||
export interface SysCallMapping {
|
||||
[key: string]: (ctx: SyscallContext, ...args: any) => Promise<any> | any;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { System } from "./system.ts";
|
||||
import { AssetJson } from "../asset_bundle/bundle.ts";
|
||||
import type { System } from "./system.ts";
|
||||
import type { AssetJson } from "../asset_bundle/bundle.ts";
|
||||
|
||||
/** The generic top level of a plug manifest file.
|
||||
* Defines plug metadata and functions.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {
|
||||
findNodeOfType,
|
||||
ParseTree,
|
||||
type ParseTree,
|
||||
renderToText,
|
||||
replaceNodesMatchingAsync,
|
||||
} from "./tree.ts";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {
|
||||
findNodeMatching,
|
||||
findNodeOfType,
|
||||
ParseTree,
|
||||
type ParseTree,
|
||||
renderToText,
|
||||
} from "./tree.ts";
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {
|
||||
addParentPointers,
|
||||
ParseTree,
|
||||
type ParseTree,
|
||||
renderToText,
|
||||
replaceNodesMatchingAsync,
|
||||
traverseTreeAsync,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { findNodeOfType, ParseTree, renderToText } from "$sb/lib/tree.ts";
|
||||
import { findNodeOfType, type ParseTree, renderToText } from "$sb/lib/tree.ts";
|
||||
|
||||
export function stripMarkdown(
|
||||
tree: ParseTree,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { parse } from "$common/markdown_parser/parse_tree.ts";
|
||||
import { AST, collectNodesOfType, parseTreeToAST } from "./tree.ts";
|
||||
import { type AST, collectNodesOfType, parseTreeToAST } from "./tree.ts";
|
||||
import { assert, assertEquals } from "@std/assert";
|
||||
import { astToKvQuery } from "$sb/lib/parse-query.ts";
|
||||
import { languageFor } from "$common/languages.ts";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { FunctionMap, KV, Query, QueryExpression } from "../types.ts";
|
||||
import type { FunctionMap, KV, Query, QueryExpression } from "../types.ts";
|
||||
import { evalQueryExpression } from "./query_expression.ts";
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { FunctionMap, QueryExpression } from "../types.ts";
|
||||
import type { FunctionMap, QueryExpression } from "../types.ts";
|
||||
|
||||
export function evalQueryExpression(
|
||||
val: QueryExpression,
|
||||
|
|
|
@ -5,7 +5,7 @@ import {
|
|||
rewritePageRefs,
|
||||
} from "$sb/lib/resolve.ts";
|
||||
import { assertEquals } from "@std/assert";
|
||||
import { ParseTree, renderToText } from "./tree.ts";
|
||||
import { type ParseTree, renderToText } from "./tree.ts";
|
||||
import { parse } from "$common/markdown_parser/parse_tree.ts";
|
||||
import { extendedMarkdownLanguage } from "$common/markdown_parser/parser.ts";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { findNodeOfType, ParseTree, traverseTree } from "./tree.ts";
|
||||
import { findNodeOfType, type ParseTree, traverseTree } from "./tree.ts";
|
||||
|
||||
// [[Wikilinks]] use absolute paths and should pass pathToResolve with a leading / to this function
|
||||
// [Markdown links]() are relative unless it has a leading /
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { FrontMatter } from "./frontmatter.ts";
|
||||
import { ObjectValue } from "../types.ts";
|
||||
import type { FrontMatter } from "./frontmatter.ts";
|
||||
import type { ObjectValue } from "../types.ts";
|
||||
|
||||
export function updateITags<T>(obj: ObjectValue<T>, frontmatter: FrontMatter) {
|
||||
const itags = [obj.tag, ...frontmatter.tags || []];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { syscall } from "../syscall.ts";
|
||||
import { KV, KvKey, KvQuery } from "../types.ts";
|
||||
import type { KV, KvKey, KvQuery } from "../types.ts";
|
||||
|
||||
export function set(key: KvKey, value: any): Promise<void> {
|
||||
return syscall("datastore.set", key, value);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { UploadFile } from "../types.ts";
|
||||
import type { UploadFile } from "../types.ts";
|
||||
import { syscall } from "../syscall.ts";
|
||||
import type { PageRef } from "../lib/page_ref.ts";
|
||||
import type { FilterOption } from "../../lib/web.ts";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { syscall } from "../syscall.ts";
|
||||
import { AttachmentMeta, FileMeta, PageMeta } from "../types.ts";
|
||||
import type { AttachmentMeta, FileMeta, PageMeta } from "../types.ts";
|
||||
|
||||
export function listPages(unfiltered = false): Promise<PageMeta[]> {
|
||||
return syscall("space.listPages", unfiltered);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { system } from "$sb/syscalls.ts";
|
||||
import { CompleteEvent } from "../../plug-api/types.ts";
|
||||
import type { CompleteEvent } from "../../plug-api/types.ts";
|
||||
|
||||
export async function commandComplete(completeEvent: CompleteEvent) {
|
||||
const match = /\{\[([^\]\[]*)$/.exec(completeEvent.linePrefix);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {
|
||||
import type {
|
||||
AttachmentMeta,
|
||||
CompleteEvent,
|
||||
FileMeta,
|
||||
|
|
|
@ -5,7 +5,7 @@ import {
|
|||
findNodeOfType,
|
||||
findParentMatching,
|
||||
nodeAtPos,
|
||||
ParseTree,
|
||||
type ParseTree,
|
||||
} from "$sb/lib/tree.ts";
|
||||
import { isLocalPath, resolvePath } from "$sb/lib/resolve.ts";
|
||||
import { looksLikePathWithExtension, parsePageRef } from "$sb/lib/page_ref.ts";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { readSetting } from "$sb/lib/settings_page.ts";
|
||||
import { editor, space } from "$sb/syscalls.ts";
|
||||
import { UploadFile } from "$sb/types.ts";
|
||||
import type { UploadFile } from "$sb/types.ts";
|
||||
import {
|
||||
defaultLinkStyle,
|
||||
maximumAttachmentSize,
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { datastore } from "$sb/syscalls.ts";
|
||||
import {
|
||||
import type {
|
||||
KV,
|
||||
KvKey,
|
||||
KvQuery,
|
||||
ObjectQuery,
|
||||
ObjectValue,
|
||||
} from "../../plug-api/types.ts";
|
||||
import { QueryProviderEvent } from "../../plug-api/types.ts";
|
||||
import type { QueryProviderEvent } from "../../plug-api/types.ts";
|
||||
import { builtins } from "./builtins.ts";
|
||||
import { determineType } from "./attributes.ts";
|
||||
import { ttlCache } from "$lib/memory_cache.ts";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { space, system } from "$sb/syscalls.ts";
|
||||
import { AttachmentMeta } from "$sb/types.ts";
|
||||
import type { AttachmentMeta } from "$sb/types.ts";
|
||||
import { indexObjects } from "./api.ts";
|
||||
|
||||
// Note: clearFileIndex is not called but since this is the only attachmet:index listener, this should be fine (famous last words)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import type { CompleteEvent } from "../../plug-api/types.ts";
|
||||
import { events } from "$sb/syscalls.ts";
|
||||
import { queryObjects } from "./api.ts";
|
||||
import { ObjectValue, QueryExpression } from "../../plug-api/types.ts";
|
||||
import type { ObjectValue, QueryExpression } from "../../plug-api/types.ts";
|
||||
import { determineTags } from "$lib/cheap_yaml.ts";
|
||||
|
||||
export type AttributeObject = ObjectValue<{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { system } from "$sb/syscalls.ts";
|
||||
import { indexObjects } from "./api.ts";
|
||||
import { ObjectValue, QueryProviderEvent } from "$sb/types.ts";
|
||||
import type { ObjectValue, QueryProviderEvent } from "$sb/types.ts";
|
||||
import { applyQuery } from "$sb/lib/query.ts";
|
||||
import { builtinFunctions } from "$lib/builtin_query_functions.ts";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { editor, events, markdown, mq, space, system } from "$sb/syscalls.ts";
|
||||
import { IndexEvent, MQMessage } from "$sb/types.ts";
|
||||
import type { IndexEvent, MQMessage } from "$sb/types.ts";
|
||||
import { isTemplate } from "$lib/cheap_yaml.ts";
|
||||
import { sleep } from "$lib/async.ts";
|
||||
import { plugPrefix } from "$common/spaces/constants.ts";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import type { IndexTreeEvent } from "../../plug-api/types.ts";
|
||||
import { YAML } from "$sb/syscalls.ts";
|
||||
import { collectNodesOfType, findNodeOfType } from "$sb/lib/tree.ts";
|
||||
import { ObjectValue } from "../../plug-api/types.ts";
|
||||
import type { ObjectValue } from "../../plug-api/types.ts";
|
||||
import { indexObjects } from "./api.ts";
|
||||
import { TagObject } from "./tags.ts";
|
||||
import type { TagObject } from "./tags.ts";
|
||||
import { extractFrontmatter } from "$sb/lib/frontmatter.ts";
|
||||
import { updateITags } from "$sb/lib/tags.ts";
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import {
|
|||
renderToText,
|
||||
} from "$sb/lib/tree.ts";
|
||||
import type { CompleteEvent, IndexTreeEvent } from "../../plug-api/types.ts";
|
||||
import { ObjectValue } from "../../plug-api/types.ts";
|
||||
import type { ObjectValue } from "../../plug-api/types.ts";
|
||||
import { indexObjects, queryObjects } from "./api.ts";
|
||||
import { parsePageRef } from "$sb/lib/page_ref.ts";
|
||||
import { extractAttributes } from "$sb/lib/attribute.ts";
|
||||
|
|
|
@ -2,12 +2,12 @@ import type { IndexTreeEvent } from "../../plug-api/types.ts";
|
|||
|
||||
import {
|
||||
collectNodesOfType,
|
||||
ParseTree,
|
||||
type ParseTree,
|
||||
renderToText,
|
||||
} from "../../plug-api/lib/tree.ts";
|
||||
import { extractAttributes } from "$sb/lib/attribute.ts";
|
||||
import { rewritePageRefs } from "$sb/lib/resolve.ts";
|
||||
import { ObjectValue } from "../../plug-api/types.ts";
|
||||
import type { ObjectValue } from "../../plug-api/types.ts";
|
||||
import { indexObjects } from "./api.ts";
|
||||
import { updateITags } from "$sb/lib/tags.ts";
|
||||
import { extractFrontmatter } from "$sb/lib/frontmatter.ts";
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import { YAML } from "$sb/syscalls.ts";
|
||||
import { LintDiagnostic, QueryExpression } from "../../plug-api/types.ts";
|
||||
import type { LintDiagnostic, QueryExpression } from "../../plug-api/types.ts";
|
||||
import {
|
||||
findNodeOfType,
|
||||
renderToText,
|
||||
traverseTreeAsync,
|
||||
} from "$sb/lib/tree.ts";
|
||||
import { LintEvent } from "../../plug-api/types.ts";
|
||||
import type { LintEvent } from "../../plug-api/types.ts";
|
||||
import { queryObjects } from "./api.ts";
|
||||
import { AttributeObject } from "./attributes.ts";
|
||||
import type { AttributeObject } from "./attributes.ts";
|
||||
import { extractFrontmatter } from "$sb/lib/frontmatter.ts";
|
||||
|
||||
export async function lintYAML({ tree }: LintEvent): Promise<LintDiagnostic[]> {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { findNodeOfType, renderToText, traverseTree } from "$sb/lib/tree.ts";
|
||||
import { IndexTreeEvent, ObjectValue } from "$sb/types.ts";
|
||||
import type { IndexTreeEvent, ObjectValue } from "$sb/types.ts";
|
||||
import { isLocalPath, resolvePath } from "$sb/lib/resolve.ts";
|
||||
import { indexObjects, queryObjects } from "./api.ts";
|
||||
import { extractFrontmatter } from "$sb/lib/frontmatter.ts";
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
traverseTreeAsync,
|
||||
} from "../../plug-api/lib/tree.ts";
|
||||
import { extractAttributes } from "$sb/lib/attribute.ts";
|
||||
import { ObjectValue } from "../../plug-api/types.ts";
|
||||
import type { ObjectValue } from "../../plug-api/types.ts";
|
||||
import { updateITags } from "$sb/lib/tags.ts";
|
||||
import { extractFrontmatter } from "$sb/lib/frontmatter.ts";
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { editor, space } from "$sb/syscalls.ts";
|
||||
import { validatePageName } from "$sb/lib/page_ref.ts";
|
||||
import { getBackLinks, LinkObject } from "./page_links.ts";
|
||||
import { getBackLinks, type LinkObject } from "./page_links.ts";
|
||||
import { queryObjects } from "./api.ts";
|
||||
import { absoluteToRelativePath, folderName } from "$sb/lib/resolve.ts";
|
||||
import { ObjectValue } from "$sb/types.ts";
|
||||
import type { ObjectValue } from "$sb/types.ts";
|
||||
|
||||
/**
|
||||
* Renames a single page.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { IndexTreeEvent } from "../../plug-api/types.ts";
|
||||
import type { IndexTreeEvent } from "../../plug-api/types.ts";
|
||||
import { collectNodesOfType, findNodeOfType } from "../../plug-api/lib/tree.ts";
|
||||
import { ObjectValue } from "../../plug-api/types.ts";
|
||||
import type { ObjectValue } from "../../plug-api/types.ts";
|
||||
import { indexObjects } from "./api.ts";
|
||||
|
||||
export type ScriptObject = ObjectValue<{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { IndexTreeEvent } from "../../plug-api/types.ts";
|
||||
import type { IndexTreeEvent } from "../../plug-api/types.ts";
|
||||
import { collectNodesOfType, findNodeOfType } from "../../plug-api/lib/tree.ts";
|
||||
import { ObjectValue } from "../../plug-api/types.ts";
|
||||
import type { ObjectValue } from "../../plug-api/types.ts";
|
||||
import { indexObjects } from "./api.ts";
|
||||
import { readSetting } from "$sb/lib/settings_page.ts";
|
||||
import { cleanPageRef } from "$sb/lib/resolve.ts";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { IndexTreeEvent, ObjectValue } from "../../plug-api/types.ts";
|
||||
import type { IndexTreeEvent, ObjectValue } from "../../plug-api/types.ts";
|
||||
import {
|
||||
collectNodesMatching,
|
||||
collectNodesOfType,
|
||||
ParseTree,
|
||||
type ParseTree,
|
||||
} from "$sb/lib/tree.ts";
|
||||
import { indexObjects } from "./api.ts";
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue