1 | "use strict";
|
2 | var __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 | };
|
8 | var __metadata = (this && this.__metadata) || function (k, v) {
|
9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10 | };
|
11 | var __importDefault = (this && this.__importDefault) || function (mod) {
|
12 | return (mod && mod.__esModule) ? mod : { "default": mod };
|
13 | };
|
14 | Object.defineProperty(exports, "__esModule", { value: true });
|
15 | const is_lambda_1 = __importDefault(require("is-lambda"));
|
16 | const Config_1 = require("./Services/Config");
|
17 | class APIConfig {
|
18 | }
|
19 |
|
20 | APIConfig.WEB_PORT = 3000;
|
21 |
|
22 | APIConfig.API_URL_BASE = `http://localhost${APIConfig.WEB_PORT === 80 ? "" : `:${APIConfig.WEB_PORT}`}`;
|
23 |
|
24 | APIConfig.LAZY_LOAD_APIS = true;
|
25 |
|
26 | APIConfig.RUN_AS_SERVER = !is_lambda_1.default;
|
27 |
|
28 | APIConfig.DISPLAY_RAW_ERRORS = false;
|
29 |
|
30 | APIConfig.LOG_400_ERRORS = false;
|
31 |
|
32 | APIConfig.LOG_500_ERRORS = true;
|
33 |
|
34 | APIConfig.OUTPUT_HAPI_RESULTS = true;
|
35 | APIConfig.AWS_REGION = "us-east-1";
|
36 |
|
37 | APIConfig.ENCRYPTION_SECRET = "E1E8A96B838495F8CD1310304361C741";
|
38 |
|
39 | APIConfig.KV_STORAGE_SERVICE_PROVIDER = "DiskKVService";
|
40 |
|
41 | APIConfig.DISK_KV_STORAGE_ROOT_PATH = "./data/kv";
|
42 |
|
43 | APIConfig.ENCRYPT_KV_DATA = true;
|
44 |
|
45 | APIConfig.FILE_STORAGE_SERVICE_PROVIDER = "DiskFileService";
|
46 | APIConfig.DISK_FILE_SERVICE_ROOT_PATH = "./data";
|
47 |
|
48 | APIConfig.JWT_SECRET = "65e068de-81ef-457d-b00a-82364c360226";
|
49 | __decorate([
|
50 | Config_1.EnvVarSync,
|
51 | __metadata("design:type", Number)
|
52 | ], APIConfig, "WEB_PORT", void 0);
|
53 | __decorate([
|
54 | Config_1.EnvVarSync,
|
55 | __metadata("design:type", String)
|
56 | ], APIConfig, "API_URL_BASE", void 0);
|
57 | __decorate([
|
58 | Config_1.EnvVarSync,
|
59 | __metadata("design:type", Boolean)
|
60 | ], APIConfig, "LAZY_LOAD_APIS", void 0);
|
61 | __decorate([
|
62 | Config_1.EnvVarSync,
|
63 | __metadata("design:type", Boolean)
|
64 | ], APIConfig, "RUN_AS_SERVER", void 0);
|
65 | __decorate([
|
66 | Config_1.EnvVarSync,
|
67 | __metadata("design:type", Boolean)
|
68 | ], APIConfig, "DISPLAY_RAW_ERRORS", void 0);
|
69 | __decorate([
|
70 | Config_1.EnvVarSync,
|
71 | __metadata("design:type", Boolean)
|
72 | ], APIConfig, "LOG_400_ERRORS", void 0);
|
73 | __decorate([
|
74 | Config_1.EnvVarSync,
|
75 | __metadata("design:type", Boolean)
|
76 | ], APIConfig, "LOG_500_ERRORS", void 0);
|
77 | __decorate([
|
78 | Config_1.EnvVarSync,
|
79 | __metadata("design:type", Boolean)
|
80 | ], APIConfig, "OUTPUT_HAPI_RESULTS", void 0);
|
81 | __decorate([
|
82 | Config_1.EnvVarSync,
|
83 | __metadata("design:type", String)
|
84 | ], APIConfig, "AWS_REGION", void 0);
|
85 | __decorate([
|
86 | Config_1.EnvVarSync,
|
87 | __metadata("design:type", String)
|
88 | ], APIConfig, "ENCRYPTION_SECRET", void 0);
|
89 | __decorate([
|
90 | Config_1.EnvVarSync,
|
91 | __metadata("design:type", String)
|
92 | ], APIConfig, "KV_STORAGE_SERVICE_PROVIDER", void 0);
|
93 | __decorate([
|
94 | Config_1.EnvVarSync,
|
95 | __metadata("design:type", String)
|
96 | ], APIConfig, "DISK_KV_STORAGE_ROOT_PATH", void 0);
|
97 | __decorate([
|
98 | Config_1.EnvVarSync,
|
99 | __metadata("design:type", Boolean)
|
100 | ], APIConfig, "ENCRYPT_KV_DATA", void 0);
|
101 | __decorate([
|
102 | Config_1.EnvVarSync,
|
103 | __metadata("design:type", String)
|
104 | ], APIConfig, "DYNAMO_KV_STORAGE_TABLE_NAME", void 0);
|
105 | __decorate([
|
106 | Config_1.EnvVarSync,
|
107 | __metadata("design:type", String)
|
108 | ], APIConfig, "FILE_STORAGE_SERVICE_PROVIDER", void 0);
|
109 | __decorate([
|
110 | Config_1.EnvVarSync,
|
111 | __metadata("design:type", String)
|
112 | ], APIConfig, "DISK_FILE_SERVICE_ROOT_PATH", void 0);
|
113 | __decorate([
|
114 | Config_1.EnvVarSync,
|
115 | __metadata("design:type", String)
|
116 | ], APIConfig, "S3_FILE_SERVICE_BUCKET_NAME", void 0);
|
117 | __decorate([
|
118 | Config_1.EnvVarSync,
|
119 | __metadata("design:type", String)
|
120 | ], APIConfig, "JWT_SECRET", void 0);
|
121 | exports.APIConfig = APIConfig;
|
122 |
|
\ | No newline at end of file |