opticore-webapp-core 1.0.18 → 1.0.19

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
@@ -1,8 +1,4 @@
1
1
  import { StackTraceError } from 'opticore-catch-exception-error';
2
- import mySQL from 'mysql';
3
- import { ConnectionOptions } from 'tls';
4
- import { CustomTypesConfig } from 'pg';
5
- import stream from 'stream';
6
2
  import { ServerResponse, IncomingMessage } from 'node:http';
7
3
 
8
4
  declare class SAsymmetricCryptionDataWithPrivateRSAKey {
@@ -17,7 +13,7 @@ declare class SAsymmetricCryptionDataWithPrivateRSAKey {
17
13
  *
18
14
  * Return ErrorHandler | string
19
15
  */
20
- protected verifyExistingKey(rsaKey: string, keyType: string): StackTraceError | string;
16
+ protected verifyExistingKey(rsaKey: string, keyType: string): string | StackTraceError;
21
17
  /**
22
18
  *
23
19
  * @param privateKey
@@ -107,33 +103,6 @@ declare class SAsymmetricCryptionDataWithPublicRSAKey {
107
103
  private traceError;
108
104
  }
109
105
 
110
- /**
111
- *
112
- * @param url
113
- * @param user
114
- * @param password
115
- * @param dbName
116
- * @constructor
117
- */
118
- declare function SCheckerMongoDatabaseConnection(url: string, user: string | any, password: string | any, dbName: string | any): Promise<void>;
119
-
120
- /**
121
- *
122
- * @param environnementPath
123
- * @param dbConnection
124
- * @param user
125
- * @param database
126
- * @param dbHost
127
- * @param password
128
- * @param localeLanguage
129
- * @constructor
130
- *
131
- * Return void
132
- */
133
- declare function SCheckerMySqlDatabaseConnection(localeLanguage: string, environnementPath: any, dbConnection: mySQL.Connection, user: string, database: string, dbHost: string, password: string): void;
134
-
135
- declare function SCheckerPostgresDatabaseConnection(localeLanguage: string, environnementPath: any, connectionString: any, keepAlive?: boolean | undefined, stream?: any, statement_timeout?: false | number | undefined, ssl?: boolean | ConnectionOptions | undefined, query_timeout?: number | undefined, keepAliveInitialDelayMillis?: number | undefined, idle_in_transaction_session_timeout?: number | undefined, application_name?: string | undefined, connectionTimeoutMillis?: number | undefined, types?: CustomTypesConfig | undefined, options?: string | undefined): Promise<void>;
136
-
137
106
  declare const CLogLevel: {
138
107
  readonly debug: "DEBUG";
139
108
  readonly info: "INFO";
@@ -141,27 +110,6 @@ declare const CLogLevel: {
141
110
  readonly error: "ERROR";
142
111
  };
143
112
 
144
- /** --------------------------------------------------------------------------------------------------------------------------------
145
- * Arguments: A connection URL can also take arguments. Here is the same example from above with placeholder
146
- * values in uppercase letters for three arguments: mysql://USER:PASSWORD@HOST:PORT/DATABASE?KEY1=VALUE&KEY2=VALUE&KEY3=VALUE
147
- *
148
- * The following arguments can be used:
149
- * connection_limit: Maximum size of the connection pool,
150
- * connect_timeout: Maximum number of seconds to wait for a new connection to be opened, 0 means no timeout,
151
- * pool_timeout: Maximum number of seconds to wait for a new connection from the pool, 0 means no timeout,
152
- * sslcert: Path to the server certificate. Certificate paths are resolved relative to the ./prisma folder,
153
- * sslidentity: Path to the PKCS12 certificate,
154
- * sslpassword: Password that was used to secure the PKCS12 file,
155
- * sslaccept: Configures whether to check for missing values in the certificate. Possible values: accept_invalid_certs, strict,
156
- * socket: Points to a directory that contains a socket to be used for the connection,
157
- * socket_timeout: Number of seconds to wait until a single query terminates
158
- *
159
- * So if you want to use argument: write it like this "?sslidentity=client-identity.p12&sslpassword=mypassword&sslcert=rootca.cert"
160
- *
161
- * ---------------------------------------------------------------------------------------------------------------------------------
162
- */
163
- declare const UOptionalArgumentConnection: (environnementPath: any) => string;
164
-
165
113
  /**
166
114
  * This class contains methods that allow to decrypt data using public and private keys.
167
115
  */
@@ -182,7 +130,7 @@ declare class RSAKeyEncryption {
182
130
  declare class YamlParsing {
183
131
  private readonly logger;
184
132
  private readonly localeLanguage;
185
- constructor(localeLanguage: string, environnementPath: any);
133
+ constructor(localeLanguage: string, environmentPath: any);
186
134
  absolutPath(): string;
187
135
  readFile(filePath: string): Promise<void>;
188
136
  /**
@@ -204,12 +152,6 @@ declare class Environment<T> {
204
152
  get<K extends keyof T>(key: K): T[K];
205
153
  }
206
154
 
207
- declare const MMongoCheckerDatabase: (optionalArgumentConnection: string | any, localLanguage: string, environnementPath: any) => Promise<void>;
208
-
209
- declare const MMySqlCheckerDatabase: (optionalArgumentConnection: string | any, localLanguage: string, environnementPath: any) => void;
210
-
211
- declare const MPostgresCheckerDatabase: (localLanguage: string, environnementPath: any, keepAlive?: boolean | undefined, stream?: (() => (stream.Duplex | undefined)) | undefined, statement_timeout?: false | number | undefined, ssl?: boolean | ConnectionOptions | undefined, query_timeout?: number | undefined, keepAliveInitialDelayMillis?: number | undefined, idle_in_transaction_session_timeout?: number | undefined, application_name?: string | undefined, connectionTimeoutMillis?: number | undefined, types?: CustomTypesConfig | undefined, options?: string | undefined) => Promise<void>;
212
-
213
155
  /**
214
156
  *
215
157
  * @param envDir
@@ -471,4 +413,4 @@ declare function TTextBodyParser(options: IBodyParserOptions, localLanguage: str
471
413
  */
472
414
  declare function TUrlencodedBodyParser(options: IBodyParserOptions, localLanguage: string, environnementPath: any): void;
473
415
 
474
- export { CLogLevel, CSignRSAKeyComponent, Environment, type IBodyParserOptions, type IResponseBodyEndFromResponseEvent, type IResponseBodyWriteFromResponseEvent, type IWrappingBodyResponse, LocalLanguageLoader, MMongoCheckerDatabase, MMySqlCheckerDatabase, MPostgresCheckerDatabase, PathModuleVerifier, RSAKeyDecryption, RSAKeyEncryption, SAsymmetricCryptionDataWithPrivateRSAKey, SAsymmetricCryptionDataWithPublicRSAKey, SCheckerMongoDatabaseConnection, SCheckerMySqlDatabaseConnection, SCheckerPostgresDatabaseConnection, TJSONBodyParser, type TLogLevel, type TOriginalWriteEncoding, type TParseFunction, TRawBodyParser, TTextBodyParser, TUrlencodedBodyParser, UOptionalArgumentConnection, Utility, YamlParsing, dateTimeFormatted, loggerConfig };
416
+ export { CLogLevel, CSignRSAKeyComponent, Environment, type IBodyParserOptions, type IResponseBodyEndFromResponseEvent, type IResponseBodyWriteFromResponseEvent, type IWrappingBodyResponse, LocalLanguageLoader, PathModuleVerifier, RSAKeyDecryption, RSAKeyEncryption, SAsymmetricCryptionDataWithPrivateRSAKey, SAsymmetricCryptionDataWithPublicRSAKey, TJSONBodyParser, type TLogLevel, type TOriginalWriteEncoding, type TParseFunction, TRawBodyParser, TTextBodyParser, TUrlencodedBodyParser, Utility, YamlParsing, dateTimeFormatted, loggerConfig };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,4 @@
1
1
  import { StackTraceError } from 'opticore-catch-exception-error';
2
- import mySQL from 'mysql';
3
- import { ConnectionOptions } from 'tls';
4
- import { CustomTypesConfig } from 'pg';
5
- import stream from 'stream';
6
2
  import { ServerResponse, IncomingMessage } from 'node:http';
7
3
 
8
4
  declare class SAsymmetricCryptionDataWithPrivateRSAKey {
@@ -17,7 +13,7 @@ declare class SAsymmetricCryptionDataWithPrivateRSAKey {
17
13
  *
18
14
  * Return ErrorHandler | string
19
15
  */
20
- protected verifyExistingKey(rsaKey: string, keyType: string): StackTraceError | string;
16
+ protected verifyExistingKey(rsaKey: string, keyType: string): string | StackTraceError;
21
17
  /**
22
18
  *
23
19
  * @param privateKey
@@ -107,33 +103,6 @@ declare class SAsymmetricCryptionDataWithPublicRSAKey {
107
103
  private traceError;
108
104
  }
109
105
 
110
- /**
111
- *
112
- * @param url
113
- * @param user
114
- * @param password
115
- * @param dbName
116
- * @constructor
117
- */
118
- declare function SCheckerMongoDatabaseConnection(url: string, user: string | any, password: string | any, dbName: string | any): Promise<void>;
119
-
120
- /**
121
- *
122
- * @param environnementPath
123
- * @param dbConnection
124
- * @param user
125
- * @param database
126
- * @param dbHost
127
- * @param password
128
- * @param localeLanguage
129
- * @constructor
130
- *
131
- * Return void
132
- */
133
- declare function SCheckerMySqlDatabaseConnection(localeLanguage: string, environnementPath: any, dbConnection: mySQL.Connection, user: string, database: string, dbHost: string, password: string): void;
134
-
135
- declare function SCheckerPostgresDatabaseConnection(localeLanguage: string, environnementPath: any, connectionString: any, keepAlive?: boolean | undefined, stream?: any, statement_timeout?: false | number | undefined, ssl?: boolean | ConnectionOptions | undefined, query_timeout?: number | undefined, keepAliveInitialDelayMillis?: number | undefined, idle_in_transaction_session_timeout?: number | undefined, application_name?: string | undefined, connectionTimeoutMillis?: number | undefined, types?: CustomTypesConfig | undefined, options?: string | undefined): Promise<void>;
136
-
137
106
  declare const CLogLevel: {
138
107
  readonly debug: "DEBUG";
139
108
  readonly info: "INFO";
@@ -141,27 +110,6 @@ declare const CLogLevel: {
141
110
  readonly error: "ERROR";
142
111
  };
143
112
 
144
- /** --------------------------------------------------------------------------------------------------------------------------------
145
- * Arguments: A connection URL can also take arguments. Here is the same example from above with placeholder
146
- * values in uppercase letters for three arguments: mysql://USER:PASSWORD@HOST:PORT/DATABASE?KEY1=VALUE&KEY2=VALUE&KEY3=VALUE
147
- *
148
- * The following arguments can be used:
149
- * connection_limit: Maximum size of the connection pool,
150
- * connect_timeout: Maximum number of seconds to wait for a new connection to be opened, 0 means no timeout,
151
- * pool_timeout: Maximum number of seconds to wait for a new connection from the pool, 0 means no timeout,
152
- * sslcert: Path to the server certificate. Certificate paths are resolved relative to the ./prisma folder,
153
- * sslidentity: Path to the PKCS12 certificate,
154
- * sslpassword: Password that was used to secure the PKCS12 file,
155
- * sslaccept: Configures whether to check for missing values in the certificate. Possible values: accept_invalid_certs, strict,
156
- * socket: Points to a directory that contains a socket to be used for the connection,
157
- * socket_timeout: Number of seconds to wait until a single query terminates
158
- *
159
- * So if you want to use argument: write it like this "?sslidentity=client-identity.p12&sslpassword=mypassword&sslcert=rootca.cert"
160
- *
161
- * ---------------------------------------------------------------------------------------------------------------------------------
162
- */
163
- declare const UOptionalArgumentConnection: (environnementPath: any) => string;
164
-
165
113
  /**
166
114
  * This class contains methods that allow to decrypt data using public and private keys.
167
115
  */
@@ -182,7 +130,7 @@ declare class RSAKeyEncryption {
182
130
  declare class YamlParsing {
183
131
  private readonly logger;
184
132
  private readonly localeLanguage;
185
- constructor(localeLanguage: string, environnementPath: any);
133
+ constructor(localeLanguage: string, environmentPath: any);
186
134
  absolutPath(): string;
187
135
  readFile(filePath: string): Promise<void>;
188
136
  /**
@@ -204,12 +152,6 @@ declare class Environment<T> {
204
152
  get<K extends keyof T>(key: K): T[K];
205
153
  }
206
154
 
207
- declare const MMongoCheckerDatabase: (optionalArgumentConnection: string | any, localLanguage: string, environnementPath: any) => Promise<void>;
208
-
209
- declare const MMySqlCheckerDatabase: (optionalArgumentConnection: string | any, localLanguage: string, environnementPath: any) => void;
210
-
211
- declare const MPostgresCheckerDatabase: (localLanguage: string, environnementPath: any, keepAlive?: boolean | undefined, stream?: (() => (stream.Duplex | undefined)) | undefined, statement_timeout?: false | number | undefined, ssl?: boolean | ConnectionOptions | undefined, query_timeout?: number | undefined, keepAliveInitialDelayMillis?: number | undefined, idle_in_transaction_session_timeout?: number | undefined, application_name?: string | undefined, connectionTimeoutMillis?: number | undefined, types?: CustomTypesConfig | undefined, options?: string | undefined) => Promise<void>;
212
-
213
155
  /**
214
156
  *
215
157
  * @param envDir
@@ -471,4 +413,4 @@ declare function TTextBodyParser(options: IBodyParserOptions, localLanguage: str
471
413
  */
472
414
  declare function TUrlencodedBodyParser(options: IBodyParserOptions, localLanguage: string, environnementPath: any): void;
473
415
 
474
- export { CLogLevel, CSignRSAKeyComponent, Environment, type IBodyParserOptions, type IResponseBodyEndFromResponseEvent, type IResponseBodyWriteFromResponseEvent, type IWrappingBodyResponse, LocalLanguageLoader, MMongoCheckerDatabase, MMySqlCheckerDatabase, MPostgresCheckerDatabase, PathModuleVerifier, RSAKeyDecryption, RSAKeyEncryption, SAsymmetricCryptionDataWithPrivateRSAKey, SAsymmetricCryptionDataWithPublicRSAKey, SCheckerMongoDatabaseConnection, SCheckerMySqlDatabaseConnection, SCheckerPostgresDatabaseConnection, TJSONBodyParser, type TLogLevel, type TOriginalWriteEncoding, type TParseFunction, TRawBodyParser, TTextBodyParser, TUrlencodedBodyParser, UOptionalArgumentConnection, Utility, YamlParsing, dateTimeFormatted, loggerConfig };
416
+ export { CLogLevel, CSignRSAKeyComponent, Environment, type IBodyParserOptions, type IResponseBodyEndFromResponseEvent, type IResponseBodyWriteFromResponseEvent, type IWrappingBodyResponse, LocalLanguageLoader, PathModuleVerifier, RSAKeyDecryption, RSAKeyEncryption, SAsymmetricCryptionDataWithPrivateRSAKey, SAsymmetricCryptionDataWithPublicRSAKey, TJSONBodyParser, type TLogLevel, type TOriginalWriteEncoding, type TParseFunction, TRawBodyParser, TTextBodyParser, TUrlencodedBodyParser, Utility, YamlParsing, dateTimeFormatted, loggerConfig };