Compare commits

...

72 Commits

Author SHA1 Message Date
889ec9c8ec 2.0.18 2022-12-29 12:17:59 +01:00
5d460cf002 fix(core): update 2022-12-29 12:17:58 +01:00
5e6ec0d311 2.0.17 2022-12-28 20:31:03 +01:00
dd834590cc fix(core): update 2022-12-28 20:31:03 +01:00
96b7354dae 2.0.16 2022-12-28 18:54:57 +01:00
3a5533c4fe fix(core): update 2022-12-28 18:54:57 +01:00
1f5f84763d 2.0.15 2022-12-28 15:15:19 +01:00
6474112275 fix(core): update 2022-12-28 15:15:19 +01:00
a46c0cf395 2.0.14 2022-12-28 15:14:48 +01:00
8be5c352f4 fix(core): update 2022-12-28 15:14:48 +01:00
caaf947a46 2.0.13 2022-12-28 15:05:53 +01:00
2ec88494be fix(core): update 2022-12-28 15:05:53 +01:00
b80346d742 2.0.12 2022-10-26 22:39:40 +02:00
aced21a968 fix(core): update 2022-10-26 22:39:39 +02:00
fa40e3a5dc 2.0.11 2022-10-26 18:59:50 +02:00
9bb0008381 fix(core): update 2022-10-26 18:59:49 +02:00
67bbea8811 2.0.10 2022-10-26 14:23:14 +02:00
dc826cb65a fix(core): update 2022-10-26 14:23:14 +02:00
1266a814c6 2.0.9 2022-10-26 11:00:07 +02:00
25a7397548 fix(core): update 2022-10-26 11:00:06 +02:00
5009bec70c 2.0.8 2022-10-26 10:55:09 +02:00
d8d7b135f7 fix(core): update 2022-10-26 10:55:08 +02:00
9738d88ec7 2.0.7 2022-10-26 10:54:37 +02:00
9d7f433685 fix(core): update 2022-10-26 10:54:36 +02:00
fc1124fb16 2.0.6 2022-10-26 10:54:19 +02:00
5e5f493dfa fix(core): update 2022-10-26 10:54:18 +02:00
899a46f9de 2.0.5 2022-08-02 10:21:16 +02:00
1412a06f4c fix(core): update 2022-08-02 10:21:15 +02:00
51e6c5cf0e 2.0.4 2022-05-13 08:14:10 +02:00
8d7eb3ff5f fix(core): update 2022-05-13 08:14:09 +02:00
a82f8ccc26 2.0.3 2022-03-29 15:38:38 +02:00
d934f4b53b fix(core): update 2022-03-29 15:38:37 +02:00
54b8a692ba 2.0.2 2022-03-25 00:42:50 +01:00
2f39b5662d fix(core): update 2022-03-25 00:42:50 +01:00
5b9e785159 2.0.1 2022-03-25 00:31:10 +01:00
a5bca90eeb fix(core): update 2022-03-25 00:31:10 +01:00
244016faed 2.0.0 2022-03-24 23:09:36 +01:00
61719769a0 1.0.27 2022-03-24 22:46:09 +01:00
6e2855cf3c fix(core): update 2022-03-24 22:46:08 +01:00
916052ef0b 1.0.26 2022-03-08 00:14:41 +01:00
2f51e10fc4 fix(core): update 2022-03-08 00:14:40 +01:00
6e2e2768e2 1.0.25 2022-03-08 00:03:42 +01:00
4c5abc89b8 fix(core): update 2022-03-08 00:03:42 +01:00
5911d829f9 1.0.24 2022-01-20 19:23:54 +01:00
eac735a691 fix(core): update 2022-01-20 19:23:53 +01:00
4af7164a58 1.0.23 2022-01-20 17:44:51 +01:00
006073cbc8 fix(core): update 2022-01-20 17:44:50 +01:00
7d8b41a5a6 1.0.22 2022-01-19 19:17:23 +01:00
acca64fa31 fix(core): update 2022-01-19 19:17:22 +01:00
1e570813a3 1.0.21 2021-11-10 17:35:55 +01:00
0199e8ef17 fix(core): update 2021-11-10 17:35:55 +01:00
68def29c80 1.0.20 2021-10-23 00:27:47 +02:00
106eb12a7f fix(core): update 2021-10-23 00:27:46 +02:00
5b868f1259 1.0.19 2021-10-22 21:09:43 +02:00
952835e46a fix(core): update 2021-10-22 21:09:42 +02:00
5aa8048ce8 1.0.18 2021-07-20 11:09:23 +02:00
48112f97ce fix(core): update 2021-07-20 11:09:22 +02:00
57a10080b5 1.0.17 2021-07-20 02:44:14 +02:00
7bdac2b89d 1.0.16 2021-07-20 02:04:46 +02:00
6c49870dd6 fix(core): update 2021-07-20 02:04:45 +02:00
a2db05bfe3 1.0.15 2021-02-02 00:11:33 +00:00
69668731be fix(core): update 2021-02-02 00:11:32 +00:00
e586843d81 1.0.14 2021-01-28 12:58:42 +00:00
fef1ae338a fix(core): update 2021-01-28 12:58:42 +00:00
969b2d6686 1.0.13 2021-01-28 02:12:22 +00:00
f4d820d37e fix(core): update 2021-01-28 02:12:22 +00:00
c08acd076e 1.0.12 2021-01-23 06:04:02 +00:00
c968de37d1 fix(core): update 2021-01-23 06:04:02 +00:00
5b8f7514f4 1.0.11 2021-01-23 05:14:30 +00:00
53874a7772 fix(core): update 2021-01-23 05:14:29 +00:00
479cf60239 1.0.10 2021-01-23 04:51:49 +00:00
825a264327 fix(core): update 2021-01-23 04:51:48 +00:00
15 changed files with 4324 additions and 11246 deletions

View File

@@ -12,40 +12,36 @@ stages:
- release
- metadata
before_script:
- pnpm install -g pnpm
- pnpm install -g @shipzone/npmci
- npmci npm prepare
# ====================
# security stage
# ====================
# ====================
# security stage
# ====================
mirror:
stage: security
script:
- npmci git mirror
only:
- tags
tags:
- lossless
- docker
- notpriv
auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --production --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=prod --production
- npmci command npm config set registry https://registry.npmjs.org
- npmci command pnpm audit --audit-level=high --prod
tags:
- lossless
- docker
allow_failure: true
auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=dev
- npmci command pnpm audit --audit-level=high --dev
tags:
- lossless
- docker
allow_failure: true
@@ -56,7 +52,6 @@ auditDevDependencies:
testStable:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci npm test
@@ -67,10 +62,9 @@ testStable:
testBuild:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci command npm run build
- npmci npm build
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
@@ -96,10 +90,9 @@ codequality:
only:
- tags
script:
- npmci command npm install -g tslint typescript
- npmci command npm install -g typescript
- npmci npm prepare
- npmci npm install
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
tags:
- lossless
- docker
@@ -119,11 +112,9 @@ trigger:
pages:
stage: metadata
script:
- npmci node install lts
- npmci command npm install -g @gitzone/tsdoc
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci command tsdoc
- npmci command npm run buildDocs
tags:
- lossless
- docker

24
.vscode/launch.json vendored
View File

@@ -2,28 +2,10 @@
"version": "0.2.0",
"configurations": [
{
"name": "current file",
"type": "node",
"command": "npm test",
"name": "Run npm test",
"request": "launch",
"args": [
"${relativeFile}"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "test.ts",
"type": "node",
"request": "launch",
"args": [
"test/test.ts"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
"type": "node-terminal"
}
]
}

View File

@@ -5,7 +5,7 @@
"githost": "gitlab.com",
"gitscope": "apiglobal",
"gitrepo": "typedsocket",
"shortDescription": "a typedrequest extension supporting websockets",
"description": "a typedrequest extension supporting websockets",
"npmPackagename": "@apiglobal/typedsocket",
"license": "MIT",
"projectDomain": "api.global"

11094
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,32 +1,34 @@
{
"name": "@apiglobal/typedsocket",
"version": "1.0.9",
"version": "2.0.18",
"private": false,
"description": "a typedrequest extension supporting websockets",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"type": "module",
"author": "Lossless GmbH",
"license": "MIT",
"scripts": {
"test": "(tstest test/ --web)",
"build": "(tsbuild --web)"
"build": "(tsbuild --web --allowimplicitany)",
"buildDocs": "tsdoc"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.25",
"@gitzone/tsbundle": "^1.0.78",
"@gitzone/tstest": "^1.0.44",
"@pushrocks/tapbundle": "^3.2.9",
"@types/node": "^14.14.22",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.15.0"
"@gitzone/tsbuild": "^2.1.63",
"@gitzone/tsbundle": "^2.0.6",
"@gitzone/tsrun": "^1.2.39",
"@gitzone/tstest": "^1.0.74",
"@pushrocks/smartenv": "^5.0.4",
"@pushrocks/tapbundle": "^5.0.4",
"@types/node": "^18.11.18"
},
"dependencies": {
"@apiglobal/typedrequest": "^1.0.56",
"@apiglobal/typedrequest-interfaces": "^1.0.15",
"@pushrocks/isohash": "^1.0.2",
"@pushrocks/smartexpress": "^3.0.100",
"@pushrocks/smartsocket": "^1.2.1",
"@pushrocks/smartstring": "^3.0.24"
"@apiglobal/typedrequest": "^2.0.8",
"@apiglobal/typedrequest-interfaces": "2.0.1",
"@pushrocks/isohash": "^2.0.0",
"@pushrocks/smartjson": "^5.0.5",
"@pushrocks/smartsocket": "^2.0.13",
"@pushrocks/smartstring": "^4.0.2"
},
"browserslist": [
"last 1 chrome versions"

4127
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -21,7 +21,6 @@ Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](htt
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@apiglobal/typedsocket)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@apiglobal/typedsocket)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@apiglobal/typedsocket)](https://lossless.cloud)
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
## Usage
@@ -37,7 +36,6 @@ We are always happy for code contributions. If you are not the code contributing
For further information read the linked docs at the top of this readme.
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
## Legal
> MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)

View File

@@ -1,6 +1,6 @@
import { tap, expect } from '@pushrocks/tapbundle';
import * as typedsocket from '../ts/index';
import * as typedsocket from '../ts/index.js';
tap.test('should create a client', async () => {
console.log('Browser test') // TODO: implement browser tests

View File

@@ -2,20 +2,20 @@ import { expect, tap } from '@pushrocks/tapbundle';
import * as typedrequest from '@apiglobal/typedrequest';
import * as typedrequestInterfaces from '@apiglobal/typedrequest-interfaces';
import * as typedsocket from '../ts/index';
import { request } from 'http';
import * as typedsocket from '../ts/index.js';
interface IRequest_Client_Server extends typedrequestInterfaces.implementsTR<
typedrequestInterfaces.ITypedRequest,
IRequest_Client_Server
> {
interface IRequest_Client_Server
extends typedrequestInterfaces.implementsTR<
typedrequestInterfaces.ITypedRequest,
IRequest_Client_Server
> {
method: 'sayhi';
request: {
greeting: string;
};
response: {
answer: string
}
answer: string;
};
}
let testTypedSocketServer: typedsocket.TypedSocket;
@@ -24,38 +24,52 @@ let testTypedSocketClient: typedsocket.TypedSocket;
const testTypedRouter = new typedrequest.TypedRouter();
tap.test('should add some handlers', async () => {
testTypedRouter.addTypedHandler<IRequest_Client_Server>(new typedrequest.TypedHandler('sayhi', async requestData => {
return {
answer: `ok, got it : ${requestData.greeting}`
}
}));
})
testTypedRouter.addTypedHandler<IRequest_Client_Server>(
new typedrequest.TypedHandler('sayhi', async (requestData) => {
return {
answer: `ok, got it : ${requestData.greeting}`,
};
})
);
});
tap.test('should create Server and Client', async (tools) => {
testTypedSocketServer = await typedsocket.TypedSocket.createServer(testTypedRouter);
testTypedSocketClient = await typedsocket.TypedSocket.createClient(testTypedRouter, 'http://localhost');
testTypedSocketClient = await typedsocket.TypedSocket.createClient(
testTypedRouter,
'http://localhost:3000'
);
console.log('test: waiting 5 seconds');
await tools.delayFor(5000);
await testTypedSocketServer.stop();
// lets create another server
testTypedSocketServer = await typedsocket.TypedSocket.createServer(testTypedRouter);
// lets see if auto reconnect works
console.log('test: waiting 21 seconds for reconnect');
await tools.delayFor(21000);
});
tap.test('should process messages from both sides', async () => {
const myServerSideTypedRequest = testTypedSocketServer.createTypedRequest<IRequest_Client_Server>('sayhi');
const myClientSideTypedRequest = testTypedSocketClient.createTypedRequest<IRequest_Client_Server>('sayhi');
const myServerSideTypedRequest =
testTypedSocketServer.createTypedRequest<IRequest_Client_Server>('sayhi');
const myClientSideTypedRequest =
testTypedSocketClient.createTypedRequest<IRequest_Client_Server>('sayhi');
const response = await myClientSideTypedRequest.fire({
greeting: 'that is a greeting from the client'
greeting: 'that is a greeting from the client',
});
console.log(response);
const response2 = await myServerSideTypedRequest.fire({
greeting: 'that is a greeting from the server'
greeting: 'that is a greeting from the server',
});
console.log(response2);
})
});
tap.test('should run without problems for a little bit', async tools => {
await tools.delayFor(5000);
})
tap.test('should disconnect', async () => {
tap.test('should disconnect', async (tools) => {
await testTypedSocketClient.stop();
await testTypedSocketServer.stop();
})
tools.delayFor(1000).then(() => process.exit(0));
});
tap.start();

8
ts/00_commitinfo_data.ts Normal file
View File

@@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@apiglobal/typedsocket',
version: '2.0.18',
description: 'a typedrequest extension supporting websockets'
}

View File

@@ -1 +1 @@
export * from './typedsocket.classes.typedsocket';
export * from './typedsocket.classes.typedsocket.js';

View File

@@ -1,9 +1,10 @@
import * as plugins from './typedsocket.plugins';
import type * as smartexpress from '@pushrocks/smartexpress';
import * as plugins from './typedsocket.plugins.js';
const publicRoleName = 'publicRoleName';
const publicRolePass = 'publicRolePass';
export type TTypedSocketSide = 'server' | 'client';
export class TypedSocket {
// STATIC
/**
@@ -12,29 +13,26 @@ export class TypedSocket {
*/
public static async createServer(
typedrouterArg: plugins.typedrequest.TypedRouter,
smartexpressServerArg?: smartexpress.Server
smartexpressServerArg?: any
): Promise<TypedSocket> {
const smartsocketServer = new plugins.smartsocket.Smartsocket({
alias: 'typedsocketServer',
port: 3000,
});
if (smartexpressServerArg) {
smartsocketServer.setExternalServer('smartexpress', smartexpressServerArg);
}
const publicRole = new plugins.smartsocket.SocketRole({
name: publicRoleName,
passwordHash: await plugins.isohash.sha256FromString(publicRolePass),
});
smartsocketServer.addSocketRoles([publicRole]);
smartsocketServer.socketFunctions.add(
new plugins.smartsocket.SocketFunction({
funcName: 'processMessage',
allowedRoles: [publicRole],
funcDef: async (dataArg, socketConnectionArg) => {
return typedrouterArg.routeAndAddResponse(dataArg);
},
})
);
const typedsocket = new TypedSocket(
'server',
typedrouterArg,
async <T extends plugins.typedrequestInterfaces.ITypedRequest>(
dataArg: T,
@@ -47,21 +45,20 @@ export class TypedSocket {
);
targetConnectionArg = smartsocketServer.socketConnections.getArray()[0];
} else {
throw new Error('you need to specify the wanted targetConnection');
throw new Error(
'you need to specify the wanted targetConnection. Currently no target is selectable automatically.'
);
}
}
const response: T = await smartsocketServer.clientCall(
const response: T = (await smartsocketServer.clientCall(
'processMessage',
dataArg,
targetConnectionArg
) as any;
)) as any;
return response;
},
smartsocketServer
);
if (smartexpressServerArg && smartexpressServerArg.serverStatus !== 'running') {
await smartexpressServerArg.start()
}
await smartsocketServer.start();
return typedsocket;
@@ -74,28 +71,28 @@ export class TypedSocket {
): Promise<TypedSocket> {
const domain = new plugins.smartstring.Domain(serverUrlArg);
const smartsocketClient = new plugins.smartsocket.SmartsocketClient({
const socketOptions: plugins.smartsocket.ISmartsocketClientOptions = {
alias: aliasArg,
role: publicRoleName,
password: publicRolePass,
port: domain.port || 3000,
url: `${domain.nodeParsedUrl.protocol}//${domain.nodeParsedUrl.host}`,
url: `${domain.nodeParsedUrl.protocol}//${domain.nodeParsedUrl.hostname}`,
autoReconnect: true,
});
};
console.log(`starting typedsocket with the following settings:`);
console.log(socketOptions);
const smartsocketClient = new plugins.smartsocket.SmartsocketClient(socketOptions);
smartsocketClient.addSocketFunction(
new plugins.smartsocket.SocketFunction({
funcName: 'processMessage',
allowedRoles: [],
funcDef: async (dataArg, socketConnectionArg) => {
return typedrouterArg.routeAndAddResponse(dataArg);
},
})
);
const typedsocket = new TypedSocket(
'client',
typedrouterArg,
async <T extends plugins.typedrequestInterfaces.ITypedRequest>(dataArg: T): Promise<T> => {
const response: T = (smartsocketClient.serverCall('processMessage', dataArg) as any) as T;
const response: T = smartsocketClient.serverCall('processMessage', dataArg) as any as T;
return response;
},
smartsocketClient
@@ -107,23 +104,45 @@ export class TypedSocket {
}
// INSTANCE
public side: TTypedSocketSide;
public typedrouter: plugins.typedrequest.TypedRouter;
private postMethod: plugins.typedrequest.IPostMethod &
((
typedRequestPostObject: plugins.typedrequestInterfaces.ITypedRequest,
socketConnectionArg?: plugins.smartsocket.SocketConnection
) => Promise<plugins.typedrequestInterfaces.ITypedRequest>);
private socketServerOrClient: plugins.smartsocket.Smartsocket | plugins.smartsocket.SmartsocketClient;
private socketServerOrClient:
| plugins.smartsocket.Smartsocket
| plugins.smartsocket.SmartsocketClient;
constructor(
sideArg: TTypedSocketSide,
typedrouterArg: plugins.typedrequest.TypedRouter,
postMethodArg: plugins.typedrequest.IPostMethod,
socketServerOrClientArg: plugins.smartsocket.Smartsocket | plugins.smartsocket.SmartsocketClient
) {
this.side = sideArg;
this.typedrouter = typedrouterArg;
this.postMethod = postMethodArg;
this.socketServerOrClient = socketServerOrClientArg;
}
public addTag<T extends plugins.typedrequestInterfaces.ITag = any>(
nameArg: T['name'],
payloadArg: T['payload']
) {
if (
this.side === 'client' &&
this.socketServerOrClient instanceof plugins.smartsocket.SmartsocketClient
) {
this.socketServerOrClient.socketConnection.addTag({
id: nameArg,
payload: payloadArg,
});
} else {
throw new Error('tagging is only supported on clients');
}
}
public createTypedRequest<T extends plugins.typedrequestInterfaces.ITypedRequest>(
methodName: T['method'],
targetConnection?: plugins.smartsocket.SocketConnection
@@ -140,21 +159,65 @@ export class TypedSocket {
return typedrequest;
}
public async findTargetConnection(
findFuncArg: (connectionArg: plugins.smartsocket.SocketConnection) => boolean
/**
* returns all matching target connection
* @param asyncFindFuncArg
* @returns
*/
public async findAllTargetConnections(
asyncFindFuncArg: (connectionArg: plugins.smartsocket.SocketConnection) => Promise<boolean>
) {
if (this.socketServerOrClient instanceof plugins.smartsocket.Smartsocket) {
const matchingSockets: plugins.smartsocket.SocketConnection[] = [];
for (const socketConnection of this.socketServerOrClient.socketConnections.getArray()) {
if (findFuncArg(socketConnection)) {
return socketConnection;
if (await asyncFindFuncArg(socketConnection)) {
matchingSockets.push(socketConnection);
}
}
return matchingSockets;
} else {
console.warn('this method >>findTargetConnection<< is only available from the server');
throw new Error('this method >>findTargetConnection<< is only available from the server');
}
}
/**
* returns a single target connection by returning the first one of all matching ones
* @param asyncFindFuncArg
* @returns
*/
public async findTargetConnection(
asyncFindFuncArg: (connectionArg: plugins.smartsocket.SocketConnection) => Promise<boolean>
) {
const allMatching = await this.findAllTargetConnections(asyncFindFuncArg);
return allMatching[0];
}
public async findAllTargetConnectionsByTag<
TTag extends plugins.typedrequestInterfaces.ITag = any
>(keyArg: TTag['name'], payloadArg?: TTag['payload']) {
return this.findAllTargetConnections(async (socketConnectionArg) => {
let result: boolean;
if (!payloadArg) {
result = !!(await socketConnectionArg.getTagById(keyArg));
} else {
result = !!(
plugins.smartjson.stringify((await socketConnectionArg.getTagById(keyArg))?.payload) ===
plugins.smartjson.stringify(payloadArg)
);
}
return result;
});
}
public async findTargetConnectionByTag<TTag extends plugins.typedrequestInterfaces.ITag = any>(
keyArg: TTag['name'],
payloadArg?: TTag['payload']
) {
const allResults = await this.findAllTargetConnectionsByTag(keyArg, payloadArg);
return allResults[0];
}
public async stop() {
await this.socketServerOrClient.stop()
await this.socketServerOrClient.stop();
}
}

View File

@@ -2,18 +2,12 @@
import * as typedrequest from '@apiglobal/typedrequest';
import * as typedrequestInterfaces from '@apiglobal/typedrequest-interfaces';
export {
typedrequest,
typedrequestInterfaces,
}
export { typedrequest, typedrequestInterfaces };
// @pushrocks scope
import * as isohash from '@pushrocks/isohash';
import * as smartjson from '@pushrocks/smartjson';
import * as smartsocket from '@pushrocks/smartsocket';
import * as smartstring from '@pushrocks/smartstring';
export {
isohash,
smartsocket,
smartstring
}
export { isohash, smartjson, smartsocket, smartstring };

10
tsconfig.json Normal file
View File

@@ -0,0 +1,10 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "nodenext",
"esModuleInterop": true
}
}

View File

@@ -1,17 +0,0 @@
{
"extends": ["tslint:latest", "tslint-config-prettier"],
"rules": {
"semicolon": [true, "always"],
"no-console": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"member-ordering": {
"options":{
"order": [
"static-method"
]
}
}
},
"defaultSeverity": "warning"
}