@forklaunch/core 1.3.7 → 1.3.8

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.
@@ -586,7 +586,7 @@ declare class ForklaunchExpressLikeRouter<SV extends AnySchemaValidator, BasePat
586
586
  * available (from the route, router, or application level).
587
587
  * Call this at listen() time when the full option chain is assembled.
588
588
  */
589
- validateSurfacingFunctions(router?: ForklaunchRouter<SV>): void;
589
+ validateSurfacingFunctions(router?: ForklaunchRouter<SV>, parentAuth?: Record<string, unknown>): void;
590
590
  use: TypedNestableMiddlewareDefinition<this, RouterHandler, Internal, SV, RouterSession, BaseRequest, BaseResponse, NextFunction>;
591
591
  all: TypedMiddlewareDefinition<this, SV, RouterSession, BaseRequest, BaseResponse, NextFunction, RouterHandler>;
592
592
  connect: TypedMiddlewareDefinition<this, SV, RouterSession, BaseRequest, BaseResponse, NextFunction, RouterHandler>;
@@ -586,7 +586,7 @@ declare class ForklaunchExpressLikeRouter<SV extends AnySchemaValidator, BasePat
586
586
  * available (from the route, router, or application level).
587
587
  * Call this at listen() time when the full option chain is assembled.
588
588
  */
589
- validateSurfacingFunctions(router?: ForklaunchRouter<SV>): void;
589
+ validateSurfacingFunctions(router?: ForklaunchRouter<SV>, parentAuth?: Record<string, unknown>): void;
590
590
  use: TypedNestableMiddlewareDefinition<this, RouterHandler, Internal, SV, RouterSession, BaseRequest, BaseResponse, NextFunction>;
591
591
  all: TypedMiddlewareDefinition<this, SV, RouterSession, BaseRequest, BaseResponse, NextFunction, RouterHandler>;
592
592
  connect: TypedMiddlewareDefinition<this, SV, RouterSession, BaseRequest, BaseResponse, NextFunction, RouterHandler>;
package/lib/http/index.js CHANGED
@@ -1965,8 +1965,9 @@ var ForklaunchExpressLikeRouter = class _ForklaunchExpressLikeRouter {
1965
1965
  * available (from the route, router, or application level).
1966
1966
  * Call this at listen() time when the full option chain is assembled.
1967
1967
  */
1968
- validateSurfacingFunctions(router = this) {
1969
- const globalAuth = router.routerOptions?.auth && typeof router.routerOptions.auth === "object" ? router.routerOptions.auth : void 0;
1968
+ validateSurfacingFunctions(router = this, parentAuth) {
1969
+ const routerAuth = router.routerOptions?.auth && typeof router.routerOptions.auth === "object" ? router.routerOptions.auth : void 0;
1970
+ const globalAuth = routerAuth ?? parentAuth;
1970
1971
  for (const route of router.routes) {
1971
1972
  const auth = route.contractDetails.auth;
1972
1973
  const access = route.contractDetails.access;
@@ -1996,7 +1997,7 @@ var ForklaunchExpressLikeRouter = class _ForklaunchExpressLikeRouter {
1996
1997
  }
1997
1998
  }
1998
1999
  for (const subRouter of router.routers) {
1999
- this.validateSurfacingFunctions(subRouter);
2000
+ this.validateSurfacingFunctions(subRouter, globalAuth);
2000
2001
  }
2001
2002
  }
2002
2003
  use = (pathOrContractDetailsOrMiddlewareOrTypedHandler, contractDetailsOrMiddlewareOrTypedHandler, ...middlewareOrMiddlewareWithTypedHandler) => {