silverbullet/plugs/index/index.plug.yaml

616 lines
12 KiB
YAML
Raw Normal View History

2023-08-28 23:12:15 +08:00
name: index
functions:
# Public API
batchSet:
path: api.ts:batchSet
env: server
2023-10-03 21:24:07 +08:00
query:
path: api.ts:query
indexObjects:
path: api.ts:indexObjects
env: server
queryObjects:
path: api.ts:queryObjects
# Note: not setting env: server to allow for client-side datastore query caching
getObjectByRef:
path: api.ts:getObjectByRef
env: server
objectSourceProvider:
path: api.ts:objectSourceProvider
events:
2024-02-23 17:18:47 +08:00
- query:*
discoverSources:
path: api.ts:discoverSources
events:
2024-02-23 17:18:47 +08:00
- query_
clearIndex:
path: api.ts:clearIndex
env: server
clearDSIndex:
2024-05-28 02:33:41 +08:00
path: api.ts:clearFileIndex
2023-08-28 23:12:15 +08:00
env: server
events:
2024-05-28 02:33:41 +08:00
- file:deleted
2024-02-23 17:18:47 +08:00
2023-08-28 23:12:15 +08:00
parseIndexTextRepublish:
path: "./command.ts:parseIndexTextRepublish"
2023-08-28 23:12:15 +08:00
env: server
events:
- page:index_text
2023-08-28 23:12:15 +08:00
reindexSpaceCommand:
path: "./command.ts:reindexCommand"
2023-08-28 23:12:15 +08:00
command:
name: "Space: Reindex"
requireMode: rw
2024-10-11 21:34:27 +08:00
2023-08-28 23:12:15 +08:00
processIndexQueue:
path: ./command.ts:processIndexQueue
2023-08-28 23:12:15 +08:00
mqSubscriptions:
2024-02-23 17:18:47 +08:00
- queue: indexQueue
batchSize: 3
2024-02-23 17:18:47 +08:00
autoAck: true
2023-08-28 23:12:15 +08:00
reindexSpace:
path: "./command.ts:reindexSpace"
env: server
2023-08-28 23:12:15 +08:00
2024-05-28 02:33:41 +08:00
indexAttachment:
path: "./attachment.ts:indexAttachment"
events:
2024-05-31 01:55:35 +08:00
- attachment:index
2024-05-28 02:33:41 +08:00
indexPage:
path: page.ts:indexPage
events:
- page:index
indexParagraphs:
path: "./paragraph.ts:indexParagraphs"
events:
2024-02-23 17:18:47 +08:00
- page:index
2023-08-28 23:12:15 +08:00
# Backlinks
indexLinks:
path: "./page_links.ts:indexLinks"
events:
2024-02-23 17:18:47 +08:00
- page:index
2023-08-28 23:12:15 +08:00
attributeComplete:
path: "./attributes.ts:attributeComplete"
events:
2024-02-23 17:18:47 +08:00
- editor:complete
2023-08-28 23:12:15 +08:00
objectAttributeCompleter:
path: ./attributes.ts:objectAttributeCompleter
2023-08-28 23:12:15 +08:00
events:
2024-02-23 17:18:47 +08:00
- attribute:complete:*
2023-08-28 23:12:15 +08:00
# Item indexing
indexItem:
path: "./item.ts:indexItems"
events:
2024-02-23 17:18:47 +08:00
- page:index
2023-08-28 23:12:15 +08:00
# Anchors
indexAnchors:
path: "./anchor.ts:indexAnchors"
events:
2024-02-23 17:18:47 +08:00
- page:index
2023-08-28 23:12:15 +08:00
anchorComplete:
path: "./anchor.ts:anchorComplete"
events:
- editor:complete
2024-01-25 21:51:40 +08:00
2024-02-23 17:18:47 +08:00
# Tables
indexTables:
path: "table.ts:indexTables"
events:
- page:index
2024-01-25 21:51:40 +08:00
# Headers
indexHeaders:
path: header.ts:indexHeaders
events:
2024-02-23 17:18:47 +08:00
- page:index
2024-01-25 21:51:40 +08:00
headerComplete:
path: header.ts:headerComplete
events:
- editor:complete
# Data
indexData:
path: data.ts:indexData
events:
2024-02-23 17:18:47 +08:00
- page:index
# Script
indexSpaceScript:
path: script.ts:indexSpaceScript
events:
2024-02-23 17:18:47 +08:00
- page:index
indexSpaceLua:
path: script.ts:indexSpaceLua
events:
- page:index
# Style
indexSpaceStyle:
path: style.ts:indexSpaceStyle
events:
- page:index
# Config
indexSpaceConfig:
path: config.ts:indexSpaceConfig
events:
- page:index
2023-08-28 23:12:15 +08:00
# Hashtags
indexTags:
path: tags.ts:indexTags
2023-08-28 23:12:15 +08:00
events:
2024-02-23 17:18:47 +08:00
- page:index
2023-08-28 23:12:15 +08:00
tagComplete:
path: tags.ts:tagComplete
2023-08-28 23:12:15 +08:00
events:
- editor:complete
renamePageCommand:
path: "./refactor.ts:renamePageCommand"
command:
name: "Page: Rename"
mac: Cmd-Alt-r
page: ""
requireMode: rw
2023-08-28 23:12:15 +08:00
renamePrefixCommand:
path: "./refactor.ts:renamePrefixCommand"
command:
name: "Page: Batch Rename Prefix"
requireMode: rw
renamePageLinkCommand:
path: "./refactor.ts:renamePageLinkCommand"
command:
name: "Page: Rename Linked Page"
mac: Cmd-Ctrl-Alt-r
key: Ctrl-Shift-Alt-r
requireMode: rw
2023-08-28 23:12:15 +08:00
# Refactoring Commands
extractToPageCommand:
path: ./refactor.ts:extractToPageCommand
command:
name: "Page: Extract"
requireMode: rw
2023-08-28 23:12:15 +08:00
2023-11-25 20:40:56 +08:00
# TOC
tocWidget:
path: toc.ts:widget
codeWidget: toc
renderMode: markdown
# Template Widgets
renderTemplateWidgetsTop:
path: widget.ts:renderTemplateWidgets
2023-11-25 20:40:56 +08:00
env: client
panelWidget: top
2023-11-25 20:40:56 +08:00
renderTemplateWidgetsBottom:
path: widget.ts:renderTemplateWidgets
env: client
panelWidget: bottom
2024-01-02 18:01:34 +08:00
refreshWidgets:
path: widget.ts:refreshWidgets
lintYAML:
path: lint.ts:lintYAML
events:
2024-02-23 17:18:47 +08:00
- editor:lint
2024-01-25 17:17:42 +08:00
lintLua:
path: lint.ts:lintLua
events:
- editor:lint
2024-01-25 17:17:42 +08:00
# Tag file system
readFileTag:
path: tag_page.ts:readFileTag
pageNamespace:
pattern: "📌 .+"
operation: readFile
writePageTag:
path: tag_page.ts:writeFileTag
pageNamespace:
pattern: "📌 .+"
operation: readFile
getPageMetaTag:
path: tag_page.ts:getFileMetaTag
pageNamespace:
pattern: "📌 .+"
operation: getFileMeta
syscallSourceProvider:
path: builtins.ts:syscallSourceProvider
events:
2024-02-23 17:18:47 +08:00
- query:syscall
commandSourceProvider:
path: builtins.ts:commandSourceProvider
events:
2024-02-23 17:18:47 +08:00
- query:command
config:
2024-10-11 21:34:27 +08:00
# Schema for the built-in tags indexed by this plug
schema.tag:
page:
type: object
additionalProperties: true
properties:
ref:
type: string
readOnly: true
tag:
type: string
readOnly: true
tags:
anyOf:
- type: array
items:
type: string
- type: string
itags:
type: array
readOnly: true
items:
type: string
nullable: true
name:
type: string
readOnly: true
pageDecoration:
type: object
properties:
prefix:
type: string
nullable: true
cssClasses:
type: array
items:
type: string
nullable: true
hide:
type: boolean
nullable: true
renderWidgets:
type: boolean
nullable: true
nullable: true
displayName:
type: string
nullable: true
aliases:
type: array
items:
type: string
nullable: true
created:
type: string
readOnly: true
contentType:
type: string
readOnly: true
size:
type: number
readOnly: true
lastModified:
type: string
readOnly: true
perm:
type: string
readOnly: true
enum:
- ro
- rw
lastOpened:
type: number
readOnly: true
nullable: true
aspiring-page:
type: object
additionalProperties: true
properties:
ref:
type: string
readOnly: true
tag:
type: string
readOnly: true
name:
type: string
readOnly: true
page:
type: string
readOnly: true
pos:
type: number
readOnly: true
attachment:
type: object
additionalProperties: true
properties:
ref:
type: string
readOnly: true
tag:
type: string
readOnly: true
tags:
type: array
readOnly: true
items:
type: string
nullable: true
itags:
type: array
readOnly: true
items:
type: string
nullable: true
name:
type: string
readOnly: true
created:
readOnly: true
type: string
contentType:
type: string
readOnly: true
size:
type: number
readOnly: true
lastModified:
type: string
readOnly: true
perm:
type: string
readOnly: true
enum:
- ro
- rw
item:
type: object
additionalProperties: true
properties:
ref:
type: string
readOnly: true
tag:
type: string
readOnly: true
tags:
type: array
items:
type: string
nullable: true
itags:
type: array
readOnly: true
items:
type: string
nullable: true
name:
type: string
readOnly: true
page:
type: string
readOnly: true
parent:
type: string
readOnly: true
pos:
type: number
readOnly: true
text:
type: string
readOnly: true
tag:
type: object
properties:
ref:
type: string
readOnly: true
tag:
type: string
readOnly: true
tags:
type: array
readOnly: true
items:
type: string
nullable: true
itags:
type: array
readOnly: true
items:
type: string
nullable: true
name:
type: string
readOnly: true
page:
type: string
readOnly: true
parent:
type: string
readOnly: true
context:
type: string
readOnly: true
anchor:
type: object
properties:
ref:
type: string
readOnly: true
tag:
type: string
tags:
type: array
items:
type: string
nullable: true
itags:
type: array
items:
type: string
nullable: true
name:
type: string
page:
type: string
pos:
type: number
link:
type: object
properties:
ref:
type: string
readOnly: true
tag:
type: string
tags:
type: array
items:
type: string
nullable: true
itags:
type: array
items:
type: string
nullable: true
name:
type: string
page:
type: string
toFile:
type: string
nullable: true
toPage:
type: string
nullable: true
snippet:
type: string
pos:
type: number
alias:
type: string
asTemplate:
type: boolean
header:
type: object
properties:
ref:
type: string
readOnly: true
tag:
type: string
tags:
type: array
items:
type: string
nullable: true
itags:
type: array
items:
type: string
nullable: true
name:
type: string
page:
type: string
pos:
type: number
level:
type: string
paragraph:
type: object
properties:
ref:
type: string
readOnly: true
tag:
type: string
tags:
type: array
items:
type: string
nullable: true
itags:
type: array
items:
type: string
nullable: true
text:
type: string
page:
type: string
pos:
type: number
template:
type: object
properties:
ref:
type: string
readOnly: true
tag:
type: string
tags:
anyOf:
- type: array
items:
type: string
- type: string
itags:
type: array
items:
type: string
nullable: true
page:
type: string
pageName:
type: string
description:
type: string
pos:
type: number
hooks:
type: object
frontmatter:
anyOf:
- type: object
- type: string
table:
type: object
properties:
ref:
type: string
readOnly: true
tag:
type: string
tags:
type: array
items:
type: string
nullable: true
itags:
type: array
items:
type: string
nullable: true
page:
type: string
pos:
type: number