Compare commits

...

6 Commits

Author SHA1 Message Date
d9aa2984ef 1.0.76 2023-07-13 03:19:12 +02:00
37e6d94c9f fix(core): update 2023-07-13 03:19:11 +02:00
74e1df6824 1.0.75 2022-11-08 08:04:46 +01:00
6eb86c63c3 fix(core): update 2022-11-08 08:04:46 +01:00
e919a4a2e9 1.0.74 2022-11-08 08:03:17 +01:00
85f6703696 fix(core): update 2022-11-08 08:03:17 +01:00
15 changed files with 4804 additions and 13121 deletions

View File

@ -13,31 +13,24 @@ stages:
- metadata - metadata
before_script: before_script:
- npm install -g @shipzone/npmci - pnpm install -g pnpm
- pnpm install -g @shipzone/npmci
- npmci npm prepare
# ==================== # ====================
# security stage # security stage
# ==================== # ====================
mirror: # ====================
stage: security # security stage
script: # ====================
- npmci git mirror
only:
- tags
tags:
- lossless
- docker
- notpriv
auditProductionDependencies: auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security stage: security
script: script:
- npmci npm prepare
- npmci command npm install --production --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org - npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=prod --production - npmci command pnpm audit --audit-level=high --prod
tags: tags:
- lossless
- docker - docker
allow_failure: true allow_failure: true
@ -45,11 +38,10 @@ auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security stage: security
script: script:
- npmci npm prepare
- npmci command npm install --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org - 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: tags:
- lossless
- docker - docker
allow_failure: true allow_failure: true
@ -60,7 +52,6 @@ auditDevDependencies:
testStable: testStable:
stage: test stage: test
script: script:
- npmci npm prepare
- npmci node install stable - npmci node install stable
- npmci npm install - npmci npm install
- npmci npm test - npmci npm test
@ -71,7 +62,6 @@ testStable:
testBuild: testBuild:
stage: test stage: test
script: script:
- npmci npm prepare
- npmci node install stable - npmci node install stable
- npmci npm install - npmci npm install
- npmci command npm run build - npmci command npm run build
@ -100,10 +90,9 @@ codequality:
only: only:
- tags - tags
script: script:
- npmci command npm install -g tslint typescript - npmci command npm install -g typescript
- npmci npm prepare - npmci npm prepare
- npmci npm install - npmci npm install
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
tags: tags:
- lossless - lossless
- docker - docker
@ -123,11 +112,9 @@ trigger:
pages: pages:
stage: metadata stage: metadata
script: script:
- npmci node install lts - npmci node install stable
- npmci command npm install -g @gitzone/tsdoc
- npmci npm prepare
- npmci npm install - npmci npm install
- npmci command tsdoc - npmci command npm run buildDocs
tags: tags:
- lossless - lossless
- docker - docker

View File

@ -1,3 +0,0 @@
# How to contribute
Start with `tstest.classes.tstest.ts` to understand whats happening

13032
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "@gitzone/tstest", "name": "@gitzone/tstest",
"version": "1.0.73", "version": "1.0.76",
"private": false, "private": false,
"description": "a test utility to run tests that match test/**/*.ts", "description": "a test utility to run tests that match test/**/*.ts",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
@ -16,27 +16,26 @@
"prepareTest": "git clone https://gitlab.com/sandboxzone/sandbox-npmts.git .nogit/sandbox-npmts && cd .nogit/sandbox-npmts && npm install", "prepareTest": "git clone https://gitlab.com/sandboxzone/sandbox-npmts.git .nogit/sandbox-npmts && cd .nogit/sandbox-npmts && npm install",
"tstest": "cd .nogit/sandbox-npmts && node ../../cli.ts.js test/ --web", "tstest": "cd .nogit/sandbox-npmts && node ../../cli.ts.js test/ --web",
"cleanUp": "rm -rf .nogit/sandbox-npmts", "cleanUp": "rm -rf .nogit/sandbox-npmts",
"build": "(tsbuild --web --allowimplicitany)" "build": "(tsbuild --web --allowimplicitany --skiplibcheck)",
"buildDocs": "tsdoc"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.65", "@gitzone/tsbuild": "^2.1.66",
"tslint": "^6.1.3", "@types/node": "^20.4.2"
"tslint-config-prettier": "^1.18.0"
}, },
"dependencies": { "dependencies": {
"@gitzone/tsbundle": "^2.0.6", "@apiglobal/typedserver": "^2.0.65",
"@gitzone/tsrun": "^1.2.37", "@gitzone/tsbundle": "^2.0.8",
"@pushrocks/consolecolor": "^2.0.1", "@gitzone/tsrun": "^1.2.43",
"@pushrocks/smartbrowser": "^2.0.2", "@push.rocks/consolecolor": "^2.0.1",
"@pushrocks/smartdelay": "^2.0.13", "@push.rocks/smartbrowser": "^2.0.5",
"@pushrocks/smartexpress": "^4.0.21", "@push.rocks/smartdelay": "^3.0.2",
"@pushrocks/smartfile": "^10.0.4", "@push.rocks/smartfile": "^10.0.28",
"@pushrocks/smartlog": "^3.0.1", "@push.rocks/smartlog": "^3.0.3",
"@pushrocks/smartpromise": "^3.1.7", "@push.rocks/smartpromise": "^4.0.3",
"@pushrocks/smartshell": "^2.0.30", "@push.rocks/smartshell": "^3.0.3",
"@pushrocks/tapbundle": "^5.0.4", "@push.rocks/tapbundle": "^5.0.12",
"@types/figures": "^3.0.1", "figures": "^5.0.0"
"figures": "^4.0.1"
}, },
"files": [ "files": [
"ts/**/*", "ts/**/*",

4733
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
import { expect, tap } from '@pushrocks/tapbundle'; import { expect, tap } from '@push.rocks/tapbundle';
import * as tstest from '../ts/index.js'; import * as tstest from '../ts/index.js';
tap.test('prepare test', async () => {}); tap.test('prepare test', async () => {});

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@gitzone/tstest', name: '@gitzone/tstest',
version: '1.0.73', version: '1.0.76',
description: 'a test utility to run tests that match test/**/*.ts' description: 'a test utility to run tests that match test/**/*.ts'
} }

View File

@ -2,7 +2,7 @@
// combines different tap test files to an overall result // combines different tap test files to an overall result
// ============ // ============
import * as plugins from './tstest.plugins.js'; import * as plugins from './tstest.plugins.js';
import { coloredString as cs } from '@pushrocks/consolecolor'; import { coloredString as cs } from '@push.rocks/consolecolor';
import { TapParser } from './tstest.classes.tap.parser.js'; import { TapParser } from './tstest.classes.tap.parser.js';
import * as logPrefixes from './tstest.logprefixes.js'; import * as logPrefixes from './tstest.logprefixes.js';

View File

@ -1,5 +1,5 @@
import { ChildProcess } from 'child_process'; import { ChildProcess } from 'child_process';
import { coloredString as cs } from '@pushrocks/consolecolor'; import { coloredString as cs } from '@push.rocks/consolecolor';
// ============ // ============
// combines different tap test files to an overall result // combines different tap test files to an overall result

View File

@ -1,6 +1,6 @@
import * as plugins from './tstest.plugins.js'; import * as plugins from './tstest.plugins.js';
import * as paths from './tstest.paths.js'; import * as paths from './tstest.paths.js';
import { Smartfile } from '@pushrocks/smartfile'; import { Smartfile } from '@push.rocks/smartfile';
// tap related stuff // tap related stuff
import { TapCombinator } from './tstest.classes.tap.combinator.js'; import { TapCombinator } from './tstest.classes.tap.combinator.js';

View File

@ -2,7 +2,7 @@ import * as plugins from './tstest.plugins.js';
import * as paths from './tstest.paths.js'; import * as paths from './tstest.paths.js';
import * as logPrefixes from './tstest.logprefixes.js'; import * as logPrefixes from './tstest.logprefixes.js';
import { coloredString as cs } from '@pushrocks/consolecolor'; import { coloredString as cs } from '@push.rocks/consolecolor';
import { TestDirectory } from './tstest.classes.testdirectory.js'; import { TestDirectory } from './tstest.classes.testdirectory.js';
import { TapCombinator } from './tstest.classes.tap.combinator.js'; import { TapCombinator } from './tstest.classes.tap.combinator.js';
@ -45,11 +45,11 @@ export class TsTest {
); );
console.log('!!!!!!!!!!!'); console.log('!!!!!!!!!!!');
break; break;
case (fileNameArg.endsWith('.browser.ts') || fileNameArg.endsWith('.browser.nonci.ts' )): case fileNameArg.endsWith('.browser.ts') || fileNameArg.endsWith('.browser.nonci.ts'):
const tapParserBrowser = await this.runInChrome(fileNameArg); const tapParserBrowser = await this.runInChrome(fileNameArg);
tapCombinator.addTapParser(tapParserBrowser); tapCombinator.addTapParser(tapParserBrowser);
break; break;
case (fileNameArg.endsWith('.both.ts') || fileNameArg.endsWith('.both.nonci.ts')): case fileNameArg.endsWith('.both.ts') || fileNameArg.endsWith('.both.nonci.ts'):
console.log('>>>>>>> TEST PART 1: chrome'); console.log('>>>>>>> TEST PART 1: chrome');
const tapParserBothBrowser = await this.runInChrome(fileNameArg); const tapParserBothBrowser = await this.runInChrome(fileNameArg);
tapCombinator.addTapParser(tapParserBothBrowser); tapCombinator.addTapParser(tapParserBothBrowser);
@ -101,17 +101,17 @@ export class TsTest {
// lets bundle the test // lets bundle the test
await plugins.smartfile.fs.ensureEmptyDir(tsbundleCacheDirPath); await plugins.smartfile.fs.ensureEmptyDir(tsbundleCacheDirPath);
await this.tsbundleInstance.build(process.cwd(), fileNameArg, bundleFilePath, { await this.tsbundleInstance.build(process.cwd(), fileNameArg, bundleFilePath, {
bundler: 'esbuild' bundler: 'esbuild',
}); });
// lets create a server // lets create a server
const server = new plugins.smartexpress.Server({ const server = new plugins.typedserver.servertools.Server({
cors: true, cors: true,
port: 3007, port: 3007,
}); });
server.addRoute( server.addRoute(
'/test', '/test',
new plugins.smartexpress.Handler('GET', async (req, res) => { new plugins.typedserver.servertools.Handler('GET', async (req, res) => {
res.type('.html'); res.type('.html');
res.write(` res.write(`
<html> <html>
@ -126,7 +126,7 @@ export class TsTest {
res.end(); res.end();
}) })
); );
server.addRoute('*', new plugins.smartexpress.HandlerStatic(tsbundleCacheDirPath)); server.addRoute('*', new plugins.typedserver.servertools.HandlerStatic(tsbundleCacheDirPath));
await server.start(); await server.start();
// lets do the browser bit // lets do the browser bit

View File

@ -1,5 +1,5 @@
import * as plugins from './tstest.plugins.js'; import * as plugins from './tstest.plugins.js';
import { coloredString as cs } from '@pushrocks/consolecolor'; import { coloredString as cs } from '@push.rocks/consolecolor';
export const TapPrefix = cs(`::TAP::`, 'pink', 'black'); export const TapPrefix = cs(`::TAP::`, 'pink', 'black');
export const TapErrorPrefix = cs(` !!!TAP PROTOCOL ERROR!!! `, 'red', 'black'); export const TapErrorPrefix = cs(` !!!TAP PROTOCOL ERROR!!! `, 'red', 'black');

View File

@ -3,21 +3,26 @@ import * as path from 'path';
export { path }; export { path };
// @pushrocks scope // @apiglobal scope
import * as consolecolor from '@pushrocks/consolecolor'; import * as typedserver from '@apiglobal/typedserver';
import * as smartbrowser from '@pushrocks/smartbrowser';
import * as smartexpress from '@pushrocks/smartexpress'; export {
import * as smartdelay from '@pushrocks/smartdelay'; typedserver
import * as smartfile from '@pushrocks/smartfile'; }
import * as smartlog from '@pushrocks/smartlog';
import * as smartpromise from '@pushrocks/smartpromise'; // @push.rocks scope
import * as smartshell from '@pushrocks/smartshell'; import * as consolecolor from '@push.rocks/consolecolor';
import * as tapbundle from '@pushrocks/tapbundle'; import * as smartbrowser from '@push.rocks/smartbrowser';
import * as smartdelay from '@push.rocks/smartdelay';
import * as smartfile from '@push.rocks/smartfile';
import * as smartlog from '@push.rocks/smartlog';
import * as smartpromise from '@push.rocks/smartpromise';
import * as smartshell from '@push.rocks/smartshell';
import * as tapbundle from '@push.rocks/tapbundle';
export { export {
consolecolor, consolecolor,
smartbrowser, smartbrowser,
smartexpress,
smartdelay, smartdelay,
smartfile, smartfile,
smartlog, smartlog,

11
tsconfig.json Normal file
View File

@ -0,0 +1,11 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "nodenext",
"esModuleInterop": true,
"verbatimModuleSyntax": 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"
}