vike
Version:
The Framework *You* Control - Next.js & Nuxt alternative for unprecedented flexibility and dependability.
15 lines (14 loc) • 780 B
JavaScript
export { preparePageContextForUserConsumptionServerSide };
import { assert, isPlainObject } from '../utils.js';
import { assertPageContextUrl } from '../../../shared/getPageContextUrlComputed.js';
import { preparePageContextForUserConsumption } from '../../../shared/preparePageContextForUserConsumption.js';
function preparePageContextForUserConsumptionServerSide(pageContext) {
assertPageContextUrl(pageContext);
assert(isPlainObject(pageContext.routeParams));
assert('Page' in pageContext);
assert(typeof pageContext.isClientSideNavigation === 'boolean');
assert(pageContext.isPageContext);
assert(pageContext.isClientSide === false);
assert(typeof pageContext.isPrerendering === 'boolean');
preparePageContextForUserConsumption(pageContext);
}