opticore-webapp-core 1.0.8 → 1.0.10

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/dist/index.d.cts CHANGED
@@ -6,52 +6,49 @@ import stream from 'stream';
6
6
  import { ServerResponse, IncomingMessage } from 'node:http';
7
7
 
8
8
  declare class SAsymmetricCryptionDataWithPrivateRSAKey {
9
- private static log;
9
+ private log;
10
+ private readonly localeLanguage;
11
+ constructor(localeLanguage: string);
10
12
  /**
11
13
  *
12
14
  * @param rsaKey
13
15
  * @param keyType
14
- * @param localeLanguage
15
16
  * @protected
16
17
  *
17
18
  * Return ErrorHandler | string
18
19
  */
19
- protected static verifyExistingKey(rsaKey: string, keyType: string, localeLanguage: string): StackTraceError | string;
20
+ protected verifyExistingKey(rsaKey: string, keyType: string): StackTraceError | string;
20
21
  /**
21
22
  *
22
23
  * @param privateKey
23
24
  * @param payload
24
- * @param localeLanguage
25
25
  * @private
26
26
  *
27
27
  * Return Buffer
28
28
  */
29
- private static encryptionWithPrivateKey;
29
+ private encryptionWithPrivateKey;
30
30
  /**
31
31
  *
32
32
  * @param privateKey
33
33
  * @param publicKey
34
34
  * @param payload
35
- * @param localeLanguage
36
35
  * @private
37
36
  */
38
- private static decryptionWithPublicKey;
37
+ private decryptionWithPublicKey;
39
38
  /**
40
39
  *
41
40
  * @param privateKey
42
41
  * @param payload
43
- * @param localeLanguage
44
42
  * @private
45
43
  */
46
- private static signWithRSAKey;
44
+ private signWithRSAKey;
47
45
  /**
48
46
  *
49
47
  * @param privateKey
50
48
  * @param publicKey
51
49
  * @param payload
52
- * @param localeLanguage
53
50
  */
54
- static verifyRSAKey(privateKey: string, publicKey: string, payload: any, localeLanguage: string): string | Error;
51
+ verifyRSAKey(privateKey: string, publicKey: string, payload: any): string | Error;
55
52
  /**
56
53
  *
57
54
  * @param props
@@ -59,53 +56,55 @@ declare class SAsymmetricCryptionDataWithPrivateRSAKey {
59
56
  * @param status
60
57
  * @private
61
58
  */
62
- private static traceError;
59
+ private traceError;
63
60
  }
64
61
 
65
62
  declare class SAsymmetricCryptionDataWithPublicRSAKey {
66
- private static logger;
63
+ private logger;
64
+ private readonly localeLanguage;
65
+ constructor(localeLanguage: string);
67
66
  /**
68
67
  *
69
68
  * @param rsaKey
70
69
  * @param keyType
71
- * @param localeLanguage
70
+ *
72
71
  * @protected
73
72
  */
74
- protected static verifyExistingKey(rsaKey: string, keyType: string, localeLanguage: string): string | Error;
73
+ protected verifyExistingKey(rsaKey: string, keyType: string): string | Error;
75
74
  /**
76
75
  *
77
76
  * @param publicKey
78
77
  * @param payload
79
- * @param localeLanguage
78
+ *
80
79
  * @private
81
80
  */
82
- private static encryptionWithPublicKey;
81
+ private encryptionWithPublicKey;
83
82
  /**
84
83
  *
85
84
  * @param privateKey
86
85
  * @param publicKey
87
86
  * @param payload
88
- * @param localeLanguage
87
+ *
89
88
  * @private
90
89
  */
91
- private static decryptionWithPrivateKey;
90
+ private decryptionWithPrivateKey;
92
91
  /**
93
92
  *
94
93
  * @param publicKey
95
94
  * @param payload
96
- * @param localeLanguage
95
+ *
97
96
  * @private
98
97
  */
99
- private static signWithPublicRSAKey;
98
+ private signWithPublicRSAKey;
100
99
  /**
101
100
  *
102
101
  * @param privateKey
103
102
  * @param publicKey
104
103
  * @param payload
105
- * @param localeLanguage
104
+ *
106
105
  */
107
- static verifyPublicRSAKey(privateKey: string, publicKey: string, payload: any, localeLanguage: string): string | StackTraceError;
108
- private static traceError;
106
+ verifyPublicRSAKey(privateKey: string, publicKey: string, payload: any): string | StackTraceError;
107
+ private traceError;
109
108
  }
110
109
 
111
110
  /**
@@ -180,17 +179,16 @@ declare class RSAKeyEncryption {
180
179
  }
181
180
 
182
181
  declare class YamlParsing {
183
- private static logger;
184
- private static localeLanguage;
185
- static __init(localeLanguage: string): typeof YamlParsing;
186
- static readFile(filePath: string, localeLanguage: string): Promise<void>;
182
+ private logger;
183
+ private readonly localeLanguage;
184
+ constructor(localeLanguage: string);
185
+ readFile(filePath: string): Promise<void>;
187
186
  /**
188
187
  *
189
188
  * @param content
190
- * @param localeLanguage
191
189
  * @private
192
190
  */
193
- private static parsing;
191
+ private parsing;
194
192
  }
195
193
 
196
194
  /**
@@ -365,20 +363,21 @@ declare class Utility {
365
363
  }
366
364
 
367
365
  declare class PathModuleVerifier {
368
- private static log;
366
+ private log;
367
+ private readonly localeLanguage;
368
+ constructor(localeLanguage: string);
369
369
  /**
370
370
  * Verifies if modules at specific paths are loaded.
371
371
  * If any module is not loaded, it throws an error.
372
- * @param localLanguage
373
372
  * @param modulePaths - An array of paths to the modules to verify.
374
373
  */
375
- static verifyModulePaths(localLanguage: string, modulePaths: string[]): void;
374
+ verifyModulePaths(modulePaths: string[]): void;
376
375
  /**
377
376
  * Checks if a specific module at a given path is loaded in the Node.js require cache.
378
377
  * @param modulePath - The path to the module.
379
378
  * @returns True if the module is loaded, false otherwise.
380
379
  */
381
- private static isModulePathLoaded;
380
+ private isModulePathLoaded;
382
381
  }
383
382
 
384
383
  interface IBodyParserOptions {
package/dist/index.d.ts CHANGED
@@ -6,52 +6,49 @@ import stream from 'stream';
6
6
  import { ServerResponse, IncomingMessage } from 'node:http';
7
7
 
8
8
  declare class SAsymmetricCryptionDataWithPrivateRSAKey {
9
- private static log;
9
+ private log;
10
+ private readonly localeLanguage;
11
+ constructor(localeLanguage: string);
10
12
  /**
11
13
  *
12
14
  * @param rsaKey
13
15
  * @param keyType
14
- * @param localeLanguage
15
16
  * @protected
16
17
  *
17
18
  * Return ErrorHandler | string
18
19
  */
19
- protected static verifyExistingKey(rsaKey: string, keyType: string, localeLanguage: string): StackTraceError | string;
20
+ protected verifyExistingKey(rsaKey: string, keyType: string): StackTraceError | string;
20
21
  /**
21
22
  *
22
23
  * @param privateKey
23
24
  * @param payload
24
- * @param localeLanguage
25
25
  * @private
26
26
  *
27
27
  * Return Buffer
28
28
  */
29
- private static encryptionWithPrivateKey;
29
+ private encryptionWithPrivateKey;
30
30
  /**
31
31
  *
32
32
  * @param privateKey
33
33
  * @param publicKey
34
34
  * @param payload
35
- * @param localeLanguage
36
35
  * @private
37
36
  */
38
- private static decryptionWithPublicKey;
37
+ private decryptionWithPublicKey;
39
38
  /**
40
39
  *
41
40
  * @param privateKey
42
41
  * @param payload
43
- * @param localeLanguage
44
42
  * @private
45
43
  */
46
- private static signWithRSAKey;
44
+ private signWithRSAKey;
47
45
  /**
48
46
  *
49
47
  * @param privateKey
50
48
  * @param publicKey
51
49
  * @param payload
52
- * @param localeLanguage
53
50
  */
54
- static verifyRSAKey(privateKey: string, publicKey: string, payload: any, localeLanguage: string): string | Error;
51
+ verifyRSAKey(privateKey: string, publicKey: string, payload: any): string | Error;
55
52
  /**
56
53
  *
57
54
  * @param props
@@ -59,53 +56,55 @@ declare class SAsymmetricCryptionDataWithPrivateRSAKey {
59
56
  * @param status
60
57
  * @private
61
58
  */
62
- private static traceError;
59
+ private traceError;
63
60
  }
64
61
 
65
62
  declare class SAsymmetricCryptionDataWithPublicRSAKey {
66
- private static logger;
63
+ private logger;
64
+ private readonly localeLanguage;
65
+ constructor(localeLanguage: string);
67
66
  /**
68
67
  *
69
68
  * @param rsaKey
70
69
  * @param keyType
71
- * @param localeLanguage
70
+ *
72
71
  * @protected
73
72
  */
74
- protected static verifyExistingKey(rsaKey: string, keyType: string, localeLanguage: string): string | Error;
73
+ protected verifyExistingKey(rsaKey: string, keyType: string): string | Error;
75
74
  /**
76
75
  *
77
76
  * @param publicKey
78
77
  * @param payload
79
- * @param localeLanguage
78
+ *
80
79
  * @private
81
80
  */
82
- private static encryptionWithPublicKey;
81
+ private encryptionWithPublicKey;
83
82
  /**
84
83
  *
85
84
  * @param privateKey
86
85
  * @param publicKey
87
86
  * @param payload
88
- * @param localeLanguage
87
+ *
89
88
  * @private
90
89
  */
91
- private static decryptionWithPrivateKey;
90
+ private decryptionWithPrivateKey;
92
91
  /**
93
92
  *
94
93
  * @param publicKey
95
94
  * @param payload
96
- * @param localeLanguage
95
+ *
97
96
  * @private
98
97
  */
99
- private static signWithPublicRSAKey;
98
+ private signWithPublicRSAKey;
100
99
  /**
101
100
  *
102
101
  * @param privateKey
103
102
  * @param publicKey
104
103
  * @param payload
105
- * @param localeLanguage
104
+ *
106
105
  */
107
- static verifyPublicRSAKey(privateKey: string, publicKey: string, payload: any, localeLanguage: string): string | StackTraceError;
108
- private static traceError;
106
+ verifyPublicRSAKey(privateKey: string, publicKey: string, payload: any): string | StackTraceError;
107
+ private traceError;
109
108
  }
110
109
 
111
110
  /**
@@ -180,17 +179,16 @@ declare class RSAKeyEncryption {
180
179
  }
181
180
 
182
181
  declare class YamlParsing {
183
- private static logger;
184
- private static localeLanguage;
185
- static __init(localeLanguage: string): typeof YamlParsing;
186
- static readFile(filePath: string, localeLanguage: string): Promise<void>;
182
+ private logger;
183
+ private readonly localeLanguage;
184
+ constructor(localeLanguage: string);
185
+ readFile(filePath: string): Promise<void>;
187
186
  /**
188
187
  *
189
188
  * @param content
190
- * @param localeLanguage
191
189
  * @private
192
190
  */
193
- private static parsing;
191
+ private parsing;
194
192
  }
195
193
 
196
194
  /**
@@ -365,20 +363,21 @@ declare class Utility {
365
363
  }
366
364
 
367
365
  declare class PathModuleVerifier {
368
- private static log;
366
+ private log;
367
+ private readonly localeLanguage;
368
+ constructor(localeLanguage: string);
369
369
  /**
370
370
  * Verifies if modules at specific paths are loaded.
371
371
  * If any module is not loaded, it throws an error.
372
- * @param localLanguage
373
372
  * @param modulePaths - An array of paths to the modules to verify.
374
373
  */
375
- static verifyModulePaths(localLanguage: string, modulePaths: string[]): void;
374
+ verifyModulePaths(modulePaths: string[]): void;
376
375
  /**
377
376
  * Checks if a specific module at a given path is loaded in the Node.js require cache.
378
377
  * @param modulePath - The path to the module.
379
378
  * @returns True if the module is loaded, false otherwise.
380
379
  */
381
- private static isModulePathLoaded;
380
+ private isModulePathLoaded;
382
381
  }
383
382
 
384
383
  interface IBodyParserOptions {