@adonisjs/core 6.15.0 → 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
|
},
|
|
@@ -94,13 +94,13 @@
|
|
|
94
94
|
"@japa/runner": "^3.1.4",
|
|
95
95
|
"@japa/snapshot": "^2.0.6",
|
|
96
96
|
"@release-it/conventional-changelog": "^9.0.3",
|
|
97
|
-
"@swc/core": "
|
|
98
|
-
"@types/node": "^
|
|
97
|
+
"@swc/core": "1.9.3",
|
|
98
|
+
"@types/node": "^22.10.1",
|
|
99
99
|
"@types/pretty-hrtime": "^1.0.3",
|
|
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,11 +108,12 @@
|
|
|
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
|
+
"github-label-sync": "^2.3.1",
|
|
114
115
|
"husky": "^9.1.7",
|
|
115
|
-
"prettier": "^3.
|
|
116
|
+
"prettier": "^3.4.1",
|
|
116
117
|
"release-it": "^17.10.0",
|
|
117
118
|
"sinon": "^19.0.2",
|
|
118
119
|
"supertest": "^7.0.0",
|
|
@@ -131,10 +132,10 @@
|
|
|
131
132
|
"@adonisjs/fold": "^10.1.3",
|
|
132
133
|
"@adonisjs/hash": "^9.0.5",
|
|
133
134
|
"@adonisjs/health": "^2.0.0",
|
|
134
|
-
"@adonisjs/http-server": "^7.
|
|
135
|
-
"@adonisjs/logger": "^6.0.
|
|
135
|
+
"@adonisjs/http-server": "^7.3.0",
|
|
136
|
+
"@adonisjs/logger": "^6.0.5",
|
|
136
137
|
"@adonisjs/repl": "^4.0.1",
|
|
137
|
-
"@antfu/install-pkg": "^0.
|
|
138
|
+
"@antfu/install-pkg": "^0.5.0",
|
|
138
139
|
"@paralleldrive/cuid2": "^2.2.2",
|
|
139
140
|
"@poppinss/colors": "^4.1.3",
|
|
140
141
|
"@poppinss/dumper": "^0.6.1",
|
|
@@ -152,7 +153,7 @@
|
|
|
152
153
|
},
|
|
153
154
|
"peerDependencies": {
|
|
154
155
|
"@adonisjs/assembler": "^7.8.0",
|
|
155
|
-
"@vinejs/vine": "^2.1.0",
|
|
156
|
+
"@vinejs/vine": "^2.1.0 || ^3.0.0",
|
|
156
157
|
"argon2": "^0.31.2 || ^0.41.0",
|
|
157
158
|
"bcrypt": "^5.1.1",
|
|
158
159
|
"edge.js": "^6.2.0"
|