Compare commits

..

10 Commits

Author SHA1 Message Date
ee613836d1 1.0.23 2021-01-15 07:17:08 +00:00
4b53173618 fix(core): update 2021-01-15 07:17:08 +00:00
46a0220273 1.0.22 2021-01-12 15:17:31 +00:00
46a6c903e1 fix(core): update 2021-01-12 15:17:31 +00:00
134151eb70 1.0.21 2021-01-12 15:07:45 +00:00
ac1c3ac53d fix(core): update 2021-01-12 15:07:45 +00:00
09c23d04f4 1.0.20 2021-01-12 14:18:17 +00:00
3f359cb58c fix(core): update 2021-01-12 14:18:16 +00:00
a85eb48343 1.0.19 2021-01-09 01:48:37 +00:00
7c851b5ed2 fix(core): update 2021-01-09 01:48:36 +00:00
5 changed files with 14 additions and 10 deletions

8
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartssr",
"version": "1.0.18",
"version": "1.0.23",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -2127,9 +2127,9 @@
"integrity": "sha512-KENdm++8uuzxDz1cbUbXtz6InfReP28TYC5zxRgRtwsXh7ZWUkSA+/82IbO97PcSCAfIpg7dwj77G6KGSsTKEQ=="
},
"@pushrocks/smartpuppeteer": {
"version": "1.0.19",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpuppeteer/-/smartpuppeteer-1.0.19.tgz",
"integrity": "sha512-URD2QcXP95YZeaY4qQjddjNOCzE+VzIFHsavfyoxzlRmlnpF3y1+r2rbTwuoFcoZW+M0/4j0alISm7reUfhL9A==",
"version": "1.0.21",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpuppeteer/-/smartpuppeteer-1.0.21.tgz",
"integrity": "sha512-uTONNTNIIswX5UOPt3VYv/7gIDTdkdNqIhR1DpnKlemOVyVLOT7D0eZPuTGXDgtNjHdTyQ6ywc54/gEBGXTNwg==",
"requires": {
"@pushrocks/smartdelay": "^2.0.10",
"@pushrocks/smartenv": "^4.0.16",

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartssr",
"version": "1.0.18",
"version": "1.0.23",
"private": false,
"description": "a smart server side renderer supporting shadow dom",
"main": "dist_ts/index.js",
@ -25,7 +25,7 @@
"@pushrocks/smartdelay": "^2.0.10",
"@pushrocks/smartfile": "^8.0.8",
"@pushrocks/smartpromise": "^3.1.3",
"@pushrocks/smartpuppeteer": "^1.0.19",
"@pushrocks/smartpuppeteer": "^1.0.21",
"@pushrocks/smarttime": "^3.0.38"
},
"files": [

View File

@ -13,13 +13,13 @@ tap.test('should start the smartssr instance', async () => {
await testSSRInstance.start();
});
tap.skip.test('should render central.eu', async (tools) => {
tap.test('should render central.eu', async (tools) => {
await testSSRInstance.renderPage(
'https://central.eu/article/5e76873b9cf69b7bf6bc78bc/Introducing%3A%20central.eu'
'https://in.work'
);
});
tap.test('should render lossless.com', async () => {
tap.skip.test('should render lossless.com', async () => {
await testSSRInstance.renderPage('https://lossless.com');
});

View File

@ -51,6 +51,7 @@ export class SmartSSR {
renderTimeMeasurement.start();
await page.goto(urlArg, {
waitUntil: 'networkidle2',
timeout: 30000
});
let screenshotBuffer: Buffer;
@ -70,7 +71,7 @@ export class SmartSSR {
renderTimeMeasurement.stop();
// lets clean up async
context.close();
await context.close();
overallTimeMeasurement.stop();
console.log(

View File

@ -69,6 +69,9 @@ export function serializeFunction(rootNode) {
noteForAppending.push(childNode);
}
});
while(nodeArg.firstChild) {
nodeArg.removeChild(nodeArg.firstChild);
}
noteForAppending.forEach((childNode) => {
nodeArg.append(childNode);
});