@elsikora/nestjs-crud-config 2.0.0 → 2.0.1
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/cjs/index.d.ts +2 -2
- package/dist/cjs/modules/config/config.module.d.ts +2 -2
- package/dist/cjs/modules/config/config.service.d.ts +8 -8
- package/dist/cjs/modules/config/data/controller.d.ts +4 -4
- package/dist/cjs/modules/config/data/entity/entity.d.ts +3 -3
- package/dist/cjs/modules/config/data/entity/index.d.ts +1 -1
- package/dist/cjs/modules/config/data/event/before-insert.event.d.ts +2 -2
- package/dist/cjs/modules/config/data/event/index.d.ts +1 -1
- package/dist/cjs/modules/config/data/index.d.ts +6 -6
- package/dist/cjs/modules/config/data/interface/index.d.ts +1 -1
- package/dist/cjs/modules/config/data/interface/interface.d.ts +2 -2
- package/dist/cjs/modules/config/data/listener/before-insert.listener.d.ts +3 -3
- package/dist/cjs/modules/config/data/listener/index.d.ts +1 -1
- package/dist/cjs/modules/config/data/subscriber/before-insert.subscriber.d.ts +4 -5
- package/dist/cjs/modules/config/data/subscriber/index.d.ts +1 -1
- package/dist/cjs/modules/config/index.d.ts +7 -7
- package/dist/cjs/modules/config/interface/delete-options.interface.d.ts +1 -1
- package/dist/cjs/modules/config/interface/get-list-options.interface.d.ts +1 -1
- package/dist/cjs/modules/config/interface/get-options.interface.d.ts +1 -1
- package/dist/cjs/modules/config/interface/index.d.ts +4 -4
- package/dist/cjs/modules/config/interface/set-options.interface.d.ts +1 -1
- package/dist/cjs/modules/config/migration/entity/entity.d.ts +2 -2
- package/dist/cjs/modules/config/migration/entity/index.d.ts +1 -1
- package/dist/cjs/modules/config/migration/enum/index.d.ts +1 -1
- package/dist/cjs/modules/config/migration/index.d.ts +5 -5
- package/dist/cjs/modules/config/migration/interface/index.d.ts +3 -3
- package/dist/cjs/modules/config/migration/interface/interface.d.ts +2 -2
- package/dist/cjs/modules/config/migration/interface/migration-definition.interface.d.ts +2 -2
- package/dist/cjs/modules/config/migration/interface/migration-options.interface.d.ts +1 -1
- package/dist/cjs/modules/config/migration/migration-runner.service.d.ts +3 -3
- package/dist/cjs/modules/config/migration/migration.service.d.ts +6 -6
- package/dist/cjs/modules/config/section/controller.d.ts +4 -4
- package/dist/cjs/modules/config/section/entity/entity.d.ts +2 -2
- package/dist/cjs/modules/config/section/entity/index.d.ts +1 -1
- package/dist/cjs/modules/config/section/index.d.ts +2 -2
- package/dist/cjs/modules/config/section/interface/index.d.ts +1 -1
- package/dist/cjs/modules/config/section/interface/interface.d.ts +1 -1
- package/dist/cjs/modules/config/type/index.d.ts +2 -2
- package/dist/cjs/modules/config/type/type.d.ts +1 -1
- package/dist/cjs/modules/index.d.ts +1 -1
- package/dist/cjs/shared/constant/config/index.d.ts +3 -3
- package/dist/cjs/shared/constant/index.d.ts +4 -4
- package/dist/cjs/shared/enum/index.d.ts +3 -3
- package/dist/cjs/shared/index.d.ts +5 -5
- package/dist/cjs/shared/interface/config/async-module-properties.interface.d.ts +4 -4
- package/dist/cjs/shared/interface/config/controller-options.interface.d.ts +3 -3
- package/dist/cjs/shared/interface/config/entity/index.d.ts +3 -3
- package/dist/cjs/shared/interface/config/entity/options.interface.d.ts +1 -1
- package/dist/cjs/shared/interface/config/index.d.ts +8 -8
- package/dist/cjs/shared/interface/config/options.interface.d.ts +5 -5
- package/dist/cjs/shared/interface/config/properties-factory.interface.d.ts +1 -1
- package/dist/cjs/shared/interface/config/static-options.interface.d.ts +2 -2
- package/dist/cjs/shared/interface/index.d.ts +2 -2
- package/dist/cjs/shared/interface/utility/create-dynamic-entity/index.d.ts +2 -2
- package/dist/cjs/shared/interface/utility/create-dynamic-entity/options.interface.d.ts +2 -2
- package/dist/cjs/shared/interface/utility/create-dynamic-entity/relation-options.interface.d.ts +2 -2
- package/dist/cjs/shared/interface/utility/index.d.ts +1 -1
- package/dist/cjs/shared/type/dynamic-entity.type.d.ts +1 -1
- package/dist/cjs/shared/type/index.d.ts +1 -1
- package/dist/cjs/shared/utility/create-dynamic/entity.utility.d.ts +3 -3
- package/dist/cjs/shared/utility/create-dynamic/index.d.ts +2 -2
- package/dist/cjs/shared/utility/create-dynamic/service.utility.d.ts +2 -2
- package/dist/cjs/shared/utility/index.d.ts +4 -4
- package/dist/cjs/shared/utility/logger.utility.d.ts +1 -2
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/modules/config/config.module.d.ts +2 -2
- package/dist/esm/modules/config/config.service.d.ts +8 -8
- package/dist/esm/modules/config/data/controller.d.ts +4 -4
- package/dist/esm/modules/config/data/entity/entity.d.ts +3 -3
- package/dist/esm/modules/config/data/entity/index.d.ts +1 -1
- package/dist/esm/modules/config/data/event/before-insert.event.d.ts +2 -2
- package/dist/esm/modules/config/data/event/index.d.ts +1 -1
- package/dist/esm/modules/config/data/index.d.ts +6 -6
- package/dist/esm/modules/config/data/interface/index.d.ts +1 -1
- package/dist/esm/modules/config/data/interface/interface.d.ts +2 -2
- package/dist/esm/modules/config/data/listener/before-insert.listener.d.ts +3 -3
- package/dist/esm/modules/config/data/listener/index.d.ts +1 -1
- package/dist/esm/modules/config/data/subscriber/before-insert.subscriber.d.ts +4 -5
- package/dist/esm/modules/config/data/subscriber/index.d.ts +1 -1
- package/dist/esm/modules/config/index.d.ts +7 -7
- package/dist/esm/modules/config/interface/delete-options.interface.d.ts +1 -1
- package/dist/esm/modules/config/interface/get-list-options.interface.d.ts +1 -1
- package/dist/esm/modules/config/interface/get-options.interface.d.ts +1 -1
- package/dist/esm/modules/config/interface/index.d.ts +4 -4
- package/dist/esm/modules/config/interface/set-options.interface.d.ts +1 -1
- package/dist/esm/modules/config/migration/entity/entity.d.ts +2 -2
- package/dist/esm/modules/config/migration/entity/index.d.ts +1 -1
- package/dist/esm/modules/config/migration/enum/index.d.ts +1 -1
- package/dist/esm/modules/config/migration/index.d.ts +5 -5
- package/dist/esm/modules/config/migration/interface/index.d.ts +3 -3
- package/dist/esm/modules/config/migration/interface/interface.d.ts +2 -2
- package/dist/esm/modules/config/migration/interface/migration-definition.interface.d.ts +2 -2
- package/dist/esm/modules/config/migration/interface/migration-options.interface.d.ts +1 -1
- package/dist/esm/modules/config/migration/migration-runner.service.d.ts +3 -3
- package/dist/esm/modules/config/migration/migration.service.d.ts +6 -6
- package/dist/esm/modules/config/section/controller.d.ts +4 -4
- package/dist/esm/modules/config/section/entity/entity.d.ts +2 -2
- package/dist/esm/modules/config/section/entity/index.d.ts +1 -1
- package/dist/esm/modules/config/section/index.d.ts +2 -2
- package/dist/esm/modules/config/section/interface/index.d.ts +1 -1
- package/dist/esm/modules/config/section/interface/interface.d.ts +1 -1
- package/dist/esm/modules/config/type/index.d.ts +2 -2
- package/dist/esm/modules/config/type/type.d.ts +1 -1
- package/dist/esm/modules/index.d.ts +1 -1
- package/dist/esm/shared/constant/config/index.d.ts +3 -3
- package/dist/esm/shared/constant/index.d.ts +4 -4
- package/dist/esm/shared/enum/index.d.ts +3 -3
- package/dist/esm/shared/index.d.ts +5 -5
- package/dist/esm/shared/interface/config/async-module-properties.interface.d.ts +4 -4
- package/dist/esm/shared/interface/config/controller-options.interface.d.ts +3 -3
- package/dist/esm/shared/interface/config/entity/index.d.ts +3 -3
- package/dist/esm/shared/interface/config/entity/options.interface.d.ts +1 -1
- package/dist/esm/shared/interface/config/index.d.ts +8 -8
- package/dist/esm/shared/interface/config/options.interface.d.ts +5 -5
- package/dist/esm/shared/interface/config/properties-factory.interface.d.ts +1 -1
- package/dist/esm/shared/interface/config/static-options.interface.d.ts +2 -2
- package/dist/esm/shared/interface/index.d.ts +2 -2
- package/dist/esm/shared/interface/utility/create-dynamic-entity/index.d.ts +2 -2
- package/dist/esm/shared/interface/utility/create-dynamic-entity/options.interface.d.ts +2 -2
- package/dist/esm/shared/interface/utility/create-dynamic-entity/relation-options.interface.d.ts +2 -2
- package/dist/esm/shared/interface/utility/index.d.ts +1 -1
- package/dist/esm/shared/type/dynamic-entity.type.d.ts +1 -1
- package/dist/esm/shared/type/index.d.ts +1 -1
- package/dist/esm/shared/utility/create-dynamic/entity.utility.d.ts +3 -3
- package/dist/esm/shared/utility/create-dynamic/index.d.ts +2 -2
- package/dist/esm/shared/utility/create-dynamic/service.utility.d.ts +2 -2
- package/dist/esm/shared/utility/index.d.ts +4 -4
- package/dist/esm/shared/utility/logger.utility.d.ts +1 -2
- package/package.json +2 -2
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { DynamicModule } from
|
|
1
|
+
import { IConfigOptions, ICrudConfigAsyncModuleProperties } from '../../shared/interface/config';
|
|
2
|
+
import { DynamicModule } from '@nestjs/common';
|
|
3
3
|
export declare class CrudConfigModule {
|
|
4
4
|
static register(options: IConfigOptions): DynamicModule;
|
|
5
5
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { ApiServiceBase } from
|
|
6
|
-
import { CryptoUtility } from '../../
|
|
7
|
-
import { DataSource } from
|
|
8
|
-
import { IConfigDeleteOptions, IConfigGetListOptions, IConfigGetOptions, IConfigSetOptions } from
|
|
1
|
+
import { IConfigData } from './data';
|
|
2
|
+
import { IConfigSection } from './section';
|
|
3
|
+
import { IConfigOptions } from '../../shared/interface/config';
|
|
4
|
+
import { Cache } from 'cache-manager';
|
|
5
|
+
import { ApiServiceBase } from '@elsikora/nestjs-crud-automator';
|
|
6
|
+
import { CryptoUtility } from '../../shared/utility';
|
|
7
|
+
import { DataSource } from 'typeorm';
|
|
8
|
+
import { IConfigDeleteOptions, IConfigGetListOptions, IConfigGetOptions, IConfigSetOptions } from './interface';
|
|
9
9
|
/**
|
|
10
10
|
* Service for managing configuration data with caching support
|
|
11
11
|
* Provides methods to retrieve configuration values with optional decryption
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Type } from
|
|
3
|
-
import { IConfigControllerOptions } from '../../../
|
|
4
|
-
import { TDynamicEntity } from '../../../
|
|
1
|
+
import { IConfigData } from '.';
|
|
2
|
+
import { Type } from '@nestjs/common/interfaces';
|
|
3
|
+
import { IConfigControllerOptions } from '../../../shared/interface/config';
|
|
4
|
+
import { TDynamicEntity } from '../../../shared/type';
|
|
5
5
|
/**
|
|
6
6
|
* Factory to create dynamic ConfigData controller with the correct entity
|
|
7
7
|
* @param {TDynamicEntity} entity The entity type to create controller for
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { IConfigSection } from '../../section';
|
|
2
|
+
import { TDynamicEntity } from '../../../../shared/type';
|
|
3
|
+
import { IConfigData } from '../interface';
|
|
4
4
|
/**
|
|
5
5
|
* Creates a dynamic ConfigData entity with TypeORM decorators
|
|
6
6
|
* @param {object} options - Configuration options for the entity
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createConfigDataEntity } from
|
|
1
|
+
export { createConfigDataEntity } from './entity';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { IConfigData } from '..';
|
|
2
|
+
import { EntityManager } from '../../../../../node_modules/typeorm/entity-manager/EntityManager';
|
|
3
3
|
/**
|
|
4
4
|
* Event class for ConfigData beforeInsert event
|
|
5
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ConfigDataEventBeforeInsert } from
|
|
1
|
+
export { ConfigDataEventBeforeInsert } from './before-insert.event';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export type * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
1
|
+
export * from './controller';
|
|
2
|
+
export * from './entity';
|
|
3
|
+
export * from './event';
|
|
4
|
+
export type * from './interface';
|
|
5
|
+
export * from './listener';
|
|
6
|
+
export * from './subscriber';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { IConfigData } from
|
|
1
|
+
export type { IConfigData } from './interface';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { IApiBaseEntity } from '@elsikora/nestjs-crud-automator';
|
|
2
|
+
import { IConfigSection } from '../../section';
|
|
3
3
|
export interface IConfigData extends IApiBaseEntity {
|
|
4
4
|
createdAt: Date;
|
|
5
5
|
description: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApiServiceBase } from
|
|
2
|
-
import { IConfigData } from '
|
|
3
|
-
import { ConfigDataEventBeforeInsert } from '
|
|
1
|
+
import { ApiServiceBase } from '@elsikora/nestjs-crud-automator';
|
|
2
|
+
import { IConfigData } from '..';
|
|
3
|
+
import { ConfigDataEventBeforeInsert } from '../event';
|
|
4
4
|
/**
|
|
5
5
|
* Event listener for ConfigData beforeInsert events
|
|
6
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ConfigDataBeforeInsertListener } from
|
|
1
|
+
export { ConfigDataBeforeInsertListener } from './before-insert.listener';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { EventEmitter2 } from
|
|
5
|
-
import { DataSource } from "typeorm";
|
|
1
|
+
import { IConfigData } from '..';
|
|
2
|
+
import { TDynamicEntity } from '../../../../shared/type';
|
|
3
|
+
import { EntitySubscriberInterface, InsertEvent, DataSource } from 'typeorm';
|
|
4
|
+
import { EventEmitter2 } from '@nestjs/event-emitter';
|
|
6
5
|
/**
|
|
7
6
|
* TypeORM subscriber for ConfigData beforeInsert event
|
|
8
7
|
* Note: Works with dynamically generated entities
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ConfigDataBeforeInsertSubscriber } from
|
|
1
|
+
export { ConfigDataBeforeInsertSubscriber } from './before-insert.subscriber';
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* CRUD Configuration Module for NestJS.
|
|
3
3
|
* Exports the module, service, and related interfaces.
|
|
4
4
|
*/
|
|
5
|
-
export { CrudConfigModule } from
|
|
6
|
-
export { CrudConfigService } from
|
|
7
|
-
export * from
|
|
8
|
-
export type * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export type * from
|
|
5
|
+
export { CrudConfigModule } from './config.module';
|
|
6
|
+
export { CrudConfigService } from './config.service';
|
|
7
|
+
export * from './data';
|
|
8
|
+
export type * from './interface';
|
|
9
|
+
export * from './migration';
|
|
10
|
+
export * from './section';
|
|
11
|
+
export type * from './type';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { EntityManager } from '../../../../node_modules/typeorm/entity-manager/EntityManager';
|
|
2
2
|
/**
|
|
3
3
|
* Context options for configuration retrieval
|
|
4
4
|
* @see {@link https://elsikora.com/docs/nestjs-crud-config/api-reference/interfaces/crud-config-delete-options | API Reference - IConfigDeleteOptions}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { EntityManager } from '../../../../node_modules/typeorm/entity-manager/EntityManager';
|
|
2
2
|
/**
|
|
3
3
|
* Context options for configuration retrieval
|
|
4
4
|
* @see {@link https://elsikora.com/docs/nestjs-crud-config/api-reference/interfaces/crud-config-get-list-options | API Reference - IConfigGetListOptions}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { EntityManager } from '../../../../node_modules/typeorm/entity-manager/EntityManager';
|
|
2
2
|
/**
|
|
3
3
|
* Context options for configuration retrieval
|
|
4
4
|
* @see {@link https://elsikora.com/docs/nestjs-crud-config/api-reference/interfaces/crud-config-get-options | API Reference - IConfigGetOptions}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { type IConfigDeleteOptions } from
|
|
2
|
-
export { type IConfigGetListOptions } from
|
|
3
|
-
export { type IConfigGetOptions } from
|
|
4
|
-
export { type IConfigSetOptions } from
|
|
1
|
+
export { type IConfigDeleteOptions } from './delete-options.interface';
|
|
2
|
+
export { type IConfigGetListOptions } from './get-list-options.interface';
|
|
3
|
+
export { type IConfigGetOptions } from './get-options.interface';
|
|
4
|
+
export { type IConfigSetOptions } from './set-options.interface';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { EntityManager } from '../../../../node_modules/typeorm/entity-manager/EntityManager';
|
|
2
2
|
/**
|
|
3
3
|
* Context options for configuration setting
|
|
4
4
|
* @see {@link https://elsikora.com/docs/nestjs-crud-config/api-reference/interfaces/crud-config-set-options | API Reference - IConfigSetOptions}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { TDynamicEntity } from '../../../../shared/type';
|
|
2
|
+
import { IConfigMigration } from '../interface';
|
|
3
3
|
/**
|
|
4
4
|
* Creates a dynamic ConfigMigration entity with TypeORM decorators
|
|
5
5
|
* @param {object} options - Configuration options for the entity
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createConfigMigrationEntity } from
|
|
1
|
+
export { createConfigMigrationEntity } from './entity';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { EConfigMigrationStatus } from
|
|
1
|
+
export { EConfigMigrationStatus } from './status';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export type * from
|
|
4
|
-
export { ConfigMigrationRunnerService } from
|
|
5
|
-
export { ConfigMigrationService } from
|
|
1
|
+
export * from './entity';
|
|
2
|
+
export * from './enum';
|
|
3
|
+
export type * from './interface';
|
|
4
|
+
export { ConfigMigrationRunnerService } from './migration-runner.service';
|
|
5
|
+
export { ConfigMigrationService } from './migration.service';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { IConfigMigration } from
|
|
2
|
-
export type { IConfigMigrationDefinition } from
|
|
3
|
-
export type { IConfigMigrationOptions } from
|
|
1
|
+
export type { IConfigMigration } from './interface';
|
|
2
|
+
export type { IConfigMigrationDefinition } from './migration-definition.interface';
|
|
3
|
+
export type { IConfigMigrationOptions } from './migration-options.interface';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { IApiBaseEntity } from '@elsikora/nestjs-crud-automator';
|
|
2
|
+
import { EConfigMigrationStatus } from '../enum';
|
|
3
3
|
export interface IConfigMigration extends IApiBaseEntity {
|
|
4
4
|
createdAt: Date;
|
|
5
5
|
executedAt?: Date;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { CrudConfigService } from '../../config.service';
|
|
2
|
+
import { EntityManager } from 'typeorm';
|
|
3
3
|
/**
|
|
4
4
|
* Interface for defining a migration
|
|
5
5
|
* @see {@link https://elsikora.com/docs/nestjs-crud-config/migration-system/definitions | Migration System - Definitions}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { IConfigMigrationDefinition } from './migration-definition.interface';
|
|
2
2
|
/**
|
|
3
3
|
* Interface for migration configuration options
|
|
4
4
|
* @see {@link https://elsikora.com/docs/nestjs-crud-config/migration-system | Migration System}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { OnApplicationBootstrap } from
|
|
3
|
-
import { ConfigMigrationService } from
|
|
1
|
+
import { IConfigOptions } from '../../../shared/interface/config';
|
|
2
|
+
import { OnApplicationBootstrap } from '@nestjs/common';
|
|
3
|
+
import { ConfigMigrationService } from './migration.service';
|
|
4
4
|
/**
|
|
5
5
|
* Service that runs migrations on application startup
|
|
6
6
|
* @see {@link https://elsikora.com/docs/nestjs-crud-config/migration-system | Migration System}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { CrudConfigService } from '
|
|
5
|
-
import {
|
|
6
|
-
import { DataSource } from
|
|
1
|
+
import { ApiServiceBase } from '@elsikora/nestjs-crud-automator';
|
|
2
|
+
import { IConfigOptions } from '../../../shared/interface/config';
|
|
3
|
+
import { IConfigMigration, IConfigMigrationDefinition } from './interface';
|
|
4
|
+
import { CrudConfigService } from '../config.service';
|
|
5
|
+
import { OnModuleInit } from '@nestjs/common';
|
|
6
|
+
import { DataSource } from 'typeorm';
|
|
7
7
|
/**
|
|
8
8
|
* Service responsible for coordinating and tracking execution of migrations.
|
|
9
9
|
* @see {@link https://elsikora.com/docs/nestjs-crud-config/migration-system | Migration System}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Type } from
|
|
3
|
-
import { IConfigControllerOptions } from '../../../
|
|
4
|
-
import { TDynamicEntity } from '../../../
|
|
1
|
+
import { IConfigSection } from '.';
|
|
2
|
+
import { Type } from '@nestjs/common/interfaces';
|
|
3
|
+
import { IConfigControllerOptions } from '../../../shared/interface/config';
|
|
4
|
+
import { TDynamicEntity } from '../../../shared/type';
|
|
5
5
|
/**
|
|
6
6
|
* Factory to create dynamic ConfigSection controller with the correct entity
|
|
7
7
|
* @param {TDynamicEntity} entity The entity type to create controller for
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { TDynamicEntity } from '../../../../shared/type';
|
|
2
|
+
import { IConfigSection } from '../interface';
|
|
3
3
|
/**
|
|
4
4
|
* Creates a dynamic ConfigSection entity with TypeORM decorators
|
|
5
5
|
* @param {object} options - Configuration options for the entity
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createConfigSectionEntity } from
|
|
1
|
+
export { createConfigSectionEntity } from './entity';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export type * from
|
|
1
|
+
export * from './entity';
|
|
2
|
+
export type * from './interface';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { IConfigSection } from
|
|
1
|
+
export type { IConfigSection } from './interface';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { type TConfigItem } from
|
|
2
|
-
export { type TConfig } from
|
|
1
|
+
export { type TConfigItem } from './item.type';
|
|
2
|
+
export { type TConfig } from './type';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { TConfigItem } from './item.type';
|
|
2
2
|
export type TConfig = Record<string, TConfigItem>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './config';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { CONFIG_DATA_CONSTANT } from
|
|
2
|
-
export { CONFIG_MIGRATION_CONSTANT } from
|
|
3
|
-
export { CONFIG_SECTION_CONSTANT } from
|
|
1
|
+
export { CONFIG_DATA_CONSTANT } from './data.constant';
|
|
2
|
+
export { CONFIG_MIGRATION_CONSTANT } from './migration.constant';
|
|
3
|
+
export { CONFIG_SECTION_CONSTANT } from './section.constant';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { API_PROPERTY_CONSTANT } from
|
|
2
|
-
export * from
|
|
3
|
-
export { CRYPTO_CONSTANT } from
|
|
4
|
-
export { TOKEN_CONSTANT } from
|
|
1
|
+
export { API_PROPERTY_CONSTANT } from './api-property.constant';
|
|
2
|
+
export * from './config';
|
|
3
|
+
export { CRYPTO_CONSTANT } from './crypto.constant';
|
|
4
|
+
export { TOKEN_CONSTANT } from './token.constant';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Enums used throughout the Parameter Store configuration module.
|
|
3
3
|
*/
|
|
4
|
-
export { EEnvironment } from
|
|
5
|
-
export { EInstanceName } from
|
|
6
|
-
export { EService } from
|
|
4
|
+
export { EEnvironment } from './environment.enum';
|
|
5
|
+
export { EInstanceName } from './instance-name.enum';
|
|
6
|
+
export { EService } from './service.enum';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export type * from
|
|
4
|
-
export type * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from './constant';
|
|
2
|
+
export * from './enum';
|
|
3
|
+
export type * from './interface';
|
|
4
|
+
export type * from './type';
|
|
5
|
+
export * from './utility';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { ModuleMetadata, Type } from '@nestjs/common/interfaces';
|
|
2
|
+
import { IConfigOptions } from './options.interface';
|
|
3
|
+
import { IConfigPropertiesFactory } from './properties-factory.interface';
|
|
4
|
+
import { IConfigStaticOptions } from './static-options.interface';
|
|
5
5
|
/**
|
|
6
6
|
* Interface for asynchronous module configuration properties.
|
|
7
7
|
* Provides different options for asynchronously configuring the Crud Config module.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { IApiBaseEntity, IApiControllerProperties } from '@elsikora/nestjs-crud-automator';
|
|
2
|
+
import { IConfigData } from '../../../modules/config/data';
|
|
3
|
+
import { IConfigSection } from '../../../modules/config/section';
|
|
4
4
|
/**
|
|
5
5
|
* Interface for individual controller configuration
|
|
6
6
|
* @see {@link https://elsikora.com/docs/nestjs-crud-config/api-reference/interfaces/config-controller-options | API Reference - IConfigControllerOptions}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { IConfigEntityDataOptions } from
|
|
2
|
-
export type { ICrudConfigEntityOptions } from
|
|
3
|
-
export type { IConfigEntitySectionOptions } from
|
|
1
|
+
export type { IConfigEntityDataOptions } from './data-options.interface';
|
|
2
|
+
export type { ICrudConfigEntityOptions } from './options.interface';
|
|
3
|
+
export type { IConfigEntitySectionOptions } from './section-options.interface';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { IConfigEntityDataOptions, IConfigEntitySectionOptions } from './';
|
|
2
2
|
/**
|
|
3
3
|
* Interface for entity customization options
|
|
4
4
|
* @see {@link https://elsikora.com/docs/nestjs-crud-config/api-reference/interfaces/crud-config-entity-options | API Reference - ICrudConfigEntityOptions}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { type ICrudConfigAsyncModuleProperties } from
|
|
2
|
-
export { type IConfigCacheOptions } from
|
|
3
|
-
export { type IConfigControllerOptions, type IConfigControllersOptions, } from
|
|
4
|
-
export { type IConfigEncryptionOptions } from
|
|
5
|
-
export type * from
|
|
6
|
-
export { type IConfigOptions } from
|
|
7
|
-
export { type IConfigPropertiesFactory } from
|
|
8
|
-
export { type IConfigStaticMigrationEntityOptions, type IConfigStaticOptions, } from
|
|
1
|
+
export { type ICrudConfigAsyncModuleProperties } from './async-module-properties.interface';
|
|
2
|
+
export { type IConfigCacheOptions } from './cache-options.interface';
|
|
3
|
+
export { type IConfigControllerOptions, type IConfigControllersOptions, } from './controller-options.interface';
|
|
4
|
+
export { type IConfigEncryptionOptions } from './encryption-options.interface';
|
|
5
|
+
export type * from './entity';
|
|
6
|
+
export { type IConfigOptions } from './options.interface';
|
|
7
|
+
export { type IConfigPropertiesFactory } from './properties-factory.interface';
|
|
8
|
+
export { type IConfigStaticMigrationEntityOptions, type IConfigStaticOptions, } from './static-options.interface';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { IConfigMigrationOptions } from '../../../modules/config/migration/interface';
|
|
2
|
+
import { IConfigCacheOptions } from './cache-options.interface';
|
|
3
|
+
import { IConfigControllersOptions } from './controller-options.interface';
|
|
4
|
+
import { IConfigEncryptionOptions } from './encryption-options.interface';
|
|
5
|
+
import { ICrudConfigEntityOptions } from './entity';
|
|
6
6
|
/**
|
|
7
7
|
* Interface for configuration options
|
|
8
8
|
* @see {@link https://elsikora.com/docs/nestjs-crud-config/api-reference/interfaces/config-options | API Reference - IConfigOptions}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { IConfigControllersOptions } from './controller-options.interface';
|
|
2
|
+
import { ICrudConfigEntityOptions } from './entity';
|
|
3
3
|
/**
|
|
4
4
|
* Interface for migration entity options in static configuration.
|
|
5
5
|
* Contains only the entity-related settings that must be known at module registration time.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type * from
|
|
2
|
-
export type * from
|
|
1
|
+
export type * from './config';
|
|
2
|
+
export type * from './utility';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { ICreateDynamicEntityOptions } from
|
|
2
|
-
export type { ICreateDynamicEntityRelationOptions } from
|
|
1
|
+
export type { ICreateDynamicEntityOptions } from './options.interface';
|
|
2
|
+
export type { ICreateDynamicEntityRelationOptions } from './relation-options.interface';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { ICreateDynamicEntityRelationOptions } from '../..';
|
|
2
|
+
import { ColumnOptions } from 'typeorm';
|
|
3
3
|
export interface ICreateDynamicEntityOptions {
|
|
4
4
|
classDecorators?: Array<ClassDecorator>;
|
|
5
5
|
columns: Record<string, ColumnOptions>;
|
package/dist/cjs/shared/interface/utility/create-dynamic-entity/relation-options.interface.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { Type } from '@nestjs/common';
|
|
2
|
+
import { RelationOptions } from '../../../../../node_modules/typeorm/index';
|
|
3
3
|
export interface ICreateDynamicEntityRelationOptions extends RelationOptions {
|
|
4
4
|
decorator?: {
|
|
5
5
|
target: Type<unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type * from
|
|
1
|
+
export type * from './create-dynamic-entity';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { IApiBaseEntity } from '@elsikora/nestjs-crud-automator';
|
|
2
2
|
export type TDynamicEntity<T extends IApiBaseEntity = IApiBaseEntity> = new (...arguments_: Array<unknown>) => T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { TDynamicEntity } from
|
|
1
|
+
export type { TDynamicEntity } from './dynamic-entity.type';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { IApiBaseEntity } from '@elsikora/nestjs-crud-automator';
|
|
2
|
+
import { ICreateDynamicEntityOptions } from '../../interface';
|
|
3
|
+
import { TDynamicEntity } from '../../type';
|
|
4
4
|
/**
|
|
5
5
|
* Creates a dynamic entity class with TypeORM decorators
|
|
6
6
|
* This approach allows full customization of table names and properties at runtime
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createDynamicEntityClass } from
|
|
2
|
-
export { createDynamicService } from
|
|
1
|
+
export { createDynamicEntityClass } from './entity.utility';
|
|
2
|
+
export { createDynamicService } from './service.utility';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Type } from
|
|
2
|
-
import { TDynamicEntity } from '
|
|
1
|
+
import { Type } from '@nestjs/common';
|
|
2
|
+
import { TDynamicEntity } from '../../type';
|
|
3
3
|
/**
|
|
4
4
|
* Factory to create dynamic service classes with the correct entity decorator
|
|
5
5
|
* @see {@link https://elsikora.com/docs/nestjs-crud-config/api-reference/utilities/create-dynamic-service | API Reference - createDynamicService}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export { createDynamicEntityClass as createDynamicEntityUtility } from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from './create-dynamic';
|
|
2
|
+
export { createDynamicEntityClass as createDynamicEntityUtility } from './create-dynamic';
|
|
3
|
+
export * from './crypto.utility';
|
|
4
|
+
export * from './logger.utility';
|