@bunt/app
Advanced tools
Comparing version 0.22.1 to 0.23.0
@@ -63,3 +63,2 @@ "use strict"; | ||
this.logger.debug("match", route); | ||
const unit = __classPrivateFieldGet(this, _Application_unit, "f"); | ||
const state = {}; | ||
@@ -69,3 +68,3 @@ const matches = route.match(request.route); | ||
request, | ||
context: unit.context, | ||
context: __classPrivateFieldGet(this, _Application_unit, "f").context, | ||
args: new Map(Object.entries(matches)), | ||
@@ -77,3 +76,5 @@ }; | ||
} | ||
return unit.run(route.action, state); | ||
Object.freeze(state); | ||
await request.linkState?.(state); | ||
return __classPrivateFieldGet(this, _Application_unit, "f").run(route.action, state); | ||
} | ||
@@ -80,0 +81,0 @@ getRoutes() { |
@@ -35,2 +35,3 @@ /// <reference types="node" /> | ||
validate(app: Application<any>): boolean; | ||
readonly linkState?: <S extends Record<string, unknown>>(state: S) => Promisify<void>; | ||
} | ||
@@ -37,0 +38,0 @@ export declare type HeaderAssertValue = string | string[] | ((value: string) => boolean | void); |
{ | ||
"name": "@bunt/app", | ||
"version": "0.22.1", | ||
"version": "0.23.0", | ||
"keywords": [ | ||
@@ -29,9 +29,9 @@ "typescript" | ||
"dependencies": { | ||
"@bunt/input": "^0.22.1", | ||
"@bunt/unit": "^0.22.0", | ||
"@bunt/util": "^0.22.0", | ||
"@bunt/input": "^0.23.0", | ||
"@bunt/unit": "^0.23.0", | ||
"@bunt/util": "^0.23.0", | ||
"path-to-regexp": "^6.2.0" | ||
}, | ||
"license": "MIT", | ||
"gitHead": "cfa4b29fa5a94a8d197f3e6749ba0353e24ff08f" | ||
"gitHead": "764859d453226d6f229675eb6bcce3bd56c43428" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48626
790
+ Added@bunt/input@0.23.0(transitive)
+ Added@bunt/unit@0.23.0(transitive)
+ Added@bunt/util@0.23.0(transitive)
- Removed@bunt/input@0.22.1(transitive)
- Removed@bunt/unit@0.22.0(transitive)
- Removed@bunt/util@0.22.0(transitive)
Updated@bunt/input@^0.23.0
Updated@bunt/unit@^0.23.0
Updated@bunt/util@^0.23.0