@aeriajs/entrypoint 0.0.63 → 0.0.64
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/dist/index.js +6 -1
- package/dist/index.mjs +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -58,7 +58,12 @@ const getCollection = async (collectionName) => {
|
|
|
58
58
|
exports.getCollection = getCollection;
|
|
59
59
|
const getRouter = async () => {
|
|
60
60
|
const entrypoint = await (0, exports.getEntrypoint)();
|
|
61
|
-
|
|
61
|
+
if (entrypoint.router) {
|
|
62
|
+
return entrypoint.router;
|
|
63
|
+
}
|
|
64
|
+
return entrypoint.default
|
|
65
|
+
? entrypoint.default.options.router
|
|
66
|
+
: null;
|
|
62
67
|
};
|
|
63
68
|
exports.getRouter = getRouter;
|
|
64
69
|
const getConfig = async () => {
|
package/dist/index.mjs
CHANGED
|
@@ -44,7 +44,10 @@ export const getCollection = async (collectionName) => {
|
|
|
44
44
|
};
|
|
45
45
|
export const getRouter = async () => {
|
|
46
46
|
const entrypoint = await getEntrypoint();
|
|
47
|
-
|
|
47
|
+
if (entrypoint.router) {
|
|
48
|
+
return entrypoint.router;
|
|
49
|
+
}
|
|
50
|
+
return entrypoint.default ? entrypoint.default.options.router : null;
|
|
48
51
|
};
|
|
49
52
|
export const getConfig = async () => {
|
|
50
53
|
const entrypoint = await getEntrypoint();
|