xypriss 4.4.4 → 4.6.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/README.md +3 -0
- package/dist/cjs/mods/security/src/components/cache/index.js +0 -24
- package/dist/cjs/mods/security/src/components/cache/index.js.map +1 -1
- package/dist/cjs/mods/security/src/components/cache/useCache.js +6 -3
- package/dist/cjs/mods/security/src/components/cache/useCache.js.map +1 -1
- package/dist/cjs/shared/logger/Logger.js +3 -1
- package/dist/cjs/shared/logger/Logger.js.map +1 -1
- package/dist/cjs/src/config.js +18 -0
- package/dist/cjs/src/config.js.map +1 -1
- package/dist/cjs/src/const.js +310 -0
- package/dist/cjs/src/const.js.map +1 -0
- package/dist/cjs/src/index.js +8 -13
- package/dist/cjs/src/index.js.map +1 -1
- package/dist/cjs/src/server/FastServer.js +79 -7
- package/dist/cjs/src/server/FastServer.js.map +1 -1
- package/dist/cjs/src/sys.js +16 -0
- package/dist/cjs/src/sys.js.map +1 -1
- package/dist/esm/mods/security/src/components/cache/index.js +0 -24
- package/dist/esm/mods/security/src/components/cache/index.js.map +1 -1
- package/dist/esm/mods/security/src/components/cache/useCache.js +6 -3
- package/dist/esm/mods/security/src/components/cache/useCache.js.map +1 -1
- package/dist/esm/shared/logger/Logger.js +3 -1
- package/dist/esm/shared/logger/Logger.js.map +1 -1
- package/dist/esm/src/config.js +18 -1
- package/dist/esm/src/config.js.map +1 -1
- package/dist/esm/src/const.js +307 -0
- package/dist/esm/src/const.js.map +1 -0
- package/dist/esm/src/index.js +4 -12
- package/dist/esm/src/index.js.map +1 -1
- package/dist/esm/src/server/FastServer.js +80 -7
- package/dist/esm/src/server/FastServer.js.map +1 -1
- package/dist/esm/src/sys.js +16 -1
- package/dist/esm/src/sys.js.map +1 -1
- package/dist/index.d.ts +354 -138
- package/package.json +3 -2
package/dist/esm/src/sys.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sys.js","sources":["../../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AAA,CAAC,CAAC;AACX,CAAC;AAED;;AAEG;AACU,MAAA,OAAO,GAAI,UAAkB,CAAC;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4090,6 +4090,261 @@ declare class XyPrissSys {
|
|
|
4090
4090
|
*/
|
|
4091
4091
|
$clone(): XyPrissSys;
|
|
4092
4092
|
}
|
|
4093
|
+
/**
|
|
4094
|
+
* Default instance for easy access
|
|
4095
|
+
*/
|
|
4096
|
+
declare const __sys__: XyPrissSys;
|
|
4097
|
+
|
|
4098
|
+
/**
|
|
4099
|
+
* XyPriss Configuration Manager
|
|
4100
|
+
*
|
|
4101
|
+
* Provides a safe way to access and update XyPriss configurations
|
|
4102
|
+
* without encountering "cannot access before initialization" errors.
|
|
4103
|
+
*
|
|
4104
|
+
* This class acts as a singleton configuration store that can be used
|
|
4105
|
+
* in modular structures where accessing `app.configs` directly might
|
|
4106
|
+
* cause initialization timing issues.
|
|
4107
|
+
*
|
|
4108
|
+
* **IMPORTANT**: This is the SINGLE SOURCE OF TRUTH for all XyPriss configurations.
|
|
4109
|
+
* All components should use `Configs.get()` to access configuration values
|
|
4110
|
+
* instead of copying values during initialization.
|
|
4111
|
+
*
|
|
4112
|
+
* @example
|
|
4113
|
+
* ```typescript
|
|
4114
|
+
* import { Configs } from 'xypriss';
|
|
4115
|
+
*
|
|
4116
|
+
* // Set configuration
|
|
4117
|
+
* Configs.set({
|
|
4118
|
+
* fileUpload: {
|
|
4119
|
+
* enabled: true,
|
|
4120
|
+
* maxFileSize: 5 * 1024 * 1024
|
|
4121
|
+
* }
|
|
4122
|
+
* });
|
|
4123
|
+
*
|
|
4124
|
+
* // Get configuration
|
|
4125
|
+
* const fileUploadConfig = Configs.get('fileUpload');
|
|
4126
|
+
*
|
|
4127
|
+
* // Get entire config
|
|
4128
|
+
* const allConfigs = Configs.getAll();
|
|
4129
|
+
*
|
|
4130
|
+
* // Update specific config (updates the source of truth)
|
|
4131
|
+
* Configs.update('fileUpload', { maxFileSize: 10 * 1024 * 1024 });
|
|
4132
|
+
* ```
|
|
4133
|
+
*/
|
|
4134
|
+
|
|
4135
|
+
/**
|
|
4136
|
+
* Configuration Manager Class
|
|
4137
|
+
* Singleton pattern for managing XyPriss configurations
|
|
4138
|
+
*/
|
|
4139
|
+
declare class ConfigurationManager {
|
|
4140
|
+
private static instance;
|
|
4141
|
+
private config;
|
|
4142
|
+
private initialized;
|
|
4143
|
+
/**
|
|
4144
|
+
* Private constructor to enforce singleton pattern
|
|
4145
|
+
* Initializes with default configuration
|
|
4146
|
+
*/
|
|
4147
|
+
private constructor();
|
|
4148
|
+
/**
|
|
4149
|
+
* Get the singleton instance
|
|
4150
|
+
*/
|
|
4151
|
+
private static getInstance;
|
|
4152
|
+
/**
|
|
4153
|
+
* Set the entire configuration
|
|
4154
|
+
* @param config - XP Server configuration options
|
|
4155
|
+
*/
|
|
4156
|
+
static set(config: ServerOptions): void;
|
|
4157
|
+
/**
|
|
4158
|
+
* Get a specific configuration section
|
|
4159
|
+
* @param key - Configuration key (e.g., 'fileUpload', 'security', 'cache')
|
|
4160
|
+
* @returns The configuration value for the specified key
|
|
4161
|
+
*/
|
|
4162
|
+
static get<K extends keyof ServerOptions>(key: K): ServerOptions[K];
|
|
4163
|
+
/**
|
|
4164
|
+
* Get the entire configuration object
|
|
4165
|
+
* @returns Complete XyPriss Server Configuration (XPSC)
|
|
4166
|
+
*/
|
|
4167
|
+
static getAll(): ServerOptions;
|
|
4168
|
+
/**
|
|
4169
|
+
* Update a specific XyPriss configuration section (deep merge)
|
|
4170
|
+
* @param key - Configuration key to update
|
|
4171
|
+
* @param value - Partial value to merge with existing configuration
|
|
4172
|
+
*/
|
|
4173
|
+
static update<K extends keyof ServerOptions>(key: K, value: Partial<ServerOptions[K]>): void;
|
|
4174
|
+
/**
|
|
4175
|
+
* Deep merge helper function
|
|
4176
|
+
* @param target - Target object
|
|
4177
|
+
* @param source - Source object to merge
|
|
4178
|
+
* @returns Merged object
|
|
4179
|
+
*/
|
|
4180
|
+
private static deepMerge;
|
|
4181
|
+
/**
|
|
4182
|
+
* Merge configuration with existing config (deep merge)
|
|
4183
|
+
* @param config - Partial configuration to merge
|
|
4184
|
+
*/
|
|
4185
|
+
static merge(config: Partial<ServerOptions>): void;
|
|
4186
|
+
/**
|
|
4187
|
+
* Check if configuration has been initialized
|
|
4188
|
+
* @returns true if configuration has been set, false otherwise
|
|
4189
|
+
*/
|
|
4190
|
+
static isInitialized(): boolean;
|
|
4191
|
+
/**
|
|
4192
|
+
* Reset configuration to empty state
|
|
4193
|
+
* Useful for testing or reinitializing
|
|
4194
|
+
*/
|
|
4195
|
+
static reset(): void;
|
|
4196
|
+
/**
|
|
4197
|
+
* Check if a specific configuration section exists
|
|
4198
|
+
* @param key - Configuration key to check
|
|
4199
|
+
* @returns true if the configuration section exists
|
|
4200
|
+
*/
|
|
4201
|
+
static has<K extends keyof ServerOptions>(key: K): boolean;
|
|
4202
|
+
/**
|
|
4203
|
+
* Get configuration with a default value if not set
|
|
4204
|
+
* @param key - Configuration key
|
|
4205
|
+
* @param defaultValue - Default value to return if key doesn't exist
|
|
4206
|
+
* @returns Configuration value or default value
|
|
4207
|
+
*/
|
|
4208
|
+
static getOrDefault<K extends keyof ServerOptions>(key: K, defaultValue: ServerOptions[K]): ServerOptions[K];
|
|
4209
|
+
/**
|
|
4210
|
+
* Delete a specific configuration section
|
|
4211
|
+
* @param key - Configuration key to delete
|
|
4212
|
+
*/
|
|
4213
|
+
static delete<K extends keyof ServerOptions>(key: K): void;
|
|
4214
|
+
}
|
|
4215
|
+
|
|
4216
|
+
/**
|
|
4217
|
+
* Default instance for easy access
|
|
4218
|
+
*/
|
|
4219
|
+
declare const __cfg__: typeof ConfigurationManager;
|
|
4220
|
+
|
|
4221
|
+
/**************************************************************************************************************************************************************
|
|
4222
|
+
* This code contains proprietary source code from NEHONIX
|
|
4223
|
+
*
|
|
4224
|
+
* @author Nehonix
|
|
4225
|
+
* @license NOSL
|
|
4226
|
+
* @version v1.0
|
|
4227
|
+
* @see {@link https://dll.nehonix.com/licenses/NOSL}
|
|
4228
|
+
*
|
|
4229
|
+
* Copyright (c) 2025 Nehonix. All rights reserved.
|
|
4230
|
+
*
|
|
4231
|
+
*
|
|
4232
|
+
* This License governs the use, modification, and distribution of software provided by NEHONIX under its open source projects.
|
|
4233
|
+
* NEHONIX is committed to fostering collaborative innovation while strictly protecting its intellectual property rights.
|
|
4234
|
+
* Violation of any term of this License will result in immediate termination of all granted rights and may subject the violator to legal action.
|
|
4235
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY,
|
|
4236
|
+
* FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
|
4237
|
+
* IN NO EVENT SHALL NEHONIX BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ARISING FROM THE USE
|
|
4238
|
+
* OR INABILITY TO USE THE SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
4239
|
+
************************************************************************************************************************************************************** */
|
|
4240
|
+
/**
|
|
4241
|
+
* XyPriss Constant Variables Class
|
|
4242
|
+
*
|
|
4243
|
+
* Provides a mechanism to store immutable values that cannot be changed once set.
|
|
4244
|
+
* This is useful for protecting critical application constants from being
|
|
4245
|
+
* modified by plugins or other modules at runtime.
|
|
4246
|
+
*
|
|
4247
|
+
* @class XyPrissConst
|
|
4248
|
+
* @version 2.0.0
|
|
4249
|
+
*/
|
|
4250
|
+
declare class XyPrissConst {
|
|
4251
|
+
private constants;
|
|
4252
|
+
private immutableCache;
|
|
4253
|
+
/**
|
|
4254
|
+
* Make a value deeply immutable using Proxy protection.
|
|
4255
|
+
* This ACTIVELY blocks any modification attempts with clear error messages.
|
|
4256
|
+
* Works with objects, arrays, Maps, Sets, and nested structures.
|
|
4257
|
+
*
|
|
4258
|
+
* @template T - Type of the value to freeze
|
|
4259
|
+
* @param {T} value - The value to make immutable
|
|
4260
|
+
* @param {string} [path] - Internal path tracking for error messages
|
|
4261
|
+
* @returns {T} The deeply protected immutable value
|
|
4262
|
+
*
|
|
4263
|
+
* @example
|
|
4264
|
+
* ```typescript
|
|
4265
|
+
* const config = __const__.$make({
|
|
4266
|
+
* server: { port: 8080, host: 'localhost' },
|
|
4267
|
+
* features: ['auth', 'logging']
|
|
4268
|
+
* });
|
|
4269
|
+
* config.server.port = 9000; // ❌ THROWS ERROR IMMEDIATELY
|
|
4270
|
+
* ```
|
|
4271
|
+
*/
|
|
4272
|
+
$make<T>(value: T, path?: string): T;
|
|
4273
|
+
/**
|
|
4274
|
+
* Define a new constant.
|
|
4275
|
+
* Throws an error if the constant is already defined.
|
|
4276
|
+
* Automatically makes the value deeply immutable.
|
|
4277
|
+
*
|
|
4278
|
+
* @param {string} key - The unique identifier for the constant
|
|
4279
|
+
* @param {any} value - The value to store (will be made immutable)
|
|
4280
|
+
* @throws {Error} If the key already exists
|
|
4281
|
+
*
|
|
4282
|
+
* @example
|
|
4283
|
+
* ```typescript
|
|
4284
|
+
* __const__.$set('APP_CONFIG', {
|
|
4285
|
+
* database: { host: 'localhost', port: 5432 }
|
|
4286
|
+
* });
|
|
4287
|
+
* ```
|
|
4288
|
+
*/
|
|
4289
|
+
$set(key: string, value: any): void;
|
|
4290
|
+
/**
|
|
4291
|
+
* Retrieve a constant value.
|
|
4292
|
+
*
|
|
4293
|
+
* @template T - Expected type of the constant
|
|
4294
|
+
* @param {string} key - The identifier of the constant
|
|
4295
|
+
* @param {T} [defaultValue] - Optional fallback value if not found
|
|
4296
|
+
* @returns {T} The constant value or default
|
|
4297
|
+
*
|
|
4298
|
+
* @example
|
|
4299
|
+
* ```typescript
|
|
4300
|
+
* const appId = __const__.$get('APP_ID');
|
|
4301
|
+
* ```
|
|
4302
|
+
*/
|
|
4303
|
+
$get<T = any>(key: string, defaultValue?: T): T;
|
|
4304
|
+
/**
|
|
4305
|
+
* Check if a constant is defined.
|
|
4306
|
+
*
|
|
4307
|
+
* @param {string} key - The identifier to check
|
|
4308
|
+
* @returns {boolean} True if the constant exists
|
|
4309
|
+
*/
|
|
4310
|
+
$has(key: string): boolean;
|
|
4311
|
+
/**
|
|
4312
|
+
* Export all constants as a plain object.
|
|
4313
|
+
* Note: Returns a frozen snapshot, not the proxy-protected originals.
|
|
4314
|
+
*
|
|
4315
|
+
* @returns {Record<string, any>}
|
|
4316
|
+
*/
|
|
4317
|
+
$toJSON(): Record<string, any>;
|
|
4318
|
+
/**
|
|
4319
|
+
* Delete a constant (use with extreme caution).
|
|
4320
|
+
* This is primarily for testing purposes.
|
|
4321
|
+
*
|
|
4322
|
+
* @param {string} key - The identifier to delete
|
|
4323
|
+
* @returns {boolean} True if the constant was deleted
|
|
4324
|
+
*/
|
|
4325
|
+
$delete(key: string): boolean;
|
|
4326
|
+
/**
|
|
4327
|
+
* Clear all constants (use with extreme caution).
|
|
4328
|
+
* This is primarily for testing purposes.
|
|
4329
|
+
*/
|
|
4330
|
+
$clear(): void;
|
|
4331
|
+
/**
|
|
4332
|
+
* Get the total number of constants stored.
|
|
4333
|
+
*
|
|
4334
|
+
* @returns {number} The count of constants
|
|
4335
|
+
*/
|
|
4336
|
+
$size(): number;
|
|
4337
|
+
/**
|
|
4338
|
+
* List all constant keys.
|
|
4339
|
+
*
|
|
4340
|
+
* @returns {string[]} Array of all constant keys
|
|
4341
|
+
*/
|
|
4342
|
+
$keys(): string[];
|
|
4343
|
+
}
|
|
4344
|
+
/**
|
|
4345
|
+
* Default instance for easy access
|
|
4346
|
+
*/
|
|
4347
|
+
declare const __const__: XyPrissConst;
|
|
4093
4348
|
|
|
4094
4349
|
/**
|
|
4095
4350
|
* @fileoverview Main export file for XyPrissJS Express integration types
|
|
@@ -4116,30 +4371,102 @@ declare class XyPrissSys {
|
|
|
4116
4371
|
*/
|
|
4117
4372
|
|
|
4118
4373
|
declare global {
|
|
4119
|
-
const Bun: {
|
|
4120
|
-
spawn: (options: {
|
|
4121
|
-
cmd: string[];
|
|
4122
|
-
env?: Record<string, string>;
|
|
4123
|
-
stdio?: string[];
|
|
4124
|
-
}) => BunSubprocess;
|
|
4125
|
-
};
|
|
4126
4374
|
/**
|
|
4127
|
-
*
|
|
4128
|
-
*
|
|
4375
|
+
* **XyPriss System Variables Manager (`__sys__`)**
|
|
4376
|
+
*
|
|
4377
|
+
* Provides centralized access to system-level variables, environment detection, and dynamic
|
|
4378
|
+
* configuration management. This global instance serves as a type-safe wrapper around
|
|
4379
|
+
* application metadata and environment utilities.
|
|
4380
|
+
*
|
|
4381
|
+
* @global
|
|
4382
|
+
* @type {XyPrissSys}
|
|
4383
|
+
*
|
|
4384
|
+
* @example
|
|
4385
|
+
* ```typescript
|
|
4386
|
+
* // Environment Detection
|
|
4387
|
+
* if (__sys__.$isProduction()) {
|
|
4388
|
+
* console.log("Running in production mode");
|
|
4389
|
+
* }
|
|
4390
|
+
*
|
|
4391
|
+
* // Dynamic Variable Management
|
|
4392
|
+
* __sys__.$add("appName", "MyXyPrissApp");
|
|
4393
|
+
* const version = __sys__.$get("version", "1.0.0");
|
|
4394
|
+
*
|
|
4395
|
+
* // Bulk Update
|
|
4396
|
+
* __sys__.$update({
|
|
4397
|
+
* author: "Nehonix",
|
|
4398
|
+
* debug: true
|
|
4399
|
+
* });
|
|
4400
|
+
* ```
|
|
4401
|
+
*
|
|
4402
|
+
* @see {@link https://github.com/Nehonix-Team/XyPriss/blob/master/docs/features/sys-globals.md}
|
|
4129
4403
|
*/
|
|
4130
4404
|
var __sys__: XyPrissSys;
|
|
4405
|
+
/**
|
|
4406
|
+
* **XyPriss Configuration Manager (`__cfg__`)**
|
|
4407
|
+
*
|
|
4408
|
+
* A singleton interface for managing the core XyPriss server configuration.
|
|
4409
|
+
* It handles deep merging of options, default values, and provides a single source
|
|
4410
|
+
* of truth for all server components (security, performance, routing, etc.).
|
|
4411
|
+
*
|
|
4412
|
+
* @global
|
|
4413
|
+
* @type {typeof Configs}
|
|
4414
|
+
*
|
|
4415
|
+
* @example
|
|
4416
|
+
* ```typescript
|
|
4417
|
+
* // Accessing Configuration
|
|
4418
|
+
* const serverPort = __cfg__.get("server")?.port;
|
|
4419
|
+
* const isSecurityEnabled = __cfg__.get("security")?.enabled;
|
|
4420
|
+
*
|
|
4421
|
+
* // Updating Configuration (Deep Merge)
|
|
4422
|
+
* __cfg__.update("performance", {
|
|
4423
|
+
* slowRequestThreshold: 1000
|
|
4424
|
+
* });
|
|
4425
|
+
*
|
|
4426
|
+
* // Check Initialization State
|
|
4427
|
+
* if (__cfg__.isInitialized()) {
|
|
4428
|
+
* console.log("Server configuration is ready");
|
|
4429
|
+
* }
|
|
4430
|
+
* ```
|
|
4431
|
+
*
|
|
4432
|
+
* @see {@link https://github.com/Nehonix-Team/XyPriss/blob/master/docs/CFG_API.md}
|
|
4433
|
+
*/
|
|
4434
|
+
var __cfg__: typeof ConfigurationManager;
|
|
4435
|
+
/**
|
|
4436
|
+
* **XyPriss Immutable Constants (`__const__`)**
|
|
4437
|
+
*
|
|
4438
|
+
* A global registry for immutable application constants. Once a value is set
|
|
4439
|
+
* via `__const__.$set()`, it cannot be modified or redefined, ensuring
|
|
4440
|
+
* data integrity across the entire application lifecycle.
|
|
4441
|
+
*
|
|
4442
|
+
* @global
|
|
4443
|
+
* @type {XyPrissConst}
|
|
4444
|
+
*
|
|
4445
|
+
* @example
|
|
4446
|
+
* ```typescript
|
|
4447
|
+
* // Defining a constant (only once)
|
|
4448
|
+
* __const__.$set('SERVER_PORT', 8080);
|
|
4449
|
+
*
|
|
4450
|
+
* // Attempting to redefine will throw an error
|
|
4451
|
+
* try {
|
|
4452
|
+
* __const__.$set('SERVER_PORT', 9000);
|
|
4453
|
+
* } catch (e) {
|
|
4454
|
+
* console.error(e.message); // Cannot redefine constant "SERVER_PORT"
|
|
4455
|
+
* }
|
|
4456
|
+
*
|
|
4457
|
+
* // Accessing a constant
|
|
4458
|
+
* const port = __const__.$get('SERVER_PORT');
|
|
4459
|
+
*
|
|
4460
|
+
* // Making an object deeply immutable
|
|
4461
|
+
* const config = __const__.$make({ port: 8080 });
|
|
4462
|
+
* config.port = 9000; // Throws error!
|
|
4463
|
+
* ```
|
|
4464
|
+
*@see {@link https://github.com/Nehonix-Team/XyPriss/blob/master/docs/CONST_API.md}
|
|
4465
|
+
* @see {@link https://github.com/Nehonix-Team/XyPriss/blob/master/docs/GLOBAL_APIS.md}
|
|
4466
|
+
*/
|
|
4467
|
+
var __const__: XyPrissConst;
|
|
4131
4468
|
}
|
|
4132
4469
|
|
|
4133
|
-
type BunSubprocess = {
|
|
4134
|
-
exited: Promise<number | null>;
|
|
4135
|
-
kill: (signal?: string) => void;
|
|
4136
|
-
killed: boolean;
|
|
4137
|
-
pid: number;
|
|
4138
|
-
stdout?: ReadableStream<Uint8Array>;
|
|
4139
|
-
stderr?: ReadableStream<Uint8Array>;
|
|
4140
|
-
stdin?: WritableStream<Uint8Array>;
|
|
4141
|
-
};
|
|
4142
|
-
|
|
4143
4470
|
/**
|
|
4144
4471
|
* XyPrissJS Cluster Manager
|
|
4145
4472
|
* cluster management for Express applications with advanced monitoring
|
|
@@ -5631,6 +5958,13 @@ declare class XyPrissServer {
|
|
|
5631
5958
|
* @returns Promise<boolean> - true if successful, false if failed
|
|
5632
5959
|
*/
|
|
5633
5960
|
forceClosePort(port: number): Promise<boolean>;
|
|
5961
|
+
/**
|
|
5962
|
+
* Setup graceful shutdown handlers for process signals
|
|
5963
|
+
*/
|
|
5964
|
+
private setupGracefulShutdown;
|
|
5965
|
+
/**
|
|
5966
|
+
* Stop the server gracefully
|
|
5967
|
+
*/
|
|
5634
5968
|
stop(): Promise<void>;
|
|
5635
5969
|
}
|
|
5636
5970
|
|
|
@@ -8007,124 +8341,6 @@ interface FileUploadConfig {
|
|
|
8007
8341
|
};
|
|
8008
8342
|
}
|
|
8009
8343
|
|
|
8010
|
-
/**
|
|
8011
|
-
* XyPriss Configuration Manager
|
|
8012
|
-
*
|
|
8013
|
-
* Provides a safe way to access and update XyPriss configurations
|
|
8014
|
-
* without encountering "cannot access before initialization" errors.
|
|
8015
|
-
*
|
|
8016
|
-
* This class acts as a singleton configuration store that can be used
|
|
8017
|
-
* in modular structures where accessing `app.configs` directly might
|
|
8018
|
-
* cause initialization timing issues.
|
|
8019
|
-
*
|
|
8020
|
-
* **IMPORTANT**: This is the SINGLE SOURCE OF TRUTH for all XyPriss configurations.
|
|
8021
|
-
* All components should use `Configs.get()` to access configuration values
|
|
8022
|
-
* instead of copying values during initialization.
|
|
8023
|
-
*
|
|
8024
|
-
* @example
|
|
8025
|
-
* ```typescript
|
|
8026
|
-
* import { Configs } from 'xypriss';
|
|
8027
|
-
*
|
|
8028
|
-
* // Set configuration
|
|
8029
|
-
* Configs.set({
|
|
8030
|
-
* fileUpload: {
|
|
8031
|
-
* enabled: true,
|
|
8032
|
-
* maxFileSize: 5 * 1024 * 1024
|
|
8033
|
-
* }
|
|
8034
|
-
* });
|
|
8035
|
-
*
|
|
8036
|
-
* // Get configuration
|
|
8037
|
-
* const fileUploadConfig = Configs.get('fileUpload');
|
|
8038
|
-
*
|
|
8039
|
-
* // Get entire config
|
|
8040
|
-
* const allConfigs = Configs.getAll();
|
|
8041
|
-
*
|
|
8042
|
-
* // Update specific config (updates the source of truth)
|
|
8043
|
-
* Configs.update('fileUpload', { maxFileSize: 10 * 1024 * 1024 });
|
|
8044
|
-
* ```
|
|
8045
|
-
*/
|
|
8046
|
-
|
|
8047
|
-
/**
|
|
8048
|
-
* Configuration Manager Class
|
|
8049
|
-
* Singleton pattern for managing XyPriss configurations
|
|
8050
|
-
*/
|
|
8051
|
-
declare class ConfigurationManager {
|
|
8052
|
-
private static instance;
|
|
8053
|
-
private config;
|
|
8054
|
-
private initialized;
|
|
8055
|
-
/**
|
|
8056
|
-
* Private constructor to enforce singleton pattern
|
|
8057
|
-
* Initializes with default configuration
|
|
8058
|
-
*/
|
|
8059
|
-
private constructor();
|
|
8060
|
-
/**
|
|
8061
|
-
* Get the singleton instance
|
|
8062
|
-
*/
|
|
8063
|
-
private static getInstance;
|
|
8064
|
-
/**
|
|
8065
|
-
* Set the entire configuration
|
|
8066
|
-
* @param config - XP Server configuration options
|
|
8067
|
-
*/
|
|
8068
|
-
static set(config: ServerOptions): void;
|
|
8069
|
-
/**
|
|
8070
|
-
* Get a specific configuration section
|
|
8071
|
-
* @param key - Configuration key (e.g., 'fileUpload', 'security', 'cache')
|
|
8072
|
-
* @returns The configuration value for the specified key
|
|
8073
|
-
*/
|
|
8074
|
-
static get<K extends keyof ServerOptions>(key: K): ServerOptions[K];
|
|
8075
|
-
/**
|
|
8076
|
-
* Get the entire configuration object
|
|
8077
|
-
* @returns Complete XyPriss Server Configuration (XPSC)
|
|
8078
|
-
*/
|
|
8079
|
-
static getAll(): ServerOptions;
|
|
8080
|
-
/**
|
|
8081
|
-
* Update a specific XyPriss configuration section (deep merge)
|
|
8082
|
-
* @param key - Configuration key to update
|
|
8083
|
-
* @param value - Partial value to merge with existing configuration
|
|
8084
|
-
*/
|
|
8085
|
-
static update<K extends keyof ServerOptions>(key: K, value: Partial<ServerOptions[K]>): void;
|
|
8086
|
-
/**
|
|
8087
|
-
* Deep merge helper function
|
|
8088
|
-
* @param target - Target object
|
|
8089
|
-
* @param source - Source object to merge
|
|
8090
|
-
* @returns Merged object
|
|
8091
|
-
*/
|
|
8092
|
-
private static deepMerge;
|
|
8093
|
-
/**
|
|
8094
|
-
* Merge configuration with existing config (deep merge)
|
|
8095
|
-
* @param config - Partial configuration to merge
|
|
8096
|
-
*/
|
|
8097
|
-
static merge(config: Partial<ServerOptions>): void;
|
|
8098
|
-
/**
|
|
8099
|
-
* Check if configuration has been initialized
|
|
8100
|
-
* @returns true if configuration has been set, false otherwise
|
|
8101
|
-
*/
|
|
8102
|
-
static isInitialized(): boolean;
|
|
8103
|
-
/**
|
|
8104
|
-
* Reset configuration to empty state
|
|
8105
|
-
* Useful for testing or reinitializing
|
|
8106
|
-
*/
|
|
8107
|
-
static reset(): void;
|
|
8108
|
-
/**
|
|
8109
|
-
* Check if a specific configuration section exists
|
|
8110
|
-
* @param key - Configuration key to check
|
|
8111
|
-
* @returns true if the configuration section exists
|
|
8112
|
-
*/
|
|
8113
|
-
static has<K extends keyof ServerOptions>(key: K): boolean;
|
|
8114
|
-
/**
|
|
8115
|
-
* Get configuration with a default value if not set
|
|
8116
|
-
* @param key - Configuration key
|
|
8117
|
-
* @param defaultValue - Default value to return if key doesn't exist
|
|
8118
|
-
* @returns Configuration value or default value
|
|
8119
|
-
*/
|
|
8120
|
-
static getOrDefault<K extends keyof ServerOptions>(key: K, defaultValue: ServerOptions[K]): ServerOptions[K];
|
|
8121
|
-
/**
|
|
8122
|
-
* Delete a specific configuration section
|
|
8123
|
-
* @param key - Configuration key to delete
|
|
8124
|
-
*/
|
|
8125
|
-
static delete<K extends keyof ServerOptions>(key: K): void;
|
|
8126
|
-
}
|
|
8127
|
-
|
|
8128
8344
|
/**
|
|
8129
8345
|
* Initialize the global file upload manager (legacy)
|
|
8130
8346
|
* This is called automatically when the server starts with file upload enabled
|
|
@@ -13304,5 +13520,5 @@ declare class TrustProxy {
|
|
|
13304
13520
|
*/
|
|
13305
13521
|
declare function Router(): XyPrissRouter;
|
|
13306
13522
|
|
|
13307
|
-
export { ConfigurationManager as CM, CachePlugin as CachePluginBase, CompressionPlugin, ConfigurationManager as Configs, ConnectionPlugin, DEFAULT_PLUGIN_CONFIG, FileUploadAPI as FLA, FileUploadAPI, JWTAuthPlugin, NetworkCategory, NetworkPlugin, NetworkPluginFactory, NetworkPluginUtils, PERFORMANCE_TARGETS, PLUGIN_SYSTEM_NAME, PLUGIN_SYSTEM_VERSION, PerformanceMonitor, PerformancePlugin as PerformancePluginBase, Plugin, PluginDevelopmentHelpers, PluginEngine, PluginEventType, PluginPriority, PluginRegistry, PluginSystemFactory, PluginSystemUtils, PluginType, ProxyPlugin, RateLimitPlugin, ResponseTimePlugin, Route, Router, SecurityMiddleware, SecurityPlugin as SecurityPluginBase, SmartCachePlugin, TrustProxy, Upload, XJsonResponseHandler, XyPrissRouter, createCacheMiddleware, createCircularRefDebugger, createOptimalCache, createSafeJsonMiddleware, createServer, createServerInstance, expressStringify, fastStringify, initializeFileUpload, quickServer, safeJsonStringify, safeStringify, sendSafeJson, setupSafeJson, uploadAny, uploadArray, uploadFields, uploadSingle };
|
|
13523
|
+
export { ConfigurationManager as CM, CachePlugin as CachePluginBase, CompressionPlugin, ConfigurationManager as Configs, ConnectionPlugin, DEFAULT_PLUGIN_CONFIG, FileUploadAPI as FLA, FileUploadAPI, JWTAuthPlugin, NetworkCategory, NetworkPlugin, NetworkPluginFactory, NetworkPluginUtils, PERFORMANCE_TARGETS, PLUGIN_SYSTEM_NAME, PLUGIN_SYSTEM_VERSION, PerformanceMonitor, PerformancePlugin as PerformancePluginBase, Plugin, PluginDevelopmentHelpers, PluginEngine, PluginEventType, PluginPriority, PluginRegistry, PluginSystemFactory, PluginSystemUtils, PluginType, ProxyPlugin, RateLimitPlugin, ResponseTimePlugin, Route, Router, SecurityMiddleware, SecurityPlugin as SecurityPluginBase, SmartCachePlugin, TrustProxy, Upload, XJsonResponseHandler, XyPrissRouter, __cfg__, __const__, __sys__, createCacheMiddleware, createCircularRefDebugger, createOptimalCache, createSafeJsonMiddleware, createServer, createServerInstance, expressStringify, fastStringify, initializeFileUpload, quickServer, safeJsonStringify, safeStringify, sendSafeJson, setupSafeJson, uploadAny, uploadArray, uploadFields, uploadSingle };
|
|
13308
13524
|
export type { BasePlugin, CacheConfig, CachePlugin$1 as CachePlugin, CompressionAlgorithm, CompressionConfig, ConnectionConfig, FailoverConfig, FileUploadConfig as FiUpConfig, FileUploadConfig, HTTPCacheConfig, HealthCheckConfig, CachePlugin$1 as ICachePlugin, PerformancePlugin$1 as IPerformancePlugin, SecurityPlugin$1 as ISecurityPlugin, LoadBalancingStrategy, MultiServerApp, MultiServerConfig, NativePlugin, NetworkExecutionContext, NetworkExecutionResult, NetworkHealthStatus, NetworkPluginConfig, NetworkSecurityConfig, NextFunction, PerformanceConfig, PerformanceMetrics, PerformancePlugin$1 as PerformancePlugin, PluginConfiguration, PluginCreator, PluginEvent, PluginExecutionContext, PluginExecutionResult, PluginExecutionStats, PluginInitializationContext, PluginRegistryConfig, ProxyConfig, RateLimitConfig, RateLimitRule, RateLimitStrategy, RedisConfig, XyPrisRequest as Request, RequestHandler, XyPrisResponse as Response, RouteConfig, RouteOptions, SecurityConfig, SecurityPlugin$1 as SecurityPlugin, ServerOptions, SmartRouteConfig, TrustProxyValue$1 as TrustProxyValue, UltraFastApp, UpstreamServer, WebSocketConfig, MultiServerApp as XyPMS, XyPrissPlugin, XyPrisRequest as XyPrissRequest, XyPrisResponse as XyPrissResponse };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xypriss",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "XyPriss is a lightweight, TypeScript-first, open-source Node.js web framework crafted for developers seeking a familiar Express-like API without Express dependencies. It features built-in security middleware, a robust routing system, and performance optimizations to build scalable, secure web applications effortlessly. Join our community and contribute on GitHub!",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -268,6 +268,7 @@
|
|
|
268
268
|
"ws": "^8.18.2",
|
|
269
269
|
"xss": "^1.0.15",
|
|
270
270
|
"xypriss-compression-pluging": "^1.0.3",
|
|
271
|
-
"xypriss-security": "^1.1.
|
|
271
|
+
"xypriss-security": "^1.1.14"
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
+
|