fix(core): update

This commit is contained in:
Philipp Kunz 2023-05-01 14:38:53 +02:00
parent cc5f93305b
commit e87833c59f
15 changed files with 4538 additions and 26593 deletions

View File

@ -12,40 +12,36 @@ stages:
- release
- metadata
before_script:
- pnpm install -g pnpm
- pnpm install -g @shipzone/npmci
- npmci npm prepare
# ====================
# security stage
# ====================
# ====================
# security stage
# ====================
mirror:
stage: security
script:
- npmci git mirror
only:
- tags
tags:
- lossless
- docker
- notpriv
auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --production --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=prod --production
- npmci command npm config set registry https://registry.npmjs.org
- npmci command pnpm audit --audit-level=high --prod
tags:
- lossless
- docker
allow_failure: true
auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=dev
- npmci command pnpm audit --audit-level=high --dev
tags:
- lossless
- docker
allow_failure: true
@ -56,7 +52,6 @@ auditDevDependencies:
testStable:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci npm test
@ -67,10 +62,9 @@ testStable:
testBuild:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci command npm run build
- npmci npm build
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
@ -96,10 +90,9 @@ codequality:
only:
- tags
script:
- npmci command npm install -g tslint typescript
- npmci command npm install -g typescript
- npmci npm prepare
- npmci npm install
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
tags:
- lossless
- docker
@ -119,11 +112,9 @@ trigger:
pages:
stage: metadata
script:
- npmci node install lts
- npmci command npm install -g @gitzone/tsdoc
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci command tsdoc
- npmci command npm run buildDocs
tags:
- lossless
- docker

24
.vscode/launch.json vendored
View File

@ -2,28 +2,10 @@
"version": "0.2.0",
"configurations": [
{
"name": "current file",
"type": "node",
"command": "npm test",
"name": "Run npm test",
"request": "launch",
"args": [
"${relativeFile}"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "test.ts",
"type": "node",
"request": "launch",
"args": [
"test/test.ts"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
"type": "node-terminal"
}
]
}

View File

@ -5,7 +5,7 @@
"githost": "gitlab.com",
"gitscope": "pushrocks",
"gitrepo": "smartssr",
"shortDescription": "a smart server side renderer supporting shadow dom",
"description": "a smart server side renderer supporting shadow dom",
"npmPackagename": "@pushrocks/smartssr",
"license": "MIT",
"projectDomain": "push.rocks"

26499
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -10,23 +10,26 @@
"scripts": {
"test": "(tstest test/ --web)",
"build": "(tsbuild --web)",
"serve": "tsrun scripts/serve.ts"
"serve": "tsrun scripts/serve.ts",
"buildDocs": "tsdoc"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.26",
"@gitzone/tstest": "^1.0.54",
"@pushrocks/smartserve": "^1.1.41",
"@pushrocks/tapbundle": "^3.2.14",
"@types/node": "^16.6.1",
"@gitzone/tsbuild": "^2.1.65",
"@gitzone/tsrun": "^1.2.39",
"@gitzone/tstest": "^1.0.74",
"@pushrocks/smartserve": "^2.0.33",
"@pushrocks/tapbundle": "^5.0.4",
"@types/node": "^18.16.3",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.15.0"
"tslint-config-prettier": "^1.18.0"
},
"dependencies": {
"@pushrocks/smartdelay": "^2.0.13",
"@pushrocks/smartfile": "^8.0.10",
"@pushrocks/smartpromise": "^3.1.6",
"@pushrocks/smartpuppeteer": "^1.0.27",
"@pushrocks/smarttime": "^3.0.38"
"@pushrocks/smartdelay": "^3.0.1",
"@pushrocks/smartfile": "^10.0.7",
"@pushrocks/smartpath": "^5.0.5",
"@pushrocks/smartpromise": "^4.0.2",
"@pushrocks/smartpuppeteer": "^2.0.2",
"@pushrocks/smarttime": "^4.0.1"
},
"files": [
"ts/**/*",
@ -42,5 +45,6 @@
],
"browserslist": [
"last 1 chrome versions"
]
}
],
"type": "module"
}

4467
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,6 @@ Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](htt
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@pushrocks/smartssr)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smartssr)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/smartssr)](https://lossless.cloud)
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
## Usage
@ -33,7 +32,6 @@ We are always happy for code contributions. If you are not the code contributing
For further information read the linked docs at the top of this readme.
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
## Legal
> MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)

View File

@ -1,5 +1,5 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as smartssr from '../ts/index';
import * as smartssr from '../ts/index.js';
let testSSRInstance: smartssr.SmartSSR;

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@pushrocks/smartssr',
version: '1.0.36',
description: 'a smart server side renderer supporting shadow dom'
}

View File

@ -1 +1 @@
export * from './smartssr.classes.smartssr';
export * from './smartssr.classes.smartssr.js';

View File

@ -1,7 +1,7 @@
import * as plugins from './smartssr.plugins';
import * as paths from './smartssr.paths';
import * as plugins from './smartssr.plugins.js';
import * as paths from './smartssr.paths.js';
import { serializeFunction } from './smartssr.function.serialize';
import { serializeFunction } from './smartssr.function.serialize.js';
export interface ISmartSSROptions {
debug: boolean;
@ -53,9 +53,9 @@ export class SmartSSR {
});
if (this.options.debug) {
screenshotBuffer = await page.screenshot({
screenshotBuffer = (await page.screenshot({
encoding: 'binary',
}) as Buffer;
})) as Buffer;
}
await page.$eval('body', serializeFunction);

View File

@ -1,5 +1,5 @@
import * as plugins from './smartssr.plugins';
import * as plugins from './smartssr.plugins.js';
export const packageDir = plugins.path.join(__dirname, '../');
export const packageDir = plugins.path.join(plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url), '../');
export const noGitDir = plugins.path.join(packageDir, './.nogit');
plugins.smartfile.fs.ensureDirSync(noGitDir);

View File

@ -7,7 +7,8 @@ export { path };
import * as smartdelay from '@pushrocks/smartdelay';
import * as smartfile from '@pushrocks/smartfile';
import * as smartpuppeteer from '@pushrocks/smartpuppeteer';
import * as smartpath from '@pushrocks/smartpath';
import * as smartpromise from '@pushrocks/smartpromise';
import * as smarttime from '@pushrocks/smarttime';
export { smartdelay, smartfile, smartpuppeteer, smartpromise, smarttime };
export { smartdelay, smartfile, smartpath, smartpuppeteer, smartpromise, smarttime };

10
tsconfig.json Normal file
View File

@ -0,0 +1,10 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "nodenext",
"esModuleInterop": true
}
}

View File

@ -1,17 +0,0 @@
{
"extends": ["tslint:latest", "tslint-config-prettier"],
"rules": {
"semicolon": [true, "always"],
"no-console": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"member-ordering": {
"options":{
"order": [
"static-method"
]
}
}
},
"defaultSeverity": "warning"
}