diff --git a/package.json b/package.json index 9c65f5a..94d2aa4 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "@push.rocks/lik": "^6.0.15", "@push.rocks/smartbuffer": "^3.0.4", "@push.rocks/smartdelay": "^3.0.5", + "@push.rocks/smartguard": "^3.0.1", "@push.rocks/smartpromise": "^4.0.3", "@push.rocks/webrequest": "^3.0.37", "@push.rocks/webstream": "^1.0.8" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4622421..588b417 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,6 +23,9 @@ importers: '@push.rocks/smartdelay': specifier: ^3.0.5 version: 3.0.5 + '@push.rocks/smartguard': + specifier: ^3.0.1 + version: 3.0.1 '@push.rocks/smartpromise': specifier: ^4.0.3 version: 4.0.3 @@ -391,6 +394,9 @@ packages: '@push.rocks/smartfile@11.0.15': resolution: {integrity: sha512-6qalAzdFTsWrx7hLBI9/a6RxpdMnRFJ8HMAGsQWeSUIIS8FxuvE357T9u89U0UM6pt0g1FUVZfks3MMd4uW8Fw==} + '@push.rocks/smartguard@3.0.1': + resolution: {integrity: sha512-+Ce/nnR3x+185N1BMFrZSF1sRA5vhaPqFQNxyGwWssUSd1YF38kNM+hoFGfaxGcL+I/ILHjMN2oLqTvbmTqCFA==} + '@push.rocks/smarthash@3.0.4': resolution: {integrity: sha512-HJ/fSx41jm0CvSaqMLa6b2nuNK5rHAqAeAq3dAB7Sq9BCPm2M0J5ZVDTzEAH8pS91XYniUiwuE0jwPERNn9hmw==} @@ -3484,6 +3490,11 @@ snapshots: glob: 10.4.1 js-yaml: 4.1.0 + '@push.rocks/smartguard@3.0.1': + dependencies: + '@push.rocks/smartpromise': 4.0.3 + '@push.rocks/smartrequest': 2.0.22 + '@push.rocks/smarthash@3.0.4': dependencies: '@push.rocks/smartjson': 5.0.19 diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index e990636..4814190 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@api.global/typedrequest', - version: '3.0.25', + version: '3.0.26', description: 'A TypeScript library for making typed requests towards APIs, including facilities for handling requests, routing, and virtual stream handling.' } diff --git a/ts/typedrequest.classes.typedhandler.ts b/ts/classes.typedhandler.ts similarity index 94% rename from ts/typedrequest.classes.typedhandler.ts rename to ts/classes.typedhandler.ts index 6809b4b..e6e64cc 100644 --- a/ts/typedrequest.classes.typedhandler.ts +++ b/ts/classes.typedhandler.ts @@ -1,5 +1,5 @@ import * as plugins from './plugins.js'; -import { TypedResponseError } from './typedrequest.classes.typedresponseerror.js'; +import { TypedResponseError } from './classes.typedresponseerror.js'; export type THandlerFunction = ( requestArg: T['request'] diff --git a/ts/typedrequest.classes.typedrequest.ts b/ts/classes.typedrequest.ts similarity index 91% rename from ts/typedrequest.classes.typedrequest.ts rename to ts/classes.typedrequest.ts index 98c8ff7..99c6bb6 100644 --- a/ts/typedrequest.classes.typedrequest.ts +++ b/ts/classes.typedrequest.ts @@ -1,8 +1,8 @@ import * as plugins from './plugins.js'; -import { VirtualStream } from './typedrequest.classes.virtualstream.js'; -import { TypedResponseError } from './typedrequest.classes.typedresponseerror.js'; -import { TypedRouter } from './typedrequest.classes.typedrouter.js'; -import { TypedTarget } from './typedrequest.classes.typedtarget.js'; +import { VirtualStream } from './classes.virtualstream.js'; +import { TypedResponseError } from './classes.typedresponseerror.js'; +import { TypedRouter } from './classes.typedrouter.js'; +import { TypedTarget } from './classes.typedtarget.js'; const webrequestInstance = new plugins.webrequest.WebRequest(); diff --git a/ts/typedrequest.classes.typedresponseerror.ts b/ts/classes.typedresponseerror.ts similarity index 100% rename from ts/typedrequest.classes.typedresponseerror.ts rename to ts/classes.typedresponseerror.ts diff --git a/ts/typedrequest.classes.typedrouter.ts b/ts/classes.typedrouter.ts similarity index 96% rename from ts/typedrequest.classes.typedrouter.ts rename to ts/classes.typedrouter.ts index 19042bb..9e379e4 100644 --- a/ts/typedrequest.classes.typedrouter.ts +++ b/ts/classes.typedrouter.ts @@ -1,8 +1,8 @@ import * as plugins from './plugins.js'; -import { VirtualStream } from './typedrequest.classes.virtualstream.js'; +import { VirtualStream } from './classes.virtualstream.js'; -import { TypedHandler } from './typedrequest.classes.typedhandler.js'; -import { TypedRequest } from './typedrequest.classes.typedrequest.js'; +import { TypedHandler } from './classes.typedhandler.js'; +import { TypedRequest } from './classes.typedrequest.js'; /** * A typed router decides on which typed handler to call based on the method diff --git a/ts/typedrequest.classes.typedtarget.ts b/ts/classes.typedtarget.ts similarity index 97% rename from ts/typedrequest.classes.typedtarget.ts rename to ts/classes.typedtarget.ts index 552a81a..3a00111 100644 --- a/ts/typedrequest.classes.typedtarget.ts +++ b/ts/classes.typedtarget.ts @@ -1,4 +1,4 @@ -import { TypedRouter } from './typedrequest.classes.typedrouter.js'; +import { TypedRouter } from './classes.typedrouter.js'; import * as plugins from './plugins.js'; export type IPostMethod = ( diff --git a/ts/typedrequest.classes.virtualstream.ts b/ts/classes.virtualstream.ts similarity index 99% rename from ts/typedrequest.classes.virtualstream.ts rename to ts/classes.virtualstream.ts index 4fec8b3..6ab5dca 100644 --- a/ts/typedrequest.classes.virtualstream.ts +++ b/ts/classes.virtualstream.ts @@ -1,5 +1,5 @@ import * as plugins from './plugins.js'; -import { TypedRouter } from './typedrequest.classes.typedrouter.js'; +import { TypedRouter } from './classes.typedrouter.js'; export interface ICommFunctions { sendMethod?: ( diff --git a/ts/index.ts b/ts/index.ts index 7af6e8e..a2f876a 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -1,6 +1,6 @@ -export * from './typedrequest.classes.typedrequest.js'; -export * from './typedrequest.classes.typedhandler.js'; -export * from './typedrequest.classes.typedrouter.js'; -export * from './typedrequest.classes.typedresponseerror.js'; -export * from './typedrequest.classes.typedtarget.js'; -export * from './typedrequest.classes.virtualstream.js'; \ No newline at end of file +export * from './classes.typedrequest.js'; +export * from './classes.typedhandler.js'; +export * from './classes.typedrouter.js'; +export * from './classes.typedresponseerror.js'; +export * from './classes.typedtarget.js'; +export * from './classes.virtualstream.js'; \ No newline at end of file diff --git a/ts/plugins.ts b/ts/plugins.ts index 2d9b9df..7a4be2a 100644 --- a/ts/plugins.ts +++ b/ts/plugins.ts @@ -8,8 +8,8 @@ import * as isounique from '@push.rocks/isounique'; import * as lik from '@push.rocks/lik'; import * as smartbuffer from '@push.rocks/smartbuffer'; import * as smartdelay from '@push.rocks/smartdelay'; +import * as smartguard from '@push.rocks/smartguard'; import * as smartpromise from '@push.rocks/smartpromise'; import * as webrequest from '@push.rocks/webrequest'; - -export { isounique, lik, smartbuffer, smartdelay, smartpromise, webrequest }; +export { isounique, lik, smartbuffer, smartdelay, smartguard, smartpromise, webrequest };