fix(core): update
This commit is contained in:
parent
309c282379
commit
2384fc1b76
21728
package-lock.json
generated
21728
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
22
package.json
22
package.json
@ -5,6 +5,7 @@
|
||||
"description": "make typed requests towards apis",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"type": "module",
|
||||
"author": "Lossless GmbH",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
@ -13,22 +14,23 @@
|
||||
"format": "(gitzone format)"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.28",
|
||||
"@gitzone/tsbundle": "^1.0.88",
|
||||
"@gitzone/tstest": "^1.0.60",
|
||||
"@pushrocks/smartexpress": "^3.0.108",
|
||||
"@pushrocks/tapbundle": "^3.2.14",
|
||||
"@types/node": "^16.11.6",
|
||||
"@gitzone/tsbuild": "^2.1.61",
|
||||
"@gitzone/tsbundle": "^1.0.101",
|
||||
"@gitzone/tstest": "^1.0.69",
|
||||
"@pushrocks/smartenv": "^5.0.0",
|
||||
"@pushrocks/smartexpress": "^4.0.0",
|
||||
"@pushrocks/tapbundle": "^5.0.3",
|
||||
"@types/node": "^17.0.23",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.18.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@apiglobal/typedrequest-interfaces": "^1.0.15",
|
||||
"@pushrocks/isounique": "^1.0.4",
|
||||
"@pushrocks/lik": "^5.0.0",
|
||||
"@pushrocks/isounique": "^1.0.5",
|
||||
"@pushrocks/lik": "^5.0.4",
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/smartpromise": "^3.1.6",
|
||||
"@pushrocks/webrequest": "^2.0.13"
|
||||
"@pushrocks/smartpromise": "^3.1.7",
|
||||
"@pushrocks/webrequest": "^3.0.2"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { expect, tap } from '@pushrocks/tapbundle';
|
||||
|
||||
import * as typedrequest from '../ts/index';
|
||||
import * as typedrequest from '../ts/index.js';
|
||||
|
||||
let testTypedHandler: typedrequest.TypedHandler<ITestReqRes>;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { expect, tap } from '@pushrocks/tapbundle';
|
||||
import * as smartexpress from '@pushrocks/smartexpress';
|
||||
|
||||
import * as typedrequest from '../ts/index';
|
||||
import * as typedrequest from '../ts/index.js';
|
||||
|
||||
let testServer: smartexpress.Server;
|
||||
let testTypedHandler: typedrequest.TypedHandler<ITestReqRes>;
|
||||
@ -57,7 +57,7 @@ tap.test('should fire a request', async () => {
|
||||
});
|
||||
console.log('this is the response:');
|
||||
console.log(response);
|
||||
expect(response.surname).to.equal('wow');
|
||||
expect(response.surname).toEqual('wow');
|
||||
});
|
||||
|
||||
tap.test('should end the server', async () => {
|
||||
|
10
ts/index.ts
10
ts/index.ts
@ -1,5 +1,5 @@
|
||||
export * from './typedrequest.classes.typedrequest';
|
||||
export * from './typedrequest.classes.typedhandler';
|
||||
export * from './typedrequest.classes.typedrouter';
|
||||
export * from './typedrequest.classes.typedresponseerror';
|
||||
export * from './typedrequest.classes.typedtarget';
|
||||
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';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import * as plugins from './typedrequest.plugins';
|
||||
import { TypedResponseError } from './typedrequest.classes.typedresponseerror';
|
||||
import * as plugins from './typedrequest.plugins.js';
|
||||
import { TypedResponseError } from './typedrequest.classes.typedresponseerror.js';
|
||||
|
||||
export type THandlerFunction<T extends plugins.typedRequestInterfaces.ITypedRequest> = (
|
||||
requestArg: T['request']
|
||||
|
@ -1,7 +1,7 @@
|
||||
import * as plugins from './typedrequest.plugins';
|
||||
import { TypedResponseError } from './typedrequest.classes.typedresponseerror';
|
||||
import { TypedRouter } from './typedrequest.classes.typedrouter';
|
||||
import { TypedTarget } from './typedrequest.classes.typedtarget';
|
||||
import * as plugins from './typedrequest.plugins.js';
|
||||
import { TypedResponseError } from './typedrequest.classes.typedresponseerror.js';
|
||||
import { TypedRouter } from './typedrequest.classes.typedrouter.js';
|
||||
import { TypedTarget } from './typedrequest.classes.typedtarget.js';
|
||||
|
||||
const webrequestInstance = new plugins.webrequest.WebRequest();
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as plugins from './typedrequest.plugins';
|
||||
import * as plugins from './typedrequest.plugins.js';
|
||||
|
||||
export class TypedResponseError {
|
||||
public errorText: string;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import * as plugins from './typedrequest.plugins';
|
||||
import * as plugins from './typedrequest.plugins.js';
|
||||
|
||||
import { TypedHandler } from './typedrequest.classes.typedhandler';
|
||||
import { TypedRequest } from './typedrequest.classes.typedrequest';
|
||||
import { TypedHandler } from './typedrequest.classes.typedhandler.js';
|
||||
import { TypedRequest } from './typedrequest.classes.typedrequest.js';
|
||||
|
||||
/**
|
||||
* A typed router decides on which typed handler to call based on the method
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { TypedRouter } from './typedrequest.classes.typedrouter';
|
||||
import * as plugins from './typedrequest.plugins';
|
||||
import { TypedRouter } from './typedrequest.classes.typedrouter.js';
|
||||
import * as plugins from './typedrequest.plugins.js';
|
||||
|
||||
export type IPostMethod = (
|
||||
typedRequestPostObject: plugins.typedRequestInterfaces.ITypedRequest
|
||||
|
Loading…
Reference in New Issue
Block a user