Ga naar hoofdinhoud

resolveManifestSubtree

Resolve every sentinel token in a manifest subtree through a single dispatch, routing each token by its context to the existing resolver. Behaviour is the composition of the individual resolvers, so this is a drop-in for a caller that previously ran resolveRouteSentinels and then a resolveFilterTokens-style pass by hand.

Signature

import { resolveManifestSubtree } from '@conduction/nextcloud-vue'

const { value, unresolved } = resolveManifestSubtree(value, opts)
ArgumentTypeDescription
value*The subtree (typically a pages[].config block). Not mutated.
optsobjectResolution inputs (all optional).
opts.paramsobjectvue-router params for @route.<param> tokens.
opts.ctxobjectContext (objectId, object, workspace, config) forwarded to the filter / object / workspace / @config.<key> resolvers.
opts.pageIdstringPage id used for route-resolver warning dedup.
opts.warnFunctionA console.warn override (tests).

Return value

Returns { value, unresolved } — the resolved subtree plus the list of tokens that stayed unresolved. OPTIONAL ? tokens are excluded (they are meant to be dropped, not waited on), as are load-time config and server-side declarative contexts this render pass deliberately leaves alone.

Deprecated tokens encountered during the walk warn once via warnIfDeprecated.

See also