Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions scripts/sync-tasknotes-pack.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ import { pathToFileURL, fileURLToPath } from "node:url";

const root = resolve(dirname(fileURLToPath(import.meta.url)), "..");
const model = resolve(process.env.TASKNOTES_MODEL_DIR ?? join(root, "..", "tasknotes-model"));
const { buildTaskNotesMdbaseResources, buildTaskNotesMdbaseTypePack, TASKNOTES_TASK_CONTRACT_VERSION } = await import(pathToFileURL(join(model, "dist/esm/mdbase.js")).href);
const resources = buildTaskNotesMdbaseResources();
const { buildTaskNotesMdbaseTypePack, TASKNOTES_TASK_CONTRACT_VERSION } = await import(pathToFileURL(join(model, "dist/esm/mdbase.js")).href);
// The published starter, not the model's plugin defaults: those omit the
// cancelled status and declare profiles the starter does not implement.
const { buildTaskNotesStarterResources } = await import(pathToFileURL(join(model, "dist/esm/starter.js")).href);
const resources = buildTaskNotesStarterResources();
// Also verifies the model's pinned semantic digest before importing anything.
await buildTaskNotesMdbaseTypePack(resources);
const version = TASKNOTES_TASK_CONTRACT_VERSION;
Expand Down
Loading