Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
c36459dfcc | |||
36903d2d6c | |||
c54493ddbc | |||
e98f109dcc | |||
32704386ee | |||
8ec3d593c1 |
15
changelog.md
15
changelog.md
@ -1,5 +1,20 @@
|
||||
# Changelog
|
||||
|
||||
## 2024-11-06 - 5.5.0 - feat(tapnodetools)
|
||||
Add TestFileProvider for handling Docker Alpine image
|
||||
|
||||
- Introduced TestFileProvider in TapNodeTools.
|
||||
- Added method to retrieve Docker Alpine image as a local tarball.
|
||||
|
||||
## 2024-11-06 - 5.4.4 - fix(dependencies)
|
||||
Update smarts3 dependency to version 2.2.5
|
||||
|
||||
|
||||
## 2024-11-06 - 5.4.3 - fix(TapNodeTools)
|
||||
Fix server port default value in createSmarts3 method
|
||||
|
||||
- The `createSmarts3` method in `TapNodeTools` now explicitly sets the port to 3003.
|
||||
|
||||
## 2024-11-06 - 5.4.2 - fix(dependencies)
|
||||
Update smarts3 dependency version to fix issues.
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@push.rocks/tapbundle",
|
||||
"private": false,
|
||||
"version": "5.4.2",
|
||||
"version": "5.5.0",
|
||||
"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",
|
||||
@ -31,10 +31,13 @@
|
||||
"@push.rocks/smartdelay": "^3.0.5",
|
||||
"@push.rocks/smartenv": "^5.0.12",
|
||||
"@push.rocks/smartexpect": "^1.2.1",
|
||||
"@push.rocks/smartfile": "^11.0.21",
|
||||
"@push.rocks/smartjson": "^5.0.20",
|
||||
"@push.rocks/smartmongo": "^2.0.10",
|
||||
"@push.rocks/smartpath": "^5.0.18",
|
||||
"@push.rocks/smartpromise": "^4.0.4",
|
||||
"@push.rocks/smarts3": "^2.2.2",
|
||||
"@push.rocks/smartrequest": "^2.0.23",
|
||||
"@push.rocks/smarts3": "^2.2.5",
|
||||
"@push.rocks/smartshell": "^3.0.6",
|
||||
"@push.rocks/smarttime": "^4.0.8"
|
||||
},
|
||||
|
33
pnpm-lock.yaml
generated
33
pnpm-lock.yaml
generated
@ -26,18 +26,27 @@ dependencies:
|
||||
'@push.rocks/smartexpect':
|
||||
specifier: ^1.2.1
|
||||
version: 1.2.1
|
||||
'@push.rocks/smartfile':
|
||||
specifier: ^11.0.21
|
||||
version: 11.0.21
|
||||
'@push.rocks/smartjson':
|
||||
specifier: ^5.0.20
|
||||
version: 5.0.20
|
||||
'@push.rocks/smartmongo':
|
||||
specifier: ^2.0.10
|
||||
version: 2.0.10(@aws-sdk/client-sso-oidc@3.682.0)
|
||||
'@push.rocks/smartpath':
|
||||
specifier: ^5.0.18
|
||||
version: 5.0.18
|
||||
'@push.rocks/smartpromise':
|
||||
specifier: ^4.0.4
|
||||
version: 4.0.4
|
||||
'@push.rocks/smartrequest':
|
||||
specifier: ^2.0.23
|
||||
version: 2.0.23
|
||||
'@push.rocks/smarts3':
|
||||
specifier: ^2.2.2
|
||||
version: 2.2.2
|
||||
specifier: ^2.2.5
|
||||
version: 2.2.5
|
||||
'@push.rocks/smartshell':
|
||||
specifier: ^3.0.6
|
||||
version: 3.0.6
|
||||
@ -108,7 +117,7 @@ packages:
|
||||
'@push.rocks/smartopen': 2.0.0
|
||||
'@push.rocks/smartpath': 5.0.18
|
||||
'@push.rocks/smartpromise': 4.0.4
|
||||
'@push.rocks/smartrequest': 2.0.22
|
||||
'@push.rocks/smartrequest': 2.0.23
|
||||
'@push.rocks/smartrx': 3.0.7
|
||||
'@push.rocks/smartsitemap': 2.0.3
|
||||
'@push.rocks/smartstream': 3.2.4
|
||||
@ -1733,7 +1742,7 @@ packages:
|
||||
'@push.rocks/smartfile': 10.0.41
|
||||
'@push.rocks/smartpath': 5.0.18
|
||||
'@push.rocks/smartpromise': 4.0.4
|
||||
'@push.rocks/smartrequest': 2.0.22
|
||||
'@push.rocks/smartrequest': 2.0.23
|
||||
'@push.rocks/smartrx': 3.0.7
|
||||
'@push.rocks/smartstream': 2.0.8
|
||||
'@push.rocks/smartunique': 3.0.9
|
||||
@ -1903,7 +1912,7 @@ packages:
|
||||
'@push.rocks/smartmime': 1.0.6
|
||||
'@push.rocks/smartpath': 5.0.18
|
||||
'@push.rocks/smartpromise': 4.0.4
|
||||
'@push.rocks/smartrequest': 2.0.22
|
||||
'@push.rocks/smartrequest': 2.0.23
|
||||
'@push.rocks/smartstream': 2.0.8
|
||||
'@types/fs-extra': 11.0.4
|
||||
'@types/glob': 8.1.0
|
||||
@ -1924,7 +1933,7 @@ packages:
|
||||
'@push.rocks/smartmime': 2.0.2
|
||||
'@push.rocks/smartpath': 5.0.18
|
||||
'@push.rocks/smartpromise': 4.0.4
|
||||
'@push.rocks/smartrequest': 2.0.22
|
||||
'@push.rocks/smartrequest': 2.0.23
|
||||
'@push.rocks/smartstream': 3.2.4
|
||||
'@types/fs-extra': 11.0.4
|
||||
'@types/glob': 8.1.0
|
||||
@ -1937,7 +1946,7 @@ packages:
|
||||
resolution: {integrity: sha512-J23q84f1O+TwFGmd4lrO9XLHUh2DaLXo9PN/9VmTWYzTkQDv5JehmifXVI0esophXcCIfbdIu6hbt7/aHlDF4A==}
|
||||
dependencies:
|
||||
'@push.rocks/smartpromise': 4.0.4
|
||||
'@push.rocks/smartrequest': 2.0.22
|
||||
'@push.rocks/smartrequest': 2.0.23
|
||||
|
||||
/@push.rocks/smarthash@3.0.4:
|
||||
resolution: {integrity: sha512-HJ/fSx41jm0CvSaqMLa6b2nuNK5rHAqAeAq3dAB7Sq9BCPm2M0J5ZVDTzEAH8pS91XYniUiwuE0jwPERNn9hmw==}
|
||||
@ -2063,7 +2072,7 @@ packages:
|
||||
'@push.rocks/smartfile': 10.0.41
|
||||
'@push.rocks/smartpath': 5.0.18
|
||||
'@push.rocks/smartpromise': 4.0.4
|
||||
'@push.rocks/smartrequest': 2.0.22
|
||||
'@push.rocks/smartrequest': 2.0.23
|
||||
'@push.rocks/smarttime': 4.0.8
|
||||
'@push.rocks/smartversion': 3.0.5
|
||||
package-json: 8.1.1
|
||||
@ -2137,8 +2146,8 @@ packages:
|
||||
- utf-8-validate
|
||||
dev: true
|
||||
|
||||
/@push.rocks/smartrequest@2.0.22:
|
||||
resolution: {integrity: sha512-EfgmdEsLtDJ8aNOLOh59ca1NMsiiFz54aoHRigQFQ0cuoUs6phxejIY2FdMoPFn68ubTpkztdL2P4L1/cRYyHg==}
|
||||
/@push.rocks/smartrequest@2.0.23:
|
||||
resolution: {integrity: sha512-y+gtOwXFpmPL+mIQblYPdFuHufxHi5lMV0LKm5bPYgGdMq3/+QlnEqNEAumeMHjvXgxur7x30QiHSwpJGK5g9w==}
|
||||
dependencies:
|
||||
'@push.rocks/smartpromise': 4.0.4
|
||||
'@push.rocks/smarturl': 3.1.0
|
||||
@ -2159,8 +2168,8 @@ packages:
|
||||
'@push.rocks/smartpromise': 4.0.4
|
||||
rxjs: 7.8.1
|
||||
|
||||
/@push.rocks/smarts3@2.2.2:
|
||||
resolution: {integrity: sha512-H1dou6JrSkrwx6Y/szuOlnARGSSuZTSL2rLnJqg93/vp6GjLPQqI4+zEkuIO+3fAoQH0hRYvc0/DPhalKWJA2A==}
|
||||
/@push.rocks/smarts3@2.2.5:
|
||||
resolution: {integrity: sha512-OZjD0jBCUTJCLnwraxBcyZ3he5buXf2OEM1zipiTBChA2EcKUZWKk/a6KR5WT+NlFCIIuB23UG+U+cxsIWM91Q==}
|
||||
dependencies:
|
||||
'@push.rocks/smartbucket': 3.0.23
|
||||
'@push.rocks/smartfile': 11.0.21
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/tapbundle',
|
||||
version: '5.4.2',
|
||||
version: '5.5.0',
|
||||
description: 'A test automation library bundling utilities and tools for TAP (Test Anything Protocol) based testing, specifically tailored for tapbuffer.'
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
import { TestFileProvider } from './classes.testfileprovider.js';
|
||||
import * as plugins from './plugins.js';
|
||||
|
||||
class TapNodeTools {
|
||||
private smartshellInstance: plugins.smartshell.Smartshell;
|
||||
public testFileProvider = new TestFileProvider();
|
||||
|
||||
constructor() {}
|
||||
|
||||
@ -85,6 +87,7 @@ class TapNodeTools {
|
||||
public async createSmarts3() {
|
||||
const smarts3Mod = await import('@push.rocks/smarts3');
|
||||
const smarts3Instance = new smarts3Mod.Smarts3({
|
||||
port: 3003,
|
||||
cleanSlate: true,
|
||||
});
|
||||
await smarts3Instance.start();
|
||||
|
17
ts_node/classes.testfileprovider.ts
Normal file
17
ts_node/classes.testfileprovider.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import * as plugins from './plugins.js';
|
||||
import * as paths from './paths.js';
|
||||
|
||||
export const fileUrls = {
|
||||
dockerAlpineImage: 'https://code.foss.global/testassets/docker/raw/branch/main/alpine.tar',
|
||||
}
|
||||
|
||||
export class TestFileProvider {
|
||||
public async getDockerAlpineImageAsLocalTarball(): Promise<string> {
|
||||
const filePath = plugins.path.join(paths.testFilesDir, 'alpine.tar')
|
||||
// fetch the docker alpine image
|
||||
const response = await plugins.smartrequest.getBinary(fileUrls.dockerAlpineImage);
|
||||
await plugins.smartfile.fs.ensureDir(paths.testFilesDir);
|
||||
const AlpineBuffer = await plugins.smartfile.memory.toFs(response.body, filePath);
|
||||
return filePath;
|
||||
}
|
||||
}
|
4
ts_node/paths.ts
Normal file
4
ts_node/paths.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import * as plugins from './plugins.js';
|
||||
|
||||
export const cwd = process.cwd();
|
||||
export const testFilesDir = plugins.path.join(cwd, './.nogit/testfiles/');
|
@ -1,12 +1,16 @@
|
||||
// node native
|
||||
import * as crypto from 'crypto';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
export { crypto,fs };
|
||||
export { crypto,fs, path, };
|
||||
|
||||
// @push.rocks scope
|
||||
import * as qenv from '@push.rocks/qenv';
|
||||
import * as smartcrypto from '@push.rocks/smartcrypto';
|
||||
import * as smartfile from '@push.rocks/smartfile';
|
||||
import * as smartpath from '@push.rocks/smartpath';
|
||||
import * as smartrequest from '@push.rocks/smartrequest';
|
||||
import * as smartshell from '@push.rocks/smartshell';
|
||||
|
||||
export { qenv, smartcrypto, smartshell };
|
||||
export { qenv, smartcrypto, smartfile, smartpath, smartrequest, smartshell, };
|
||||
|
Reference in New Issue
Block a user