@bool-ts/core 2.1.1 → 2.1.3
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/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import { containerKey, guardKey, injectableKey, middlewareKey, moduleKey } from
|
|
|
4
4
|
|
|
5
5
|
type TLoaders<TConfig extends {} = {}> = Record<
|
|
6
6
|
string | symbol,
|
|
7
|
-
(args: { config: TConfig }) => [string | symbol,
|
|
7
|
+
(args: { config: TConfig }) => [string | symbol, unknown] | Promise<[string | symbol, unknown]>
|
|
8
8
|
>;
|
|
9
9
|
export type TContainerConfig<TConfig> =
|
|
10
10
|
| TConfig
|
package/src/decorators/module.ts
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
type TInstances = Array<new (...args: any[]) => any>;
|
|
15
15
|
type TLoaders<TConfig extends {} = {}> = Record<
|
|
16
16
|
string | symbol,
|
|
17
|
-
(args: { config: TConfig }) => [string | symbol,
|
|
17
|
+
(args: { config: TConfig }) => [string | symbol, unknown] | Promise<[string | symbol, unknown]>
|
|
18
18
|
>;
|
|
19
19
|
export type TModuleConfig<TConfig> =
|
|
20
20
|
| TConfig
|
|
@@ -332,7 +332,7 @@ export class Application<TRootClass extends Object = Object> {
|
|
|
332
332
|
new Response(
|
|
333
333
|
JSON.stringify({
|
|
334
334
|
httpCode: 404,
|
|
335
|
-
message: "Route not found",
|
|
335
|
+
message: "Route not found.",
|
|
336
336
|
data: undefined
|
|
337
337
|
}),
|
|
338
338
|
{
|
|
@@ -511,11 +511,14 @@ export class Application<TRootClass extends Object = Object> {
|
|
|
511
511
|
.setOptions({ isStatic: false })
|
|
512
512
|
.set(responseStatusArgsKey, 404)
|
|
513
513
|
.set(responseStatusTextArgsKey, "Not found.")
|
|
514
|
-
.set(
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
514
|
+
.set(
|
|
515
|
+
responseBodyArgsKey,
|
|
516
|
+
JSON.stringify({
|
|
517
|
+
httpCode: 404,
|
|
518
|
+
message: "Route not found.",
|
|
519
|
+
data: undefined
|
|
520
|
+
})
|
|
521
|
+
);
|
|
519
522
|
} else {
|
|
520
523
|
const { context: newContext } = await this.httpFetcher({
|
|
521
524
|
context: context,
|