@feathersjs/configuration 5.0.0-pre.29 → 5.0.0-pre.30

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,626 +3,355 @@
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.29](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.28...v5.0.0-pre.29) (2022-09-16)
7
-
8
- **Note:** Version bump only for package @feathersjs/configuration
6
+ # [5.0.0-pre.30](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.29...v5.0.0-pre.30) (2022-10-07)
9
7
 
8
+ ### Features
10
9
 
10
+ - **core:** Allow to unregister services at runtime ([#2756](https://github.com/feathersjs/feathers/issues/2756)) ([d16601f](https://github.com/feathersjs/feathers/commit/d16601f2277dca5357866ffdefba2a611f6dc7fa))
11
+ - **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))
11
12
 
13
+ # [5.0.0-pre.29](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.28...v5.0.0-pre.29) (2022-09-16)
12
14
 
15
+ **Note:** Version bump only for package @feathersjs/configuration
13
16
 
14
17
  # [5.0.0-pre.28](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.27...v5.0.0-pre.28) (2022-08-03)
15
18
 
16
-
17
19
  ### Bug Fixes
18
20
 
19
- * **cli:** Improve generated application and client ([#2701](https://github.com/feathersjs/feathers/issues/2701)) ([bd55ffb](https://github.com/feathersjs/feathers/commit/bd55ffb812e89bf215f4515e7f137656ea888c3f))
20
-
21
-
22
-
23
-
21
+ - **cli:** Improve generated application and client ([#2701](https://github.com/feathersjs/feathers/issues/2701)) ([bd55ffb](https://github.com/feathersjs/feathers/commit/bd55ffb812e89bf215f4515e7f137656ea888c3f))
24
22
 
25
23
  # [5.0.0-pre.27](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.26...v5.0.0-pre.27) (2022-07-13)
26
24
 
27
25
  **Note:** Version bump only for package @feathersjs/configuration
28
26
 
29
-
30
-
31
-
32
-
33
27
  # [5.0.0-pre.26](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.25...v5.0.0-pre.26) (2022-06-22)
34
28
 
35
29
  **Note:** Version bump only for package @feathersjs/configuration
36
30
 
37
-
38
-
39
-
40
-
41
31
  # [5.0.0-pre.25](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.24...v5.0.0-pre.25) (2022-06-22)
42
32
 
43
33
  **Note:** Version bump only for package @feathersjs/configuration
44
34
 
45
-
46
-
47
-
48
-
49
35
  # [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
36
 
51
37
  **Note:** Version bump only for package @feathersjs/configuration
52
38
 
53
-
54
-
55
-
56
-
57
39
  # [5.0.0-pre.23](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.22...v5.0.0-pre.23) (2022-06-06)
58
40
 
59
41
  **Note:** Version bump only for package @feathersjs/configuration
60
42
 
61
-
62
-
63
-
64
-
65
43
  # [5.0.0-pre.22](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.21...v5.0.0-pre.22) (2022-05-24)
66
44
 
67
45
  **Note:** Version bump only for package @feathersjs/configuration
68
46
 
69
-
70
-
71
-
72
-
73
47
  # [5.0.0-pre.21](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.20...v5.0.0-pre.21) (2022-05-23)
74
48
 
75
49
  **Note:** Version bump only for package @feathersjs/configuration
76
50
 
77
-
78
-
79
-
80
-
81
51
  # [5.0.0-pre.20](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.19...v5.0.0-pre.20) (2022-05-04)
82
52
 
83
-
84
53
  ### Bug Fixes
85
54
 
86
- * **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))
87
- * **dependencies:** Lock monorepo package version numbers ([#2623](https://github.com/feathersjs/feathers/issues/2623)) ([5640c10](https://github.com/feathersjs/feathers/commit/5640c1020cc139994e695d658c08bad3494db507))
88
-
89
-
90
-
91
-
55
+ - **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))
56
+ - **dependencies:** Lock monorepo package version numbers ([#2623](https://github.com/feathersjs/feathers/issues/2623)) ([5640c10](https://github.com/feathersjs/feathers/commit/5640c1020cc139994e695d658c08bad3494db507))
92
57
 
93
58
  # [5.0.0-pre.19](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.18...v5.0.0-pre.19) (2022-05-01)
94
59
 
95
60
  **Note:** Version bump only for package @feathersjs/configuration
96
61
 
97
-
98
-
99
-
100
-
101
62
  # [5.0.0-pre.18](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.17...v5.0.0-pre.18) (2022-04-11)
102
63
 
103
-
104
64
  ### Features
105
65
 
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))
107
-
108
-
109
-
110
-
66
+ - **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))
111
67
 
112
68
  # [5.0.0-pre.17](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.16...v5.0.0-pre.17) (2022-02-15)
113
69
 
114
70
  **Note:** Version bump only for package @feathersjs/configuration
115
71
 
116
-
117
-
118
-
119
-
120
72
  # [5.0.0-pre.16](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.15...v5.0.0-pre.16) (2022-01-12)
121
73
 
122
74
  **Note:** Version bump only for package @feathersjs/configuration
123
75
 
124
-
125
-
126
-
127
-
128
76
  # [5.0.0-pre.15](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.14...v5.0.0-pre.15) (2021-11-27)
129
77
 
130
78
  **Note:** Version bump only for package @feathersjs/configuration
131
79
 
132
-
133
-
134
-
135
-
136
80
  # [5.0.0-pre.14](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.13...v5.0.0-pre.14) (2021-10-13)
137
81
 
138
82
  **Note:** Version bump only for package @feathersjs/configuration
139
83
 
140
-
141
-
142
-
143
-
144
84
  # [5.0.0-pre.13](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.12...v5.0.0-pre.13) (2021-10-13)
145
85
 
146
86
  **Note:** Version bump only for package @feathersjs/configuration
147
87
 
148
-
149
-
150
-
151
-
152
88
  # [5.0.0-pre.12](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.11...v5.0.0-pre.12) (2021-10-12)
153
89
 
154
90
  **Note:** Version bump only for package @feathersjs/configuration
155
91
 
156
-
157
-
158
-
159
-
160
92
  # [5.0.0-pre.11](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.10...v5.0.0-pre.11) (2021-10-06)
161
93
 
162
94
  **Note:** Version bump only for package @feathersjs/configuration
163
95
 
164
-
165
-
166
-
167
-
168
96
  # [5.0.0-pre.10](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.9...v5.0.0-pre.10) (2021-09-19)
169
97
 
170
98
  **Note:** Version bump only for package @feathersjs/configuration
171
99
 
172
-
173
-
174
-
175
-
176
100
  # [5.0.0-pre.9](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.8...v5.0.0-pre.9) (2021-08-09)
177
101
 
178
102
  **Note:** Version bump only for package @feathersjs/configuration
179
103
 
180
-
181
-
182
-
183
-
184
104
  # [5.0.0-pre.8](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.7...v5.0.0-pre.8) (2021-08-09)
185
105
 
186
106
  **Note:** Version bump only for package @feathersjs/configuration
187
107
 
188
-
189
-
190
-
191
-
192
108
  # [5.0.0-pre.7](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.6...v5.0.0-pre.7) (2021-08-09)
193
109
 
194
110
  **Note:** Version bump only for package @feathersjs/configuration
195
111
 
196
-
197
-
198
-
199
-
200
112
  # [5.0.0-pre.6](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.5...v5.0.0-pre.6) (2021-08-08)
201
113
 
202
114
  **Note:** Version bump only for package @feathersjs/configuration
203
115
 
204
-
205
-
206
-
207
-
208
116
  # [5.0.0-pre.5](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.4...v5.0.0-pre.5) (2021-06-23)
209
117
 
210
-
211
118
  ### Bug Fixes
212
119
 
213
- * **koa:** Use extended query parser for compatibility ([#2397](https://github.com/feathersjs/feathers/issues/2397)) ([b2944ba](https://github.com/feathersjs/feathers/commit/b2944bac3ec6d5ecc80dc518cd4e58093692db74))
214
-
215
-
216
-
217
-
120
+ - **koa:** Use extended query parser for compatibility ([#2397](https://github.com/feathersjs/feathers/issues/2397)) ([b2944ba](https://github.com/feathersjs/feathers/commit/b2944bac3ec6d5ecc80dc518cd4e58093692db74))
218
121
 
219
122
  # [5.0.0-pre.4](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.3...v5.0.0-pre.4) (2021-05-13)
220
123
 
221
124
  **Note:** Version bump only for package @feathersjs/configuration
222
125
 
223
-
224
-
225
-
226
-
227
126
  # [5.0.0-pre.3](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.2...v5.0.0-pre.3) (2021-04-21)
228
127
 
229
-
230
128
  ### Bug Fixes
231
129
 
232
- * **typescript:** Improve TypeScript backwards compatibility ([#2310](https://github.com/feathersjs/feathers/issues/2310)) ([f33be73](https://github.com/feathersjs/feathers/commit/f33be73fc46a533efb15df9aab0658e3240d3897))
233
-
130
+ - **typescript:** Improve TypeScript backwards compatibility ([#2310](https://github.com/feathersjs/feathers/issues/2310)) ([f33be73](https://github.com/feathersjs/feathers/commit/f33be73fc46a533efb15df9aab0658e3240d3897))
234
131
 
235
132
  ### Features
236
133
 
237
- * **dependencies:** Remove direct debug dependency ([#2296](https://github.com/feathersjs/feathers/issues/2296)) ([501d416](https://github.com/feathersjs/feathers/commit/501d4164d30c6a126906dc640cdfdc82207ba34a))
238
-
239
-
240
-
241
-
134
+ - **dependencies:** Remove direct debug dependency ([#2296](https://github.com/feathersjs/feathers/issues/2296)) ([501d416](https://github.com/feathersjs/feathers/commit/501d4164d30c6a126906dc640cdfdc82207ba34a))
242
135
 
243
136
  # [5.0.0-pre.2](https://github.com/feathersjs/feathers/compare/v5.0.0-beta.1...v5.0.0-pre.2) (2021-04-06)
244
137
 
245
138
  **Note:** Version bump only for package @feathersjs/configuration
246
139
 
247
-
248
-
249
-
250
-
251
140
  # [5.0.0-beta.1](https://github.com/feathersjs/feathers/compare/v5.0.0-beta.0...v5.0.0-beta.1) (2021-04-03)
252
141
 
253
142
  **Note:** Version bump only for package @feathersjs/configuration
254
143
 
255
-
256
-
257
-
258
-
259
144
  # [5.0.0-beta.0](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.1...v5.0.0-beta.0) (2021-03-28)
260
145
 
261
-
262
146
  ### Bug Fixes
263
147
 
264
- * Update Grant usage and other dependencies ([#2264](https://github.com/feathersjs/feathers/issues/2264)) ([7b0f8fa](https://github.com/feathersjs/feathers/commit/7b0f8fad252419ed0ad0bf259cdf3104d322ab60))
265
-
148
+ - Update Grant usage and other dependencies ([#2264](https://github.com/feathersjs/feathers/issues/2264)) ([7b0f8fa](https://github.com/feathersjs/feathers/commit/7b0f8fad252419ed0ad0bf259cdf3104d322ab60))
266
149
 
267
150
  ### Features
268
151
 
269
- * Feathers v5 core refactoring and features ([#2255](https://github.com/feathersjs/feathers/issues/2255)) ([2dafb7c](https://github.com/feathersjs/feathers/commit/2dafb7ce14ba57406aeec13d10ca45b1e709bee9))
270
-
271
-
272
-
273
-
152
+ - Feathers v5 core refactoring and features ([#2255](https://github.com/feathersjs/feathers/issues/2255)) ([2dafb7c](https://github.com/feathersjs/feathers/commit/2dafb7ce14ba57406aeec13d10ca45b1e709bee9))
274
153
 
275
154
  # [5.0.0-pre.1](https://github.com/feathersjs/feathers/compare/v4.5.11...v5.0.0-pre.1) (2020-12-17)
276
155
 
277
-
278
-
279
156
  # [5.0.0-pre.0](https://github.com/feathersjs/feathers/compare/v4.5.4...v5.0.0-pre.0) (2020-05-19)
280
157
 
281
-
282
158
  ### chore
283
159
 
284
- * **configuration:** Remove environment variable substitution ([#1942](https://github.com/feathersjs/feathers/issues/1942)) ([caaa21f](https://github.com/feathersjs/feathers/commit/caaa21ffdc6a8dcac82fb403c91d9d4b781a6c0a))
285
-
160
+ - **configuration:** Remove environment variable substitution ([#1942](https://github.com/feathersjs/feathers/issues/1942)) ([caaa21f](https://github.com/feathersjs/feathers/commit/caaa21ffdc6a8dcac82fb403c91d9d4b781a6c0a))
286
161
 
287
162
  ### BREAKING CHANGES
288
163
 
289
- * **configuration:** Falls back to node-config instead of adding additional
290
- functionality like path replacements and automatic environment variable insertion.
291
-
292
-
293
-
294
-
164
+ - **configuration:** Falls back to node-config instead of adding additional
165
+ functionality like path replacements and automatic environment variable insertion.
295
166
 
296
167
  # [5.0.0-pre.0](https://github.com/feathersjs/feathers/compare/v4.5.4...v5.0.0-pre.0) (2020-05-19)
297
168
 
298
-
299
169
  ### chore
300
170
 
301
- * **configuration:** Remove environment variable substitution ([#1942](https://github.com/feathersjs/feathers/issues/1942)) ([caaa21f](https://github.com/feathersjs/feathers/commit/caaa21ffdc6a8dcac82fb403c91d9d4b781a6c0a))
302
-
171
+ - **configuration:** Remove environment variable substitution ([#1942](https://github.com/feathersjs/feathers/issues/1942)) ([caaa21f](https://github.com/feathersjs/feathers/commit/caaa21ffdc6a8dcac82fb403c91d9d4b781a6c0a))
303
172
 
304
173
  ### BREAKING CHANGES
305
174
 
306
- * **configuration:** Falls back to node-config instead of adding additional
307
- functionality like path replacements and automatic environment variable insertion.
308
-
309
-
310
-
175
+ - **configuration:** Falls back to node-config instead of adding additional
176
+ functionality like path replacements and automatic environment variable insertion.
311
177
 
312
178
  ## [4.5.9](https://github.com/feathersjs/feathers/compare/v4.5.8...v4.5.9) (2020-10-09)
313
179
 
314
-
315
180
  ### Bug Fixes
316
181
 
317
- * **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))
318
-
319
-
320
-
321
-
182
+ - **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))
322
183
 
323
184
  ## [4.5.8](https://github.com/feathersjs/feathers/compare/v4.5.7...v4.5.8) (2020-08-12)
324
185
 
325
186
  **Note:** Version bump only for package @feathersjs/configuration
326
187
 
327
-
328
-
329
-
330
-
331
188
  ## [4.5.7](https://github.com/feathersjs/feathers/compare/v4.5.6...v4.5.7) (2020-07-24)
332
189
 
333
190
  **Note:** Version bump only for package @feathersjs/configuration
334
191
 
335
-
336
-
337
-
338
-
339
192
  ## [4.5.5](https://github.com/feathersjs/feathers/compare/v4.5.4...v4.5.5) (2020-07-11)
340
193
 
341
194
  **Note:** Version bump only for package @feathersjs/configuration
342
195
 
343
-
344
-
345
-
346
-
347
196
  ## [4.5.3](https://github.com/feathersjs/feathers/compare/v4.5.2...v4.5.3) (2020-04-17)
348
197
 
349
198
  **Note:** Version bump only for package @feathersjs/configuration
350
199
 
351
-
352
-
353
-
354
-
355
200
  ## [4.5.2](https://github.com/feathersjs/feathers/compare/v4.5.1...v4.5.2) (2020-03-04)
356
201
 
357
202
  **Note:** Version bump only for package @feathersjs/configuration
358
203
 
359
-
360
-
361
-
362
-
363
204
  ## [4.5.1](https://github.com/feathersjs/feathers/compare/v4.5.0...v4.5.1) (2020-01-24)
364
205
 
365
206
  **Note:** Version bump only for package @feathersjs/configuration
366
207
 
367
-
368
-
369
-
370
-
371
208
  # [4.5.0](https://github.com/feathersjs/feathers/compare/v4.4.3...v4.5.0) (2020-01-18)
372
209
 
373
210
  **Note:** Version bump only for package @feathersjs/configuration
374
211
 
375
-
376
-
377
-
378
-
379
212
  ## [4.4.3](https://github.com/feathersjs/feathers/compare/v4.4.1...v4.4.3) (2019-12-06)
380
213
 
381
214
  **Note:** Version bump only for package @feathersjs/configuration
382
215
 
383
-
384
-
385
-
386
-
387
216
  ## [4.4.1](https://github.com/feathersjs/feathers/compare/v4.4.0...v4.4.1) (2019-11-27)
388
217
 
389
218
  **Note:** Version bump only for package @feathersjs/configuration
390
219
 
391
-
392
-
393
-
394
-
395
220
  # [4.4.0](https://github.com/feathersjs/feathers/compare/v4.3.11...v4.4.0) (2019-11-27)
396
221
 
397
222
  **Note:** Version bump only for package @feathersjs/configuration
398
223
 
399
-
400
-
401
-
402
-
403
224
  ## [4.3.11](https://github.com/feathersjs/feathers/compare/v4.3.10...v4.3.11) (2019-11-11)
404
225
 
405
226
  **Note:** Version bump only for package @feathersjs/configuration
406
227
 
407
-
408
-
409
-
410
-
411
228
  ## [4.3.10](https://github.com/feathersjs/feathers/compare/v4.3.9...v4.3.10) (2019-10-26)
412
229
 
413
230
  **Note:** Version bump only for package @feathersjs/configuration
414
231
 
415
-
416
-
417
-
418
-
419
232
  ## [4.3.9](https://github.com/feathersjs/feathers/compare/v4.3.8...v4.3.9) (2019-10-26)
420
233
 
421
234
  **Note:** Version bump only for package @feathersjs/configuration
422
235
 
423
-
424
-
425
-
426
-
427
236
  ## [4.3.7](https://github.com/feathersjs/feathers/compare/v4.3.6...v4.3.7) (2019-10-14)
428
237
 
429
238
  **Note:** Version bump only for package @feathersjs/configuration
430
239
 
431
-
432
-
433
-
434
-
435
240
  ## [4.3.4](https://github.com/feathersjs/feathers/compare/v4.3.3...v4.3.4) (2019-10-03)
436
241
 
437
242
  **Note:** Version bump only for package @feathersjs/configuration
438
243
 
439
-
440
-
441
-
442
-
443
244
  ## [4.3.3](https://github.com/feathersjs/feathers/compare/v4.3.2...v4.3.3) (2019-09-21)
444
245
 
445
-
446
246
  ### Bug Fixes
447
247
 
448
- * Small improvements in dependencies and code sturcture ([#1562](https://github.com/feathersjs/feathers/issues/1562)) ([42c13e2](https://github.com/feathersjs/feathers/commit/42c13e2))
449
-
450
-
451
-
452
-
248
+ - Small improvements in dependencies and code sturcture ([#1562](https://github.com/feathersjs/feathers/issues/1562)) ([42c13e2](https://github.com/feathersjs/feathers/commit/42c13e2))
453
249
 
454
250
  ## [4.3.2](https://github.com/feathersjs/feathers/compare/v4.3.1...v4.3.2) (2019-09-16)
455
251
 
456
252
  **Note:** Version bump only for package @feathersjs/configuration
457
253
 
458
-
459
-
460
-
461
-
462
254
  ## [4.3.1](https://github.com/feathersjs/feathers/compare/v4.3.0...v4.3.1) (2019-09-09)
463
255
 
464
256
  **Note:** Version bump only for package @feathersjs/configuration
465
257
 
466
-
467
-
468
-
469
-
470
258
  # [4.3.0](https://github.com/feathersjs/feathers/compare/v4.3.0-pre.4...v4.3.0) (2019-08-27)
471
259
 
472
260
  **Note:** Version bump only for package @feathersjs/configuration
473
261
 
474
-
475
-
476
-
477
-
478
262
  # [4.3.0-pre.4](https://github.com/feathersjs/feathers/compare/v4.3.0-pre.3...v4.3.0-pre.4) (2019-08-22)
479
263
 
480
264
  **Note:** Version bump only for package @feathersjs/configuration
481
265
 
482
-
483
-
484
-
485
-
486
266
  # [4.3.0-pre.3](https://github.com/feathersjs/feathers/compare/v4.3.0-pre.2...v4.3.0-pre.3) (2019-08-19)
487
267
 
488
-
489
268
  ### Bug Fixes
490
269
 
491
- * Update all dependencies ([7d53a00](https://github.com/feathersjs/feathers/commit/7d53a00))
492
-
493
-
494
-
495
-
270
+ - Update all dependencies ([7d53a00](https://github.com/feathersjs/feathers/commit/7d53a00))
496
271
 
497
272
  # [4.3.0-pre.2](https://github.com/feathersjs/feathers/compare/v4.3.0-pre.1...v4.3.0-pre.2) (2019-08-02)
498
273
 
499
274
  **Note:** Version bump only for package @feathersjs/configuration
500
275
 
501
-
502
-
503
-
504
-
505
276
  # [4.3.0-pre.1](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.5...v4.3.0-pre.1) (2019-07-11)
506
277
 
507
278
  **Note:** Version bump only for package @feathersjs/configuration
508
279
 
509
-
510
-
511
-
512
-
513
280
  # [4.0.0-pre.5](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.4...v4.0.0-pre.5) (2019-07-10)
514
281
 
515
282
  **Note:** Version bump only for package @feathersjs/configuration
516
283
 
517
-
518
-
519
-
520
-
521
284
  # [4.0.0-pre.4](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.3...v4.0.0-pre.4) (2019-07-05)
522
285
 
523
286
  **Note:** Version bump only for package @feathersjs/configuration
524
287
 
525
-
526
-
527
-
528
-
529
288
  # [4.0.0-pre.3](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.2...v4.0.0-pre.3) (2019-06-01)
530
289
 
531
-
532
290
  ### Bug Fixes
533
291
 
534
- * Update dependencies and fix tests ([#1373](https://github.com/feathersjs/feathers/issues/1373)) ([d743a7f](https://github.com/feathersjs/feathers/commit/d743a7f))
535
-
536
-
537
-
538
-
292
+ - Update dependencies and fix tests ([#1373](https://github.com/feathersjs/feathers/issues/1373)) ([d743a7f](https://github.com/feathersjs/feathers/commit/d743a7f))
539
293
 
540
294
  # [4.0.0-pre.2](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.1...v4.0.0-pre.2) (2019-05-15)
541
295
 
542
296
  **Note:** Version bump only for package @feathersjs/configuration
543
297
 
544
-
545
-
546
-
547
-
548
298
  # [4.0.0-pre.1](https://github.com/feathersjs/feathers/compare/v4.0.0-pre.0...v4.0.0-pre.1) (2019-05-08)
549
299
 
550
300
  **Note:** Version bump only for package @feathersjs/configuration
551
301
 
552
-
553
-
554
-
555
-
556
302
  # [4.0.0-pre.0](https://github.com/feathersjs/feathers/compare/v3.2.0-pre.1...v4.0.0-pre.0) (2019-04-21)
557
303
 
558
-
559
304
  ### Bug Fixes
560
305
 
561
- * Update all dependencies to latest ([#1206](https://github.com/feathersjs/feathers/issues/1206)) ([e51e0f6](https://github.com/feathersjs/feathers/commit/e51e0f6))
562
- * **package:** update config to version 3.0.0 ([#1100](https://github.com/feathersjs/feathers/issues/1100)) ([c9f4b42](https://github.com/feathersjs/feathers/commit/c9f4b42))
563
- * Make Mocha a proper devDependency for every repository ([#1053](https://github.com/feathersjs/feathers/issues/1053)) ([9974803](https://github.com/feathersjs/feathers/commit/9974803))
564
- * **package:** update debug to version 3.0.0 ([#45](https://github.com/feathersjs/feathers/issues/45)) ([2391434](https://github.com/feathersjs/feathers/commit/2391434))
565
- * **package:** update debug to version 3.0.1 ([#46](https://github.com/feathersjs/feathers/issues/46)) ([f8ada69](https://github.com/feathersjs/feathers/commit/f8ada69))
566
-
306
+ - Update all dependencies to latest ([#1206](https://github.com/feathersjs/feathers/issues/1206)) ([e51e0f6](https://github.com/feathersjs/feathers/commit/e51e0f6))
307
+ - **package:** update config to version 3.0.0 ([#1100](https://github.com/feathersjs/feathers/issues/1100)) ([c9f4b42](https://github.com/feathersjs/feathers/commit/c9f4b42))
308
+ - Make Mocha a proper devDependency for every repository ([#1053](https://github.com/feathersjs/feathers/issues/1053)) ([9974803](https://github.com/feathersjs/feathers/commit/9974803))
309
+ - **package:** update debug to version 3.0.0 ([#45](https://github.com/feathersjs/feathers/issues/45)) ([2391434](https://github.com/feathersjs/feathers/commit/2391434))
310
+ - **package:** update debug to version 3.0.1 ([#46](https://github.com/feathersjs/feathers/issues/46)) ([f8ada69](https://github.com/feathersjs/feathers/commit/f8ada69))
567
311
 
568
312
  ### Features
569
313
 
570
- * Add TypeScript definitions ([#1275](https://github.com/feathersjs/feathers/issues/1275)) ([9dd6713](https://github.com/feathersjs/feathers/commit/9dd6713))
571
-
572
-
573
-
574
-
314
+ - Add TypeScript definitions ([#1275](https://github.com/feathersjs/feathers/issues/1275)) ([9dd6713](https://github.com/feathersjs/feathers/commit/9dd6713))
575
315
 
576
316
  ## [2.0.6](https://github.com/feathersjs/feathers/compare/@feathersjs/configuration@2.0.5...@feathersjs/configuration@2.0.6) (2019-01-02)
577
317
 
578
318
  **Note:** Version bump only for package @feathersjs/configuration
579
319
 
580
-
581
-
582
-
583
-
584
320
  <a name="2.0.5"></a>
585
- ## [2.0.5](https://github.com/feathersjs/feathers/compare/@feathersjs/configuration@2.0.4...@feathersjs/configuration@2.0.5) (2018-12-16)
586
321
 
322
+ ## [2.0.5](https://github.com/feathersjs/feathers/compare/@feathersjs/configuration@2.0.4...@feathersjs/configuration@2.0.5) (2018-12-16)
587
323
 
588
324
  ### Bug Fixes
589
325
 
590
- * Make Mocha a proper devDependency for every repository ([#1053](https://github.com/feathersjs/feathers/issues/1053)) ([9974803](https://github.com/feathersjs/feathers/commit/9974803))
591
- * **package:** update config to version 3.0.0 ([#1100](https://github.com/feathersjs/feathers/issues/1100)) ([c9f4b42](https://github.com/feathersjs/feathers/commit/c9f4b42))
592
-
593
-
594
-
595
-
326
+ - Make Mocha a proper devDependency for every repository ([#1053](https://github.com/feathersjs/feathers/issues/1053)) ([9974803](https://github.com/feathersjs/feathers/commit/9974803))
327
+ - **package:** update config to version 3.0.0 ([#1100](https://github.com/feathersjs/feathers/issues/1100)) ([c9f4b42](https://github.com/feathersjs/feathers/commit/c9f4b42))
596
328
 
597
329
  <a name="2.0.4"></a>
330
+
598
331
  ## [2.0.4](https://github.com/feathersjs/feathers/compare/@feathersjs/configuration@2.0.3...@feathersjs/configuration@2.0.4) (2018-09-21)
599
332
 
600
333
  **Note:** Version bump only for package @feathersjs/configuration
601
334
 
602
-
603
-
604
-
605
-
606
335
  <a name="2.0.3"></a>
336
+
607
337
  ## [2.0.3](https://github.com/feathersjs/feathers/compare/@feathersjs/configuration@2.0.2...@feathersjs/configuration@2.0.3) (2018-09-17)
608
338
 
609
339
  **Note:** Version bump only for package @feathersjs/configuration
610
340
 
611
-
612
-
613
-
614
-
615
341
  <a name="2.0.2"></a>
342
+
616
343
  ## [2.0.2](https://github.com/feathersjs/feathers/compare/@feathersjs/configuration@2.0.1...@feathersjs/configuration@2.0.2) (2018-09-02)
617
344
 
618
345
  **Note:** Version bump only for package @feathersjs/configuration
619
346
 
620
347
  <a name="2.0.1"></a>
348
+
621
349
  ## 2.0.1
622
350
 
623
351
  - Migrate to Monorepo ([feathers#462](https://github.com/feathersjs/feathers/issues/462))
624
352
 
625
353
  ## [v2.0.0](https://github.com/feathersjs/configuration/tree/v2.0.0) (2018-07-30)
354
+
626
355
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v1.0.2...v2.0.0)
627
356
 
628
357
  **Closed issues:**
@@ -637,13 +366,15 @@ functionality like path replacements and automatic environment variable insertio
637
366
  - Update mocha to the latest version 🚀 [\#56](https://github.com/feathersjs/configuration/pull/56) ([greenkeeper[bot]](https://github.com/apps/greenkeeper))
638
367
 
639
368
  ## [v1.0.2](https://github.com/feathersjs/configuration/tree/v1.0.2) (2018-01-02)
369
+
640
370
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v1.0.1...v1.0.2)
641
371
 
642
372
  **Merged pull requests:**
643
373
 
644
- - 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))
374
+ - 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))
645
375
 
646
376
  ## [v1.0.1](https://github.com/feathersjs/configuration/tree/v1.0.1) (2017-11-16)
377
+
647
378
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v1.0.0...v1.0.1)
648
379
 
649
380
  **Merged pull requests:**
@@ -652,9 +383,11 @@ functionality like path replacements and automatic environment variable insertio
652
383
  - Update nsp to the latest version 🚀 [\#52](https://github.com/feathersjs/configuration/pull/52) ([greenkeeper[bot]](https://github.com/apps/greenkeeper))
653
384
 
654
385
  ## [v1.0.0](https://github.com/feathersjs/configuration/tree/v1.0.0) (2017-11-01)
386
+
655
387
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v1.0.0-pre.1...v1.0.0)
656
388
 
657
389
  ## [v1.0.0-pre.1](https://github.com/feathersjs/configuration/tree/v1.0.0-pre.1) (2017-10-23)
390
+
658
391
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.4.2...v1.0.0-pre.1)
659
392
 
660
393
  **Closed issues:**
@@ -666,6 +399,7 @@ functionality like path replacements and automatic environment variable insertio
666
399
  - Update to new plugin infrastructure and npm scopes [\#51](https://github.com/feathersjs/configuration/pull/51) ([daffl](https://github.com/daffl))
667
400
 
668
401
  ## [v0.4.2](https://github.com/feathersjs/configuration/tree/v0.4.2) (2017-10-15)
402
+
669
403
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.4.1...v0.4.2)
670
404
 
671
405
  **Closed issues:**
@@ -677,7 +411,7 @@ functionality like path replacements and automatic environment variable insertio
677
411
  - Nested configuration [\#38](https://github.com/feathersjs/configuration/issues/38)
678
412
  - Stuck in configuration loophole... [\#37](https://github.com/feathersjs/configuration/issues/37)
679
413
  - Docs are wrong [\#36](https://github.com/feathersjs/configuration/issues/36)
680
- - Why use "NODE\_ENV=development" with default.json? [\#33](https://github.com/feathersjs/configuration/issues/33)
414
+ - Why use "NODE_ENV=development" with default.json? [\#33](https://github.com/feathersjs/configuration/issues/33)
681
415
 
682
416
  **Merged pull requests:**
683
417
 
@@ -693,6 +427,7 @@ functionality like path replacements and automatic environment variable insertio
693
427
  - 👻😱 Node.js 0.10 is unmaintained 😱👻 [\#30](https://github.com/feathersjs/configuration/pull/30) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot))
694
428
 
695
429
  ## [v0.4.1](https://github.com/feathersjs/configuration/tree/v0.4.1) (2016-10-24)
430
+
696
431
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.4.0...v0.4.1)
697
432
 
698
433
  **Closed issues:**
@@ -705,6 +440,7 @@ functionality like path replacements and automatic environment variable insertio
705
440
  - jshint —\> semistandard [\#28](https://github.com/feathersjs/configuration/pull/28) ([corymsmith](https://github.com/corymsmith))
706
441
 
707
442
  ## [v0.4.0](https://github.com/feathersjs/configuration/tree/v0.4.0) (2016-10-22)
443
+
708
444
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.3.3...v0.4.0)
709
445
 
710
446
  **Implemented enhancements:**
@@ -717,9 +453,11 @@ functionality like path replacements and automatic environment variable insertio
717
453
  - Make this repo more about managing configuration [\#24](https://github.com/feathersjs/configuration/issues/24)
718
454
 
719
455
  ## [v0.3.3](https://github.com/feathersjs/configuration/tree/v0.3.3) (2016-09-12)
456
+
720
457
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.3.2...v0.3.3)
721
458
 
722
459
  ## [v0.3.2](https://github.com/feathersjs/configuration/tree/v0.3.2) (2016-09-12)
460
+
723
461
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.3.1...v0.3.2)
724
462
 
725
463
  **Closed issues:**
@@ -731,6 +469,7 @@ functionality like path replacements and automatic environment variable insertio
731
469
  - Remove check for development mode [\#21](https://github.com/feathersjs/configuration/pull/21) ([daffl](https://github.com/daffl))
732
470
 
733
471
  ## [v0.3.1](https://github.com/feathersjs/configuration/tree/v0.3.1) (2016-08-15)
472
+
734
473
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.3.0...v0.3.1)
735
474
 
736
475
  **Merged pull requests:**
@@ -739,17 +478,19 @@ functionality like path replacements and automatic environment variable insertio
739
478
  - Update mocha to version 3.0.0 🚀 [\#18](https://github.com/feathersjs/configuration/pull/18) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot))
740
479
 
741
480
  ## [v0.3.0](https://github.com/feathersjs/configuration/tree/v0.3.0) (2016-05-22)
481
+
742
482
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.2.3...v0.3.0)
743
483
 
744
484
  **Closed issues:**
745
485
 
746
- - \<NODE\_ENV\>.json config need deep merge options [\#16](https://github.com/feathersjs/configuration/issues/16)
486
+ - \<NODE_ENV\>.json config need deep merge options [\#16](https://github.com/feathersjs/configuration/issues/16)
747
487
 
748
488
  **Merged pull requests:**
749
489
 
750
490
  - Add functionality for deeply extending configuration [\#17](https://github.com/feathersjs/configuration/pull/17) ([daffl](https://github.com/daffl))
751
491
 
752
492
  ## [v0.2.3](https://github.com/feathersjs/configuration/tree/v0.2.3) (2016-04-24)
493
+
753
494
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.2.2...v0.2.3)
754
495
 
755
496
  **Closed issues:**
@@ -762,6 +503,7 @@ functionality like path replacements and automatic environment variable insertio
762
503
  - Update all dependencies 🌴 [\#10](https://github.com/feathersjs/configuration/pull/10) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot))
763
504
 
764
505
  ## [v0.2.2](https://github.com/feathersjs/configuration/tree/v0.2.2) (2016-03-27)
506
+
765
507
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.2.1...v0.2.2)
766
508
 
767
509
  **Merged pull requests:**
@@ -769,6 +511,7 @@ functionality like path replacements and automatic environment variable insertio
769
511
  - Expanding environment variables in \<env\>.json [\#9](https://github.com/feathersjs/configuration/pull/9) ([derek-watson](https://github.com/derek-watson))
770
512
 
771
513
  ## [v0.2.1](https://github.com/feathersjs/configuration/tree/v0.2.1) (2016-03-12)
514
+
772
515
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.2.0...v0.2.1)
773
516
 
774
517
  **Merged pull requests:**
@@ -776,6 +519,7 @@ functionality like path replacements and automatic environment variable insertio
776
519
  - Makes sure that arrays get converted properly [\#7](https://github.com/feathersjs/configuration/pull/7) ([daffl](https://github.com/daffl))
777
520
 
778
521
  ## [v0.2.0](https://github.com/feathersjs/configuration/tree/v0.2.0) (2016-03-09)
522
+
779
523
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.1.1...v0.2.0)
780
524
 
781
525
  **Closed issues:**
@@ -787,11 +531,12 @@ functionality like path replacements and automatic environment variable insertio
787
531
  - Implement an escape character [\#6](https://github.com/feathersjs/configuration/pull/6) ([daffl](https://github.com/daffl))
788
532
 
789
533
  ## [v0.1.1](https://github.com/feathersjs/configuration/tree/v0.1.1) (2016-03-09)
534
+
790
535
  [Full Changelog](https://github.com/feathersjs/configuration/compare/v0.1.0...v0.1.1)
791
536
 
792
537
  **Closed issues:**
793
538
 
794
- - Configuration should recursively go through the values [\#2](https://github.com/feathersjs/configuration/issues/2)
539
+ - Configuration should recursively go through the values [\#2](https://github.com/feathersjs/configuration/issues/2)
795
540
 
796
541
  **Merged pull requests:**
797
542
 
@@ -801,5 +546,4 @@ functionality like path replacements and automatic environment variable insertio
801
546
 
802
547
  ## [v0.1.0](https://github.com/feathersjs/configuration/tree/v0.1.0) (2015-11-14)
803
548
 
804
-
805
- \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
549
+ \* _This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)_
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Application } from '@feathersjs/feathers';
2
- import { Schema } from '@feathersjs/schema';
2
+ import { Schema, Validator } from '@feathersjs/schema';
3
3
  import config from 'config';
4
- declare const _default: (schema?: Schema<any>) => (app?: Application) => config.IConfig;
4
+ declare const _default: (schema?: Schema<any> | Validator) => (app?: Application) => config.IConfig;
5
5
  export = _default;
package/lib/index.js CHANGED
@@ -6,6 +6,7 @@ const commons_1 = require("@feathersjs/commons");
6
6
  const config_1 = __importDefault(require("config"));
7
7
  const debug = (0, commons_1.createDebug)('@feathersjs/configuration');
8
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;
@@ -17,11 +18,11 @@ module.exports = function init(schema) {
17
18
  debug(`Setting ${name} configuration value to`, value);
18
19
  app.set(name, value);
19
20
  });
20
- if (schema) {
21
+ if (validator) {
21
22
  app.hooks({
22
23
  setup: [
23
24
  async (_context, next) => {
24
- await schema.validate(configuration);
25
+ await validator(configuration);
25
26
  await next();
26
27
  }
27
28
  ]
package/lib/index.js.map CHANGED
@@ -1 +1 @@
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,MAAoB;IACzC,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,MAAM,EAAE;YACV,GAAG,CAAC,KAAK,CAAC;gBACR,KAAK,EAAE;oBACL,KAAK,EAAE,QAAgC,EAAE,IAAkB,EAAE,EAAE;wBAC7D,MAAM,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAA;wBACpC,MAAM,IAAI,EAAE,CAAA;oBACd,CAAC;iBACF;aACF,CAAC,CAAA;SACH;QAED,OAAO,gBAAM,CAAA;IACf,CAAC,CAAA;AACH,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.29",
4
+ "version": "5.0.0-pre.30",
5
5
  "homepage": "https://feathersjs.com",
6
6
  "main": "lib/",
7
7
  "types": "lib/",
@@ -42,7 +42,7 @@
42
42
  ],
43
43
  "scripts": {
44
44
  "prepublish": "npm run compile",
45
- "pack": "npm pack --pack-destination ../cli/test",
45
+ "pack": "npm pack --pack-destination ../cli/test/build",
46
46
  "compile": "shx rm -rf lib/ && tsc && npm run pack",
47
47
  "test": "NODE_CONFIG_DIR=./test/config mocha --config ../../.mocharc.json --recursive test/**.test.ts test/**/*.test.ts"
48
48
  },
@@ -58,19 +58,19 @@
58
58
  "access": "public"
59
59
  },
60
60
  "dependencies": {
61
- "@feathersjs/commons": "^5.0.0-pre.29",
62
- "@feathersjs/feathers": "^5.0.0-pre.29",
63
- "@feathersjs/schema": "^5.0.0-pre.29",
61
+ "@feathersjs/commons": "^5.0.0-pre.30",
62
+ "@feathersjs/feathers": "^5.0.0-pre.30",
63
+ "@feathersjs/schema": "^5.0.0-pre.30",
64
64
  "@types/config": "^3.3.0",
65
65
  "config": "^3.3.8"
66
66
  },
67
67
  "devDependencies": {
68
- "@types/mocha": "^9.1.1",
69
- "@types/node": "^18.7.17",
68
+ "@types/mocha": "^10.0.0",
69
+ "@types/node": "^18.8.2",
70
70
  "mocha": "^10.0.0",
71
71
  "shx": "^0.3.4",
72
72
  "ts-node": "^10.9.1",
73
- "typescript": "^4.8.3"
73
+ "typescript": "^4.8.4"
74
74
  },
75
- "gitHead": "4314dc89a41a8bbaabf00b47697bf7887861d17d"
75
+ "gitHead": "b535c91197f4b997520e0a0e608793eeba791931"
76
76
  }
package/src/index.ts CHANGED
@@ -1,11 +1,13 @@
1
1
  import { Application, ApplicationHookContext, NextFunction } from '@feathersjs/feathers'
2
2
  import { createDebug } from '@feathersjs/commons'
3
- import { Schema } from '@feathersjs/schema'
3
+ import { Schema, Validator } from '@feathersjs/schema'
4
4
  import config from 'config'
5
5
 
6
6
  const debug = createDebug('@feathersjs/configuration')
7
7
 
8
- export = function init(schema?: Schema<any>) {
8
+ export = function init(schema?: Schema<any> | Validator) {
9
+ const validator: Validator = typeof schema === 'function' ? schema : schema?.validate.bind(schema)
10
+
9
11
  return (app?: Application) => {
10
12
  if (!app) {
11
13
  return config
@@ -21,11 +23,11 @@ export = function init(schema?: Schema<any>) {
21
23
  app.set(name, value)
22
24
  })
23
25
 
24
- if (schema) {
26
+ if (validator) {
25
27
  app.hooks({
26
28
  setup: [
27
29
  async (_context: ApplicationHookContext, next: NextFunction) => {
28
- await schema.validate(configuration)
30
+ await validator(configuration)
29
31
  await next()
30
32
  }
31
33
  ]