acrb-node-core 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
package/README ADDED
@@ -0,0 +1,120 @@
1
+ # Node Core
2
+
3
+ ## References
4
+
5
+ - How to use async functions with Array.map in Javascript [link](https://advancedweb.hu/how-to-use-async-functions-with-array-map-in-javascript)
6
+ - https://hirok.io/posts/avoid-npm-link
7
+
8
+ ## During Debug
9
+
10
+ - Link the @fx/node-core to project folder
11
+ - MUST run this in terminal windows with Administrator right
12
+ - Or configure the local security policy in Windows.
13
+
14
+ ```
15
+ cd <sevice folder>
16
+ npx link C:\\nvm\\nodejs\\node_modules\\@fx\\node-core
17
+
18
+ ```
19
+
20
+ ```
21
+ # configure local security policy
22
+ Local Policies -> User Rights Assignments -> Create Symbolic Links
23
+ - Click on Add User or Group
24
+ - Type in everyone
25
+ - Reboot your system
26
+ ```
27
+
28
+ ## NPX link
29
+
30
+ -
31
+
32
+ ## Cloud Logging
33
+
34
+ ### How to filter by label
35
+
36
+ ```
37
+ resource.type="global"
38
+ labels.env:"alpha"
39
+ severity=(DEFAULT OR DEBUG OR INFO OR NOTICE OR WARNING OR ERROR OR CRITICAL OR ALERT OR EMERGENCY)
40
+ ```
41
+
42
+ ## Inline Configuration
43
+
44
+ You can either set "stringLiterals": false  in the configuration file jsdefender.config.json or you can use inline configuration and disable stringLiterals feature only for the specific functions by setting it as in the example below in the javascript code file:
45
+
46
+ ```javascript
47
+ hello1() {
48
+
49
+ "@jsdefender { stringLiterals:false}";
50
+
51
+ const message = `
52
+
53
+ Hello World ${this.name}
54
+
55
+ `;
56
+
57
+ console.log(message);
58
+
59
+ }
60
+ ```
61
+
62
+ Regarding your question about skipping obfuscation from a class or a specific function you can still use inline configuration using "@jsdefender off" like for example:
63
+
64
+ to skip class from obfuscation
65
+
66
+ ```javascript
67
+ "@jsdefender off"
68
+
69
+ class Logger {
70
+
71
+ .........}
72
+
73
+ to skip a function from obfuscation
74
+
75
+
76
+
77
+ hello2()
78
+
79
+ {"@jsdefender off";
80
+
81
+ const message = Hello World \${this.name}\\;
82
+
83
+ console.log(message);
84
+
85
+ }
86
+ ```
87
+
88
+ For more details and information on inline configuration and examples provided, you can refer to our guide in the following link.
89
+
90
+ https://www.preemptive.com/jsdefender/userguide/en/cli_inline_config.html
91
+
92
+ ---
93
+
94
+ # Known Issues
95
+
96
+ ## Error after update version of `cron`
97
+
98
+ After update from `2.1.0` to `^2.1.0` (`2.2.0`)
99
+
100
+ ```
101
+ Error: the code has been tampered!
102
+ undefined:1
103
+ ReferenceError: Cannot access 'ni' before initialization
104
+ ```
105
+
106
+ Resolution:
107
+ In webpack.config.js, add `cron` to `externals`
108
+
109
+ ```
110
+ externals: [
111
+ '@google-cloud/logging-winston',
112
+ '@google-cloud/trace-agent',
113
+ 'awilix',
114
+ 'awilix-express',
115
+ 'aws4',
116
+ 'bcryptjs',
117
+ 'cron',
118
+ 'enum',
119
+ 'express-openapi',
120
+ ```
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # Node Core