feat(smartstream): bump dependencies, update build/publish config, refactor tests, and overhaul documentation

This commit is contained in:
2026-02-28 08:48:58 +00:00
parent 3d13cb76f6
commit 9b9b1be62b
15 changed files with 5720 additions and 1756 deletions

View File

@@ -1,5 +1,5 @@
import { expect, tap } from '@push.rocks/tapbundle';
import * as smartfile from '@push.rocks/smartfile';
import * as fs from 'fs';
import * as smartstream from '../ts/index.js';
@@ -8,7 +8,7 @@ let testIntake: smartstream.StreamIntake<string>;
tap.test('should handle a read stream', async (tools) => {
const counter = 0;
const streamWrapper = new smartstream.StreamWrapper([
smartfile.fsStream.createReadStream('./test/assets/readabletext.txt'),
fs.createReadStream('./test/assets/readabletext.txt'),
new smartstream.SmartDuplex({
writeFunction: async (chunkStringArg: Buffer, streamTools) => {
// do something with the stream here
@@ -44,7 +44,7 @@ tap.test('should create a valid Intake', async (tools) => {
}
})
)
.pipe(smartfile.fsStream.createWriteStream('./test/assets/writabletext.txt'));
.pipe(fs.createWriteStream('./test/assets/writabletext.txt'));
const testFinished = tools.defer();
let counter = 0;
testIntake.pushNextObservable.subscribe(() => {
@@ -62,4 +62,4 @@ tap.test('should create a valid Intake', async (tools) => {
testIntake.signalEnd();
});
tap.start();
export default tap.start();