@vyriy/env 0.1.20 → 0.1.22
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/package.json +1 -1
- package/chaos.d.ts +0 -5
- package/chaos.js +0 -16
- package/types.js +0 -57
package/package.json
CHANGED
package/chaos.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { GetBooleanEnvWithValue, GetNumberEnvWithValue } from './types.js';
|
|
2
|
-
export declare const getChaosEnabled: GetBooleanEnvWithValue;
|
|
3
|
-
export declare const getChaosErrorEnabled: GetBooleanEnvWithValue;
|
|
4
|
-
export declare const getChaosTimeoutEnabled: GetBooleanEnvWithValue;
|
|
5
|
-
export declare const getChaosTimeoutMs: GetNumberEnvWithValue;
|
package/chaos.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { getEnv } from './env.js';
|
|
2
|
-
const enabledValues = new Set([
|
|
3
|
-
'1',
|
|
4
|
-
'true',
|
|
5
|
-
'yes',
|
|
6
|
-
'on',
|
|
7
|
-
]);
|
|
8
|
-
const getBoolean = (name, defaultValue) => enabledValues.has(getEnv(name, `${defaultValue}`).toLowerCase());
|
|
9
|
-
const getNumber = (name, defaultValue) => {
|
|
10
|
-
const value = Number(getEnv(name, `${defaultValue}`));
|
|
11
|
-
return Number.isFinite(value) ? value : defaultValue;
|
|
12
|
-
};
|
|
13
|
-
export const getChaosEnabled = () => getBoolean('CHAOS_ENABLED', false);
|
|
14
|
-
export const getChaosErrorEnabled = () => getBoolean('CHAOS_ERROR_ENABLED', true);
|
|
15
|
-
export const getChaosTimeoutEnabled = () => getBoolean('CHAOS_TIMEOUT_ENABLED', true);
|
|
16
|
-
export const getChaosTimeoutMs = () => getNumber('CHAOS_TIMEOUT_MS', 10000);
|
package/types.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
export var AwsRegion;
|
|
2
|
-
(function (AwsRegion) {
|
|
3
|
-
AwsRegion["UsEast1"] = "us-east-1";
|
|
4
|
-
AwsRegion["UsEast2"] = "us-east-2";
|
|
5
|
-
AwsRegion["UsWest1"] = "us-west-1";
|
|
6
|
-
AwsRegion["UsWest2"] = "us-west-2";
|
|
7
|
-
AwsRegion["CaCentral1"] = "ca-central-1";
|
|
8
|
-
AwsRegion["CaWest1"] = "ca-west-1";
|
|
9
|
-
AwsRegion["MxCentral1"] = "mx-central-1";
|
|
10
|
-
AwsRegion["SaEast1"] = "sa-east-1";
|
|
11
|
-
AwsRegion["EuWest1"] = "eu-west-1";
|
|
12
|
-
AwsRegion["EuWest2"] = "eu-west-2";
|
|
13
|
-
AwsRegion["EuWest3"] = "eu-west-3";
|
|
14
|
-
AwsRegion["EuCentral1"] = "eu-central-1";
|
|
15
|
-
AwsRegion["EuCentral2"] = "eu-central-2";
|
|
16
|
-
AwsRegion["EuNorth1"] = "eu-north-1";
|
|
17
|
-
AwsRegion["EuSouth1"] = "eu-south-1";
|
|
18
|
-
AwsRegion["EuSouth2"] = "eu-south-2";
|
|
19
|
-
AwsRegion["MeSouth1"] = "me-south-1";
|
|
20
|
-
AwsRegion["MeCentral1"] = "me-central-1";
|
|
21
|
-
AwsRegion["AfSouth1"] = "af-south-1";
|
|
22
|
-
AwsRegion["IlCentral1"] = "il-central-1";
|
|
23
|
-
AwsRegion["ApNorthEast1"] = "ap-northeast-1";
|
|
24
|
-
AwsRegion["ApNorthEast2"] = "ap-northeast-2";
|
|
25
|
-
AwsRegion["ApNorthEast3"] = "ap-northeast-3";
|
|
26
|
-
AwsRegion["ApSouth1"] = "ap-south-1";
|
|
27
|
-
AwsRegion["ApSouth2"] = "ap-south-2";
|
|
28
|
-
AwsRegion["ApEast1"] = "ap-east-1";
|
|
29
|
-
AwsRegion["ApEast2"] = "ap-east-2";
|
|
30
|
-
AwsRegion["ApSouthEast1"] = "ap-southeast-1";
|
|
31
|
-
AwsRegion["ApSouthEast2"] = "ap-southeast-2";
|
|
32
|
-
AwsRegion["ApSouthEast3"] = "ap-southeast-3";
|
|
33
|
-
AwsRegion["ApSouthEast4"] = "ap-southeast-4";
|
|
34
|
-
AwsRegion["ApSouthEast5"] = "ap-southeast-5";
|
|
35
|
-
AwsRegion["ApSouthEast6"] = "ap-southeast-6";
|
|
36
|
-
AwsRegion["ApSouthEast7"] = "ap-southeast-7";
|
|
37
|
-
AwsRegion["UsGovWest1"] = "us-gov-west-1";
|
|
38
|
-
AwsRegion["UsGovEast1"] = "us-gov-east-1";
|
|
39
|
-
AwsRegion["CnNorth1"] = "cn-north-1";
|
|
40
|
-
AwsRegion["CnNorthWest1"] = "cn-northwest-1";
|
|
41
|
-
})(AwsRegion || (AwsRegion = {}));
|
|
42
|
-
export var Stage;
|
|
43
|
-
(function (Stage) {
|
|
44
|
-
Stage["Local"] = "local";
|
|
45
|
-
Stage["Dev"] = "dev";
|
|
46
|
-
Stage["Develop"] = "develop";
|
|
47
|
-
Stage["Test"] = "test";
|
|
48
|
-
Stage["Testing"] = "testing";
|
|
49
|
-
Stage["Qa"] = "qa";
|
|
50
|
-
Stage["Uat"] = "uat";
|
|
51
|
-
Stage["Staging"] = "staging";
|
|
52
|
-
Stage["PreProduction"] = "pre-production";
|
|
53
|
-
Stage["PreProd"] = "preprod";
|
|
54
|
-
Stage["Feature"] = "feature";
|
|
55
|
-
Stage["Hotfix"] = "hotfix";
|
|
56
|
-
Stage["Production"] = "production";
|
|
57
|
-
})(Stage || (Stage = {}));
|