diff options
-rw-r--r-- | src/content-function.js | 19 | ||||
-rw-r--r-- | src/write/build-modes/live-dev-server.js | 10 |
2 files changed, 5 insertions, 24 deletions
diff --git a/src/content-function.js b/src/content-function.js index ede5bb74..921b5bcd 100644 --- a/src/content-function.js +++ b/src/content-function.js @@ -206,8 +206,6 @@ export function fulfillDependencies({ return newFulfilledDependencies; } -export const sourceAnnotation = Symbol('Source'); - export function getRelationsTree(dependencies, contentFunctionName, wikiData, ...args) { const relationIdentifier = Symbol('Relation'); @@ -236,11 +234,7 @@ export function getRelationsTree(dependencies, contentFunctionName, wikiData, .. const relationFunction = (name, ...args) => { const relationSymbol = Symbol(relationSymbolMessage(name)); - relationSlots[relationSymbol] = { - name, - args, - [sourceAnnotation]: contentFunctionName, - }; + relationSlots[relationSymbol] = {name, args}; return {[relationIdentifier]: relationSymbol}; }; @@ -258,7 +252,6 @@ export function getRelationsTree(dependencies, contentFunctionName, wikiData, .. ])); return { - [sourceAnnotation]: contentFunctionName, layout: relationsLayout, slots: relationSlots, tree: relationsTree, @@ -296,7 +289,6 @@ export function flattenRelationsTree({ name: slots[slot].name, args: slots[slot].args, relations: tree[slot]?.layout ?? null, - [sourceAnnotation]: slots[slot][sourceAnnotation], }; } } @@ -443,16 +435,11 @@ export function quickEvaluate({ const slotResults = {}; - function runContentFunction({ - name, - args, - relations: flatRelations, - [sourceAnnotation]: sourceName, - }) { + function runContentFunction({name, args, relations: flatRelations}) { const contentFunction = fulfilledContentDependencies[name]; if (!contentFunction) { - throw new Error(`Content function ${name} unfulfilled or not listed (from ${sourceName})`); + throw new Error(`Content function ${name} unfulfilled or not listed`); } const sprawl = diff --git a/src/write/build-modes/live-dev-server.js b/src/write/build-modes/live-dev-server.js index 3d29a83f..10b40cf0 100644 --- a/src/write/build-modes/live-dev-server.js +++ b/src/write/build-modes/live-dev-server.js @@ -33,7 +33,6 @@ import { flattenRelationsTree, getRelationsTree, getNeededContentDependencyNames, - sourceAnnotation, } from '../../content-function.js'; const defaultHost = '0.0.0.0'; @@ -430,16 +429,11 @@ export async function go({ const slotResults = {}; - function runContentFunction({ - name, - args, - relations: flatRelations, - [sourceAnnotation]: sourceName, - }) { + function runContentFunction({name, args, relations: flatRelations}) { const contentFunction = fulfilledContentDependencies[name]; if (!contentFunction) { - throw new Error(`Content function ${name} unfulfilled or not listed (from ${sourceName})`); + throw new Error(`Content function ${name} unfulfilled or not listed`); } const sprawl = |