@noxfly/noxus 3.0.0-dev.8 → 3.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 +20 -20
- package/README.md +686 -686
- package/dist/child.d.mts +1 -1
- package/dist/child.d.ts +1 -1
- package/dist/child.js +39 -39
- package/dist/child.js.map +1 -1
- package/dist/child.mjs +39 -39
- package/dist/child.mjs.map +1 -1
- package/dist/main.d.mts +18 -7
- package/dist/main.d.ts +18 -7
- package/dist/main.js +188 -108
- package/dist/main.js.map +1 -1
- package/dist/main.mjs +189 -108
- package/dist/main.mjs.map +1 -1
- package/dist/preload.js.map +1 -1
- package/dist/preload.mjs.map +1 -1
- package/dist/renderer.js +40 -24
- package/dist/renderer.js.map +1 -1
- package/dist/renderer.mjs +40 -24
- package/dist/renderer.mjs.map +1 -1
- package/package.json +99 -94
- package/dist/app-injector-Bz3Upc0y.d.mts +0 -125
- package/dist/app-injector-Bz3Upc0y.d.ts +0 -125
- package/dist/request-BlTtiHbi.d.ts +0 -112
- package/dist/request-qJ9EiDZc.d.mts +0 -112
package/dist/main.d.ts
CHANGED
|
@@ -160,11 +160,11 @@ interface IRouteMetadata {
|
|
|
160
160
|
middlewares: Middleware[];
|
|
161
161
|
}
|
|
162
162
|
declare function getRouteMetadata(target: object): IRouteMetadata[];
|
|
163
|
-
declare const Get: (path: string, options?: IRouteOptions) =>
|
|
164
|
-
declare const Post: (path: string, options?: IRouteOptions) =>
|
|
165
|
-
declare const Put: (path: string, options?: IRouteOptions) =>
|
|
166
|
-
declare const Patch: (path: string, options?: IRouteOptions) =>
|
|
167
|
-
declare const Delete: (path: string, options?: IRouteOptions) =>
|
|
163
|
+
declare const Get: (path: string, options?: IRouteOptions) => (value: Function, context: ClassMethodDecoratorContext) => void;
|
|
164
|
+
declare const Post: (path: string, options?: IRouteOptions) => (value: Function, context: ClassMethodDecoratorContext) => void;
|
|
165
|
+
declare const Put: (path: string, options?: IRouteOptions) => (value: Function, context: ClassMethodDecoratorContext) => void;
|
|
166
|
+
declare const Patch: (path: string, options?: IRouteOptions) => (value: Function, context: ClassMethodDecoratorContext) => void;
|
|
167
|
+
declare const Delete: (path: string, options?: IRouteOptions) => (value: Function, context: ClassMethodDecoratorContext) => void;
|
|
168
168
|
|
|
169
169
|
|
|
170
170
|
/**
|
|
@@ -258,6 +258,7 @@ declare class Router {
|
|
|
258
258
|
private readonly routes;
|
|
259
259
|
private readonly rootMiddlewares;
|
|
260
260
|
private readonly lazyRoutes;
|
|
261
|
+
private lazyLoadLock;
|
|
261
262
|
registerController(controllerClass: Type<unknown>, pathPrefix: string, routeGuards?: Guard[], routeMiddlewares?: Middleware[]): this;
|
|
262
263
|
registerLazyRoute(pathPrefix: string, load: () => Promise<unknown>, guards?: Guard[], middlewares?: Middleware[]): this;
|
|
263
264
|
defineRootMiddleware(middleware: Middleware): this;
|
|
@@ -275,6 +276,16 @@ declare class Router {
|
|
|
275
276
|
private tryFindRoute;
|
|
276
277
|
private findRoute;
|
|
277
278
|
private tryLoadLazyRoute;
|
|
279
|
+
/**
|
|
280
|
+
* Returns true when `requestPath` starts with `prefix`, treating `:param`
|
|
281
|
+
* segments in the prefix as single-segment wildcards.
|
|
282
|
+
*
|
|
283
|
+
* @example
|
|
284
|
+
* pathHasPrefix('contact/123/notes', 'contact/:id/notes') // true
|
|
285
|
+
* pathHasPrefix('contact/123/notes/get', 'contact/:id/notes') // true
|
|
286
|
+
* pathHasPrefix('contact/123', 'contact/:id/notes') // false
|
|
287
|
+
*/
|
|
288
|
+
private pathHasPrefix;
|
|
278
289
|
private loadLazyModule;
|
|
279
290
|
private resolveController;
|
|
280
291
|
private runPipeline;
|
|
@@ -829,7 +840,7 @@ interface IControllerMetadata {
|
|
|
829
840
|
* getUserById(req: Request) { ... }
|
|
830
841
|
* }
|
|
831
842
|
*/
|
|
832
|
-
declare function Controller(options?: ControllerOptions):
|
|
843
|
+
declare function Controller(options?: ControllerOptions): <T extends new (...args: any[]) => unknown>(target: T, _context: ClassDecoratorContext) => T | void;
|
|
833
844
|
declare function getControllerMetadata(target: object): IControllerMetadata | undefined;
|
|
834
845
|
|
|
835
846
|
|
|
@@ -880,6 +891,6 @@ interface InjectableOptions {
|
|
|
880
891
|
* constructor(private url: string) {}
|
|
881
892
|
* }
|
|
882
893
|
*/
|
|
883
|
-
declare function Injectable(options?: InjectableOptions):
|
|
894
|
+
declare function Injectable(options?: InjectableOptions): <T extends new (...args: any[]) => unknown>(target: T, _context: ClassDecoratorContext) => T | void;
|
|
884
895
|
|
|
885
896
|
export { AppInjector, type AtomicHttpMethod, BadGatewayException, BadRequestException, type BootstrapConfig, ConflictException, Controller, type ControllerAction, type ControllerOptions, Delete, ForbiddenException, type ForwardRefFn, ForwardReference, GatewayTimeoutException, Get, type Guard, type HttpMethod, HttpVersionNotSupportedException, type IApp, type IBatchRequestItem, type IBatchRequestPayload, type IBatchResponsePayload, type IBinding, type IControllerMetadata, type ILazyRoute, type IRendererEventMessage, type IRequest, type IResponse, type IRouteDefinition, type IRouteMetadata, type IRouteOptions, Injectable, type InjectableOptions, InsufficientStorageException, InternalServerException, type Lifetime, type LogLevel, Logger, LoopDetectedException, type MaybeAsync, MethodNotAllowedException, type Middleware, NetworkAuthenticationRequiredException, NetworkConnectTimeoutException, type NextFunction, NotAcceptableException, NotExtendedException, NotFoundException, NotImplementedException, NoxApp, NoxSocket, Patch, PaymentRequiredException, Post, Put, RENDERER_EVENT_TYPE, Request, RequestTimeoutException, ResponseException, RootInjector, type RouteDefinition, Router, ServiceUnavailableException, type SingletonOverride, Token, type TokenKey, TooManyRequestsException, type Type, UnauthorizedException, UpgradeRequiredException, VariantAlsoNegotiatesException, type WindowConfig, type WindowEvent, WindowManager, type WindowRecord, bootstrapApplication, createRendererEventMessage, defineRoutes, forwardRef, getControllerMetadata, getRouteMetadata, inject, isAtomicHttpMethod, isRendererEventMessage, resetRootInjector, token };
|