@adonisjs/core 6.15.1 → 6.15.2
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.
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { BaseLiteralType } from '@vinejs/vine';
|
|
1
|
+
import { symbols, BaseLiteralType } from '@vinejs/vine';
|
|
2
2
|
import type { Validation, FieldContext, FieldOptions } from '@vinejs/vine/types';
|
|
3
3
|
import type { MultipartFile, FileValidationOptions } from '@adonisjs/bodyparser/types';
|
|
4
4
|
import type { ApplicationService } from '../src/types.js';
|
|
5
5
|
import { RequestValidator } from '../modules/http/main.js';
|
|
6
|
+
declare const MULTIPART_FILE: typeof symbols.SUBTYPE;
|
|
6
7
|
/**
|
|
7
8
|
* Validation options accepted by the "file" rule
|
|
8
9
|
*/
|
|
@@ -28,6 +29,7 @@ declare module '@adonisjs/core/http' {
|
|
|
28
29
|
*/
|
|
29
30
|
declare class VineMultipartFile extends BaseLiteralType<MultipartFile, MultipartFile, MultipartFile> {
|
|
30
31
|
#private;
|
|
32
|
+
[MULTIPART_FILE]: string;
|
|
31
33
|
constructor(validationOptions?: FileRuleValidationOptions, options?: FieldOptions, validations?: Validation<any>[]);
|
|
32
34
|
clone(): this;
|
|
33
35
|
}
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* For the full copyright and license information, please view the LICENSE
|
|
7
7
|
* file that was distributed with this source code.
|
|
8
8
|
*/
|
|
9
|
-
import vine, { BaseLiteralType, Vine } from '@vinejs/vine';
|
|
9
|
+
import vine, { symbols, BaseLiteralType, Vine } from '@vinejs/vine';
|
|
10
10
|
import { Request, RequestValidator } from '../modules/http/main.js';
|
|
11
|
+
const MULTIPART_FILE = symbols.SUBTYPE ?? Symbol.for('subtype');
|
|
11
12
|
/**
|
|
12
13
|
* Checks if the value is an instance of multipart file
|
|
13
14
|
* from bodyparser.
|
|
@@ -60,6 +61,7 @@ const isMultipartFile = vine.createRule((file, options, field) => {
|
|
|
60
61
|
*/
|
|
61
62
|
class VineMultipartFile extends BaseLiteralType {
|
|
62
63
|
#validationOptions;
|
|
64
|
+
[MULTIPART_FILE] = 'multipartFile';
|
|
63
65
|
constructor(validationOptions, options, validations) {
|
|
64
66
|
super(options, validations || [isMultipartFile(validationOptions || {})]);
|
|
65
67
|
this.#validationOptions = validationOptions;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adonisjs/core",
|
|
3
3
|
"description": "Core of AdonisJS",
|
|
4
|
-
"version": "6.15.
|
|
4
|
+
"version": "6.15.2",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.6.0"
|
|
7
7
|
},
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"@types/sinon": "^17.0.3",
|
|
101
101
|
"@types/supertest": "^6.0.2",
|
|
102
102
|
"@types/test-console": "^2.0.3",
|
|
103
|
-
"@vinejs/vine": "^
|
|
103
|
+
"@vinejs/vine": "^3.0.0",
|
|
104
104
|
"argon2": "^0.41.1",
|
|
105
105
|
"bcrypt": "^5.1.1",
|
|
106
106
|
"c8": "^10.1.2",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"cross-env": "^7.0.3",
|
|
109
109
|
"del-cli": "^6.0.0",
|
|
110
110
|
"edge.js": "^6.2.0",
|
|
111
|
-
"eslint": "^9.
|
|
111
|
+
"eslint": "^9.16.0",
|
|
112
112
|
"execa": "^9.5.1",
|
|
113
113
|
"get-port": "^7.1.0",
|
|
114
114
|
"github-label-sync": "^2.3.1",
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
},
|
|
154
154
|
"peerDependencies": {
|
|
155
155
|
"@adonisjs/assembler": "^7.8.0",
|
|
156
|
-
"@vinejs/vine": "^2.1.0",
|
|
156
|
+
"@vinejs/vine": "^2.1.0 || ^3.0.0",
|
|
157
157
|
"argon2": "^0.31.2 || ^0.41.0",
|
|
158
158
|
"bcrypt": "^5.1.1",
|
|
159
159
|
"edge.js": "^6.2.0"
|