@achs/env 4.4.0 → 4.4.1
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 +2 -2
- package/schemas/env.schema.json +112 -0
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.4.
|
|
2
|
+
"version": "4.4.1",
|
|
3
3
|
"project": "common",
|
|
4
4
|
"name": "@achs/env",
|
|
5
5
|
"title": "Environment Variables CLI Tool",
|
|
@@ -87,6 +87,6 @@
|
|
|
87
87
|
"lint": "eslint --ext .ts src/",
|
|
88
88
|
"lint:fix": "eslint --fix --ext .ts, src/",
|
|
89
89
|
"prebuild": "del-cli dist/**",
|
|
90
|
-
"postbuild": "copyfiles package.json README.md LICENSE.md CHANGELOG.md assets/* dist"
|
|
90
|
+
"postbuild": "copyfiles package.json README.md LICENSE.md CHANGELOG.md schemas/env.schema.json assets/* dist"
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "EnvAppSettingsSchema",
|
|
4
|
+
"description": "appsettings.json schema definition.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"$schema": {
|
|
9
|
+
"description": "Environment appsettings schema definition.",
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"|DEFAULT|": {
|
|
13
|
+
"description": "Default basis environment variables.",
|
|
14
|
+
"title": "AppSettingsDefaultEnv",
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"type": "object",
|
|
17
|
+
"default": {},
|
|
18
|
+
"patternProperties": {
|
|
19
|
+
"^.*$": {
|
|
20
|
+
"anyOf": [
|
|
21
|
+
{ "type": "object" },
|
|
22
|
+
{ "type": "string" },
|
|
23
|
+
{ "type": "boolean" },
|
|
24
|
+
{ "type": "null" }
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"|MODE|": {
|
|
30
|
+
"description": "Environment variables loaded by mode argument (-m or --mode). Used for execution modes, like 'debug', 'test', 'build', 'packing', or any you need.",
|
|
31
|
+
"title": "AppSettingsModeEnv",
|
|
32
|
+
"additionalProperties": true,
|
|
33
|
+
"type": "object",
|
|
34
|
+
"default": {},
|
|
35
|
+
"properties": {
|
|
36
|
+
"debug": {
|
|
37
|
+
"description": "Variables used for 'debug' local execution.",
|
|
38
|
+
"type": "object",
|
|
39
|
+
"default": {}
|
|
40
|
+
},
|
|
41
|
+
"build": {
|
|
42
|
+
"description": "Variables used for 'build' operation.",
|
|
43
|
+
"type": "object",
|
|
44
|
+
"default": {}
|
|
45
|
+
},
|
|
46
|
+
"test": {
|
|
47
|
+
"description": "Variables used for 'test' execution.",
|
|
48
|
+
"type": "object",
|
|
49
|
+
"default": {}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"|ENV|": {
|
|
54
|
+
"description": "Environment variables loaded by environment argument (-e or --env). Used for environment selected, like 'dev', 'qa', 'stg', 'prod', or any you need.",
|
|
55
|
+
"title": "AppSettingsEnv",
|
|
56
|
+
"additionalProperties": true,
|
|
57
|
+
"type": "object",
|
|
58
|
+
"default": {},
|
|
59
|
+
"properties": {
|
|
60
|
+
"dev": {
|
|
61
|
+
"description": "Variables for 'development' environment.",
|
|
62
|
+
"type": "object",
|
|
63
|
+
"default": {}
|
|
64
|
+
},
|
|
65
|
+
"qa": {
|
|
66
|
+
"description": "Variables for 'quality assurance' environment.",
|
|
67
|
+
"type": "object",
|
|
68
|
+
"default": {}
|
|
69
|
+
},
|
|
70
|
+
"stg": {
|
|
71
|
+
"description": "Variables for 'staging' environment.",
|
|
72
|
+
"type": "object",
|
|
73
|
+
"default": {}
|
|
74
|
+
},
|
|
75
|
+
"prod": {
|
|
76
|
+
"description": "Variables for 'production' environment.",
|
|
77
|
+
"type": "object",
|
|
78
|
+
"default": {}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"|LOCAL|": {
|
|
83
|
+
"description": "Environment variables loaded by environment argument (-e or --env) but locally only. Used for local environment needs",
|
|
84
|
+
"title": "AppSettingsLocalEnv",
|
|
85
|
+
"additionalProperties": true,
|
|
86
|
+
"type": "object",
|
|
87
|
+
"default": {},
|
|
88
|
+
"properties": {
|
|
89
|
+
"dev": {
|
|
90
|
+
"description": "Variables for 'development' environment in local execution.",
|
|
91
|
+
"type": "object",
|
|
92
|
+
"default": {}
|
|
93
|
+
},
|
|
94
|
+
"qa": {
|
|
95
|
+
"description": "Variables for 'quality assurance' environment in local execution.",
|
|
96
|
+
"type": "object",
|
|
97
|
+
"default": {}
|
|
98
|
+
},
|
|
99
|
+
"stg": {
|
|
100
|
+
"description": "Variables for 'staging' environment in local execution.",
|
|
101
|
+
"type": "object",
|
|
102
|
+
"default": {}
|
|
103
|
+
},
|
|
104
|
+
"prod": {
|
|
105
|
+
"description": "Variables for 'production' environment in local execution.",
|
|
106
|
+
"type": "object",
|
|
107
|
+
"default": {}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|