@h3ravel/contracts 1.29.0-alpha.16 → 2.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/dist/index.d.ts +18 -5
- package/dist/index.js +35 -10
- package/package.json +2 -4
- package/dist/index.cjs +0 -379
package/dist/index.d.ts
CHANGED
|
@@ -732,9 +732,6 @@ declare abstract class IHttpRequest {
|
|
|
732
732
|
*
|
|
733
733
|
* The base URL never ends with a /.
|
|
734
734
|
*
|
|
735
|
-
* This is similar to getBasePath(), except that it also includes the
|
|
736
|
-
* script filename (e.g. index.php) if one exists.
|
|
737
|
-
*
|
|
738
735
|
* @return string The raw URL (i.e. not urldecoded)
|
|
739
736
|
*/
|
|
740
737
|
abstract getBaseUrl(): string;
|
|
@@ -1579,12 +1576,17 @@ declare abstract class ISessionManager {
|
|
|
1579
1576
|
abstract ageFlashData(): void | Promise<void>;
|
|
1580
1577
|
}
|
|
1581
1578
|
//#endregion
|
|
1579
|
+
//#region src/Utilities/ContainerToken.d.ts
|
|
1580
|
+
declare const CONTAINER_TOKEN: unique symbol;
|
|
1581
|
+
declare const createContainerToken: (name: string) => symbol;
|
|
1582
|
+
//#endregion
|
|
1582
1583
|
//#region src/Http/IRequest.d.ts
|
|
1583
1584
|
type RequestObject$1 = Record<string, any>;
|
|
1584
1585
|
/**
|
|
1585
1586
|
* Interface for the Request contract, defining methods for handling HTTP request data.
|
|
1586
1587
|
*/
|
|
1587
1588
|
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 {
|
|
1589
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
1588
1590
|
/**
|
|
1589
1591
|
* The current app instance
|
|
1590
1592
|
*/
|
|
@@ -2297,6 +2299,7 @@ declare abstract class IHttpResponse {
|
|
|
2297
2299
|
* Interface for the Response contract, defining methods for handling HTTP responses.
|
|
2298
2300
|
*/
|
|
2299
2301
|
declare abstract class IResponse extends IHttpResponse {
|
|
2302
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
2300
2303
|
/**
|
|
2301
2304
|
* The current app instance
|
|
2302
2305
|
*/
|
|
@@ -2412,6 +2415,7 @@ interface JobPayload {
|
|
|
2412
2415
|
//#endregion
|
|
2413
2416
|
//#region src/Events/IDispatcher.d.ts
|
|
2414
2417
|
declare abstract class IDispatcher {
|
|
2418
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
2415
2419
|
/**
|
|
2416
2420
|
* Register an event listener with the dispatcher.
|
|
2417
2421
|
*
|
|
@@ -3077,6 +3081,7 @@ declare abstract class IPendingSingletonResourceRegistration {
|
|
|
3077
3081
|
* Interface for the Router contract, defining methods for HTTP routing.
|
|
3078
3082
|
*/
|
|
3079
3083
|
declare abstract class IRouter {
|
|
3084
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
3080
3085
|
/**
|
|
3081
3086
|
* The priority-sorted list of middleware.
|
|
3082
3087
|
*
|
|
@@ -3407,6 +3412,7 @@ declare abstract class UrlRoutable {
|
|
|
3407
3412
|
//#endregion
|
|
3408
3413
|
//#region src/Url/IUrlGenerator.d.ts
|
|
3409
3414
|
declare abstract class IUrlGenerator {
|
|
3415
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
3410
3416
|
/**
|
|
3411
3417
|
* The named parameter defaults.
|
|
3412
3418
|
*/
|
|
@@ -3657,7 +3663,7 @@ interface Bindings {
|
|
|
3657
3663
|
'session.store': ISessionDriver;
|
|
3658
3664
|
}
|
|
3659
3665
|
type UseKey<X extends Record<string, any> = Record<string, any>> = keyof RemoveIndexSignature<Bindings & X>;
|
|
3660
|
-
type IBinding = UseKey | (new (...args: any[]) => unknown);
|
|
3666
|
+
type IBinding = UseKey | symbol | (new (...args: any[]) => unknown);
|
|
3661
3667
|
//#endregion
|
|
3662
3668
|
//#region src/Routing/IMiddlewareHandler.d.ts
|
|
3663
3669
|
declare class IMiddlewareHandler {
|
|
@@ -3846,6 +3852,7 @@ declare abstract class IContainer {
|
|
|
3846
3852
|
//#endregion
|
|
3847
3853
|
//#region src/Core/IApplication.d.ts
|
|
3848
3854
|
declare abstract class IApplication extends IContainer {
|
|
3855
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
3849
3856
|
abstract paths: PathLoader;
|
|
3850
3857
|
abstract context?: (event: H3Event) => Promise<IHttpContext>;
|
|
3851
3858
|
abstract h3Event?: H3Event;
|
|
@@ -4066,6 +4073,7 @@ declare abstract class IApplication extends IContainer {
|
|
|
4066
4073
|
//#endregion
|
|
4067
4074
|
//#region src/Http/IHttpContext.d.ts
|
|
4068
4075
|
declare abstract class IHttpContext {
|
|
4076
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
4069
4077
|
abstract app: IApplication;
|
|
4070
4078
|
abstract event: H3Event;
|
|
4071
4079
|
abstract request: IRequest;
|
|
@@ -4228,6 +4236,7 @@ type RenderExceptionCallback = (error: any, request: IRequest) => IResponse | Pr
|
|
|
4228
4236
|
type ReportExceptionCallback = (error: any) => boolean | void | Promise<boolean | void>;
|
|
4229
4237
|
type ThrottleExceptionCallback = (error: any) => LimitSpec | Unlimited | null | undefined;
|
|
4230
4238
|
declare abstract class IExceptionHandler {
|
|
4239
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
4231
4240
|
/**
|
|
4232
4241
|
* The exception handler method
|
|
4233
4242
|
*
|
|
@@ -4300,6 +4309,7 @@ declare abstract class IExceptionHandler {
|
|
|
4300
4309
|
//#endregion
|
|
4301
4310
|
//#region src/Foundation/CKernel.d.ts
|
|
4302
4311
|
declare abstract class CKernel {
|
|
4312
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
4303
4313
|
/**
|
|
4304
4314
|
* Run the console application.
|
|
4305
4315
|
*/
|
|
@@ -4348,6 +4358,7 @@ declare abstract class CKernel {
|
|
|
4348
4358
|
//#endregion
|
|
4349
4359
|
//#region src/Foundation/IKernel.d.ts
|
|
4350
4360
|
declare abstract class IKernel {
|
|
4361
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
4351
4362
|
/**
|
|
4352
4363
|
* Handle an incoming HTTP request.
|
|
4353
4364
|
*
|
|
@@ -4714,6 +4725,7 @@ declare abstract class IQueueManager {
|
|
|
4714
4725
|
//#endregion
|
|
4715
4726
|
//#region src/Routing/ICallableDispatcher.d.ts
|
|
4716
4727
|
declare abstract class ICallableDispatcher {
|
|
4728
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
4717
4729
|
/**
|
|
4718
4730
|
* Dispatch a request to a given callback.
|
|
4719
4731
|
*
|
|
@@ -4726,6 +4738,7 @@ declare abstract class ICallableDispatcher {
|
|
|
4726
4738
|
//#endregion
|
|
4727
4739
|
//#region src/Routing/IControllerDispatcher.d.ts
|
|
4728
4740
|
declare abstract class IControllerDispatcher {
|
|
4741
|
+
static readonly [CONTAINER_TOKEN]: symbol;
|
|
4729
4742
|
/**
|
|
4730
4743
|
* Dispatch a request to a given controller and method.
|
|
4731
4744
|
*
|
|
@@ -5133,4 +5146,4 @@ declare class IValidator<D extends Record<string, any> = any, R extends RulesFor
|
|
|
5133
5146
|
getRules(): R;
|
|
5134
5147
|
}
|
|
5135
5148
|
//#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 };
|
|
5149
|
+
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",
|
|
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;
|