@asenajs/ergenecore 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +636 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/Ergenecore.d.ts +598 -0
- package/dist/lib/Ergenecore.js +1406 -0
- package/dist/lib/Ergenecore.js.map +1 -0
- package/dist/lib/ErgenecoreContextWrapper.d.ts +190 -0
- package/dist/lib/ErgenecoreContextWrapper.js +387 -0
- package/dist/lib/ErgenecoreContextWrapper.js.map +1 -0
- package/dist/lib/ErgenecoreWebsocketAdapter.d.ts +68 -0
- package/dist/lib/ErgenecoreWebsocketAdapter.js +233 -0
- package/dist/lib/ErgenecoreWebsocketAdapter.js.map +1 -0
- package/dist/lib/defaults/ConfigService.d.ts +39 -0
- package/dist/lib/defaults/ConfigService.js +30 -0
- package/dist/lib/defaults/ConfigService.js.map +1 -0
- package/dist/lib/defaults/MiddlewareService.d.ts +39 -0
- package/dist/lib/defaults/MiddlewareService.js +30 -0
- package/dist/lib/defaults/MiddlewareService.js.map +1 -0
- package/dist/lib/defaults/StaticServeService.d.ts +24 -0
- package/dist/lib/defaults/StaticServeService.js +23 -0
- package/dist/lib/defaults/StaticServeService.js.map +1 -0
- package/dist/lib/defaults/ValidationService.d.ts +35 -0
- package/dist/lib/defaults/ValidationService.js +34 -0
- package/dist/lib/defaults/ValidationService.js.map +1 -0
- package/dist/lib/defaults/index.d.ts +25 -0
- package/dist/lib/defaults/index.js +26 -0
- package/dist/lib/defaults/index.js.map +1 -0
- package/dist/lib/errors.d.ts +84 -0
- package/dist/lib/errors.js +108 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/lib/index.d.ts +36 -0
- package/dist/lib/index.js +37 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/middlewares/CorsMiddleware.d.ts +147 -0
- package/dist/lib/middlewares/CorsMiddleware.js +163 -0
- package/dist/lib/middlewares/CorsMiddleware.js.map +1 -0
- package/dist/lib/middlewares/RateLimiterMiddleware.d.ts +330 -0
- package/dist/lib/middlewares/RateLimiterMiddleware.js +300 -0
- package/dist/lib/middlewares/RateLimiterMiddleware.js.map +1 -0
- package/dist/lib/types/Handler.d.ts +65 -0
- package/dist/lib/types/Handler.js +10 -0
- package/dist/lib/types/Handler.js.map +1 -0
- package/dist/lib/types/StaticServeExtras.d.ts +29 -0
- package/dist/lib/types/StaticServeExtras.js +2 -0
- package/dist/lib/types/StaticServeExtras.js.map +1 -0
- package/dist/lib/types/Validation.d.ts +7 -0
- package/dist/lib/types/Validation.js +2 -0
- package/dist/lib/types/Validation.js.map +1 -0
- package/dist/lib/types/index.d.ts +24 -0
- package/dist/lib/types/index.js +25 -0
- package/dist/lib/types/index.js.map +1 -0
- package/dist/lib/utils/factory.d.ts +121 -0
- package/dist/lib/utils/factory.js +144 -0
- package/dist/lib/utils/factory.js.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Handler.js","sourceRoot":"","sources":["../../../lib/types/Handler.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for static file serving with Ergenecore adapter.
|
|
3
|
+
* These options are passed via the `extra` field in BaseStaticServeParams.
|
|
4
|
+
*/
|
|
5
|
+
export interface StaticServeExtras {
|
|
6
|
+
/**
|
|
7
|
+
* Enable serving precompressed files (.br, .gz) if available.
|
|
8
|
+
* When true, adapter will look for .br and .gz variants before serving the original file.
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
precompressed?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Custom MIME type mappings for file extensions.
|
|
14
|
+
* Overrides Bun's default MIME type detection.
|
|
15
|
+
* @example { '.ts': 'text/typescript' }
|
|
16
|
+
*/
|
|
17
|
+
mimes?: Record<string, string>;
|
|
18
|
+
/**
|
|
19
|
+
* Cache-Control header value for static files.
|
|
20
|
+
* @example 'public, max-age=31536000, immutable'
|
|
21
|
+
*/
|
|
22
|
+
cacheControl?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Custom headers to include in static file responses.
|
|
25
|
+
* These headers are added to all static file responses.
|
|
26
|
+
* @example { 'X-Custom-Header': 'value' }
|
|
27
|
+
*/
|
|
28
|
+
headers?: Record<string, string>;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StaticServeExtras.js","sourceRoot":"","sources":["../../../lib/types/StaticServeExtras.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type z from 'zod';
|
|
2
|
+
import type { Context } from '../ErgenecoreContextWrapper';
|
|
3
|
+
export type ValidationSchema = z.ZodType<any, any, any>;
|
|
4
|
+
export interface ValidationSchemaWithHook {
|
|
5
|
+
schema: ValidationSchema;
|
|
6
|
+
hook?: (result: any, context: Context) => any;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Validation.js","sourceRoot":"","sources":["../../../lib/types/Validation.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ergenecore type definitions
|
|
3
|
+
*
|
|
4
|
+
* Centralized export point for all Ergenecore-specific types.
|
|
5
|
+
* Provides type definitions for handlers, static serve configuration,
|
|
6
|
+
* validation schemas, and more.
|
|
7
|
+
*
|
|
8
|
+
* Note: Router types are not needed as we use Bun's native router
|
|
9
|
+
*
|
|
10
|
+
* @module types
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import type {
|
|
15
|
+
* ErgenecoreHandler,
|
|
16
|
+
* StaticServeExtras,
|
|
17
|
+
* ValidationSchemaWithHook
|
|
18
|
+
* } from '@asenajs/ergenecore/types';
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export type { ErgenecoreHandler, ErgenecoreNext } from './Handler';
|
|
22
|
+
export * from './StaticServeExtras';
|
|
23
|
+
export * from './Validation';
|
|
24
|
+
export type { Context } from '../ErgenecoreContextWrapper';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ergenecore type definitions
|
|
3
|
+
*
|
|
4
|
+
* Centralized export point for all Ergenecore-specific types.
|
|
5
|
+
* Provides type definitions for handlers, static serve configuration,
|
|
6
|
+
* validation schemas, and more.
|
|
7
|
+
*
|
|
8
|
+
* Note: Router types are not needed as we use Bun's native router
|
|
9
|
+
*
|
|
10
|
+
* @module types
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import type {
|
|
15
|
+
* ErgenecoreHandler,
|
|
16
|
+
* StaticServeExtras,
|
|
17
|
+
* ValidationSchemaWithHook
|
|
18
|
+
* } from '@asenajs/ergenecore/types';
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
// Static serve types
|
|
22
|
+
export * from './StaticServeExtras';
|
|
23
|
+
// Validation types
|
|
24
|
+
export * from './Validation';
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH,qBAAqB;AACrB,cAAc,qBAAqB,CAAC;AAEpC,mBAAmB;AACnB,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Factory functions for creating Ergenecore instances
|
|
3
|
+
*
|
|
4
|
+
* Provides convenient factory functions for creating pre-configured
|
|
5
|
+
* Ergenecore adapter instances with sensible defaults.
|
|
6
|
+
*
|
|
7
|
+
* @module factory
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import { createErgenecoreAdapter } from '@asenajs/ergenecore/factory';
|
|
12
|
+
*
|
|
13
|
+
* const adapter = createErgenecoreAdapter({
|
|
14
|
+
* port: 3000,
|
|
15
|
+
* hostname: 'localhost'
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
import type { ServerLogger } from '@asenajs/asena/logger';
|
|
20
|
+
import { ErgenecoreWebsocketAdapter } from '../ErgenecoreWebsocketAdapter';
|
|
21
|
+
import { Ergenecore } from '../Ergenecore';
|
|
22
|
+
/**
|
|
23
|
+
* Configuration options for creating an Ergenecore adapter
|
|
24
|
+
*/
|
|
25
|
+
export interface ErgenecoreOptions {
|
|
26
|
+
/**
|
|
27
|
+
* Server port
|
|
28
|
+
* @default 3000
|
|
29
|
+
*/
|
|
30
|
+
port?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Server hostname
|
|
33
|
+
* @default undefined (binds to all interfaces)
|
|
34
|
+
*/
|
|
35
|
+
hostname?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Custom logger instance
|
|
38
|
+
* If not provided, a default logger will be used
|
|
39
|
+
*/
|
|
40
|
+
logger?: ServerLogger;
|
|
41
|
+
/**
|
|
42
|
+
* Enable WebSocket support
|
|
43
|
+
* @default true
|
|
44
|
+
*/
|
|
45
|
+
enableWebSocket?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Custom WebSocket adapter instance
|
|
48
|
+
* Only used if enableWebSocket is true
|
|
49
|
+
*/
|
|
50
|
+
websocketAdapter?: ErgenecoreWebsocketAdapter;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Creates a new Ergenecore adapter instance with optional configuration
|
|
54
|
+
*
|
|
55
|
+
* @param options - Configuration options
|
|
56
|
+
* @returns Configured Ergenecore adapter instance
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```typescript
|
|
60
|
+
* // Basic usage with defaults
|
|
61
|
+
* const adapter = createErgenecoreAdapter();
|
|
62
|
+
*
|
|
63
|
+
* // Custom port and hostname
|
|
64
|
+
* const adapter = createErgenecoreAdapter({
|
|
65
|
+
* port: 8080,
|
|
66
|
+
* hostname: '0.0.0.0'
|
|
67
|
+
* });
|
|
68
|
+
*
|
|
69
|
+
* // With custom logger
|
|
70
|
+
* const adapter = createErgenecoreAdapter({
|
|
71
|
+
* logger: customLogger,
|
|
72
|
+
* port: 3000
|
|
73
|
+
* });
|
|
74
|
+
*
|
|
75
|
+
* // Disable WebSocket support
|
|
76
|
+
* const adapter = createErgenecoreAdapter({
|
|
77
|
+
* enableWebSocket: false
|
|
78
|
+
* });
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
export declare function createErgenecoreAdapter(options?: ErgenecoreOptions): Ergenecore;
|
|
82
|
+
/**
|
|
83
|
+
* Creates a production-ready Ergenecore adapter with optimized settings
|
|
84
|
+
*
|
|
85
|
+
* This factory includes:
|
|
86
|
+
* - Performance-optimized defaults
|
|
87
|
+
* - WebSocket support enabled
|
|
88
|
+
* - Production logging
|
|
89
|
+
*
|
|
90
|
+
* @param options - Configuration options
|
|
91
|
+
* @returns Production-configured Ergenecore adapter
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```typescript
|
|
95
|
+
* const adapter = createProductionAdapter({
|
|
96
|
+
* port: 8080,
|
|
97
|
+
* hostname: '0.0.0.0',
|
|
98
|
+
* logger: productionLogger
|
|
99
|
+
* });
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
export declare function createProductionAdapter(options?: ErgenecoreOptions): Ergenecore;
|
|
103
|
+
/**
|
|
104
|
+
* Creates a development-friendly Ergenecore adapter
|
|
105
|
+
*
|
|
106
|
+
* This factory includes:
|
|
107
|
+
* - Verbose console logging
|
|
108
|
+
* - WebSocket support enabled
|
|
109
|
+
* - Default port 3000
|
|
110
|
+
*
|
|
111
|
+
* @param options - Configuration options
|
|
112
|
+
* @returns Development-configured Ergenecore adapter
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```typescript
|
|
116
|
+
* const adapter = createDevelopmentAdapter({
|
|
117
|
+
* port: 3000
|
|
118
|
+
* });
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
export declare function createDevelopmentAdapter(options?: ErgenecoreOptions): Ergenecore;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Factory functions for creating Ergenecore instances
|
|
3
|
+
*
|
|
4
|
+
* Provides convenient factory functions for creating pre-configured
|
|
5
|
+
* Ergenecore adapter instances with sensible defaults.
|
|
6
|
+
*
|
|
7
|
+
* @module factory
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import { createErgenecoreAdapter } from '@asenajs/ergenecore/factory';
|
|
12
|
+
*
|
|
13
|
+
* const adapter = createErgenecoreAdapter({
|
|
14
|
+
* port: 3000,
|
|
15
|
+
* hostname: 'localhost'
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
import { ErgenecoreWebsocketAdapter } from '../ErgenecoreWebsocketAdapter';
|
|
20
|
+
import { Ergenecore } from '../Ergenecore';
|
|
21
|
+
/**
|
|
22
|
+
* Creates a new Ergenecore adapter instance with optional configuration
|
|
23
|
+
*
|
|
24
|
+
* @param options - Configuration options
|
|
25
|
+
* @returns Configured Ergenecore adapter instance
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* // Basic usage with defaults
|
|
30
|
+
* const adapter = createErgenecoreAdapter();
|
|
31
|
+
*
|
|
32
|
+
* // Custom port and hostname
|
|
33
|
+
* const adapter = createErgenecoreAdapter({
|
|
34
|
+
* port: 8080,
|
|
35
|
+
* hostname: '0.0.0.0'
|
|
36
|
+
* });
|
|
37
|
+
*
|
|
38
|
+
* // With custom logger
|
|
39
|
+
* const adapter = createErgenecoreAdapter({
|
|
40
|
+
* logger: customLogger,
|
|
41
|
+
* port: 3000
|
|
42
|
+
* });
|
|
43
|
+
*
|
|
44
|
+
* // Disable WebSocket support
|
|
45
|
+
* const adapter = createErgenecoreAdapter({
|
|
46
|
+
* enableWebSocket: false
|
|
47
|
+
* });
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export function createErgenecoreAdapter(options = {}) {
|
|
51
|
+
const { port = 3000, hostname, logger, enableWebSocket = true, websocketAdapter } = options;
|
|
52
|
+
// Create default logger if not provided
|
|
53
|
+
const adapterLogger = logger || createDefaultLogger();
|
|
54
|
+
// Create WebSocket adapter if enabled
|
|
55
|
+
const wsAdapter = enableWebSocket ? websocketAdapter || new ErgenecoreWebsocketAdapter(adapterLogger) : undefined;
|
|
56
|
+
// Create Ergenecore instance
|
|
57
|
+
const adapter = new Ergenecore(adapterLogger, wsAdapter);
|
|
58
|
+
// Configure port and hostname
|
|
59
|
+
adapter.setPort(port);
|
|
60
|
+
if (hostname) {
|
|
61
|
+
adapter.hostname = hostname;
|
|
62
|
+
}
|
|
63
|
+
return adapter;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Creates a default logger implementation
|
|
67
|
+
*
|
|
68
|
+
* Provides basic console logging for development purposes.
|
|
69
|
+
* In production, you should provide your own logger instance.
|
|
70
|
+
*
|
|
71
|
+
* @returns Default ServerLogger implementation
|
|
72
|
+
*
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
function createDefaultLogger() {
|
|
76
|
+
return {
|
|
77
|
+
info: (message, ...args) => {
|
|
78
|
+
console.log(`[INFO]: ${message}`, ...args);
|
|
79
|
+
},
|
|
80
|
+
error: (message, ...args) => {
|
|
81
|
+
console.error(`[ERROR]: ${message}`, ...args);
|
|
82
|
+
},
|
|
83
|
+
warn: (message, ...args) => {
|
|
84
|
+
console.warn(`[WARN]: ${message}`, ...args);
|
|
85
|
+
},
|
|
86
|
+
profile: (message) => {
|
|
87
|
+
console.time(message);
|
|
88
|
+
return () => console.timeEnd(message);
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Creates a production-ready Ergenecore adapter with optimized settings
|
|
94
|
+
*
|
|
95
|
+
* This factory includes:
|
|
96
|
+
* - Performance-optimized defaults
|
|
97
|
+
* - WebSocket support enabled
|
|
98
|
+
* - Production logging
|
|
99
|
+
*
|
|
100
|
+
* @param options - Configuration options
|
|
101
|
+
* @returns Production-configured Ergenecore adapter
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```typescript
|
|
105
|
+
* const adapter = createProductionAdapter({
|
|
106
|
+
* port: 8080,
|
|
107
|
+
* hostname: '0.0.0.0',
|
|
108
|
+
* logger: productionLogger
|
|
109
|
+
* });
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
export function createProductionAdapter(options = {}) {
|
|
113
|
+
return createErgenecoreAdapter({
|
|
114
|
+
...options,
|
|
115
|
+
enableWebSocket: options.enableWebSocket ?? true,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Creates a development-friendly Ergenecore adapter
|
|
120
|
+
*
|
|
121
|
+
* This factory includes:
|
|
122
|
+
* - Verbose console logging
|
|
123
|
+
* - WebSocket support enabled
|
|
124
|
+
* - Default port 3000
|
|
125
|
+
*
|
|
126
|
+
* @param options - Configuration options
|
|
127
|
+
* @returns Development-configured Ergenecore adapter
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```typescript
|
|
131
|
+
* const adapter = createDevelopmentAdapter({
|
|
132
|
+
* port: 3000
|
|
133
|
+
* });
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
136
|
+
export function createDevelopmentAdapter(options = {}) {
|
|
137
|
+
return createErgenecoreAdapter({
|
|
138
|
+
port: 3000,
|
|
139
|
+
...options,
|
|
140
|
+
logger: options.logger || createDefaultLogger(),
|
|
141
|
+
enableWebSocket: true,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../lib/utils/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAqC3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,uBAAuB,CAAC,UAA6B,EAAE;IACrE,MAAM,EAAE,IAAI,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC;IAE5F,wCAAwC;IACxC,MAAM,aAAa,GAAG,MAAM,IAAI,mBAAmB,EAAE,CAAC;IAEtD,sCAAsC;IACtC,MAAM,SAAS,GAAG,eAAe,CAAC,CAAC,CAAC,gBAAgB,IAAI,IAAI,0BAA0B,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAElH,6BAA6B;IAC7B,MAAM,OAAO,GAAG,IAAI,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;IAEzD,8BAA8B;IAC9B,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC9B,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,mBAAmB;IAC1B,OAAO;QACL,IAAI,EAAE,CAAC,OAAe,EAAE,GAAG,IAAW,EAAE,EAAE;YACxC,OAAO,CAAC,GAAG,CAAC,WAAW,OAAO,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC;QAC7C,CAAC;QACD,KAAK,EAAE,CAAC,OAAe,EAAE,GAAG,IAAW,EAAE,EAAE;YACzC,OAAO,CAAC,KAAK,CAAC,YAAY,OAAO,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC;QAChD,CAAC;QACD,IAAI,EAAE,CAAC,OAAe,EAAE,GAAG,IAAW,EAAE,EAAE;YACxC,OAAO,CAAC,IAAI,CAAC,WAAW,OAAO,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC;QAC9C,CAAC;QACD,OAAO,EAAE,CAAC,OAAe,EAAE,EAAE;YAC3B,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACtB,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACxC,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,uBAAuB,CAAC,UAA6B,EAAE;IACrE,OAAO,uBAAuB,CAAC;QAC7B,GAAG,OAAO;QACV,eAAe,EAAE,OAAO,CAAC,eAAe,IAAI,IAAI;KACjD,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,wBAAwB,CAAC,UAA6B,EAAE;IACtE,OAAO,uBAAuB,CAAC;QAC7B,IAAI,EAAE,IAAI;QACV,GAAG,OAAO;QACV,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,mBAAmB,EAAE;QAC/C,eAAe,EAAE,IAAI;KACtB,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@asenajs/ergenecore",
|
|
3
|
+
"module": "index.ts",
|
|
4
|
+
"description": "Ergenecore is native bun server adapter for asenajs",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"README.md",
|
|
10
|
+
"LICENSE"
|
|
11
|
+
],
|
|
12
|
+
"version": "1.0.0",
|
|
13
|
+
"author": "LibirSoft",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "bun test",
|
|
17
|
+
"test:watch": "bun test --watch",
|
|
18
|
+
"test:coverage": "bun test --coverage",
|
|
19
|
+
"build": "bun run clean && tsc",
|
|
20
|
+
"clean": "rm -rf dist",
|
|
21
|
+
"prepublishOnly": "bun run build",
|
|
22
|
+
"benchmark": "bun run benchmark/run-benchmark.ts",
|
|
23
|
+
"benchmark:native": "bun run benchmark/native-bun.ts",
|
|
24
|
+
"benchmark:ergenecore": "bun run benchmark/ergenecore.ts"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@changesets/cli": "^2.29.7",
|
|
28
|
+
"@types/bun": "latest",
|
|
29
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
30
|
+
"eslint": "^8.57.1",
|
|
31
|
+
"eslint-config-alloy": "^5.1.2",
|
|
32
|
+
"eslint-config-prettier": "^9.1.2",
|
|
33
|
+
"eslint-plugin-alloy": "^1.2.1",
|
|
34
|
+
"eslint-plugin-import": "^2.32.0",
|
|
35
|
+
"eslint-plugin-n": "^16.6.2",
|
|
36
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
37
|
+
"eslint-plugin-promise": "^6.6.0",
|
|
38
|
+
"prettier": "^3.6.2"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"@asenajs/asena": "^0.4.0",
|
|
42
|
+
"typescript": "^5.8.2"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"zod": "^4.1.12"
|
|
46
|
+
}
|
|
47
|
+
}
|