@e22m4u/ts-rest-router 0.5.4 → 0.5.5

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/README.md CHANGED
@@ -226,6 +226,15 @@ class ProductController {
226
226
  - `@requestQuery(name, schema)` - извлечение одного query-параметра;
227
227
  - `@requestQueries(schema)` - извлечение всех query-параметров в виде объекта;
228
228
 
229
+ **Именование Query-декораторов**
230
+
231
+ Разделение на декораторы в единственном `@requestQuery` и множественном
232
+ `@requestQueries` числе - это осознанное архитектурное решение, направленное
233
+ на консистентность API. Тот же принцип применяется для работы с URL-параметрами,
234
+ заголовками и cookies. Декоратор в единственном числе используется для точечного
235
+ извлечения и валидации отдельных значений, в то время как множественное число
236
+ служит для получения всех данных в виде единого объекта.
237
+
229
238
  ### Тело запроса (`@requestBody`, `@requestField`)
230
239
 
231
240
  Для работы с данными, отправленными в теле POST, PUT, PATCH запросов.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e22m4u/ts-rest-router",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "Декларативный REST-маршрутизатор на основе контроллеров для TypeScript",
5
5
  "author": "Mikhail Evstropov <e22m4u@yandex.ru>",
6
6
  "license": "MIT",
@@ -44,8 +44,8 @@
44
44
  "@e22m4u/js-debug": "~0.3.1",
45
45
  "@e22m4u/js-format": "~0.2.0",
46
46
  "@e22m4u/js-service": "~0.4.0",
47
- "@e22m4u/js-trie-router": "~0.3.0",
48
- "@e22m4u/ts-data-schema": "~0.4.2",
47
+ "@e22m4u/js-trie-router": "~0.3.1",
48
+ "@e22m4u/ts-data-schema": "~0.4.3",
49
49
  "@e22m4u/ts-reflector": "~0.1.7",
50
50
  "http-errors": "~2.0.0"
51
51
  },
@@ -57,7 +57,7 @@
57
57
  "@types/debug": "~4.1.12",
58
58
  "@types/http-errors": "~2.0.5",
59
59
  "@types/mocha": "~10.0.10",
60
- "@types/node": "~24.6.0",
60
+ "@types/node": "~24.6.1",
61
61
  "c8": "~10.1.3",
62
62
  "chai": "~6.2.0",
63
63
  "esbuild": "~0.25.10",
@@ -70,7 +70,7 @@
70
70
  "prettier": "~3.6.2",
71
71
  "rimraf": "~6.0.1",
72
72
  "tsx": "~4.20.6",
73
- "typescript": "~5.9.2",
73
+ "typescript": "~5.9.3",
74
74
  "typescript-eslint": "~8.45.0"
75
75
  }
76
76
  }
@@ -20,13 +20,13 @@ import {
20
20
  getAction,
21
21
  postAction,
22
22
  requestBody,
23
- requestCookie,
24
- requestCookies,
25
23
  requestField,
26
- requestHeader,
24
+ requestCookies,
25
+ requestCookie,
27
26
  requestHeaders,
28
- requestParam,
27
+ requestHeader,
29
28
  requestParams,
29
+ requestParam,
30
30
  requestQueries,
31
31
  requestQuery,
32
32
  restController,