listpage-next-nest 0.0.251 → 0.0.252
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/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +12 -2
- package/package.json +1 -1
package/dist/cjs/index.d.ts
CHANGED
|
@@ -338,6 +338,8 @@ export declare type SevrverSendEventMessages = {
|
|
|
338
338
|
};
|
|
339
339
|
};
|
|
340
340
|
|
|
341
|
+
export declare const SkipResponseInterceptor: () => CustomDecorator<string>;
|
|
342
|
+
|
|
341
343
|
export declare class StaticRouteMiddleware implements NestMiddleware {
|
|
342
344
|
private readonly options;
|
|
343
345
|
use(req: Request_2, res: Response_2, next: NextFunction): void;
|
package/dist/cjs/index.js
CHANGED
|
@@ -32,16 +32,17 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
32
32
|
LLMProvider: ()=>LLMProvider,
|
|
33
33
|
MINIO_OPTIONS: ()=>MINIO_OPTIONS,
|
|
34
34
|
PaginationData: ()=>PaginationData,
|
|
35
|
+
SkipResponseInterceptor: ()=>SkipResponseInterceptor,
|
|
35
36
|
StaticRouteMiddleware: ()=>StaticRouteMiddleware,
|
|
36
|
-
StaticRouteMiddlewareFactory: ()=>StaticRouteMiddlewareFactory,
|
|
37
37
|
RequestIdMiddleware: ()=>RequestIdMiddleware,
|
|
38
38
|
LoggingInterceptor: ()=>LoggingInterceptor,
|
|
39
39
|
ResponseInterceptor: ()=>ResponseInterceptor,
|
|
40
|
-
|
|
40
|
+
StaticRouteMiddlewareFactory: ()=>StaticRouteMiddlewareFactory,
|
|
41
41
|
CorsInterceptor: ()=>CorsInterceptor,
|
|
42
42
|
BaseQueryDto: ()=>BaseQueryDto,
|
|
43
43
|
ApiResponse: ()=>ApiResponse,
|
|
44
44
|
HttpExceptionFilter: ()=>HttpExceptionFilter,
|
|
45
|
+
StaticRouteModule: ()=>StaticRouteModule,
|
|
45
46
|
User: ()=>User,
|
|
46
47
|
Public: ()=>Public,
|
|
47
48
|
VolcengineProvider: ()=>VolcengineProvider,
|
|
@@ -307,6 +308,8 @@ class LoggingInterceptor {
|
|
|
307
308
|
LoggingInterceptor = logging_interceptor_ts_decorate([
|
|
308
309
|
(0, common_namespaceObject.Injectable)()
|
|
309
310
|
], LoggingInterceptor);
|
|
311
|
+
const SKIP_RESPONSE_INTERCEPTOR = 'SKIP_RESPONSE_INTERCEPTOR';
|
|
312
|
+
const SkipResponseInterceptor = ()=>(0, common_namespaceObject.SetMetadata)(SKIP_RESPONSE_INTERCEPTOR, true);
|
|
310
313
|
function response_interceptor_ts_decorate(decorators, target, key, desc) {
|
|
311
314
|
var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
312
315
|
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -316,6 +319,10 @@ function response_interceptor_ts_decorate(decorators, target, key, desc) {
|
|
|
316
319
|
class ResponseInterceptor {
|
|
317
320
|
intercept(context, next) {
|
|
318
321
|
const request = context.switchToHttp().getRequest();
|
|
322
|
+
const handler = context.getHandler();
|
|
323
|
+
const cls = context.getClass();
|
|
324
|
+
const skipInterceptor = Reflect.getMetadata(SKIP_RESPONSE_INTERCEPTOR, handler) || Reflect.getMetadata(SKIP_RESPONSE_INTERCEPTOR, cls);
|
|
325
|
+
if (skipInterceptor) return next.handle();
|
|
319
326
|
if ('text/event-stream' === request.headers.accept) return next.handle();
|
|
320
327
|
return next.handle().pipe((0, operators_namespaceObject.map)((data)=>{
|
|
321
328
|
if (data && 'object' == typeof data && 'code' in data && 'message' in data) return {
|
|
@@ -1217,6 +1224,7 @@ function createMinioController(prefix) {
|
|
|
1217
1224
|
], MinioController.prototype, "removeObject", null);
|
|
1218
1225
|
minio_controller_ts_decorate([
|
|
1219
1226
|
(0, common_namespaceObject.Get)('objects/download'),
|
|
1227
|
+
SkipResponseInterceptor(),
|
|
1220
1228
|
minio_controller_ts_param(0, (0, common_namespaceObject.Query)('prefix')),
|
|
1221
1229
|
minio_controller_ts_param(1, (0, common_namespaceObject.Query)('preview')),
|
|
1222
1230
|
minio_controller_ts_param(2, (0, common_namespaceObject.Response)({
|
|
@@ -1286,6 +1294,7 @@ exports.RequestContextService = __webpack_exports__.RequestContextService;
|
|
|
1286
1294
|
exports.RequestIdMiddleware = __webpack_exports__.RequestIdMiddleware;
|
|
1287
1295
|
exports.ResponseInterceptor = __webpack_exports__.ResponseInterceptor;
|
|
1288
1296
|
exports.ServerSendEventName = __webpack_exports__.ServerSendEventName;
|
|
1297
|
+
exports.SkipResponseInterceptor = __webpack_exports__.SkipResponseInterceptor;
|
|
1289
1298
|
exports.StaticRouteMiddleware = __webpack_exports__.StaticRouteMiddleware;
|
|
1290
1299
|
exports.StaticRouteMiddlewareFactory = __webpack_exports__.StaticRouteMiddlewareFactory;
|
|
1291
1300
|
exports.StaticRouteModule = __webpack_exports__.StaticRouteModule;
|
|
@@ -1314,6 +1323,7 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
|
1314
1323
|
"RequestIdMiddleware",
|
|
1315
1324
|
"ResponseInterceptor",
|
|
1316
1325
|
"ServerSendEventName",
|
|
1326
|
+
"SkipResponseInterceptor",
|
|
1317
1327
|
"StaticRouteMiddleware",
|
|
1318
1328
|
"StaticRouteMiddlewareFactory",
|
|
1319
1329
|
"StaticRouteModule",
|