Compare commits

...

6 Commits

6 changed files with 56 additions and 4 deletions

View File

@ -1,5 +1,24 @@
# Changelog
## 2024-09-19 - 5.2.2 - fix(core)
Ensure reliability in test setup and execution
- Added new pre-task functionality to log starting of tasks.
- Enhanced `runCommand` method to better handle shell command execution.
- Fixed issue in `createHttpsCert` to correctly generate self-signed certificates.
## 2024-09-19 - 5.2.1 - fix(tapbundle)
Add qenv package to dependencies for environment management
- Added @push.rocks/qenv to dependencies in package.json.
- Updated TapNodeTools class in ts_node/classes.tapnodetools.ts to include getQenv method.
- Imported qenv in ts_node/plugins.ts.
## 2024-09-18 - 5.2.0 - feat(TapNodeTools)
Add ability to create HTTPS certificates with self-signed option
- Introduced a new parameter `allowSelfSigned` to the `createHttpsCert` function.
## 2024-09-18 - 5.1.4 - fix(ts_node)
Fixed issues in HTTPS certificate generation for TapNodeTools

View File

@ -1,7 +1,7 @@
{
"name": "@push.rocks/tapbundle",
"private": false,
"version": "5.1.4",
"version": "5.2.2",
"description": "A test automation library bundling utilities and tools for TAP (Test Anything Protocol) based testing, specifically tailored for tapbuffer.",
"exports": {
".": "./dist_ts/index.js",
@ -26,6 +26,7 @@
"dependencies": {
"@open-wc/testing": "^4.0.0",
"@push.rocks/consolecolor": "^2.0.2",
"@push.rocks/qenv": "^6.0.5",
"@push.rocks/smartcrypto": "^2.0.4",
"@push.rocks/smartdelay": "^3.0.5",
"@push.rocks/smartenv": "^5.0.12",

21
pnpm-lock.yaml generated
View File

@ -14,6 +14,9 @@ importers:
'@push.rocks/consolecolor':
specifier: ^2.0.2
version: 2.0.2
'@push.rocks/qenv':
specifier: ^6.0.5
version: 6.0.5
'@push.rocks/smartcrypto':
specifier: ^2.0.4
version: 2.0.4
@ -91,6 +94,9 @@ packages:
'@cloudflare/workers-types@4.20240909.0':
resolution: {integrity: sha512-4knwtX6efxIsIxawdmPyynU9+S8A78wntU8eUIEldStWP4gNgxGkeWcfCMXulTx8oxr3DU4aevHyld9HGV8VKQ==}
'@configvault.io/interfaces@1.0.17':
resolution: {integrity: sha512-bEcCUR2VBDJsTin8HQh8Uw/mlYl2v8A3jMIaQ+MTB9Hrqd6CZL2dL7iJdWyFl/3EIX+LDxWFR+Oq7liIq7w+1Q==}
'@cspotcode/source-map-support@0.8.1':
resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==}
engines: {node: '>=12'}
@ -349,6 +355,9 @@ packages:
'@push.rocks/lik@6.0.15':
resolution: {integrity: sha512-rZxln6l4NAU931MTxnsjy1pue+S3AXtDCidHH/tbkqBtrWIzWuXduo6Nz3zYkndbD64Knyta7F60JRvcOe4XqA==}
'@push.rocks/qenv@6.0.5':
resolution: {integrity: sha512-Id/eSKKqSDUGe+0Cp5HEJ58J1iVv1jQseLUMs9kFTPYwG+NJSETUCRsJV50w5cPv8bRFcSkSU+xVbUbOc1p29A==}
'@push.rocks/smartbrowser@2.0.6':
resolution: {integrity: sha512-Ne+KCVhV/DROc1rHRRw59K6h0+LpQAK9fdOUtgDZ7laLPmB/tmnbUh3IuRDNcIY1iVA9pydoobwjnTjVgio9eQ==}
@ -3117,6 +3126,10 @@ snapshots:
'@cloudflare/workers-types@4.20240909.0': {}
'@configvault.io/interfaces@1.0.17':
dependencies:
'@api.global/typedrequest-interfaces': 3.0.19
'@cspotcode/source-map-support@0.8.1':
dependencies:
'@jridgewell/trace-mapping': 0.3.9
@ -3422,6 +3435,14 @@ snapshots:
'@types/symbol-tree': 3.2.5
symbol-tree: 3.2.4
'@push.rocks/qenv@6.0.5':
dependencies:
'@api.global/typedrequest': 3.0.32
'@configvault.io/interfaces': 1.0.17
'@push.rocks/smartfile': 11.0.21
'@push.rocks/smartlog': 3.0.7
'@push.rocks/smartpath': 5.0.18
'@push.rocks/smartbrowser@2.0.6':
dependencies:
'@push.rocks/smartdelay': 3.0.5

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/tapbundle',
version: '5.1.4',
version: '5.2.2',
description: 'A test automation library bundling utilities and tools for TAP (Test Anything Protocol) based testing, specifically tailored for tapbuffer.'
}

View File

@ -5,6 +5,10 @@ class TapNodeTools {
constructor() {}
public async getQenv(): Promise<plugins.qenv.Qenv> {
return new plugins.qenv.Qenv('./', '.nogit/');
}
public async runCommand(commandArg: string): Promise<any> {
if (!this.smartshellInstance) {
this.smartshellInstance = new plugins.smartshell.Smartshell({
@ -16,8 +20,14 @@ class TapNodeTools {
}
public async createHttpsCert(
commonName: string = 'localhost'
commonName: string = 'localhost',
allowSelfSigned: boolean = true
): Promise<{ key: string; cert: string }> {
if (allowSelfSigned) {
// set node to allow self-signed certificates
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
}
// Generate a key pair
const keys = plugins.smartcrypto.nodeForge.pki.rsa.generateKeyPair(2048);

View File

@ -5,7 +5,8 @@ import * as fs from 'fs';
export { crypto,fs };
// @push.rocks scope
import * as qenv from '@push.rocks/qenv';
import * as smartcrypto from '@push.rocks/smartcrypto';
import * as smartshell from '@push.rocks/smartshell';
export { smartcrypto, smartshell };
export { qenv, smartcrypto, smartshell };