@openaddresses/batch-schema 8.0.0 → 8.1.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 +4 -0
- package/lib/schema.js +7 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/lib/schema.js
CHANGED
|
@@ -69,11 +69,17 @@ 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
|
+
loads.push(import(path.resolve(dirpath, r)));
|
|
78
|
+
|
|
79
|
+
routes.push((await import(path.resolve(dirpath, r))).default(this, config));
|
|
76
80
|
}
|
|
81
|
+
|
|
82
|
+
await Promise.all(routes);
|
|
77
83
|
}
|
|
78
84
|
|
|
79
85
|
/**
|
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.0",
|
|
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": {
|