@feathersjs/configuration 5.0.0-pre.3 → 5.0.0-pre.31
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/CHANGELOG.md +138 -169
- package/LICENSE +1 -1
- package/README.md +2 -2
- package/lib/index.d.ts +2 -1
- package/lib/index.js +16 -4
- package/lib/index.js.map +1 -1
- package/package.json +18 -17
- package/src/index.ts +30 -14
package/CHANGELOG.md
CHANGED
|
@@ -3,405 +3,359 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
# [5.0.0-pre.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Bug Fixes
|
|
6
|
+
# [5.0.0-pre.31](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.30...v5.0.0-pre.31) (2022-10-12)
|
|
10
7
|
|
|
11
|
-
|
|
8
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
12
9
|
|
|
10
|
+
# [5.0.0-pre.30](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.29...v5.0.0-pre.30) (2022-10-07)
|
|
13
11
|
|
|
14
12
|
### Features
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
- **core:** Allow to unregister services at runtime ([#2756](https://github.com/feathersjs/feathers/issues/2756)) ([d16601f](https://github.com/feathersjs/feathers/commit/d16601f2277dca5357866ffdefba2a611f6dc7fa))
|
|
15
|
+
- **schema:** Make schemas validation library independent and add TypeBox support ([#2772](https://github.com/feathersjs/feathers/issues/2772)) ([44172d9](https://github.com/feathersjs/feathers/commit/44172d99b566d11d9ceda04f1d0bf72b6d05ce76))
|
|
16
|
+
|
|
17
|
+
# [5.0.0-pre.29](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.28...v5.0.0-pre.29) (2022-09-16)
|
|
17
18
|
|
|
19
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
18
20
|
|
|
21
|
+
# [5.0.0-pre.28](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.27...v5.0.0-pre.28) (2022-08-03)
|
|
19
22
|
|
|
23
|
+
### Bug Fixes
|
|
20
24
|
|
|
25
|
+
- **cli:** Improve generated application and client ([#2701](https://github.com/feathersjs/feathers/issues/2701)) ([bd55ffb](https://github.com/feathersjs/feathers/commit/bd55ffb812e89bf215f4515e7f137656ea888c3f))
|
|
21
26
|
|
|
22
|
-
# [5.0.0-pre.
|
|
27
|
+
# [5.0.0-pre.27](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.26...v5.0.0-pre.27) (2022-07-13)
|
|
23
28
|
|
|
24
29
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
25
30
|
|
|
31
|
+
# [5.0.0-pre.26](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.25...v5.0.0-pre.26) (2022-06-22)
|
|
26
32
|
|
|
33
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
27
34
|
|
|
35
|
+
# [5.0.0-pre.25](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.24...v5.0.0-pre.25) (2022-06-22)
|
|
28
36
|
|
|
37
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
29
38
|
|
|
30
|
-
# [5.0.0-
|
|
39
|
+
# [5.0.0-pre.24](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.23...v5.0.0-pre.24) (2022-06-21)
|
|
31
40
|
|
|
32
41
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
33
42
|
|
|
43
|
+
# [5.0.0-pre.23](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.22...v5.0.0-pre.23) (2022-06-06)
|
|
44
|
+
|
|
45
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
34
46
|
|
|
47
|
+
# [5.0.0-pre.22](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.21...v5.0.0-pre.22) (2022-05-24)
|
|
35
48
|
|
|
49
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
36
50
|
|
|
51
|
+
# [5.0.0-pre.21](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.20...v5.0.0-pre.21) (2022-05-23)
|
|
37
52
|
|
|
38
|
-
|
|
53
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
39
54
|
|
|
55
|
+
# [5.0.0-pre.20](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.19...v5.0.0-pre.20) (2022-05-04)
|
|
40
56
|
|
|
41
57
|
### Bug Fixes
|
|
42
58
|
|
|
43
|
-
|
|
59
|
+
- **configuration:** Only validate the initial configuration against the schema ([#2622](https://github.com/feathersjs/feathers/issues/2622)) ([386c5e2](https://github.com/feathersjs/feathers/commit/386c5e2e67bfad4fb4333f2e3e17f7d7e09ac27e))
|
|
60
|
+
- **dependencies:** Lock monorepo package version numbers ([#2623](https://github.com/feathersjs/feathers/issues/2623)) ([5640c10](https://github.com/feathersjs/feathers/commit/5640c1020cc139994e695d658c08bad3494db507))
|
|
44
61
|
|
|
62
|
+
# [5.0.0-pre.19](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.18...v5.0.0-pre.19) (2022-05-01)
|
|
45
63
|
|
|
46
|
-
|
|
64
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
47
65
|
|
|
48
|
-
|
|
66
|
+
# [5.0.0-pre.18](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.17...v5.0.0-pre.18) (2022-04-11)
|
|
49
67
|
|
|
68
|
+
### Features
|
|
50
69
|
|
|
70
|
+
- **configuration:** Allow app configuration to be validated against a schema ([#2590](https://github.com/feathersjs/feathers/issues/2590)) ([a268f86](https://github.com/feathersjs/feathers/commit/a268f86da92a8ada14ed11ab456aac0a4bba5bb0))
|
|
51
71
|
|
|
72
|
+
# [5.0.0-pre.17](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.16...v5.0.0-pre.17) (2022-02-15)
|
|
52
73
|
|
|
74
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
53
75
|
|
|
54
|
-
# [5.0.0-pre.
|
|
76
|
+
# [5.0.0-pre.16](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.15...v5.0.0-pre.16) (2022-01-12)
|
|
55
77
|
|
|
78
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
56
79
|
|
|
80
|
+
# [5.0.0-pre.15](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.14...v5.0.0-pre.15) (2021-11-27)
|
|
57
81
|
|
|
58
|
-
|
|
82
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
59
83
|
|
|
84
|
+
# [5.0.0-pre.14](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.13...v5.0.0-pre.14) (2021-10-13)
|
|
60
85
|
|
|
61
|
-
|
|
86
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
62
87
|
|
|
63
|
-
|
|
88
|
+
# [5.0.0-pre.13](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.12...v5.0.0-pre.13) (2021-10-13)
|
|
64
89
|
|
|
90
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
65
91
|
|
|
66
|
-
|
|
92
|
+
# [5.0.0-pre.12](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.11...v5.0.0-pre.12) (2021-10-12)
|
|
67
93
|
|
|
68
|
-
|
|
69
|
-
functionality like path replacements and automatic environment variable insertion.
|
|
94
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
70
95
|
|
|
96
|
+
# [5.0.0-pre.11](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.10...v5.0.0-pre.11) (2021-10-06)
|
|
71
97
|
|
|
98
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
72
99
|
|
|
100
|
+
# [5.0.0-pre.10](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.9...v5.0.0-pre.10) (2021-09-19)
|
|
73
101
|
|
|
102
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
74
103
|
|
|
75
|
-
# [5.0.0-pre.
|
|
104
|
+
# [5.0.0-pre.9](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.8...v5.0.0-pre.9) (2021-08-09)
|
|
76
105
|
|
|
106
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
77
107
|
|
|
78
|
-
|
|
108
|
+
# [5.0.0-pre.8](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.7...v5.0.0-pre.8) (2021-08-09)
|
|
79
109
|
|
|
80
|
-
|
|
110
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
81
111
|
|
|
112
|
+
# [5.0.0-pre.7](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.6...v5.0.0-pre.7) (2021-08-09)
|
|
82
113
|
|
|
83
|
-
|
|
114
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
84
115
|
|
|
85
|
-
|
|
86
|
-
functionality like path replacements and automatic environment variable insertion.
|
|
116
|
+
# [5.0.0-pre.6](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.5...v5.0.0-pre.6) (2021-08-08)
|
|
87
117
|
|
|
118
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
88
119
|
|
|
120
|
+
# [5.0.0-pre.5](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.4...v5.0.0-pre.5) (2021-06-23)
|
|
89
121
|
|
|
122
|
+
### Bug Fixes
|
|
90
123
|
|
|
91
|
-
|
|
124
|
+
- **koa:** Use extended query parser for compatibility ([#2397](https://github.com/feathersjs/feathers/issues/2397)) ([b2944ba](https://github.com/feathersjs/feathers/commit/b2944bac3ec6d5ecc80dc518cd4e58093692db74))
|
|
92
125
|
|
|
126
|
+
# [5.0.0-pre.4](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.3...v5.0.0-pre.4) (2021-05-13)
|
|
93
127
|
|
|
94
|
-
|
|
128
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
95
129
|
|
|
96
|
-
|
|
130
|
+
# [5.0.0-pre.3](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.2...v5.0.0-pre.3) (2021-04-21)
|
|
97
131
|
|
|
132
|
+
### Bug Fixes
|
|
98
133
|
|
|
134
|
+
- **typescript:** Improve TypeScript backwards compatibility ([#2310](https://github.com/feathersjs/feathers/issues/2310)) ([f33be73](https://github.com/feathersjs/feathers/commit/f33be73fc46a533efb15df9aab0658e3240d3897))
|
|
99
135
|
|
|
136
|
+
### Features
|
|
100
137
|
|
|
138
|
+
- **dependencies:** Remove direct debug dependency ([#2296](https://github.com/feathersjs/feathers/issues/2296)) ([501d416](https://github.com/feathersjs/feathers/commit/501d4164d30c6a126906dc640cdfdc82207ba34a))
|
|
101
139
|
|
|
102
|
-
|
|
140
|
+
# [5.0.0-pre.2](https://github.com/feathersjs/feathers/compare/v5.0.0-beta.1...v5.0.0-pre.2) (2021-04-06)
|
|
103
141
|
|
|
104
142
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
105
143
|
|
|
144
|
+
# [5.0.0-beta.1](https://github.com/feathersjs/feathers/compare/v5.0.0-beta.0...v5.0.0-beta.1) (2021-04-03)
|
|
106
145
|
|
|
146
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
107
147
|
|
|
148
|
+
# [5.0.0-beta.0](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.1...v5.0.0-beta.0) (2021-03-28)
|
|
108
149
|
|
|
150
|
+
### Bug Fixes
|
|
109
151
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
**Note:** Version bump only for package @feathersjs/configuration
|
|
152
|
+
- Update Grant usage and other dependencies ([#2264](https://github.com/feathersjs/feathers/issues/2264)) ([7b0f8fa](https://github.com/feathersjs/feathers/commit/7b0f8fad252419ed0ad0bf259cdf3104d322ab60))
|
|
113
153
|
|
|
154
|
+
### Features
|
|
114
155
|
|
|
156
|
+
- Feathers v5 core refactoring and features ([#2255](https://github.com/feathersjs/feathers/issues/2255)) ([2dafb7c](https://github.com/feathersjs/feathers/commit/2dafb7ce14ba57406aeec13d10ca45b1e709bee9))
|
|
115
157
|
|
|
158
|
+
# [5.0.0-pre.1](https://github.com/feathersjs/feathers/compare/v4.5.11...v5.0.0-pre.1) (2020-12-17)
|
|
116
159
|
|
|
160
|
+
# [5.0.0-pre.0](https://github.com/feathersjs/feathers/compare/v4.5.4...v5.0.0-pre.0) (2020-05-19)
|
|
117
161
|
|
|
118
|
-
|
|
162
|
+
### chore
|
|
119
163
|
|
|
120
|
-
**
|
|
164
|
+
- **configuration:** Remove environment variable substitution ([#1942](https://github.com/feathersjs/feathers/issues/1942)) ([caaa21f](https://github.com/feathersjs/feathers/commit/caaa21ffdc6a8dcac82fb403c91d9d4b781a6c0a))
|
|
121
165
|
|
|
166
|
+
### BREAKING CHANGES
|
|
122
167
|
|
|
168
|
+
- **configuration:** Falls back to node-config instead of adding additional
|
|
169
|
+
functionality like path replacements and automatic environment variable insertion.
|
|
123
170
|
|
|
171
|
+
# [5.0.0-pre.0](https://github.com/feathersjs/feathers/compare/v4.5.4...v5.0.0-pre.0) (2020-05-19)
|
|
124
172
|
|
|
173
|
+
### chore
|
|
125
174
|
|
|
126
|
-
|
|
175
|
+
- **configuration:** Remove environment variable substitution ([#1942](https://github.com/feathersjs/feathers/issues/1942)) ([caaa21f](https://github.com/feathersjs/feathers/commit/caaa21ffdc6a8dcac82fb403c91d9d4b781a6c0a))
|
|
127
176
|
|
|
128
|
-
|
|
177
|
+
### BREAKING CHANGES
|
|
129
178
|
|
|
179
|
+
- **configuration:** Falls back to node-config instead of adding additional
|
|
180
|
+
functionality like path replacements and automatic environment variable insertion.
|
|
130
181
|
|
|
182
|
+
## [4.5.9](https://github.com/feathersjs/feathers/compare/v4.5.8...v4.5.9) (2020-10-09)
|
|
131
183
|
|
|
184
|
+
### Bug Fixes
|
|
132
185
|
|
|
186
|
+
- **configuration:** Fix handling of config values that start with . or .. but are not actually relative paths; e.g. ".foo" or "..bar" ([#2065](https://github.com/feathersjs/feathers/issues/2065)) ([d07bf59](https://github.com/feathersjs/feathers/commit/d07bf5902e9c8c606f16b9523472972d3d2e9b49))
|
|
133
187
|
|
|
134
|
-
## [4.5.
|
|
188
|
+
## [4.5.8](https://github.com/feathersjs/feathers/compare/v4.5.7...v4.5.8) (2020-08-12)
|
|
135
189
|
|
|
136
190
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
137
191
|
|
|
192
|
+
## [4.5.7](https://github.com/feathersjs/feathers/compare/v4.5.6...v4.5.7) (2020-07-24)
|
|
138
193
|
|
|
194
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
139
195
|
|
|
196
|
+
## [4.5.5](https://github.com/feathersjs/feathers/compare/v4.5.4...v4.5.5) (2020-07-11)
|
|
140
197
|
|
|
198
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
141
199
|
|
|
142
|
-
## [4.5.
|
|
200
|
+
## [4.5.3](https://github.com/feathersjs/feathers/compare/v4.5.2...v4.5.3) (2020-04-17)
|
|
143
201
|
|
|
144
202
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
145
203
|
|
|
204
|
+
## [4.5.2](https://github.com/feathersjs/feathers/compare/v4.5.1...v4.5.2) (2020-03-04)
|
|
146
205
|
|
|
206
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
147
207
|
|
|
208
|
+
## [4.5.1](https://github.com/feathersjs/feathers/compare/v4.5.0...v4.5.1) (2020-01-24)
|
|
148
209
|
|
|
210
|
+
**Note:** Version bump only for package @feathersjs/configuration
|
|
149
211
|
|
|
150
212
|
# [4.5.0](https://github.com/feathersjs/feathers/compare/v4.4.3...v4.5.0) (2020-01-18)
|
|
151
213
|
|
|
152
214
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
153
215
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
216
|
## [4.4.3](https://github.com/feathersjs/feathers/compare/v4.4.1...v4.4.3) (2019-12-06)
|
|
159
217
|
|
|
160
218
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
161
219
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
220
|
## [4.4.1](https://github.com/feathersjs/feathers/compare/v4.4.0...v4.4.1) (2019-11-27)
|
|
167
221
|
|
|
168
222
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
169
223
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
224
|
# [4.4.0](https://github.com/feathersjs/feathers/compare/v4.3.11...v4.4.0) (2019-11-27)
|
|
175
225
|
|
|
176
226
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
177
227
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
228
|
## [4.3.11](https://github.com/feathersjs/feathers/compare/v4.3.10...v4.3.11) (2019-11-11)
|
|
183
229
|
|
|
184
230
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
185
231
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
232
|
## [4.3.10](https://github.com/feathersjs/feathers/compare/v4.3.9...v4.3.10) (2019-10-26)
|
|
191
233
|
|
|
192
234
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
193
235
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
236
|
## [4.3.9](https://github.com/feathersjs/feathers/compare/v4.3.8...v4.3.9) (2019-10-26)
|
|
199
237
|
|
|
200
238
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
201
239
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
240
|
## [4.3.7](https://github.com/feathersjs/feathers/compare/v4.3.6...v4.3.7) (2019-10-14)
|
|
207
241
|
|
|
208
242
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
209
243
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
244
|
## [4.3.4](https://github.com/feathersjs/feathers/compare/v4.3.3...v4.3.4) (2019-10-03)
|
|
215
245
|
|
|
216
246
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
217
247
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
248
|
## [4.3.3](https://github.com/feathersjs/feathers/compare/v4.3.2...v4.3.3) (2019-09-21)
|
|
223
249
|
|
|
224
|
-
|
|
225
250
|
### Bug Fixes
|
|
226
251
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
252
|
+
- Small improvements in dependencies and code sturcture ([#1562](https://github.com/feathersjs/feathers/issues/1562)) ([42c13e2](https://github.com/feathersjs/feathers/commit/42c13e2))
|
|
232
253
|
|
|
233
254
|
## [4.3.2](https://github.com/feathersjs/feathers/compare/v4.3.1...v4.3.2) (2019-09-16)
|
|
234
255
|
|
|
235
256
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
236
257
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
258
|
## [4.3.1](https://github.com/feathersjs/feathers/compare/v4.3.0...v4.3.1) (2019-09-09)
|
|
242
259
|
|
|
243
260
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
244
261
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
262
|
# [4.3.0](https://github.com/feathersjs/feathers/compare/v4.3.0-pre.4...v4.3.0) (2019-08-27)
|
|
250
263
|
|
|
251
264
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
252
265
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
266
|
# [4.3.0-pre.4](https://github.com/feathersjs/feathers/compare/v4.3.0-pre.3...v4.3.0-pre.4) (2019-08-22)
|
|
258
267
|
|
|
259
268
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
260
269
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
270
|
# [4.3.0-pre.3](https://github.com/feathersjs/feathers/compare/v4.3.0-pre.2...v4.3.0-pre.3) (2019-08-19)
|
|
266
271
|
|
|
267
|
-
|
|
268
272
|
### Bug Fixes
|
|
269
273
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
274
|
+
- Update all dependencies ([7d53a00](https://github.com/feathersjs/feathers/commit/7d53a00))
|
|
275
275
|
|
|
276
276
|
# [4.3.0-pre.2](https://github.com/feathersjs/feathers/compare/v4.3.0-pre.1...v4.3.0-pre.2) (2019-08-02)
|
|
277
277
|
|
|
278
278
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
279
279
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
280
|
# [4.3.0-pre.1](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.5...v4.3.0-pre.1) (2019-07-11)
|
|
285
281
|
|
|
286
282
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
287
283
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
284
|
# [4.0.0-pre.5](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.4...v4.0.0-pre.5) (2019-07-10)
|
|
293
285
|
|
|
294
286
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
295
287
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
288
|
# [4.0.0-pre.4](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.3...v4.0.0-pre.4) (2019-07-05)
|
|
301
289
|
|
|
302
290
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
303
291
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
292
|
# [4.0.0-pre.3](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.2...v4.0.0-pre.3) (2019-06-01)
|
|
309
293
|
|
|
310
|
-
|
|
311
294
|
### Bug Fixes
|
|
312
295
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
296
|
+
- Update dependencies and fix tests ([#1373](https://github.com/feathersjs/feathers/issues/1373)) ([d743a7f](https://github.com/feathersjs/feathers/commit/d743a7f))
|
|
318
297
|
|
|
319
298
|
# [4.0.0-pre.2](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.1...v4.0.0-pre.2) (2019-05-15)
|
|
320
299
|
|
|
321
300
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
322
301
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
302
|
# [4.0.0-pre.1](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.0...v4.0.0-pre.1) (2019-05-08)
|
|
328
303
|
|
|
329
304
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
330
305
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
306
|
# [4.0.0-pre.0](https://github.com/feathersjs/feathers/compare/v3.2.0-pre.1...v4.0.0-pre.0) (2019-04-21)
|
|
336
307
|
|
|
337
|
-
|
|
338
308
|
### Bug Fixes
|
|
339
309
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
310
|
+
- Update all dependencies to latest ([#1206](https://github.com/feathersjs/feathers/issues/1206)) ([e51e0f6](https://github.com/feathersjs/feathers/commit/e51e0f6))
|
|
311
|
+
- **package:** update config to version 3.0.0 ([#1100](https://github.com/feathersjs/feathers/issues/1100)) ([c9f4b42](https://github.com/feathersjs/feathers/commit/c9f4b42))
|
|
312
|
+
- Make Mocha a proper devDependency for every repository ([#1053](https://github.com/feathersjs/feathers/issues/1053)) ([9974803](https://github.com/feathersjs/feathers/commit/9974803))
|
|
313
|
+
- **package:** update debug to version 3.0.0 ([#45](https://github.com/feathersjs/feathers/issues/45)) ([2391434](https://github.com/feathersjs/feathers/commit/2391434))
|
|
314
|
+
- **package:** update debug to version 3.0.1 ([#46](https://github.com/feathersjs/feathers/issues/46)) ([f8ada69](https://github.com/feathersjs/feathers/commit/f8ada69))
|
|
346
315
|
|
|
347
316
|
### Features
|
|
348
317
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
318
|
+
- Add TypeScript definitions ([#1275](https://github.com/feathersjs/feathers/issues/1275)) ([9dd6713](https://github.com/feathersjs/feathers/commit/9dd6713))
|
|
354
319
|
|
|
355
320
|
## [2.0.6](https://github.com/feathersjs/feathers/compare/@feathersjs/configuration@2.0.5...@feathersjs/configuration@2.0.6) (2019-01-02)
|
|
356
321
|
|
|
357
322
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
358
323
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
324
|
<a name="2.0.5"></a>
|
|
364
|
-
## [2.0.5](https://github.com/feathersjs/feathers/compare/@feathersjs/configuration@2.0.4...@feathersjs/configuration@2.0.5) (2018-12-16)
|
|
365
325
|
|
|
326
|
+
## [2.0.5](https://github.com/feathersjs/feathers/compare/@feathersjs/configuration@2.0.4...@feathersjs/configuration@2.0.5) (2018-12-16)
|
|
366
327
|
|
|
367
328
|
### Bug Fixes
|
|
368
329
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
330
|
+
- Make Mocha a proper devDependency for every repository ([#1053](https://github.com/feathersjs/feathers/issues/1053)) ([9974803](https://github.com/feathersjs/feathers/commit/9974803))
|
|
331
|
+
- **package:** update config to version 3.0.0 ([#1100](https://github.com/feathersjs/feathers/issues/1100)) ([c9f4b42](https://github.com/feathersjs/feathers/commit/c9f4b42))
|
|
375
332
|
|
|
376
333
|
<a name="2.0.4"></a>
|
|
334
|
+
|
|
377
335
|
## [2.0.4](https://github.com/feathersjs/feathers/compare/@feathersjs/configuration@2.0.3...@feathersjs/configuration@2.0.4) (2018-09-21)
|
|
378
336
|
|
|
379
337
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
380
338
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
339
|
<a name="2.0.3"></a>
|
|
340
|
+
|
|
386
341
|
## [2.0.3](https://github.com/feathersjs/feathers/compare/@feathersjs/configuration@2.0.2...@feathersjs/configuration@2.0.3) (2018-09-17)
|
|
387
342
|
|
|
388
343
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
389
344
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
345
|
<a name="2.0.2"></a>
|
|
346
|
+
|
|
395
347
|
## [2.0.2](https://github.com/feathersjs/feathers/compare/@feathersjs/configuration@2.0.1...@feathersjs/configuration@2.0.2) (2018-09-02)
|
|
396
348
|
|
|
397
349
|
**Note:** Version bump only for package @feathersjs/configuration
|
|
398
350
|
|
|
399
351
|
<a name="2.0.1"></a>
|
|
352
|
+
|
|
400
353
|
## 2.0.1
|
|
401
354
|
|
|
402
355
|
- Migrate to Monorepo ([feathers#462](https://github.com/feathersjs/feathers/issues/462))
|
|
403
356
|
|
|
404
357
|
## [v2.0.0](https://github.com/feathersjs/configuration/tree/v2.0.0) (2018-07-30)
|
|
358
|
+
|
|
405
359
|
[Full Changelog](https://github.com/feathersjs/configuration/compare/v1.0.2...v2.0.0)
|
|
406
360
|
|
|
407
361
|
**Closed issues:**
|
|
@@ -416,13 +370,15 @@ functionality like path replacements and automatic environment variable insertio
|
|
|
416
370
|
- Update mocha to the latest version 🚀 [\#56](https://github.com/feathersjs/configuration/pull/56) ([greenkeeper[bot]](https://github.com/apps/greenkeeper))
|
|
417
371
|
|
|
418
372
|
## [v1.0.2](https://github.com/feathersjs/configuration/tree/v1.0.2) (2018-01-02)
|
|
373
|
+
|
|
419
374
|
[Full Changelog](https://github.com/feathersjs/configuration/compare/v1.0.1...v1.0.2)
|
|
420
375
|
|
|
421
376
|
**Merged pull requests:**
|
|
422
377
|
|
|
423
|
-
-
|
|
378
|
+
- Remove example and update Readme to point directly to the Feathers docs [\#55](https://github.com/feathersjs/configuration/pull/55) ([daffl](https://github.com/daffl))
|
|
424
379
|
|
|
425
380
|
## [v1.0.1](https://github.com/feathersjs/configuration/tree/v1.0.1) (2017-11-16)
|
|
381
|
+
|
|
426
382
|
[Full Changelog](https://github.com/feathersjs/configuration/compare/v1.0.0...v1.0.1)
|
|
427
383
|
|
|
428
384
|
**Merged pull requests:**
|
|
@@ -431,9 +387,11 @@ functionality like path replacements and automatic environment variable insertio
|
|
|
431
387
|
- Update nsp to the latest version 🚀 [\#52](https://github.com/feathersjs/configuration/pull/52) ([greenkeeper[bot]](https://github.com/apps/greenkeeper))
|
|
432
388
|
|
|
433
389
|
## [v1.0.0](https://github.com/feathersjs/configuration/tree/v1.0.0) (2017-11-01)
|
|
390
|
+
|
|
434
391
|
[Full Changelog](https://github.com/feathersjs/configuration/compare/v1.0.0-pre.1...v1.0.0)
|
|
435
392
|
|
|
436
393
|
## [v1.0.0-pre.1](https://github.com/feathersjs/configuration/tree/v1.0.0-pre.1) (2017-10-23)
|
|
394
|
+
|
|
437
395
|
[Full Changelog](https://github.com/feathersjs/configuration/compare/v0.4.2...v1.0.0-pre.1)
|
|
438
396
|
|
|
439
397
|
**Closed issues:**
|
|
@@ -445,6 +403,7 @@ functionality like path replacements and automatic environment variable insertio
|
|
|
445
403
|
- Update to new plugin infrastructure and npm scopes [\#51](https://github.com/feathersjs/configuration/pull/51) ([daffl](https://github.com/daffl))
|
|
446
404
|
|
|
447
405
|
## [v0.4.2](https://github.com/feathersjs/configuration/tree/v0.4.2) (2017-10-15)
|
|
406
|
+
|
|
448
407
|
[Full Changelog](https://github.com/feathersjs/configuration/compare/v0.4.1...v0.4.2)
|
|
449
408
|
|
|
450
409
|
**Closed issues:**
|
|
@@ -456,7 +415,7 @@ functionality like path replacements and automatic environment variable insertio
|
|
|
456
415
|
- Nested configuration [\#38](https://github.com/feathersjs/configuration/issues/38)
|
|
457
416
|
- Stuck in configuration loophole... [\#37](https://github.com/feathersjs/configuration/issues/37)
|
|
458
417
|
- Docs are wrong [\#36](https://github.com/feathersjs/configuration/issues/36)
|
|
459
|
-
- Why use "
|
|
418
|
+
- Why use "NODE_ENV=development" with default.json? [\#33](https://github.com/feathersjs/configuration/issues/33)
|
|
460
419
|
|
|
461
420
|
**Merged pull requests:**
|
|
462
421
|
|
|
@@ -472,6 +431,7 @@ functionality like path replacements and automatic environment variable insertio
|
|
|
472
431
|
- 👻😱 Node.js 0.10 is unmaintained 😱👻 [\#30](https://github.com/feathersjs/configuration/pull/30) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot))
|
|
473
432
|
|
|
474
433
|
## [v0.4.1](https://github.com/feathersjs/configuration/tree/v0.4.1) (2016-10-24)
|
|
434
|
+
|
|
475
435
|
[Full Changelog](https://github.com/feathersjs/configuration/compare/v0.4.0...v0.4.1)
|
|
476
436
|
|
|
477
437
|
**Closed issues:**
|
|
@@ -484,6 +444,7 @@ functionality like path replacements and automatic environment variable insertio
|
|
|
484
444
|
- jshint —\> semistandard [\#28](https://github.com/feathersjs/configuration/pull/28) ([corymsmith](https://github.com/corymsmith))
|
|
485
445
|
|
|
486
446
|
## [v0.4.0](https://github.com/feathersjs/configuration/tree/v0.4.0) (2016-10-22)
|
|
447
|
+
|
|
487
448
|
[Full Changelog](https://github.com/feathersjs/configuration/compare/v0.3.3...v0.4.0)
|
|
488
449
|
|
|
489
450
|
**Implemented enhancements:**
|
|
@@ -496,9 +457,11 @@ functionality like path replacements and automatic environment variable insertio
|
|
|
496
457
|
- Make this repo more about managing configuration [\#24](https://github.com/feathersjs/configuration/issues/24)
|
|
497
458
|
|
|
498
459
|
## [v0.3.3](https://github.com/feathersjs/configuration/tree/v0.3.3) (2016-09-12)
|
|
460
|
+
|
|
499
461
|
[Full Changelog](https://github.com/feathersjs/configuration/compare/v0.3.2...v0.3.3)
|
|
500
462
|
|
|
501
463
|
## [v0.3.2](https://github.com/feathersjs/configuration/tree/v0.3.2) (2016-09-12)
|
|
464
|
+
|
|
502
465
|
[Full Changelog](https://github.com/feathersjs/configuration/compare/v0.3.1...v0.3.2)
|
|
503
466
|
|
|
504
467
|
**Closed issues:**
|
|
@@ -510,6 +473,7 @@ functionality like path replacements and automatic environment variable insertio
|
|
|
510
473
|
- Remove check for development mode [\#21](https://github.com/feathersjs/configuration/pull/21) ([daffl](https://github.com/daffl))
|
|
511
474
|
|
|
512
475
|
## [v0.3.1](https://github.com/feathersjs/configuration/tree/v0.3.1) (2016-08-15)
|
|
476
|
+
|
|
513
477
|
[Full Changelog](https://github.com/feathersjs/configuration/compare/v0.3.0...v0.3.1)
|
|
514
478
|
|
|
515
479
|
**Merged pull requests:**
|
|
@@ -518,17 +482,19 @@ functionality like path replacements and automatic environment variable insertio
|
|
|
518
482
|
- Update mocha to version 3.0.0 🚀 [\#18](https://github.com/feathersjs/configuration/pull/18) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot))
|
|
519
483
|
|
|
520
484
|
## [v0.3.0](https://github.com/feathersjs/configuration/tree/v0.3.0) (2016-05-22)
|
|
485
|
+
|
|
521
486
|
[Full Changelog](https://github.com/feathersjs/configuration/compare/v0.2.3...v0.3.0)
|
|
522
487
|
|
|
523
488
|
**Closed issues:**
|
|
524
489
|
|
|
525
|
-
- \<
|
|
490
|
+
- \<NODE_ENV\>.json config need deep merge options [\#16](https://github.com/feathersjs/configuration/issues/16)
|
|
526
491
|
|
|
527
492
|
**Merged pull requests:**
|
|
528
493
|
|
|
529
494
|
- Add functionality for deeply extending configuration [\#17](https://github.com/feathersjs/configuration/pull/17) ([daffl](https://github.com/daffl))
|
|
530
495
|
|
|
531
496
|
## [v0.2.3](https://github.com/feathersjs/configuration/tree/v0.2.3) (2016-04-24)
|
|
497
|
+
|
|
532
498
|
[Full Changelog](https://github.com/feathersjs/configuration/compare/v0.2.2...v0.2.3)
|
|
533
499
|
|
|
534
500
|
**Closed issues:**
|
|
@@ -541,6 +507,7 @@ functionality like path replacements and automatic environment variable insertio
|
|
|
541
507
|
- Update all dependencies 🌴 [\#10](https://github.com/feathersjs/configuration/pull/10) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot))
|
|
542
508
|
|
|
543
509
|
## [v0.2.2](https://github.com/feathersjs/configuration/tree/v0.2.2) (2016-03-27)
|
|
510
|
+
|
|
544
511
|
[Full Changelog](https://github.com/feathersjs/configuration/compare/v0.2.1...v0.2.2)
|
|
545
512
|
|
|
546
513
|
**Merged pull requests:**
|
|
@@ -548,6 +515,7 @@ functionality like path replacements and automatic environment variable insertio
|
|
|
548
515
|
- Expanding environment variables in \<env\>.json [\#9](https://github.com/feathersjs/configuration/pull/9) ([derek-watson](https://github.com/derek-watson))
|
|
549
516
|
|
|
550
517
|
## [v0.2.1](https://github.com/feathersjs/configuration/tree/v0.2.1) (2016-03-12)
|
|
518
|
+
|
|
551
519
|
[Full Changelog](https://github.com/feathersjs/configuration/compare/v0.2.0...v0.2.1)
|
|
552
520
|
|
|
553
521
|
**Merged pull requests:**
|
|
@@ -555,6 +523,7 @@ functionality like path replacements and automatic environment variable insertio
|
|
|
555
523
|
- Makes sure that arrays get converted properly [\#7](https://github.com/feathersjs/configuration/pull/7) ([daffl](https://github.com/daffl))
|
|
556
524
|
|
|
557
525
|
## [v0.2.0](https://github.com/feathersjs/configuration/tree/v0.2.0) (2016-03-09)
|
|
526
|
+
|
|
558
527
|
[Full Changelog](https://github.com/feathersjs/configuration/compare/v0.1.1...v0.2.0)
|
|
559
528
|
|
|
560
529
|
**Closed issues:**
|
|
@@ -566,11 +535,12 @@ functionality like path replacements and automatic environment variable insertio
|
|
|
566
535
|
- Implement an escape character [\#6](https://github.com/feathersjs/configuration/pull/6) ([daffl](https://github.com/daffl))
|
|
567
536
|
|
|
568
537
|
## [v0.1.1](https://github.com/feathersjs/configuration/tree/v0.1.1) (2016-03-09)
|
|
538
|
+
|
|
569
539
|
[Full Changelog](https://github.com/feathersjs/configuration/compare/v0.1.0...v0.1.1)
|
|
570
540
|
|
|
571
541
|
**Closed issues:**
|
|
572
542
|
|
|
573
|
-
- Configuration should recursively go through the values
|
|
543
|
+
- Configuration should recursively go through the values [\#2](https://github.com/feathersjs/configuration/issues/2)
|
|
574
544
|
|
|
575
545
|
**Merged pull requests:**
|
|
576
546
|
|
|
@@ -580,5 +550,4 @@ functionality like path replacements and automatic environment variable insertio
|
|
|
580
550
|
|
|
581
551
|
## [v0.1.0](https://github.com/feathersjs/configuration/tree/v0.1.0) (2015-11-14)
|
|
582
552
|
|
|
583
|
-
|
|
584
|
-
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
|
553
|
+
\* _This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)_
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @feathersjs/configuration
|
|
2
2
|
|
|
3
3
|
[](https://github.com/feathersjs/feathers/actions?query=workflow%3ACI)
|
|
4
|
-
[](https://david-dm.org/feathersjs/feathers?path=packages/configuration)
|
|
5
4
|
[](https://www.npmjs.com/package/@feathersjs/configuration)
|
|
5
|
+
[](https://discord.gg/qa8kez8QBx)
|
|
6
6
|
|
|
7
7
|
> A small configuration module for your Feathers application.
|
|
8
8
|
|
|
@@ -18,6 +18,6 @@ Refer to the [Feathers configuration API documentation](https://docs.feathersjs.
|
|
|
18
18
|
|
|
19
19
|
## License
|
|
20
20
|
|
|
21
|
-
Copyright (c)
|
|
21
|
+
Copyright (c) 2022 [Feathers contributors](https://github.com/feathersjs/feathers/graphs/contributors)
|
|
22
22
|
|
|
23
23
|
Licensed under the [MIT license](LICENSE).
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Application } from '@feathersjs/feathers';
|
|
2
|
+
import { Schema, Validator } from '@feathersjs/schema';
|
|
2
3
|
import config from 'config';
|
|
3
|
-
declare const _default: () => (app?: Application) => config.IConfig;
|
|
4
|
+
declare const _default: (schema?: Schema<any> | Validator) => (app?: Application) => config.IConfig;
|
|
4
5
|
export = _default;
|
package/lib/index.js
CHANGED
|
@@ -4,18 +4,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
const commons_1 = require("@feathersjs/commons");
|
|
6
6
|
const config_1 = __importDefault(require("config"));
|
|
7
|
-
const debug = commons_1.createDebug('@feathersjs/configuration');
|
|
8
|
-
module.exports = function init() {
|
|
7
|
+
const debug = (0, commons_1.createDebug)('@feathersjs/configuration');
|
|
8
|
+
module.exports = function init(schema) {
|
|
9
|
+
const validator = typeof schema === 'function' ? schema : schema === null || schema === void 0 ? void 0 : schema.validate.bind(schema);
|
|
9
10
|
return (app) => {
|
|
10
11
|
if (!app) {
|
|
11
12
|
return config_1.default;
|
|
12
13
|
}
|
|
14
|
+
const configuration = { ...config_1.default };
|
|
13
15
|
debug(`Initializing configuration for ${config_1.default.util.getEnv('NODE_ENV')} environment`);
|
|
14
|
-
Object.keys(
|
|
15
|
-
const value =
|
|
16
|
+
Object.keys(configuration).forEach((name) => {
|
|
17
|
+
const value = configuration[name];
|
|
16
18
|
debug(`Setting ${name} configuration value to`, value);
|
|
17
19
|
app.set(name, value);
|
|
18
20
|
});
|
|
21
|
+
if (validator) {
|
|
22
|
+
app.hooks({
|
|
23
|
+
setup: [
|
|
24
|
+
async (_context, next) => {
|
|
25
|
+
await validator(configuration);
|
|
26
|
+
await next();
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
19
31
|
return config_1.default;
|
|
20
32
|
};
|
|
21
33
|
};
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AACA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AACA,iDAAiD;AAEjD,oDAA2B;AAE3B,MAAM,KAAK,GAAG,IAAA,qBAAW,EAAC,2BAA2B,CAAC,CAAA;AAEtD,iBAAS,SAAS,IAAI,CAAC,MAAgC;IACrD,MAAM,SAAS,GAAc,OAAO,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAElG,OAAO,CAAC,GAAiB,EAAE,EAAE;QAC3B,IAAI,CAAC,GAAG,EAAE;YACR,OAAO,gBAAM,CAAA;SACd;QAED,MAAM,aAAa,GAA+B,EAAE,GAAG,gBAAM,EAAE,CAAA;QAE/D,KAAK,CAAC,kCAAkC,gBAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,CAAA;QAErF,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YAC1C,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,CAAA;YACjC,KAAK,CAAC,WAAW,IAAI,yBAAyB,EAAE,KAAK,CAAC,CAAA;YACtD,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACtB,CAAC,CAAC,CAAA;QAEF,IAAI,SAAS,EAAE;YACb,GAAG,CAAC,KAAK,CAAC;gBACR,KAAK,EAAE;oBACL,KAAK,EAAE,QAAgC,EAAE,IAAkB,EAAE,EAAE;wBAC7D,MAAM,SAAS,CAAC,aAAa,CAAC,CAAA;wBAC9B,MAAM,IAAI,EAAE,CAAA;oBACd,CAAC;iBACF;aACF,CAAC,CAAA;SACH;QAED,OAAO,gBAAM,CAAA;IACf,CAAC,CAAA;AACH,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feathersjs/configuration",
|
|
3
3
|
"description": "A small configuration module for your Feathers application.",
|
|
4
|
-
"version": "5.0.0-pre.
|
|
4
|
+
"version": "5.0.0-pre.31",
|
|
5
5
|
"homepage": "https://feathersjs.com",
|
|
6
6
|
"main": "lib/",
|
|
7
7
|
"types": "lib/",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
|
-
"url": "git://github.com/feathersjs/feathers.git"
|
|
19
|
+
"url": "git://github.com/feathersjs/feathers.git",
|
|
20
|
+
"directory": "packages/configuration"
|
|
20
21
|
},
|
|
21
22
|
"author": {
|
|
22
23
|
"name": "Feathers contributors",
|
|
@@ -41,9 +42,9 @@
|
|
|
41
42
|
],
|
|
42
43
|
"scripts": {
|
|
43
44
|
"prepublish": "npm run compile",
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
45
|
+
"pack": "npm pack --pack-destination ../cli/test/build",
|
|
46
|
+
"compile": "shx rm -rf lib/ && tsc && npm run pack",
|
|
47
|
+
"test": "NODE_CONFIG_DIR=./test/config mocha --config ../../.mocharc.json --recursive test/**.test.ts test/**/*.test.ts"
|
|
47
48
|
},
|
|
48
49
|
"semistandard": {
|
|
49
50
|
"env": [
|
|
@@ -57,19 +58,19 @@
|
|
|
57
58
|
"access": "public"
|
|
58
59
|
},
|
|
59
60
|
"dependencies": {
|
|
60
|
-
"@feathersjs/commons": "^5.0.0-pre.
|
|
61
|
-
"@feathersjs/feathers": "^5.0.0-pre.
|
|
62
|
-
"@
|
|
63
|
-
"config": "^3.3.
|
|
61
|
+
"@feathersjs/commons": "^5.0.0-pre.31",
|
|
62
|
+
"@feathersjs/feathers": "^5.0.0-pre.31",
|
|
63
|
+
"@feathersjs/schema": "^5.0.0-pre.31",
|
|
64
|
+
"@types/config": "^3.3.0",
|
|
65
|
+
"config": "^3.3.8"
|
|
64
66
|
},
|
|
65
67
|
"devDependencies": {
|
|
66
|
-
"@types/
|
|
67
|
-
"@types/
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"typescript": "^4.2.4"
|
|
68
|
+
"@types/mocha": "^10.0.0",
|
|
69
|
+
"@types/node": "^18.8.2",
|
|
70
|
+
"mocha": "^10.0.0",
|
|
71
|
+
"shx": "^0.3.4",
|
|
72
|
+
"ts-node": "^10.9.1",
|
|
73
|
+
"typescript": "^4.8.4"
|
|
73
74
|
},
|
|
74
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "4500dbeb8cea566678cf88b3313a88efd93a2ed9"
|
|
75
76
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,23 +1,39 @@
|
|
|
1
|
-
import { Application } from '@feathersjs/feathers'
|
|
2
|
-
import { createDebug } from '@feathersjs/commons'
|
|
3
|
-
import
|
|
1
|
+
import { Application, ApplicationHookContext, NextFunction } from '@feathersjs/feathers'
|
|
2
|
+
import { createDebug } from '@feathersjs/commons'
|
|
3
|
+
import { Schema, Validator } from '@feathersjs/schema'
|
|
4
|
+
import config from 'config'
|
|
4
5
|
|
|
5
|
-
const debug = createDebug('@feathersjs/configuration')
|
|
6
|
+
const debug = createDebug('@feathersjs/configuration')
|
|
7
|
+
|
|
8
|
+
export = function init(schema?: Schema<any> | Validator) {
|
|
9
|
+
const validator: Validator = typeof schema === 'function' ? schema : schema?.validate.bind(schema)
|
|
6
10
|
|
|
7
|
-
export = function init () {
|
|
8
11
|
return (app?: Application) => {
|
|
9
12
|
if (!app) {
|
|
10
|
-
return config
|
|
13
|
+
return config
|
|
11
14
|
}
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
const configuration: { [key: string]: unknown } = { ...config }
|
|
17
|
+
|
|
18
|
+
debug(`Initializing configuration for ${config.util.getEnv('NODE_ENV')} environment`)
|
|
14
19
|
|
|
15
|
-
Object.keys(
|
|
16
|
-
const value =
|
|
17
|
-
debug(`Setting ${name} configuration value to`, value)
|
|
18
|
-
app.set(name, value)
|
|
19
|
-
})
|
|
20
|
+
Object.keys(configuration).forEach((name) => {
|
|
21
|
+
const value = configuration[name]
|
|
22
|
+
debug(`Setting ${name} configuration value to`, value)
|
|
23
|
+
app.set(name, value)
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
if (validator) {
|
|
27
|
+
app.hooks({
|
|
28
|
+
setup: [
|
|
29
|
+
async (_context: ApplicationHookContext, next: NextFunction) => {
|
|
30
|
+
await validator(configuration)
|
|
31
|
+
await next()
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
})
|
|
35
|
+
}
|
|
20
36
|
|
|
21
|
-
return config
|
|
22
|
-
}
|
|
37
|
+
return config
|
|
38
|
+
}
|
|
23
39
|
}
|