Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9dbc5907b3 | |||
| 61218599c8 | |||
| 27fd2efb51 | |||
| f57e24bb27 |
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"@git.zone/cli": {
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "code.foss.global",
|
||||
"gitscope": "push.rocks",
|
||||
"gitrepo": "smartssr",
|
||||
"shortDescription": "server-side shadow DOM renderer",
|
||||
"description": "A smart server-side renderer that supports shadow DOM.",
|
||||
"npmPackagename": "@push.rocks/smartssr",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"server-side rendering",
|
||||
"shadow DOM",
|
||||
"TypeScript",
|
||||
"puppeteer",
|
||||
"serialization",
|
||||
"web development",
|
||||
"node.js"
|
||||
]
|
||||
},
|
||||
"release": {
|
||||
"registries": [
|
||||
"https://verdaccio.lossless.digital",
|
||||
"https://registry.npmjs.org"
|
||||
],
|
||||
"accessLevel": "public"
|
||||
}
|
||||
},
|
||||
"@ship.zone/szci": {
|
||||
"npmGlobalTools": [],
|
||||
"npmRegistryUrl": "registry.npmjs.org"
|
||||
},
|
||||
"@git.zone/tsdoc": {
|
||||
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,20 @@
|
||||
# Changelog
|
||||
|
||||
## 2026-05-01 - 1.0.41 - fix(build)
|
||||
modernize package configuration and remove smartfile dependency from filesystem operations
|
||||
|
||||
- adds package exports and includes .smartconfig.json and license in published files
|
||||
- updates build and test tooling to current @git.zone versions and migrates tests to @git.zone/tstest
|
||||
- replaces smartfile usage with native fs APIs for debug output and .nogit directory creation
|
||||
- enables stricter TypeScript settings with noImplicitAny and explicit node types
|
||||
|
||||
## 2025-01-01 - 1.0.40 - fix(test)
|
||||
Fix test configuration and import path in test suite
|
||||
|
||||
- Changed the test command in package.json to include the build step.
|
||||
- Fixed the import path for smartssr in the test suite to point to the correct distribution directory.
|
||||
- Added console log to display rendered HTML content during test execution.
|
||||
|
||||
## 2025-01-01 - 1.0.39 - fix(core)
|
||||
Fixed package and file path typos and removed GitLab CI configuration.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2020 Task Venture Capital GmbH (hello@lossless.com)
|
||||
Copyright (c) 2026 Task Venture Capital GmbH <hello@task.vc>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
SOFTWARE.
|
||||
|
||||
+13
-5
@@ -1,10 +1,11 @@
|
||||
{
|
||||
"gitzone": {
|
||||
"@git.zone/cli": {
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "code.foss.global",
|
||||
"gitscope": "push.rocks",
|
||||
"gitrepo": "smartssr",
|
||||
"shortDescription": "server-side shadow DOM renderer",
|
||||
"description": "A smart server-side renderer that supports shadow DOM.",
|
||||
"npmPackagename": "@push.rocks/smartssr",
|
||||
"license": "MIT",
|
||||
@@ -18,13 +19,20 @@
|
||||
"web development",
|
||||
"node.js"
|
||||
]
|
||||
},
|
||||
"release": {
|
||||
"registries": [
|
||||
"https://verdaccio.lossless.digital",
|
||||
"https://registry.npmjs.org"
|
||||
],
|
||||
"accessLevel": "public"
|
||||
}
|
||||
},
|
||||
"npmci": {
|
||||
"@ship.zone/szci": {
|
||||
"npmGlobalTools": [],
|
||||
"npmAccessLevel": "public"
|
||||
"npmRegistryUrl": "registry.npmjs.org"
|
||||
},
|
||||
"tsdoc": {
|
||||
"@git.zone/tsdoc": {
|
||||
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+17
-14
@@ -1,32 +1,33 @@
|
||||
{
|
||||
"name": "@push.rocks/smartssr",
|
||||
"version": "1.0.39",
|
||||
"version": "1.0.41",
|
||||
"private": false,
|
||||
"description": "A smart server-side renderer that supports shadow DOM.",
|
||||
"exports": {
|
||||
".": "./dist_ts/index.js"
|
||||
},
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"author": "Lossless GmbH",
|
||||
"author": "Task Venture Capital GmbH <hello@task.vc>",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "(tstest test/ --web)",
|
||||
"build": "(tsbuild --web --allowimplicitany)",
|
||||
"test": "tstest test/",
|
||||
"build": "tsbuild --web",
|
||||
"serve": "tsrun scripts/serve.ts",
|
||||
"buildDocs": "tsdoc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@git.zone/tsbuild": "^2.1.66",
|
||||
"@git.zone/tsrun": "^1.2.44",
|
||||
"@git.zone/tstest": "^1.0.77",
|
||||
"@push.rocks/tapbundle": "^5.0.8",
|
||||
"@types/node": "^22.10.3"
|
||||
"@git.zone/tsbuild": "^4.4.0",
|
||||
"@git.zone/tsrun": "^2.0.3",
|
||||
"@git.zone/tstest": "^3.6.3",
|
||||
"@types/node": "^25.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@push.rocks/smartdelay": "^3.0.1",
|
||||
"@push.rocks/smartfile": "^11.0.23",
|
||||
"@push.rocks/smartpath": "^5.0.5",
|
||||
"@push.rocks/smartpromise": "^4.0.2",
|
||||
"@push.rocks/smartpuppeteer": "^2.0.2",
|
||||
"@push.rocks/smarttime": "^4.0.1"
|
||||
"@push.rocks/smartpath": "^6.0.0",
|
||||
"@push.rocks/smartpromise": "^4.2.4",
|
||||
"@push.rocks/smartpuppeteer": "^2.0.6",
|
||||
"@push.rocks/smarttime": "^4.2.3"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
@@ -37,6 +38,8 @@
|
||||
"dist_ts_web/**/*",
|
||||
"assets/**/*",
|
||||
"cli.js",
|
||||
".smartconfig.json",
|
||||
"license",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
],
|
||||
|
||||
Generated
+3951
-5771
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
import { expect, tap } from '@push.rocks/tapbundle';
|
||||
import { tap } from '@git.zone/tstest/tapbundle';
|
||||
import * as smartssr from '../ts/index.js';
|
||||
|
||||
let testSSRInstance: smartssr.SmartSSR;
|
||||
@@ -9,8 +9,9 @@ tap.test('should create a valid smartssr instance', async () => {
|
||||
});
|
||||
});
|
||||
|
||||
tap.test('should render central.eu', async (tools) => {
|
||||
await testSSRInstance.renderPage('https://lossless.com');
|
||||
tap.test('should render central.eu', async () => {
|
||||
const renderedPage = await testSSRInstance.renderPage('https://lossless.com');
|
||||
console.log(renderedPage);
|
||||
});
|
||||
|
||||
tap.test('should render lossless.com', async () => {
|
||||
@@ -22,4 +23,4 @@ tap.test('should render https://lossless.gmbh', async () => {
|
||||
console.log(renderedPage);
|
||||
});
|
||||
|
||||
tap.start();
|
||||
export default tap.start();
|
||||
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartssr',
|
||||
version: '1.0.39',
|
||||
version: '1.0.41',
|
||||
description: 'A smart server-side renderer that supports shadow DOM.'
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ export class SmartSSR {
|
||||
const browser = new plugins.smartpuppeteer.IncognitoBrowser();
|
||||
const renderTimeMeasurement = new plugins.smarttime.HrtMeasurement();
|
||||
let renderedPageString: string;
|
||||
let screenshotBuffer: Buffer;
|
||||
let screenshotBuffer: Buffer | undefined;
|
||||
await browser.start();
|
||||
try {
|
||||
const context = await browser.getNewIncognitoContext();
|
||||
@@ -84,12 +84,11 @@ export class SmartSSR {
|
||||
|
||||
// debug
|
||||
if (this.options.debug) {
|
||||
plugins.smartfile.memory.toFsSync(
|
||||
renderedPageString,
|
||||
plugins.path.join(paths.noGitDir, 'test.html')
|
||||
);
|
||||
const fs = await import('fs');
|
||||
fs.writeFileSync(plugins.path.join(paths.noGitDir, 'test.png'), screenshotBuffer);
|
||||
fs.writeFileSync(plugins.path.join(paths.noGitDir, 'test.html'), renderedPageString);
|
||||
if (screenshotBuffer) {
|
||||
fs.writeFileSync(plugins.path.join(paths.noGitDir, 'test.png'), screenshotBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
return resultDeferred.promise;
|
||||
|
||||
@@ -5,4 +5,4 @@ export const packageDir = plugins.path.join(
|
||||
'../'
|
||||
);
|
||||
export const noGitDir = plugins.path.join(packageDir, './.nogit');
|
||||
plugins.smartfile.fs.ensureDirSync(noGitDir);
|
||||
plugins.fs.mkdirSync(noGitDir, { recursive: true });
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// node native
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
export { path };
|
||||
export { fs, path };
|
||||
|
||||
// @pushrocks scope
|
||||
import * as smartdelay from '@push.rocks/smartdelay';
|
||||
import * as smartfile from '@push.rocks/smartfile';
|
||||
import * as smartpuppeteer from '@push.rocks/smartpuppeteer';
|
||||
import * as smartpath from '@push.rocks/smartpath';
|
||||
import * as smartpromise from '@push.rocks/smartpromise';
|
||||
import * as smarttime from '@push.rocks/smarttime';
|
||||
|
||||
export { smartdelay, smartfile, smartpath, smartpuppeteer, smartpromise, smarttime };
|
||||
export { smartdelay, smartpath, smartpuppeteer, smartpromise, smarttime };
|
||||
|
||||
+3
-1
@@ -5,8 +5,10 @@
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"noImplicitAny": true,
|
||||
"esModuleInterop": true,
|
||||
"verbatimModuleSyntax": true
|
||||
"verbatimModuleSyntax": true,
|
||||
"types": ["node"]
|
||||
},
|
||||
"exclude": [
|
||||
"dist_*/**/*.d.ts"
|
||||
|
||||
Reference in New Issue
Block a user