revojs 0.2.0 → 0.2.2
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/module/index.js +3 -1
- package/dist/package.js +2 -1
- package/dist/router/index.js +2 -1
- package/package.json +2 -1
package/dist/module/index.js
CHANGED
|
@@ -133,7 +133,9 @@ async function createConfig(inputConfig) {
|
|
|
133
133
|
config = mergeObjects(config, { [module.name]: module.config?.() ?? {} });
|
|
134
134
|
const result = await module.setup(config);
|
|
135
135
|
if (result) config = mergeObjects(config, result);
|
|
136
|
-
if (module.modules)
|
|
136
|
+
if (module.modules) {
|
|
137
|
+
for (const dependency of module.modules) if (!config.modules.some((entry) => entry.name === dependency.name)) config.modules.push(dependency);
|
|
138
|
+
}
|
|
137
139
|
index++;
|
|
138
140
|
}
|
|
139
141
|
for (const module of config.modules) {
|
package/dist/package.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region package.json
|
|
2
2
|
var name = "revojs";
|
|
3
|
-
var version = "0.2.
|
|
3
|
+
var version = "0.2.2";
|
|
4
4
|
var repository = {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/tellua/revojs.git"
|
|
@@ -27,6 +27,7 @@ var exports = {
|
|
|
27
27
|
};
|
|
28
28
|
var scripts = {
|
|
29
29
|
"build": "vite build",
|
|
30
|
+
"test": "node --test tests/*.test.mjs",
|
|
30
31
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
31
32
|
"watch": "vite build --watch"
|
|
32
33
|
};
|
package/dist/router/index.js
CHANGED
|
@@ -109,7 +109,8 @@ var Router = class {
|
|
|
109
109
|
return context;
|
|
110
110
|
}
|
|
111
111
|
async resolve(scope, segments) {
|
|
112
|
-
const
|
|
112
|
+
const resolver = getContext(scope, ROUTE_RESOLVER_CONTEXT);
|
|
113
|
+
const result = typeof resolver === "function" ? await resolver(segments) : segments;
|
|
113
114
|
return setContext(scope, ROUTE_CONTEXT, result ? this.match(result) : {
|
|
114
115
|
segments,
|
|
115
116
|
parameters: {},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "revojs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "vite build",
|
|
37
|
+
"test": "node --test tests/*.test.mjs",
|
|
37
38
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
38
39
|
"watch": "vite build --watch"
|
|
39
40
|
},
|