1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const errors_1 = require("../errors");
|
4 | function get(k, defaultValue) {
|
5 | return process.env[k] || defaultValue;
|
6 | }
|
7 | exports.env = {
|
8 | get,
|
9 | has(k) {
|
10 | return Boolean(get(k));
|
11 | },
|
12 | require(k) {
|
13 | const v = process.env[k];
|
14 | if (!v) {
|
15 | throw new errors_1.JobException(`${k} not found in environment`, 'server');
|
16 | }
|
17 | return v;
|
18 | },
|
19 | };
|