not-node 6.3.5 → 6.3.6
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/package.json
CHANGED
package/src/form/form.js
CHANGED
|
@@ -118,19 +118,24 @@ class Form {
|
|
|
118
118
|
* @return {Promise<import('../types').PreparedData>} forma data
|
|
119
119
|
**/
|
|
120
120
|
async extract(req) {
|
|
121
|
-
return
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
return this.afterExtract(
|
|
122
|
+
{
|
|
123
|
+
...this.extractRequestEnvs(req),
|
|
124
|
+
data: this.extractByInstructionsFromRouteActionFields(req),
|
|
125
|
+
},
|
|
126
|
+
req
|
|
127
|
+
);
|
|
125
128
|
}
|
|
126
129
|
|
|
127
130
|
/**
|
|
128
131
|
* Chance to edit prepared data
|
|
129
132
|
*
|
|
130
|
-
* @param {import('../types').PreparedData}
|
|
133
|
+
* @param {import('../types').PreparedData} value
|
|
134
|
+
* @param {import('../types').notNodeExpressRequest} [req]
|
|
131
135
|
* @return {Promise<import('../types').PreparedData>}
|
|
132
136
|
*/
|
|
133
|
-
|
|
137
|
+
//eslint-disable-next-line no-unused-vars
|
|
138
|
+
async afterExtract(value, req) {
|
|
134
139
|
return value;
|
|
135
140
|
}
|
|
136
141
|
|
|
@@ -18,9 +18,12 @@ module.exports = ({ MODULE_NAME, MODEL_NAME, actionName }) => {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
async extract(req) {
|
|
21
|
-
return this.afterExtract(
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
return this.afterExtract(
|
|
22
|
+
{
|
|
23
|
+
...this.extractRequestEnvs(req),
|
|
24
|
+
},
|
|
25
|
+
req
|
|
26
|
+
);
|
|
24
27
|
}
|
|
25
28
|
};
|
|
26
29
|
};
|
|
@@ -20,10 +20,13 @@ module.exports = ({ MODULE_NAME, MODEL_NAME, actionName }) => {
|
|
|
20
20
|
|
|
21
21
|
async extract(req) {
|
|
22
22
|
const envs = this.extractRequestEnvs(req);
|
|
23
|
-
return this.afterExtract(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
return this.afterExtract(
|
|
24
|
+
{
|
|
25
|
+
...envs,
|
|
26
|
+
targetId: envs.modelNameID,
|
|
27
|
+
},
|
|
28
|
+
req
|
|
29
|
+
);
|
|
27
30
|
}
|
|
28
31
|
};
|
|
29
32
|
};
|
|
@@ -21,9 +21,12 @@ module.exports = ({ MODULE_NAME, MODEL_NAME, actionName }) => {
|
|
|
21
21
|
|
|
22
22
|
async extract(req) {
|
|
23
23
|
const envs = this.extractRequestEnvs(req);
|
|
24
|
-
return this.afterExtract(
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
return this.afterExtract(
|
|
25
|
+
{
|
|
26
|
+
...envs,
|
|
27
|
+
},
|
|
28
|
+
req
|
|
29
|
+
);
|
|
27
30
|
}
|
|
28
31
|
};
|
|
29
32
|
};
|
package/src/generic/form.list.js
CHANGED