UNPKG

1.49 kBJavaScriptView Raw
1"use strict";
2var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6 return c > 3 && r && Object.defineProperty(target, key, r), r;
7};
8Object.defineProperty(exports, "__esModule", { value: true });
9exports.ConfigHostModule = void 0;
10const common_1 = require("@nestjs/common");
11const config_constants_1 = require("./config.constants");
12const config_service_1 = require("./config.service");
13let ConfigHostModule = class ConfigHostModule {
14};
15ConfigHostModule = __decorate([
16 (0, common_1.Global)(),
17 (0, common_1.Module)({
18 providers: [
19 {
20 provide: config_constants_1.CONFIGURATION_TOKEN,
21 useFactory: () => ({}),
22 },
23 {
24 provide: config_constants_1.CONFIGURATION_SERVICE_TOKEN,
25 useClass: config_service_1.ConfigService,
26 },
27 ],
28 exports: [config_constants_1.CONFIGURATION_TOKEN, config_constants_1.CONFIGURATION_SERVICE_TOKEN],
29 })
30], ConfigHostModule);
31exports.ConfigHostModule = ConfigHostModule;