@feathersjs/configuration 5.0.0-pre.9 → 5.0.0

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