nuxtseo-shared 0.5.1 → 0.5.3
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.json +1 -1
- package/package.json +6 -10
- package/dist/server.d.mts +0 -6
- package/dist/server.d.ts +0 -6
- package/dist/server.mjs +0 -25
package/dist/module.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxtseo-shared",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.3",
|
|
5
5
|
"description": "Shared utilities for Nuxt SEO modules.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -42,10 +42,6 @@
|
|
|
42
42
|
"types": "./dist/utils.d.mts",
|
|
43
43
|
"import": "./dist/utils.mjs"
|
|
44
44
|
},
|
|
45
|
-
"./server": {
|
|
46
|
-
"types": "./dist/server.d.mts",
|
|
47
|
-
"import": "./dist/server.mjs"
|
|
48
|
-
},
|
|
49
45
|
"./package.json": "./package.json"
|
|
50
46
|
},
|
|
51
47
|
"main": "./dist/module.mjs",
|
|
@@ -56,7 +52,7 @@
|
|
|
56
52
|
"peerDependencies": {
|
|
57
53
|
"@nuxt/schema": "^3.16.0 || ^4.0.0",
|
|
58
54
|
"nuxt": "^3.16.0 || ^4.0.0",
|
|
59
|
-
"nuxt-site-config": "^3.2.0",
|
|
55
|
+
"nuxt-site-config": "^3.2.0 || ^4.0.0",
|
|
60
56
|
"vue": "^3.5.0",
|
|
61
57
|
"zod": "^3.23.0 || ^4.0.0"
|
|
62
58
|
},
|
|
@@ -85,10 +81,10 @@
|
|
|
85
81
|
"devDependencies": {
|
|
86
82
|
"@nuxt/module-builder": "^1.0.2",
|
|
87
83
|
"@nuxt/schema": "^4.4.2",
|
|
88
|
-
"@nuxtjs/i18n": "^10.2.
|
|
89
|
-
"nuxt-site-config": "^
|
|
90
|
-
"typescript": "^
|
|
91
|
-
"vitest": "^4.1.
|
|
84
|
+
"@nuxtjs/i18n": "^10.2.4",
|
|
85
|
+
"nuxt-site-config": "^4.0.0",
|
|
86
|
+
"typescript": "^6.0.2",
|
|
87
|
+
"vitest": "^4.1.1",
|
|
92
88
|
"vue": "^3.5.30",
|
|
93
89
|
"vue-tsc": "^3.2.6"
|
|
94
90
|
},
|
package/dist/server.d.mts
DELETED
package/dist/server.d.ts
DELETED
package/dist/server.mjs
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { defu } from 'defu';
|
|
2
|
-
import { useRuntimeConfig } from 'nitropack/runtime';
|
|
3
|
-
import { toRouteMatcher, createRouter } from 'radix3';
|
|
4
|
-
import { withoutTrailingSlash, withoutBase } from 'ufo';
|
|
5
|
-
|
|
6
|
-
function withoutQuery(path) {
|
|
7
|
-
return path.split("?")[0];
|
|
8
|
-
}
|
|
9
|
-
function createNitroRouteRuleMatcher() {
|
|
10
|
-
const { nitro, app } = useRuntimeConfig();
|
|
11
|
-
const _routeRulesMatcher = toRouteMatcher(
|
|
12
|
-
createRouter({
|
|
13
|
-
routes: Object.fromEntries(
|
|
14
|
-
Object.entries(nitro?.routeRules || {}).map(([path, rules]) => [withoutTrailingSlash(path), rules])
|
|
15
|
-
)
|
|
16
|
-
})
|
|
17
|
-
);
|
|
18
|
-
return (path) => {
|
|
19
|
-
return defu({}, ..._routeRulesMatcher.matchAll(
|
|
20
|
-
withoutBase(withoutTrailingSlash(withoutQuery(path)), app.baseURL)
|
|
21
|
-
).reverse());
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { createNitroRouteRuleMatcher, withoutQuery };
|