not-node 5.0.1 → 5.0.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.
- package/.github/workflows/codesee-arch-diagram.yml +81 -0
- package/.idea/codeStyles/Project.xml +16 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/project.iml +12 -0
- package/.idea/vcs.xml +6 -0
- package/.idea/workspace.xml +24 -0
- package/package.json +17 -17
- package/src/common.js +5 -1
- package/src/core/fields/email.js +11 -0
- package/src/core/fields/telephone.js +11 -0
- package/src/core/fields/validators/email.js +4 -0
- package/src/core/locales/en.json +6 -0
- package/src/core/locales/ru.json +6 -0
- package/src/fields/index.js +8 -8
- package/src/init/index.js +3 -2
- package/src/manifest/module.js +1 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
on:
|
|
2
|
+
push:
|
|
3
|
+
branches:
|
|
4
|
+
- master
|
|
5
|
+
pull_request_target:
|
|
6
|
+
types: [opened, synchronize, reopened]
|
|
7
|
+
|
|
8
|
+
name: CodeSee Map
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test_map_action:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
continue-on-error: true
|
|
14
|
+
name: Run CodeSee Map Analysis
|
|
15
|
+
steps:
|
|
16
|
+
- name: checkout
|
|
17
|
+
id: checkout
|
|
18
|
+
uses: actions/checkout@v2
|
|
19
|
+
with:
|
|
20
|
+
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
|
21
|
+
ref: ${{ github.event.pull_request.head.ref }}
|
|
22
|
+
fetch-depth: 0
|
|
23
|
+
|
|
24
|
+
# codesee-detect-languages has an output with id languages.
|
|
25
|
+
- name: Detect Languages
|
|
26
|
+
id: detect-languages
|
|
27
|
+
uses: Codesee-io/codesee-detect-languages-action@latest
|
|
28
|
+
|
|
29
|
+
- name: Configure JDK 16
|
|
30
|
+
uses: actions/setup-java@v2
|
|
31
|
+
if: ${{ fromJSON(steps.detect-languages.outputs.languages).java }}
|
|
32
|
+
with:
|
|
33
|
+
java-version: '16'
|
|
34
|
+
distribution: 'zulu'
|
|
35
|
+
|
|
36
|
+
# CodeSee Maps Go support uses a static binary so there's no setup step required.
|
|
37
|
+
|
|
38
|
+
- name: Configure Node.js 14
|
|
39
|
+
uses: actions/setup-node@v2
|
|
40
|
+
if: ${{ fromJSON(steps.detect-languages.outputs.languages).javascript }}
|
|
41
|
+
with:
|
|
42
|
+
node-version: '14'
|
|
43
|
+
|
|
44
|
+
- name: Configure Python 3.x
|
|
45
|
+
uses: actions/setup-python@v2
|
|
46
|
+
if: ${{ fromJSON(steps.detect-languages.outputs.languages).python }}
|
|
47
|
+
with:
|
|
48
|
+
python-version: '3.x'
|
|
49
|
+
architecture: 'x64'
|
|
50
|
+
|
|
51
|
+
- name: Configure Ruby '3.x'
|
|
52
|
+
uses: ruby/setup-ruby@v1
|
|
53
|
+
if: ${{ fromJSON(steps.detect-languages.outputs.languages).ruby }}
|
|
54
|
+
with:
|
|
55
|
+
ruby-version: '3.0'
|
|
56
|
+
|
|
57
|
+
# CodeSee Maps Rust support uses a static binary so there's no setup step required.
|
|
58
|
+
|
|
59
|
+
- name: Generate Map
|
|
60
|
+
id: generate-map
|
|
61
|
+
uses: Codesee-io/codesee-map-action@latest
|
|
62
|
+
with:
|
|
63
|
+
step: map
|
|
64
|
+
github_ref: ${{ github.ref }}
|
|
65
|
+
languages: ${{ steps.detect-languages.outputs.languages }}
|
|
66
|
+
|
|
67
|
+
- name: Upload Map
|
|
68
|
+
id: upload-map
|
|
69
|
+
uses: Codesee-io/codesee-map-action@latest
|
|
70
|
+
with:
|
|
71
|
+
step: mapUpload
|
|
72
|
+
api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
|
|
73
|
+
github_ref: ${{ github.ref }}
|
|
74
|
+
|
|
75
|
+
- name: Insights
|
|
76
|
+
id: insights
|
|
77
|
+
uses: Codesee-io/codesee-map-action@latest
|
|
78
|
+
with:
|
|
79
|
+
step: insights
|
|
80
|
+
api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
|
|
81
|
+
github_ref: ${{ github.ref }}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<component name="ProjectCodeStyleConfiguration">
|
|
2
|
+
<code_scheme name="Project" version="173">
|
|
3
|
+
<JSCodeStyleSettings version="0">
|
|
4
|
+
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
5
|
+
</JSCodeStyleSettings>
|
|
6
|
+
<codeStyleSettings language="JavaScript">
|
|
7
|
+
<option name="INDENT_CASE_FROM_SWITCH" value="false" />
|
|
8
|
+
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
|
|
9
|
+
<option name="ALIGN_MULTILINE_FOR" value="false" />
|
|
10
|
+
<indentOptions>
|
|
11
|
+
<option name="INDENT_SIZE" value="2" />
|
|
12
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
13
|
+
</indentOptions>
|
|
14
|
+
</codeStyleSettings>
|
|
15
|
+
</code_scheme>
|
|
16
|
+
</component>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="WEB_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager">
|
|
4
|
+
<content url="file://$MODULE_DIR$">
|
|
5
|
+
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
7
|
+
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
+
</content>
|
|
9
|
+
<orderEntry type="inheritedJdk" />
|
|
10
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
11
|
+
</component>
|
|
12
|
+
</module>
|
package/.idea/vcs.xml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ChangeListManager">
|
|
4
|
+
<list default="true" id="74929b6a-6f9b-4d33-bcd5-317dea0a2db1" name="Changes" comment="" />
|
|
5
|
+
<option name="SHOW_DIALOG" value="false" />
|
|
6
|
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
7
|
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
8
|
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
9
|
+
</component>
|
|
10
|
+
<component name="Git.Settings">
|
|
11
|
+
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
12
|
+
</component>
|
|
13
|
+
<component name="ProjectId" id="22q8JXHHJZy9UWkJAROmOSSPtVz" />
|
|
14
|
+
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
|
15
|
+
<component name="PropertiesComponent">
|
|
16
|
+
<property name="node.js.detected.package.eslint" value="true" />
|
|
17
|
+
<property name="node.js.selected.package.eslint" value="(autodetect)" />
|
|
18
|
+
<property name="vue.rearranger.settings.migration" value="true" />
|
|
19
|
+
</component>
|
|
20
|
+
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
|
21
|
+
<component name="TypeScriptGeneratedFilesManager">
|
|
22
|
+
<option name="version" value="3" />
|
|
23
|
+
</component>
|
|
24
|
+
</project>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "not-node",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "node complimentary part for client side notFramework.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -33,37 +33,37 @@
|
|
|
33
33
|
"url": "https://github.com/interrupter/not-node/issues"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"body-parser": "^1.
|
|
36
|
+
"body-parser": "^1.20.0",
|
|
37
37
|
"compression": "^1.7.4",
|
|
38
38
|
"connect-mongodb-session": "^3.1.1",
|
|
39
|
-
"connect-redis": "^6.
|
|
39
|
+
"connect-redis": "^6.1.3",
|
|
40
40
|
"cors": "^2.8.5",
|
|
41
41
|
"deep-diff": "*",
|
|
42
42
|
"deepmerge": "^4.2.2",
|
|
43
43
|
"ejs": "^3.1.6",
|
|
44
44
|
"escape-string-regexp": "*",
|
|
45
|
-
"express": "^4.17.
|
|
46
|
-
"express-fileupload": "^1.
|
|
45
|
+
"express": "^4.17.3",
|
|
46
|
+
"express-fileupload": "^1.3.1",
|
|
47
47
|
"express-session": "^1.17.2",
|
|
48
48
|
"fs-extra": "*",
|
|
49
|
-
"helmet": "^
|
|
49
|
+
"helmet": "^5.0.2",
|
|
50
50
|
"lower-case": "*",
|
|
51
51
|
"method-override": "^3.0.0",
|
|
52
52
|
"mock-require": "^3.0.3",
|
|
53
53
|
"mongoose": "*",
|
|
54
54
|
"mongoose-validator": "*",
|
|
55
55
|
"nconf": "*",
|
|
56
|
-
"not-config": "^0.1.
|
|
57
|
-
"not-error": "^0.2.
|
|
56
|
+
"not-config": "^0.1.5",
|
|
57
|
+
"not-error": "^0.2.5",
|
|
58
58
|
"not-filter": "*",
|
|
59
|
-
"not-inform": "^0.0.
|
|
59
|
+
"not-inform": "^0.0.28",
|
|
60
60
|
"not-locale": "*",
|
|
61
61
|
"not-log": "^0.0.20",
|
|
62
62
|
"not-monitor": "^0.0.13",
|
|
63
63
|
"not-path": "*",
|
|
64
|
-
"not-validation": "^0.0.
|
|
64
|
+
"not-validation": "^0.0.7",
|
|
65
65
|
"rate-limiter-flexible": "^2.3.6",
|
|
66
|
-
"redis": "^4.0.
|
|
66
|
+
"redis": "^4.0.6",
|
|
67
67
|
"rfdc": "^1.3.0",
|
|
68
68
|
"rmdir": "^1.2.0",
|
|
69
69
|
"serve-static": "*",
|
|
@@ -75,18 +75,18 @@
|
|
|
75
75
|
"babel-eslint": "^10.1.0",
|
|
76
76
|
"chai": "*",
|
|
77
77
|
"chai-as-promised": "*",
|
|
78
|
-
"eslint": "^8.
|
|
78
|
+
"eslint": "^8.12.0",
|
|
79
79
|
"eslint-plugin-node": "^11.1.0",
|
|
80
|
-
"eslint-plugin-sonarjs": "^0.
|
|
80
|
+
"eslint-plugin-sonarjs": "^0.13.0",
|
|
81
81
|
"ink-docstrap": "^1.3.2",
|
|
82
|
-
"ioredis": "^
|
|
83
|
-
"jsdoc": "^3.6.
|
|
82
|
+
"ioredis": "^5.0.3",
|
|
83
|
+
"jsdoc": "^3.6.10",
|
|
84
84
|
"mocha": "*",
|
|
85
85
|
"mocha-suppress-logs": "^0.3.1",
|
|
86
|
-
"mongodb-memory-server": "^8.
|
|
86
|
+
"mongodb-memory-server": "^8.4.2",
|
|
87
87
|
"npm-run-all": "^4.1.5",
|
|
88
88
|
"nyc": "^15.1.0",
|
|
89
|
-
"retire": "^3.0.
|
|
89
|
+
"retire": "^3.0.6"
|
|
90
90
|
},
|
|
91
91
|
"homepage": "https://github.com/interrupter/not-node#readme",
|
|
92
92
|
"nyc": {
|
package/src/common.js
CHANGED
|
@@ -80,7 +80,11 @@ module.exports.getTodayDate = () => {
|
|
|
80
80
|
* @param {string} name field name
|
|
81
81
|
* @return {boolean} if object contains field with name
|
|
82
82
|
**/
|
|
83
|
-
const objHas = (obj, name) =>
|
|
83
|
+
const objHas = (obj, name) => {
|
|
84
|
+
if(typeof obj === 'undefined') return false;
|
|
85
|
+
if(obj === null) return false;
|
|
86
|
+
return Object.prototype.hasOwnProperty.call(obj, name);
|
|
87
|
+
};
|
|
84
88
|
module.exports.objHas = objHas;
|
|
85
89
|
|
|
86
90
|
|
package/src/core/locales/en.json
CHANGED
|
@@ -22,6 +22,12 @@
|
|
|
22
22
|
"field_size_label": "Size",
|
|
23
23
|
"field_size_placeholder": "Size",
|
|
24
24
|
|
|
25
|
+
"field_email_label": "Email",
|
|
26
|
+
"field_email_placeholder": "email@server.com",
|
|
27
|
+
|
|
28
|
+
"field_telephone_label": "Tel.",
|
|
29
|
+
"field_telephone_placeholder": "+1 (111) 111-11-11",
|
|
30
|
+
|
|
25
31
|
"field_ID_label": "ID",
|
|
26
32
|
"field_ID_placeholder": "ID",
|
|
27
33
|
|
package/src/core/locales/ru.json
CHANGED
|
@@ -22,6 +22,12 @@
|
|
|
22
22
|
"field_size_label": "Size",
|
|
23
23
|
"field_size_placeholder": "Size",
|
|
24
24
|
|
|
25
|
+
"field_email_label": "Email",
|
|
26
|
+
"field_email_placeholder": "email@server.ru",
|
|
27
|
+
|
|
28
|
+
"field_telephone_label": "Тел.",
|
|
29
|
+
"field_telephone_placeholder": "+7 (111) 111-11-11",
|
|
30
|
+
|
|
25
31
|
"field_ID_label": "ID",
|
|
26
32
|
"field_ID_placeholder": "ID",
|
|
27
33
|
|
package/src/fields/index.js
CHANGED
|
@@ -124,14 +124,14 @@ module.exports.initManifestFields = (
|
|
|
124
124
|
rawKeys
|
|
125
125
|
.filter((key) => !privateFields.includes(key))
|
|
126
126
|
.forEach((key) => {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
127
|
+
let mutation = getMutationForField(key, mutationsList);
|
|
128
|
+
if (mutation) {
|
|
129
|
+
list.push(mutation);
|
|
130
|
+
mutationsList.splice(mutationsList.indexOf(mutation), 1);
|
|
131
|
+
} else {
|
|
132
|
+
list.push(key);
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
135
|
list.push(...mutationsList);
|
|
136
136
|
return module.exports.createSchemaFromFields(app, list, 'ui', moduleName);
|
|
137
137
|
}else{
|
package/src/init/index.js
CHANGED
|
@@ -127,7 +127,7 @@ class Init {
|
|
|
127
127
|
additional
|
|
128
128
|
}) {
|
|
129
129
|
try {
|
|
130
|
-
log.info('Kick start app...'+ os.platform()+os.arch());
|
|
130
|
+
log.info('Kick start app...'+ os.platform()+' '+os.arch());
|
|
131
131
|
ADDS.init(additional);
|
|
132
132
|
const initSequence = new InitSequence(STANDART_INIT_SEQUENCE);
|
|
133
133
|
await ADDS.run('pre', {
|
|
@@ -153,7 +153,8 @@ class Init {
|
|
|
153
153
|
await ADDS.run('post', {
|
|
154
154
|
config,
|
|
155
155
|
options,
|
|
156
|
-
manifest
|
|
156
|
+
manifest,
|
|
157
|
+
master: Init
|
|
157
158
|
});
|
|
158
159
|
log.info('Application initalization finished');
|
|
159
160
|
} catch (e) {
|
package/src/manifest/module.js
CHANGED
|
@@ -59,7 +59,7 @@ class notModule {
|
|
|
59
59
|
};
|
|
60
60
|
this.fieldsImportRules = (objHas(options, 'fields') && options.fields) ? options.fields : {};
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
// log.info(`Creating module: ${this.getName()}`);
|
|
63
63
|
this.init();
|
|
64
64
|
return this;
|
|
65
65
|
}
|