@h3ravel/contracts 1.29.0-alpha.16 → 2.0.0-alpha.16
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/index.d.ts +18 -2
- package/dist/index.js +35 -10
- package/package.json +2 -4
- package/dist/index.cjs +0 -379
package/dist/index.d.ts
CHANGED
|
@@ -1579,12 +1579,17 @@ declare abstract class ISessionManager {
|
|
|
1579
1579
|
abstract ageFlashData(): void | Promise<void>;
|
|
1580
1580
|
}
|
|
1581
1581
|
//#endregion
|
|
1582
|
+
//#region src/Utilities/ContainerToken.d.ts
|
|
1583
|
+
declare const CONTAINER_TOKEN: unique symbol;
|
|
1584
|
+
declare const createContainerToken: (name: string) => symbol;
|
|
1585
|
+
//#endregion
|
|
1582
1586
|
//#region src/Http/IRequest.d.ts
|
|
1583
1587
|
type RequestObject$1 = Record<string, any>;
|
|
1584
1588
|
/**
|
|
1585
1589
|
* Interface for the Request contract, defining methods for handling HTTP request data.
|
|
1586
1590
|
*/
|
|
1587
1591
|
declare abstract class IRequest<D extends Record<string, any> = Record<string, any>, R extends Record<string, any> = Record<string, any>, U extends Record<string, any> = Record<string, any>> extends IHttpRequest {
|
|
1592
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
1588
1593
|
/**
|
|
1589
1594
|
* The current app instance
|
|
1590
1595
|
*/
|
|
@@ -2297,6 +2302,7 @@ declare abstract class IHttpResponse {
|
|
|
2297
2302
|
* Interface for the Response contract, defining methods for handling HTTP responses.
|
|
2298
2303
|
*/
|
|
2299
2304
|
declare abstract class IResponse extends IHttpResponse {
|
|
2305
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
2300
2306
|
/**
|
|
2301
2307
|
* The current app instance
|
|
2302
2308
|
*/
|
|
@@ -2412,6 +2418,7 @@ interface JobPayload {
|
|
|
2412
2418
|
//#endregion
|
|
2413
2419
|
//#region src/Events/IDispatcher.d.ts
|
|
2414
2420
|
declare abstract class IDispatcher {
|
|
2421
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
2415
2422
|
/**
|
|
2416
2423
|
* Register an event listener with the dispatcher.
|
|
2417
2424
|
*
|
|
@@ -3077,6 +3084,7 @@ declare abstract class IPendingSingletonResourceRegistration {
|
|
|
3077
3084
|
* Interface for the Router contract, defining methods for HTTP routing.
|
|
3078
3085
|
*/
|
|
3079
3086
|
declare abstract class IRouter {
|
|
3087
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
3080
3088
|
/**
|
|
3081
3089
|
* The priority-sorted list of middleware.
|
|
3082
3090
|
*
|
|
@@ -3407,6 +3415,7 @@ declare abstract class UrlRoutable {
|
|
|
3407
3415
|
//#endregion
|
|
3408
3416
|
//#region src/Url/IUrlGenerator.d.ts
|
|
3409
3417
|
declare abstract class IUrlGenerator {
|
|
3418
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
3410
3419
|
/**
|
|
3411
3420
|
* The named parameter defaults.
|
|
3412
3421
|
*/
|
|
@@ -3657,7 +3666,7 @@ interface Bindings {
|
|
|
3657
3666
|
'session.store': ISessionDriver;
|
|
3658
3667
|
}
|
|
3659
3668
|
type UseKey<X extends Record<string, any> = Record<string, any>> = keyof RemoveIndexSignature<Bindings & X>;
|
|
3660
|
-
type IBinding = UseKey | (new (...args: any[]) => unknown);
|
|
3669
|
+
type IBinding = UseKey | symbol | (new (...args: any[]) => unknown);
|
|
3661
3670
|
//#endregion
|
|
3662
3671
|
//#region src/Routing/IMiddlewareHandler.d.ts
|
|
3663
3672
|
declare class IMiddlewareHandler {
|
|
@@ -3846,6 +3855,7 @@ declare abstract class IContainer {
|
|
|
3846
3855
|
//#endregion
|
|
3847
3856
|
//#region src/Core/IApplication.d.ts
|
|
3848
3857
|
declare abstract class IApplication extends IContainer {
|
|
3858
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
3849
3859
|
abstract paths: PathLoader;
|
|
3850
3860
|
abstract context?: (event: H3Event) => Promise<IHttpContext>;
|
|
3851
3861
|
abstract h3Event?: H3Event;
|
|
@@ -4066,6 +4076,7 @@ declare abstract class IApplication extends IContainer {
|
|
|
4066
4076
|
//#endregion
|
|
4067
4077
|
//#region src/Http/IHttpContext.d.ts
|
|
4068
4078
|
declare abstract class IHttpContext {
|
|
4079
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
4069
4080
|
abstract app: IApplication;
|
|
4070
4081
|
abstract event: H3Event;
|
|
4071
4082
|
abstract request: IRequest;
|
|
@@ -4228,6 +4239,7 @@ type RenderExceptionCallback = (error: any, request: IRequest) => IResponse | Pr
|
|
|
4228
4239
|
type ReportExceptionCallback = (error: any) => boolean | void | Promise<boolean | void>;
|
|
4229
4240
|
type ThrottleExceptionCallback = (error: any) => LimitSpec | Unlimited | null | undefined;
|
|
4230
4241
|
declare abstract class IExceptionHandler {
|
|
4242
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
4231
4243
|
/**
|
|
4232
4244
|
* The exception handler method
|
|
4233
4245
|
*
|
|
@@ -4300,6 +4312,7 @@ declare abstract class IExceptionHandler {
|
|
|
4300
4312
|
//#endregion
|
|
4301
4313
|
//#region src/Foundation/CKernel.d.ts
|
|
4302
4314
|
declare abstract class CKernel {
|
|
4315
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
4303
4316
|
/**
|
|
4304
4317
|
* Run the console application.
|
|
4305
4318
|
*/
|
|
@@ -4348,6 +4361,7 @@ declare abstract class CKernel {
|
|
|
4348
4361
|
//#endregion
|
|
4349
4362
|
//#region src/Foundation/IKernel.d.ts
|
|
4350
4363
|
declare abstract class IKernel {
|
|
4364
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
4351
4365
|
/**
|
|
4352
4366
|
* Handle an incoming HTTP request.
|
|
4353
4367
|
*
|
|
@@ -4714,6 +4728,7 @@ declare abstract class IQueueManager {
|
|
|
4714
4728
|
//#endregion
|
|
4715
4729
|
//#region src/Routing/ICallableDispatcher.d.ts
|
|
4716
4730
|
declare abstract class ICallableDispatcher {
|
|
4731
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
4717
4732
|
/**
|
|
4718
4733
|
* Dispatch a request to a given callback.
|
|
4719
4734
|
*
|
|
@@ -4726,6 +4741,7 @@ declare abstract class ICallableDispatcher {
|
|
|
4726
4741
|
//#endregion
|
|
4727
4742
|
//#region src/Routing/IControllerDispatcher.d.ts
|
|
4728
4743
|
declare abstract class IControllerDispatcher {
|
|
4744
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
4729
4745
|
/**
|
|
4730
4746
|
* Dispatch a request to a given controller and method.
|
|
4731
4747
|
*
|
|
@@ -5133,4 +5149,4 @@ declare class IValidator<D extends Record<string, any> = any, R extends RulesFor
|
|
|
5133
5149
|
getRules(): R;
|
|
5134
5150
|
}
|
|
5135
5151
|
//#endregion
|
|
5136
|
-
export { AServiceProvider, AbstractConstructor, ActionInput, AppEvent, AppListener, Argon2Options, BaseValidationRuleClass, BcryptOptions, Bindings, CKernel, CacheOptions, CallableConstructor, ClassConstructor, ClassicRouteDefinition, ConcreteConstructor, CustomValidationRules, DotFlatten, DotNestedKeys, DotNestedValue, DotPaths, EventHandler, ExceptionConditionCallback, ExceptionConstructor, ExtractClassMethods, ExtractRules, FieldMessages, FlashBag, GenericObject, GenericWithNullableStringValues, HashAlgorithm, HashConfiguration, HashInfo, HashOptions, IAbstractHasher, IAbstractRouteCollection, IAppBuilder, IApplication, IArgon2idHasher, IArgonHasher, IBaseHashManager, IBcryptHasher, IBinding, IBootstraper, ICallableDispatcher, ICompiledRoute, IContainer, IController, IControllerDispatcher, IDispatcher, IExceptionHandler, IFileBag, IFileInput, IHashManager, IHeaderBag, IHttpContext, IHttpRequest, IHttpResponse, IJob, IKernel, IMessageBag, IMiddleware, IMiddlewareHandler, IModel, IParamBag, IPathName, IPendingResourceRegistration, IPendingSingletonResourceRegistration, IQueueDriver, IQueueManager, IRegisterer, IRequest, IRequestAwareUrl, IResponsable, IResponse, IRoute, IRouteCollection, IRouteRegistrar, IRouteUrlGenerator, IRouter, IServerBag, IServiceProvider, ISessionDriver, ISessionManager, IUploadedFile, IUrl, IUrlGenerator, IUrlHelpers, IValidationRule, IValidator, InputBag, JobPayload, LimitSpec, ListenerClassConstructor, MergedConstructor, MessagesForRules, MiddlewareIdentifier, MiddlewareList, MixinConstructor, NormalizedAction, OServiceProvider, ParamableValidationRuleName, PathLoader, PlainRuleName, RateLimiterAdapter, RedirectHandler, RenderExceptionCallback, ReportExceptionCallback, RequestMethod, RequestObject, ResourceMethod, ResourceOptions, ResponsableType, ResponseObject, RouteActions, RouteAttributes, RouteEventHandler, RouteMethod, RouteParams, RouterEnd, RulesForData, ServiceProviderConstructor, SessionDriverBuilder, SessionDriverOption, TGeneric, ThrottleExceptionCallback, UnknownHashOptions, Unlimited, UrlRoutable, UseKey, ValidationMessageProvider, ValidationRuleCallable, ValidationRuleName, ValidationRuleSet };
|
|
5152
|
+
export { AServiceProvider, AbstractConstructor, ActionInput, AppEvent, AppListener, Argon2Options, BaseValidationRuleClass, BcryptOptions, Bindings, CKernel, CONTAINER_TOKEN, CacheOptions, CallableConstructor, ClassConstructor, ClassicRouteDefinition, ConcreteConstructor, CustomValidationRules, DotFlatten, DotNestedKeys, DotNestedValue, DotPaths, EventHandler, ExceptionConditionCallback, ExceptionConstructor, ExtractClassMethods, ExtractRules, FieldMessages, FlashBag, GenericObject, GenericWithNullableStringValues, HashAlgorithm, HashConfiguration, HashInfo, HashOptions, IAbstractHasher, IAbstractRouteCollection, IAppBuilder, IApplication, IArgon2idHasher, IArgonHasher, IBaseHashManager, IBcryptHasher, IBinding, IBootstraper, ICallableDispatcher, ICompiledRoute, IContainer, IController, IControllerDispatcher, IDispatcher, IExceptionHandler, IFileBag, IFileInput, IHashManager, IHeaderBag, IHttpContext, IHttpRequest, IHttpResponse, IJob, IKernel, IMessageBag, IMiddleware, IMiddlewareHandler, IModel, IParamBag, IPathName, IPendingResourceRegistration, IPendingSingletonResourceRegistration, IQueueDriver, IQueueManager, IRegisterer, IRequest, IRequestAwareUrl, IResponsable, IResponse, IRoute, IRouteCollection, IRouteRegistrar, IRouteUrlGenerator, IRouter, IServerBag, IServiceProvider, ISessionDriver, ISessionManager, IUploadedFile, IUrl, IUrlGenerator, IUrlHelpers, IValidationRule, IValidator, InputBag, JobPayload, LimitSpec, ListenerClassConstructor, MergedConstructor, MessagesForRules, MiddlewareIdentifier, MiddlewareList, MixinConstructor, NormalizedAction, OServiceProvider, ParamableValidationRuleName, PathLoader, PlainRuleName, RateLimiterAdapter, RedirectHandler, RenderExceptionCallback, ReportExceptionCallback, RequestMethod, RequestObject, ResourceMethod, ResourceOptions, ResponsableType, ResponseObject, RouteActions, RouteAttributes, RouteEventHandler, RouteMethod, RouteParams, RouterEnd, RulesForData, ServiceProviderConstructor, SessionDriverBuilder, SessionDriverOption, TGeneric, ThrottleExceptionCallback, UnknownHashOptions, Unlimited, UrlRoutable, UseKey, ValidationMessageProvider, ValidationRuleCallable, ValidationRuleName, ValidationRuleSet, createContainerToken };
|
package/dist/index.js
CHANGED
|
@@ -12,8 +12,14 @@ var IContainer = class {
|
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
//#endregion
|
|
15
|
+
//#region src/Utilities/ContainerToken.ts
|
|
16
|
+
const CONTAINER_TOKEN = Symbol.for("@h3ravel/contracts/container-token");
|
|
17
|
+
const createContainerToken = (name) => Symbol.for(`@h3ravel/contracts/${name}`);
|
|
18
|
+
//#endregion
|
|
15
19
|
//#region src/Core/IApplication.ts
|
|
16
|
-
var IApplication = class extends IContainer {
|
|
20
|
+
var IApplication = class extends IContainer {
|
|
21
|
+
static [CONTAINER_TOKEN] = createContainerToken("Core.IApplication");
|
|
22
|
+
};
|
|
17
23
|
//#endregion
|
|
18
24
|
//#region src/Core/IController.ts
|
|
19
25
|
/**
|
|
@@ -57,19 +63,27 @@ var IServiceProvider = class {
|
|
|
57
63
|
var IModel = class {};
|
|
58
64
|
//#endregion
|
|
59
65
|
//#region src/Events/IDispatcher.ts
|
|
60
|
-
var IDispatcher = class {
|
|
66
|
+
var IDispatcher = class {
|
|
67
|
+
static [CONTAINER_TOKEN] = createContainerToken("Events.IDispatcher");
|
|
68
|
+
};
|
|
61
69
|
//#endregion
|
|
62
70
|
//#region src/Exceptions/IExceptionHandler.ts
|
|
63
|
-
var IExceptionHandler = class {
|
|
71
|
+
var IExceptionHandler = class {
|
|
72
|
+
static [CONTAINER_TOKEN] = createContainerToken("Exceptions.IExceptionHandler");
|
|
73
|
+
};
|
|
64
74
|
//#endregion
|
|
65
75
|
//#region src/Foundation/CKernel.ts
|
|
66
|
-
var CKernel = class {
|
|
76
|
+
var CKernel = class {
|
|
77
|
+
static [CONTAINER_TOKEN] = createContainerToken("Foundation.CKernel");
|
|
78
|
+
};
|
|
67
79
|
//#endregion
|
|
68
80
|
//#region src/Foundation/IBootstraper.ts
|
|
69
81
|
var IBootstraper = class {};
|
|
70
82
|
//#endregion
|
|
71
83
|
//#region src/Foundation/IKernel.ts
|
|
72
|
-
var IKernel = class {
|
|
84
|
+
var IKernel = class {
|
|
85
|
+
static [CONTAINER_TOKEN] = createContainerToken("Foundation.IKernel");
|
|
86
|
+
};
|
|
73
87
|
//#endregion
|
|
74
88
|
//#region src/Hashing/IAbstractHasher.ts
|
|
75
89
|
var IAbstractHasher = class {};
|
|
@@ -112,6 +126,7 @@ var IHeaderBag = class {};
|
|
|
112
126
|
//#endregion
|
|
113
127
|
//#region src/Http/IHttpContext.ts
|
|
114
128
|
var IHttpContext = class {
|
|
129
|
+
static [CONTAINER_TOKEN] = createContainerToken("Http.IHttpContext");
|
|
115
130
|
/**
|
|
116
131
|
* Retrieve an existing HttpContext instance for an event, if any.
|
|
117
132
|
*/
|
|
@@ -144,6 +159,7 @@ var InputBag = class extends IParamBag {};
|
|
|
144
159
|
* Interface for the Request contract, defining methods for handling HTTP request data.
|
|
145
160
|
*/
|
|
146
161
|
var IRequest = class extends IHttpRequest {
|
|
162
|
+
static [CONTAINER_TOKEN] = createContainerToken("Http.IRequest");
|
|
147
163
|
/**
|
|
148
164
|
* Factory method to create a Request instance from an H3Event.
|
|
149
165
|
*/
|
|
@@ -174,7 +190,9 @@ var IRequest = class extends IHttpRequest {
|
|
|
174
190
|
/**
|
|
175
191
|
* Interface for the Response contract, defining methods for handling HTTP responses.
|
|
176
192
|
*/
|
|
177
|
-
var IResponse = class extends IHttpResponse {
|
|
193
|
+
var IResponse = class extends IHttpResponse {
|
|
194
|
+
static [CONTAINER_TOKEN] = createContainerToken("Http.IResponse");
|
|
195
|
+
};
|
|
178
196
|
var IResponsable = class extends HTTPResponse {};
|
|
179
197
|
//#endregion
|
|
180
198
|
//#region src/Http/IServerBag.ts
|
|
@@ -207,10 +225,14 @@ var IQueueDriver = class {};
|
|
|
207
225
|
var IQueueManager = class {};
|
|
208
226
|
//#endregion
|
|
209
227
|
//#region src/Routing/ICallableDispatcher.ts
|
|
210
|
-
var ICallableDispatcher = class {
|
|
228
|
+
var ICallableDispatcher = class {
|
|
229
|
+
static [CONTAINER_TOKEN] = createContainerToken("Routing.ICallableDispatcher");
|
|
230
|
+
};
|
|
211
231
|
//#endregion
|
|
212
232
|
//#region src/Routing/IControllerDispatcher.ts
|
|
213
|
-
var IControllerDispatcher = class {
|
|
233
|
+
var IControllerDispatcher = class {
|
|
234
|
+
static [CONTAINER_TOKEN] = createContainerToken("Routing.IControllerDispatcher");
|
|
235
|
+
};
|
|
214
236
|
//#endregion
|
|
215
237
|
//#region src/Routing/IMiddleware.ts
|
|
216
238
|
/**
|
|
@@ -235,6 +257,7 @@ var IRoute = class {};
|
|
|
235
257
|
* Interface for the Router contract, defining methods for HTTP routing.
|
|
236
258
|
*/
|
|
237
259
|
var IRouter = class {
|
|
260
|
+
static [CONTAINER_TOKEN] = createContainerToken("Routing.IRouter");
|
|
238
261
|
/**
|
|
239
262
|
* All of the verbs supported by the router.
|
|
240
263
|
*/
|
|
@@ -318,7 +341,9 @@ var IUrl = class {
|
|
|
318
341
|
};
|
|
319
342
|
//#endregion
|
|
320
343
|
//#region src/Url/IUrlGenerator.ts
|
|
321
|
-
var IUrlGenerator = class {
|
|
344
|
+
var IUrlGenerator = class {
|
|
345
|
+
static [CONTAINER_TOKEN] = createContainerToken("Url.IUrlGenerator");
|
|
346
|
+
};
|
|
322
347
|
//#endregion
|
|
323
348
|
//#region src/Url/IUrlHelpers.ts
|
|
324
349
|
/**
|
|
@@ -326,4 +351,4 @@ var IUrlGenerator = class {};
|
|
|
326
351
|
*/
|
|
327
352
|
var IUrlHelpers = class {};
|
|
328
353
|
//#endregion
|
|
329
|
-
export { CKernel, FlashBag, IAbstractHasher, IAppBuilder, IApplication, IArgon2idHasher, IArgonHasher, IBaseHashManager, IBcryptHasher, IBootstraper, ICallableDispatcher, IContainer, IController, IControllerDispatcher, IDispatcher, IExceptionHandler, IFileBag, IHashManager, IHeaderBag, IHttpContext, IHttpRequest, IHttpResponse, IJob, IKernel, IMiddleware, IModel, IParamBag, IPendingResourceRegistration, IPendingSingletonResourceRegistration, IQueueDriver, IQueueManager, IRegisterer, IRequest, IRequestAwareUrl, IResponsable, IResponse, IRoute, IRouteRegistrar, IRouteUrlGenerator, IRouter, IServerBag, IServiceProvider, ISessionDriver, ISessionManager, IUploadedFile, IUrl, IUrlGenerator, IUrlHelpers, InputBag, UrlRoutable };
|
|
354
|
+
export { CKernel, CONTAINER_TOKEN, FlashBag, IAbstractHasher, IAppBuilder, IApplication, IArgon2idHasher, IArgonHasher, IBaseHashManager, IBcryptHasher, IBootstraper, ICallableDispatcher, IContainer, IController, IControllerDispatcher, IDispatcher, IExceptionHandler, IFileBag, IHashManager, IHeaderBag, IHttpContext, IHttpRequest, IHttpResponse, IJob, IKernel, IMiddleware, IModel, IParamBag, IPendingResourceRegistration, IPendingSingletonResourceRegistration, IQueueDriver, IQueueManager, IRegisterer, IRequest, IRequestAwareUrl, IResponsable, IResponse, IRoute, IRouteRegistrar, IRouteUrlGenerator, IRouter, IServerBag, IServiceProvider, ISessionDriver, ISessionManager, IUploadedFile, IUrl, IUrlGenerator, IUrlHelpers, InputBag, UrlRoutable, createContainerToken };
|
package/package.json
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h3ravel/contracts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.16",
|
|
4
4
|
"description": "H3ravel Contracts.",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./dist/index.cjs",
|
|
7
6
|
"types": "./dist/index.d.ts",
|
|
8
|
-
"module": "./dist/index.js",
|
|
9
7
|
"exports": {
|
|
10
8
|
".": {
|
|
11
9
|
"import": "./dist/index.js",
|
|
@@ -53,7 +51,7 @@
|
|
|
53
51
|
},
|
|
54
52
|
"scripts": {
|
|
55
53
|
"build": "tsdown --config-loader unrun",
|
|
56
|
-
"dev": "
|
|
54
|
+
"dev": "tsdown --watch --config-loader unrun",
|
|
57
55
|
"start": "node dist/index.js",
|
|
58
56
|
"lint": "eslint . --ext .ts",
|
|
59
57
|
"test": "jest --passWithNoTests",
|
package/dist/index.cjs
DELETED
|
@@ -1,379 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
let h3 = require("h3");
|
|
3
|
-
//#region src/Configuration/IAppBuilder.ts
|
|
4
|
-
var IAppBuilder = class {};
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region src/Core/IContainer.ts
|
|
7
|
-
/**
|
|
8
|
-
* Interface for the Container contract, defining methods for dependency injection and service resolution.
|
|
9
|
-
*/
|
|
10
|
-
var IContainer = class {
|
|
11
|
-
static hasAnyDecorator(target) {
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region src/Core/IApplication.ts
|
|
17
|
-
var IApplication = class extends IContainer {};
|
|
18
|
-
//#endregion
|
|
19
|
-
//#region src/Core/IController.ts
|
|
20
|
-
/**
|
|
21
|
-
* Defines the contract for all controllers.
|
|
22
|
-
*/
|
|
23
|
-
var IController = class {
|
|
24
|
-
callAction(method, parameters) {}
|
|
25
|
-
getMiddleware() {
|
|
26
|
-
return {};
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
//#endregion
|
|
30
|
-
//#region src/Core/IRegisterer.ts
|
|
31
|
-
var IRegisterer = class {};
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region src/Core/IServiceProvider.ts
|
|
34
|
-
var IServiceProvider = class {
|
|
35
|
-
/**
|
|
36
|
-
* Unique Identifier for service providers
|
|
37
|
-
*/
|
|
38
|
-
static uid;
|
|
39
|
-
/**
|
|
40
|
-
* Sort order
|
|
41
|
-
*/
|
|
42
|
-
static order;
|
|
43
|
-
/**
|
|
44
|
-
* Sort priority
|
|
45
|
-
*/
|
|
46
|
-
static priority;
|
|
47
|
-
/**
|
|
48
|
-
* Indicate that this service provider only runs in console
|
|
49
|
-
*/
|
|
50
|
-
static runsInConsole;
|
|
51
|
-
/**
|
|
52
|
-
* Indicate that this service provider only runs in console
|
|
53
|
-
*/
|
|
54
|
-
static console;
|
|
55
|
-
};
|
|
56
|
-
//#endregion
|
|
57
|
-
//#region src/Database/IModel.ts
|
|
58
|
-
var IModel = class {};
|
|
59
|
-
//#endregion
|
|
60
|
-
//#region src/Events/IDispatcher.ts
|
|
61
|
-
var IDispatcher = class {};
|
|
62
|
-
//#endregion
|
|
63
|
-
//#region src/Exceptions/IExceptionHandler.ts
|
|
64
|
-
var IExceptionHandler = class {};
|
|
65
|
-
//#endregion
|
|
66
|
-
//#region src/Foundation/CKernel.ts
|
|
67
|
-
var CKernel = class {};
|
|
68
|
-
//#endregion
|
|
69
|
-
//#region src/Foundation/IBootstraper.ts
|
|
70
|
-
var IBootstraper = class {};
|
|
71
|
-
//#endregion
|
|
72
|
-
//#region src/Foundation/IKernel.ts
|
|
73
|
-
var IKernel = class {};
|
|
74
|
-
//#endregion
|
|
75
|
-
//#region src/Hashing/IAbstractHasher.ts
|
|
76
|
-
var IAbstractHasher = class {};
|
|
77
|
-
//#endregion
|
|
78
|
-
//#region src/Hashing/IArgon2idHasher.ts
|
|
79
|
-
var IArgon2idHasher = class extends IAbstractHasher {};
|
|
80
|
-
//#endregion
|
|
81
|
-
//#region src/Hashing/IArgonHasher.ts
|
|
82
|
-
var IArgonHasher = class extends IAbstractHasher {};
|
|
83
|
-
//#endregion
|
|
84
|
-
//#region src/Hashing/IBaseHashManager.ts
|
|
85
|
-
var IBaseHashManager = class {};
|
|
86
|
-
//#endregion
|
|
87
|
-
//#region src/Hashing/IBcryptHasher.ts
|
|
88
|
-
var IBcryptHasher = class extends IAbstractHasher {};
|
|
89
|
-
//#endregion
|
|
90
|
-
//#region src/Hashing/IHashManager.ts
|
|
91
|
-
var IHashManager = class extends IBaseHashManager {};
|
|
92
|
-
//#endregion
|
|
93
|
-
//#region src/Http/IParamBag.ts
|
|
94
|
-
/**
|
|
95
|
-
* ParamBag is a container for key/value pairs
|
|
96
|
-
* for H3ravel App.
|
|
97
|
-
*/
|
|
98
|
-
var IParamBag = class {};
|
|
99
|
-
//#endregion
|
|
100
|
-
//#region src/Http/IFileBag.ts
|
|
101
|
-
/**
|
|
102
|
-
* FileBag is a container for uploaded files
|
|
103
|
-
* for H3ravel App.
|
|
104
|
-
*/
|
|
105
|
-
var IFileBag = class extends IParamBag {};
|
|
106
|
-
//#endregion
|
|
107
|
-
//#region src/Http/IHeaderBag.ts
|
|
108
|
-
/**
|
|
109
|
-
* HeaderBag — A container for HTTP headers
|
|
110
|
-
* for H3ravel App.
|
|
111
|
-
*/
|
|
112
|
-
var IHeaderBag = class {};
|
|
113
|
-
//#endregion
|
|
114
|
-
//#region src/Http/IHttpContext.ts
|
|
115
|
-
var IHttpContext = class {
|
|
116
|
-
/**
|
|
117
|
-
* Retrieve an existing HttpContext instance for an event, if any.
|
|
118
|
-
*/
|
|
119
|
-
static get(event) {}
|
|
120
|
-
/**
|
|
121
|
-
* Delete the cached context for a given event (optional cleanup).
|
|
122
|
-
*/
|
|
123
|
-
static forget(event) {}
|
|
124
|
-
};
|
|
125
|
-
//#endregion
|
|
126
|
-
//#region src/Http/IHttpRequest.ts
|
|
127
|
-
var IHttpRequest = class {};
|
|
128
|
-
//#endregion
|
|
129
|
-
//#region src/Http/IHttpResponse.ts
|
|
130
|
-
/**
|
|
131
|
-
* Interface for the Response contract, defining methods for handling HTTP responses.
|
|
132
|
-
*/
|
|
133
|
-
var IHttpResponse = class {};
|
|
134
|
-
//#endregion
|
|
135
|
-
//#region src/Http/IInputBag.ts
|
|
136
|
-
/**
|
|
137
|
-
* InputBag is a container for user input values
|
|
138
|
-
* (e.g., query params, body, cookies)
|
|
139
|
-
* for H3ravel App.
|
|
140
|
-
*/
|
|
141
|
-
var InputBag = class extends IParamBag {};
|
|
142
|
-
//#endregion
|
|
143
|
-
//#region src/Http/IRequest.ts
|
|
144
|
-
/**
|
|
145
|
-
* Interface for the Request contract, defining methods for handling HTTP request data.
|
|
146
|
-
*/
|
|
147
|
-
var IRequest = class extends IHttpRequest {
|
|
148
|
-
/**
|
|
149
|
-
* Factory method to create a Request instance from an H3Event.
|
|
150
|
-
*/
|
|
151
|
-
static create(event, app) {
|
|
152
|
-
return Promise.resolve({});
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Enables support for the _method request parameter to determine the intended HTTP method.
|
|
156
|
-
*
|
|
157
|
-
* Be warned that enabling this feature might lead to CSRF issues in your code.
|
|
158
|
-
* Check that you are using CSRF tokens when required.
|
|
159
|
-
* If the HTTP method parameter override is enabled, an html-form with method "POST" can be altered
|
|
160
|
-
* and used to send a "PUT" or "DELETE" request via the _method request parameter.
|
|
161
|
-
* If these methods are not protected against CSRF, this presents a possible vulnerability.
|
|
162
|
-
*
|
|
163
|
-
* The HTTP method can only be overridden when the real HTTP method is POST.
|
|
164
|
-
*/
|
|
165
|
-
static enableHttpMethodParameterOverride() {}
|
|
166
|
-
/**
|
|
167
|
-
* Checks whether support for the _method request parameter is enabled.
|
|
168
|
-
*/
|
|
169
|
-
static getHttpMethodParameterOverride() {
|
|
170
|
-
return false;
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
//#endregion
|
|
174
|
-
//#region src/Http/IResponse.ts
|
|
175
|
-
/**
|
|
176
|
-
* Interface for the Response contract, defining methods for handling HTTP responses.
|
|
177
|
-
*/
|
|
178
|
-
var IResponse = class extends IHttpResponse {};
|
|
179
|
-
var IResponsable = class extends h3.HTTPResponse {};
|
|
180
|
-
//#endregion
|
|
181
|
-
//#region src/Http/IServerBag.ts
|
|
182
|
-
/**
|
|
183
|
-
* ServerBag — a simplified version of Symfony's ServerBag
|
|
184
|
-
* for H3ravel App.
|
|
185
|
-
*
|
|
186
|
-
* Responsible for extracting and normalizing HTTP headers
|
|
187
|
-
* from the incoming request.
|
|
188
|
-
*/
|
|
189
|
-
var IServerBag = class extends IParamBag {};
|
|
190
|
-
//#endregion
|
|
191
|
-
//#region src/Http/IUploadedFile.ts
|
|
192
|
-
var IUploadedFile = class {};
|
|
193
|
-
//#endregion
|
|
194
|
-
//#region src/Queue/IJob.ts
|
|
195
|
-
var IJob = class {};
|
|
196
|
-
//#endregion
|
|
197
|
-
//#region src/Queue/IQueueDriver.ts
|
|
198
|
-
/**
|
|
199
|
-
* Queue driver contract for queue backends.
|
|
200
|
-
* Methods can be sync or async (return T | Promise<T>).
|
|
201
|
-
*/
|
|
202
|
-
var IQueueDriver = class {};
|
|
203
|
-
//#endregion
|
|
204
|
-
//#region src/Queue/IQueueManager.ts
|
|
205
|
-
/**
|
|
206
|
-
* Queue manager contract for managing drivers and connections.
|
|
207
|
-
*/
|
|
208
|
-
var IQueueManager = class {};
|
|
209
|
-
//#endregion
|
|
210
|
-
//#region src/Routing/ICallableDispatcher.ts
|
|
211
|
-
var ICallableDispatcher = class {};
|
|
212
|
-
//#endregion
|
|
213
|
-
//#region src/Routing/IControllerDispatcher.ts
|
|
214
|
-
var IControllerDispatcher = class {};
|
|
215
|
-
//#endregion
|
|
216
|
-
//#region src/Routing/IMiddleware.ts
|
|
217
|
-
/**
|
|
218
|
-
* Defines the contract for all middlewares.
|
|
219
|
-
* Any middleware implementing this must define these methods.
|
|
220
|
-
*/
|
|
221
|
-
var IMiddleware = class {
|
|
222
|
-
options = {};
|
|
223
|
-
};
|
|
224
|
-
//#endregion
|
|
225
|
-
//#region src/Routing/IPendingResourceRegistration.ts
|
|
226
|
-
var IPendingResourceRegistration = class {};
|
|
227
|
-
//#endregion
|
|
228
|
-
//#region src/Routing/IPendingSingletonResourceRegistration.ts
|
|
229
|
-
var IPendingSingletonResourceRegistration = class {};
|
|
230
|
-
//#endregion
|
|
231
|
-
//#region src/Routing/IRoute.ts
|
|
232
|
-
var IRoute = class {};
|
|
233
|
-
//#endregion
|
|
234
|
-
//#region src/Routing/IRouter.ts
|
|
235
|
-
/**
|
|
236
|
-
* Interface for the Router contract, defining methods for HTTP routing.
|
|
237
|
-
*/
|
|
238
|
-
var IRouter = class {
|
|
239
|
-
/**
|
|
240
|
-
* All of the verbs supported by the router.
|
|
241
|
-
*/
|
|
242
|
-
static verbs;
|
|
243
|
-
};
|
|
244
|
-
//#endregion
|
|
245
|
-
//#region src/Routing/IRouteRegistrar.ts
|
|
246
|
-
var IRouteRegistrar = class {};
|
|
247
|
-
//#endregion
|
|
248
|
-
//#region src/Routing/Traits/UrlRoutable.ts
|
|
249
|
-
var UrlRoutable = class {};
|
|
250
|
-
//#endregion
|
|
251
|
-
//#region src/Session/FlashBag.ts
|
|
252
|
-
var FlashBag = class {};
|
|
253
|
-
//#endregion
|
|
254
|
-
//#region src/Session/ISessionDriver.ts
|
|
255
|
-
/**
|
|
256
|
-
* SessionDriver Interface
|
|
257
|
-
*
|
|
258
|
-
* All session drivers must implement these methods to ensure
|
|
259
|
-
* consistency across different storage mechanisms (memory, files, database, redis).
|
|
260
|
-
*/
|
|
261
|
-
var ISessionDriver = class {};
|
|
262
|
-
//#endregion
|
|
263
|
-
//#region src/Session/ISessionManager.ts
|
|
264
|
-
/**
|
|
265
|
-
* SessionManager
|
|
266
|
-
*
|
|
267
|
-
* Handles session initialization, ID generation, and encryption.
|
|
268
|
-
* Each request gets a unique session namespace tied to its ID.
|
|
269
|
-
*/
|
|
270
|
-
var ISessionManager = class {};
|
|
271
|
-
//#endregion
|
|
272
|
-
//#region src/Url/IRequestAwareUrl.ts
|
|
273
|
-
/**
|
|
274
|
-
* Contract for request-aware URL helpers
|
|
275
|
-
*/
|
|
276
|
-
var IRequestAwareUrl = class {};
|
|
277
|
-
//#endregion
|
|
278
|
-
//#region src/Url/IRouteUrlGenerator.ts
|
|
279
|
-
var IRouteUrlGenerator = class {};
|
|
280
|
-
//#endregion
|
|
281
|
-
//#region src/Url/IUrl.ts
|
|
282
|
-
var IUrl = class {
|
|
283
|
-
/**
|
|
284
|
-
* Create a URL from a full URL string
|
|
285
|
-
*/
|
|
286
|
-
static of(url, app) {
|
|
287
|
-
return {};
|
|
288
|
-
}
|
|
289
|
-
/**
|
|
290
|
-
* Create a URL from a path relative to the app URL
|
|
291
|
-
*/
|
|
292
|
-
static to(path, app) {
|
|
293
|
-
return {};
|
|
294
|
-
}
|
|
295
|
-
/**
|
|
296
|
-
* Create a URL from a named route
|
|
297
|
-
*/
|
|
298
|
-
static route(name, params, app) {
|
|
299
|
-
return {};
|
|
300
|
-
}
|
|
301
|
-
/**
|
|
302
|
-
* Create a signed URL from a named route
|
|
303
|
-
*/
|
|
304
|
-
static signedRoute(name, params, app) {
|
|
305
|
-
return {};
|
|
306
|
-
}
|
|
307
|
-
/**
|
|
308
|
-
* Create a temporary signed URL from a named route
|
|
309
|
-
*/
|
|
310
|
-
static temporarySignedRoute(name, params, expiration, app) {
|
|
311
|
-
return {};
|
|
312
|
-
}
|
|
313
|
-
/**
|
|
314
|
-
* Create a URL from a controller action
|
|
315
|
-
*/
|
|
316
|
-
static action(controller, params, app) {
|
|
317
|
-
return {};
|
|
318
|
-
}
|
|
319
|
-
};
|
|
320
|
-
//#endregion
|
|
321
|
-
//#region src/Url/IUrlGenerator.ts
|
|
322
|
-
var IUrlGenerator = class {};
|
|
323
|
-
//#endregion
|
|
324
|
-
//#region src/Url/IUrlHelpers.ts
|
|
325
|
-
/**
|
|
326
|
-
* The Url Helper Contract
|
|
327
|
-
*/
|
|
328
|
-
var IUrlHelpers = class {};
|
|
329
|
-
//#endregion
|
|
330
|
-
exports.CKernel = CKernel;
|
|
331
|
-
exports.FlashBag = FlashBag;
|
|
332
|
-
exports.IAbstractHasher = IAbstractHasher;
|
|
333
|
-
exports.IAppBuilder = IAppBuilder;
|
|
334
|
-
exports.IApplication = IApplication;
|
|
335
|
-
exports.IArgon2idHasher = IArgon2idHasher;
|
|
336
|
-
exports.IArgonHasher = IArgonHasher;
|
|
337
|
-
exports.IBaseHashManager = IBaseHashManager;
|
|
338
|
-
exports.IBcryptHasher = IBcryptHasher;
|
|
339
|
-
exports.IBootstraper = IBootstraper;
|
|
340
|
-
exports.ICallableDispatcher = ICallableDispatcher;
|
|
341
|
-
exports.IContainer = IContainer;
|
|
342
|
-
exports.IController = IController;
|
|
343
|
-
exports.IControllerDispatcher = IControllerDispatcher;
|
|
344
|
-
exports.IDispatcher = IDispatcher;
|
|
345
|
-
exports.IExceptionHandler = IExceptionHandler;
|
|
346
|
-
exports.IFileBag = IFileBag;
|
|
347
|
-
exports.IHashManager = IHashManager;
|
|
348
|
-
exports.IHeaderBag = IHeaderBag;
|
|
349
|
-
exports.IHttpContext = IHttpContext;
|
|
350
|
-
exports.IHttpRequest = IHttpRequest;
|
|
351
|
-
exports.IHttpResponse = IHttpResponse;
|
|
352
|
-
exports.IJob = IJob;
|
|
353
|
-
exports.IKernel = IKernel;
|
|
354
|
-
exports.IMiddleware = IMiddleware;
|
|
355
|
-
exports.IModel = IModel;
|
|
356
|
-
exports.IParamBag = IParamBag;
|
|
357
|
-
exports.IPendingResourceRegistration = IPendingResourceRegistration;
|
|
358
|
-
exports.IPendingSingletonResourceRegistration = IPendingSingletonResourceRegistration;
|
|
359
|
-
exports.IQueueDriver = IQueueDriver;
|
|
360
|
-
exports.IQueueManager = IQueueManager;
|
|
361
|
-
exports.IRegisterer = IRegisterer;
|
|
362
|
-
exports.IRequest = IRequest;
|
|
363
|
-
exports.IRequestAwareUrl = IRequestAwareUrl;
|
|
364
|
-
exports.IResponsable = IResponsable;
|
|
365
|
-
exports.IResponse = IResponse;
|
|
366
|
-
exports.IRoute = IRoute;
|
|
367
|
-
exports.IRouteRegistrar = IRouteRegistrar;
|
|
368
|
-
exports.IRouteUrlGenerator = IRouteUrlGenerator;
|
|
369
|
-
exports.IRouter = IRouter;
|
|
370
|
-
exports.IServerBag = IServerBag;
|
|
371
|
-
exports.IServiceProvider = IServiceProvider;
|
|
372
|
-
exports.ISessionDriver = ISessionDriver;
|
|
373
|
-
exports.ISessionManager = ISessionManager;
|
|
374
|
-
exports.IUploadedFile = IUploadedFile;
|
|
375
|
-
exports.IUrl = IUrl;
|
|
376
|
-
exports.IUrlGenerator = IUrlGenerator;
|
|
377
|
-
exports.IUrlHelpers = IUrlHelpers;
|
|
378
|
-
exports.InputBag = InputBag;
|
|
379
|
-
exports.UrlRoutable = UrlRoutable;
|