Files
typedserver/ts/plugins.ts
Juergen Kunz c17d6dac35 feat: Refactor TypedServer to use SmartServe and introduce new request handlers
- Removed legacy servertools and Express dependencies in favor of SmartServe.
- Introduced DevToolsHandler and TypedRequestHandler for handling specific routes.
- Added support for custom route registration with regex parsing.
- Implemented sitemap and feed handling with dedicated helper classes.
- Enhanced HTML response handling with reload script injection.
- Updated UtilityServiceServer and UtilityWebsiteServer to utilize new TypedServer API.
- Removed deprecated compression options and Express-based route handling.
- Added comprehensive request handling for various endpoints including robots.txt, manifest.json, and sitemap.
- Improved error handling and response formatting across the server.
2025-12-02 20:26:34 +00:00

77 lines
2.3 KiB
TypeScript

// node native
import * as http from 'http';
import * as https from 'https';
import * as net from 'net';
import * as path from 'path';
import * as zlib from 'zlib';
export { http, https, net, path, zlib };
// @tsclass scope
import * as tsclass from '@tsclass/tsclass';
export { tsclass };
// @apiglobal scope
import * as typedrequest from '@api.global/typedrequest';
import * as typedrequestInterfaces from '@api.global/typedrequest-interfaces';
import * as typedsocket from '@api.global/typedsocket';
export { typedrequest, typedrequestInterfaces, typedsocket };
// @pushrocks scope
import * as lik from '@push.rocks/lik';
import * as smartwatch from '@push.rocks/smartwatch';
import * as smartdelay from '@push.rocks/smartdelay';
import * as smartfeed from '@push.rocks/smartfeed';
import * as smartfile from '@push.rocks/smartfile';
import * as smartfs from '@push.rocks/smartfs';
import * as smartjson from '@push.rocks/smartjson';
import * as smartmanifest from '@push.rocks/smartmanifest';
import * as smartmime from '@push.rocks/smartmime';
import * as smartopen from '@push.rocks/smartopen';
import * as smartpath from '@push.rocks/smartpath';
import * as smartpromise from '@push.rocks/smartpromise';
import * as smartrequest from '@push.rocks/smartrequest';
import * as smartrx from '@push.rocks/smartrx';
import * as smartsitemap from '@push.rocks/smartsitemap';
import * as smartstream from '@push.rocks/smartstream';
import * as smarttime from '@push.rocks/smarttime';
export {
lik,
smartwatch,
smartdelay,
smartfeed,
smartfile,
smartfs,
smartjson,
smartmanifest,
smartmime,
smartopen,
smartpath,
smartpromise,
smartrequest,
smartsitemap,
smartstream,
smarttime,
smartrx,
};
// Create a ready-to-use smartfs instance with Node.js provider
export const fsInstance = new smartfs.SmartFs(new smartfs.SmartFsProviderNode());
// @push.rocks/smartserve
import * as smartserve from '@push.rocks/smartserve';
export { smartserve };
// Legacy Express dependencies - kept for backward compatibility with deprecated servertools
// These will be removed in the next major version
import express from 'express';
import bodyParser from 'body-parser';
import cors from 'cors';
import expressForceSsl from 'express-force-ssl';
export { express, bodyParser, cors, expressForceSsl };