vaderjs 1.3.3-612-hotfix → 1.3.3-6124766be812
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/vader.js +23 -24
package/package.json
CHANGED
package/vader.js
CHANGED
|
@@ -533,10 +533,11 @@ function Compiler(func, file) {
|
|
|
533
533
|
else if (prop.includes('${')) {
|
|
534
534
|
|
|
535
535
|
|
|
536
|
-
prop = prop.replace('="', ':')
|
|
536
|
+
prop = prop.replace('="', ':').replace('}"', '}')
|
|
537
537
|
if (prop.includes('${')) {
|
|
538
538
|
prop = prop.replace('="', ':')
|
|
539
|
-
prop = prop.replace('${', '')
|
|
539
|
+
prop = prop.replace('${', '')
|
|
540
|
+
|
|
540
541
|
}
|
|
541
542
|
if (prop.includes('="${{')) {
|
|
542
543
|
prop = prop.replace('${{', '{')
|
|
@@ -546,21 +547,19 @@ function Compiler(func, file) {
|
|
|
546
547
|
}
|
|
547
548
|
|
|
548
549
|
}
|
|
549
|
-
if (prop.includes('={')) {
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
}
|
|
560
|
-
prop = `${value[0]}:${value[1]}`
|
|
550
|
+
else if (prop.includes('={')) {
|
|
551
|
+
let key = prop.split('=')[0].trim()
|
|
552
|
+
let value = prop.split('=')[1].trim()
|
|
553
|
+
if(value.startsWith('{')){
|
|
554
|
+
value = value.replace('{', '')
|
|
555
|
+
}
|
|
556
|
+
if(value.endsWith('}')){
|
|
557
|
+
value = value.slice(0, -1)
|
|
558
|
+
}
|
|
559
|
+
prop = `${key}:${value}`
|
|
561
560
|
}
|
|
562
561
|
|
|
563
|
-
if (prop.includes('function')
|
|
562
|
+
if (prop.includes('function')) {
|
|
564
563
|
// parse 'function' to function
|
|
565
564
|
prop = prop.replace("'", '')
|
|
566
565
|
|
|
@@ -569,9 +568,9 @@ function Compiler(func, file) {
|
|
|
569
568
|
|
|
570
569
|
}
|
|
571
570
|
|
|
572
|
-
prop = prop.replace('=function', ':function')
|
|
571
|
+
prop = prop.replace('=function', ':function')
|
|
573
572
|
}
|
|
574
|
-
|
|
573
|
+
|
|
575
574
|
filteredProps.push(prop);
|
|
576
575
|
|
|
577
576
|
|
|
@@ -598,7 +597,7 @@ function Compiler(func, file) {
|
|
|
598
597
|
|
|
599
598
|
let savedname = name;
|
|
600
599
|
|
|
601
|
-
|
|
600
|
+
|
|
602
601
|
|
|
603
602
|
name = name + Math.random().toString(36).substring(2);
|
|
604
603
|
if (children && children.match(componentRegex)) {
|
|
@@ -951,8 +950,8 @@ async function Build() {
|
|
|
951
950
|
res.render(module, req, res, module.$metadata)
|
|
952
951
|
}
|
|
953
952
|
catch(error){
|
|
954
|
-
document.documentElement.setAttribute('error',
|
|
955
|
-
throw new Error(
|
|
953
|
+
document.documentElement.setAttribute('error', error.message)
|
|
954
|
+
throw new Error(error.message)
|
|
956
955
|
}
|
|
957
956
|
})
|
|
958
957
|
${equalparamroute.length > 0 ? equalparamroute.map((e) => {
|
|
@@ -1014,7 +1013,7 @@ async function Build() {
|
|
|
1014
1013
|
globalThis.listen = true;
|
|
1015
1014
|
|
|
1016
1015
|
const browser = await puppeteer.launch({
|
|
1017
|
-
headless:
|
|
1016
|
+
headless: "new", args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
|
1018
1017
|
warning: false,
|
|
1019
1018
|
})
|
|
1020
1019
|
try {
|
|
@@ -1034,10 +1033,10 @@ async function Build() {
|
|
|
1034
1033
|
page.on('pageerror', async err => {
|
|
1035
1034
|
let errorObj = await page.evaluate(() => document.documentElement.getAttribute('error'))
|
|
1036
1035
|
console.log('\x1b[31m%s\x1b[0m', 'PAGE ERROR:', errorObj);
|
|
1037
|
-
|
|
1036
|
+
throw new Error(errorObj)
|
|
1038
1037
|
});
|
|
1039
1038
|
} catch (error) {
|
|
1040
|
-
|
|
1039
|
+
// do nothing
|
|
1041
1040
|
}
|
|
1042
1041
|
// Handle page crashes
|
|
1043
1042
|
page.on('crash', () => {
|
|
@@ -1075,7 +1074,7 @@ async function Build() {
|
|
|
1075
1074
|
}
|
|
1076
1075
|
|
|
1077
1076
|
finally {
|
|
1078
|
-
browser.close()
|
|
1077
|
+
await browser.close();
|
|
1079
1078
|
server.close()
|
|
1080
1079
|
}
|
|
1081
1080
|
})
|