@bepalo/spine 3.12.26 → 3.12.27
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/router.d.ts +166 -162
- package/dist/cjs/router.d.ts.map +1 -1
- package/dist/cjs/router.js +97 -80
- package/dist/cjs/router.js.map +1 -1
- package/dist/router.d.ts +166 -162
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +97 -80
- package/dist/router.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/router.js
CHANGED
|
@@ -131,7 +131,7 @@ class Router {
|
|
|
131
131
|
* Respond to a request according to the defined routes.
|
|
132
132
|
*
|
|
133
133
|
* @param {Request} request An http request object
|
|
134
|
-
* @param {RespondContext<
|
|
134
|
+
* @param {RespondContext<_ExtendContext>} ctxInit Context pre-initialization.
|
|
135
135
|
* Only headers and timestamps are allowed.
|
|
136
136
|
* But timestamps properties will not be overridden but rather extended.
|
|
137
137
|
* @returns {Response} An http response object
|
|
@@ -366,8 +366,10 @@ class Router {
|
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
368
|
if (!(response instanceof Response)) {
|
|
369
|
-
const status = ctx.error &&
|
|
370
|
-
|
|
369
|
+
const status = ctx.error &&
|
|
370
|
+
ctx.error instanceof types_ts_1.HttpError
|
|
371
|
+
? ctx.error
|
|
372
|
+
.status
|
|
371
373
|
: status_ts_1.Status._500_InternalServerError;
|
|
372
374
|
response = new Response(null, {
|
|
373
375
|
status,
|
|
@@ -1011,7 +1013,7 @@ class Router {
|
|
|
1011
1013
|
* Define handlers for all http methods ["Head","Get","Query","Post","Put","Patch","Delete","Options","Trace","Connect"] and the specified paths.
|
|
1012
1014
|
*
|
|
1013
1015
|
* @param {Path} paths One or more valid route paths
|
|
1014
|
-
* @param pipe One or more
|
|
1016
|
+
* @param pipe One or more main handlers
|
|
1015
1017
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1016
1018
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1017
1019
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1031,7 +1033,7 @@ class Router {
|
|
|
1031
1033
|
* Define handlers for CRUD http methods ["Get","Query","Post","Put","Patch","Delete"] and the specified paths.
|
|
1032
1034
|
*
|
|
1033
1035
|
* @param {Path} paths One or more valid route paths
|
|
1034
|
-
* @param pipe One or more
|
|
1036
|
+
* @param pipe One or more main handlers
|
|
1035
1037
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1036
1038
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1037
1039
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1051,7 +1053,7 @@ class Router {
|
|
|
1051
1053
|
* Define handlers for Head http method and the specified paths.
|
|
1052
1054
|
*
|
|
1053
1055
|
* @param {Path} paths One or more valid route paths
|
|
1054
|
-
* @param pipe One or more
|
|
1056
|
+
* @param pipe One or more main handlers
|
|
1055
1057
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1056
1058
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1057
1059
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1066,7 +1068,7 @@ class Router {
|
|
|
1066
1068
|
* Define handlers for Get http method and the specified paths.
|
|
1067
1069
|
*
|
|
1068
1070
|
* @param {Path} paths One or more valid route paths
|
|
1069
|
-
* @param pipe One or more
|
|
1071
|
+
* @param pipe One or more main handlers
|
|
1070
1072
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1071
1073
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1072
1074
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1081,7 +1083,7 @@ class Router {
|
|
|
1081
1083
|
* Define handlers for Query http method and the specified paths.
|
|
1082
1084
|
*
|
|
1083
1085
|
* @param {Path} paths One or more valid route paths
|
|
1084
|
-
* @param pipe One or more
|
|
1086
|
+
* @param pipe One or more main handlers
|
|
1085
1087
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1086
1088
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1087
1089
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1096,7 +1098,7 @@ class Router {
|
|
|
1096
1098
|
* Define handlers for Post http method and the specified paths.
|
|
1097
1099
|
*
|
|
1098
1100
|
* @param {Path} paths One or more valid route paths
|
|
1099
|
-
* @param pipe One or more
|
|
1101
|
+
* @param pipe One or more main handlers
|
|
1100
1102
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1101
1103
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1102
1104
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1111,7 +1113,7 @@ class Router {
|
|
|
1111
1113
|
* Define handlers for Put http method and the specified paths.
|
|
1112
1114
|
*
|
|
1113
1115
|
* @param {Path} paths One or more valid route paths
|
|
1114
|
-
* @param pipe One or more
|
|
1116
|
+
* @param pipe One or more main handlers
|
|
1115
1117
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1116
1118
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1117
1119
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1126,7 +1128,7 @@ class Router {
|
|
|
1126
1128
|
* Define handlers for Patch http method and the specified paths.
|
|
1127
1129
|
*
|
|
1128
1130
|
* @param {Path} paths One or more valid route paths
|
|
1129
|
-
* @param pipe One or more
|
|
1131
|
+
* @param pipe One or more main handlers
|
|
1130
1132
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1131
1133
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1132
1134
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1141,7 +1143,7 @@ class Router {
|
|
|
1141
1143
|
* Define handlers for Head Delete method and the specified paths.
|
|
1142
1144
|
*
|
|
1143
1145
|
* @param {Path} paths One or more valid route paths
|
|
1144
|
-
* @param pipe One or more
|
|
1146
|
+
* @param pipe One or more main handlers
|
|
1145
1147
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1146
1148
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1147
1149
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1156,7 +1158,7 @@ class Router {
|
|
|
1156
1158
|
* Define handlers for Options http method and the specified paths.
|
|
1157
1159
|
*
|
|
1158
1160
|
* @param {Path} paths One or more valid route paths
|
|
1159
|
-
* @param pipe One or more
|
|
1161
|
+
* @param pipe One or more main handlers
|
|
1160
1162
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1161
1163
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1162
1164
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1171,7 +1173,7 @@ class Router {
|
|
|
1171
1173
|
* Define handlers for Trace http method and the specified paths.
|
|
1172
1174
|
*
|
|
1173
1175
|
* @param {Path} paths One or more valid route paths
|
|
1174
|
-
* @param pipe One or more
|
|
1176
|
+
* @param pipe One or more main handlers
|
|
1175
1177
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1176
1178
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1177
1179
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1186,7 +1188,7 @@ class Router {
|
|
|
1186
1188
|
* Define handlers for Connect http method and the specified paths.
|
|
1187
1189
|
*
|
|
1188
1190
|
* @param {Path} paths One or more valid route paths
|
|
1189
|
-
* @param pipe One or more
|
|
1191
|
+
* @param pipe One or more main handlers
|
|
1190
1192
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1191
1193
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1192
1194
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1201,7 +1203,7 @@ class Router {
|
|
|
1201
1203
|
* Define filters for all http methods ["Head","Get","Query","Post","Put","Patch","Delete","Options","Trace","Connect"] and the specified paths.
|
|
1202
1204
|
*
|
|
1203
1205
|
* @param {Path} paths One or more valid route paths
|
|
1204
|
-
* @param pipe One or more
|
|
1206
|
+
* @param pipe One or more filtering handlers
|
|
1205
1207
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1206
1208
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1207
1209
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1221,7 +1223,7 @@ class Router {
|
|
|
1221
1223
|
* Define filters for CRUD http methods ["Get","Query","Post","Put","Patch","Delete"] and the specified paths.
|
|
1222
1224
|
*
|
|
1223
1225
|
* @param {Path} paths One or more valid route paths
|
|
1224
|
-
* @param pipe One or more
|
|
1226
|
+
* @param pipe One or more filtering handlers
|
|
1225
1227
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1226
1228
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1227
1229
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1241,7 +1243,7 @@ class Router {
|
|
|
1241
1243
|
* Define filters for Head http method and the specified paths.
|
|
1242
1244
|
*
|
|
1243
1245
|
* @param {Path} paths One or more valid route paths
|
|
1244
|
-
* @param pipe One or more
|
|
1246
|
+
* @param pipe One or more filtering handlers
|
|
1245
1247
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1246
1248
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1247
1249
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1256,7 +1258,7 @@ class Router {
|
|
|
1256
1258
|
* Define filters for Get http method and the specified paths.
|
|
1257
1259
|
*
|
|
1258
1260
|
* @param {Path} paths One or more valid route paths
|
|
1259
|
-
* @param pipe One or more
|
|
1261
|
+
* @param pipe One or more filtering handlers
|
|
1260
1262
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1261
1263
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1262
1264
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1271,7 +1273,7 @@ class Router {
|
|
|
1271
1273
|
* Define filters for Query http method and the specified paths.
|
|
1272
1274
|
*
|
|
1273
1275
|
* @param {Path} paths One or more valid route paths
|
|
1274
|
-
* @param pipe One or more
|
|
1276
|
+
* @param pipe One or more filtering handlers
|
|
1275
1277
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1276
1278
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1277
1279
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1286,7 +1288,7 @@ class Router {
|
|
|
1286
1288
|
* Define filters for Post http method and the specified paths.
|
|
1287
1289
|
*
|
|
1288
1290
|
* @param {Path} paths One or more valid route paths
|
|
1289
|
-
* @param pipe One or more
|
|
1291
|
+
* @param pipe One or more filtering handlers
|
|
1290
1292
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1291
1293
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1292
1294
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1301,7 +1303,7 @@ class Router {
|
|
|
1301
1303
|
* Define filters for Put http method and the specified paths.
|
|
1302
1304
|
*
|
|
1303
1305
|
* @param {Path} paths One or more valid route paths
|
|
1304
|
-
* @param pipe One or more
|
|
1306
|
+
* @param pipe One or more filtering handlers
|
|
1305
1307
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1306
1308
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1307
1309
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1316,7 +1318,7 @@ class Router {
|
|
|
1316
1318
|
* Define filters for Patch http method and the specified paths.
|
|
1317
1319
|
*
|
|
1318
1320
|
* @param {Path} paths One or more valid route paths
|
|
1319
|
-
* @param pipe One or more
|
|
1321
|
+
* @param pipe One or more filtering handlers
|
|
1320
1322
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1321
1323
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1322
1324
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1331,7 +1333,7 @@ class Router {
|
|
|
1331
1333
|
* Define filters for Head Delete method and the specified paths.
|
|
1332
1334
|
*
|
|
1333
1335
|
* @param {Path} paths One or more valid route paths
|
|
1334
|
-
* @param pipe One or more
|
|
1336
|
+
* @param pipe One or more filtering handlers
|
|
1335
1337
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1336
1338
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1337
1339
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1346,7 +1348,7 @@ class Router {
|
|
|
1346
1348
|
* Define filters for Options http method and the specified paths.
|
|
1347
1349
|
*
|
|
1348
1350
|
* @param {Path} paths One or more valid route paths
|
|
1349
|
-
* @param pipe One or more
|
|
1351
|
+
* @param pipe One or more filtering handlers
|
|
1350
1352
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1351
1353
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1352
1354
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1361,7 +1363,7 @@ class Router {
|
|
|
1361
1363
|
* Define filters for Trace http method and the specified paths.
|
|
1362
1364
|
*
|
|
1363
1365
|
* @param {Path} paths One or more valid route paths
|
|
1364
|
-
* @param pipe One or more
|
|
1366
|
+
* @param pipe One or more filtering handlers
|
|
1365
1367
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1366
1368
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1367
1369
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1376,7 +1378,7 @@ class Router {
|
|
|
1376
1378
|
* Define filters for Connect http method and the specified paths.
|
|
1377
1379
|
*
|
|
1378
1380
|
* @param {Path} paths One or more valid route paths
|
|
1379
|
-
* @param pipe One or more
|
|
1381
|
+
* @param pipe One or more filtering handlers
|
|
1380
1382
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1381
1383
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1382
1384
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1391,7 +1393,7 @@ class Router {
|
|
|
1391
1393
|
* Define handlers for all http methods ["Head","Get","Query","Post","Put","Patch","Delete","Options","Trace","Connect"] and the specified paths.
|
|
1392
1394
|
*
|
|
1393
1395
|
* @param {Path} paths One or more valid route paths
|
|
1394
|
-
* @param pipe One or more
|
|
1396
|
+
* @param pipe One or more main handlers
|
|
1395
1397
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1396
1398
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1397
1399
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1411,7 +1413,7 @@ class Router {
|
|
|
1411
1413
|
* Define handlers for CRUD http methods ["Get","Query","Post","Put","Patch","Delete"] and the specified paths.
|
|
1412
1414
|
*
|
|
1413
1415
|
* @param {Path} paths One or more valid route paths
|
|
1414
|
-
* @param pipe One or more
|
|
1416
|
+
* @param pipe One or more main handlers
|
|
1415
1417
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1416
1418
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1417
1419
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1431,7 +1433,7 @@ class Router {
|
|
|
1431
1433
|
* Define handlers for Head http method and the specified paths.
|
|
1432
1434
|
*
|
|
1433
1435
|
* @param {Path} paths One or more valid route paths
|
|
1434
|
-
* @param pipe One or more
|
|
1436
|
+
* @param pipe One or more main handlers
|
|
1435
1437
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1436
1438
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1437
1439
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1446,7 +1448,7 @@ class Router {
|
|
|
1446
1448
|
* Define handlers for Get http method and the specified paths.
|
|
1447
1449
|
*
|
|
1448
1450
|
* @param {Path} paths One or more valid route paths
|
|
1449
|
-
* @param pipe One or more
|
|
1451
|
+
* @param pipe One or more main handlers
|
|
1450
1452
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1451
1453
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1452
1454
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1461,7 +1463,7 @@ class Router {
|
|
|
1461
1463
|
* Define handlers for Query http method and the specified paths.
|
|
1462
1464
|
*
|
|
1463
1465
|
* @param {Path} paths One or more valid route paths
|
|
1464
|
-
* @param pipe One or more
|
|
1466
|
+
* @param pipe One or more main handlers
|
|
1465
1467
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1466
1468
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1467
1469
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1476,7 +1478,7 @@ class Router {
|
|
|
1476
1478
|
* Define handlers for Post http method and the specified paths.
|
|
1477
1479
|
*
|
|
1478
1480
|
* @param {Path} paths One or more valid route paths
|
|
1479
|
-
* @param pipe One or more
|
|
1481
|
+
* @param pipe One or more main handlers
|
|
1480
1482
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1481
1483
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1482
1484
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1491,7 +1493,7 @@ class Router {
|
|
|
1491
1493
|
* Define handlers for Put http method and the specified paths.
|
|
1492
1494
|
*
|
|
1493
1495
|
* @param {Path} paths One or more valid route paths
|
|
1494
|
-
* @param pipe One or more
|
|
1496
|
+
* @param pipe One or more main handlers
|
|
1495
1497
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1496
1498
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1497
1499
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1506,7 +1508,7 @@ class Router {
|
|
|
1506
1508
|
* Define handlers for Patch http method and the specified paths.
|
|
1507
1509
|
*
|
|
1508
1510
|
* @param {Path} paths One or more valid route paths
|
|
1509
|
-
* @param pipe One or more
|
|
1511
|
+
* @param pipe One or more main handlers
|
|
1510
1512
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1511
1513
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1512
1514
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1521,7 +1523,7 @@ class Router {
|
|
|
1521
1523
|
* Define handlers for Head Delete method and the specified paths.
|
|
1522
1524
|
*
|
|
1523
1525
|
* @param {Path} paths One or more valid route paths
|
|
1524
|
-
* @param pipe One or more
|
|
1526
|
+
* @param pipe One or more main handlers
|
|
1525
1527
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1526
1528
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1527
1529
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1536,7 +1538,7 @@ class Router {
|
|
|
1536
1538
|
* Define handlers for Options http method and the specified paths.
|
|
1537
1539
|
*
|
|
1538
1540
|
* @param {Path} paths One or more valid route paths
|
|
1539
|
-
* @param pipe One or more
|
|
1541
|
+
* @param pipe One or more main handlers
|
|
1540
1542
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1541
1543
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1542
1544
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1551,7 +1553,7 @@ class Router {
|
|
|
1551
1553
|
* Define handlers for Trace http method and the specified paths.
|
|
1552
1554
|
*
|
|
1553
1555
|
* @param {Path} paths One or more valid route paths
|
|
1554
|
-
* @param pipe One or more
|
|
1556
|
+
* @param pipe One or more main handlers
|
|
1555
1557
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1556
1558
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1557
1559
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1566,7 +1568,7 @@ class Router {
|
|
|
1566
1568
|
* Define handlers for Connect http method and the specified paths.
|
|
1567
1569
|
*
|
|
1568
1570
|
* @param {Path} paths One or more valid route paths
|
|
1569
|
-
* @param pipe One or more
|
|
1571
|
+
* @param pipe One or more main handlers
|
|
1570
1572
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1571
1573
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1572
1574
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1581,7 +1583,7 @@ class Router {
|
|
|
1581
1583
|
* Define fallbacks for all http methods ["Head","Get","Query","Post","Put","Patch","Delete","Options","Trace","Connect"] and the specified paths.
|
|
1582
1584
|
*
|
|
1583
1585
|
* @param {Path} paths One or more valid route paths
|
|
1584
|
-
* @param pipe One or more
|
|
1586
|
+
* @param pipe One or more fallback handlers
|
|
1585
1587
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1586
1588
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1587
1589
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1601,7 +1603,7 @@ class Router {
|
|
|
1601
1603
|
* Define fallbacks for CRUD http methods ["Get","Query","Post","Put","Patch","Delete"] and the specified paths.
|
|
1602
1604
|
*
|
|
1603
1605
|
* @param {Path} paths One or more valid route paths
|
|
1604
|
-
* @param pipe One or more
|
|
1606
|
+
* @param pipe One or more fallback handlers
|
|
1605
1607
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1606
1608
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1607
1609
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1621,7 +1623,7 @@ class Router {
|
|
|
1621
1623
|
* Define fallbacks for Head http method and the specified paths.
|
|
1622
1624
|
*
|
|
1623
1625
|
* @param {Path} paths One or more valid route paths
|
|
1624
|
-
* @param pipe One or more
|
|
1626
|
+
* @param pipe One or more fallback handlers
|
|
1625
1627
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1626
1628
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1627
1629
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1636,7 +1638,7 @@ class Router {
|
|
|
1636
1638
|
* Define fallbacks for Get http method and the specified paths.
|
|
1637
1639
|
*
|
|
1638
1640
|
* @param {Path} paths One or more valid route paths
|
|
1639
|
-
* @param pipe One or more
|
|
1641
|
+
* @param pipe One or more fallback handlers
|
|
1640
1642
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1641
1643
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1642
1644
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1651,7 +1653,7 @@ class Router {
|
|
|
1651
1653
|
* Define fallbacks for Query http method and the specified paths.
|
|
1652
1654
|
*
|
|
1653
1655
|
* @param {Path} paths One or more valid route paths
|
|
1654
|
-
* @param pipe One or more
|
|
1656
|
+
* @param pipe One or more fallback handlers
|
|
1655
1657
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1656
1658
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1657
1659
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1666,7 +1668,7 @@ class Router {
|
|
|
1666
1668
|
* Define fallbacks for Post http method and the specified paths.
|
|
1667
1669
|
*
|
|
1668
1670
|
* @param {Path} paths One or more valid route paths
|
|
1669
|
-
* @param pipe One or more
|
|
1671
|
+
* @param pipe One or more fallback handlers
|
|
1670
1672
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1671
1673
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1672
1674
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1681,7 +1683,7 @@ class Router {
|
|
|
1681
1683
|
* Define fallbacks for Put http method and the specified paths.
|
|
1682
1684
|
*
|
|
1683
1685
|
* @param {Path} paths One or more valid route paths
|
|
1684
|
-
* @param pipe One or more
|
|
1686
|
+
* @param pipe One or more fallback handlers
|
|
1685
1687
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1686
1688
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1687
1689
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1696,7 +1698,7 @@ class Router {
|
|
|
1696
1698
|
* Define fallbacks for Patch http method and the specified paths.
|
|
1697
1699
|
*
|
|
1698
1700
|
* @param {Path} paths One or more valid route paths
|
|
1699
|
-
* @param pipe One or more
|
|
1701
|
+
* @param pipe One or more fallback handlers
|
|
1700
1702
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1701
1703
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1702
1704
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1711,7 +1713,7 @@ class Router {
|
|
|
1711
1713
|
* Define fallbacks for Head Delete method and the specified paths.
|
|
1712
1714
|
*
|
|
1713
1715
|
* @param {Path} paths One or more valid route paths
|
|
1714
|
-
* @param pipe One or more
|
|
1716
|
+
* @param pipe One or more fallback handlers
|
|
1715
1717
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1716
1718
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1717
1719
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1726,7 +1728,7 @@ class Router {
|
|
|
1726
1728
|
* Define fallbacks for Options http method and the specified paths.
|
|
1727
1729
|
*
|
|
1728
1730
|
* @param {Path} paths One or more valid route paths
|
|
1729
|
-
* @param pipe One or more
|
|
1731
|
+
* @param pipe One or more fallback handlers
|
|
1730
1732
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1731
1733
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1732
1734
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1741,7 +1743,7 @@ class Router {
|
|
|
1741
1743
|
* Define fallbacks for Trace http method and the specified paths.
|
|
1742
1744
|
*
|
|
1743
1745
|
* @param {Path} paths One or more valid route paths
|
|
1744
|
-
* @param pipe One or more
|
|
1746
|
+
* @param pipe One or more fallback handlers
|
|
1745
1747
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1746
1748
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1747
1749
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1756,7 +1758,7 @@ class Router {
|
|
|
1756
1758
|
* Define fallbacks for Connect http method and the specified paths.
|
|
1757
1759
|
*
|
|
1758
1760
|
* @param {Path} paths One or more valid route paths
|
|
1759
|
-
* @param pipe One or more
|
|
1761
|
+
* @param pipe One or more fallback handlers
|
|
1760
1762
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1761
1763
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1762
1764
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1771,7 +1773,7 @@ class Router {
|
|
|
1771
1773
|
* Define afters for all http methods ["Head","Get","Query","Post","Put","Patch","Delete","Options","Trace","Connect"] and the specified paths.
|
|
1772
1774
|
*
|
|
1773
1775
|
* @param {Path} paths One or more valid route paths
|
|
1774
|
-
* @param pipe One or more
|
|
1776
|
+
* @param pipe One or more after handlers
|
|
1775
1777
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1776
1778
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1777
1779
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1791,7 +1793,7 @@ class Router {
|
|
|
1791
1793
|
* Define afters for CRUD http methods ["Get","Query","Post","Put","Patch","Delete"] and the specified paths.
|
|
1792
1794
|
*
|
|
1793
1795
|
* @param {Path} paths One or more valid route paths
|
|
1794
|
-
* @param pipe One or more
|
|
1796
|
+
* @param pipe One or more after handlers
|
|
1795
1797
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1796
1798
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1797
1799
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1811,7 +1813,7 @@ class Router {
|
|
|
1811
1813
|
* Define afters for Head http method and the specified paths.
|
|
1812
1814
|
*
|
|
1813
1815
|
* @param {Path} paths One or more valid route paths
|
|
1814
|
-
* @param pipe One or more
|
|
1816
|
+
* @param pipe One or more after handlers
|
|
1815
1817
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1816
1818
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1817
1819
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1826,7 +1828,7 @@ class Router {
|
|
|
1826
1828
|
* Define afters for Get http method and the specified paths.
|
|
1827
1829
|
*
|
|
1828
1830
|
* @param {Path} paths One or more valid route paths
|
|
1829
|
-
* @param pipe One or more
|
|
1831
|
+
* @param pipe One or more after handlers
|
|
1830
1832
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1831
1833
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1832
1834
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1841,7 +1843,7 @@ class Router {
|
|
|
1841
1843
|
* Define afters for Query http method and the specified paths.
|
|
1842
1844
|
*
|
|
1843
1845
|
* @param {Path} paths One or more valid route paths
|
|
1844
|
-
* @param pipe One or more
|
|
1846
|
+
* @param pipe One or more after handlers
|
|
1845
1847
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1846
1848
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1847
1849
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1856,7 +1858,7 @@ class Router {
|
|
|
1856
1858
|
* Define afters for Post http method and the specified paths.
|
|
1857
1859
|
*
|
|
1858
1860
|
* @param {Path} paths One or more valid route paths
|
|
1859
|
-
* @param pipe One or more
|
|
1861
|
+
* @param pipe One or more after handlers
|
|
1860
1862
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1861
1863
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1862
1864
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1871,7 +1873,7 @@ class Router {
|
|
|
1871
1873
|
* Define afters for Put http method and the specified paths.
|
|
1872
1874
|
*
|
|
1873
1875
|
* @param {Path} paths One or more valid route paths
|
|
1874
|
-
* @param pipe One or more
|
|
1876
|
+
* @param pipe One or more after handlers
|
|
1875
1877
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1876
1878
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1877
1879
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1886,7 +1888,7 @@ class Router {
|
|
|
1886
1888
|
* Define afters for Patch http method and the specified paths.
|
|
1887
1889
|
*
|
|
1888
1890
|
* @param {Path} paths One or more valid route paths
|
|
1889
|
-
* @param pipe One or more
|
|
1891
|
+
* @param pipe One or more after handlers
|
|
1890
1892
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1891
1893
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1892
1894
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1901,7 +1903,7 @@ class Router {
|
|
|
1901
1903
|
* Define afters for Head Delete method and the specified paths.
|
|
1902
1904
|
*
|
|
1903
1905
|
* @param {Path} paths One or more valid route paths
|
|
1904
|
-
* @param pipe One or more
|
|
1906
|
+
* @param pipe One or more after handlers
|
|
1905
1907
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1906
1908
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1907
1909
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1916,7 +1918,7 @@ class Router {
|
|
|
1916
1918
|
* Define afters for Options http method and the specified paths.
|
|
1917
1919
|
*
|
|
1918
1920
|
* @param {Path} paths One or more valid route paths
|
|
1919
|
-
* @param pipe One or more
|
|
1921
|
+
* @param pipe One or more after handlers
|
|
1920
1922
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1921
1923
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1922
1924
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1931,7 +1933,7 @@ class Router {
|
|
|
1931
1933
|
* Define afters for Trace http method and the specified paths.
|
|
1932
1934
|
*
|
|
1933
1935
|
* @param {Path} paths One or more valid route paths
|
|
1934
|
-
* @param pipe One or more
|
|
1936
|
+
* @param pipe One or more after handlers
|
|
1935
1937
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1936
1938
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1937
1939
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1946,7 +1948,7 @@ class Router {
|
|
|
1946
1948
|
* Define afters for Connect http method and the specified paths.
|
|
1947
1949
|
*
|
|
1948
1950
|
* @param {Path} paths One or more valid route paths
|
|
1949
|
-
* @param pipe One or more
|
|
1951
|
+
* @param pipe One or more after handlers
|
|
1950
1952
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1951
1953
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1952
1954
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1961,7 +1963,7 @@ class Router {
|
|
|
1961
1963
|
* Define catchers for all http methods ["Head","Get","Query","Post","Put","Patch","Delete","Options","Trace","Connect"] and the specified paths.
|
|
1962
1964
|
*
|
|
1963
1965
|
* @param {Path} paths One or more valid route paths
|
|
1964
|
-
* @param pipe One or more
|
|
1966
|
+
* @param pipe One or more error handlers
|
|
1965
1967
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1966
1968
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1967
1969
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -1981,7 +1983,7 @@ class Router {
|
|
|
1981
1983
|
* Define catchers for CRUD http methods ["Get","Query","Post","Put","Patch","Delete"] and the specified paths.
|
|
1982
1984
|
*
|
|
1983
1985
|
* @param {Path} paths One or more valid route paths
|
|
1984
|
-
* @param pipe One or more
|
|
1986
|
+
* @param pipe One or more error handlers
|
|
1985
1987
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
1986
1988
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
1987
1989
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -2001,7 +2003,7 @@ class Router {
|
|
|
2001
2003
|
* Define catchers for Head http method and the specified paths.
|
|
2002
2004
|
*
|
|
2003
2005
|
* @param {Path} paths One or more valid route paths
|
|
2004
|
-
* @param pipe One or more
|
|
2006
|
+
* @param pipe One or more error handlers
|
|
2005
2007
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
2006
2008
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
2007
2009
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -2016,7 +2018,7 @@ class Router {
|
|
|
2016
2018
|
* Define catchers for Get http method and the specified paths.
|
|
2017
2019
|
*
|
|
2018
2020
|
* @param {Path} paths One or more valid route paths
|
|
2019
|
-
* @param pipe One or more
|
|
2021
|
+
* @param pipe One or more error handlers
|
|
2020
2022
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
2021
2023
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
2022
2024
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -2031,7 +2033,7 @@ class Router {
|
|
|
2031
2033
|
* Define catchers for Query http method and the specified paths.
|
|
2032
2034
|
*
|
|
2033
2035
|
* @param {Path} paths One or more valid route paths
|
|
2034
|
-
* @param pipe One or more
|
|
2036
|
+
* @param pipe One or more error handlers
|
|
2035
2037
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
2036
2038
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
2037
2039
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -2046,7 +2048,7 @@ class Router {
|
|
|
2046
2048
|
* Define catchers for Post http method and the specified paths.
|
|
2047
2049
|
*
|
|
2048
2050
|
* @param {Path} paths One or more valid route paths
|
|
2049
|
-
* @param pipe One or more
|
|
2051
|
+
* @param pipe One or more error handlers
|
|
2050
2052
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
2051
2053
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
2052
2054
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -2061,7 +2063,7 @@ class Router {
|
|
|
2061
2063
|
* Define catchers for Put http method and the specified paths.
|
|
2062
2064
|
*
|
|
2063
2065
|
* @param {Path} paths One or more valid route paths
|
|
2064
|
-
* @param pipe One or more
|
|
2066
|
+
* @param pipe One or more error handlers
|
|
2065
2067
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
2066
2068
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
2067
2069
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -2076,7 +2078,7 @@ class Router {
|
|
|
2076
2078
|
* Define catchers for Patch http method and the specified paths.
|
|
2077
2079
|
*
|
|
2078
2080
|
* @param {Path} paths One or more valid route paths
|
|
2079
|
-
* @param pipe One or more
|
|
2081
|
+
* @param pipe One or more error handlers
|
|
2080
2082
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
2081
2083
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
2082
2084
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -2091,7 +2093,7 @@ class Router {
|
|
|
2091
2093
|
* Define catchers for Head Delete method and the specified paths.
|
|
2092
2094
|
*
|
|
2093
2095
|
* @param {Path} paths One or more valid route paths
|
|
2094
|
-
* @param pipe One or more
|
|
2096
|
+
* @param pipe One or more error handlers
|
|
2095
2097
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
2096
2098
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
2097
2099
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -2106,7 +2108,7 @@ class Router {
|
|
|
2106
2108
|
* Define catchers for Options http method and the specified paths.
|
|
2107
2109
|
*
|
|
2108
2110
|
* @param {Path} paths One or more valid route paths
|
|
2109
|
-
* @param pipe One or more
|
|
2111
|
+
* @param pipe One or more error handlers
|
|
2110
2112
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
2111
2113
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
2112
2114
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -2121,7 +2123,7 @@ class Router {
|
|
|
2121
2123
|
* Define catchers for Trace http method and the specified paths.
|
|
2122
2124
|
*
|
|
2123
2125
|
* @param {Path} paths One or more valid route paths
|
|
2124
|
-
* @param pipe One or more
|
|
2126
|
+
* @param pipe One or more error handlers
|
|
2125
2127
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
2126
2128
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
2127
2129
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -2136,7 +2138,7 @@ class Router {
|
|
|
2136
2138
|
* Define catchers for Connect http method and the specified paths.
|
|
2137
2139
|
*
|
|
2138
2140
|
* @param {Path} paths One or more valid route paths
|
|
2139
|
-
* @param pipe One or more
|
|
2141
|
+
* @param pipe One or more error handlers
|
|
2140
2142
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
2141
2143
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
2142
2144
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -2151,7 +2153,7 @@ class Router {
|
|
|
2151
2153
|
* Define filters for the specified method paths.
|
|
2152
2154
|
*
|
|
2153
2155
|
* @param {MethodPath|Array<MethodPath>} methodPaths Method-path definitions in the form of: `Method /Path`, or [`Method /Path`, ...] or [[`Method`, ...], `/Path`, ...]
|
|
2154
|
-
* @param pipe One or more
|
|
2156
|
+
* @param pipe One or more filtering handlers
|
|
2155
2157
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
2156
2158
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
2157
2159
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -2168,6 +2170,9 @@ class Router {
|
|
|
2168
2170
|
!methodPaths[0].every((mp) => typeof mp === "string")) {
|
|
2169
2171
|
throw new types_ts_1.RouterError("Invalid method type. Allowed [[Methods...], ...Paths]");
|
|
2170
2172
|
}
|
|
2173
|
+
if (firstElementIsArray && methodPaths[0].length === 0) {
|
|
2174
|
+
throw new types_ts_1.RouterError("Empty method. Allowed [[Methods...], ...Paths]");
|
|
2175
|
+
}
|
|
2171
2176
|
if (methodPathIsArray &&
|
|
2172
2177
|
!firstElementIsArray &&
|
|
2173
2178
|
!methodPaths.every((mp) => typeof mp === "string")) {
|
|
@@ -2191,7 +2196,7 @@ class Router {
|
|
|
2191
2196
|
* Define handlers for the specified method paths.
|
|
2192
2197
|
*
|
|
2193
2198
|
* @param {MethodPath|Array<MethodPath>} methodPaths Method-path definitions in the form of: `Method /Path`, or [`Method /Path`, ...] or [[`Method`, ...], `/Path`, ...]
|
|
2194
|
-
* @param pipe One or more
|
|
2199
|
+
* @param pipe One or more main handlers
|
|
2195
2200
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
2196
2201
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
2197
2202
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -2208,6 +2213,9 @@ class Router {
|
|
|
2208
2213
|
!methodPaths[0].every((mp) => typeof mp === "string")) {
|
|
2209
2214
|
throw new types_ts_1.RouterError("Invalid method type. Allowed [[Methods...], ...Paths]");
|
|
2210
2215
|
}
|
|
2216
|
+
if (firstElementIsArray && methodPaths[0].length === 0) {
|
|
2217
|
+
throw new types_ts_1.RouterError("Empty method. Allowed [[Methods...], ...Paths]");
|
|
2218
|
+
}
|
|
2211
2219
|
if (methodPathIsArray &&
|
|
2212
2220
|
!firstElementIsArray &&
|
|
2213
2221
|
!methodPaths.every((mp) => typeof mp === "string")) {
|
|
@@ -2231,7 +2239,7 @@ class Router {
|
|
|
2231
2239
|
* Define fallbacks for the specified method paths.
|
|
2232
2240
|
*
|
|
2233
2241
|
* @param {MethodPath|Array<MethodPath>} methodPaths Method-path definitions in the form of: `Method /Path`, or [`Method /Path`, ...] or [[`Method`, ...], `/Path`, ...]
|
|
2234
|
-
* @param pipe One or more
|
|
2242
|
+
* @param pipe One or more fallback handlers
|
|
2235
2243
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
2236
2244
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
2237
2245
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -2248,6 +2256,9 @@ class Router {
|
|
|
2248
2256
|
!methodPaths[0].every((mp) => typeof mp === "string")) {
|
|
2249
2257
|
throw new types_ts_1.RouterError("Invalid method type. Allowed [[Methods...], ...Paths]");
|
|
2250
2258
|
}
|
|
2259
|
+
if (firstElementIsArray && methodPaths[0].length === 0) {
|
|
2260
|
+
throw new types_ts_1.RouterError("Empty method. Allowed [[Methods...], ...Paths]");
|
|
2261
|
+
}
|
|
2251
2262
|
if (methodPathIsArray &&
|
|
2252
2263
|
!firstElementIsArray &&
|
|
2253
2264
|
!methodPaths.every((mp) => typeof mp === "string")) {
|
|
@@ -2271,7 +2282,7 @@ class Router {
|
|
|
2271
2282
|
* Define afters for the specified method paths.
|
|
2272
2283
|
*
|
|
2273
2284
|
* @param {MethodPath|Array<MethodPath>} methodPaths Method-path definitions in the form of: `Method /Path`, or [`Method /Path`, ...] or [[`Method`, ...], `/Path`, ...]
|
|
2274
|
-
* @param pipe One or more
|
|
2285
|
+
* @param pipe One or more after handlers
|
|
2275
2286
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
2276
2287
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
2277
2288
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -2288,6 +2299,9 @@ class Router {
|
|
|
2288
2299
|
!methodPaths[0].every((mp) => typeof mp === "string")) {
|
|
2289
2300
|
throw new types_ts_1.RouterError("Invalid method type. Allowed [[Methods...], ...Paths]");
|
|
2290
2301
|
}
|
|
2302
|
+
if (firstElementIsArray && methodPaths[0].length === 0) {
|
|
2303
|
+
throw new types_ts_1.RouterError("Empty method. Allowed [[Methods...], ...Paths]");
|
|
2304
|
+
}
|
|
2291
2305
|
if (methodPathIsArray &&
|
|
2292
2306
|
!firstElementIsArray &&
|
|
2293
2307
|
!methodPaths.every((mp) => typeof mp === "string")) {
|
|
@@ -2311,7 +2325,7 @@ class Router {
|
|
|
2311
2325
|
* Define catchers for the specified method paths.
|
|
2312
2326
|
*
|
|
2313
2327
|
* @param {MethodPath|Array<MethodPath>} methodPaths Method-path definitions in the form of: `Method /Path`, or [`Method /Path`, ...] or [[`Method`, ...], `/Path`, ...]
|
|
2314
|
-
* @param pipe One or more
|
|
2328
|
+
* @param pipe One or more error handlers
|
|
2315
2329
|
* @param {RegisterPipelineOptions} options Register pipeline options
|
|
2316
2330
|
* @param {boolean} [options.overwrite] Overwrite colliding route definitions.
|
|
2317
2331
|
* @param {OpenApiDesc|false} [options.openApi] OpenApi definition
|
|
@@ -2328,6 +2342,9 @@ class Router {
|
|
|
2328
2342
|
!methodPaths[0].every((mp) => typeof mp === "string")) {
|
|
2329
2343
|
throw new types_ts_1.RouterError("Invalid method type. Allowed [[Methods...], ...Paths]");
|
|
2330
2344
|
}
|
|
2345
|
+
if (firstElementIsArray && methodPaths[0].length === 0) {
|
|
2346
|
+
throw new types_ts_1.RouterError("Empty method. Allowed [[Methods...], ...Paths]");
|
|
2347
|
+
}
|
|
2331
2348
|
if (methodPathIsArray &&
|
|
2332
2349
|
!firstElementIsArray &&
|
|
2333
2350
|
!methodPaths.every((mp) => typeof mp === "string")) {
|