nuxtseo-shared 0.5.0 → 0.5.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.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.16.0"
6
6
  },
7
- "version": "0.4.0",
7
+ "version": "0.5.2",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { defineNuxtModule, useNuxt, createResolver } from '@nuxt/kit';
1
+ import { defineNuxtModule } from '@nuxt/kit';
2
2
  import { hookNuxtSeoProLicense } from './pro.mjs';
3
3
  import { hookNuxtSeoTelemetry } from './telemetry.mjs';
4
4
  import '@clack/prompts';
@@ -19,11 +19,6 @@ const module$1 = defineNuxtModule({
19
19
  }
20
20
  },
21
21
  setup() {
22
- const nuxt = useNuxt();
23
- const { resolve } = createResolver(import.meta.url);
24
- nuxt.options.alias["#nuxtseo-shared"] = resolve("./runtime");
25
- nuxt.options.nitro.alias = nuxt.options.nitro.alias || {};
26
- nuxt.options.nitro.alias["#nuxtseo-shared"] = resolve("./runtime");
27
22
  hookNuxtSeoProLicense();
28
23
  hookNuxtSeoTelemetry();
29
24
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxtseo-shared",
3
3
  "type": "module",
4
- "version": "0.5.0",
4
+ "version": "0.5.2",
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",
@@ -1,3 +0,0 @@
1
- import type { NitroRouteRules } from 'nitropack';
2
- export declare function withoutQuery(path: string): string;
3
- export declare function createNitroRouteRuleMatcher(): (path: string) => NitroRouteRules;
@@ -1,22 +0,0 @@
1
- import { defu } from "defu";
2
- import { useRuntimeConfig } from "nitropack/runtime";
3
- import { createRouter as createRadixRouter, toRouteMatcher } from "radix3";
4
- import { withoutBase, withoutTrailingSlash } from "ufo";
5
- export function withoutQuery(path) {
6
- return path.split("?")[0];
7
- }
8
- export function createNitroRouteRuleMatcher() {
9
- const { nitro, app } = useRuntimeConfig();
10
- const _routeRulesMatcher = toRouteMatcher(
11
- createRadixRouter({
12
- routes: Object.fromEntries(
13
- Object.entries(nitro?.routeRules || {}).map(([path, rules]) => [withoutTrailingSlash(path), rules])
14
- )
15
- })
16
- );
17
- return (path) => {
18
- return defu({}, ..._routeRulesMatcher.matchAll(
19
- withoutBase(withoutTrailingSlash(withoutQuery(path)), app.baseURL)
20
- ).reverse());
21
- };
22
- }