@murasoftware/next-core
Advanced tools
Comparing version 2.0.15 to 2.0.16
@@ -305,3 +305,3 @@ import { useEffect, useState, createContext } from 'react'; | ||
try { | ||
var moduleStyleData = {}; | ||
var _moduleStyleData = {}; | ||
content.displayregions = content.displayregions || {}; | ||
@@ -315,4 +315,4 @@ var regions = Object.values(content.displayregions); | ||
item.instanceid = item.instanceid || Mura.createUUID(); | ||
return Promise.resolve(getModuleProps(item, moduleStyleData, renderMode, content, queryParams, Mura)).then(function (_getModuleProps2) { | ||
moduleStyleData[item.instanceid] = _getModuleProps2; | ||
return Promise.resolve(getModuleProps(item, _moduleStyleData, renderMode, content, queryParams, Mura)).then(function (_getModuleProps2) { | ||
_moduleStyleData[item.instanceid] = _getModuleProps2; | ||
}); | ||
@@ -331,4 +331,4 @@ }); | ||
item.instanceid = item.instanceid || Mura.createUUID(); | ||
return Promise.resolve(getModuleProps(item, moduleStyleData, renderMode, content, queryParams, Mura)).then(function (_getModuleProps) { | ||
moduleStyleData[item.instanceid] = _getModuleProps; | ||
return Promise.resolve(getModuleProps(item, _moduleStyleData, renderMode, content, queryParams, Mura)).then(function (_getModuleProps) { | ||
_moduleStyleData[item.instanceid] = _getModuleProps; | ||
}); | ||
@@ -345,4 +345,4 @@ }); | ||
return Promise.resolve(_temp25 && _temp25.then ? _temp25.then(function () { | ||
return moduleStyleData; | ||
}) : moduleStyleData); | ||
return _moduleStyleData; | ||
}) : _moduleStyleData); | ||
} catch (e) { | ||
@@ -752,2 +752,40 @@ return Promise.reject(e); | ||
function _temp13() { | ||
function _temp11() { | ||
function _temp9() { | ||
if (renderMode == 'dynamic') { | ||
return { | ||
props: props | ||
}; | ||
} else { | ||
return { | ||
props: props, | ||
revalidate: 1 | ||
}; | ||
} | ||
} | ||
var props = { | ||
content: content, | ||
moduleStyleData: moduleStyleData, | ||
externalModules: ExternalModules, | ||
codeblocks: codeblocks, | ||
queryParams: queryParams, | ||
renderMode: renderMode | ||
}; | ||
var _temp8 = function () { | ||
if (typeof onAfter == 'function') { | ||
var _temp16 = _catch(function () { | ||
return Promise.resolve(onAfter(props, _Mura)).then(function () {}); | ||
}, function (e) { | ||
console.log('Error running onAfter event in getMuraProps:', e); | ||
}); | ||
if (_temp16 && _temp16.then) return _temp16.then(function () {}); | ||
} | ||
}(); | ||
return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8); | ||
} | ||
if (content.filename == '404') { | ||
@@ -784,7 +822,7 @@ if (typeof context.params != 'undefined') { | ||
} else { | ||
context.res.statusCode = 301; | ||
context.res.statusCode = 302; | ||
} | ||
} | ||
if (hasResponseHeaders && content.statuscode != 301) { | ||
if (hasResponseHeaders && content.statuscode != 302) { | ||
context.res.setHeader('Cache-Control', 'no-cache, no-store'); | ||
@@ -805,73 +843,41 @@ context.res.setHeader('Expires', 'Mon, 01 Jan 1990 00:00:00 GMT'); | ||
return Promise.resolve(getRegionProps(content, queryParams, renderMode, _Mura)).then(function (moduleStyleData) { | ||
function _temp11() { | ||
function _temp9() { | ||
if (renderMode == 'dynamic') { | ||
return { | ||
props: props | ||
}; | ||
} else { | ||
return { | ||
props: props, | ||
revalidate: 1 | ||
}; | ||
} | ||
} | ||
var codeblocks = { | ||
header: [], | ||
bodystart: [], | ||
footer: [] | ||
}; | ||
var moduleStyleData = {}; | ||
var props = { | ||
content: content, | ||
moduleStyleData: moduleStyleData, | ||
externalModules: ExternalModules, | ||
codeblocks: codeblocks, | ||
queryParams: queryParams, | ||
renderMode: renderMode | ||
}; | ||
var _temp10 = function () { | ||
if (!content.redirect) { | ||
return Promise.resolve(getRegionProps(content, queryParams, renderMode, _Mura)).then(function (_getRegionProps) { | ||
moduleStyleData = _getRegionProps; | ||
return _catch(function () { | ||
var _temp6 = function () { | ||
if (connectorConfig.codeblocks && (context.res || context.browser) && !(queryParams.codeblocks && queryParams.codeblocks === "false")) { | ||
return Promise.resolve(_Mura.getFeed('codeblock').where().prop('active').isEQ(1).getQuery()).then(function (codeCollection) { | ||
codeCollection.forEach(function (item) { | ||
var placement = item.get('placement').toLowerCase(); | ||
var _temp8 = function () { | ||
if (typeof onAfter == 'function') { | ||
var _temp16 = _catch(function () { | ||
return Promise.resolve(onAfter(props, _Mura)).then(function () {}); | ||
}, function (e) { | ||
console.log('Error running onAfter event in getMuraProps:', e); | ||
}); | ||
if (placement == 'header') { | ||
codeblocks.header.push(item.get('code')); | ||
} else if (placement == 'footer') { | ||
codeblocks.footer.push(item.get('code')); | ||
} else if (placement == 'bodystart') { | ||
codeblocks.bodystart.push(item.get('code')); | ||
} | ||
}); | ||
}); | ||
} | ||
}(); | ||
if (_temp16 && _temp16.then) return _temp16.then(function () {}); | ||
} | ||
}(); | ||
return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8); | ||
if (_temp6 && _temp6.then) return _temp6.then(function () {}); | ||
}, function (e) { | ||
console.error(e); | ||
}); | ||
}); | ||
} | ||
}(); | ||
var codeblocks = { | ||
header: [], | ||
bodystart: [], | ||
footer: [] | ||
}; | ||
var _temp10 = _catch(function () { | ||
var _temp6 = function () { | ||
if (connectorConfig.codeblocks && (context.res || context.browser) && !(queryParams.codeblocks && queryParams.codeblocks === "false")) { | ||
return Promise.resolve(_Mura.getFeed('codeblock').where().prop('active').isEQ(1).getQuery()).then(function (codeCollection) { | ||
codeCollection.forEach(function (item) { | ||
var placement = item.get('placement').toLowerCase(); | ||
if (placement == 'header') { | ||
codeblocks.header.push(item.get('code')); | ||
} else if (placement == 'footer') { | ||
codeblocks.footer.push(item.get('code')); | ||
} else if (placement == 'bodystart') { | ||
codeblocks.bodystart.push(item.get('code')); | ||
} | ||
}); | ||
}); | ||
} | ||
}(); | ||
if (_temp6 && _temp6.then) return _temp6.then(function () {}); | ||
}, function (e) { | ||
console.error(e); | ||
}); | ||
return _temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10); | ||
}); | ||
return _temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10); | ||
} | ||
@@ -878,0 +884,0 @@ |
@@ -310,3 +310,3 @@ (function (global, factory) { | ||
try { | ||
var moduleStyleData = {}; | ||
var _moduleStyleData = {}; | ||
content.displayregions = content.displayregions || {}; | ||
@@ -320,4 +320,4 @@ var regions = Object.values(content.displayregions); | ||
item.instanceid = item.instanceid || Mura.createUUID(); | ||
return Promise.resolve(getModuleProps(item, moduleStyleData, renderMode, content, queryParams, Mura)).then(function (_getModuleProps2) { | ||
moduleStyleData[item.instanceid] = _getModuleProps2; | ||
return Promise.resolve(getModuleProps(item, _moduleStyleData, renderMode, content, queryParams, Mura)).then(function (_getModuleProps2) { | ||
_moduleStyleData[item.instanceid] = _getModuleProps2; | ||
}); | ||
@@ -336,4 +336,4 @@ }); | ||
item.instanceid = item.instanceid || Mura.createUUID(); | ||
return Promise.resolve(getModuleProps(item, moduleStyleData, renderMode, content, queryParams, Mura)).then(function (_getModuleProps) { | ||
moduleStyleData[item.instanceid] = _getModuleProps; | ||
return Promise.resolve(getModuleProps(item, _moduleStyleData, renderMode, content, queryParams, Mura)).then(function (_getModuleProps) { | ||
_moduleStyleData[item.instanceid] = _getModuleProps; | ||
}); | ||
@@ -350,4 +350,4 @@ }); | ||
return Promise.resolve(_temp25 && _temp25.then ? _temp25.then(function () { | ||
return moduleStyleData; | ||
}) : moduleStyleData); | ||
return _moduleStyleData; | ||
}) : _moduleStyleData); | ||
} catch (e) { | ||
@@ -757,2 +757,40 @@ return Promise.reject(e); | ||
function _temp13() { | ||
function _temp11() { | ||
function _temp9() { | ||
if (renderMode == 'dynamic') { | ||
return { | ||
props: props | ||
}; | ||
} else { | ||
return { | ||
props: props, | ||
revalidate: 1 | ||
}; | ||
} | ||
} | ||
var props = { | ||
content: content, | ||
moduleStyleData: moduleStyleData, | ||
externalModules: ExternalModules, | ||
codeblocks: codeblocks, | ||
queryParams: queryParams, | ||
renderMode: renderMode | ||
}; | ||
var _temp8 = function () { | ||
if (typeof onAfter == 'function') { | ||
var _temp16 = _catch(function () { | ||
return Promise.resolve(onAfter(props, _Mura)).then(function () {}); | ||
}, function (e) { | ||
console.log('Error running onAfter event in getMuraProps:', e); | ||
}); | ||
if (_temp16 && _temp16.then) return _temp16.then(function () {}); | ||
} | ||
}(); | ||
return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8); | ||
} | ||
if (content.filename == '404') { | ||
@@ -789,7 +827,7 @@ if (typeof context.params != 'undefined') { | ||
} else { | ||
context.res.statusCode = 301; | ||
context.res.statusCode = 302; | ||
} | ||
} | ||
if (hasResponseHeaders && content.statuscode != 301) { | ||
if (hasResponseHeaders && content.statuscode != 302) { | ||
context.res.setHeader('Cache-Control', 'no-cache, no-store'); | ||
@@ -810,73 +848,41 @@ context.res.setHeader('Expires', 'Mon, 01 Jan 1990 00:00:00 GMT'); | ||
return Promise.resolve(getRegionProps(content, queryParams, renderMode, _Mura)).then(function (moduleStyleData) { | ||
function _temp11() { | ||
function _temp9() { | ||
if (renderMode == 'dynamic') { | ||
return { | ||
props: props | ||
}; | ||
} else { | ||
return { | ||
props: props, | ||
revalidate: 1 | ||
}; | ||
} | ||
} | ||
var codeblocks = { | ||
header: [], | ||
bodystart: [], | ||
footer: [] | ||
}; | ||
var moduleStyleData = {}; | ||
var props = { | ||
content: content, | ||
moduleStyleData: moduleStyleData, | ||
externalModules: ExternalModules, | ||
codeblocks: codeblocks, | ||
queryParams: queryParams, | ||
renderMode: renderMode | ||
}; | ||
var _temp10 = function () { | ||
if (!content.redirect) { | ||
return Promise.resolve(getRegionProps(content, queryParams, renderMode, _Mura)).then(function (_getRegionProps) { | ||
moduleStyleData = _getRegionProps; | ||
return _catch(function () { | ||
var _temp6 = function () { | ||
if (connectorConfig.codeblocks && (context.res || context.browser) && !(queryParams.codeblocks && queryParams.codeblocks === "false")) { | ||
return Promise.resolve(_Mura.getFeed('codeblock').where().prop('active').isEQ(1).getQuery()).then(function (codeCollection) { | ||
codeCollection.forEach(function (item) { | ||
var placement = item.get('placement').toLowerCase(); | ||
var _temp8 = function () { | ||
if (typeof onAfter == 'function') { | ||
var _temp16 = _catch(function () { | ||
return Promise.resolve(onAfter(props, _Mura)).then(function () {}); | ||
}, function (e) { | ||
console.log('Error running onAfter event in getMuraProps:', e); | ||
}); | ||
if (placement == 'header') { | ||
codeblocks.header.push(item.get('code')); | ||
} else if (placement == 'footer') { | ||
codeblocks.footer.push(item.get('code')); | ||
} else if (placement == 'bodystart') { | ||
codeblocks.bodystart.push(item.get('code')); | ||
} | ||
}); | ||
}); | ||
} | ||
}(); | ||
if (_temp16 && _temp16.then) return _temp16.then(function () {}); | ||
} | ||
}(); | ||
return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8); | ||
if (_temp6 && _temp6.then) return _temp6.then(function () {}); | ||
}, function (e) { | ||
console.error(e); | ||
}); | ||
}); | ||
} | ||
}(); | ||
var codeblocks = { | ||
header: [], | ||
bodystart: [], | ||
footer: [] | ||
}; | ||
var _temp10 = _catch(function () { | ||
var _temp6 = function () { | ||
if (connectorConfig.codeblocks && (context.res || context.browser) && !(queryParams.codeblocks && queryParams.codeblocks === "false")) { | ||
return Promise.resolve(_Mura.getFeed('codeblock').where().prop('active').isEQ(1).getQuery()).then(function (codeCollection) { | ||
codeCollection.forEach(function (item) { | ||
var placement = item.get('placement').toLowerCase(); | ||
if (placement == 'header') { | ||
codeblocks.header.push(item.get('code')); | ||
} else if (placement == 'footer') { | ||
codeblocks.footer.push(item.get('code')); | ||
} else if (placement == 'bodystart') { | ||
codeblocks.bodystart.push(item.get('code')); | ||
} | ||
}); | ||
}); | ||
} | ||
}(); | ||
if (_temp6 && _temp6.then) return _temp6.then(function () {}); | ||
}, function (e) { | ||
console.error(e); | ||
}); | ||
return _temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10); | ||
}); | ||
return _temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10); | ||
} | ||
@@ -883,0 +889,0 @@ |
{ | ||
"name": "@murasoftware/next-core", | ||
"version": "2.0.15", | ||
"version": "2.0.16", | ||
"description": "Core utilties for Mura.js and Next.js", | ||
@@ -5,0 +5,0 @@ "author": "Mura Software", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
424094
130
3830
9