Compare commits

...

8 Commits

Author SHA1 Message Date
0fd5e0a209 2.0.62 2023-07-02 01:46:53 +02:00
eadab07f17 fix(core): update 2023-07-02 01:46:53 +02:00
378592acc3 2.0.61 2023-07-02 01:38:50 +02:00
f885e49e34 fix(core): update 2023-07-02 01:38:49 +02:00
078730153d 2.0.60 2023-07-02 01:23:41 +02:00
4467ab76aa fix(core): update 2023-07-02 01:23:41 +02:00
a0bbf31f75 2.0.59 2023-07-01 18:25:27 +02:00
13e9ac7a98 fix(core): update 2023-07-01 18:25:27 +02:00
5 changed files with 50 additions and 47 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@apiglobal/typedserver",
"version": "2.0.58",
"version": "2.0.62",
"description": "easy serving of static files",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
@ -46,7 +46,7 @@
"@pushrocks/smartenv": "^5.0.5",
"@pushrocks/smartfeed": "^1.0.11",
"@pushrocks/smartfile": "^10.0.25",
"@pushrocks/smartlog": "^3.0.1",
"@pushrocks/smartlog": "^3.0.2",
"@pushrocks/smartlog-destination-devtools": "^1.0.10",
"@pushrocks/smartmanifest": "^2.0.2",
"@pushrocks/smartmime": "^1.0.5",
@ -70,7 +70,7 @@
"@gitzone/tsbuild": "^2.1.66",
"@gitzone/tsbundle": "^2.0.8",
"@gitzone/tsrun": "^1.2.42",
"@gitzone/tstest": "^1.0.72",
"@gitzone/tstest": "^1.0.74",
"@pushrocks/tapbundle": "^5.0.8",
"@types/node": "^20.3.3"
},

43
pnpm-lock.yaml generated
View File

@ -33,8 +33,8 @@ dependencies:
specifier: ^10.0.25
version: 10.0.25
'@pushrocks/smartlog':
specifier: ^3.0.1
version: 3.0.1
specifier: ^3.0.2
version: 3.0.2
'@pushrocks/smartlog-destination-devtools':
specifier: ^1.0.10
version: 1.0.10
@ -101,8 +101,8 @@ devDependencies:
specifier: ^1.2.42
version: 1.2.42(@types/node@20.3.3)
'@gitzone/tstest':
specifier: ^1.0.72
version: 1.0.72(@types/node@20.3.3)
specifier: ^1.0.74
version: 1.0.74(@types/node@20.3.3)
'@pushrocks/tapbundle':
specifier: ^5.0.8
version: 5.0.8
@ -438,8 +438,8 @@ packages:
- supports-color
dev: true
/@gitzone/tstest@1.0.72(@types/node@20.3.3):
resolution: {integrity: sha512-p8oBgHu5qg6hR9kn3nS2e6uBOgQMqIspJXAqEkD+U2Ios/uQwhC9+vkB9TlcVLeqdfZrZiglBSmeyl3f32wtpw==}
/@gitzone/tstest@1.0.74(@types/node@20.3.3):
resolution: {integrity: sha512-6V8bsfvpnODWqrkdooVqcOS1z5GA8dMDnLCOHnr/SUTeie3ox8KGpckwiZ+gTfz9WvzX6+KLVTZNYKGOaNbmMQ==}
hasBin: true
dependencies:
'@gitzone/tsbundle': 2.0.8
@ -449,12 +449,11 @@ packages:
'@pushrocks/smartdelay': 2.0.13
'@pushrocks/smartexpress': 4.0.35
'@pushrocks/smartfile': 10.0.25
'@pushrocks/smartlog': 3.0.1
'@pushrocks/smartlog': 3.0.2
'@pushrocks/smartpromise': 3.1.10
'@pushrocks/smartshell': 2.0.30
'@pushrocks/tapbundle': 5.0.8
'@types/figures': 3.0.1
figures: 4.0.1
figures: 5.0.0
transitivePeerDependencies:
- '@swc/core'
- '@swc/wasm'
@ -696,7 +695,7 @@ packages:
resolution: {integrity: sha512-nv2Ldy+jTRsVpGpOz+9o0F8FMELoWYk/sy5ecyh9AsP97Kdj3CtqwRwHhcl7mLepdrcRw1qHK3DAloln1XP4Vg==}
dependencies:
'@pushrocks/lik': 6.0.2
'@pushrocks/smartlog': 3.0.1
'@pushrocks/smartlog': 3.0.2
'@pushrocks/smartparam': 1.1.6
'@pushrocks/smartpromise': 3.1.10
'@pushrocks/smartrx': 2.0.27
@ -839,25 +838,18 @@ packages:
resolution: {integrity: sha512-tXqwfrekGxGZJB72BFQppywk7413hXVDgcJNeU+kY6xvmzVjf2HxOMbFYhewh1+p4uai1u9n0xcMb0qbbPy4/Q==}
dependencies:
'@apiglobal/typedrequest-interfaces': 1.0.20
dev: false
/@pushrocks/smartlog-interfaces@3.0.0:
resolution: {integrity: sha512-yjppiLLJHBcrXTJJusDbFTvHq0RTMl3LnhvWAhyyy8U0O4VkJxIls1t5mS6jsEwxogP88+0flQIWknNJeB913A==}
dependencies:
'@apiglobal/typedrequest-interfaces': 2.0.1
dev: true
/@pushrocks/smartlog@3.0.1:
resolution: {integrity: sha512-lE6BCrtZcDDjeXymHq9EK+VlrV3lhXXagFubgHiwrtX8+2xzihS3PpLE54pMARf5X5LE00xg1W0QxSzYJ9oMqg==}
dependencies:
'@pushrocks/isounique': 1.0.5
'@pushrocks/smartlog-interfaces': 2.0.23
/@pushrocks/smartlog@3.0.2:
resolution: {integrity: sha512-1WPA0LX9HfE54ESKtk32uvsXiYIMu2QX7NUlQ3uHSMmFULnJYo2m/LeKEf6qHH7DJtxZbkWzkrMOkZVPL1MeNg==}
dependencies:
'@pushrocks/isounique': 1.0.5
'@pushrocks/smartlog-interfaces': 3.0.0
dev: true
/@pushrocks/smartmanifest@1.0.8:
resolution: {integrity: sha512-inHmTp58Z8xl+c6mdOrfxc9IjUKuqho1i+WUI74G7rn6HwEn3cMd/06R1v80Xlx+95EYWzBwnYtuo7j7DafrdQ==}
@ -1016,7 +1008,7 @@ packages:
'@pushrocks/smartenv': 5.0.5
'@pushrocks/smartexpress': 4.0.35
'@pushrocks/smartjson': 5.0.6
'@pushrocks/smartlog': 3.0.1
'@pushrocks/smartlog': 3.0.2
'@pushrocks/smartpromise': 3.1.10
'@pushrocks/smartrx': 3.0.2
'@pushrocks/smarttime': 4.0.1
@ -1313,13 +1305,6 @@ packages:
'@types/qs': 6.9.7
'@types/serve-static': 1.15.2
/@types/figures@3.0.1:
resolution: {integrity: sha512-2OXodKWdNhYl+S+wCvlafqJbfMIVDfQZYX2wRyUOcRiEQpeJ9zU6cT7d+RbMpjS+/vmQ2cAUUL8gyGy1YxtLPw==}
deprecated: This is a stub types definition. figures provides its own type definitions, so you do not need this installed.
dependencies:
figures: 4.0.1
dev: true
/@types/finalhandler@1.2.0:
resolution: {integrity: sha512-NgEZKOhxUSXkwNnWNaMXZaopQ5aFGPAYiEpEWIkQ6Dzc4iS0M1oQsvWne2t+ex9QZUAdTz/ZT4tOXJhWtP6mCw==}
dependencies:
@ -2453,9 +2438,9 @@ packages:
dependencies:
xml-js: 1.6.11
/figures@4.0.1:
resolution: {integrity: sha512-rElJwkA/xS04Vfg+CaZodpso7VqBknOYbzi6I76hI4X80RUjkSxO2oAyPmGbuXUppywjqndOrQDl817hDnI++w==}
engines: {node: '>=12'}
/figures@5.0.0:
resolution: {integrity: sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==}
engines: {node: '>=14'}
dependencies:
escape-string-regexp: 5.0.0
is-unicode-supported: 1.3.0

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@apiglobal/typedserver',
version: '2.0.58',
version: '2.0.62',
description: 'easy serving of static files'
}

View File

@ -105,7 +105,6 @@ export class Server {
// general request handlling
this.expressAppInstance.use((req, res, next) => {
req.setTimeout(60 * 1000);
next();
});
@ -219,25 +218,44 @@ export class Server {
this.httpServer.on('connection', (connection: plugins.net.Socket) => {
this.socketMap.add(connection);
console.log(`added connection. now ${this.socketMap.getArray().length} sockets connected.`);
const closeListener = () => {
console.log('connection closed');
cleanupConnection();
};
const errorListener = () => {
console.log('connection errored');
cleanupConnection();
};
const endListener = () => {
console.log('connection ended');
cleanupConnection();
};
const timeoutListener = () => {
console.log('connection timed out');
cleanupConnection();
};
connection.addListener('close', closeListener);
connection.addListener('error', errorListener);
connection.addListener('end', endListener);
connection.addListener('timeout', timeoutListener);
const cleanupConnection = () => {
connection.removeListener('close', closeListener);
connection.removeListener('error', errorListener);
connection.removeListener('end', endListener);
connection.removeListener('timeout', timeoutListener);
if (this.socketMap.checkForObject(connection)) {
this.socketMap.remove(connection);
console.log(`removed connection. ${this.socketMap.getArray().length} sockets remaining.`);
connection.destroy();
}
};
connection.on('close', () => {
cleanupConnection();
});
connection.on('error', () => {
cleanupConnection();
});
connection.on('end', () => {
cleanupConnection();
});
connection.on('timeout', () => {
cleanupConnection();
});
});
// finally listen on a port

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@apiglobal/typedserver',
version: '2.0.58',
version: '2.0.62',
description: 'easy serving of static files'
}