not-node 6.5.28 → 6.5.30
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 +1 -1
- package/src/core/const.js +1 -0
- package/src/core/fields/__closed.js +1 -6
- package/src/core/fields/__latest.js +4 -6
- package/src/core/fields/__version.js +4 -0
- package/src/core/fields/__versions.js +1 -0
- package/src/core/fields/_id.js +4 -0
- package/src/core/fields/active.js +2 -9
- package/src/core/fields/boolean.system.js +11 -0
- package/src/core/fields/createdAt.js +1 -0
- package/src/core/fields/default.js +3 -11
- package/src/core/fields/enabled.js +6 -8
- package/src/core/fields/expiredAt.js +1 -0
- package/src/core/fields/height.js +1 -0
- package/src/core/fields/owner.js +3 -3
- package/src/core/fields/ownerModel.js +1 -0
- package/src/core/fields/price.js +1 -0
- package/src/core/fields/size.js +1 -0
- package/src/core/fields/updatedAt.js +1 -1
- package/src/core/fields/userId.js +3 -4
- package/src/core/fields/validators/ID.js +20 -0
- package/src/core/fields/validators/boolean.js +1 -0
- package/src/core/fields/validators/boolean.system.js +8 -0
- package/src/core/fields/validators/codeName.js +16 -0
- package/src/core/fields/validators/date.js +8 -0
- package/src/core/fields/validators/description.js +33 -0
- package/src/core/fields/validators/ip.js +8 -0
- package/src/core/fields/validators/modelName.js +16 -0
- package/src/core/fields/validators/objectId.js +10 -0
- package/src/core/fields/validators/objectId.list.js +14 -0
- package/src/core/fields/validators/positive.or.zero.number.js +14 -0
- package/src/core/fields/validators/requiredObject.js +10 -0
- package/src/core/fields/validators/session.js +16 -0
- package/src/core/fields/validators/telephone.js +8 -0
- package/src/core/fields/validators/title.js +16 -0
- package/src/core/fields/validators/uuid.js +8 -0
- package/src/core/fields/width.js +1 -0
- package/src/core/index.js +2 -2
- package/src/init/lib/app.js +6 -3
- package/src/manifest/registrator/fields.js +33 -2
- package/src/manifest/registrator/fields.postponed.js +76 -15
- package/test/module/fields.js +1 -0
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports.MODULE_NAME = 'not-node';
|
package/src/core/fields/_id.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const ObjectId = require('mongoose').SchemaTypes.ObjectId;
|
|
2
|
+
|
|
1
3
|
module.exports = {
|
|
2
4
|
ui: {
|
|
3
5
|
component: "UIHidden",
|
|
@@ -6,6 +8,8 @@ module.exports = {
|
|
|
6
8
|
readonly: true,
|
|
7
9
|
},
|
|
8
10
|
model: {
|
|
11
|
+
type: ObjectId,
|
|
9
12
|
safe: require("../safety.protocols").systemManageable,
|
|
13
|
+
validate: require('./validators/objectId')
|
|
10
14
|
},
|
|
11
15
|
};
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
+
parent: 'not-node//boolean',
|
|
2
3
|
ui: {
|
|
3
|
-
component: "UISwitch",
|
|
4
4
|
label: "not-node:field_active_label",
|
|
5
|
-
|
|
6
|
-
},
|
|
7
|
-
model: {
|
|
8
|
-
type: Boolean,
|
|
9
|
-
default: false,
|
|
10
|
-
required: true,
|
|
11
|
-
safe: require("../safety.protocols").ownerRootAdmin,
|
|
12
|
-
},
|
|
5
|
+
}
|
|
13
6
|
};
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
+
const { MODULE_NAME } = require("../const");
|
|
2
|
+
|
|
1
3
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
component: "UISwitch",
|
|
4
|
-
label: "not-node:field_default_label",
|
|
5
|
-
default: false,
|
|
6
|
-
},
|
|
7
|
-
model: {
|
|
8
|
-
type: Boolean,
|
|
9
|
-
default: false,
|
|
10
|
-
required: true,
|
|
11
|
-
safe: require("../safety.protocols").ownerRootAdmin,
|
|
12
|
-
},
|
|
4
|
+
parent: `${MODULE_NAME}//boolean`
|
|
13
5
|
};
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
+
const { MODULE_NAME } = require("../const");
|
|
2
|
+
|
|
1
3
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
label: "not-node:field_enabled_label",
|
|
5
|
-
default: false,
|
|
4
|
+
parent: `${MODULE_NAME}//boolean`,
|
|
5
|
+
ui: {
|
|
6
|
+
label: "not-node:field_enabled_label",
|
|
6
7
|
},
|
|
7
|
-
model: {
|
|
8
|
-
type: Boolean,
|
|
8
|
+
model: {
|
|
9
9
|
default: true,
|
|
10
|
-
required: true,
|
|
11
|
-
safe: require("../safety.protocols").ownerRootAdmin,
|
|
12
10
|
},
|
|
13
11
|
};
|
package/src/core/fields/owner.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const Schema = require("mongoose").Schema;
|
|
2
1
|
const notFieldsFilter = require("../../fields/filter");
|
|
3
2
|
const { ownerRootAdmin } = require("../safety.protocols");
|
|
4
3
|
const { ACTION_SIGNATURES } = require("../../auth/const");
|
|
5
4
|
|
|
6
5
|
module.exports = {
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
parent: 'not-node//objectId',
|
|
7
|
+
model: {
|
|
9
8
|
refPath: "ownerModel",
|
|
10
9
|
required: false,
|
|
10
|
+
//owner cant change
|
|
11
11
|
safe: notFieldsFilter.mergeSafetyProtocols(ownerRootAdmin, {
|
|
12
12
|
[ACTION_SIGNATURES.CREATE]: ["-@owner"],
|
|
13
13
|
[ACTION_SIGNATURES.UPDATE]: ["-@owner"],
|
package/src/core/fields/price.js
CHANGED
package/src/core/fields/size.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
const Schema = require("mongoose").Schema;
|
|
2
1
|
|
|
3
2
|
module.exports = {
|
|
3
|
+
parent: 'not-node//objectId',
|
|
4
4
|
ui: {
|
|
5
5
|
component: "UITextfield",
|
|
6
6
|
label: "not-node:field_userId_label",
|
|
7
7
|
placeholder: "not-node:field_userId_placeholder",
|
|
8
8
|
readonly: true,
|
|
9
9
|
},
|
|
10
|
-
model: {
|
|
11
|
-
type: Schema.Types.ObjectId,
|
|
10
|
+
model: {
|
|
12
11
|
ref: "User",
|
|
13
12
|
required: false,
|
|
14
|
-
|
|
13
|
+
default: undefined,
|
|
15
14
|
},
|
|
16
15
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module.exports = [
|
|
2
|
+
{
|
|
3
|
+
validator(val) {
|
|
4
|
+
return !isNaN(val);
|
|
5
|
+
},
|
|
6
|
+
message: "not-node:value_is_not_number",
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
validator(val) {
|
|
10
|
+
return val.toString() === Math.round(val).toString;
|
|
11
|
+
},
|
|
12
|
+
message: "not-node:value_is_not_integer",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
validator(val) {
|
|
16
|
+
return val > 0;
|
|
17
|
+
},
|
|
18
|
+
message: "not-node:value_should_be_greater_than_zero",
|
|
19
|
+
},
|
|
20
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./boolean.system');
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const { MODULE_NAME } = require("../../const");
|
|
2
|
+
|
|
3
|
+
module.exports = [
|
|
4
|
+
{
|
|
5
|
+
validator: (val) => {
|
|
6
|
+
return typeof val === "string";
|
|
7
|
+
},
|
|
8
|
+
message: `${MODULE_NAME}:codeName_value_is_not_string`,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
validator: (val) => {
|
|
12
|
+
return val.length;
|
|
13
|
+
},
|
|
14
|
+
message: `${MODULE_NAME}:codeName_value_is_empty`,
|
|
15
|
+
},
|
|
16
|
+
];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const { MODULE_NAME } = require("../../const");
|
|
2
|
+
|
|
3
|
+
const DEFAULT_DESCRIPTION_MIN_LENGTH = 10;
|
|
4
|
+
const DEFAULT_DESCRIPTION_MAX_LENGTH = 10000;
|
|
5
|
+
|
|
6
|
+
module.exports = [
|
|
7
|
+
{
|
|
8
|
+
validator: (val) => {
|
|
9
|
+
return typeof val === "string";
|
|
10
|
+
},
|
|
11
|
+
message: `${MODULE_NAME}:description_value_is_not_string`,
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
validator: (val, { config }) => {
|
|
15
|
+
const MIN_LEN = config.get("fields.description.minLength") || DEFAULT_DESCRIPTION_MIN_LENGTH;
|
|
16
|
+
if (val.length < MIN_LEN) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
return true;
|
|
20
|
+
},
|
|
21
|
+
message: `${MODULE_NAME}:description_value_is_too_short`,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
validator: (val, { config }) => {
|
|
25
|
+
const MAX_LEN = config.get("fields.description.maxLength") || DEFAULT_DESCRIPTION_MAX_LENGTH;
|
|
26
|
+
if (val.length > MAX_LEN) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
return true;
|
|
30
|
+
},
|
|
31
|
+
message: `${MODULE_NAME}:description_value_is_too_long`,
|
|
32
|
+
},
|
|
33
|
+
];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const { MODULE_NAME } = require("not-node/src/core/const");
|
|
2
|
+
|
|
3
|
+
module.exports = [
|
|
4
|
+
{
|
|
5
|
+
validator: (val) => {
|
|
6
|
+
return typeof val === "string";
|
|
7
|
+
},
|
|
8
|
+
message: `${MODULE_NAME}:modelName_value_is_not_string`,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
validator: (val) => {
|
|
12
|
+
return val.length;
|
|
13
|
+
},
|
|
14
|
+
message: `${MODULE_NAME}:modelName_value_is_empty`,
|
|
15
|
+
},
|
|
16
|
+
];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
module.exports = [
|
|
2
|
+
{
|
|
3
|
+
validator: (val) => {
|
|
4
|
+
return Array.isArray(val);
|
|
5
|
+
},
|
|
6
|
+
message: `not-node:value_is_not_array`,
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
validator: (val, { validator }) => {
|
|
10
|
+
return val.every((itm) => validator.isMongoId(itm));
|
|
11
|
+
},
|
|
12
|
+
message: `not-node:value_item_format_is_not_objectId`,
|
|
13
|
+
},
|
|
14
|
+
];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const { MODULE_NAME } = require("not-node/src/core/const");
|
|
2
|
+
|
|
3
|
+
module.exports = [
|
|
4
|
+
{
|
|
5
|
+
validator: (val) => {
|
|
6
|
+
return typeof val === "string";
|
|
7
|
+
},
|
|
8
|
+
message: `${MODULE_NAME}:session_value_is_not_string`,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
validator: (val) => {
|
|
12
|
+
return val.length;
|
|
13
|
+
},
|
|
14
|
+
message: `${MODULE_NAME}:session_value_is_empty`,
|
|
15
|
+
},
|
|
16
|
+
];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const { MODULE_NAME } = require("not-node/src/core/const");
|
|
2
|
+
|
|
3
|
+
module.exports = [
|
|
4
|
+
{
|
|
5
|
+
validator: (val) => {
|
|
6
|
+
return typeof val === "string";
|
|
7
|
+
},
|
|
8
|
+
message: `${MODULE_NAME}:title_value_is_not_string`,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
validator: (val) => {
|
|
12
|
+
return val.length;
|
|
13
|
+
},
|
|
14
|
+
message: `${MODULE_NAME}:title_value_is_empty`,
|
|
15
|
+
},
|
|
16
|
+
];
|
package/src/core/fields/width.js
CHANGED
package/src/core/index.js
CHANGED
package/src/init/lib/app.js
CHANGED
|
@@ -80,9 +80,12 @@ module.exports = class InitApp {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
printReportByPostponedFieldsRegistrator() {
|
|
83
|
-
const report = notAppPostponedFieldsRegistrator.
|
|
84
|
-
if (Object.keys(report).length) {
|
|
85
|
-
log?.error(report);
|
|
83
|
+
const report = notAppPostponedFieldsRegistrator.state();
|
|
84
|
+
if (Object.keys(report.unresolved).length) {
|
|
85
|
+
log?.error(report.unresolved);
|
|
86
|
+
}
|
|
87
|
+
if (report.insecure.length) {
|
|
88
|
+
log?.error(`List of insecure fields (${report.insecure.length}): `, report.insecure.join(', '));
|
|
86
89
|
}
|
|
87
90
|
}
|
|
88
91
|
};
|
|
@@ -52,13 +52,27 @@ module.exports = class notModuleRegistratorFields {
|
|
|
52
52
|
*/
|
|
53
53
|
static registerField({ nModule, name, field, fromPath }) {
|
|
54
54
|
const MODULE_NAME = nModule.getName();
|
|
55
|
-
if (
|
|
55
|
+
if (
|
|
56
|
+
notAppPostponedFieldsRegistrator.fieldShouldBePostponed(
|
|
57
|
+
field,
|
|
58
|
+
nModule
|
|
59
|
+
)
|
|
60
|
+
) {
|
|
56
61
|
notAppPostponedFieldsRegistrator.add(
|
|
57
62
|
field.parent,
|
|
58
63
|
MODULE_NAME,
|
|
59
64
|
fromPath
|
|
60
65
|
);
|
|
61
66
|
return;
|
|
67
|
+
} else if (field.parent) {
|
|
68
|
+
const parentFieldValue =
|
|
69
|
+
notAppPostponedFieldsRegistrator.findParentField(
|
|
70
|
+
field.parent,
|
|
71
|
+
nModule
|
|
72
|
+
);
|
|
73
|
+
if (parentFieldValue) {
|
|
74
|
+
field = Fields.mutateField(parentFieldValue, field);
|
|
75
|
+
}
|
|
62
76
|
}
|
|
63
77
|
const fieldValidatorsCount = this.extendByFrontValidators({
|
|
64
78
|
name,
|
|
@@ -66,14 +80,31 @@ module.exports = class notModuleRegistratorFields {
|
|
|
66
80
|
fromPath: path.dirname(fromPath),
|
|
67
81
|
});
|
|
68
82
|
nModule.setField(name, field);
|
|
69
|
-
log(
|
|
83
|
+
log(
|
|
84
|
+
`${MODULE_NAME}//${name} with ${fieldValidatorsCount ?? 0}/${
|
|
85
|
+
field?.model?.validate?.length ?? 0
|
|
86
|
+
} validators`
|
|
87
|
+
);
|
|
88
|
+
this.registerFieldIfInsecure(field, nModule, name);
|
|
70
89
|
notAppPostponedFieldsRegistrator.registerPostponedChildren(
|
|
90
|
+
nModule,
|
|
71
91
|
this,
|
|
72
92
|
MODULE_NAME,
|
|
73
93
|
`${MODULE_NAME}//${name}`
|
|
74
94
|
);
|
|
75
95
|
}
|
|
76
96
|
|
|
97
|
+
static registerFieldIfInsecure(field, nModule, name) {
|
|
98
|
+
if (
|
|
99
|
+
field.model &&
|
|
100
|
+
(!field.model.validate || field.model.validate.length === 0)
|
|
101
|
+
) {
|
|
102
|
+
notAppPostponedFieldsRegistrator.registerInsecureField(
|
|
103
|
+
`${nModule.getName()}//${name}`
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
77
108
|
static findValidatorsFile(
|
|
78
109
|
name,
|
|
79
110
|
fromPath,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const path = require("path");
|
|
2
2
|
const getApp = require("../../getApp");
|
|
3
|
+
const { mutateField } = require("../../fields");
|
|
4
|
+
const { log } = require("not-log")(module, "register//fields.postponed");
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* @typedef {object} WaitingField
|
|
@@ -15,6 +17,7 @@ class notAppPostponedFieldsRegistrator {
|
|
|
15
17
|
* @memberof notModuleRegistratorFields
|
|
16
18
|
*/
|
|
17
19
|
static #waitingList = {};
|
|
20
|
+
static #insecureList = [];
|
|
18
21
|
|
|
19
22
|
/**
|
|
20
23
|
*
|
|
@@ -26,6 +29,10 @@ class notAppPostponedFieldsRegistrator {
|
|
|
26
29
|
* @memberof notModuleRegistratorFields
|
|
27
30
|
*/
|
|
28
31
|
static add(parentFieldName, moduleName, pathToField) {
|
|
32
|
+
const parts = path.parse(pathToField);
|
|
33
|
+
log(
|
|
34
|
+
`field ${parentFieldName} not registered yet, field ${moduleName}//${parts.name} postponed`
|
|
35
|
+
);
|
|
29
36
|
if (!Object.hasOwn(this.#waitingList, parentFieldName)) {
|
|
30
37
|
this.#waitingList[parentFieldName] = [];
|
|
31
38
|
}
|
|
@@ -63,6 +70,15 @@ class notAppPostponedFieldsRegistrator {
|
|
|
63
70
|
}
|
|
64
71
|
}
|
|
65
72
|
|
|
73
|
+
static findParentField(fielName, nModule) {
|
|
74
|
+
const [parentFieldModule, parentFieldName] = fielName.split("//");
|
|
75
|
+
if (parentFieldModule === nModule.getName()) {
|
|
76
|
+
return nModule.getField(parentFieldName);
|
|
77
|
+
} else {
|
|
78
|
+
return getApp().getField(fielName);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
66
82
|
/**
|
|
67
83
|
* If parent fields exists in childField description and
|
|
68
84
|
* parent field is not registered yet - returns true
|
|
@@ -72,7 +88,7 @@ class notAppPostponedFieldsRegistrator {
|
|
|
72
88
|
* @return {boolean}
|
|
73
89
|
* @memberof notAppPostponedFieldsRegistrator
|
|
74
90
|
*/
|
|
75
|
-
static fieldShouldBePostponed(childField) {
|
|
91
|
+
static fieldShouldBePostponed(childField, nModule) {
|
|
76
92
|
if (Object.hasOwn(childField, "parent")) {
|
|
77
93
|
if (
|
|
78
94
|
childField.parent &&
|
|
@@ -80,8 +96,13 @@ class notAppPostponedFieldsRegistrator {
|
|
|
80
96
|
childField.parent.length > 4 &&
|
|
81
97
|
childField.parent.indexOf("//") > 0
|
|
82
98
|
) {
|
|
83
|
-
const parentField =
|
|
84
|
-
|
|
99
|
+
const parentField = this.findParentField(
|
|
100
|
+
childField.parent,
|
|
101
|
+
nModule
|
|
102
|
+
);
|
|
103
|
+
if (!parentField) {
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
85
106
|
}
|
|
86
107
|
}
|
|
87
108
|
return false;
|
|
@@ -95,15 +116,30 @@ class notAppPostponedFieldsRegistrator {
|
|
|
95
116
|
* @memberof notAppPostponedFieldsRegistrator
|
|
96
117
|
*/
|
|
97
118
|
static state() {
|
|
119
|
+
return {
|
|
120
|
+
unresolved: this.getStateUnresolved(),
|
|
121
|
+
insecure: this.getStateInsecure(),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
static getStateUnresolved() {
|
|
98
126
|
const result = {};
|
|
99
127
|
Object.keys(this.#waitingList).forEach((parentField) => {
|
|
100
|
-
result[parentField] = this.#waitingList.map(
|
|
128
|
+
result[parentField] = this.#waitingList[parentField].map(
|
|
101
129
|
(itm) => itm.pathToField
|
|
102
130
|
);
|
|
103
131
|
});
|
|
104
132
|
return result;
|
|
105
133
|
}
|
|
106
134
|
|
|
135
|
+
static getStateInsecure() {
|
|
136
|
+
return this.#insecureList;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
static registerInsecureField(fullFieldName) {
|
|
140
|
+
this.#insecureList.push(fullFieldName);
|
|
141
|
+
}
|
|
142
|
+
|
|
107
143
|
/**
|
|
108
144
|
*
|
|
109
145
|
*
|
|
@@ -113,21 +149,46 @@ class notAppPostponedFieldsRegistrator {
|
|
|
113
149
|
* @param {string} fullFieldName
|
|
114
150
|
* @memberof notAppPostponedFieldsRegistrator
|
|
115
151
|
*/
|
|
116
|
-
static registerPostponedChildren(
|
|
152
|
+
static registerPostponedChildren(
|
|
153
|
+
nModuleNotRegistred,
|
|
154
|
+
registrator,
|
|
155
|
+
MODULE_NAME,
|
|
156
|
+
fullFieldName
|
|
157
|
+
) {
|
|
117
158
|
const list = this.getChildren(fullFieldName);
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
159
|
+
|
|
160
|
+
if (list.length) {
|
|
161
|
+
const nModule =
|
|
162
|
+
(getApp && getApp().getModule(MODULE_NAME)) ||
|
|
163
|
+
nModuleNotRegistred;
|
|
164
|
+
log(
|
|
165
|
+
`running registration of fields (${list.length}) derived from ${fullFieldName}`
|
|
166
|
+
);
|
|
167
|
+
list.forEach((childField) => {
|
|
168
|
+
const fieldFile = registrator.reopenCached(
|
|
169
|
+
childField.pathToField
|
|
170
|
+
);
|
|
171
|
+
const resultedField = this.mutateOriginal(
|
|
172
|
+
fullFieldName,
|
|
173
|
+
nModule,
|
|
174
|
+
fieldFile
|
|
175
|
+
);
|
|
176
|
+
const parts = path.parse(childField.pathToField);
|
|
177
|
+
registrator.registerField({
|
|
178
|
+
nModule,
|
|
179
|
+
name: parts.name, //fields name
|
|
180
|
+
field: resultedField, //field description
|
|
181
|
+
fromPath: childField.pathToField,
|
|
182
|
+
});
|
|
127
183
|
});
|
|
128
|
-
}
|
|
184
|
+
}
|
|
129
185
|
this.clearList(fullFieldName);
|
|
130
186
|
}
|
|
187
|
+
|
|
188
|
+
static mutateOriginal(fullFieldName, nModule, mutator) {
|
|
189
|
+
const parentField = this.findParentField(fullFieldName, nModule);
|
|
190
|
+
return mutateField(parentField, mutator);
|
|
191
|
+
}
|
|
131
192
|
}
|
|
132
193
|
|
|
133
194
|
module.exports = notAppPostponedFieldsRegistrator;
|