sys/parsoid.js
function _dependenciesUpdate(hyper, req, newContent = true) {
    const rp = req.params;
    return mwUtil.getSiteInfo(hyper, req)
    .then((siteInfo) => {
        const baseUri = siteInfo.baseUri.replace(/^https?:/, '');
        const publicURI = `${baseUri}/page/html/${encodeURIComponent(rp.title)}`;
        const body = [ { meta: { uri: `${publicURI}/${rp.revision}` } } ];
        if (newContent) {
            body.push({ meta: { uri: publicURI } });
        }
        return hyper.post({
            uri: new URI([rp.domain, 'sys', 'events', '']),
            body
        }).catch((e) => {
            hyper.logger.log('warn/bg-updates', e);
        });
    });
}
function _dependenciesUpdate(hyper, req, newContent = true) {
    const rp = req.params;
    return mwUtil.getSiteInfo(hyper, req)
    .then((siteInfo) => {
        const baseUri = siteInfo.baseUri.replace(/^https?:/, '');
        const publicURI = `${baseUri}/page/html/${encodeURIComponent(rp.title)}`;
        const body = [ { meta: { uri: `${publicURI}/${rp.revision}` } } ];
        if (newContent) {
            body.push({ meta: { uri: publicURI } });
        }
        return hyper.post({
            uri: new URI([rp.domain, 'sys', 'events', '']),
            body
        }).catch((e) => {
            hyper.logger.log('warn/bg-updates', e);
        });
    });
}
function _dependenciesUpdate ( hyper , req , newContent = true ) { const rp = req . params ; return mwUtil . getSiteInfo ( hyper , req ) . then ( ( siteInfo ) => { const baseUri = siteInfo . baseUri . replace ( / ^https?: / , '' ) ; const publicURI = ` ${ baseUri } ${ encodeURIComponent ( rp . title ) } ` ; const body = [ { meta : { uri : ` ${ publicURI } ${ rp . revision } ` } } ] ; if ( newContent ) { body . push ( { meta : { uri : publicURI } } ) ; } return hyper . post ( { uri : new URI ( [ rp . domain , 'sys' , 'events' , '' ] ) , body } ) . catch ( ( e ) => { hyper . logger . log ( 'warn/bg-updates' , e ) ; } ) ; } ) ; }
HTML resource_change event emission
@param   {HyperSwitch}   hyper           the hyperswitch router object
@param   {Object}        req             the request
@param   {boolean}       [newContent]    whether this is the newest revision
@return  {Object}                        update response
HTML resource_change event emission