@bleedingdev/modern-js-bff-core 3.5.0-ultramodern.32 → 3.5.0-ultramodern.34
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.
|
@@ -173,10 +173,10 @@ const Upload = (urlPath, schema)=>({
|
|
|
173
173
|
},
|
|
174
174
|
async validate (helper, next) {
|
|
175
175
|
if (!schema) return next();
|
|
176
|
-
const { inputs: { formData
|
|
176
|
+
const { inputs: { formData } } = helper;
|
|
177
177
|
helper.inputs = {
|
|
178
178
|
...helper.inputs,
|
|
179
|
-
|
|
179
|
+
formData: await validateInput(schema, formData)
|
|
180
180
|
};
|
|
181
181
|
return next();
|
|
182
182
|
}
|
|
@@ -124,10 +124,10 @@ const Upload = (urlPath, schema)=>({
|
|
|
124
124
|
},
|
|
125
125
|
async validate (helper, next) {
|
|
126
126
|
if (!schema) return next();
|
|
127
|
-
const { inputs: { formData
|
|
127
|
+
const { inputs: { formData } } = helper;
|
|
128
128
|
helper.inputs = {
|
|
129
129
|
...helper.inputs,
|
|
130
|
-
|
|
130
|
+
formData: await validateInput(schema, formData)
|
|
131
131
|
};
|
|
132
132
|
return next();
|
|
133
133
|
}
|
|
@@ -125,10 +125,10 @@ const Upload = (urlPath, schema)=>({
|
|
|
125
125
|
},
|
|
126
126
|
async validate (helper, next) {
|
|
127
127
|
if (!schema) return next();
|
|
128
|
-
const { inputs: { formData
|
|
128
|
+
const { inputs: { formData } } = helper;
|
|
129
129
|
helper.inputs = {
|
|
130
130
|
...helper.inputs,
|
|
131
|
-
|
|
131
|
+
formData: await validateInput(schema, formData)
|
|
132
132
|
};
|
|
133
133
|
return next();
|
|
134
134
|
}
|
|
@@ -38,7 +38,7 @@ export declare const HttpCode: (statusCode: number) => Operator<void>;
|
|
|
38
38
|
export declare const SetHeaders: (headers: Record<string, string>) => Operator<void>;
|
|
39
39
|
export declare const Redirect: (url: string) => Operator<void>;
|
|
40
40
|
export declare const Upload: <Schema extends z.ZodType>(urlPath: string, schema?: Schema) => Operator<{
|
|
41
|
-
|
|
41
|
+
formData: z.input<Schema>;
|
|
42
42
|
}, {
|
|
43
43
|
formData: z.output<Schema>;
|
|
44
44
|
}>;
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"modern",
|
|
18
18
|
"modern.js"
|
|
19
19
|
],
|
|
20
|
-
"version": "3.5.0-ultramodern.
|
|
20
|
+
"version": "3.5.0-ultramodern.34",
|
|
21
21
|
"types": "./dist/types/index.d.ts",
|
|
22
22
|
"main": "./dist/cjs/index.js",
|
|
23
23
|
"exports": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"koa-compose": "^4.1.0",
|
|
37
37
|
"reflect-metadata": "^0.2.2",
|
|
38
38
|
"type-fest": "5.7.0",
|
|
39
|
-
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.5.0-ultramodern.
|
|
39
|
+
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.5.0-ultramodern.34"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@rslib/core": "0.23.1",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"@typescript/native-preview": "7.0.0-dev.20260628.1",
|
|
46
46
|
"tsconfig-paths": "^4.2.0",
|
|
47
47
|
"zod": "^4.4.3",
|
|
48
|
-
"@modern-js/
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
48
|
+
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.5.0-ultramodern.34",
|
|
49
|
+
"@scripts/rstest-config": "2.66.0",
|
|
50
|
+
"@modern-js/bff-runtime": "npm:@bleedingdev/modern-js-bff-runtime@3.5.0-ultramodern.34"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"tsconfig-paths": "^4.2.0",
|