@openaddresses/batch-schema 8.0.0 → 8.1.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/.eslintrc.json +2 -1
- package/CHANGELOG.md +8 -0
- package/lib/schema.js +5 -1
- package/package.json +2 -2
package/.eslintrc.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
## Version History
|
|
12
12
|
|
|
13
|
+
### v8.1.1
|
|
14
|
+
|
|
15
|
+
- :bug: Fix loads call & add `Promise` to ESLint
|
|
16
|
+
|
|
17
|
+
### v8.1.0
|
|
18
|
+
|
|
19
|
+
- :rocket: Load imports faster by using an async call
|
|
20
|
+
|
|
13
21
|
### v8.0.0
|
|
14
22
|
|
|
15
23
|
- :data: Remove APIDoc support in favour of OpenAPI Route
|
package/lib/schema.js
CHANGED
|
@@ -69,11 +69,15 @@ export default class Schemas {
|
|
|
69
69
|
if (dirpath instanceof URL) dirpath = dirpath.pathname;
|
|
70
70
|
else dirpath = String(dirpath);
|
|
71
71
|
|
|
72
|
+
const routes = [];
|
|
73
|
+
|
|
72
74
|
// Load dynamic routes directory
|
|
73
75
|
for (const r of fs.readdirSync(dirpath)) {
|
|
74
76
|
if (!opts.silent) console.log(`ok - loaded routes/${r}`);
|
|
75
|
-
|
|
77
|
+
routes.push((await import(path.resolve(dirpath, r))).default(this, config));
|
|
76
78
|
}
|
|
79
|
+
|
|
80
|
+
await Promise.all(routes);
|
|
77
81
|
}
|
|
78
82
|
|
|
79
83
|
/**
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"root": true,
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"version": "8.
|
|
6
|
+
"version": "8.1.1",
|
|
7
7
|
"description": "Strongly Validated JSON Schema support for address",
|
|
8
8
|
"repository": "git@github.com:openaddresses/batch-schema",
|
|
9
9
|
"author": "ingalls <nick@ingalls.ca>",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"body-parser": "^1.20.0",
|
|
26
26
|
"express": "^4.17.1",
|
|
27
27
|
"express-json-validator-middleware": "^3.0.0",
|
|
28
|
-
"glob": "^
|
|
28
|
+
"glob": "^10.0.0",
|
|
29
29
|
"morgan": "^1.10.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|