@opendesign-plus-test/plugins 0.0.1-rc.20 → 0.0.1-rc.21

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.
@@ -1,9 +1,9 @@
1
- import { defineNuxtModule as W, addVitePlugin as O } from "nuxt/kit";
1
+ import { defineNuxtModule as S, addVitePlugin as O } from "nuxt/kit";
2
2
  import { g as v, m as A } from "../../generate-lastmod-changefreq-Wk3kOITw.js";
3
3
  import { existsSync as b, readFileSync as D, createWriteStream as q, writeFileSync as C, readdirSync as T } from "node:fs";
4
4
  import m, { join as z } from "node:path";
5
5
  import { pipeline as J } from "node:stream/promises";
6
- const I = W({
6
+ const I = S({
7
7
  meta: {
8
8
  name: "sitemap",
9
9
  configKey: "sitemap"
@@ -49,7 +49,7 @@ const I = W({
49
49
  }
50
50
  };
51
51
  d(r), console.log("[module:generate-sitemap] collect html done");
52
- const j = ((u = t.lastmodAndChangefreqOptions) == null ? void 0 : u.outputFile) || m.join(f.options.dir.app, "last-modified.json"), p = JSON.parse(D(j, "utf-8"));
52
+ const W = ((u = t.lastmodAndChangefreqOptions) == null ? void 0 : u.outputFile) || m.join(f.options.dir.app, "last-modified.json"), p = JSON.parse(D(W, "utf-8"));
53
53
  await Promise.all(
54
54
  (((x = t.index) == null ? void 0 : x.items) ?? [{ pathPrefix: "/", filename: "sitemap.xml" }]).filter((e) => e.pathPrefix && e.filename).map(async (e) => {
55
55
  const n = e.pathPrefix.startsWith("/") ? e.pathPrefix : `/${e.pathPrefix}`, o = e.filename.endsWith(".xml") ? e.filename : `${e.filename}.xml`, l = q(m.join(r, n, o), "utf-8");
@@ -63,12 +63,12 @@ const I = W({
63
63
  continue;
64
64
  const a = p[`pages${i.endsWith("/") ? i.slice(0, -1) : i}/index.vue`] || p[`pages${i}.md`];
65
65
  a != null && a.lastmod && (a.lastmod = new Date(a.lastmod).toISOString());
66
- const F = {
66
+ const j = {
67
67
  loc: c + i,
68
68
  ...a
69
69
  };
70
70
  yield ` <url>
71
- ${Object.entries(F).map(([$, S]) => ` <${$}>${S}</${$}>`).join(`
71
+ ${Object.entries(j).map(([$, F]) => ` <${$}>${F}</${$}>`).join(`
72
72
  `)}
73
73
  </url>
74
74
  `;
@@ -85,8 +85,8 @@ ${Object.entries(F).map(([$, S]) => ` <${$}>${S}</${$}>`).join(`
85
85
  `<?xml version="1.0" encoding="UTF-8"?>
86
86
  <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
87
87
  ${t.index.items.filter((e) => e.loc || e.filename).map((e) => {
88
- const n = e.pathPrefix ? e.pathPrefix.startsWith("/") ? e.pathPrefix : `/${e.pathPrefix}` : "";
89
- return `<sitemap>
88
+ let n = e.pathPrefix ? e.pathPrefix.startsWith("/") ? e.pathPrefix : `/${e.pathPrefix}` : "";
89
+ return n.endsWith("/") && n.slice(0, -1), `<sitemap>
90
90
  <loc>${e.filename ? `${c}${n}/${e.filename}` : e.loc}</loc>
91
91
  </sitemap>`;
92
92
  })}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendesign-plus-test/plugins",
3
- "version": "0.0.1-rc.20",
3
+ "version": "0.0.1-rc.21",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",