@tahminator/sapling 2.0.5-beta.30231b0a → 2.0.5-beta.4cd3a4cd
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.cjs +3 -16
- package/dist/index.d.cts +1 -2
- package/dist/index.d.mts +1 -2
- package/dist/index.mjs +3 -16
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -381,19 +381,6 @@ var Sapling = class Sapling {
|
|
|
381
381
|
static setSwaggerPath(path) {
|
|
382
382
|
_settings.doc.swaggerPath = path;
|
|
383
383
|
}
|
|
384
|
-
static chainHandlers(handlers, request, response, next, index = 0) {
|
|
385
|
-
if (index >= handlers.length) {
|
|
386
|
-
next();
|
|
387
|
-
return;
|
|
388
|
-
}
|
|
389
|
-
handlers[index]?.(request, response, (err) => {
|
|
390
|
-
if (err) {
|
|
391
|
-
next(err);
|
|
392
|
-
return;
|
|
393
|
-
}
|
|
394
|
-
Sapling.chainHandlers(handlers, request, response, next, index + 1);
|
|
395
|
-
});
|
|
396
|
-
}
|
|
397
384
|
};
|
|
398
385
|
//#endregion
|
|
399
386
|
//#region src/annotation/request.ts
|
|
@@ -974,11 +961,11 @@ let Serve = class Serve {
|
|
|
974
961
|
constructor() {
|
|
975
962
|
this.handlers = swagger_ui_express.default.serve;
|
|
976
963
|
}
|
|
977
|
-
handle(
|
|
978
|
-
return
|
|
964
|
+
handle(_request, _response, _next) {
|
|
965
|
+
return this.handlers;
|
|
979
966
|
}
|
|
980
967
|
};
|
|
981
|
-
__decorate([
|
|
968
|
+
__decorate([GET(_settings.doc.swaggerPath)], Serve.prototype, "handle", null);
|
|
982
969
|
Serve = __decorate([MiddlewareClass()], Serve);
|
|
983
970
|
let Setup = class Setup {
|
|
984
971
|
constructor() {
|
package/dist/index.d.cts
CHANGED
|
@@ -531,7 +531,6 @@ declare class Sapling {
|
|
|
531
531
|
static setDeserializeFn(this: void, fn: (value: string) => any): void;
|
|
532
532
|
static setOpenApiPath(this: void, path: string): void;
|
|
533
533
|
static setSwaggerPath(this: void, path: string): void;
|
|
534
|
-
static chainHandlers(this: void, handlers: RequestHandler[], request: Request, response: Response$1, next: NextFunction, index?: number): void;
|
|
535
534
|
}
|
|
536
535
|
//#endregion
|
|
537
536
|
//#region node_modules/.pnpm/openapi-types@12.1.3/node_modules/openapi-types/dist/index.d.ts
|
|
@@ -993,7 +992,7 @@ declare class DefaultOpenApiMiddleware {
|
|
|
993
992
|
//#region src/middleware/default/swagger/index.d.ts
|
|
994
993
|
declare class Serve {
|
|
995
994
|
private readonly handlers;
|
|
996
|
-
handle(
|
|
995
|
+
handle(_request: Request, _response: Response$1, _next: NextFunction): RequestHandler[];
|
|
997
996
|
}
|
|
998
997
|
declare class Setup {
|
|
999
998
|
private readonly handler;
|
package/dist/index.d.mts
CHANGED
|
@@ -531,7 +531,6 @@ declare class Sapling {
|
|
|
531
531
|
static setDeserializeFn(this: void, fn: (value: string) => any): void;
|
|
532
532
|
static setOpenApiPath(this: void, path: string): void;
|
|
533
533
|
static setSwaggerPath(this: void, path: string): void;
|
|
534
|
-
static chainHandlers(this: void, handlers: RequestHandler[], request: Request, response: Response$1, next: NextFunction, index?: number): void;
|
|
535
534
|
}
|
|
536
535
|
//#endregion
|
|
537
536
|
//#region node_modules/.pnpm/openapi-types@12.1.3/node_modules/openapi-types/dist/index.d.ts
|
|
@@ -993,7 +992,7 @@ declare class DefaultOpenApiMiddleware {
|
|
|
993
992
|
//#region src/middleware/default/swagger/index.d.ts
|
|
994
993
|
declare class Serve {
|
|
995
994
|
private readonly handlers;
|
|
996
|
-
handle(
|
|
995
|
+
handle(_request: Request, _response: Response$1, _next: NextFunction): RequestHandler[];
|
|
997
996
|
}
|
|
998
997
|
declare class Setup {
|
|
999
998
|
private readonly handler;
|
package/dist/index.mjs
CHANGED
|
@@ -356,19 +356,6 @@ var Sapling = class Sapling {
|
|
|
356
356
|
static setSwaggerPath(path) {
|
|
357
357
|
_settings.doc.swaggerPath = path;
|
|
358
358
|
}
|
|
359
|
-
static chainHandlers(handlers, request, response, next, index = 0) {
|
|
360
|
-
if (index >= handlers.length) {
|
|
361
|
-
next();
|
|
362
|
-
return;
|
|
363
|
-
}
|
|
364
|
-
handlers[index]?.(request, response, (err) => {
|
|
365
|
-
if (err) {
|
|
366
|
-
next(err);
|
|
367
|
-
return;
|
|
368
|
-
}
|
|
369
|
-
Sapling.chainHandlers(handlers, request, response, next, index + 1);
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
359
|
};
|
|
373
360
|
//#endregion
|
|
374
361
|
//#region src/annotation/request.ts
|
|
@@ -949,11 +936,11 @@ let Serve = class Serve {
|
|
|
949
936
|
constructor() {
|
|
950
937
|
this.handlers = swagger.serve;
|
|
951
938
|
}
|
|
952
|
-
handle(
|
|
953
|
-
return
|
|
939
|
+
handle(_request, _response, _next) {
|
|
940
|
+
return this.handlers;
|
|
954
941
|
}
|
|
955
942
|
};
|
|
956
|
-
__decorate([
|
|
943
|
+
__decorate([GET(_settings.doc.swaggerPath)], Serve.prototype, "handle", null);
|
|
957
944
|
Serve = __decorate([MiddlewareClass()], Serve);
|
|
958
945
|
let Setup = class Setup {
|
|
959
946
|
constructor() {
|