Update plugin shape

This commit is contained in:
Endeavorance 2025-04-03 14:55:47 -04:00
parent 504c1e6f3c
commit ae1b9e262e
12 changed files with 181 additions and 149 deletions

View file

@ -1,14 +1,19 @@
export const name = "Announce Slam Dunks";
export const description = "Get hype when a file has slam dunks";
export const process = (binding, { dunks }) => {
export const step = ({ entries, options, ...rest }) => {
const { dunks } = options;
const slamDunkKey = dunks?.key ?? "slamDunks";
for (const entry of binding.entries) {
for (const entry of entries) {
if (slamDunkKey in entry.data) {
console.log(`Slam dunk!`);
}
}
return binding;
return {
entries,
options,
...rest,
};
};

View file

@ -1,6 +1,4 @@
export const name = "Scream";
export function process(binding) {
export function step(binding) {
const modifiedEntries = binding.entries.map(entry => {
if (binding.markdownKey in entry.data) {
entry.data = {