@h3ravel/http 11.5.2 → 11.5.3

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 CHANGED
@@ -19235,10 +19235,15 @@ var Request = class Request {
19235
19235
  }
19236
19236
  /**
19237
19237
  * Retrieve a file from the request.
19238
+ *
19239
+ * By default a single `UploadedFile` instance will always be returned by
19240
+ * the method (first file in property when there are multiple), unless
19241
+ * the `expectArray` parameter is set to true, in which case, the method
19242
+ * returns an `UploadedFile[]` array.
19238
19243
  *
19239
19244
  * @param key
19240
19245
  * @param defaultValue
19241
- * @param expectArray
19246
+ * @param expectArray set to true to return an `UploadedFile[]` array.
19242
19247
  * @returns
19243
19248
  */
19244
19249
  file(key, defaultValue, expectArray) {
package/dist/index.d.cts CHANGED
@@ -662,9 +662,14 @@ declare class Request implements IRequest {
662
662
  /**
663
663
  * Retrieve a file from the request.
664
664
  *
665
+ * By default a single `UploadedFile` instance will always be returned by
666
+ * the method (first file in property when there are multiple), unless
667
+ * the `expectArray` parameter is set to true, in which case, the method
668
+ * returns an `UploadedFile[]` array.
669
+ *
665
670
  * @param key
666
671
  * @param defaultValue
667
- * @param expectArray
672
+ * @param expectArray set to true to return an `UploadedFile[]` array.
668
673
  * @returns
669
674
  */
670
675
  file<K extends string | undefined = undefined, E extends boolean | undefined = undefined>(key?: K, defaultValue?: any, expectArray?: E): K extends undefined ? Record<string, E extends true ? UploadedFile[] : UploadedFile> : E extends true ? UploadedFile[] : UploadedFile;
package/dist/index.d.ts CHANGED
@@ -662,9 +662,14 @@ declare class Request implements IRequest {
662
662
  /**
663
663
  * Retrieve a file from the request.
664
664
  *
665
+ * By default a single `UploadedFile` instance will always be returned by
666
+ * the method (first file in property when there are multiple), unless
667
+ * the `expectArray` parameter is set to true, in which case, the method
668
+ * returns an `UploadedFile[]` array.
669
+ *
665
670
  * @param key
666
671
  * @param defaultValue
667
- * @param expectArray
672
+ * @param expectArray set to true to return an `UploadedFile[]` array.
668
673
  * @returns
669
674
  */
670
675
  file<K extends string | undefined = undefined, E extends boolean | undefined = undefined>(key?: K, defaultValue?: any, expectArray?: E): K extends undefined ? Record<string, E extends true ? UploadedFile[] : UploadedFile> : E extends true ? UploadedFile[] : UploadedFile;
package/dist/index.js CHANGED
@@ -19215,10 +19215,15 @@ var Request = class Request {
19215
19215
  }
19216
19216
  /**
19217
19217
  * Retrieve a file from the request.
19218
+ *
19219
+ * By default a single `UploadedFile` instance will always be returned by
19220
+ * the method (first file in property when there are multiple), unless
19221
+ * the `expectArray` parameter is set to true, in which case, the method
19222
+ * returns an `UploadedFile[]` array.
19218
19223
  *
19219
19224
  * @param key
19220
19225
  * @param defaultValue
19221
- * @param expectArray
19226
+ * @param expectArray set to true to return an `UploadedFile[]` array.
19222
19227
  * @returns
19223
19228
  */
19224
19229
  file(key, defaultValue, expectArray) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@h3ravel/http",
3
- "version": "11.5.2",
3
+ "version": "11.5.3",
4
4
  "description": "HTTP kernel, middleware pipeline, request/response classes for H3ravel.",
5
5
  "h3ravel": {
6
6
  "providers": [
@@ -45,8 +45,8 @@
45
45
  "h3": "2.0.1-rc.5",
46
46
  "srvx": "^0.8.2",
47
47
  "@h3ravel/support": "^0.14.4",
48
- "@h3ravel/url": "^1.0.8",
49
- "@h3ravel/shared": "^0.25.0"
48
+ "@h3ravel/shared": "^0.25.0",
49
+ "@h3ravel/url": "^1.0.8"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@h3ravel/core": "^1.20.0"