fix(build): modernize package configuration and remove smartfile dependency from filesystem operations
This commit is contained in:
@@ -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,13 @@
|
|||||||
# Changelog
|
# 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)
|
## 2025-01-01 - 1.0.40 - fix(test)
|
||||||
Fix test configuration and import path in test suite
|
Fix test configuration and import path in test suite
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
+12
-4
@@ -1,10 +1,11 @@
|
|||||||
{
|
{
|
||||||
"gitzone": {
|
"@git.zone/cli": {
|
||||||
"projectType": "npm",
|
"projectType": "npm",
|
||||||
"module": {
|
"module": {
|
||||||
"githost": "code.foss.global",
|
"githost": "code.foss.global",
|
||||||
"gitscope": "push.rocks",
|
"gitscope": "push.rocks",
|
||||||
"gitrepo": "smartssr",
|
"gitrepo": "smartssr",
|
||||||
|
"shortDescription": "server-side shadow DOM renderer",
|
||||||
"description": "A smart server-side renderer that supports shadow DOM.",
|
"description": "A smart server-side renderer that supports shadow DOM.",
|
||||||
"npmPackagename": "@push.rocks/smartssr",
|
"npmPackagename": "@push.rocks/smartssr",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -18,13 +19,20 @@
|
|||||||
"web development",
|
"web development",
|
||||||
"node.js"
|
"node.js"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"release": {
|
||||||
|
"registries": [
|
||||||
|
"https://verdaccio.lossless.digital",
|
||||||
|
"https://registry.npmjs.org"
|
||||||
|
],
|
||||||
|
"accessLevel": "public"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"npmci": {
|
"@ship.zone/szci": {
|
||||||
"npmGlobalTools": [],
|
"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"
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+16
-13
@@ -3,30 +3,31 @@
|
|||||||
"version": "1.0.40",
|
"version": "1.0.40",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "A smart server-side renderer that supports shadow DOM.",
|
"description": "A smart server-side renderer that supports shadow DOM.",
|
||||||
|
"exports": {
|
||||||
|
".": "./dist_ts/index.js"
|
||||||
|
},
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
"typings": "dist_ts/index.d.ts",
|
"typings": "dist_ts/index.d.ts",
|
||||||
"author": "Lossless GmbH",
|
"author": "Task Venture Capital GmbH <hello@task.vc>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(npm run build &&tstest test/ --web)",
|
"test": "tstest test/",
|
||||||
"build": "(tsbuild --web --allowimplicitany)",
|
"build": "tsbuild --web",
|
||||||
"serve": "tsrun scripts/serve.ts",
|
"serve": "tsrun scripts/serve.ts",
|
||||||
"buildDocs": "tsdoc"
|
"buildDocs": "tsdoc"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@git.zone/tsbuild": "^2.1.66",
|
"@git.zone/tsbuild": "^4.4.0",
|
||||||
"@git.zone/tsrun": "^1.2.44",
|
"@git.zone/tsrun": "^2.0.3",
|
||||||
"@git.zone/tstest": "^1.0.77",
|
"@git.zone/tstest": "^3.6.3",
|
||||||
"@push.rocks/tapbundle": "^5.0.8",
|
"@types/node": "^25.6.0"
|
||||||
"@types/node": "^22.10.3"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@push.rocks/smartdelay": "^3.0.1",
|
"@push.rocks/smartdelay": "^3.0.1",
|
||||||
"@push.rocks/smartfile": "^11.0.23",
|
"@push.rocks/smartpath": "^6.0.0",
|
||||||
"@push.rocks/smartpath": "^5.0.5",
|
"@push.rocks/smartpromise": "^4.2.4",
|
||||||
"@push.rocks/smartpromise": "^4.0.2",
|
"@push.rocks/smartpuppeteer": "^2.0.6",
|
||||||
"@push.rocks/smartpuppeteer": "^2.0.2",
|
"@push.rocks/smarttime": "^4.2.3"
|
||||||
"@push.rocks/smarttime": "^4.0.1"
|
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"ts/**/*",
|
"ts/**/*",
|
||||||
@@ -37,6 +38,8 @@
|
|||||||
"dist_ts_web/**/*",
|
"dist_ts_web/**/*",
|
||||||
"assets/**/*",
|
"assets/**/*",
|
||||||
"cli.js",
|
"cli.js",
|
||||||
|
".smartconfig.json",
|
||||||
|
"license",
|
||||||
"npmextra.json",
|
"npmextra.json",
|
||||||
"readme.md"
|
"readme.md"
|
||||||
],
|
],
|
||||||
|
|||||||
Generated
+3951
-5771
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
import { expect, tap } from '@push.rocks/tapbundle';
|
import { tap } from '@git.zone/tstest/tapbundle';
|
||||||
import * as smartssr from '../dist_ts/index.js';
|
import * as smartssr from '../ts/index.js';
|
||||||
|
|
||||||
let testSSRInstance: smartssr.SmartSSR;
|
let testSSRInstance: smartssr.SmartSSR;
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ tap.test('should create a valid smartssr instance', async () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should render central.eu', async (tools) => {
|
tap.test('should render central.eu', async () => {
|
||||||
const renderedPage = await testSSRInstance.renderPage('https://lossless.com');
|
const renderedPage = await testSSRInstance.renderPage('https://lossless.com');
|
||||||
console.log(renderedPage);
|
console.log(renderedPage);
|
||||||
});
|
});
|
||||||
@@ -23,4 +23,4 @@ tap.test('should render https://lossless.gmbh', async () => {
|
|||||||
console.log(renderedPage);
|
console.log(renderedPage);
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.start();
|
export default tap.start();
|
||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/smartssr',
|
name: '@push.rocks/smartssr',
|
||||||
version: '1.0.40',
|
version: '1.0.41',
|
||||||
description: 'A smart server-side renderer that supports shadow DOM.'
|
description: 'A smart server-side renderer that supports shadow DOM.'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export class SmartSSR {
|
|||||||
const browser = new plugins.smartpuppeteer.IncognitoBrowser();
|
const browser = new plugins.smartpuppeteer.IncognitoBrowser();
|
||||||
const renderTimeMeasurement = new plugins.smarttime.HrtMeasurement();
|
const renderTimeMeasurement = new plugins.smarttime.HrtMeasurement();
|
||||||
let renderedPageString: string;
|
let renderedPageString: string;
|
||||||
let screenshotBuffer: Buffer;
|
let screenshotBuffer: Buffer | undefined;
|
||||||
await browser.start();
|
await browser.start();
|
||||||
try {
|
try {
|
||||||
const context = await browser.getNewIncognitoContext();
|
const context = await browser.getNewIncognitoContext();
|
||||||
@@ -84,12 +84,11 @@ export class SmartSSR {
|
|||||||
|
|
||||||
// debug
|
// debug
|
||||||
if (this.options.debug) {
|
if (this.options.debug) {
|
||||||
plugins.smartfile.memory.toFsSync(
|
|
||||||
renderedPageString,
|
|
||||||
plugins.path.join(paths.noGitDir, 'test.html')
|
|
||||||
);
|
|
||||||
const fs = await import('fs');
|
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;
|
return resultDeferred.promise;
|
||||||
|
|||||||
@@ -5,4 +5,4 @@ export const packageDir = plugins.path.join(
|
|||||||
'../'
|
'../'
|
||||||
);
|
);
|
||||||
export const noGitDir = plugins.path.join(packageDir, './.nogit');
|
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
|
// node native
|
||||||
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
export { path };
|
export { fs, path };
|
||||||
|
|
||||||
// @pushrocks scope
|
// @pushrocks scope
|
||||||
import * as smartdelay from '@push.rocks/smartdelay';
|
import * as smartdelay from '@push.rocks/smartdelay';
|
||||||
import * as smartfile from '@push.rocks/smartfile';
|
|
||||||
import * as smartpuppeteer from '@push.rocks/smartpuppeteer';
|
import * as smartpuppeteer from '@push.rocks/smartpuppeteer';
|
||||||
import * as smartpath from '@push.rocks/smartpath';
|
import * as smartpath from '@push.rocks/smartpath';
|
||||||
import * as smartpromise from '@push.rocks/smartpromise';
|
import * as smartpromise from '@push.rocks/smartpromise';
|
||||||
import * as smarttime from '@push.rocks/smarttime';
|
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",
|
"target": "ES2022",
|
||||||
"module": "NodeNext",
|
"module": "NodeNext",
|
||||||
"moduleResolution": "NodeNext",
|
"moduleResolution": "NodeNext",
|
||||||
|
"noImplicitAny": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"verbatimModuleSyntax": true
|
"verbatimModuleSyntax": true,
|
||||||
|
"types": ["node"]
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"dist_*/**/*.d.ts"
|
"dist_*/**/*.d.ts"
|
||||||
|
|||||||
Reference in New Issue
Block a user