2.0.0 • Published 2 years ago

@betsys-nestjs/config-utils v2.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Config Utils library

Library for validating config agains Joi schema before registering it.

Dependencies

PackageVersion
@hapi/joi^17.0.0
@nestjs/common^10.0.0
@nestjs/config^3.0.0
reflect-metadata<1.0.0
rxjs^7.0.0

Usage

Use provided function createFeatureConfig instead of original reagisterAs factory function. The rest stays the same as before ( see @nestjs/config docs for more).

import {createFeatureConfig} from '@betsys/nestjs-config-utils';
import {ConfigModule} from '@nestjs/config';

export const featureConfig = createFeatureConfig(
    'featureName',
    configObjectFactory,
    configJoiSchema,
);

@Module({
    imports: [ConfigModule.forFeature(featureConfig)],
})
class AppModule {
}
1.1.0

2 years ago

2.0.0

2 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago