fix(core): update

This commit is contained in:
Philipp Kunz 2024-05-25 02:15:08 +02:00
parent 0d60b29ff7
commit 262891ccf3
6 changed files with 4603 additions and 2582 deletions

View File

@ -14,14 +14,14 @@
"buildDocs": "tsdoc"
},
"devDependencies": {
"@api.global/typedserver": "^3.0.29",
"@git.zone/tsbuild": "^2.1.72",
"@api.global/typedserver": "^3.0.44",
"@git.zone/tsbuild": "^2.1.80",
"@git.zone/tsbundle": "^2.0.15",
"@git.zone/tsrun": "^1.2.44",
"@git.zone/tstest": "^1.0.90",
"@push.rocks/smartenv": "^5.0.12",
"@push.rocks/tapbundle": "^5.0.23",
"@types/node": "^20.12.8"
"@types/node": "^20.12.12"
},
"dependencies": {
"@api.global/typedrequest-interfaces": "^3.0.19",

File diff suppressed because it is too large Load Diff

View File

@ -44,4 +44,4 @@ tap.skip.test('test', async (tools) => {
await tools.delayFor(5000);
})
tap.start();
export default tap.start();

View File

@ -106,4 +106,4 @@ tap.test('should end the server', async (toolsArg) => {
setTimeout(() => process.exit(0), 100);
});
tap.start();
export default tap.start();

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@api.global/typedrequest',
version: '3.0.23',
version: '3.0.24',
description: 'A TypeScript library for making typed requests towards APIs, including facilities for handling requests, routing, and virtual stream handling.'
}

View File

@ -1,5 +1,5 @@
import * as plugins from './plugins.js';
import type { TypedRouter } from './typedrequest.classes.typedrouter.js';
import { TypedRouter } from './typedrequest.classes.typedrouter.js';
export interface ICommFunctions {
sendMethod?: (
@ -79,7 +79,11 @@ export class VirtualStream<T = Uint8Array> implements plugins.typedRequestInterf
}
public static decodePayloadFromNetwork(objectPayload: any, commFunctions: ICommFunctions): any {
if (plugins.smartbuffer.isBufferLike(objectPayload)) {
if (
plugins.smartbuffer.isBufferLike(objectPayload)
|| objectPayload instanceof TypedRouter
) {
return objectPayload;
}
if (objectPayload !== null && typeof objectPayload === 'object') {