Skip to content

Build your personal knowledge base with Trilium Notes

feat(script_deployer): support execute

Elian Doran51972bdaa63d
diff --git a/apps/script-deployer/src/deploy.ts b/apps/script-deployer/src/deploy.ts
index 1797cb0045..eb3da15444 100644
--- a/apps/script-deployer/src/deploy.ts
+++ b/apps/script-deployer/src/deploy.ts
@@ -207,11 +207,19 @@ export function deployScript(
content,
});
+ const codeNote = becca.notes[codeId];
+
// Backend scripts need a #run label to be executed by the scheduler.
if (meta.type === "backend" && meta.run) {
- const codeNote = becca.notes[codeId];
codeNote.setLabel("run", meta.run);
}
+ // Labels that map directly from front-matter to note attributes.
+ for (const label of ["executeButton", "executeDescription", "executeTitle"] as const) {
+ if (meta[label]) {
+ codeNote.setLabel(label, meta[label]);
+ }
+ }
+
return { action: "created", codeNoteId: codeId, title: meta.title, type: meta.type };
}