@noxfly/noxus 2.2.0 → 2.3.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/dist/app-injector-B3MvgV3k.d.mts +95 -0
- package/dist/app-injector-B3MvgV3k.d.ts +95 -0
- package/dist/child.d.mts +209 -0
- package/dist/child.d.ts +209 -0
- package/dist/child.js +1426 -0
- package/dist/child.mjs +1356 -0
- package/dist/{index-Dr-ifUJj.d.mts → index-BxWQVi6C.d.ts} +3 -90
- package/dist/{index-Dr-ifUJj.d.ts → index-DQBQQfMw.d.mts} +3 -90
- package/dist/main.d.mts +6 -203
- package/dist/main.d.ts +6 -203
- package/dist/renderer.d.mts +2 -1
- package/dist/renderer.d.ts +2 -1
- package/package.json +6 -1
- package/src/non-electron-process.ts +23 -0
- package/tsup.config.ts +1 -0
|
@@ -1,16 +1,10 @@
|
|
|
1
|
+
import { M as MaybeAsync, T as Type, A as AppInjector } from './app-injector-B3MvgV3k.js';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* @copyright 2025 NoxFly
|
|
3
5
|
* @license MIT
|
|
4
6
|
* @author NoxFly
|
|
5
7
|
*/
|
|
6
|
-
interface Type<T> extends Function {
|
|
7
|
-
new (...args: any[]): T;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Represents a generic type that can be either a value or a promise resolving to that value.
|
|
11
|
-
*/
|
|
12
|
-
type MaybeAsync<T> = T | Promise<T>;
|
|
13
|
-
|
|
14
8
|
|
|
15
9
|
/**
|
|
16
10
|
* IGuard interface defines a guard that can be used to protect routes.
|
|
@@ -110,87 +104,6 @@ declare const Delete: (path: string) => MethodDecorator;
|
|
|
110
104
|
declare const ROUTE_METADATA_KEY: unique symbol;
|
|
111
105
|
|
|
112
106
|
|
|
113
|
-
/**
|
|
114
|
-
* A function that returns a type.
|
|
115
|
-
* Used for forward references to types that are not yet defined.
|
|
116
|
-
*/
|
|
117
|
-
interface ForwardRefFn<T = any> {
|
|
118
|
-
(): Type<T>;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* A wrapper class for forward referenced types.
|
|
122
|
-
*/
|
|
123
|
-
declare class ForwardReference<T = any> {
|
|
124
|
-
readonly forwardRefFn: ForwardRefFn<T>;
|
|
125
|
-
constructor(forwardRefFn: ForwardRefFn<T>);
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Creates a forward reference to a type.
|
|
129
|
-
* @param fn A function that returns the type.
|
|
130
|
-
* @returns A ForwardReference instance.
|
|
131
|
-
*/
|
|
132
|
-
declare function forwardRef<T = any>(fn: ForwardRefFn<T>): ForwardReference<T>;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Represents a lifetime of a binding in the dependency injection system.
|
|
137
|
-
* It can be one of the following:
|
|
138
|
-
* - 'singleton': The instance is created once and shared across the application.
|
|
139
|
-
* - 'scope': The instance is created once per scope (e.g., per request).
|
|
140
|
-
* - 'transient': A new instance is created every time it is requested.
|
|
141
|
-
*/
|
|
142
|
-
type Lifetime = 'singleton' | 'scope' | 'transient';
|
|
143
|
-
/**
|
|
144
|
-
* Represents a binding in the dependency injection system.
|
|
145
|
-
* It contains the lifetime of the binding, the implementation type, and optionally an instance.
|
|
146
|
-
*/
|
|
147
|
-
interface IBinding {
|
|
148
|
-
lifetime: Lifetime;
|
|
149
|
-
implementation: Type<unknown>;
|
|
150
|
-
instance?: InstanceType<Type<unknown>>;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* AppInjector is the root dependency injection container.
|
|
154
|
-
* It is used to register and resolve dependencies in the application.
|
|
155
|
-
* It supports different lifetimes for dependencies:
|
|
156
|
-
* This should not be manually instantiated, outside of the framework.
|
|
157
|
-
* Use the `RootInjector` instance instead.
|
|
158
|
-
*/
|
|
159
|
-
declare class AppInjector {
|
|
160
|
-
readonly name: string | null;
|
|
161
|
-
bindings: Map<Type<unknown>, IBinding>;
|
|
162
|
-
singletons: Map<Type<unknown>, unknown>;
|
|
163
|
-
scoped: Map<Type<unknown>, unknown>;
|
|
164
|
-
constructor(name?: string | null);
|
|
165
|
-
/**
|
|
166
|
-
* Typically used to create a dependency injection scope
|
|
167
|
-
* at the "scope" level (i.e., per-request lifetime).
|
|
168
|
-
*
|
|
169
|
-
* SHOULD NOT BE USED by anything else than the framework itself.
|
|
170
|
-
*/
|
|
171
|
-
createScope(): AppInjector;
|
|
172
|
-
/**
|
|
173
|
-
* Called when resolving a dependency,
|
|
174
|
-
* i.e., retrieving the instance of a given class.
|
|
175
|
-
*/
|
|
176
|
-
resolve<T>(target: Type<T> | ForwardReference<T>): T;
|
|
177
|
-
/**
|
|
178
|
-
* Instantiates a class, resolving its dependencies.
|
|
179
|
-
*/
|
|
180
|
-
private instantiate;
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* Injects a type from the dependency injection system.
|
|
184
|
-
* This function is used to retrieve an instance of a type that has been registered in the dependency injection system.
|
|
185
|
-
* It is typically used in the constructor of a class to inject dependencies.
|
|
186
|
-
* @param t - The type to inject.
|
|
187
|
-
* @returns An instance of the type.
|
|
188
|
-
* @throws If the type is not registered in the dependency injection system.
|
|
189
|
-
*/
|
|
190
|
-
declare function inject<T>(t: Type<T> | ForwardReference<T>): T;
|
|
191
|
-
declare const RootInjector: AppInjector;
|
|
192
|
-
|
|
193
|
-
|
|
194
107
|
/**
|
|
195
108
|
* The Request class represents an HTTP request in the Noxus framework.
|
|
196
109
|
* It encapsulates the request data, including the event, ID, method, path, and body.
|
|
@@ -337,4 +250,4 @@ declare class NoxRendererClient {
|
|
|
337
250
|
isElectronEnvironment(): boolean;
|
|
338
251
|
}
|
|
339
252
|
|
|
340
|
-
export {
|
|
253
|
+
export { Authorize as A, Delete as D, Get as G, type HttpMethod as H, type IResponse as I, NoxRendererClient as N, Post as P, Request as R, type IGuard as a, type IPortRequester as b, getGuardForControllerAction as c, type IRouteMetadata as d, type AtomicHttpMethod as e, getRouteMetadata as f, getGuardForController as g, Put as h, Patch as i, ROUTE_METADATA_KEY as j, type IRequest as k, type IBatchRequestItem as l, type IBatchRequestPayload as m, type IBatchResponsePayload as n, RENDERER_EVENT_TYPE as o, type IRendererEventMessage as p, createRendererEventMessage as q, isRendererEventMessage as r, type RendererEventHandler as s, type RendererEventSubscription as t, RendererEventRegistry as u, type RendererClientOptions as v };
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
+
import { M as MaybeAsync, T as Type, A as AppInjector } from './app-injector-B3MvgV3k.mjs';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* @copyright 2025 NoxFly
|
|
3
5
|
* @license MIT
|
|
4
6
|
* @author NoxFly
|
|
5
7
|
*/
|
|
6
|
-
interface Type<T> extends Function {
|
|
7
|
-
new (...args: any[]): T;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Represents a generic type that can be either a value or a promise resolving to that value.
|
|
11
|
-
*/
|
|
12
|
-
type MaybeAsync<T> = T | Promise<T>;
|
|
13
|
-
|
|
14
8
|
|
|
15
9
|
/**
|
|
16
10
|
* IGuard interface defines a guard that can be used to protect routes.
|
|
@@ -110,87 +104,6 @@ declare const Delete: (path: string) => MethodDecorator;
|
|
|
110
104
|
declare const ROUTE_METADATA_KEY: unique symbol;
|
|
111
105
|
|
|
112
106
|
|
|
113
|
-
/**
|
|
114
|
-
* A function that returns a type.
|
|
115
|
-
* Used for forward references to types that are not yet defined.
|
|
116
|
-
*/
|
|
117
|
-
interface ForwardRefFn<T = any> {
|
|
118
|
-
(): Type<T>;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* A wrapper class for forward referenced types.
|
|
122
|
-
*/
|
|
123
|
-
declare class ForwardReference<T = any> {
|
|
124
|
-
readonly forwardRefFn: ForwardRefFn<T>;
|
|
125
|
-
constructor(forwardRefFn: ForwardRefFn<T>);
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Creates a forward reference to a type.
|
|
129
|
-
* @param fn A function that returns the type.
|
|
130
|
-
* @returns A ForwardReference instance.
|
|
131
|
-
*/
|
|
132
|
-
declare function forwardRef<T = any>(fn: ForwardRefFn<T>): ForwardReference<T>;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Represents a lifetime of a binding in the dependency injection system.
|
|
137
|
-
* It can be one of the following:
|
|
138
|
-
* - 'singleton': The instance is created once and shared across the application.
|
|
139
|
-
* - 'scope': The instance is created once per scope (e.g., per request).
|
|
140
|
-
* - 'transient': A new instance is created every time it is requested.
|
|
141
|
-
*/
|
|
142
|
-
type Lifetime = 'singleton' | 'scope' | 'transient';
|
|
143
|
-
/**
|
|
144
|
-
* Represents a binding in the dependency injection system.
|
|
145
|
-
* It contains the lifetime of the binding, the implementation type, and optionally an instance.
|
|
146
|
-
*/
|
|
147
|
-
interface IBinding {
|
|
148
|
-
lifetime: Lifetime;
|
|
149
|
-
implementation: Type<unknown>;
|
|
150
|
-
instance?: InstanceType<Type<unknown>>;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* AppInjector is the root dependency injection container.
|
|
154
|
-
* It is used to register and resolve dependencies in the application.
|
|
155
|
-
* It supports different lifetimes for dependencies:
|
|
156
|
-
* This should not be manually instantiated, outside of the framework.
|
|
157
|
-
* Use the `RootInjector` instance instead.
|
|
158
|
-
*/
|
|
159
|
-
declare class AppInjector {
|
|
160
|
-
readonly name: string | null;
|
|
161
|
-
bindings: Map<Type<unknown>, IBinding>;
|
|
162
|
-
singletons: Map<Type<unknown>, unknown>;
|
|
163
|
-
scoped: Map<Type<unknown>, unknown>;
|
|
164
|
-
constructor(name?: string | null);
|
|
165
|
-
/**
|
|
166
|
-
* Typically used to create a dependency injection scope
|
|
167
|
-
* at the "scope" level (i.e., per-request lifetime).
|
|
168
|
-
*
|
|
169
|
-
* SHOULD NOT BE USED by anything else than the framework itself.
|
|
170
|
-
*/
|
|
171
|
-
createScope(): AppInjector;
|
|
172
|
-
/**
|
|
173
|
-
* Called when resolving a dependency,
|
|
174
|
-
* i.e., retrieving the instance of a given class.
|
|
175
|
-
*/
|
|
176
|
-
resolve<T>(target: Type<T> | ForwardReference<T>): T;
|
|
177
|
-
/**
|
|
178
|
-
* Instantiates a class, resolving its dependencies.
|
|
179
|
-
*/
|
|
180
|
-
private instantiate;
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* Injects a type from the dependency injection system.
|
|
184
|
-
* This function is used to retrieve an instance of a type that has been registered in the dependency injection system.
|
|
185
|
-
* It is typically used in the constructor of a class to inject dependencies.
|
|
186
|
-
* @param t - The type to inject.
|
|
187
|
-
* @returns An instance of the type.
|
|
188
|
-
* @throws If the type is not registered in the dependency injection system.
|
|
189
|
-
*/
|
|
190
|
-
declare function inject<T>(t: Type<T> | ForwardReference<T>): T;
|
|
191
|
-
declare const RootInjector: AppInjector;
|
|
192
|
-
|
|
193
|
-
|
|
194
107
|
/**
|
|
195
108
|
* The Request class represents an HTTP request in the Noxus framework.
|
|
196
109
|
* It encapsulates the request data, including the event, ID, method, path, and body.
|
|
@@ -337,4 +250,4 @@ declare class NoxRendererClient {
|
|
|
337
250
|
isElectronEnvironment(): boolean;
|
|
338
251
|
}
|
|
339
252
|
|
|
340
|
-
export {
|
|
253
|
+
export { Authorize as A, Delete as D, Get as G, type HttpMethod as H, type IResponse as I, NoxRendererClient as N, Post as P, Request as R, type IGuard as a, type IPortRequester as b, getGuardForControllerAction as c, type IRouteMetadata as d, type AtomicHttpMethod as e, getRouteMetadata as f, getGuardForController as g, Put as h, Patch as i, ROUTE_METADATA_KEY as j, type IRequest as k, type IBatchRequestItem as l, type IBatchRequestPayload as m, type IBatchResponsePayload as n, RENDERER_EVENT_TYPE as o, type IRendererEventMessage as p, createRendererEventMessage as q, isRendererEventMessage as r, type RendererEventHandler as s, type RendererEventSubscription as t, RendererEventRegistry as u, type RendererClientOptions as v };
|
package/dist/main.d.mts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AppInjector,
|
|
1
|
+
import { M as MaybeAsync, T as Type } from './app-injector-B3MvgV3k.mjs';
|
|
2
|
+
export { A as AppInjector, F as ForwardRefFn, a as ForwardReference, I as IBinding, L as Lifetime, R as RootInjector, f as forwardRef, i as inject } from './app-injector-B3MvgV3k.mjs';
|
|
3
|
+
import { R as Request, I as IResponse, a as IGuard, b as IPortRequester } from './index-DQBQQfMw.mjs';
|
|
4
|
+
export { e as AtomicHttpMethod, A as Authorize, D as Delete, G as Get, H as HttpMethod, l as IBatchRequestItem, m as IBatchRequestPayload, n as IBatchResponsePayload, p as IRendererEventMessage, k as IRequest, d as IRouteMetadata, N as NoxRendererClient, i as Patch, P as Post, h as Put, o as RENDERER_EVENT_TYPE, j as ROUTE_METADATA_KEY, v as RendererClientOptions, s as RendererEventHandler, u as RendererEventRegistry, t as RendererEventSubscription, q as createRendererEventMessage, g as getGuardForController, c as getGuardForControllerAction, f as getRouteMetadata, r as isRendererEventMessage } from './index-DQBQQfMw.mjs';
|
|
5
|
+
export { BadGatewayException, BadRequestException, ConflictException, ForbiddenException, GatewayTimeoutException, HttpVersionNotSupportedException, INJECTABLE_METADATA_KEY, INJECT_METADATA_KEY, Inject, Injectable, InsufficientStorageException, InternalServerException, LogLevel, Logger, LoopDetectedException, MethodNotAllowedException, NetworkAuthenticationRequiredException, NetworkConnectTimeoutException, NotAcceptableException, NotExtendedException, NotFoundException, NotImplementedException, PaymentRequiredException, RequestTimeoutException, ResponseException, ServiceUnavailableException, TooManyRequestsException, UnauthorizedException, UpgradeRequiredException, VariantAlsoNegotiatesException, getInjectableMetadata, hasInjectableMetadata } from './child.mjs';
|
|
3
6
|
|
|
4
7
|
/**
|
|
5
8
|
* @copyright 2025 NoxFly
|
|
@@ -260,81 +263,6 @@ declare class NoxApp {
|
|
|
260
263
|
*/
|
|
261
264
|
declare function bootstrapApplication(rootModule: Type<any>): Promise<NoxApp>;
|
|
262
265
|
|
|
263
|
-
declare class ResponseException extends Error {
|
|
264
|
-
readonly status: number;
|
|
265
|
-
constructor(message?: string);
|
|
266
|
-
constructor(statusCode?: number, message?: string);
|
|
267
|
-
}
|
|
268
|
-
declare class BadRequestException extends ResponseException {
|
|
269
|
-
readonly status = 400;
|
|
270
|
-
}
|
|
271
|
-
declare class UnauthorizedException extends ResponseException {
|
|
272
|
-
readonly status = 401;
|
|
273
|
-
}
|
|
274
|
-
declare class PaymentRequiredException extends ResponseException {
|
|
275
|
-
readonly status = 402;
|
|
276
|
-
}
|
|
277
|
-
declare class ForbiddenException extends ResponseException {
|
|
278
|
-
readonly status = 403;
|
|
279
|
-
}
|
|
280
|
-
declare class NotFoundException extends ResponseException {
|
|
281
|
-
readonly status = 404;
|
|
282
|
-
}
|
|
283
|
-
declare class MethodNotAllowedException extends ResponseException {
|
|
284
|
-
readonly status = 405;
|
|
285
|
-
}
|
|
286
|
-
declare class NotAcceptableException extends ResponseException {
|
|
287
|
-
readonly status = 406;
|
|
288
|
-
}
|
|
289
|
-
declare class RequestTimeoutException extends ResponseException {
|
|
290
|
-
readonly status = 408;
|
|
291
|
-
}
|
|
292
|
-
declare class ConflictException extends ResponseException {
|
|
293
|
-
readonly status = 409;
|
|
294
|
-
}
|
|
295
|
-
declare class UpgradeRequiredException extends ResponseException {
|
|
296
|
-
readonly status = 426;
|
|
297
|
-
}
|
|
298
|
-
declare class TooManyRequestsException extends ResponseException {
|
|
299
|
-
readonly status = 429;
|
|
300
|
-
}
|
|
301
|
-
declare class InternalServerException extends ResponseException {
|
|
302
|
-
readonly status = 500;
|
|
303
|
-
}
|
|
304
|
-
declare class NotImplementedException extends ResponseException {
|
|
305
|
-
readonly status = 501;
|
|
306
|
-
}
|
|
307
|
-
declare class BadGatewayException extends ResponseException {
|
|
308
|
-
readonly status = 502;
|
|
309
|
-
}
|
|
310
|
-
declare class ServiceUnavailableException extends ResponseException {
|
|
311
|
-
readonly status = 503;
|
|
312
|
-
}
|
|
313
|
-
declare class GatewayTimeoutException extends ResponseException {
|
|
314
|
-
readonly status = 504;
|
|
315
|
-
}
|
|
316
|
-
declare class HttpVersionNotSupportedException extends ResponseException {
|
|
317
|
-
readonly status = 505;
|
|
318
|
-
}
|
|
319
|
-
declare class VariantAlsoNegotiatesException extends ResponseException {
|
|
320
|
-
readonly status = 506;
|
|
321
|
-
}
|
|
322
|
-
declare class InsufficientStorageException extends ResponseException {
|
|
323
|
-
readonly status = 507;
|
|
324
|
-
}
|
|
325
|
-
declare class LoopDetectedException extends ResponseException {
|
|
326
|
-
readonly status = 508;
|
|
327
|
-
}
|
|
328
|
-
declare class NotExtendedException extends ResponseException {
|
|
329
|
-
readonly status = 510;
|
|
330
|
-
}
|
|
331
|
-
declare class NetworkAuthenticationRequiredException extends ResponseException {
|
|
332
|
-
readonly status = 511;
|
|
333
|
-
}
|
|
334
|
-
declare class NetworkConnectTimeoutException extends ResponseException {
|
|
335
|
-
readonly status = 599;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
266
|
|
|
339
267
|
/**
|
|
340
268
|
* The configuration that waits a controller's decorator.
|
|
@@ -359,30 +287,6 @@ declare function Controller(path: string): ClassDecorator;
|
|
|
359
287
|
declare function getControllerMetadata(target: Type<unknown>): IControllerMetadata | undefined;
|
|
360
288
|
declare const CONTROLLER_METADATA_KEY: unique symbol;
|
|
361
289
|
|
|
362
|
-
declare const INJECTABLE_METADATA_KEY: unique symbol;
|
|
363
|
-
declare function getInjectableMetadata(target: Function): Lifetime | undefined;
|
|
364
|
-
declare function hasInjectableMetadata(target: Function): boolean;
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
/**
|
|
368
|
-
* The Injectable decorator marks a class as injectable.
|
|
369
|
-
* It allows the class to be registered in the dependency injection system.
|
|
370
|
-
* A class decorated with @Injectable can be injected into other classes
|
|
371
|
-
* either from the constructor of the class that needs it of from the `inject` function.
|
|
372
|
-
* @param lifetime - The lifetime of the injectable. Can be 'singleton', 'scope', or 'transient'.
|
|
373
|
-
*/
|
|
374
|
-
declare function Injectable(lifetime?: Lifetime): ClassDecorator;
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
declare const INJECT_METADATA_KEY = "custom:inject";
|
|
378
|
-
/**
|
|
379
|
-
* Decorator to manually inject a dependency.
|
|
380
|
-
* Useful for handling circular dependencies with `forwardRef` or injecting specific tokens.
|
|
381
|
-
*
|
|
382
|
-
* @param token The token or forward reference to inject.
|
|
383
|
-
*/
|
|
384
|
-
declare function Inject(token: any): ParameterDecorator;
|
|
385
|
-
|
|
386
290
|
|
|
387
291
|
interface IModuleMetadata {
|
|
388
292
|
imports?: Type<unknown>[];
|
|
@@ -417,105 +321,4 @@ interface NoxusPreloadOptions {
|
|
|
417
321
|
*/
|
|
418
322
|
declare function exposeNoxusBridge(options?: NoxusPreloadOptions): NoxusPreloadAPI;
|
|
419
323
|
|
|
420
|
-
|
|
421
|
-
* Logger is a utility class for logging messages to the console.
|
|
422
|
-
*/
|
|
423
|
-
type LogLevel = 'debug' | 'comment' | 'log' | 'info' | 'warn' | 'error' | 'critical';
|
|
424
|
-
declare namespace Logger {
|
|
425
|
-
/**
|
|
426
|
-
* Sets the log level for the logger.
|
|
427
|
-
* This function allows you to change the log level dynamically at runtime.
|
|
428
|
-
* This won't affect the startup logs.
|
|
429
|
-
*
|
|
430
|
-
* If the parameter is a single LogLevel, all log levels with equal or higher severity will be enabled.
|
|
431
|
-
|
|
432
|
-
* If the parameter is an array of LogLevels, only the specified levels will be enabled.
|
|
433
|
-
*
|
|
434
|
-
* @param level Sets the log level for the logger.
|
|
435
|
-
*/
|
|
436
|
-
function setLogLevel(level: LogLevel | LogLevel[]): void;
|
|
437
|
-
/**
|
|
438
|
-
* Logs a message to the console with log level LOG.
|
|
439
|
-
* This function formats the message with a timestamp, process ID, and the name of the caller function or class.
|
|
440
|
-
* It uses different colors for different log levels to enhance readability.
|
|
441
|
-
* @param args The arguments to log.
|
|
442
|
-
*/
|
|
443
|
-
function log(...args: any[]): void;
|
|
444
|
-
/**
|
|
445
|
-
* Logs a message to the console with log level INFO.
|
|
446
|
-
* This function formats the message with a timestamp, process ID, and the name of the caller function or class.
|
|
447
|
-
* It uses different colors for different log levels to enhance readability.
|
|
448
|
-
* @param args The arguments to log.
|
|
449
|
-
*/
|
|
450
|
-
function info(...args: any[]): void;
|
|
451
|
-
/**
|
|
452
|
-
* Logs a message to the console with log level WARN.
|
|
453
|
-
* This function formats the message with a timestamp, process ID, and the name of the caller function or class.
|
|
454
|
-
* It uses different colors for different log levels to enhance readability.
|
|
455
|
-
* @param args The arguments to log.
|
|
456
|
-
*/
|
|
457
|
-
function warn(...args: any[]): void;
|
|
458
|
-
/**
|
|
459
|
-
* Logs a message to the console with log level ERROR.
|
|
460
|
-
* This function formats the message with a timestamp, process ID, and the name of the caller function or class.
|
|
461
|
-
* It uses different colors for different log levels to enhance readability.
|
|
462
|
-
* @param args The arguments to log.
|
|
463
|
-
*/
|
|
464
|
-
function error(...args: any[]): void;
|
|
465
|
-
/**
|
|
466
|
-
* Logs a message to the console with log level ERROR and a grey color scheme.
|
|
467
|
-
*/
|
|
468
|
-
function errorStack(...args: any[]): void;
|
|
469
|
-
/**
|
|
470
|
-
* Logs a message to the console with log level DEBUG.
|
|
471
|
-
* This function formats the message with a timestamp, process ID, and the name of the caller function or class.
|
|
472
|
-
* It uses different colors for different log levels to enhance readability.
|
|
473
|
-
* @param args The arguments to log.
|
|
474
|
-
*/
|
|
475
|
-
function debug(...args: any[]): void;
|
|
476
|
-
/**
|
|
477
|
-
* Logs a message to the console with log level COMMENT.
|
|
478
|
-
* This function formats the message with a timestamp, process ID, and the name of the caller function or class.
|
|
479
|
-
* It uses different colors for different log levels to enhance readability.
|
|
480
|
-
* @param args The arguments to log.
|
|
481
|
-
*/
|
|
482
|
-
function comment(...args: any[]): void;
|
|
483
|
-
/**
|
|
484
|
-
* Logs a message to the console with log level CRITICAL.
|
|
485
|
-
* This function formats the message with a timestamp, process ID, and the name of the caller function or class.
|
|
486
|
-
* It uses different colors for different log levels to enhance readability.
|
|
487
|
-
* @param args The arguments to log.
|
|
488
|
-
*/
|
|
489
|
-
function critical(...args: any[]): void;
|
|
490
|
-
/**
|
|
491
|
-
* Enables logging to a file output for the specified log levels.
|
|
492
|
-
* @param filepath The path to the log file.
|
|
493
|
-
* @param levels The log levels to enable file logging for. Defaults to all levels.
|
|
494
|
-
*/
|
|
495
|
-
function enableFileLogging(filepath: string, levels?: LogLevel[]): void;
|
|
496
|
-
/**
|
|
497
|
-
* Disables logging to a file output for the specified log levels.
|
|
498
|
-
* @param levels The log levels to disable file logging for. Defaults to all levels.
|
|
499
|
-
*/
|
|
500
|
-
function disableFileLogging(levels?: LogLevel[]): void;
|
|
501
|
-
const colors: {
|
|
502
|
-
black: string;
|
|
503
|
-
grey: string;
|
|
504
|
-
red: string;
|
|
505
|
-
green: string;
|
|
506
|
-
brown: string;
|
|
507
|
-
blue: string;
|
|
508
|
-
purple: string;
|
|
509
|
-
darkGrey: string;
|
|
510
|
-
lightRed: string;
|
|
511
|
-
lightGreen: string;
|
|
512
|
-
yellow: string;
|
|
513
|
-
lightBlue: string;
|
|
514
|
-
magenta: string;
|
|
515
|
-
cyan: string;
|
|
516
|
-
white: string;
|
|
517
|
-
initial: string;
|
|
518
|
-
};
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
export { BadGatewayException, BadRequestException, CONTROLLER_METADATA_KEY, ConflictException, Controller, type ControllerAction, ForbiddenException, GatewayTimeoutException, HttpVersionNotSupportedException, type IApp, type IControllerMetadata, IGuard, type IMiddleware, type IModuleMetadata, INJECTABLE_METADATA_KEY, INJECT_METADATA_KEY, IPortRequester, IResponse, type IRouteDefinition, Inject, Injectable, InsufficientStorageException, InternalServerException, Lifetime, type LogLevel, Logger, LoopDetectedException, MODULE_METADATA_KEY, MaybeAsync, MethodNotAllowedException, Module, NetworkAuthenticationRequiredException, NetworkConnectTimeoutException, type NextFunction, NotAcceptableException, NotExtendedException, NotFoundException, NotImplementedException, NoxApp, NoxSocket, type NoxusPreloadAPI, type NoxusPreloadOptions, PaymentRequiredException, Request, RequestTimeoutException, ResponseException, Router, ServiceUnavailableException, TooManyRequestsException, Type, UnauthorizedException, UpgradeRequiredException, UseMiddlewares, VariantAlsoNegotiatesException, bootstrapApplication, exposeNoxusBridge, getControllerMetadata, getInjectableMetadata, getMiddlewaresForController, getMiddlewaresForControllerAction, getModuleMetadata, hasInjectableMetadata };
|
|
324
|
+
export { CONTROLLER_METADATA_KEY, Controller, type ControllerAction, type IApp, type IControllerMetadata, IGuard, type IMiddleware, type IModuleMetadata, IPortRequester, IResponse, type IRouteDefinition, MODULE_METADATA_KEY, MaybeAsync, Module, type NextFunction, NoxApp, NoxSocket, type NoxusPreloadAPI, type NoxusPreloadOptions, Request, Router, Type, UseMiddlewares, bootstrapApplication, exposeNoxusBridge, getControllerMetadata, getMiddlewaresForController, getMiddlewaresForControllerAction, getModuleMetadata };
|