@aristid/leav-types 1.2.1-9b5b2ec3 → 1.3.0-e0b1f72c
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/apps/core/config/default.d.ts +1 -1
- package/apps/core/src/app/core/coreApp.d.ts +2 -3
- package/apps/core/src/app/core/importApp.d.ts +2 -7
- package/apps/core/src/domain/helpers/createDirectory.d.ts +1 -3
- package/apps/core/src/infra/db/dbUtils.d.ts +1 -1
- package/apps/core/src/utils/utils.d.ts +1 -0
- package/libs/logger/src/config.d.ts +18 -0
- package/libs/logger/src/index.d.ts +2 -0
- package/libs/logger/src/logger.d.ts +5 -0
- package/package.json +2 -2
|
@@ -70,7 +70,7 @@ export declare namespace mailer {
|
|
|
70
70
|
export { auth_1 as auth };
|
|
71
71
|
}
|
|
72
72
|
export declare namespace bugsnag {
|
|
73
|
-
let enable_1:
|
|
73
|
+
let enable_1: boolean;
|
|
74
74
|
export { enable_1 as enable };
|
|
75
75
|
export let apiKey: string;
|
|
76
76
|
export let appVersion: string;
|
|
@@ -5,7 +5,7 @@ import { type GraphQLScalarType } from 'graphql';
|
|
|
5
5
|
import { type i18n } from 'i18next';
|
|
6
6
|
import { type IAppModule } from '_types/shared';
|
|
7
7
|
import { type ISystemTranslation } from '_types/systemTranslation';
|
|
8
|
-
import { type IGraphqlAppModule
|
|
8
|
+
import { type IGraphqlAppModule } from '../graphql/graphqlApp';
|
|
9
9
|
export interface ICoreApp extends IAppModule, IGraphqlAppModule {
|
|
10
10
|
filterSysTranslationField(fieldData: ISystemTranslation, requestedLangs: string[]): ISystemTranslation | null;
|
|
11
11
|
initPubSubEventsConsumer(): Promise<void>;
|
|
@@ -13,11 +13,10 @@ export interface ICoreApp extends IAppModule, IGraphqlAppModule {
|
|
|
13
13
|
export interface ICoreAppDeps {
|
|
14
14
|
'core.domain.core': ICoreDomain;
|
|
15
15
|
'core.domain.eventsManager': IEventsManagerDomain;
|
|
16
|
-
'core.app.graphql': IGraphqlApp;
|
|
17
16
|
'core.app.graphql.customScalars.systemTranslation': ISystemTranslationGenerator;
|
|
18
17
|
'core.app.graphql.customScalars.dateTime': GraphQLScalarType;
|
|
19
18
|
'core.app.graphql.customScalars.any': GraphQLScalarType;
|
|
20
19
|
config: any;
|
|
21
20
|
translator: i18n;
|
|
22
21
|
}
|
|
23
|
-
export default function ({ 'core.domain.core': coreDomain, 'core.domain.eventsManager': eventsManagerDomain, 'core.app.graphql
|
|
22
|
+
export default function ({ 'core.domain.core': coreDomain, 'core.domain.eventsManager': eventsManagerDomain, 'core.app.graphql.customScalars.systemTranslation': systemTranslation, 'core.app.graphql.customScalars.dateTime': DateTime, 'core.app.graphql.customScalars.any': Any, config, translator }: ICoreAppDeps): ICoreApp;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { type AwilixContainer } from 'awilix';
|
|
2
1
|
import { type StoreUploadFileFunc } from 'domain/helpers/storeUploadFile';
|
|
3
2
|
import { type IImportDomain } from 'domain/import/importDomain';
|
|
4
|
-
import { type IDbUtils } from 'infra/db/dbUtils';
|
|
5
3
|
import { type IUtils } from 'utils/utils';
|
|
6
4
|
import type * as Config from '_types/config';
|
|
7
|
-
import { type IGraphqlAppModule
|
|
5
|
+
import { type IGraphqlAppModule } from '../graphql/graphqlApp';
|
|
8
6
|
export interface ICoreImportApp extends IGraphqlAppModule {
|
|
9
7
|
importConfig(filepath: string, clear: boolean): Promise<void>;
|
|
10
8
|
importData(filepath: string): Promise<void>;
|
|
@@ -12,11 +10,8 @@ export interface ICoreImportApp extends IGraphqlAppModule {
|
|
|
12
10
|
interface IDeps {
|
|
13
11
|
'core.domain.import': IImportDomain;
|
|
14
12
|
'core.domain.helpers.storeUploadFile': StoreUploadFileFunc;
|
|
15
|
-
'core.infra.db.dbUtils': IDbUtils;
|
|
16
13
|
'core.utils': IUtils;
|
|
17
|
-
'core.depsManager': AwilixContainer;
|
|
18
|
-
'core.app.graphql': IGraphqlApp;
|
|
19
14
|
config: Config.IConfig;
|
|
20
15
|
}
|
|
21
|
-
export default function ({ 'core.domain.import': importDomain, 'core.domain.helpers.storeUploadFile': storeUploadFile, 'core.utils': utils,
|
|
16
|
+
export default function ({ 'core.domain.import': importDomain, 'core.domain.helpers.storeUploadFile': storeUploadFile, 'core.utils': utils, config }: IDeps): ICoreImportApp;
|
|
22
17
|
export {};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import type * as Config from '_types/config';
|
|
2
1
|
import { type IUtils } from 'utils/utils';
|
|
3
2
|
import { type IQueryInfos } from '_types/queryInfos';
|
|
4
3
|
export type CreateDirectoryFunc = (name: string, path: string, ctx: IQueryInfos) => Promise<void>;
|
|
5
4
|
interface IDeps {
|
|
6
|
-
config: Config.IConfig;
|
|
7
5
|
'core.utils': IUtils;
|
|
8
6
|
}
|
|
9
|
-
export default function ({
|
|
7
|
+
export default function ({ 'core.utils': utils }: IDeps): (name: string, path: string, ctx: IQueryInfos) => Promise<void>;
|
|
10
8
|
export {};
|
|
@@ -5,7 +5,7 @@ import { type IConfig } from '_types/config';
|
|
|
5
5
|
import { type IList, type IPaginationParams, type ISortParams } from '_types/list';
|
|
6
6
|
import { type IQueryInfos } from '_types/queryInfos';
|
|
7
7
|
import { type IKeyValue } from '_types/shared';
|
|
8
|
-
import { type ICachesService } from '
|
|
8
|
+
import { type ICachesService } from '../cache/cacheService';
|
|
9
9
|
import { type IDbService } from './dbService';
|
|
10
10
|
export declare const MIGRATIONS_COLLECTION_NAME = "core_db_migrations";
|
|
11
11
|
export type CustomFilterConditionsFunc = (filterKey: string, filterVal: string | boolean | string[], strictFilters: boolean) => GeneratedAqlQuery;
|
|
@@ -82,6 +82,7 @@ export interface IUtils {
|
|
|
82
82
|
getGlobalSettingsCacheKey(): string;
|
|
83
83
|
generateExplicitValidationError<T>(field: keyof T, message: ErrorFieldDetailMessage, lang?: string): ValidationError<T>;
|
|
84
84
|
deleteFile(path: string): Promise<void>;
|
|
85
|
+
fileExists(path: string): Promise<boolean>;
|
|
85
86
|
getUnixTime(): number;
|
|
86
87
|
getFileExtension(filename: string): string | null;
|
|
87
88
|
getProcessIdentifier(): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ILoggerConfig {
|
|
2
|
+
/**
|
|
3
|
+
* Log level (error, warn, info, log, verbose, debug, silly)
|
|
4
|
+
* @default info
|
|
5
|
+
*/
|
|
6
|
+
level: string;
|
|
7
|
+
/**
|
|
8
|
+
* If transport is file, destination file path
|
|
9
|
+
*/
|
|
10
|
+
destinationFile?: string;
|
|
11
|
+
/**
|
|
12
|
+
* If true, use json format for logging, both in console and file
|
|
13
|
+
* Default: false (plain text)
|
|
14
|
+
*/
|
|
15
|
+
useJsonFormat?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function envToBool(value: string, defaultValue?: boolean): boolean;
|
|
18
|
+
export declare const loggerConfig: ILoggerConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as winston from 'winston';
|
|
2
|
+
import { type ILoggerConfig } from './config';
|
|
3
|
+
export type ILogger = Pick<typeof winston, 'error' | 'warn' | 'info' | 'log' | 'verbose' | 'debug' | 'silly'>;
|
|
4
|
+
export declare function configureLogger(config: ILoggerConfig): void;
|
|
5
|
+
export declare const logger: ILogger;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aristid/leav-types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0-e0b1f72c",
|
|
4
4
|
"description": "Shared Leav types",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"tscheck": "",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"license": "LGPL3",
|
|
15
15
|
"repository": "https://github.com/leav-solutions/leav-engine",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@leav/utils": "1.
|
|
17
|
+
"@leav/utils": "1.3.0",
|
|
18
18
|
"@types/amqplib": "0.10.7",
|
|
19
19
|
"@types/express": "5.0.0",
|
|
20
20
|
"@types/jest": "29.5.14",
|