Compare commits

...

8 Commits

Author SHA1 Message Date
7ef17f9c41 5.5.1
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2024-11-23 18:34:34 +01:00
aa8dcb734e fix(core): Update dependencies and add jestExpect export 2024-11-23 18:34:34 +01:00
c36459dfcc 5.5.0
Some checks failed
Default (tags) / security (push) Failing after 1s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2024-11-06 21:07:05 +01:00
36903d2d6c feat(tapnodetools): Add TestFileProvider for handling Docker Alpine image 2024-11-06 21:07:05 +01:00
c54493ddbc 5.4.4
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2024-11-06 17:15:28 +01:00
e98f109dcc fix(dependencies): Update smarts3 dependency to version 2.2.5 2024-11-06 17:15:28 +01:00
32704386ee 5.4.3
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2024-11-06 03:16:45 +01:00
8ec3d593c1 fix(TapNodeTools): Fix server port default value in createSmarts3 method 2024-11-06 03:16:44 +01:00
9 changed files with 5488 additions and 3875 deletions

View File

@ -1,5 +1,28 @@
# Changelog
## 2024-11-23 - 5.5.1 - fix(core)
Update dependencies and add jestExpect export
- Updated '@push.rocks/qenv' to '^6.1.0' in dependencies.
- Updated 'expect' package version to '^29.7.0' in dependencies.
- Updated '@types/node' to '^22.9.3' in devDependencies.
- Added jestExpect export in ts_node/index.ts.
## 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.

View File

@ -1,7 +1,7 @@
{
"name": "@push.rocks/tapbundle",
"private": false,
"version": "5.4.2",
"version": "5.5.1",
"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,23 +26,27 @@
"dependencies": {
"@open-wc/testing": "^4.0.0",
"@push.rocks/consolecolor": "^2.0.2",
"@push.rocks/qenv": "^6.0.5",
"@push.rocks/qenv": "^6.1.0",
"@push.rocks/smartcrypto": "^2.0.4",
"@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"
"@push.rocks/smarttime": "^4.0.8",
"expect": "^29.7.0"
},
"devDependencies": {
"@git.zone/tsbuild": "^2.1.66",
"@git.zone/tsrun": "^1.2.43",
"@git.zone/tstest": "^1.0.77",
"@types/node": "^22.5.5",
"@types/node": "^22.9.3",
"randomstring": "^1.3.0"
},
"files": [

9288
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -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();

View 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;
}
}

View File

@ -1 +1,5 @@
export * from './classes.tapnodetools.js';
import { expect as jestExpect } from 'expect';
export { jestExpect };

4
ts_node/paths.ts Normal file
View 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/');

View File

@ -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, };