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