@feathersjs/configuration 5.0.0-pre.9 → 5.0.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/CHANGELOG.md CHANGED
@@ -3,456 +3,399 @@
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.9](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.8...v5.0.0-pre.9) (2021-08-09)
6
+ ## [5.0.1](https://github.com/feathersjs/feathers/compare/v5.0.0...v5.0.1) (2023-03-15)
7
7
 
8
8
  **Note:** Version bump only for package @feathersjs/configuration
9
9
 
10
+ # [5.0.0](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.38...v5.0.0) (2023-02-24)
10
11
 
12
+ **Note:** Version bump only for package @feathersjs/configuration
11
13
 
14
+ # [5.0.0-pre.38](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.37...v5.0.0-pre.38) (2023-02-17)
12
15
 
16
+ **Note:** Version bump only for package @feathersjs/configuration
13
17
 
14
- # [5.0.0-pre.8](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.7...v5.0.0-pre.8) (2021-08-09)
18
+ # [5.0.0-pre.37](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.36...v5.0.0-pre.37) (2023-02-09)
15
19
 
16
20
  **Note:** Version bump only for package @feathersjs/configuration
17
21
 
22
+ # [5.0.0-pre.36](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.35...v5.0.0-pre.36) (2023-01-29)
18
23
 
24
+ ### Bug Fixes
19
25
 
26
+ - Update all dependencies ([#3024](https://github.com/feathersjs/feathers/issues/3024)) ([283dc47](https://github.com/feathersjs/feathers/commit/283dc4798d85584bc031e6e54b83b4ea77d1edd0))
20
27
 
28
+ # [5.0.0-pre.35](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.34...v5.0.0-pre.35) (2023-01-12)
21
29
 
22
- # [5.0.0-pre.7](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.6...v5.0.0-pre.7) (2021-08-09)
30
+ ### Features
31
+
32
+ - **generators:** Move core code generators to shared generators package ([#2982](https://github.com/feathersjs/feathers/issues/2982)) ([0328d22](https://github.com/feathersjs/feathers/commit/0328d2292153870bc43958f73d2c6f288a8cec17))
33
+
34
+ # [5.0.0-pre.34](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.33...v5.0.0-pre.34) (2022-12-14)
23
35
 
24
36
  **Note:** Version bump only for package @feathersjs/configuration
25
37
 
38
+ # [5.0.0-pre.33](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.32...v5.0.0-pre.33) (2022-11-08)
26
39
 
40
+ **Note:** Version bump only for package @feathersjs/configuration
27
41
 
42
+ # [5.0.0-pre.32](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.31...v5.0.0-pre.32) (2022-10-26)
28
43
 
44
+ **Note:** Version bump only for package @feathersjs/configuration
29
45
 
30
- # [5.0.0-pre.6](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.5...v5.0.0-pre.6) (2021-08-08)
46
+ # [5.0.0-pre.31](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.30...v5.0.0-pre.31) (2022-10-12)
31
47
 
32
48
  **Note:** Version bump only for package @feathersjs/configuration
33
49
 
50
+ # [5.0.0-pre.30](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.29...v5.0.0-pre.30) (2022-10-07)
34
51
 
52
+ ### Features
35
53
 
54
+ - **core:** Allow to unregister services at runtime ([#2756](https://github.com/feathersjs/feathers/issues/2756)) ([d16601f](https://github.com/feathersjs/feathers/commit/d16601f2277dca5357866ffdefba2a611f6dc7fa))
55
+ - **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))
36
56
 
57
+ # [5.0.0-pre.29](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.28...v5.0.0-pre.29) (2022-09-16)
37
58
 
38
- # [5.0.0-pre.5](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.4...v5.0.0-pre.5) (2021-06-23)
59
+ **Note:** Version bump only for package @feathersjs/configuration
39
60
 
61
+ # [5.0.0-pre.28](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.27...v5.0.0-pre.28) (2022-08-03)
40
62
 
41
63
  ### Bug Fixes
42
64
 
43
- * **koa:** Use extended query parser for compatibility ([#2397](https://github.com/feathersjs/feathers/issues/2397)) ([b2944ba](https://github.com/feathersjs/feathers/commit/b2944bac3ec6d5ecc80dc518cd4e58093692db74))
65
+ - **cli:** Improve generated application and client ([#2701](https://github.com/feathersjs/feathers/issues/2701)) ([bd55ffb](https://github.com/feathersjs/feathers/commit/bd55ffb812e89bf215f4515e7f137656ea888c3f))
44
66
 
67
+ # [5.0.0-pre.27](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.26...v5.0.0-pre.27) (2022-07-13)
45
68
 
69
+ **Note:** Version bump only for package @feathersjs/configuration
46
70
 
71
+ # [5.0.0-pre.26](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.25...v5.0.0-pre.26) (2022-06-22)
47
72
 
73
+ **Note:** Version bump only for package @feathersjs/configuration
48
74
 
49
- # [5.0.0-pre.4](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.3...v5.0.0-pre.4) (2021-05-13)
75
+ # [5.0.0-pre.25](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.24...v5.0.0-pre.25) (2022-06-22)
50
76
 
51
77
  **Note:** Version bump only for package @feathersjs/configuration
52
78
 
79
+ # [5.0.0-pre.24](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.23...v5.0.0-pre.24) (2022-06-21)
80
+
81
+ **Note:** Version bump only for package @feathersjs/configuration
53
82
 
83
+ # [5.0.0-pre.23](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.22...v5.0.0-pre.23) (2022-06-06)
54
84
 
85
+ **Note:** Version bump only for package @feathersjs/configuration
55
86
 
87
+ # [5.0.0-pre.22](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.21...v5.0.0-pre.22) (2022-05-24)
56
88
 
57
- # [5.0.0-pre.3](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.2...v5.0.0-pre.3) (2021-04-21)
89
+ **Note:** Version bump only for package @feathersjs/configuration
58
90
 
91
+ # [5.0.0-pre.21](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.20...v5.0.0-pre.21) (2022-05-23)
92
+
93
+ **Note:** Version bump only for package @feathersjs/configuration
94
+
95
+ # [5.0.0-pre.20](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.19...v5.0.0-pre.20) (2022-05-04)
59
96
 
60
97
  ### Bug Fixes
61
98
 
62
- * **typescript:** Improve TypeScript backwards compatibility ([#2310](https://github.com/feathersjs/feathers/issues/2310)) ([f33be73](https://github.com/feathersjs/feathers/commit/f33be73fc46a533efb15df9aab0658e3240d3897))
99
+ - **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))
100
+ - **dependencies:** Lock monorepo package version numbers ([#2623](https://github.com/feathersjs/feathers/issues/2623)) ([5640c10](https://github.com/feathersjs/feathers/commit/5640c1020cc139994e695d658c08bad3494db507))
63
101
 
102
+ # [5.0.0-pre.19](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.18...v5.0.0-pre.19) (2022-05-01)
64
103
 
65
- ### Features
104
+ **Note:** Version bump only for package @feathersjs/configuration
66
105
 
67
- * **dependencies:** Remove direct debug dependency ([#2296](https://github.com/feathersjs/feathers/issues/2296)) ([501d416](https://github.com/feathersjs/feathers/commit/501d4164d30c6a126906dc640cdfdc82207ba34a))
106
+ # [5.0.0-pre.18](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.17...v5.0.0-pre.18) (2022-04-11)
68
107
 
108
+ ### Features
69
109
 
110
+ - **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))
70
111
 
112
+ # [5.0.0-pre.17](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.16...v5.0.0-pre.17) (2022-02-15)
71
113
 
114
+ **Note:** Version bump only for package @feathersjs/configuration
72
115
 
73
- # [5.0.0-pre.2](https://github.com/feathersjs/feathers/compare/v5.0.0-beta.1...v5.0.0-pre.2) (2021-04-06)
116
+ # [5.0.0-pre.16](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.15...v5.0.0-pre.16) (2022-01-12)
74
117
 
75
118
  **Note:** Version bump only for package @feathersjs/configuration
76
119
 
120
+ # [5.0.0-pre.15](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.14...v5.0.0-pre.15) (2021-11-27)
77
121
 
122
+ **Note:** Version bump only for package @feathersjs/configuration
78
123
 
124
+ # [5.0.0-pre.14](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.13...v5.0.0-pre.14) (2021-10-13)
79
125
 
126
+ **Note:** Version bump only for package @feathersjs/configuration
80
127
 
81
- # [5.0.0-beta.1](https://github.com/feathersjs/feathers/compare/v5.0.0-beta.0...v5.0.0-beta.1) (2021-04-03)
128
+ # [5.0.0-pre.13](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.12...v5.0.0-pre.13) (2021-10-13)
82
129
 
83
130
  **Note:** Version bump only for package @feathersjs/configuration
84
131
 
132
+ # [5.0.0-pre.12](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.11...v5.0.0-pre.12) (2021-10-12)
85
133
 
134
+ **Note:** Version bump only for package @feathersjs/configuration
86
135
 
136
+ # [5.0.0-pre.11](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.10...v5.0.0-pre.11) (2021-10-06)
87
137
 
138
+ **Note:** Version bump only for package @feathersjs/configuration
88
139
 
89
- # [5.0.0-beta.0](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.1...v5.0.0-beta.0) (2021-03-28)
140
+ # [5.0.0-pre.10](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.9...v5.0.0-pre.10) (2021-09-19)
90
141
 
142
+ **Note:** Version bump only for package @feathersjs/configuration
91
143
 
92
- ### Bug Fixes
144
+ # [5.0.0-pre.9](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.8...v5.0.0-pre.9) (2021-08-09)
93
145
 
94
- * Update Grant usage and other dependencies ([#2264](https://github.com/feathersjs/feathers/issues/2264)) ([7b0f8fa](https://github.com/feathersjs/feathers/commit/7b0f8fad252419ed0ad0bf259cdf3104d322ab60))
146
+ **Note:** Version bump only for package @feathersjs/configuration
95
147
 
148
+ # [5.0.0-pre.8](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.7...v5.0.0-pre.8) (2021-08-09)
96
149
 
97
- ### Features
150
+ **Note:** Version bump only for package @feathersjs/configuration
98
151
 
99
- * Feathers v5 core refactoring and features ([#2255](https://github.com/feathersjs/feathers/issues/2255)) ([2dafb7c](https://github.com/feathersjs/feathers/commit/2dafb7ce14ba57406aeec13d10ca45b1e709bee9))
152
+ # [5.0.0-pre.7](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.6...v5.0.0-pre.7) (2021-08-09)
100
153
 
154
+ **Note:** Version bump only for package @feathersjs/configuration
101
155
 
156
+ # [5.0.0-pre.6](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.5...v5.0.0-pre.6) (2021-08-08)
102
157
 
158
+ **Note:** Version bump only for package @feathersjs/configuration
103
159
 
160
+ # [5.0.0-pre.5](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.4...v5.0.0-pre.5) (2021-06-23)
104
161
 
105
- # [5.0.0-pre.1](https://github.com/feathersjs/feathers/compare/v4.5.11...v5.0.0-pre.1) (2020-12-17)
162
+ ### Bug Fixes
106
163
 
164
+ - **koa:** Use extended query parser for compatibility ([#2397](https://github.com/feathersjs/feathers/issues/2397)) ([b2944ba](https://github.com/feathersjs/feathers/commit/b2944bac3ec6d5ecc80dc518cd4e58093692db74))
107
165
 
166
+ # [5.0.0-pre.4](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.3...v5.0.0-pre.4) (2021-05-13)
108
167
 
109
- # [5.0.0-pre.0](https://github.com/feathersjs/feathers/compare/v4.5.4...v5.0.0-pre.0) (2020-05-19)
168
+ **Note:** Version bump only for package @feathersjs/configuration
110
169
 
170
+ # [5.0.0-pre.3](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.2...v5.0.0-pre.3) (2021-04-21)
111
171
 
112
- ### chore
172
+ ### Bug Fixes
113
173
 
114
- * **configuration:** Remove environment variable substitution ([#1942](https://github.com/feathersjs/feathers/issues/1942)) ([caaa21f](https://github.com/feathersjs/feathers/commit/caaa21ffdc6a8dcac82fb403c91d9d4b781a6c0a))
174
+ - **typescript:** Improve TypeScript backwards compatibility ([#2310](https://github.com/feathersjs/feathers/issues/2310)) ([f33be73](https://github.com/feathersjs/feathers/commit/f33be73fc46a533efb15df9aab0658e3240d3897))
115
175
 
176
+ ### Features
116
177
 
117
- ### BREAKING CHANGES
178
+ - **dependencies:** Remove direct debug dependency ([#2296](https://github.com/feathersjs/feathers/issues/2296)) ([501d416](https://github.com/feathersjs/feathers/commit/501d4164d30c6a126906dc640cdfdc82207ba34a))
118
179
 
119
- * **configuration:** Falls back to node-config instead of adding additional
120
- functionality like path replacements and automatic environment variable insertion.
180
+ # [5.0.0-pre.2](https://github.com/feathersjs/feathers/compare/v5.0.0-beta.1...v5.0.0-pre.2) (2021-04-06)
121
181
 
182
+ **Note:** Version bump only for package @feathersjs/configuration
122
183
 
184
+ # [5.0.0-beta.1](https://github.com/feathersjs/feathers/compare/v5.0.0-beta.0...v5.0.0-beta.1) (2021-04-03)
123
185
 
186
+ **Note:** Version bump only for package @feathersjs/configuration
124
187
 
188
+ # [5.0.0-beta.0](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.1...v5.0.0-beta.0) (2021-03-28)
125
189
 
126
- # [5.0.0-pre.0](https://github.com/feathersjs/feathers/compare/v4.5.4...v5.0.0-pre.0) (2020-05-19)
190
+ ### Bug Fixes
127
191
 
192
+ - Update Grant usage and other dependencies ([#2264](https://github.com/feathersjs/feathers/issues/2264)) ([7b0f8fa](https://github.com/feathersjs/feathers/commit/7b0f8fad252419ed0ad0bf259cdf3104d322ab60))
128
193
 
129
- ### chore
194
+ ### Features
130
195
 
131
- * **configuration:** Remove environment variable substitution ([#1942](https://github.com/feathersjs/feathers/issues/1942)) ([caaa21f](https://github.com/feathersjs/feathers/commit/caaa21ffdc6a8dcac82fb403c91d9d4b781a6c0a))
196
+ - Feathers v5 core refactoring and features ([#2255](https://github.com/feathersjs/feathers/issues/2255)) ([2dafb7c](https://github.com/feathersjs/feathers/commit/2dafb7ce14ba57406aeec13d10ca45b1e709bee9))
132
197
 
198
+ # [5.0.0-pre.1](https://github.com/feathersjs/feathers/compare/v4.5.11...v5.0.0-pre.1) (2020-12-17)
133
199
 
134
- ### BREAKING CHANGES
200
+ # [5.0.0-pre.0](https://github.com/feathersjs/feathers/compare/v4.5.4...v5.0.0-pre.0) (2020-05-19)
135
201
 
136
- * **configuration:** Falls back to node-config instead of adding additional
137
- functionality like path replacements and automatic environment variable insertion.
202
+ ### chore
138
203
 
204
+ - **configuration:** Remove environment variable substitution ([#1942](https://github.com/feathersjs/feathers/issues/1942)) ([caaa21f](https://github.com/feathersjs/feathers/commit/caaa21ffdc6a8dcac82fb403c91d9d4b781a6c0a))
139
205
 
206
+ ### BREAKING CHANGES
140
207
 
208
+ - **configuration:** Falls back to node-config instead of adding additional
209
+ functionality like path replacements and automatic environment variable insertion.
141
210
 
142
- ## [4.5.9](https://github.com/feathersjs/feathers/compare/v4.5.8...v4.5.9) (2020-10-09)
211
+ # [5.0.0-pre.0](https://github.com/feathersjs/feathers/compare/v4.5.4...v5.0.0-pre.0) (2020-05-19)
143
212
 
213
+ ### chore
144
214
 
145
- ### Bug Fixes
215
+ - **configuration:** Remove environment variable substitution ([#1942](https://github.com/feathersjs/feathers/issues/1942)) ([caaa21f](https://github.com/feathersjs/feathers/commit/caaa21ffdc6a8dcac82fb403c91d9d4b781a6c0a))
146
216
 
147
- * **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))
217
+ ### BREAKING CHANGES
148
218
 
219
+ - **configuration:** Falls back to node-config instead of adding additional
220
+ functionality like path replacements and automatic environment variable insertion.
149
221
 
222
+ ## [4.5.9](https://github.com/feathersjs/feathers/compare/v4.5.8...v4.5.9) (2020-10-09)
150
223
 
224
+ ### Bug Fixes
151
225
 
226
+ - **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))
152
227
 
153
228
  ## [4.5.8](https://github.com/feathersjs/feathers/compare/v4.5.7...v4.5.8) (2020-08-12)
154
229
 
155
230
  **Note:** Version bump only for package @feathersjs/configuration
156
231
 
157
-
158
-
159
-
160
-
161
232
  ## [4.5.7](https://github.com/feathersjs/feathers/compare/v4.5.6...v4.5.7) (2020-07-24)
162
233
 
163
234
  **Note:** Version bump only for package @feathersjs/configuration
164
235
 
165
-
166
-
167
-
168
-
169
236
  ## [4.5.5](https://github.com/feathersjs/feathers/compare/v4.5.4...v4.5.5) (2020-07-11)
170
237
 
171
238
  **Note:** Version bump only for package @feathersjs/configuration
172
239
 
173
-
174
-
175
-
176
-
177
240
  ## [4.5.3](https://github.com/feathersjs/feathers/compare/v4.5.2...v4.5.3) (2020-04-17)
178
241
 
179
242
  **Note:** Version bump only for package @feathersjs/configuration
180
243
 
181
-
182
-
183
-
184
-
185
244
  ## [4.5.2](https://github.com/feathersjs/feathers/compare/v4.5.1...v4.5.2) (2020-03-04)
186
245
 
187
246
  **Note:** Version bump only for package @feathersjs/configuration
188
247
 
189
-
190
-
191
-
192
-
193
248
  ## [4.5.1](https://github.com/feathersjs/feathers/compare/v4.5.0...v4.5.1) (2020-01-24)
194
249
 
195
250
  **Note:** Version bump only for package @feathersjs/configuration
196
251
 
197
-
198
-
199
-
200
-
201
252
  # [4.5.0](https://github.com/feathersjs/feathers/compare/v4.4.3...v4.5.0) (2020-01-18)
202
253
 
203
254
  **Note:** Version bump only for package @feathersjs/configuration
204
255
 
205
-
206
-
207
-
208
-
209
256
  ## [4.4.3](https://github.com/feathersjs/feathers/compare/v4.4.1...v4.4.3) (2019-12-06)
210
257
 
211
258
  **Note:** Version bump only for package @feathersjs/configuration
212
259
 
213
-
214
-
215
-
216
-
217
260
  ## [4.4.1](https://github.com/feathersjs/feathers/compare/v4.4.0...v4.4.1) (2019-11-27)
218
261
 
219
262
  **Note:** Version bump only for package @feathersjs/configuration
220
263
 
221
-
222
-
223
-
224
-
225
264
  # [4.4.0](https://github.com/feathersjs/feathers/compare/v4.3.11...v4.4.0) (2019-11-27)
226
265
 
227
266
  **Note:** Version bump only for package @feathersjs/configuration
228
267
 
229
-
230
-
231
-
232
-
233
268
  ## [4.3.11](https://github.com/feathersjs/feathers/compare/v4.3.10...v4.3.11) (2019-11-11)
234
269
 
235
270
  **Note:** Version bump only for package @feathersjs/configuration
236
271
 
237
-
238
-
239
-
240
-
241
272
  ## [4.3.10](https://github.com/feathersjs/feathers/compare/v4.3.9...v4.3.10) (2019-10-26)
242
273
 
243
274
  **Note:** Version bump only for package @feathersjs/configuration
244
275
 
245
-
246
-
247
-
248
-
249
276
  ## [4.3.9](https://github.com/feathersjs/feathers/compare/v4.3.8...v4.3.9) (2019-10-26)
250
277
 
251
278
  **Note:** Version bump only for package @feathersjs/configuration
252
279
 
253
-
254
-
255
-
256
-
257
280
  ## [4.3.7](https://github.com/feathersjs/feathers/compare/v4.3.6...v4.3.7) (2019-10-14)
258
281
 
259
282
  **Note:** Version bump only for package @feathersjs/configuration
260
283
 
261
-
262
-
263
-
264
-
265
284
  ## [4.3.4](https://github.com/feathersjs/feathers/compare/v4.3.3...v4.3.4) (2019-10-03)
266
285
 
267
286
  **Note:** Version bump only for package @feathersjs/configuration
268
287
 
269
-
270
-
271
-
272
-
273
288
  ## [4.3.3](https://github.com/feathersjs/feathers/compare/v4.3.2...v4.3.3) (2019-09-21)
274
289
 
275
-
276
290
  ### Bug Fixes
277
291
 
278
- * Small improvements in dependencies and code sturcture ([#1562](https://github.com/feathersjs/feathers/issues/1562)) ([42c13e2](https://github.com/feathersjs/feathers/commit/42c13e2))
279
-
280
-
281
-
282
-
292
+ - Small improvements in dependencies and code sturcture ([#1562](https://github.com/feathersjs/feathers/issues/1562)) ([42c13e2](https://github.com/feathersjs/feathers/commit/42c13e2))
283
293
 
284
294
  ## [4.3.2](https://github.com/feathersjs/feathers/compare/v4.3.1...v4.3.2) (2019-09-16)
285
295
 
286
296
  **Note:** Version bump only for package @feathersjs/configuration
287
297
 
288
-
289
-
290
-
291
-
292
298
  ## [4.3.1](https://github.com/feathersjs/feathers/compare/v4.3.0...v4.3.1) (2019-09-09)
293
299
 
294
300
  **Note:** Version bump only for package @feathersjs/configuration
295
301
 
296
-
297
-
298
-
299
-
300
302
  # [4.3.0](https://github.com/feathersjs/feathers/compare/v4.3.0-pre.4...v4.3.0) (2019-08-27)
301
303
 
302
304
  **Note:** Version bump only for package @feathersjs/configuration
303
305
 
304
-
305
-
306
-
307
-
308
306
  # [4.3.0-pre.4](https://github.com/feathersjs/feathers/compare/v4.3.0-pre.3...v4.3.0-pre.4) (2019-08-22)
309
307
 
310
308
  **Note:** Version bump only for package @feathersjs/configuration
311
309
 
312
-
313
-
314
-
315
-
316
310
  # [4.3.0-pre.3](https://github.com/feathersjs/feathers/compare/v4.3.0-pre.2...v4.3.0-pre.3) (2019-08-19)
317
311
 
318
-
319
312
  ### Bug Fixes
320
313
 
321
- * Update all dependencies ([7d53a00](https://github.com/feathersjs/feathers/commit/7d53a00))
322
-
323
-
324
-
325
-
314
+ - Update all dependencies ([7d53a00](https://github.com/feathersjs/feathers/commit/7d53a00))
326
315
 
327
316
  # [4.3.0-pre.2](https://github.com/feathersjs/feathers/compare/v4.3.0-pre.1...v4.3.0-pre.2) (2019-08-02)
328
317
 
329
318
  **Note:** Version bump only for package @feathersjs/configuration
330
319
 
331
-
332
-
333
-
334
-
335
320
  # [4.3.0-pre.1](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.5...v4.3.0-pre.1) (2019-07-11)
336
321
 
337
322
  **Note:** Version bump only for package @feathersjs/configuration
338
323
 
339
-
340
-
341
-
342
-
343
324
  # [4.0.0-pre.5](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.4...v4.0.0-pre.5) (2019-07-10)
344
325
 
345
326
  **Note:** Version bump only for package @feathersjs/configuration
346
327
 
347
-
348
-
349
-
350
-
351
328
  # [4.0.0-pre.4](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.3...v4.0.0-pre.4) (2019-07-05)
352
329
 
353
330
  **Note:** Version bump only for package @feathersjs/configuration
354
331
 
355
-
356
-
357
-
358
-
359
332
  # [4.0.0-pre.3](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.2...v4.0.0-pre.3) (2019-06-01)
360
333
 
361
-
362
334
  ### Bug Fixes
363
335
 
364
- * Update dependencies and fix tests ([#1373](https://github.com/feathersjs/feathers/issues/1373)) ([d743a7f](https://github.com/feathersjs/feathers/commit/d743a7f))
365
-
366
-
367
-
368
-
336
+ - Update dependencies and fix tests ([#1373](https://github.com/feathersjs/feathers/issues/1373)) ([d743a7f](https://github.com/feathersjs/feathers/commit/d743a7f))
369
337
 
370
338
  # [4.0.0-pre.2](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.1...v4.0.0-pre.2) (2019-05-15)
371
339
 
372
340
  **Note:** Version bump only for package @feathersjs/configuration
373
341
 
374
-
375
-
376
-
377
-
378
342
  # [4.0.0-pre.1](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.0...v4.0.0-pre.1) (2019-05-08)
379
343
 
380
344
  **Note:** Version bump only for package @feathersjs/configuration
381
345
 
382
-
383
-
384
-
385
-
386
346
  # [4.0.0-pre.0](https://github.com/feathersjs/feathers/compare/v3.2.0-pre.1...v4.0.0-pre.0) (2019-04-21)
387
347
 
388
-
389
348
  ### Bug Fixes
390
349
 
391
- * Update all dependencies to latest ([#1206](https://github.com/feathersjs/feathers/issues/1206)) ([e51e0f6](https://github.com/feathersjs/feathers/commit/e51e0f6))
392
- * **package:** update config to version 3.0.0 ([#1100](https://github.com/feathersjs/feathers/issues/1100)) ([c9f4b42](https://github.com/feathersjs/feathers/commit/c9f4b42))
393
- * Make Mocha a proper devDependency for every repository ([#1053](https://github.com/feathersjs/feathers/issues/1053)) ([9974803](https://github.com/feathersjs/feathers/commit/9974803))
394
- * **package:** update debug to version 3.0.0 ([#45](https://github.com/feathersjs/feathers/issues/45)) ([2391434](https://github.com/feathersjs/feathers/commit/2391434))
395
- * **package:** update debug to version 3.0.1 ([#46](https://github.com/feathersjs/feathers/issues/46)) ([f8ada69](https://github.com/feathersjs/feathers/commit/f8ada69))
396
-
350
+ - Update all dependencies to latest ([#1206](https://github.com/feathersjs/feathers/issues/1206)) ([e51e0f6](https://github.com/feathersjs/feathers/commit/e51e0f6))
351
+ - **package:** update config to version 3.0.0 ([#1100](https://github.com/feathersjs/feathers/issues/1100)) ([c9f4b42](https://github.com/feathersjs/feathers/commit/c9f4b42))
352
+ - Make Mocha a proper devDependency for every repository ([#1053](https://github.com/feathersjs/feathers/issues/1053)) ([9974803](https://github.com/feathersjs/feathers/commit/9974803))
353
+ - **package:** update debug to version 3.0.0 ([#45](https://github.com/feathersjs/feathers/issues/45)) ([2391434](https://github.com/feathersjs/feathers/commit/2391434))
354
+ - **package:** update debug to version 3.0.1 ([#46](https://github.com/feathersjs/feathers/issues/46)) ([f8ada69](https://github.com/feathersjs/feathers/commit/f8ada69))
397
355
 
398
356
  ### Features
399
357
 
400
- * Add TypeScript definitions ([#1275](https://github.com/feathersjs/feathers/issues/1275)) ([9dd6713](https://github.com/feathersjs/feathers/commit/9dd6713))
401
-
402
-
403
-
404
-
358
+ - Add TypeScript definitions ([#1275](https://github.com/feathersjs/feathers/issues/1275)) ([9dd6713](https://github.com/feathersjs/feathers/commit/9dd6713))
405
359
 
406
360
  ## [2.0.6](https://github.com/feathersjs/feathers/compare/@feathersjs/configuration@2.0.5...@feathersjs/configuration@2.0.6) (2019-01-02)
407
361
 
408
362
  **Note:** Version bump only for package @feathersjs/configuration
409
363
 
410
-
411
-
412
-
413
-
414
364
  <a name="2.0.5"></a>
415
- ## [2.0.5](https://github.com/feathersjs/feathers/compare/@feathersjs/configuration@2.0.4...@feathersjs/configuration@2.0.5) (2018-12-16)
416
365
 
366
+ ## [2.0.5](https://github.com/feathersjs/feathers/compare/@feathersjs/configuration@2.0.4...@feathersjs/configuration@2.0.5) (2018-12-16)
417
367
 
418
368
  ### Bug Fixes
419
369
 
420
- * Make Mocha a proper devDependency for every repository ([#1053](https://github.com/feathersjs/feathers/issues/1053)) ([9974803](https://github.com/feathersjs/feathers/commit/9974803))
421
- * **package:** update config to version 3.0.0 ([#1100](https://github.com/feathersjs/feathers/issues/1100)) ([c9f4b42](https://github.com/feathersjs/feathers/commit/c9f4b42))
422
-
423
-
424
-
425
-
370
+ - Make Mocha a proper devDependency for every repository ([#1053](https://github.com/feathersjs/feathers/issues/1053)) ([9974803](https://github.com/feathersjs/feathers/commit/9974803))
371
+ - **package:** update config to version 3.0.0 ([#1100](https://github.com/feathersjs/feathers/issues/1100)) ([c9f4b42](https://github.com/feathersjs/feathers/commit/c9f4b42))
426
372
 
427
373
  <a name="2.0.4"></a>
374
+
428
375
  ## [2.0.4](https://github.com/feathersjs/feathers/compare/@feathersjs/configuration@2.0.3...@feathersjs/configuration@2.0.4) (2018-09-21)
429
376
 
430
377
  **Note:** Version bump only for package @feathersjs/configuration
431
378
 
432
-
433
-
434
-
435
-
436
379
  <a name="2.0.3"></a>
380
+
437
381
  ## [2.0.3](https://github.com/feathersjs/feathers/compare/@feathersjs/configuration@2.0.2...@feathersjs/configuration@2.0.3) (2018-09-17)
438
382
 
439
383
  **Note:** Version bump only for package @feathersjs/configuration
440
384
 
441
-
442
-
443
-
444
-
445
385
  <a name="2.0.2"></a>
386
+
446
387
  ## [2.0.2](https://github.com/feathersjs/feathers/compare/@feathersjs/configuration@2.0.1...@feathersjs/configuration@2.0.2) (2018-09-02)
447
388
 
448
389
  **Note:** Version bump only for package @feathersjs/configuration
449
390
 
450
391
  <a name="2.0.1"></a>
392
+
451
393
  ## 2.0.1
452
394
 
453
395
  - Migrate to Monorepo ([feathers#462](https://github.com/feathersjs/feathers/issues/462))
454
396
 
455
397
  ## [v2.0.0](https://github.com/feathersjs/configuration/tree/v2.0.0) (2018-07-30)
398
+
456
399
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v1.0.2...v2.0.0)
457
400
 
458
401
  **Closed issues:**
@@ -467,13 +410,15 @@ functionality like path replacements and automatic environment variable insertio
467
410
  - Update mocha to the latest version 🚀 [\#56](https://github.com/feathersjs/configuration/pull/56) ([greenkeeper[bot]](https://github.com/apps/greenkeeper))
468
411
 
469
412
  ## [v1.0.2](https://github.com/feathersjs/configuration/tree/v1.0.2) (2018-01-02)
413
+
470
414
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v1.0.1...v1.0.2)
471
415
 
472
416
  **Merged pull requests:**
473
417
 
474
- - 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))
418
+ - 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))
475
419
 
476
420
  ## [v1.0.1](https://github.com/feathersjs/configuration/tree/v1.0.1) (2017-11-16)
421
+
477
422
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v1.0.0...v1.0.1)
478
423
 
479
424
  **Merged pull requests:**
@@ -482,9 +427,11 @@ functionality like path replacements and automatic environment variable insertio
482
427
  - Update nsp to the latest version 🚀 [\#52](https://github.com/feathersjs/configuration/pull/52) ([greenkeeper[bot]](https://github.com/apps/greenkeeper))
483
428
 
484
429
  ## [v1.0.0](https://github.com/feathersjs/configuration/tree/v1.0.0) (2017-11-01)
430
+
485
431
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v1.0.0-pre.1...v1.0.0)
486
432
 
487
433
  ## [v1.0.0-pre.1](https://github.com/feathersjs/configuration/tree/v1.0.0-pre.1) (2017-10-23)
434
+
488
435
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.4.2...v1.0.0-pre.1)
489
436
 
490
437
  **Closed issues:**
@@ -496,6 +443,7 @@ functionality like path replacements and automatic environment variable insertio
496
443
  - Update to new plugin infrastructure and npm scopes [\#51](https://github.com/feathersjs/configuration/pull/51) ([daffl](https://github.com/daffl))
497
444
 
498
445
  ## [v0.4.2](https://github.com/feathersjs/configuration/tree/v0.4.2) (2017-10-15)
446
+
499
447
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.4.1...v0.4.2)
500
448
 
501
449
  **Closed issues:**
@@ -507,7 +455,7 @@ functionality like path replacements and automatic environment variable insertio
507
455
  - Nested configuration [\#38](https://github.com/feathersjs/configuration/issues/38)
508
456
  - Stuck in configuration loophole... [\#37](https://github.com/feathersjs/configuration/issues/37)
509
457
  - Docs are wrong [\#36](https://github.com/feathersjs/configuration/issues/36)
510
- - Why use "NODE\_ENV=development" with default.json? [\#33](https://github.com/feathersjs/configuration/issues/33)
458
+ - Why use "NODE_ENV=development" with default.json? [\#33](https://github.com/feathersjs/configuration/issues/33)
511
459
 
512
460
  **Merged pull requests:**
513
461
 
@@ -523,6 +471,7 @@ functionality like path replacements and automatic environment variable insertio
523
471
  - 👻😱 Node.js 0.10 is unmaintained 😱👻 [\#30](https://github.com/feathersjs/configuration/pull/30) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot))
524
472
 
525
473
  ## [v0.4.1](https://github.com/feathersjs/configuration/tree/v0.4.1) (2016-10-24)
474
+
526
475
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.4.0...v0.4.1)
527
476
 
528
477
  **Closed issues:**
@@ -535,6 +484,7 @@ functionality like path replacements and automatic environment variable insertio
535
484
  - jshint —\> semistandard [\#28](https://github.com/feathersjs/configuration/pull/28) ([corymsmith](https://github.com/corymsmith))
536
485
 
537
486
  ## [v0.4.0](https://github.com/feathersjs/configuration/tree/v0.4.0) (2016-10-22)
487
+
538
488
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.3.3...v0.4.0)
539
489
 
540
490
  **Implemented enhancements:**
@@ -547,9 +497,11 @@ functionality like path replacements and automatic environment variable insertio
547
497
  - Make this repo more about managing configuration [\#24](https://github.com/feathersjs/configuration/issues/24)
548
498
 
549
499
  ## [v0.3.3](https://github.com/feathersjs/configuration/tree/v0.3.3) (2016-09-12)
500
+
550
501
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.3.2...v0.3.3)
551
502
 
552
503
  ## [v0.3.2](https://github.com/feathersjs/configuration/tree/v0.3.2) (2016-09-12)
504
+
553
505
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.3.1...v0.3.2)
554
506
 
555
507
  **Closed issues:**
@@ -561,6 +513,7 @@ functionality like path replacements and automatic environment variable insertio
561
513
  - Remove check for development mode [\#21](https://github.com/feathersjs/configuration/pull/21) ([daffl](https://github.com/daffl))
562
514
 
563
515
  ## [v0.3.1](https://github.com/feathersjs/configuration/tree/v0.3.1) (2016-08-15)
516
+
564
517
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.3.0...v0.3.1)
565
518
 
566
519
  **Merged pull requests:**
@@ -569,17 +522,19 @@ functionality like path replacements and automatic environment variable insertio
569
522
  - Update mocha to version 3.0.0 🚀 [\#18](https://github.com/feathersjs/configuration/pull/18) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot))
570
523
 
571
524
  ## [v0.3.0](https://github.com/feathersjs/configuration/tree/v0.3.0) (2016-05-22)
525
+
572
526
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.2.3...v0.3.0)
573
527
 
574
528
  **Closed issues:**
575
529
 
576
- - \<NODE\_ENV\>.json config need deep merge options [\#16](https://github.com/feathersjs/configuration/issues/16)
530
+ - \<NODE_ENV\>.json config need deep merge options [\#16](https://github.com/feathersjs/configuration/issues/16)
577
531
 
578
532
  **Merged pull requests:**
579
533
 
580
534
  - Add functionality for deeply extending configuration [\#17](https://github.com/feathersjs/configuration/pull/17) ([daffl](https://github.com/daffl))
581
535
 
582
536
  ## [v0.2.3](https://github.com/feathersjs/configuration/tree/v0.2.3) (2016-04-24)
537
+
583
538
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.2.2...v0.2.3)
584
539
 
585
540
  **Closed issues:**
@@ -592,6 +547,7 @@ functionality like path replacements and automatic environment variable insertio
592
547
  - Update all dependencies 🌴 [\#10](https://github.com/feathersjs/configuration/pull/10) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot))
593
548
 
594
549
  ## [v0.2.2](https://github.com/feathersjs/configuration/tree/v0.2.2) (2016-03-27)
550
+
595
551
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.2.1...v0.2.2)
596
552
 
597
553
  **Merged pull requests:**
@@ -599,6 +555,7 @@ functionality like path replacements and automatic environment variable insertio
599
555
  - Expanding environment variables in \<env\>.json [\#9](https://github.com/feathersjs/configuration/pull/9) ([derek-watson](https://github.com/derek-watson))
600
556
 
601
557
  ## [v0.2.1](https://github.com/feathersjs/configuration/tree/v0.2.1) (2016-03-12)
558
+
602
559
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.2.0...v0.2.1)
603
560
 
604
561
  **Merged pull requests:**
@@ -606,6 +563,7 @@ functionality like path replacements and automatic environment variable insertio
606
563
  - Makes sure that arrays get converted properly [\#7](https://github.com/feathersjs/configuration/pull/7) ([daffl](https://github.com/daffl))
607
564
 
608
565
  ## [v0.2.0](https://github.com/feathersjs/configuration/tree/v0.2.0) (2016-03-09)
566
+
609
567
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.1.1...v0.2.0)
610
568
 
611
569
  **Closed issues:**
@@ -617,11 +575,12 @@ functionality like path replacements and automatic environment variable insertio
617
575
  - Implement an escape character [\#6](https://github.com/feathersjs/configuration/pull/6) ([daffl](https://github.com/daffl))
618
576
 
619
577
  ## [v0.1.1](https://github.com/feathersjs/configuration/tree/v0.1.1) (2016-03-09)
578
+
620
579
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.1.0...v0.1.1)
621
580
 
622
581
  **Closed issues:**
623
582
 
624
- - Configuration should recursively go through the values [\#2](https://github.com/feathersjs/configuration/issues/2)
583
+ - Configuration should recursively go through the values [\#2](https://github.com/feathersjs/configuration/issues/2)
625
584
 
626
585
  **Merged pull requests:**
627
586
 
@@ -631,5 +590,4 @@ functionality like path replacements and automatic environment variable insertio
631
590
 
632
591
  ## [v0.1.0](https://github.com/feathersjs/configuration/tree/v0.1.0) (2015-11-14)
633
592
 
634
-
635
- \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
593
+ \* _This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)_
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2021 Feathers
3
+ Copyright (c) 2023 Feathers Contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # @feathersjs/configuration
2
2
 
3
3
  [![CI](https://github.com/feathersjs/feathers/workflows/CI/badge.svg)](https://github.com/feathersjs/feathers/actions?query=workflow%3ACI)
4
- [![Dependency Status](https://img.shields.io/david/feathersjs/feathers.svg?style=flat-square&path=packages/configuration)](https://david-dm.org/feathersjs/feathers?path=packages/configuration)
5
4
  [![Download Status](https://img.shields.io/npm/dm/@feathersjs/configuration.svg?style=flat-square)](https://www.npmjs.com/package/@feathersjs/configuration)
5
+ [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](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) 2021 [Feathers contributors](https://github.com/feathersjs/feathers/graphs/contributors)
21
+ Copyright (c) 2023 [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(config_1.default).forEach(name => {
15
- const value = config_1.default[name];
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,iDAAkD;AAClD,oDAA4B;AAE5B,MAAM,KAAK,GAAG,qBAAW,CAAC,2BAA2B,CAAC,CAAC;AAEvD,iBAAS,SAAS,IAAI;IACpB,OAAO,CAAC,GAAiB,EAAE,EAAE;QAC3B,IAAI,CAAC,GAAG,EAAE;YACR,OAAO,gBAAM,CAAC;SACf;QAED,KAAK,CAAC,kCAAkC,gBAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;QAEtF,MAAM,CAAC,IAAI,CAAC,gBAAM,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACjC,MAAM,KAAK,GAAI,gBAAc,CAAC,IAAI,CAAC,CAAC;YACpC,KAAK,CAAC,WAAW,IAAI,yBAAyB,EAAE,KAAK,CAAC,CAAC;YACvD,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;QAEH,OAAO,gBAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC,CAAA"}
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.9",
4
+ "version": "5.0.1",
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
- "compile": "shx rm -rf lib/ && tsc",
45
- "test": "npm run compile && npm run mocha",
46
- "mocha": "NODE_CONFIG_DIR=./test/config mocha --config ../../.mocharc.json --recursive test/**.test.ts test/**/*.test.ts"
45
+ "pack": "npm pack --pack-destination ../generators/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,18 +58,19 @@
57
58
  "access": "public"
58
59
  },
59
60
  "dependencies": {
60
- "@feathersjs/commons": "^5.0.0-pre.9",
61
- "@feathersjs/feathers": "^5.0.0-pre.9",
62
- "@types/config": "^0.0.39",
63
- "config": "^3.3.6"
61
+ "@feathersjs/commons": "^5.0.1",
62
+ "@feathersjs/feathers": "^5.0.1",
63
+ "@feathersjs/schema": "^5.0.1",
64
+ "@types/config": "^3.3.0",
65
+ "config": "^3.3.9"
64
66
  },
65
67
  "devDependencies": {
66
- "@types/mocha": "^9.0.0",
67
- "@types/node": "^16.4.13",
68
- "mocha": "^9.0.3",
69
- "shx": "^0.3.3",
70
- "ts-node": "^10.1.0",
71
- "typescript": "^4.3.5"
68
+ "@types/mocha": "^10.0.1",
69
+ "@types/node": "^18.14.6",
70
+ "mocha": "^10.2.0",
71
+ "shx": "^0.3.4",
72
+ "ts-node": "^10.9.1",
73
+ "typescript": "^4.9.5"
72
74
  },
73
- "gitHead": "3d1721a7286e6a7f37bbc38695fe45084023f13b"
75
+ "gitHead": "18b7f4ab0a8075572a81d78956ba1205a9795c91"
74
76
  }
package/src/index.ts CHANGED
@@ -1,23 +1,39 @@
1
- import { Application } from '@feathersjs/feathers';
2
- import { createDebug } from '@feathersjs/commons';
3
- import config from 'config';
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
- debug(`Initializing configuration for ${config.util.getEnv('NODE_ENV')} environment`);
16
+ const configuration: { [key: string]: unknown } = { ...config }
17
+
18
+ debug(`Initializing configuration for ${config.util.getEnv('NODE_ENV')} environment`)
14
19
 
15
- Object.keys(config).forEach(name => {
16
- const value = (config as any)[name];
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
  }