Cypher actor @Embed (#1)

Reviewed-on: #1
Co-authored-by: Mike Bloy <mike@bloy.org>
Co-committed-by: Mike Bloy <mike@bloy.org>
This commit was merged in pull request #1.
This commit is contained in:
2026-09-26 04:47:30 +00:00
committed by mike
parent 073c341ca3
commit fda78257f9
11 changed files with 1649 additions and 3 deletions
+19
View File
@@ -0,0 +1,19 @@
export const MODULE_ID = "mb-cypher2";
export function log(...args) {
console.log(`${MODULE_ID} |`, ...args);
}
export function normalizeTemplatePaths(paths, baseDir = "") {
const templates = {};
log("finding templates", paths, baseDir);
const basePath = `modules/${MODULE_ID}/templates${baseDir ? "/" + baseDir : ""}`;
for (const file of paths) {
templates[file] = `${basePath}/${file}`;
}
return templates;
}
export async function preloadTemplatePaths(normalizedPaths) {
return loadTemplates(Object.values(normalizedPaths));
}