nuxt-ignis 0.3.3 → 0.4.0-rc.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/.data/content/contents.sqlite +0 -0
- package/.env +8 -2
- package/.nuxt/app.config.mjs +2 -2
- package/.nuxt/cache/fonts/EP1810cmAtyahQPDHB6nvBzRkIG5RcNv4u5vTy1aYHU-Ih_Po7WkbhDymI0Y_ntmpz__bZJprHiu7_c5N_X6AAA.woff2 +0 -0
- package/.nuxt/cache/fonts/JNWOTRocaYj0gq52vW_s7sHAdSMUetrRmhhggCVxyZ0-TnR4PP30hI5UWldZ0knUBrHkvIoiDWYXwn2v1NtCh80.woff2 +0 -0
- package/.nuxt/cache/fonts/XbAtjIvy1UErjg9eu_v7X3zPLS_AwsmqVsR9fG-JB6o-H99o9_8BZXq7ey5UyS99Wn9zX0V0anvpXEqAqavcJlQ.woff2 +0 -0
- package/.nuxt/cache/fonts/ZLm6CLvwhQbamZ73M80jbqz7DuOkHlT_HRyXHG7YfVs-eYLoSJPWhqR5CE0c8XPABls8kE_7Fc7F2x7Gtfsg_8M.woff2 +0 -0
- package/.nuxt/cache/fonts/aPa9az0DeE4U5rqM-Ov0Vl_obQis_d6sScLNygGkvxw-s32Y9TxBLZRr_ebRHQ3l3q1g2j_0tPT879PPSBGrj8A.woff2 +0 -0
- package/.nuxt/cache/fonts/kgyHMsxRmhh06xcV0yKMKdTKQBsQpXGi7erqwaqgjXg-55rzD39AWoqYSkQOLHuoKZUDVcDSlXRKdaymIN2dXes.woff +0 -0
- package/.nuxt/components.d.ts +606 -394
- package/.nuxt/content/components.ts +107 -98
- package/.nuxt/content/database.compressed.mjs +1 -1
- package/.nuxt/content/manifest.ts +6 -6
- package/.nuxt/content/sql_dump.txt +5 -0
- package/.nuxt/content/types.d.ts +8 -0
- package/.nuxt/dev/index.mjs +1584 -559
- package/.nuxt/dev/index.mjs.map +1 -1
- package/.nuxt/dist/server/client.manifest.json +2 -2
- package/.nuxt/dist/server/client.manifest.mjs +2 -2
- package/.nuxt/eslint-typegen.d.ts +256 -225
- package/.nuxt/eslint.config.d.mts +3 -3
- package/.nuxt/eslint.config.mjs +11 -11
- package/.nuxt/imports.d.ts +70 -54
- package/.nuxt/manifest/latest.json +1 -1
- package/.nuxt/manifest/meta/dev.json +1 -1
- package/.nuxt/mdc-image-component.mjs +1 -1
- package/.nuxt/module/@nuxtjs-sitemap.d.ts +9 -8
- package/.nuxt/module/nuxt-robots.d.ts +37 -7
- package/.nuxt/{modules/@nuxt-scripts.d.ts → module/nuxt-scripts.d.ts} +1 -2
- package/.nuxt/module/nuxt-seo-utils.assets.d.ts +3 -3
- package/.nuxt/module/nuxt-seo-utils.d.ts +20 -6
- package/.nuxt/module/nuxt-site-config.d.ts +8 -8
- package/.nuxt/nitro.json +5 -5
- package/.nuxt/nuxt.d.ts +12 -9
- package/.nuxt/nuxt.json +2 -2
- package/.nuxt/tsconfig.json +235 -153
- package/.nuxt/tsconfig.server.json +126 -92
- package/.nuxt/types/app.config.d.ts +2 -2
- package/.nuxt/types/build.d.ts +2 -1
- package/.nuxt/types/i18n-plugin.d.ts +2 -2
- package/.nuxt/types/imports.d.ts +407 -314
- package/.nuxt/types/nitro-config.d.ts +2 -2
- package/.nuxt/types/nitro-imports.d.ts +143 -134
- package/.nuxt/types/nitro-nuxt.d.ts +2 -0
- package/.nuxt/types/nitro-routes.d.ts +17 -17
- package/.nuxt/types/plugins.d.ts +34 -34
- package/.nuxt/types/schema.d.ts +322 -12
- package/.nuxt/ui/avatar.ts +1 -1
- package/.nuxt/ui/card.ts +1 -1
- package/.nuxt/ui/carousel.ts +1 -1
- package/.nuxt/ui/command-palette.ts +1 -0
- package/.nuxt/ui/drawer.ts +1 -1
- package/.nuxt/ui/index.ts +2 -0
- package/.nuxt/ui/input-menu.ts +24 -10
- package/.nuxt/ui/input-tags.ts +310 -0
- package/.nuxt/ui/modal.ts +1 -1
- package/.nuxt/ui/navigation-menu.ts +1 -1
- package/.nuxt/ui/select-menu.ts +11 -6
- package/.nuxt/ui/select.ts +11 -6
- package/.nuxt/ui/table.ts +3 -2
- package/.nuxt/ui/timeline.ts +321 -0
- package/.nuxt/ui/toaster.ts +1 -1
- package/.nuxt/ui-image-component.ts +1 -1
- package/app.vue +2 -6
- package/assets/css/ignis-nuxt-ui.css +24 -0
- package/assets/css/{open-props.css → ignis-open-props.css} +1 -1
- package/assets/css/ignis-tailwind.css +23 -0
- package/assets/css/ignis.css +31 -0
- package/bin/make-eslint.js +55 -0
- package/components/CurrentTime.vue +4 -2
- package/components/ignis/IgnisConfig.vue +44 -0
- package/components/{AppFeature.vue → ignis/IgnisFeature.vue} +2 -1
- package/components/ignis/IgnisFeatureList.vue +111 -0
- package/components/ignis/IgnisFooter.vue +2 -2
- package/components/ignis/IgnisHeader.vue +4 -3
- package/components/ignis/IgnisInfo.vue +14 -13
- package/components/ignis/IgnisWelcome.vue +89 -0
- package/composables/useTranslation.ts +18 -9
- package/features.ts +68 -10
- package/formkit.config.ts +8 -8
- package/i18n/locales/en.json +10 -4
- package/nuxt.config.ts +30 -2
- package/package.json +29 -21
- package/pages/_ignis-config.vue +3 -0
- package/pages/_ignis-info.vue +3 -0
- package/pages/index.vue +4 -6
- package/public/_ignis-config.json +98 -0
- package/test/config/css-multiple.txt +30 -0
- package/test/config/css-nuxt-ui.txt +34 -0
- package/test/config/css-open-props.txt +2307 -0
- package/test/config/css-single.txt +28 -0
- package/test/config/css-tailwind.txt +58 -0
- package/test/config/custom-lang.txt +27 -0
- package/test/config/db-neon.txt +28 -0
- package/test/config/db-supabase.txt +31 -0
- package/test/config/default.txt +26 -15
- package/test/config/equipment-1-composable.txt +32 -21
- package/test/config/equipment-2-plugins.txt +33 -22
- package/test/config/equipment-all.txt +38 -27
- package/test/config/forms-formkit.txt +32 -0
- package/test/config/forms-vueform.txt +28 -0
- package/test/config/i18n.txt +38 -0
- package/test/config/no-default-css.txt +24 -0
- package/test/config/open-props.txt +2306 -0
- package/test/config/seo-ssr-false.txt +35 -0
- package/test/config/ui-nuxt-ui.txt +33 -0
- package/test/config/ui-tailwind.txt +57 -0
- package/test/config.test.ts +115 -0
- package/test/features/charts.txt +4 -0
- package/test/features/custom-css.txt +4 -0
- package/test/features/custom-title.txt +4 -0
- package/test/features/db-neon.txt +4 -3
- package/test/features/db-off.txt +4 -3
- package/test/features/db-supabase.txt +4 -3
- package/test/features/default.txt +4 -3
- package/test/features/disable-core.txt +2 -1
- package/test/features/enable-all.txt +5 -4
- package/test/features/equipment.txt +4 -3
- package/test/features/forms-formkit.txt +4 -3
- package/test/features/forms-off.txt +4 -3
- package/test/features/forms-vueform.txt +4 -3
- package/test/features/no-default-css.txt +4 -0
- package/test/features/regexp.txt +4 -0
- package/test/features/ui-nuxt-ui.txt +4 -3
- package/test/features/ui-off.txt +4 -3
- package/test/features/ui-tailwind.txt +5 -4
- package/test/features/validation-off.txt +4 -3
- package/test/features/validation-valibot.txt +5 -4
- package/test/features/validation-zod.txt +5 -4
- package/test/features.test.ts +37 -1
- package/utils/config/formkit.ts +23 -0
- package/utils/formkit.ts +16 -0
- package/utils/pslo-utils.ts +2 -1
- package/.nuxt/content/sql_dump +0 -6
- package/app.config.ts +0 -3
- package/assets/css/nuxt-ui.css +0 -16
- package/assets/css/tailwind.css +0 -15
- package/components/AppFeatureList.vue +0 -124
- package/content/second.md +0 -11
- package/pages/ignis.vue +0 -3
- package/pages/second.vue +0 -59
- package/server/plugins/pslo-content.ts +0 -17
- package/tailwind.config.ts +0 -29
package/.nuxt/dev/index.mjs
CHANGED
|
@@ -3,50 +3,50 @@ import { Server } from 'node:http';
|
|
|
3
3
|
import { resolve as resolve$1, dirname, join } from 'node:path';
|
|
4
4
|
import crypto$1, { webcrypto } from 'node:crypto';
|
|
5
5
|
import { parentPort, threadId } from 'node:worker_threads';
|
|
6
|
-
import { defineEventHandler, handleCacheHeaders, splitCookiesString, createEvent, fetchWithEvent, isEvent, eventHandler, setHeaders, sendRedirect, proxyRequest, getRequestHeader, setResponseHeaders, setResponseStatus, send, getRequestHeaders, setResponseHeader, getRequestURL, getResponseHeader, getResponseStatus, createError, getRequestHost, getRequestProtocol, getQuery as getQuery$1, useSession, removeResponseHeader, handleCors, getRequestIP, readMultipartFormData, readBody, setHeader, getHeader, getRouterParam, lazyEventHandler, useBase, createApp, createRouter as createRouter$1, toNodeListener, getResponseStatusText } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/h3@1.15.3/node_modules/h3/dist/index.mjs';
|
|
7
|
-
import { escapeHtml } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/@vue+shared@3.5.
|
|
6
|
+
import { defineEventHandler, handleCacheHeaders, splitCookiesString, createEvent, fetchWithEvent, isEvent, eventHandler, setHeaders, sendRedirect, proxyRequest, getRequestHeader, setResponseHeaders, setResponseStatus, send, getRequestHeaders, setResponseHeader, appendResponseHeader, getRequestURL, getResponseHeader, getResponseStatus, createError, getRequestHost, getRequestProtocol, getQuery as getQuery$1, useSession, removeResponseHeader, handleCors, getRequestIP, readMultipartFormData, readBody, setHeader, getHeader, getRouterParam, lazyEventHandler, useBase, createApp, createRouter as createRouter$1, toNodeListener, getResponseStatusText } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/h3@1.15.3/node_modules/h3/dist/index.mjs';
|
|
7
|
+
import { escapeHtml } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/@vue+shared@3.5.17/node_modules/@vue/shared/dist/shared.cjs.js';
|
|
8
8
|
import { createRenderer, getRequestDependencies, getPreloadLinks, getPrefetchLinks } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/vue-bundle-renderer@2.1.1/node_modules/vue-bundle-renderer/dist/runtime.mjs';
|
|
9
|
-
import { renderToString } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/vue@3.5.
|
|
9
|
+
import { renderToString } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue/server-renderer/index.mjs';
|
|
10
10
|
import { klona } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/klona@2.0.6/node_modules/klona/dist/index.mjs';
|
|
11
11
|
import defu, { defuFn, defu as defu$1, createDefu } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs';
|
|
12
12
|
import destr, { destr as destr$1 } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs';
|
|
13
13
|
import { snakeCase } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs';
|
|
14
|
-
import { createHead as createHead$1, propsToString, renderSSRHead } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unhead@2.0.
|
|
14
|
+
import { createHead as createHead$1, propsToString, renderSSRHead } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unhead@2.0.12/node_modules/unhead/dist/server.mjs';
|
|
15
15
|
import { stringify, uneval } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/devalue@5.1.1/node_modules/devalue/index.js';
|
|
16
|
-
import { isVNode, toValue, isRef } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/vue@3.5.
|
|
17
|
-
import { DeprecationsPlugin, PromisesPlugin, TemplateParamsPlugin, AliasSortingPlugin } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unhead@2.0.
|
|
16
|
+
import { isVNode, toValue, isRef } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue/index.mjs';
|
|
17
|
+
import { DeprecationsPlugin, PromisesPlugin, TemplateParamsPlugin, AliasSortingPlugin } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unhead@2.0.12/node_modules/unhead/dist/plugins.mjs';
|
|
18
18
|
import { createHooks } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs';
|
|
19
19
|
import { createFetch, Headers as Headers$1 } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/ofetch@1.4.1/node_modules/ofetch/dist/node.mjs';
|
|
20
|
-
import { fetchNodeRequestHandler, callNodeRequestHandler } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/node-mock-http@1.0.
|
|
21
|
-
import { createStorage, prefixStorage } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unstorage@1.16.
|
|
22
|
-
import unstorage_47drivers_47fs from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unstorage@1.16.
|
|
23
|
-
import unstorage_47drivers_47lru_45cache from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unstorage@1.16.
|
|
20
|
+
import { fetchNodeRequestHandler, callNodeRequestHandler } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/node-mock-http@1.0.1/node_modules/node-mock-http/dist/index.mjs';
|
|
21
|
+
import { createStorage, prefixStorage } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unstorage@1.16.1_@netlify+b_bf21166e867540e0850e41f8c1330438/node_modules/unstorage/dist/index.mjs';
|
|
22
|
+
import unstorage_47drivers_47fs from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unstorage@1.16.1_@netlify+b_bf21166e867540e0850e41f8c1330438/node_modules/unstorage/drivers/fs.mjs';
|
|
23
|
+
import unstorage_47drivers_47lru_45cache from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unstorage@1.16.1_@netlify+b_bf21166e867540e0850e41f8c1330438/node_modules/unstorage/drivers/lru-cache.mjs';
|
|
24
24
|
import { digest, hash as hash$1 } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs';
|
|
25
25
|
import { toRouteMatcher, createRouter } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/radix3@1.1.2/node_modules/radix3/dist/index.mjs';
|
|
26
26
|
import { readFile } from 'node:fs/promises';
|
|
27
27
|
import consola, { consola as consola$1, createConsola } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/index.mjs';
|
|
28
|
-
import { ErrorParser } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/youch-core@0.3.
|
|
29
|
-
import { Youch } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/youch@4.1.0-beta.
|
|
28
|
+
import { ErrorParser } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/youch-core@0.3.3/node_modules/youch-core/build/index.js';
|
|
29
|
+
import { Youch } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/youch@4.1.0-beta.8/node_modules/youch/build/index.js';
|
|
30
30
|
import { SourceMapConsumer } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/source-map@0.7.4/node_modules/source-map/source-map.js';
|
|
31
31
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
32
32
|
import { getContext } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unctx@2.4.1/node_modules/unctx/dist/index.mjs';
|
|
33
33
|
import { captureRawStackTrace, parseRawStackTrace } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/errx@0.1.0/node_modules/errx/dist/index.js';
|
|
34
34
|
import devalue from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/@nuxt+devalue@2.0.2/node_modules/@nuxt/devalue/dist/devalue.mjs';
|
|
35
|
-
import {
|
|
35
|
+
import fs, { promises } from 'node:fs';
|
|
36
|
+
import { fileURLToPath } from 'node:url';
|
|
37
|
+
import { dirname as dirname$1, resolve as resolve$2 } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/pathe@1.1.2/node_modules/pathe/dist/index.mjs';
|
|
36
38
|
import { FilterXSS } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/xss@1.0.15/node_modules/xss/lib/index.js';
|
|
37
|
-
import { basename, resolve as resolve$
|
|
39
|
+
import { basename, resolve as resolve$3, isAbsolute } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.mjs';
|
|
38
40
|
import { getIcons } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/index.mjs';
|
|
39
41
|
import { collections } from 'file://C:/Git/nuxt-ignis/core/.nuxt/nuxt-icon-server-bundle.mjs';
|
|
40
42
|
import { neon } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/@neondatabase+serverless@1.0.0/node_modules/@neondatabase/serverless/index.mjs';
|
|
41
43
|
import SqlString from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/sqlstring@2.3.3/node_modules/sqlstring/index.js';
|
|
42
44
|
import Fuse from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/fuse.js@7.1.0/node_modules/fuse.js/dist/fuse.mjs';
|
|
43
|
-
import { diffLines } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/diff@
|
|
45
|
+
import { diffLines } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/diff@8.0.2/node_modules/diff/libesm/index.js';
|
|
44
46
|
import MagicString from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/magic-string@0.30.17/node_modules/magic-string/dist/magic-string.es.mjs';
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import { fileURLToPath } from 'node:url';
|
|
49
|
-
import { ipxFSStorage, ipxHttpStorage, createIPX, createIPXH3Handler } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/ipx@2.1.0_@netlify+blobs@8._f7b76bddf163aa8be609581d2cbf5962/node_modules/ipx/dist/index.mjs';
|
|
47
|
+
import { walkResolver } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unhead@2.0.12/node_modules/unhead/dist/utils.mjs';
|
|
48
|
+
import localAdapter from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/db0@0.3.2_better-sqlite3@12.2.0/node_modules/db0/dist/connectors/better-sqlite3.mjs';
|
|
49
|
+
import { ipxFSStorage, ipxHttpStorage, createIPX, createIPXH3Handler } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/ipx@2.1.0_@netlify+blobs@9._21c037d6c18a84e7aae7ac41a6abbab8/node_modules/ipx/dist/index.mjs';
|
|
50
50
|
|
|
51
51
|
const HASH_RE = /#/g;
|
|
52
52
|
const AMPERSAND_RE = /&/g;
|
|
@@ -58,6 +58,7 @@ const ENC_CARET_RE = /%5e/gi;
|
|
|
58
58
|
const ENC_BACKTICK_RE = /%60/gi;
|
|
59
59
|
const ENC_PIPE_RE = /%7c/gi;
|
|
60
60
|
const ENC_SPACE_RE = /%20/gi;
|
|
61
|
+
const ENC_SLASH_RE = /%2f/gi;
|
|
61
62
|
const ENC_ENC_SLASH_RE = /%252f/gi;
|
|
62
63
|
function encode(text) {
|
|
63
64
|
return encodeURI("" + text).replace(ENC_PIPE_RE, "|");
|
|
@@ -78,6 +79,9 @@ function decode(text = "") {
|
|
|
78
79
|
return "" + text;
|
|
79
80
|
}
|
|
80
81
|
}
|
|
82
|
+
function decodePath(text) {
|
|
83
|
+
return decode(text.replace(ENC_SLASH_RE, "%252F"));
|
|
84
|
+
}
|
|
81
85
|
function decodeQueryKey(text) {
|
|
82
86
|
return decode(text.replace(PLUS_RE, " "));
|
|
83
87
|
}
|
|
@@ -327,15 +331,15 @@ function stringifyParsedURL(parsed) {
|
|
|
327
331
|
|
|
328
332
|
const serverAssets = [{"baseName":"server","dir":"C:/Git/nuxt-ignis/core/server/assets"}];
|
|
329
333
|
|
|
330
|
-
const assets = createStorage();
|
|
334
|
+
const assets$1 = createStorage();
|
|
331
335
|
|
|
332
336
|
for (const asset of serverAssets) {
|
|
333
|
-
assets.mount(asset.baseName, unstorage_47drivers_47fs({ base: asset.dir, ignore: (asset?.ignore || []) }));
|
|
337
|
+
assets$1.mount(asset.baseName, unstorage_47drivers_47fs({ base: asset.dir, ignore: (asset?.ignore || []) }));
|
|
334
338
|
}
|
|
335
339
|
|
|
336
340
|
const storage$1 = createStorage({});
|
|
337
341
|
|
|
338
|
-
storage$1.mount('/assets', assets);
|
|
342
|
+
storage$1.mount('/assets', assets$1);
|
|
339
343
|
|
|
340
344
|
storage$1.mount('#rate-limiter-storage', unstorage_47drivers_47lru_45cache({"driver":"lruCache"}));
|
|
341
345
|
storage$1.mount('root', unstorage_47drivers_47fs({"driver":"fs","readOnly":true,"base":"C:/Git/nuxt-ignis/core","watchOptions":{"ignored":[null]}}));
|
|
@@ -866,12 +870,6 @@ function cloneWithProxy(obj, overrides) {
|
|
|
866
870
|
}
|
|
867
871
|
const cachedEventHandler = defineCachedEventHandler;
|
|
868
872
|
|
|
869
|
-
const defineAppConfig = (config) => config;
|
|
870
|
-
|
|
871
|
-
const appConfig0 = defineAppConfig({
|
|
872
|
-
textTitle: "Nuxt Ignis"
|
|
873
|
-
});
|
|
874
|
-
|
|
875
873
|
const inlineAppConfig = {
|
|
876
874
|
"nuxt": {},
|
|
877
875
|
"ui": {
|
|
@@ -1102,7 +1100,9 @@ const inlineAppConfig = {
|
|
|
1102
1100
|
}
|
|
1103
1101
|
};
|
|
1104
1102
|
|
|
1105
|
-
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
const appConfig = defuFn(inlineAppConfig);
|
|
1106
1106
|
|
|
1107
1107
|
function getEnv(key, opts) {
|
|
1108
1108
|
const envKey = snakeCase(key).toUpperCase();
|
|
@@ -1183,7 +1183,7 @@ const _inlineRuntimeConfig = {
|
|
|
1183
1183
|
"/__nuxt_content/**": {
|
|
1184
1184
|
"robots": false
|
|
1185
1185
|
},
|
|
1186
|
-
"/__nuxt_content/content/sql_dump": {
|
|
1186
|
+
"/__nuxt_content/content/sql_dump.txt": {
|
|
1187
1187
|
"prerender": true
|
|
1188
1188
|
},
|
|
1189
1189
|
"/_scripts/**": {
|
|
@@ -1220,12 +1220,17 @@ const _inlineRuntimeConfig = {
|
|
|
1220
1220
|
},
|
|
1221
1221
|
"public": {
|
|
1222
1222
|
"ignis": {
|
|
1223
|
+
"html": {
|
|
1224
|
+
"lang": "en",
|
|
1225
|
+
"title": "Nuxt Ignis App"
|
|
1226
|
+
},
|
|
1223
1227
|
"log": {
|
|
1224
1228
|
"level": "info"
|
|
1225
1229
|
},
|
|
1226
1230
|
"error": true,
|
|
1227
1231
|
"ssr": true,
|
|
1228
1232
|
"pages": true,
|
|
1233
|
+
"css": "",
|
|
1229
1234
|
"preset": {
|
|
1230
1235
|
"ui": "off",
|
|
1231
1236
|
"db": "off",
|
|
@@ -1233,6 +1238,7 @@ const _inlineRuntimeConfig = {
|
|
|
1233
1238
|
"validation": "off"
|
|
1234
1239
|
},
|
|
1235
1240
|
"core": {
|
|
1241
|
+
"css": true,
|
|
1236
1242
|
"eslint": true,
|
|
1237
1243
|
"fonts": true,
|
|
1238
1244
|
"image": true,
|
|
@@ -1271,12 +1277,14 @@ const _inlineRuntimeConfig = {
|
|
|
1271
1277
|
"composables": "",
|
|
1272
1278
|
"plugins": ""
|
|
1273
1279
|
},
|
|
1280
|
+
"regexp": false,
|
|
1281
|
+
"charts": false,
|
|
1274
1282
|
"warn": {
|
|
1275
1283
|
"duplicates": true
|
|
1276
1284
|
}
|
|
1277
1285
|
},
|
|
1278
1286
|
"nuxt-scripts": {
|
|
1279
|
-
"version": "0.11.
|
|
1287
|
+
"version": "0.11.10",
|
|
1280
1288
|
"defaultScriptOptions": {
|
|
1281
1289
|
"trigger": "onNuxtReady"
|
|
1282
1290
|
}
|
|
@@ -1286,7 +1294,7 @@ const _inlineRuntimeConfig = {
|
|
|
1286
1294
|
"neonRawWarning": true,
|
|
1287
1295
|
"neonDebugSQL": false,
|
|
1288
1296
|
"nuxt-link-checker": {
|
|
1289
|
-
"version": "4.3.
|
|
1297
|
+
"version": "4.3.1",
|
|
1290
1298
|
"hasSitemapModule": true,
|
|
1291
1299
|
"rootDir": "C:/Git/nuxt-ignis/core",
|
|
1292
1300
|
"excludeLinks": [],
|
|
@@ -1361,11 +1369,16 @@ const _inlineRuntimeConfig = {
|
|
|
1361
1369
|
"alternateLinkCanonicalQueries": false,
|
|
1362
1370
|
"hmr": true
|
|
1363
1371
|
},
|
|
1364
|
-
"multiDomainLocales": false
|
|
1372
|
+
"multiDomainLocales": false,
|
|
1373
|
+
"domainLocales": {
|
|
1374
|
+
"en": {
|
|
1375
|
+
"domain": ""
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1365
1378
|
}
|
|
1366
1379
|
},
|
|
1367
1380
|
"nuxt-scripts": {
|
|
1368
|
-
"version": "0.11.
|
|
1381
|
+
"version": "0.11.10"
|
|
1369
1382
|
},
|
|
1370
1383
|
"private": {
|
|
1371
1384
|
"basicAuth": false
|
|
@@ -1530,7 +1543,7 @@ const _inlineRuntimeConfig = {
|
|
|
1530
1543
|
}
|
|
1531
1544
|
],
|
|
1532
1545
|
"credits": true,
|
|
1533
|
-
"version": "7.
|
|
1546
|
+
"version": "7.4.3",
|
|
1534
1547
|
"sitemaps": {
|
|
1535
1548
|
"sitemap.xml": {
|
|
1536
1549
|
"sitemapName": "sitemap.xml",
|
|
@@ -1548,7 +1561,7 @@ const _inlineRuntimeConfig = {
|
|
|
1548
1561
|
},
|
|
1549
1562
|
"content": {
|
|
1550
1563
|
"databaseVersion": "v3.5.0",
|
|
1551
|
-
"version": "3.
|
|
1564
|
+
"version": "3.6.3",
|
|
1552
1565
|
"database": {
|
|
1553
1566
|
"type": "sqlite",
|
|
1554
1567
|
"filename": "./contents.sqlite"
|
|
@@ -1836,15 +1849,15 @@ const _inlineRuntimeConfig = {
|
|
|
1836
1849
|
"_context": "package.json",
|
|
1837
1850
|
"_priority": -10,
|
|
1838
1851
|
"name": "nuxt-ignis",
|
|
1839
|
-
"description": "
|
|
1852
|
+
"description": "A ready-to-use setup for your next application in Nuxt"
|
|
1840
1853
|
}
|
|
1841
1854
|
],
|
|
1842
|
-
"version": "3.
|
|
1855
|
+
"version": "3.2.2",
|
|
1843
1856
|
"debug": false,
|
|
1844
1857
|
"multiTenancy": []
|
|
1845
1858
|
},
|
|
1846
1859
|
"nuxt-robots": {
|
|
1847
|
-
"version": "5.
|
|
1860
|
+
"version": "5.4.0",
|
|
1848
1861
|
"isNuxtContentV2": false,
|
|
1849
1862
|
"debug": false,
|
|
1850
1863
|
"credits": true,
|
|
@@ -1867,7 +1880,8 @@ const _inlineRuntimeConfig = {
|
|
|
1867
1880
|
"header": true,
|
|
1868
1881
|
"robotsEnabledValue": "index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",
|
|
1869
1882
|
"robotsDisabledValue": "noindex, nofollow",
|
|
1870
|
-
"cacheControl": "max-age=14400, must-revalidate"
|
|
1883
|
+
"cacheControl": "max-age=14400, must-revalidate",
|
|
1884
|
+
"botDetection": true
|
|
1871
1885
|
},
|
|
1872
1886
|
"ipx": {
|
|
1873
1887
|
"baseURL": "/_ipx",
|
|
@@ -1875,7 +1889,7 @@ const _inlineRuntimeConfig = {
|
|
|
1875
1889
|
"fs": {
|
|
1876
1890
|
"dir": [
|
|
1877
1891
|
"C:/Git/nuxt-ignis/core/public",
|
|
1878
|
-
"C:/Git/nuxt-ignis/core/node_modules/.pnpm/nuxt-spec@0.0.4_@types+
|
|
1892
|
+
"C:/Git/nuxt-ignis/core/node_modules/.pnpm/nuxt-spec@0.0.4_@types+debu_dbaf4d77b84c2665c87205cc14ddf373/node_modules/nuxt-spec/public"
|
|
1879
1893
|
]
|
|
1880
1894
|
},
|
|
1881
1895
|
"http": {
|
|
@@ -2090,6 +2104,10 @@ const errorHandler$0 = (async function errorhandler(error, event, { defaultHandl
|
|
|
2090
2104
|
}
|
|
2091
2105
|
const html = await res.text();
|
|
2092
2106
|
for (const [header, value] of res.headers.entries()) {
|
|
2107
|
+
if (header === "set-cookie") {
|
|
2108
|
+
appendResponseHeader(event, header, value);
|
|
2109
|
+
continue;
|
|
2110
|
+
}
|
|
2093
2111
|
setResponseHeader(event, header, value);
|
|
2094
2112
|
}
|
|
2095
2113
|
setResponseStatus(event, res.status && res.status !== 200 ? res.status : defaultRes.status, res.statusText || defaultRes.statusText);
|
|
@@ -2247,7 +2265,7 @@ if (!window.__NUXT_DEVTOOLS_TIME_METRIC__) {
|
|
|
2247
2265
|
window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
|
|
2248
2266
|
`;
|
|
2249
2267
|
|
|
2250
|
-
const
|
|
2268
|
+
const _BUwpELsyks45lroxlJ7pWDnbGcceJZF9mVl7VPNuPm4 = (function(nitro) {
|
|
2251
2269
|
nitro.hooks.hook("render:html", (htmlContext) => {
|
|
2252
2270
|
htmlContext.head.push(`<script>${script$1}<\/script>`);
|
|
2253
2271
|
});
|
|
@@ -2255,7 +2273,7 @@ const _4xtY69JUQXVdqRY6G89AKPM78rluyxVyS_yCYbfwz2o = (function(nitro) {
|
|
|
2255
2273
|
|
|
2256
2274
|
const rootDir = "C:/Git/nuxt-ignis/core";
|
|
2257
2275
|
|
|
2258
|
-
const appHead = {"link":[],"meta":[{"name":"viewport","content":"width=device-width, initial-scale=1"},{"charset":"utf-8"},{"property":"og:type","content":"website"}],"style":[],"script":[],"noscript":[],"htmlAttrs":{}};
|
|
2276
|
+
const appHead = {"link":[],"meta":[{"name":"viewport","content":"width=device-width, initial-scale=1"},{"charset":"utf-8"},{"property":"og:type","content":"website"}],"style":[],"script":[],"noscript":[],"htmlAttrs":{"lang":"en-US"},"title":"Custom Nuxt Ignis App"};
|
|
2259
2277
|
|
|
2260
2278
|
const appRootTag = "div";
|
|
2261
2279
|
|
|
@@ -2272,7 +2290,7 @@ const devReducers = {
|
|
|
2272
2290
|
URL: (data) => data instanceof URL ? data.toString() : void 0
|
|
2273
2291
|
};
|
|
2274
2292
|
const asyncContext = getContext("nuxt-dev", { asyncContext: true, AsyncLocalStorage });
|
|
2275
|
-
const
|
|
2293
|
+
const __pERcNNWV1OaEgG7uvohNfb6mvznh4KNsVmRCE4aV0 = (nitroApp) => {
|
|
2276
2294
|
const handler = nitroApp.h3App.handler;
|
|
2277
2295
|
nitroApp.h3App.handler = (event) => {
|
|
2278
2296
|
return asyncContext.callAsync({ logs: [], event }, () => handler(event));
|
|
@@ -2433,7 +2451,7 @@ function useSiteConfig(e, _options) {
|
|
|
2433
2451
|
return e.context.siteConfig.get(options);
|
|
2434
2452
|
}
|
|
2435
2453
|
|
|
2436
|
-
const
|
|
2454
|
+
const _Z5botqEqNb56svWtJhyEDnS6Z4dk8BSBwZjYp1KssfI = defineNitroPlugin(async (nitroApp) => {
|
|
2437
2455
|
nitroApp.hooks.hook("render:html", async (ctx, { event }) => {
|
|
2438
2456
|
getRouteRules(event);
|
|
2439
2457
|
process.env.NUXT_COMPONENT_ISLANDS && event.path.startsWith("/__nuxt_island");
|
|
@@ -2447,12 +2465,364 @@ const _vFyUmRhrsoPWtOg8n3nI006gpGkcTXipKwGkXHyIU = defineNitroPlugin(async (nitr
|
|
|
2447
2465
|
});
|
|
2448
2466
|
});
|
|
2449
2467
|
|
|
2468
|
+
const KNOWN_SEARCH_BOTS = [
|
|
2469
|
+
{
|
|
2470
|
+
pattern: "googlebot",
|
|
2471
|
+
name: "googlebot",
|
|
2472
|
+
secondaryPatterns: ["google.com/bot.html"]
|
|
2473
|
+
},
|
|
2474
|
+
{
|
|
2475
|
+
pattern: "bingbot",
|
|
2476
|
+
name: "bingbot",
|
|
2477
|
+
secondaryPatterns: ["msnbot"]
|
|
2478
|
+
},
|
|
2479
|
+
{
|
|
2480
|
+
pattern: "yandexbot",
|
|
2481
|
+
name: "yandexbot"
|
|
2482
|
+
},
|
|
2483
|
+
{
|
|
2484
|
+
pattern: "baiduspider",
|
|
2485
|
+
name: "baiduspider",
|
|
2486
|
+
secondaryPatterns: ["baidu.com"]
|
|
2487
|
+
},
|
|
2488
|
+
{
|
|
2489
|
+
pattern: "duckduckbot",
|
|
2490
|
+
name: "duckduckbot",
|
|
2491
|
+
secondaryPatterns: ["duckduckgo.com"]
|
|
2492
|
+
},
|
|
2493
|
+
{
|
|
2494
|
+
pattern: "slurp",
|
|
2495
|
+
name: "yahoo"
|
|
2496
|
+
}
|
|
2497
|
+
];
|
|
2498
|
+
const SOCIAL_BOTS = [
|
|
2499
|
+
{
|
|
2500
|
+
pattern: "twitterbot",
|
|
2501
|
+
name: "twitter",
|
|
2502
|
+
secondaryPatterns: ["twitter"]
|
|
2503
|
+
},
|
|
2504
|
+
{
|
|
2505
|
+
pattern: "facebookexternalhit",
|
|
2506
|
+
name: "facebook",
|
|
2507
|
+
secondaryPatterns: ["facebook.com"]
|
|
2508
|
+
},
|
|
2509
|
+
{
|
|
2510
|
+
pattern: "linkedinbot",
|
|
2511
|
+
name: "linkedin",
|
|
2512
|
+
secondaryPatterns: ["linkedin"]
|
|
2513
|
+
},
|
|
2514
|
+
{
|
|
2515
|
+
pattern: "pinterestbot",
|
|
2516
|
+
name: "pinterest",
|
|
2517
|
+
secondaryPatterns: ["pinterest"]
|
|
2518
|
+
},
|
|
2519
|
+
{
|
|
2520
|
+
pattern: "discordbot",
|
|
2521
|
+
name: "discord",
|
|
2522
|
+
secondaryPatterns: ["discordapp"]
|
|
2523
|
+
}
|
|
2524
|
+
];
|
|
2525
|
+
const SEO_BOTS = [
|
|
2526
|
+
{
|
|
2527
|
+
pattern: "mj12bot",
|
|
2528
|
+
name: "majestic12",
|
|
2529
|
+
secondaryPatterns: ["majestic12.co.uk/bot"]
|
|
2530
|
+
},
|
|
2531
|
+
{
|
|
2532
|
+
pattern: "ahrefsbot",
|
|
2533
|
+
name: "ahrefs",
|
|
2534
|
+
secondaryPatterns: ["ahrefs.com"]
|
|
2535
|
+
},
|
|
2536
|
+
{
|
|
2537
|
+
pattern: "semrushbot",
|
|
2538
|
+
name: "semrush",
|
|
2539
|
+
secondaryPatterns: ["semrush.com/bot"]
|
|
2540
|
+
},
|
|
2541
|
+
{
|
|
2542
|
+
pattern: "screaming frog",
|
|
2543
|
+
name: "screaming-frog",
|
|
2544
|
+
secondaryPatterns: ["screamingfrog.co.uk"]
|
|
2545
|
+
},
|
|
2546
|
+
{
|
|
2547
|
+
pattern: "rogerbot",
|
|
2548
|
+
name: "moz"
|
|
2549
|
+
}
|
|
2550
|
+
];
|
|
2551
|
+
const AI_BOTS = [
|
|
2552
|
+
{
|
|
2553
|
+
pattern: "anthropic",
|
|
2554
|
+
name: "anthropic"
|
|
2555
|
+
},
|
|
2556
|
+
{
|
|
2557
|
+
pattern: "claude",
|
|
2558
|
+
name: "claude"
|
|
2559
|
+
},
|
|
2560
|
+
{
|
|
2561
|
+
pattern: "gptbot",
|
|
2562
|
+
name: "gpt",
|
|
2563
|
+
secondaryPatterns: ["openai.com"]
|
|
2564
|
+
},
|
|
2565
|
+
{
|
|
2566
|
+
pattern: "googlebot-news",
|
|
2567
|
+
name: "google-news"
|
|
2568
|
+
},
|
|
2569
|
+
{
|
|
2570
|
+
pattern: "cohere",
|
|
2571
|
+
name: "cohere",
|
|
2572
|
+
secondaryPatterns: ["cohere.com"]
|
|
2573
|
+
},
|
|
2574
|
+
{
|
|
2575
|
+
pattern: "ccbot",
|
|
2576
|
+
name: "commoncrawl",
|
|
2577
|
+
secondaryPatterns: ["commoncrawl.org"]
|
|
2578
|
+
},
|
|
2579
|
+
{
|
|
2580
|
+
pattern: "perplexitybot",
|
|
2581
|
+
name: "perplexity",
|
|
2582
|
+
secondaryPatterns: ["perplexity.ai"]
|
|
2583
|
+
}
|
|
2584
|
+
];
|
|
2585
|
+
const HTTP_TOOL_BOTS = [
|
|
2586
|
+
{
|
|
2587
|
+
pattern: "python-requests",
|
|
2588
|
+
name: "requests",
|
|
2589
|
+
secondaryPatterns: ["python"]
|
|
2590
|
+
},
|
|
2591
|
+
{
|
|
2592
|
+
pattern: "wget",
|
|
2593
|
+
name: "wget"
|
|
2594
|
+
},
|
|
2595
|
+
{
|
|
2596
|
+
pattern: "curl",
|
|
2597
|
+
name: "curl",
|
|
2598
|
+
secondaryPatterns: ["curl"]
|
|
2599
|
+
}
|
|
2600
|
+
];
|
|
2601
|
+
const SECURITY_SCANNING_BOTS = [
|
|
2602
|
+
{
|
|
2603
|
+
pattern: "zgrab",
|
|
2604
|
+
name: "zgrab"
|
|
2605
|
+
},
|
|
2606
|
+
{
|
|
2607
|
+
pattern: "masscan",
|
|
2608
|
+
name: "masscan"
|
|
2609
|
+
},
|
|
2610
|
+
{
|
|
2611
|
+
pattern: "nmap",
|
|
2612
|
+
name: "nmap",
|
|
2613
|
+
secondaryPatterns: ["insecure.org"]
|
|
2614
|
+
},
|
|
2615
|
+
{
|
|
2616
|
+
pattern: "nikto",
|
|
2617
|
+
name: "nikto"
|
|
2618
|
+
},
|
|
2619
|
+
{
|
|
2620
|
+
pattern: "wpscan",
|
|
2621
|
+
name: "wpscan"
|
|
2622
|
+
}
|
|
2623
|
+
];
|
|
2624
|
+
const SCRAPING_BOTS = [
|
|
2625
|
+
{
|
|
2626
|
+
pattern: "scrapy",
|
|
2627
|
+
name: "scrapy",
|
|
2628
|
+
secondaryPatterns: ["scrapy.org"]
|
|
2629
|
+
}
|
|
2630
|
+
];
|
|
2631
|
+
const AUTOMATION_BOTS = [
|
|
2632
|
+
{
|
|
2633
|
+
pattern: "phantomjs",
|
|
2634
|
+
name: "phantomjs"
|
|
2635
|
+
},
|
|
2636
|
+
{
|
|
2637
|
+
pattern: "headless",
|
|
2638
|
+
name: "headless-browser"
|
|
2639
|
+
},
|
|
2640
|
+
{
|
|
2641
|
+
pattern: "playwright",
|
|
2642
|
+
name: "playwright"
|
|
2643
|
+
},
|
|
2644
|
+
{
|
|
2645
|
+
pattern: "selenium",
|
|
2646
|
+
name: "selenium",
|
|
2647
|
+
secondaryPatterns: ["webdriver"]
|
|
2648
|
+
},
|
|
2649
|
+
{
|
|
2650
|
+
pattern: "puppeteer",
|
|
2651
|
+
name: "puppeteer",
|
|
2652
|
+
secondaryPatterns: ["headless"]
|
|
2653
|
+
}
|
|
2654
|
+
];
|
|
2655
|
+
const GENERIC_BOTS = [
|
|
2656
|
+
{
|
|
2657
|
+
pattern: "bot",
|
|
2658
|
+
name: "generic-bot"
|
|
2659
|
+
},
|
|
2660
|
+
{
|
|
2661
|
+
pattern: "spider",
|
|
2662
|
+
name: "generic-spider"
|
|
2663
|
+
},
|
|
2664
|
+
{
|
|
2665
|
+
pattern: "crawler",
|
|
2666
|
+
name: "generic-crawler"
|
|
2667
|
+
},
|
|
2668
|
+
{
|
|
2669
|
+
pattern: "scraper",
|
|
2670
|
+
name: "generic-scraper"
|
|
2671
|
+
}
|
|
2672
|
+
];
|
|
2673
|
+
const BOT_MAP = [
|
|
2674
|
+
{
|
|
2675
|
+
type: "search-engine",
|
|
2676
|
+
bots: KNOWN_SEARCH_BOTS,
|
|
2677
|
+
trusted: true
|
|
2678
|
+
},
|
|
2679
|
+
{
|
|
2680
|
+
type: "social",
|
|
2681
|
+
bots: SOCIAL_BOTS,
|
|
2682
|
+
trusted: true
|
|
2683
|
+
},
|
|
2684
|
+
{
|
|
2685
|
+
type: "seo",
|
|
2686
|
+
bots: SEO_BOTS,
|
|
2687
|
+
trusted: true
|
|
2688
|
+
},
|
|
2689
|
+
{
|
|
2690
|
+
type: "ai",
|
|
2691
|
+
bots: AI_BOTS,
|
|
2692
|
+
trusted: true
|
|
2693
|
+
},
|
|
2694
|
+
{
|
|
2695
|
+
type: "generic",
|
|
2696
|
+
bots: GENERIC_BOTS,
|
|
2697
|
+
trusted: false
|
|
2698
|
+
},
|
|
2699
|
+
{
|
|
2700
|
+
type: "automation",
|
|
2701
|
+
bots: AUTOMATION_BOTS,
|
|
2702
|
+
trusted: false
|
|
2703
|
+
},
|
|
2704
|
+
{
|
|
2705
|
+
type: "http-tool",
|
|
2706
|
+
bots: HTTP_TOOL_BOTS,
|
|
2707
|
+
trusted: false
|
|
2708
|
+
},
|
|
2709
|
+
{
|
|
2710
|
+
type: "security-scanner",
|
|
2711
|
+
bots: SECURITY_SCANNING_BOTS,
|
|
2712
|
+
trusted: false
|
|
2713
|
+
},
|
|
2714
|
+
{
|
|
2715
|
+
type: "scraping",
|
|
2716
|
+
bots: SCRAPING_BOTS,
|
|
2717
|
+
trusted: false
|
|
2718
|
+
}
|
|
2719
|
+
];
|
|
2720
|
+
function matches(pattern, path) {
|
|
2721
|
+
const pathLength = path.length;
|
|
2722
|
+
const patternLength = pattern.length;
|
|
2723
|
+
const matchingLengths = Array.from({ length: pathLength + 1 }).fill(0);
|
|
2724
|
+
let numMatchingLengths = 1;
|
|
2725
|
+
let p = 0;
|
|
2726
|
+
while (p < patternLength) {
|
|
2727
|
+
if (pattern[p] === "$" && p + 1 === patternLength) {
|
|
2728
|
+
return matchingLengths[numMatchingLengths - 1] === pathLength;
|
|
2729
|
+
}
|
|
2730
|
+
if (pattern[p] === "*") {
|
|
2731
|
+
numMatchingLengths = pathLength - matchingLengths[0] + 1;
|
|
2732
|
+
for (let i = 1; i < numMatchingLengths; i++) {
|
|
2733
|
+
matchingLengths[i] = matchingLengths[i - 1] + 1;
|
|
2734
|
+
}
|
|
2735
|
+
} else {
|
|
2736
|
+
let numMatches = 0;
|
|
2737
|
+
for (let i = 0; i < numMatchingLengths; i++) {
|
|
2738
|
+
const matchLength = matchingLengths[i];
|
|
2739
|
+
if (matchLength < pathLength && path[matchLength] === pattern[p]) {
|
|
2740
|
+
matchingLengths[numMatches++] = matchLength + 1;
|
|
2741
|
+
}
|
|
2742
|
+
}
|
|
2743
|
+
if (numMatches === 0) {
|
|
2744
|
+
return false;
|
|
2745
|
+
}
|
|
2746
|
+
numMatchingLengths = numMatches;
|
|
2747
|
+
}
|
|
2748
|
+
p++;
|
|
2749
|
+
}
|
|
2750
|
+
return true;
|
|
2751
|
+
}
|
|
2752
|
+
function matchPathToRule(path, _rules) {
|
|
2753
|
+
let matchedRule = null;
|
|
2754
|
+
const rules = _rules.filter(Boolean);
|
|
2755
|
+
const rulesLength = rules.length;
|
|
2756
|
+
let i = 0;
|
|
2757
|
+
while (i < rulesLength) {
|
|
2758
|
+
const rule = rules[i];
|
|
2759
|
+
if (!rule || !matches(rule.pattern, path)) {
|
|
2760
|
+
i++;
|
|
2761
|
+
continue;
|
|
2762
|
+
}
|
|
2763
|
+
if (!matchedRule || rule.pattern.length > matchedRule.pattern.length) {
|
|
2764
|
+
matchedRule = rule;
|
|
2765
|
+
} else if (rule.pattern.length === matchedRule.pattern.length && rule.allow && !matchedRule.allow) {
|
|
2766
|
+
matchedRule = rule;
|
|
2767
|
+
}
|
|
2768
|
+
i++;
|
|
2769
|
+
}
|
|
2770
|
+
return matchedRule;
|
|
2771
|
+
}
|
|
2772
|
+
function asArray(v) {
|
|
2773
|
+
return typeof v === "undefined" ? [] : Array.isArray(v) ? v : [v];
|
|
2774
|
+
}
|
|
2775
|
+
function generateRobotsTxt({ groups, sitemaps }) {
|
|
2776
|
+
const lines = [];
|
|
2777
|
+
for (const group of groups) {
|
|
2778
|
+
for (const comment of group.comment || [])
|
|
2779
|
+
lines.push(`# ${comment}`);
|
|
2780
|
+
for (const userAgent of group.userAgent || ["*"])
|
|
2781
|
+
lines.push(`User-agent: ${userAgent}`);
|
|
2782
|
+
for (const allow of group.allow || [])
|
|
2783
|
+
lines.push(`Allow: ${allow}`);
|
|
2784
|
+
for (const disallow of group.disallow || [])
|
|
2785
|
+
lines.push(`Disallow: ${disallow}`);
|
|
2786
|
+
for (const cleanParam of group.cleanParam || [])
|
|
2787
|
+
lines.push(`Clean-param: ${cleanParam}`);
|
|
2788
|
+
lines.push("");
|
|
2789
|
+
}
|
|
2790
|
+
for (const sitemap of sitemaps)
|
|
2791
|
+
lines.push(`Sitemap: ${sitemap}`);
|
|
2792
|
+
return lines.join("\n");
|
|
2793
|
+
}
|
|
2794
|
+
createDefu((obj, key, value) => {
|
|
2795
|
+
if (Array.isArray(obj[key]) && Array.isArray(value))
|
|
2796
|
+
obj[key] = Array.from(/* @__PURE__ */ new Set([...obj[key], ...value]));
|
|
2797
|
+
return obj[key];
|
|
2798
|
+
});
|
|
2799
|
+
function createPatternMap() {
|
|
2800
|
+
const patternMap = /* @__PURE__ */ new Map();
|
|
2801
|
+
for (const def of BOT_MAP) {
|
|
2802
|
+
for (const bot of def.bots) {
|
|
2803
|
+
const patterns = [bot.pattern, ...bot.secondaryPatterns || []];
|
|
2804
|
+
for (const pattern of patterns) {
|
|
2805
|
+
patternMap.set(pattern.toLowerCase(), {
|
|
2806
|
+
botName: bot.name,
|
|
2807
|
+
botCategory: def.type,
|
|
2808
|
+
trusted: def.trusted
|
|
2809
|
+
});
|
|
2810
|
+
}
|
|
2811
|
+
}
|
|
2812
|
+
}
|
|
2813
|
+
return patternMap;
|
|
2814
|
+
}
|
|
2815
|
+
|
|
2816
|
+
function useRuntimeConfigNuxtRobots(event) {
|
|
2817
|
+
return useRuntimeConfig(event)["nuxt-robots"];
|
|
2818
|
+
}
|
|
2819
|
+
|
|
2450
2820
|
const logger$1 = createConsola({
|
|
2451
2821
|
defaults: { tag: "@nuxtjs/robots" }
|
|
2452
2822
|
});
|
|
2453
2823
|
|
|
2454
2824
|
async function resolveRobotsTxtContext(e, nitro = useNitroApp()) {
|
|
2455
|
-
const { groups, sitemap: sitemaps } =
|
|
2825
|
+
const { groups, sitemap: sitemaps } = useRuntimeConfigNuxtRobots(e);
|
|
2456
2826
|
const generateRobotsTxtCtx = {
|
|
2457
2827
|
event: e,
|
|
2458
2828
|
context: e ? "robots.txt" : "init",
|
|
@@ -2463,8 +2833,11 @@ async function resolveRobotsTxtContext(e, nitro = useNitroApp()) {
|
|
|
2463
2833
|
return generateRobotsTxtCtx;
|
|
2464
2834
|
}
|
|
2465
2835
|
|
|
2466
|
-
const
|
|
2467
|
-
const { isNuxtContentV2, robotsDisabledValue } =
|
|
2836
|
+
const __N1t3ZNCULqwSjGoVUR2rCd_NNid2x4qNEWZGlFs8vY = defineNitroPlugin(async (nitroApp) => {
|
|
2837
|
+
const { isNuxtContentV2, robotsDisabledValue, botDetection } = useRuntimeConfigNuxtRobots();
|
|
2838
|
+
if (botDetection !== false) {
|
|
2839
|
+
nitroApp._robotsPatternMap = createPatternMap();
|
|
2840
|
+
}
|
|
2468
2841
|
nitroApp._robots = {};
|
|
2469
2842
|
await resolveRobotsTxtContext(void 0, nitroApp);
|
|
2470
2843
|
const nuxtContentUrls = /* @__PURE__ */ new Set();
|
|
@@ -2512,19 +2885,6 @@ function defineNitroPlugin(def) {
|
|
|
2512
2885
|
return def;
|
|
2513
2886
|
}
|
|
2514
2887
|
|
|
2515
|
-
const _gLOeqSTdYtSmvm3NLY8ox1LOh6DY4GgpRaz2D6f9XU = defineNitroPlugin((nitroApp) => {
|
|
2516
|
-
const config = useRuntimeConfig().public.ignis;
|
|
2517
|
-
if (config.content && config.pslo.enabled && config.pslo.content) {
|
|
2518
|
-
console.log("elrh-pslo plugin initialized");
|
|
2519
|
-
nitroApp.hooks.hook("content:file:beforeParse", (file) => {
|
|
2520
|
-
console.log("Treating Markdown with elrh-pslo");
|
|
2521
|
-
if (file._id.endsWith(".md")) {
|
|
2522
|
-
file.body = preventSingleLetterOrphans(file.body);
|
|
2523
|
-
}
|
|
2524
|
-
});
|
|
2525
|
-
}
|
|
2526
|
-
});
|
|
2527
|
-
|
|
2528
2888
|
function defineRenderHandler(render) {
|
|
2529
2889
|
const runtimeConfig = useRuntimeConfig();
|
|
2530
2890
|
return eventHandler(async (event) => {
|
|
@@ -2919,7 +3279,7 @@ async function getSQLIfAllowed() {
|
|
|
2919
3279
|
}
|
|
2920
3280
|
|
|
2921
3281
|
const checksums = {
|
|
2922
|
-
"content": "v3.5.0--
|
|
3282
|
+
"content": "v3.5.0--bgIYhpjRuV8zbHJE_CfelwKpJ_Td6YuGJwixiek8lmI"
|
|
2923
3283
|
};
|
|
2924
3284
|
const checksumsStructure = {
|
|
2925
3285
|
"content": "bgIYhpjRuV8zbHJE_CfelwKpJ_Td6YuGJwixiek8lmI"
|
|
@@ -2933,15 +3293,15 @@ const contentManifest = {
|
|
|
2933
3293
|
"type": "page",
|
|
2934
3294
|
"fields": {
|
|
2935
3295
|
"id": "string",
|
|
2936
|
-
"
|
|
3296
|
+
"title": "string",
|
|
3297
|
+
"body": "json",
|
|
3298
|
+
"description": "string",
|
|
2937
3299
|
"extension": "string",
|
|
2938
3300
|
"meta": "json",
|
|
3301
|
+
"navigation": "json",
|
|
2939
3302
|
"path": "string",
|
|
2940
|
-
"title": "string",
|
|
2941
|
-
"description": "string",
|
|
2942
3303
|
"seo": "json",
|
|
2943
|
-
"
|
|
2944
|
-
"navigation": "json"
|
|
3304
|
+
"stem": "string"
|
|
2945
3305
|
}
|
|
2946
3306
|
},
|
|
2947
3307
|
"info": {
|
|
@@ -3103,17 +3463,23 @@ function singleQuote(value) {
|
|
|
3103
3463
|
}
|
|
3104
3464
|
|
|
3105
3465
|
async function fetchDatabase(event, collection) {
|
|
3106
|
-
return await $fetch(`/__nuxt_content/${collection}/sql_dump`, {
|
|
3466
|
+
return await $fetch(`/__nuxt_content/${collection}/sql_dump.txt`, {
|
|
3107
3467
|
context: event ? { cloudflare: event.context.cloudflare } : {},
|
|
3108
3468
|
responseType: "text",
|
|
3109
|
-
headers: {
|
|
3469
|
+
headers: {
|
|
3470
|
+
"content-type": "text/plain",
|
|
3471
|
+
...event?.node?.req?.headers?.cookie ? { cookie: event.node.req.headers.cookie } : {}
|
|
3472
|
+
},
|
|
3110
3473
|
query: { v: checksums[String(collection)], t: Date.now() }
|
|
3111
3474
|
});
|
|
3112
3475
|
}
|
|
3113
3476
|
async function fetchQuery(event, collection, sql) {
|
|
3114
3477
|
return await $fetch(`/__nuxt_content/${collection}/query`, {
|
|
3115
3478
|
context: event ? { cloudflare: event.context.cloudflare } : {},
|
|
3116
|
-
headers: {
|
|
3479
|
+
headers: {
|
|
3480
|
+
"content-type": "application/json",
|
|
3481
|
+
...event?.node?.req?.headers?.cookie ? { cookie: event.node.req.headers.cookie } : {}
|
|
3482
|
+
},
|
|
3117
3483
|
query: { v: checksums[String(collection)], t: Date.now() },
|
|
3118
3484
|
method: "POST",
|
|
3119
3485
|
body: {
|
|
@@ -3122,7 +3488,7 @@ async function fetchQuery(event, collection, sql) {
|
|
|
3122
3488
|
});
|
|
3123
3489
|
}
|
|
3124
3490
|
|
|
3125
|
-
const
|
|
3491
|
+
const queryCollection = (event, collection) => {
|
|
3126
3492
|
return collectionQueryBuilder(collection, (collection2, sql) => fetchQuery(event, collection2, sql));
|
|
3127
3493
|
};
|
|
3128
3494
|
|
|
@@ -3330,104 +3696,28 @@ function withSiteUrl(e, path, options = {}) {
|
|
|
3330
3696
|
});
|
|
3331
3697
|
}
|
|
3332
3698
|
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
let numMatches = 0;
|
|
3350
|
-
for (let i = 0; i < numMatchingLengths; i++) {
|
|
3351
|
-
const matchLength = matchingLengths[i];
|
|
3352
|
-
if (matchLength < pathLength && path[matchLength] === pattern[p]) {
|
|
3353
|
-
matchingLengths[numMatches++] = matchLength + 1;
|
|
3354
|
-
}
|
|
3355
|
-
}
|
|
3356
|
-
if (numMatches === 0) {
|
|
3357
|
-
return false;
|
|
3358
|
-
}
|
|
3359
|
-
numMatchingLengths = numMatches;
|
|
3360
|
-
}
|
|
3361
|
-
p++;
|
|
3362
|
-
}
|
|
3363
|
-
return true;
|
|
3364
|
-
}
|
|
3365
|
-
function matchPathToRule(path, _rules) {
|
|
3366
|
-
let matchedRule = null;
|
|
3367
|
-
const rules = _rules.filter(Boolean);
|
|
3368
|
-
const rulesLength = rules.length;
|
|
3369
|
-
let i = 0;
|
|
3370
|
-
while (i < rulesLength) {
|
|
3371
|
-
const rule = rules[i];
|
|
3372
|
-
if (!matches(rule.pattern, path)) {
|
|
3373
|
-
i++;
|
|
3374
|
-
continue;
|
|
3375
|
-
}
|
|
3376
|
-
if (!matchedRule || rule.pattern.length > matchedRule.pattern.length) {
|
|
3377
|
-
matchedRule = rule;
|
|
3378
|
-
} else if (rule.pattern.length === matchedRule.pattern.length && rule.allow && !matchedRule.allow) {
|
|
3379
|
-
matchedRule = rule;
|
|
3380
|
-
}
|
|
3381
|
-
i++;
|
|
3382
|
-
}
|
|
3383
|
-
return matchedRule;
|
|
3384
|
-
}
|
|
3385
|
-
function asArray(v) {
|
|
3386
|
-
return typeof v === "undefined" ? [] : Array.isArray(v) ? v : [v];
|
|
3699
|
+
const ROBOT_DIRECTIVE_VALUES = {
|
|
3700
|
+
// Standard directives
|
|
3701
|
+
enabled: "index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",
|
|
3702
|
+
disabled: "noindex, nofollow",
|
|
3703
|
+
index: "index",
|
|
3704
|
+
noindex: "noindex",
|
|
3705
|
+
follow: "follow",
|
|
3706
|
+
nofollow: "nofollow",
|
|
3707
|
+
none: "none",
|
|
3708
|
+
all: "all",
|
|
3709
|
+
// Non-standard directives (not part of official robots spec)
|
|
3710
|
+
noai: "noai",
|
|
3711
|
+
noimageai: "noimageai"
|
|
3712
|
+
};
|
|
3713
|
+
function formatMaxImagePreview(value) {
|
|
3714
|
+
return `max-image-preview:${value}`;
|
|
3387
3715
|
}
|
|
3388
|
-
function
|
|
3389
|
-
|
|
3390
|
-
for (const group of groups) {
|
|
3391
|
-
for (const comment of group.comment || [])
|
|
3392
|
-
lines.push(`# ${comment}`);
|
|
3393
|
-
for (const userAgent of group.userAgent || ["*"])
|
|
3394
|
-
lines.push(`User-agent: ${userAgent}`);
|
|
3395
|
-
for (const allow of group.allow || [])
|
|
3396
|
-
lines.push(`Allow: ${allow}`);
|
|
3397
|
-
for (const disallow of group.disallow || [])
|
|
3398
|
-
lines.push(`Disallow: ${disallow}`);
|
|
3399
|
-
for (const cleanParam of group.cleanParam || [])
|
|
3400
|
-
lines.push(`Clean-param: ${cleanParam}`);
|
|
3401
|
-
lines.push("");
|
|
3402
|
-
}
|
|
3403
|
-
for (const sitemap of sitemaps)
|
|
3404
|
-
lines.push(`Sitemap: ${sitemap}`);
|
|
3405
|
-
return lines.join("\n");
|
|
3716
|
+
function formatMaxSnippet(value) {
|
|
3717
|
+
return `max-snippet:${value}`;
|
|
3406
3718
|
}
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
obj[key] = Array.from(/* @__PURE__ */ new Set([...obj[key], ...value]));
|
|
3410
|
-
return obj[key];
|
|
3411
|
-
});
|
|
3412
|
-
function normaliseRobotsRouteRule(config) {
|
|
3413
|
-
let allow;
|
|
3414
|
-
if (typeof config.robots === "boolean")
|
|
3415
|
-
allow = config.robots;
|
|
3416
|
-
else if (typeof config.robots === "object" && typeof config.robots.indexable !== "undefined")
|
|
3417
|
-
allow = config.robots.indexable;
|
|
3418
|
-
let rule;
|
|
3419
|
-
if (typeof config.robots === "object" && typeof config.robots.rule !== "undefined")
|
|
3420
|
-
rule = config.robots.rule;
|
|
3421
|
-
else if (typeof config.robots === "string")
|
|
3422
|
-
rule = config.robots;
|
|
3423
|
-
if (rule && !allow)
|
|
3424
|
-
allow = rule !== "none" && !rule.includes("noindex");
|
|
3425
|
-
if (typeof allow === "undefined" && typeof rule === "undefined")
|
|
3426
|
-
return;
|
|
3427
|
-
return {
|
|
3428
|
-
allow,
|
|
3429
|
-
rule
|
|
3430
|
-
};
|
|
3719
|
+
function formatMaxVideoPreview(value) {
|
|
3720
|
+
return `max-video-preview:${value}`;
|
|
3431
3721
|
}
|
|
3432
3722
|
|
|
3433
3723
|
function withoutQuery$1(path) {
|
|
@@ -3450,10 +3740,56 @@ function createNitroRouteRuleMatcher$1(e) {
|
|
|
3450
3740
|
};
|
|
3451
3741
|
}
|
|
3452
3742
|
|
|
3743
|
+
function normaliseRobotsRouteRule(config) {
|
|
3744
|
+
let allow;
|
|
3745
|
+
if (typeof config.robots === "boolean")
|
|
3746
|
+
allow = config.robots;
|
|
3747
|
+
else if (typeof config.robots === "object" && "indexable" in config.robots && typeof config.robots.indexable !== "undefined")
|
|
3748
|
+
allow = config.robots.indexable;
|
|
3749
|
+
let rule;
|
|
3750
|
+
if (typeof config.robots === "object" && config.robots !== null) {
|
|
3751
|
+
if ("rule" in config.robots && typeof config.robots.rule !== "undefined") {
|
|
3752
|
+
rule = config.robots.rule;
|
|
3753
|
+
} else if (!("indexable" in config.robots)) {
|
|
3754
|
+
const directives = [];
|
|
3755
|
+
for (const [key, value] of Object.entries(config.robots)) {
|
|
3756
|
+
if (value === false || value === null || value === void 0)
|
|
3757
|
+
continue;
|
|
3758
|
+
if (key in ROBOT_DIRECTIVE_VALUES && typeof value === "boolean" && value) {
|
|
3759
|
+
directives.push(ROBOT_DIRECTIVE_VALUES[key]);
|
|
3760
|
+
} else if (key === "max-image-preview" && typeof value === "string") {
|
|
3761
|
+
directives.push(formatMaxImagePreview(value));
|
|
3762
|
+
} else if (key === "max-snippet" && typeof value === "number") {
|
|
3763
|
+
directives.push(formatMaxSnippet(value));
|
|
3764
|
+
} else if (key === "max-video-preview" && typeof value === "number") {
|
|
3765
|
+
directives.push(formatMaxVideoPreview(value));
|
|
3766
|
+
}
|
|
3767
|
+
}
|
|
3768
|
+
if (directives.length > 0) {
|
|
3769
|
+
rule = directives.join(", ");
|
|
3770
|
+
}
|
|
3771
|
+
}
|
|
3772
|
+
} else if (typeof config.robots === "string") {
|
|
3773
|
+
rule = config.robots;
|
|
3774
|
+
}
|
|
3775
|
+
if (rule && typeof allow === "undefined") {
|
|
3776
|
+
const disallowIndicators = ["none", "noindex", "noai", "noimageai"];
|
|
3777
|
+
allow = !disallowIndicators.some(
|
|
3778
|
+
(indicator) => rule === indicator || rule.split(",").some((part) => part.trim() === indicator)
|
|
3779
|
+
);
|
|
3780
|
+
}
|
|
3781
|
+
if (typeof allow === "undefined" && typeof rule === "undefined")
|
|
3782
|
+
return;
|
|
3783
|
+
return {
|
|
3784
|
+
allow,
|
|
3785
|
+
rule
|
|
3786
|
+
};
|
|
3787
|
+
}
|
|
3788
|
+
|
|
3453
3789
|
function getSiteRobotConfig(e) {
|
|
3454
3790
|
const query = getQuery$1(e);
|
|
3455
3791
|
const hints = [];
|
|
3456
|
-
const { groups, debug } =
|
|
3792
|
+
const { groups, debug } = useRuntimeConfigNuxtRobots(e);
|
|
3457
3793
|
let indexable = getSiteIndexable(e);
|
|
3458
3794
|
const queryIndexableEnabled = String(query.mockProductionEnv) === "true" || query.mockProductionEnv === "";
|
|
3459
3795
|
{
|
|
@@ -3482,7 +3818,7 @@ function getSiteRobotConfig(e) {
|
|
|
3482
3818
|
|
|
3483
3819
|
function getPathRobotConfig(e, options) {
|
|
3484
3820
|
const runtimeConfig = useRuntimeConfig(e);
|
|
3485
|
-
const { robotsDisabledValue, robotsEnabledValue, isNuxtContentV2 } =
|
|
3821
|
+
const { robotsDisabledValue, robotsEnabledValue, isNuxtContentV2 } = useRuntimeConfigNuxtRobots(e);
|
|
3486
3822
|
if (!options?.skipSiteIndexable) {
|
|
3487
3823
|
if (!getSiteRobotConfig(e).indexable) {
|
|
3488
3824
|
return {
|
|
@@ -3525,7 +3861,7 @@ function getPathRobotConfig(e, options) {
|
|
|
3525
3861
|
}
|
|
3526
3862
|
};
|
|
3527
3863
|
}
|
|
3528
|
-
const robotsTxtRule = matchPathToRule(path, group._rules);
|
|
3864
|
+
const robotsTxtRule = matchPathToRule(path, group._rules || []);
|
|
3529
3865
|
if (robotsTxtRule) {
|
|
3530
3866
|
if (!robotsTxtRule.allow) {
|
|
3531
3867
|
return {
|
|
@@ -3549,7 +3885,7 @@ function getPathRobotConfig(e, options) {
|
|
|
3549
3885
|
}
|
|
3550
3886
|
};
|
|
3551
3887
|
}
|
|
3552
|
-
nitroApp.
|
|
3888
|
+
nitroApp._robotsRuleMatcher = nitroApp._robotsRuleMatcher || createNitroRouteRuleMatcher$1(e);
|
|
3553
3889
|
let routeRulesPath = path;
|
|
3554
3890
|
if (runtimeConfig.public?.i18n?.locales) {
|
|
3555
3891
|
const { locales } = runtimeConfig.public.i18n;
|
|
@@ -3558,10 +3894,10 @@ function getPathRobotConfig(e, options) {
|
|
|
3558
3894
|
routeRulesPath = routeRulesPath.replace(`/${locale.code}`, "");
|
|
3559
3895
|
}
|
|
3560
3896
|
}
|
|
3561
|
-
const routeRules = normaliseRobotsRouteRule(nitroApp.
|
|
3897
|
+
const routeRules = normaliseRobotsRouteRule(nitroApp._robotsRuleMatcher(routeRulesPath));
|
|
3562
3898
|
if (routeRules && (typeof routeRules.allow !== "undefined" || typeof routeRules.rule !== "undefined")) {
|
|
3563
3899
|
return {
|
|
3564
|
-
indexable: routeRules.allow,
|
|
3900
|
+
indexable: routeRules.allow ?? false,
|
|
3565
3901
|
rule: routeRules.rule || (routeRules.allow ? robotsEnabledValue : robotsDisabledValue),
|
|
3566
3902
|
debug: {
|
|
3567
3903
|
source: "Route Rules"
|
|
@@ -3768,7 +4104,7 @@ function backwardsCompatibleSecurity(securityHeaders) {
|
|
|
3768
4104
|
return securityHeadersAsObject;
|
|
3769
4105
|
}
|
|
3770
4106
|
|
|
3771
|
-
const
|
|
4107
|
+
const _bhMjw8GUQRBOh08y1gcApVwqgcuV_Ay88JuONtrFNE = defineNitroPlugin(async (nitroApp) => {
|
|
3772
4108
|
const appSecurityOptions = getAppSecurityOptions();
|
|
3773
4109
|
const runtimeConfig = useRuntimeConfig();
|
|
3774
4110
|
for (const route in runtimeConfig.nitro.routeRules) {
|
|
@@ -3812,11 +4148,11 @@ const _JvOSxtiYN5RhTtiWK4gP6Qxjgh3Y8HYwNigx1wgQzE0 = defineNitroPlugin(async (ni
|
|
|
3812
4148
|
await nitroApp.hooks.callHook("nuxt-security:ready");
|
|
3813
4149
|
});
|
|
3814
4150
|
|
|
3815
|
-
const sriHashes = {"/_nuxt/builds/meta/dev.json":"sha384-
|
|
4151
|
+
const sriHashes = {"/_nuxt/builds/meta/dev.json":"sha384-dibFEjuSz8zPrNEdJtNdZ9AJ+JePkAai+nnuz9jwcKkN8G2B8EogoB5Rg0WAFXvk","/_nuxt/builds/latest.json":"sha384-Qu6eNjVSUxNW+NU+yQnv0GeK4fq7kGftjey9Z3iFBeD/FXEWB4RX19c4gXTY2vyJ","/_fonts/aPa9az0DeE4U5rqM-Ov0Vl_obQis_d6sScLNygGkvxw-s32Y9TxBLZRr_ebRHQ3l3q1g2j_0tPT879PPSBGrj8A.woff2":"sha384-A9QxCE9lPVXbqJLKywOZu/0mfnagppo3gIkNb0hL/czBrJVkLds+u6RpiSG0NvFo","/_fonts/EP1810cmAtyahQPDHB6nvBzRkIG5RcNv4u5vTy1aYHU-Ih_Po7WkbhDymI0Y_ntmpz__bZJprHiu7_c5N_X6AAA.woff2":"sha384-+PmgyN4qjpS0OKS3tzpnBzL+tElvEVNQIl0m4fERgMbCABP2lX0btd+ZJmtW2ArI","/_fonts/JNWOTRocaYj0gq52vW_s7sHAdSMUetrRmhhggCVxyZ0-TnR4PP30hI5UWldZ0knUBrHkvIoiDWYXwn2v1NtCh80.woff2":"sha384-iUZRizg1CuPUg7n1OkqSVEIjaw34zUc6NUPJrGHoQTVQsmIF65vPx9MOTD5ONTvH","/_fonts/kgyHMsxRmhh06xcV0yKMKdTKQBsQpXGi7erqwaqgjXg-55rzD39AWoqYSkQOLHuoKZUDVcDSlXRKdaymIN2dXes.woff":"sha384-0W1DksASmFMz/uEJlqgSE9CoI0NaZE4S+FkNmGlcELBL96bPDmMQzEvaMOgKBqd1","/_fonts/XbAtjIvy1UErjg9eu_v7X3zPLS_AwsmqVsR9fG-JB6o-H99o9_8BZXq7ey5UyS99Wn9zX0V0anvpXEqAqavcJlQ.woff2":"sha384-KWAx1TYOYzHt7smA8HF6EuuKxlQjXkwztw0PEe7lPd2nXNzhGpdobMAoGJ5RXTOm","/_fonts/ZLm6CLvwhQbamZ73M80jbqz7DuOkHlT_HRyXHG7YfVs-eYLoSJPWhqR5CE0c8XPABls8kE_7Fc7F2x7Gtfsg_8M.woff2":"sha384-6OEfO361yZtm7FjffN3HFcdErLtYooL76nG9prK0CbRoC1eKwh4EPFE78Ps30v4m","/favicon.ico":"sha384-qOhXBYvwwZHHuXW10XxZvVu9Mzkpqf/fw3zEOxCGyqOoKqyHbeudntAaY6nKOTro","/nuxt-ignis.png":"sha384-fXgXTmjUDLdbwf7u18hVtq6YkShXv8NyJaUskNLpnUNtypcNblNb8I7IDXKgYEeY","/unsplash.jpg":"sha384-66n0HIHfBVzK8qdw7zVfgwJ5htcrV6EtN2DQmlyxUIu46/kEKMRMqFrWKYm8bP18","/_ignis-config.json":"sha384-EyfLIqxTS2XFLjAlNpTNC0K/31DbxaF3nCm8+ECA47xWFaq4PfHDQtLMA2Qw/cNy","/nuxt-spec.png":"sha384-lqerIwfMImy74T5uRR9ogeRAvkGehx21V4QBTVB0a6Zp+2VTFMZmjOtNAAti72LU"};
|
|
3816
4152
|
|
|
3817
4153
|
const SCRIPT_RE$1 = /<script((?=[^>]+\bsrc="([^"]+)")(?![^>]+\bintegrity="[^"]+")[^>]+)(?:\/>|><\/script>)/g;
|
|
3818
4154
|
const LINK_RE$1 = /<link((?=[^>]+\brel="(?:stylesheet|preload|modulepreload)")(?=[^>]+\bhref="([^"]+)")(?![^>]+\bintegrity="[\w\-+/=]+")[^>]+)>/g;
|
|
3819
|
-
const
|
|
4155
|
+
const _LUEXAZKBV0ePPfOhSg_6JUQdyilTeQaim2YKwW8 = defineNitroPlugin((nitroApp) => {
|
|
3820
4156
|
nitroApp.hooks.hook("render:html", (html, { event }) => {
|
|
3821
4157
|
const rules = resolveSecurityRules(event);
|
|
3822
4158
|
if (!rules.enabled || !rules.sri) {
|
|
@@ -3860,7 +4196,7 @@ function generateRandomNonce() {
|
|
|
3860
4196
|
return nonce;
|
|
3861
4197
|
}
|
|
3862
4198
|
|
|
3863
|
-
const
|
|
4199
|
+
const _UcTOs1Ung7KfBGkFiid8OwKa_mCxxlEiLE15hP_nP8 = defineNitroPlugin((nitroApp) => {
|
|
3864
4200
|
{
|
|
3865
4201
|
return;
|
|
3866
4202
|
}
|
|
@@ -3870,7 +4206,7 @@ const LINK_RE = /<link([^>]*?>)/gi;
|
|
|
3870
4206
|
const NONCE_RE = /nonce="[^"]+"/i;
|
|
3871
4207
|
const SCRIPT_RE = /<script([^>]*?>)/gi;
|
|
3872
4208
|
const STYLE_RE = /<style([^>]*?>)/gi;
|
|
3873
|
-
const
|
|
4209
|
+
const _1TnoulbyNEjnKeM7ID2u9Jhxymh2c_eJ0gaouLjpOLU = defineNitroPlugin((nitroApp) => {
|
|
3874
4210
|
nitroApp.hooks.hook("request", (event) => {
|
|
3875
4211
|
if (event.context.security?.nonce) {
|
|
3876
4212
|
return;
|
|
@@ -3916,7 +4252,7 @@ const _XhOSEDieM4_mfBI7ZVt8bJwMIqkowHxufWk5iOPyG8w = defineNitroPlugin((nitroApp
|
|
|
3916
4252
|
});
|
|
3917
4253
|
});
|
|
3918
4254
|
|
|
3919
|
-
const
|
|
4255
|
+
const _s9a6UFtdhxzyAoNtC707kPxVxb8AnaIv7TbZuBq97cA = defineNitroPlugin((nitroApp) => {
|
|
3920
4256
|
nitroApp.hooks.hook("render:html", (response, { event }) => {
|
|
3921
4257
|
if (response.island) {
|
|
3922
4258
|
return;
|
|
@@ -3964,13 +4300,13 @@ function updateCspVariables(csp, nonce, scriptHashes, styleHashes) {
|
|
|
3964
4300
|
return generatedCsp;
|
|
3965
4301
|
}
|
|
3966
4302
|
|
|
3967
|
-
const
|
|
4303
|
+
const _66aEGGOeNtcExwcSeAGysofsErgxIFLzvow0B4F5FtQ = defineNitroPlugin((nitroApp) => {
|
|
3968
4304
|
{
|
|
3969
4305
|
return;
|
|
3970
4306
|
}
|
|
3971
4307
|
});
|
|
3972
4308
|
|
|
3973
|
-
const
|
|
4309
|
+
const _17wfgbidit_XwRLLW6jOTCpHHhL0IVyMYd6hC8p2ve8 = defineNitroPlugin((nitroApp) => {
|
|
3974
4310
|
nitroApp.hooks.hook("render:response", (response, { event }) => {
|
|
3975
4311
|
const rules = resolveSecurityRules(event);
|
|
3976
4312
|
if (rules.enabled && rules.headers) {
|
|
@@ -3993,7 +4329,7 @@ const _DyMRzPH15AoEzH6bcFlYsDJQ8vPhi_NfbZ4pC9DNfyI = defineNitroPlugin((nitroApp
|
|
|
3993
4329
|
});
|
|
3994
4330
|
});
|
|
3995
4331
|
|
|
3996
|
-
const
|
|
4332
|
+
const _yUAn94jpUGoVq7_CVAFEN2XJYVARLEmPZsHDs6AYpDI = defineNitroPlugin((nitroApp) => {
|
|
3997
4333
|
nitroApp.hooks.hook("beforeResponse", (event) => {
|
|
3998
4334
|
const rules = resolveSecurityRules(event);
|
|
3999
4335
|
if (rules.enabled && rules.hidePoweredBy && !event.node.res.headersSent) {
|
|
@@ -4002,7 +4338,7 @@ const _tZXTnUnKl_u8d0rfkkU0LQbiR3UDjJkyevkUpuPgMg = defineNitroPlugin((nitroApp)
|
|
|
4002
4338
|
});
|
|
4003
4339
|
});
|
|
4004
4340
|
|
|
4005
|
-
const
|
|
4341
|
+
const _E33fyVSYcixGATPXDL9sKAyq3caNnkkPFWNIqgq8uE0 = defineNitroPlugin(async (nitroApp) => {
|
|
4006
4342
|
{
|
|
4007
4343
|
const prerenderedHeaders = await useStorage("assets:nuxt-security").getItem("headers.json") || {};
|
|
4008
4344
|
nitroApp.hooks.hook("beforeResponse", (event) => {
|
|
@@ -4018,24 +4354,112 @@ const _KIUo4nid7mjU4TFOv7ese0pfkfn6j2t89IVe_tmybyI = defineNitroPlugin(async (ni
|
|
|
4018
4354
|
});
|
|
4019
4355
|
|
|
4020
4356
|
const plugins = [
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4357
|
+
_BUwpELsyks45lroxlJ7pWDnbGcceJZF9mVl7VPNuPm4,
|
|
4358
|
+
__pERcNNWV1OaEgG7uvohNfb6mvznh4KNsVmRCE4aV0,
|
|
4359
|
+
_Z5botqEqNb56svWtJhyEDnS6Z4dk8BSBwZjYp1KssfI,
|
|
4360
|
+
__N1t3ZNCULqwSjGoVUR2rCd_NNid2x4qNEWZGlFs8vY,
|
|
4025
4361
|
_aS6mRx7bj_kthWDco8VHtcEWB9RO7OaYZ7jDuJ2mlM,
|
|
4026
4362
|
_7V99JalBsmMpJ4Im6qwrWJC2toR4GkZuF5sU0ekK6TU,
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
_KIUo4nid7mjU4TFOv7ese0pfkfn6j2t89IVe_tmybyI
|
|
4363
|
+
_bhMjw8GUQRBOh08y1gcApVwqgcuV_Ay88JuONtrFNE,
|
|
4364
|
+
_LUEXAZKBV0ePPfOhSg_6JUQdyilTeQaim2YKwW8,
|
|
4365
|
+
_UcTOs1Ung7KfBGkFiid8OwKa_mCxxlEiLE15hP_nP8,
|
|
4366
|
+
_1TnoulbyNEjnKeM7ID2u9Jhxymh2c_eJ0gaouLjpOLU,
|
|
4367
|
+
_s9a6UFtdhxzyAoNtC707kPxVxb8AnaIv7TbZuBq97cA,
|
|
4368
|
+
_66aEGGOeNtcExwcSeAGysofsErgxIFLzvow0B4F5FtQ,
|
|
4369
|
+
_17wfgbidit_XwRLLW6jOTCpHHhL0IVyMYd6hC8p2ve8,
|
|
4370
|
+
_yUAn94jpUGoVq7_CVAFEN2XJYVARLEmPZsHDs6AYpDI,
|
|
4371
|
+
_E33fyVSYcixGATPXDL9sKAyq3caNnkkPFWNIqgq8uE0
|
|
4037
4372
|
];
|
|
4038
4373
|
|
|
4374
|
+
const assets = {};
|
|
4375
|
+
|
|
4376
|
+
function readAsset (id) {
|
|
4377
|
+
const serverDir = dirname$1(fileURLToPath(globalThis._importMeta_.url));
|
|
4378
|
+
return promises.readFile(resolve$2(serverDir, assets[id].path))
|
|
4379
|
+
}
|
|
4380
|
+
|
|
4381
|
+
const publicAssetBases = {"/_nuxt/builds/meta/":{"maxAge":31536000},"/_nuxt/builds/":{"maxAge":1},"/_fonts/":{"maxAge":31536000},"/_scripts/":{"maxAge":31536000}};
|
|
4382
|
+
|
|
4383
|
+
function isPublicAssetURL(id = '') {
|
|
4384
|
+
if (assets[id]) {
|
|
4385
|
+
return true
|
|
4386
|
+
}
|
|
4387
|
+
for (const base in publicAssetBases) {
|
|
4388
|
+
if (id.startsWith(base)) { return true }
|
|
4389
|
+
}
|
|
4390
|
+
return false
|
|
4391
|
+
}
|
|
4392
|
+
|
|
4393
|
+
function getAsset (id) {
|
|
4394
|
+
return assets[id]
|
|
4395
|
+
}
|
|
4396
|
+
|
|
4397
|
+
const METHODS = /* @__PURE__ */ new Set(["HEAD", "GET"]);
|
|
4398
|
+
const EncodingMap = { gzip: ".gz", br: ".br" };
|
|
4399
|
+
const _WLD3jp = eventHandler((event) => {
|
|
4400
|
+
if (event.method && !METHODS.has(event.method)) {
|
|
4401
|
+
return;
|
|
4402
|
+
}
|
|
4403
|
+
let id = decodePath(
|
|
4404
|
+
withLeadingSlash(withoutTrailingSlash(parseURL(event.path).pathname))
|
|
4405
|
+
);
|
|
4406
|
+
let asset;
|
|
4407
|
+
const encodingHeader = String(
|
|
4408
|
+
getRequestHeader(event, "accept-encoding") || ""
|
|
4409
|
+
);
|
|
4410
|
+
const encodings = [
|
|
4411
|
+
...encodingHeader.split(",").map((e) => EncodingMap[e.trim()]).filter(Boolean).sort(),
|
|
4412
|
+
""
|
|
4413
|
+
];
|
|
4414
|
+
if (encodings.length > 1) {
|
|
4415
|
+
appendResponseHeader(event, "Vary", "Accept-Encoding");
|
|
4416
|
+
}
|
|
4417
|
+
for (const encoding of encodings) {
|
|
4418
|
+
for (const _id of [id + encoding, joinURL(id, "index.html" + encoding)]) {
|
|
4419
|
+
const _asset = getAsset(_id);
|
|
4420
|
+
if (_asset) {
|
|
4421
|
+
asset = _asset;
|
|
4422
|
+
id = _id;
|
|
4423
|
+
break;
|
|
4424
|
+
}
|
|
4425
|
+
}
|
|
4426
|
+
}
|
|
4427
|
+
if (!asset) {
|
|
4428
|
+
if (isPublicAssetURL(id)) {
|
|
4429
|
+
removeResponseHeader(event, "Cache-Control");
|
|
4430
|
+
throw createError({ statusCode: 404 });
|
|
4431
|
+
}
|
|
4432
|
+
return;
|
|
4433
|
+
}
|
|
4434
|
+
const ifNotMatch = getRequestHeader(event, "if-none-match") === asset.etag;
|
|
4435
|
+
if (ifNotMatch) {
|
|
4436
|
+
setResponseStatus(event, 304, "Not Modified");
|
|
4437
|
+
return "";
|
|
4438
|
+
}
|
|
4439
|
+
const ifModifiedSinceH = getRequestHeader(event, "if-modified-since");
|
|
4440
|
+
const mtimeDate = new Date(asset.mtime);
|
|
4441
|
+
if (ifModifiedSinceH && asset.mtime && new Date(ifModifiedSinceH) >= mtimeDate) {
|
|
4442
|
+
setResponseStatus(event, 304, "Not Modified");
|
|
4443
|
+
return "";
|
|
4444
|
+
}
|
|
4445
|
+
if (asset.type && !getResponseHeader(event, "Content-Type")) {
|
|
4446
|
+
setResponseHeader(event, "Content-Type", asset.type);
|
|
4447
|
+
}
|
|
4448
|
+
if (asset.etag && !getResponseHeader(event, "ETag")) {
|
|
4449
|
+
setResponseHeader(event, "ETag", asset.etag);
|
|
4450
|
+
}
|
|
4451
|
+
if (asset.mtime && !getResponseHeader(event, "Last-Modified")) {
|
|
4452
|
+
setResponseHeader(event, "Last-Modified", mtimeDate.toUTCString());
|
|
4453
|
+
}
|
|
4454
|
+
if (asset.encoding && !getResponseHeader(event, "Content-Encoding")) {
|
|
4455
|
+
setResponseHeader(event, "Content-Encoding", asset.encoding);
|
|
4456
|
+
}
|
|
4457
|
+
if (asset.size > 0 && !getResponseHeader(event, "Content-Length")) {
|
|
4458
|
+
setResponseHeader(event, "Content-Length", asset.size);
|
|
4459
|
+
}
|
|
4460
|
+
return readAsset(id);
|
|
4461
|
+
});
|
|
4462
|
+
|
|
4039
4463
|
const defaultThrowErrorValue = { throwError: true };
|
|
4040
4464
|
const defaultSecurityConfig = (serverlUrl, strict) => {
|
|
4041
4465
|
const defaultConfig = {
|
|
@@ -4128,7 +4552,7 @@ const defaultSecurityConfig = (serverlUrl, strict) => {
|
|
|
4128
4552
|
|
|
4129
4553
|
const FILE_UPLOAD_HEADER = "multipart/form-data";
|
|
4130
4554
|
const defaultSizeLimiter = defaultSecurityConfig("").requestSizeLimiter;
|
|
4131
|
-
const
|
|
4555
|
+
const _Jp0StA = defineEventHandler((event) => {
|
|
4132
4556
|
const rules = resolveSecurityRules(event);
|
|
4133
4557
|
if (rules.enabled && rules.requestSizeLimiter) {
|
|
4134
4558
|
const requestSizeLimiter = defu(
|
|
@@ -4154,7 +4578,7 @@ const _nGzU2E = defineEventHandler((event) => {
|
|
|
4154
4578
|
}
|
|
4155
4579
|
});
|
|
4156
4580
|
|
|
4157
|
-
const
|
|
4581
|
+
const _ji0G_c = defineEventHandler((event) => {
|
|
4158
4582
|
const rules = resolveSecurityRules(event);
|
|
4159
4583
|
if (rules.enabled && rules.corsHandler) {
|
|
4160
4584
|
const { corsHandler } = rules;
|
|
@@ -4179,7 +4603,7 @@ const _DBwtAP = defineEventHandler((event) => {
|
|
|
4179
4603
|
}
|
|
4180
4604
|
});
|
|
4181
4605
|
|
|
4182
|
-
const
|
|
4606
|
+
const _SCmHem = defineEventHandler((event) => {
|
|
4183
4607
|
const rules = resolveSecurityRules(event);
|
|
4184
4608
|
if (rules.enabled && rules.allowedMethodsRestricter) {
|
|
4185
4609
|
const { allowedMethodsRestricter } = rules;
|
|
@@ -4199,7 +4623,7 @@ const _a3BfBQ = defineEventHandler((event) => {
|
|
|
4199
4623
|
|
|
4200
4624
|
const storage = useStorage("#rate-limiter-storage");
|
|
4201
4625
|
const defaultRateLimiter = defaultSecurityConfig("").rateLimiter;
|
|
4202
|
-
const
|
|
4626
|
+
const _umXuS0 = defineEventHandler(async (event) => {
|
|
4203
4627
|
const rules = resolveSecurityRules(event);
|
|
4204
4628
|
const route = resolveSecurityRoute(event);
|
|
4205
4629
|
if (rules.enabled && rules.rateLimiter) {
|
|
@@ -4262,7 +4686,7 @@ function getIP(event) {
|
|
|
4262
4686
|
return ip;
|
|
4263
4687
|
}
|
|
4264
4688
|
|
|
4265
|
-
const
|
|
4689
|
+
const _dtrJEZ = defineEventHandler(async (event) => {
|
|
4266
4690
|
const rules = resolveSecurityRules(event);
|
|
4267
4691
|
if (rules.enabled && rules.xssValidator) {
|
|
4268
4692
|
const filterOpt = {
|
|
@@ -4306,7 +4730,7 @@ const _DJziEh = defineEventHandler(async (event) => {
|
|
|
4306
4730
|
|
|
4307
4731
|
const warnOnceSet = /* @__PURE__ */ new Set();
|
|
4308
4732
|
const DEFAULT_ENDPOINT = "https://api.iconify.design";
|
|
4309
|
-
const
|
|
4733
|
+
const _Vmc_bU = defineCachedEventHandler(async (event) => {
|
|
4310
4734
|
const url = getRequestURL(event);
|
|
4311
4735
|
if (!url)
|
|
4312
4736
|
return createError({ status: 400, message: "Invalid icon request" });
|
|
@@ -4454,7 +4878,7 @@ const _ZwvYdn = defineEventHandler(async (event) => {
|
|
|
4454
4878
|
}
|
|
4455
4879
|
});
|
|
4456
4880
|
|
|
4457
|
-
const
|
|
4881
|
+
const _XVpHng = eventHandler(async (e) => {
|
|
4458
4882
|
if (e.context._initedSiteConfig)
|
|
4459
4883
|
return;
|
|
4460
4884
|
const runtimeConfig = useRuntimeConfig(e);
|
|
@@ -4506,7 +4930,7 @@ const _2TCn_1 = defineEventHandler(async (e) => {
|
|
|
4506
4930
|
e.context._initedSiteConfig = true;
|
|
4507
4931
|
});
|
|
4508
4932
|
|
|
4509
|
-
const
|
|
4933
|
+
const _LgdZze = eventHandler(async (e) => {
|
|
4510
4934
|
const siteConfig = useSiteConfig(e);
|
|
4511
4935
|
const nitroOrigin = useNitroOrigin(e);
|
|
4512
4936
|
const runtimeConfig = useRuntimeConfig(e);
|
|
@@ -4520,10 +4944,10 @@ const _ORf4yf = defineEventHandler(async (e) => {
|
|
|
4520
4944
|
};
|
|
4521
4945
|
});
|
|
4522
4946
|
|
|
4523
|
-
const
|
|
4524
|
-
const
|
|
4947
|
+
const _uMK4YT = defineEventHandler(async (e) => {
|
|
4948
|
+
const nitroApp = useNitroApp();
|
|
4525
4949
|
const { indexable, hints } = getSiteRobotConfig(e);
|
|
4526
|
-
const { credits, isNuxtContentV2, cacheControl } =
|
|
4950
|
+
const { credits, isNuxtContentV2, cacheControl } = useRuntimeConfigNuxtRobots(e);
|
|
4527
4951
|
let robotsTxtCtx = {
|
|
4528
4952
|
sitemaps: [],
|
|
4529
4953
|
groups: [
|
|
@@ -4575,14 +4999,14 @@ const _0QOObO = defineEventHandler(async (e) => {
|
|
|
4575
4999
|
setHeader(e, "Content-Type", "text/plain; charset=utf-8");
|
|
4576
5000
|
setHeader(e, "Cache-Control", "no-store" );
|
|
4577
5001
|
const hookCtx = { robotsTxt, e };
|
|
4578
|
-
await
|
|
5002
|
+
await nitroApp.hooks.callHook("robots:robots-txt", hookCtx);
|
|
4579
5003
|
return hookCtx.robotsTxt;
|
|
4580
5004
|
});
|
|
4581
5005
|
|
|
4582
|
-
const
|
|
5006
|
+
const _XpKgU4 = defineEventHandler(async (e) => {
|
|
4583
5007
|
if (e.path === "/robots.txt" || e.path.startsWith("/__") || e.path.startsWith("/api") || e.path.startsWith("/_nuxt"))
|
|
4584
5008
|
return;
|
|
4585
|
-
const nuxtRobotsConfig =
|
|
5009
|
+
const nuxtRobotsConfig = useRuntimeConfigNuxtRobots(e);
|
|
4586
5010
|
if (nuxtRobotsConfig) {
|
|
4587
5011
|
const { header } = nuxtRobotsConfig;
|
|
4588
5012
|
const robotConfig = getPathRobotConfig(e, { skipSiteIndexable: Boolean(getQuery$1(e)?.mockProductionEnv) });
|
|
@@ -4593,8 +5017,8 @@ const _2nM3bx = defineEventHandler(async (e) => {
|
|
|
4593
5017
|
}
|
|
4594
5018
|
});
|
|
4595
5019
|
|
|
4596
|
-
const
|
|
4597
|
-
const runtimeConfig =
|
|
5020
|
+
const _WlQo7G = defineEventHandler(async (e) => {
|
|
5021
|
+
const runtimeConfig = useRuntimeConfigNuxtRobots(e);
|
|
4598
5022
|
const { indexable, hints } = getSiteRobotConfig(e);
|
|
4599
5023
|
const siteConfig = useSiteConfig(e);
|
|
4600
5024
|
const robotsTxt = await e.$fetch("/robots.txt", {
|
|
@@ -4613,14 +5037,14 @@ const _4v3OAr = defineEventHandler(async (e) => {
|
|
|
4613
5037
|
};
|
|
4614
5038
|
});
|
|
4615
5039
|
|
|
4616
|
-
const
|
|
5040
|
+
const _MyEbKg = defineEventHandler(async (e) => {
|
|
4617
5041
|
const query = getQuery$1(e);
|
|
4618
5042
|
const path = query.path;
|
|
4619
5043
|
delete query.path;
|
|
4620
5044
|
const res = await $fetch.raw(withQuery(path, query));
|
|
4621
5045
|
const html = res._data;
|
|
4622
5046
|
const robotsHeader = String(res.headers.get("x-robots-tag"));
|
|
4623
|
-
const robotsMeta = html.match(/<meta[^>]+name=["']robots["'][^>]+content=["']([^"']+)["'](?:[^>]+data-hint=["']([^"']+)["'])?[^>]*>/i);
|
|
5047
|
+
const robotsMeta = String(html).match(/<meta[^>]+name=["']robots["'][^>]+content=["']([^"']+)["'](?:[^>]+data-hint=["']([^"']+)["'])?[^>]*>/i);
|
|
4624
5048
|
const [, robotsContent = null, robotsHint = null] = robotsMeta || [];
|
|
4625
5049
|
const [source, line] = robotsHint ? robotsHint.split(",") : [null, null];
|
|
4626
5050
|
return {
|
|
@@ -4637,7 +5061,7 @@ const _QTLJrY = defineEventHandler(async (e) => {
|
|
|
4637
5061
|
};
|
|
4638
5062
|
});
|
|
4639
5063
|
|
|
4640
|
-
const
|
|
5064
|
+
const _fUzllO = defineEventHandler(async (e) => {
|
|
4641
5065
|
const collections = [];
|
|
4642
5066
|
for (const collection in contentManifest) {
|
|
4643
5067
|
if (contentManifest[collection].fields.sitemap) {
|
|
@@ -4646,7 +5070,9 @@ const _CkQE1q = defineEventHandler(async (e) => {
|
|
|
4646
5070
|
}
|
|
4647
5071
|
const contentList = [];
|
|
4648
5072
|
for (const collection of collections) {
|
|
4649
|
-
contentList.push(
|
|
5073
|
+
contentList.push(
|
|
5074
|
+
queryCollection(e, collection).select("path", "sitemap").where("path", "IS NOT NULL").where("sitemap", "IS NOT NULL").all()
|
|
5075
|
+
);
|
|
4650
5076
|
}
|
|
4651
5077
|
const results = await Promise.all(contentList);
|
|
4652
5078
|
return results.flatMap((c) => {
|
|
@@ -4668,12 +5094,20 @@ const merger$1 = createDefu((obj, key, value) => {
|
|
|
4668
5094
|
return obj[key];
|
|
4669
5095
|
});
|
|
4670
5096
|
function mergeOnKey$1(arr, key) {
|
|
4671
|
-
const
|
|
4672
|
-
|
|
5097
|
+
const seen = /* @__PURE__ */ new Map();
|
|
5098
|
+
let resultLength = 0;
|
|
5099
|
+
const result = Array.from({ length: arr.length });
|
|
5100
|
+
for (const item of arr) {
|
|
4673
5101
|
const k = item[key];
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
5102
|
+
if (seen.has(k)) {
|
|
5103
|
+
const existingIndex = seen.get(k);
|
|
5104
|
+
result[existingIndex] = merger$1(item, result[existingIndex]);
|
|
5105
|
+
} else {
|
|
5106
|
+
seen.set(k, resultLength);
|
|
5107
|
+
result[resultLength++] = item;
|
|
5108
|
+
}
|
|
5109
|
+
}
|
|
5110
|
+
return result.slice(0, resultLength);
|
|
4677
5111
|
}
|
|
4678
5112
|
function splitForLocales(path, locales) {
|
|
4679
5113
|
const prefix = withLeadingSlash(path).split("/")[1];
|
|
@@ -4731,6 +5165,9 @@ function createFilter(options = {}) {
|
|
|
4731
5165
|
};
|
|
4732
5166
|
}
|
|
4733
5167
|
|
|
5168
|
+
function xmlEscape(str) {
|
|
5169
|
+
return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
5170
|
+
}
|
|
4734
5171
|
function useSitemapRuntimeConfig(e) {
|
|
4735
5172
|
const clone = JSON.parse(JSON.stringify(useRuntimeConfig(e).sitemap));
|
|
4736
5173
|
for (const k in clone.sitemaps) {
|
|
@@ -4742,111 +5179,432 @@ function useSitemapRuntimeConfig(e) {
|
|
|
4742
5179
|
return Object.freeze(clone);
|
|
4743
5180
|
}
|
|
4744
5181
|
|
|
4745
|
-
function
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
const
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
5182
|
+
function isValidString(value) {
|
|
5183
|
+
return typeof value === "string" && value.trim().length > 0;
|
|
5184
|
+
}
|
|
5185
|
+
function parseNumber(value) {
|
|
5186
|
+
if (typeof value === "number") return value;
|
|
5187
|
+
if (typeof value === "string" && value.trim()) {
|
|
5188
|
+
const num = Number.parseFloat(value.trim());
|
|
5189
|
+
return Number.isNaN(num) ? void 0 : num;
|
|
5190
|
+
}
|
|
5191
|
+
return void 0;
|
|
5192
|
+
}
|
|
5193
|
+
function parseInteger(value) {
|
|
5194
|
+
if (typeof value === "number") return Math.floor(value);
|
|
5195
|
+
if (typeof value === "string" && value.trim()) {
|
|
5196
|
+
const num = Number.parseInt(value.trim(), 10);
|
|
5197
|
+
return Number.isNaN(num) ? void 0 : num;
|
|
5198
|
+
}
|
|
5199
|
+
return void 0;
|
|
5200
|
+
}
|
|
5201
|
+
function extractUrlFromParsedElement(urlElement, warnings) {
|
|
5202
|
+
if (!isValidString(urlElement.loc)) {
|
|
5203
|
+
warnings.push({
|
|
5204
|
+
type: "validation",
|
|
5205
|
+
message: "URL entry missing required loc element",
|
|
5206
|
+
context: { url: String(urlElement.loc || "undefined") }
|
|
5207
|
+
});
|
|
5208
|
+
return null;
|
|
5209
|
+
}
|
|
5210
|
+
const urlObj = { loc: urlElement.loc };
|
|
5211
|
+
if (isValidString(urlElement.lastmod)) {
|
|
5212
|
+
urlObj.lastmod = urlElement.lastmod;
|
|
5213
|
+
}
|
|
5214
|
+
if (isValidString(urlElement.changefreq)) {
|
|
5215
|
+
const validFreqs = ["always", "hourly", "daily", "weekly", "monthly", "yearly", "never"];
|
|
5216
|
+
if (validFreqs.includes(urlElement.changefreq)) {
|
|
5217
|
+
urlObj.changefreq = urlElement.changefreq;
|
|
5218
|
+
} else {
|
|
5219
|
+
warnings.push({
|
|
5220
|
+
type: "validation",
|
|
5221
|
+
message: "Invalid changefreq value",
|
|
5222
|
+
context: { url: urlElement.loc, field: "changefreq", value: urlElement.changefreq }
|
|
5223
|
+
});
|
|
5224
|
+
}
|
|
5225
|
+
}
|
|
5226
|
+
const priority = parseNumber(urlElement.priority);
|
|
5227
|
+
if (priority !== void 0 && !Number.isNaN(priority)) {
|
|
5228
|
+
if (priority < 0 || priority > 1) {
|
|
5229
|
+
warnings.push({
|
|
5230
|
+
type: "validation",
|
|
5231
|
+
message: "Priority value should be between 0.0 and 1.0, clamping to valid range",
|
|
5232
|
+
context: { url: urlElement.loc, field: "priority", value: priority }
|
|
5233
|
+
});
|
|
5234
|
+
}
|
|
5235
|
+
urlObj.priority = Math.max(0, Math.min(1, priority));
|
|
5236
|
+
} else if (urlElement.priority !== void 0) {
|
|
5237
|
+
warnings.push({
|
|
5238
|
+
type: "validation",
|
|
5239
|
+
message: "Invalid priority value",
|
|
5240
|
+
context: { url: urlElement.loc, field: "priority", value: urlElement.priority }
|
|
5241
|
+
});
|
|
5242
|
+
}
|
|
5243
|
+
if (urlElement.image) {
|
|
5244
|
+
const images = Array.isArray(urlElement.image) ? urlElement.image : [urlElement.image];
|
|
5245
|
+
const validImages = images.map((img) => {
|
|
5246
|
+
if (isValidString(img.loc)) {
|
|
5247
|
+
return { loc: img.loc };
|
|
5248
|
+
} else {
|
|
5249
|
+
warnings.push({
|
|
5250
|
+
type: "validation",
|
|
5251
|
+
message: "Image missing required loc element",
|
|
5252
|
+
context: { url: urlElement.loc, field: "image.loc" }
|
|
5253
|
+
});
|
|
5254
|
+
return null;
|
|
5255
|
+
}
|
|
5256
|
+
}).filter((img) => img !== null);
|
|
5257
|
+
if (validImages.length > 0) {
|
|
5258
|
+
urlObj.images = validImages;
|
|
5259
|
+
}
|
|
5260
|
+
}
|
|
5261
|
+
if (urlElement.video) {
|
|
5262
|
+
const videos = Array.isArray(urlElement.video) ? urlElement.video : [urlElement.video];
|
|
5263
|
+
const validVideos = videos.map((video) => {
|
|
5264
|
+
const missingFields = [];
|
|
5265
|
+
if (!isValidString(video.title)) missingFields.push("title");
|
|
5266
|
+
if (!isValidString(video.thumbnail_loc)) missingFields.push("thumbnail_loc");
|
|
5267
|
+
if (!isValidString(video.description)) missingFields.push("description");
|
|
5268
|
+
if (!isValidString(video.content_loc)) missingFields.push("content_loc");
|
|
5269
|
+
if (missingFields.length > 0) {
|
|
5270
|
+
warnings.push({
|
|
5271
|
+
type: "validation",
|
|
5272
|
+
message: `Video missing required fields: ${missingFields.join(", ")}`,
|
|
5273
|
+
context: { url: urlElement.loc, field: "video" }
|
|
5274
|
+
});
|
|
5275
|
+
return null;
|
|
5276
|
+
}
|
|
5277
|
+
const videoObj = {
|
|
5278
|
+
title: video.title,
|
|
5279
|
+
thumbnail_loc: video.thumbnail_loc,
|
|
5280
|
+
description: video.description,
|
|
5281
|
+
content_loc: video.content_loc
|
|
5282
|
+
};
|
|
5283
|
+
if (isValidString(video.player_loc)) {
|
|
5284
|
+
videoObj.player_loc = video.player_loc;
|
|
5285
|
+
}
|
|
5286
|
+
const duration = parseInteger(video.duration);
|
|
5287
|
+
if (duration !== void 0) {
|
|
5288
|
+
videoObj.duration = duration;
|
|
5289
|
+
} else if (video.duration !== void 0) {
|
|
5290
|
+
warnings.push({
|
|
5291
|
+
type: "validation",
|
|
5292
|
+
message: "Invalid video duration value",
|
|
5293
|
+
context: { url: urlElement.loc, field: "video.duration", value: video.duration }
|
|
5294
|
+
});
|
|
5295
|
+
}
|
|
5296
|
+
if (isValidString(video.expiration_date)) {
|
|
5297
|
+
videoObj.expiration_date = video.expiration_date;
|
|
5298
|
+
}
|
|
5299
|
+
const rating = parseNumber(video.rating);
|
|
5300
|
+
if (rating !== void 0) {
|
|
5301
|
+
if (rating < 0 || rating > 5) {
|
|
5302
|
+
warnings.push({
|
|
5303
|
+
type: "validation",
|
|
5304
|
+
message: "Video rating should be between 0.0 and 5.0",
|
|
5305
|
+
context: { url: urlElement.loc, field: "video.rating", value: rating }
|
|
5306
|
+
});
|
|
5307
|
+
}
|
|
5308
|
+
videoObj.rating = rating;
|
|
5309
|
+
} else if (video.rating !== void 0) {
|
|
5310
|
+
warnings.push({
|
|
5311
|
+
type: "validation",
|
|
5312
|
+
message: "Invalid video rating value",
|
|
5313
|
+
context: { url: urlElement.loc, field: "video.rating", value: video.rating }
|
|
5314
|
+
});
|
|
5315
|
+
}
|
|
5316
|
+
const viewCount = parseInteger(video.view_count);
|
|
5317
|
+
if (viewCount !== void 0) {
|
|
5318
|
+
videoObj.view_count = viewCount;
|
|
5319
|
+
} else if (video.view_count !== void 0) {
|
|
5320
|
+
warnings.push({
|
|
5321
|
+
type: "validation",
|
|
5322
|
+
message: "Invalid video view_count value",
|
|
5323
|
+
context: { url: urlElement.loc, field: "video.view_count", value: video.view_count }
|
|
5324
|
+
});
|
|
5325
|
+
}
|
|
5326
|
+
if (isValidString(video.publication_date)) {
|
|
5327
|
+
videoObj.publication_date = video.publication_date;
|
|
5328
|
+
}
|
|
5329
|
+
if (isValidString(video.family_friendly)) {
|
|
5330
|
+
const validValues = ["yes", "no"];
|
|
5331
|
+
if (validValues.includes(video.family_friendly)) {
|
|
5332
|
+
videoObj.family_friendly = video.family_friendly;
|
|
5333
|
+
} else {
|
|
5334
|
+
warnings.push({
|
|
5335
|
+
type: "validation",
|
|
5336
|
+
message: 'Invalid video family_friendly value, should be "yes" or "no"',
|
|
5337
|
+
context: { url: urlElement.loc, field: "video.family_friendly", value: video.family_friendly }
|
|
5338
|
+
});
|
|
5339
|
+
}
|
|
5340
|
+
}
|
|
5341
|
+
if (isValidString(video.requires_subscription)) {
|
|
5342
|
+
const validValues = ["yes", "no"];
|
|
5343
|
+
if (validValues.includes(video.requires_subscription)) {
|
|
5344
|
+
videoObj.requires_subscription = video.requires_subscription;
|
|
5345
|
+
} else {
|
|
5346
|
+
warnings.push({
|
|
5347
|
+
type: "validation",
|
|
5348
|
+
message: 'Invalid video requires_subscription value, should be "yes" or "no"',
|
|
5349
|
+
context: { url: urlElement.loc, field: "video.requires_subscription", value: video.requires_subscription }
|
|
5350
|
+
});
|
|
5351
|
+
}
|
|
5352
|
+
}
|
|
5353
|
+
if (isValidString(video.live)) {
|
|
5354
|
+
const validValues = ["yes", "no"];
|
|
5355
|
+
if (validValues.includes(video.live)) {
|
|
5356
|
+
videoObj.live = video.live;
|
|
5357
|
+
} else {
|
|
5358
|
+
warnings.push({
|
|
5359
|
+
type: "validation",
|
|
5360
|
+
message: 'Invalid video live value, should be "yes" or "no"',
|
|
5361
|
+
context: { url: urlElement.loc, field: "video.live", value: video.live }
|
|
5362
|
+
});
|
|
5363
|
+
}
|
|
5364
|
+
}
|
|
5365
|
+
if (video.restriction && typeof video.restriction === "object") {
|
|
5366
|
+
const restriction = video.restriction;
|
|
5367
|
+
if (isValidString(restriction.relationship) && isValidString(restriction["#text"])) {
|
|
5368
|
+
const validRelationships = ["allow", "deny"];
|
|
5369
|
+
if (validRelationships.includes(restriction.relationship)) {
|
|
5370
|
+
videoObj.restriction = {
|
|
5371
|
+
relationship: restriction.relationship,
|
|
5372
|
+
restriction: restriction["#text"]
|
|
5373
|
+
};
|
|
5374
|
+
} else {
|
|
5375
|
+
warnings.push({
|
|
5376
|
+
type: "validation",
|
|
5377
|
+
message: 'Invalid video restriction relationship, should be "allow" or "deny"',
|
|
5378
|
+
context: { url: urlElement.loc, field: "video.restriction.relationship", value: restriction.relationship }
|
|
5379
|
+
});
|
|
5380
|
+
}
|
|
5381
|
+
}
|
|
5382
|
+
}
|
|
5383
|
+
if (video.platform && typeof video.platform === "object") {
|
|
5384
|
+
const platform = video.platform;
|
|
5385
|
+
if (isValidString(platform.relationship) && isValidString(platform["#text"])) {
|
|
5386
|
+
const validRelationships = ["allow", "deny"];
|
|
5387
|
+
if (validRelationships.includes(platform.relationship)) {
|
|
5388
|
+
videoObj.platform = {
|
|
5389
|
+
relationship: platform.relationship,
|
|
5390
|
+
platform: platform["#text"]
|
|
5391
|
+
};
|
|
5392
|
+
} else {
|
|
5393
|
+
warnings.push({
|
|
5394
|
+
type: "validation",
|
|
5395
|
+
message: 'Invalid video platform relationship, should be "allow" or "deny"',
|
|
5396
|
+
context: { url: urlElement.loc, field: "video.platform.relationship", value: platform.relationship }
|
|
5397
|
+
});
|
|
5398
|
+
}
|
|
5399
|
+
}
|
|
5400
|
+
}
|
|
5401
|
+
if (video.price) {
|
|
5402
|
+
const prices = Array.isArray(video.price) ? video.price : [video.price];
|
|
5403
|
+
const validPrices = prices.map((price) => {
|
|
5404
|
+
const priceValue = price["#text"];
|
|
5405
|
+
if (priceValue == null || typeof priceValue !== "string" && typeof priceValue !== "number") {
|
|
5406
|
+
warnings.push({
|
|
5407
|
+
type: "validation",
|
|
5408
|
+
message: "Video price missing value",
|
|
5409
|
+
context: { url: urlElement.loc, field: "video.price" }
|
|
5410
|
+
});
|
|
5411
|
+
return null;
|
|
5412
|
+
}
|
|
5413
|
+
const validTypes = ["rent", "purchase", "package", "subscription"];
|
|
5414
|
+
if (price.type && !validTypes.includes(price.type)) {
|
|
5415
|
+
warnings.push({
|
|
5416
|
+
type: "validation",
|
|
5417
|
+
message: `Invalid video price type "${price.type}", should be one of: ${validTypes.join(", ")}`,
|
|
5418
|
+
context: { url: urlElement.loc, field: "video.price.type", value: price.type }
|
|
5419
|
+
});
|
|
5420
|
+
}
|
|
5421
|
+
return {
|
|
5422
|
+
price: String(priceValue),
|
|
5423
|
+
currency: price.currency,
|
|
5424
|
+
type: price.type
|
|
5425
|
+
};
|
|
5426
|
+
}).filter((p) => p !== null);
|
|
5427
|
+
if (validPrices.length > 0) {
|
|
5428
|
+
videoObj.price = validPrices;
|
|
5429
|
+
}
|
|
5430
|
+
}
|
|
5431
|
+
if (video.uploader && typeof video.uploader === "object") {
|
|
5432
|
+
const uploader = video.uploader;
|
|
5433
|
+
if (isValidString(uploader.info) && isValidString(uploader["#text"])) {
|
|
5434
|
+
videoObj.uploader = {
|
|
5435
|
+
uploader: uploader["#text"],
|
|
5436
|
+
info: uploader.info
|
|
5437
|
+
};
|
|
5438
|
+
} else {
|
|
5439
|
+
warnings.push({
|
|
5440
|
+
type: "validation",
|
|
5441
|
+
message: "Video uploader missing required info or name",
|
|
5442
|
+
context: { url: urlElement.loc, field: "video.uploader" }
|
|
5443
|
+
});
|
|
5444
|
+
}
|
|
5445
|
+
}
|
|
5446
|
+
if (video.tag) {
|
|
5447
|
+
const tags = Array.isArray(video.tag) ? video.tag : [video.tag];
|
|
5448
|
+
const validTags = tags.filter(isValidString);
|
|
5449
|
+
if (validTags.length > 0) {
|
|
5450
|
+
videoObj.tag = validTags;
|
|
5451
|
+
}
|
|
5452
|
+
}
|
|
4801
5453
|
return videoObj;
|
|
4802
|
-
}).filter(
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
const
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
5454
|
+
}).filter((video) => video !== null);
|
|
5455
|
+
if (validVideos.length > 0) {
|
|
5456
|
+
urlObj.videos = validVideos;
|
|
5457
|
+
}
|
|
5458
|
+
}
|
|
5459
|
+
if (urlElement.link) {
|
|
5460
|
+
const links = Array.isArray(urlElement.link) ? urlElement.link : [urlElement.link];
|
|
5461
|
+
const alternatives = links.map((link) => {
|
|
5462
|
+
if (link.rel === "alternate" && isValidString(link.hreflang) && isValidString(link.href)) {
|
|
5463
|
+
return {
|
|
5464
|
+
hreflang: link.hreflang,
|
|
5465
|
+
href: link.href
|
|
5466
|
+
};
|
|
5467
|
+
} else {
|
|
5468
|
+
warnings.push({
|
|
5469
|
+
type: "validation",
|
|
5470
|
+
message: 'Alternative link missing required rel="alternate", hreflang, or href',
|
|
5471
|
+
context: { url: urlElement.loc, field: "link" }
|
|
5472
|
+
});
|
|
5473
|
+
return null;
|
|
5474
|
+
}
|
|
5475
|
+
}).filter((alt) => alt !== null);
|
|
5476
|
+
if (alternatives.length > 0) {
|
|
5477
|
+
urlObj.alternatives = alternatives;
|
|
5478
|
+
}
|
|
5479
|
+
}
|
|
5480
|
+
if (urlElement.news && typeof urlElement.news === "object") {
|
|
5481
|
+
const news = urlElement.news;
|
|
5482
|
+
if (isValidString(news.title) && isValidString(news.publication_date) && news.publication && isValidString(news.publication.name) && isValidString(news.publication.language)) {
|
|
5483
|
+
urlObj.news = {
|
|
5484
|
+
title: news.title,
|
|
5485
|
+
publication_date: news.publication_date,
|
|
5486
|
+
publication: {
|
|
5487
|
+
name: news.publication.name,
|
|
5488
|
+
language: news.publication.language
|
|
5489
|
+
}
|
|
5490
|
+
};
|
|
5491
|
+
} else {
|
|
5492
|
+
warnings.push({
|
|
5493
|
+
type: "validation",
|
|
5494
|
+
message: "News entry missing required fields (title, publication_date, publication.name, publication.language)",
|
|
5495
|
+
context: { url: urlElement.loc, field: "news" }
|
|
5496
|
+
});
|
|
5497
|
+
}
|
|
5498
|
+
}
|
|
5499
|
+
const filteredUrlObj = Object.fromEntries(
|
|
5500
|
+
Object.entries(urlObj).filter(
|
|
5501
|
+
([_, value]) => value != null && (!Array.isArray(value) || value.length > 0)
|
|
5502
|
+
)
|
|
5503
|
+
);
|
|
5504
|
+
return filteredUrlObj;
|
|
5505
|
+
}
|
|
5506
|
+
async function parseSitemapXml(xml) {
|
|
5507
|
+
const warnings = [];
|
|
5508
|
+
if (!xml) {
|
|
5509
|
+
throw new Error("Empty XML input provided");
|
|
5510
|
+
}
|
|
5511
|
+
const { XMLParser } = await import('file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/fast-xml-parser@5.2.5/node_modules/fast-xml-parser/src/fxp.js');
|
|
5512
|
+
const parser = new XMLParser({
|
|
5513
|
+
isArray: (tagName) => ["url", "image", "video", "link", "tag", "price"].includes(tagName),
|
|
5514
|
+
removeNSPrefix: true,
|
|
5515
|
+
parseAttributeValue: false,
|
|
5516
|
+
ignoreAttributes: false,
|
|
5517
|
+
attributeNamePrefix: "",
|
|
5518
|
+
trimValues: true
|
|
5519
|
+
});
|
|
5520
|
+
try {
|
|
5521
|
+
const parsed = parser.parse(xml);
|
|
5522
|
+
if (!parsed?.urlset) {
|
|
5523
|
+
throw new Error("XML does not contain a valid urlset element");
|
|
5524
|
+
}
|
|
5525
|
+
if (!parsed.urlset.url) {
|
|
5526
|
+
throw new Error("Sitemap contains no URL entries");
|
|
5527
|
+
}
|
|
5528
|
+
const urls = Array.isArray(parsed.urlset.url) ? parsed.urlset.url : [parsed.urlset.url];
|
|
5529
|
+
const validUrls = urls.map((url) => extractUrlFromParsedElement(url, warnings)).filter((url) => url !== null);
|
|
5530
|
+
if (validUrls.length === 0 && urls.length > 0) {
|
|
5531
|
+
warnings.push({
|
|
5532
|
+
type: "validation",
|
|
5533
|
+
message: "No valid URLs found in sitemap after validation"
|
|
5534
|
+
});
|
|
5535
|
+
}
|
|
5536
|
+
return { urls: validUrls, warnings };
|
|
5537
|
+
} catch (error) {
|
|
5538
|
+
if (error instanceof Error && (error.message === "Empty XML input provided" || error.message === "XML does not contain a valid urlset element" || error.message === "Sitemap contains no URL entries")) {
|
|
5539
|
+
throw error;
|
|
5540
|
+
}
|
|
5541
|
+
throw new Error(`Failed to parse XML: ${error instanceof Error ? error.message : String(error)}`);
|
|
5542
|
+
}
|
|
4819
5543
|
}
|
|
4820
5544
|
|
|
5545
|
+
async function tryFetchWithFallback(url, options, event) {
|
|
5546
|
+
const isExternalUrl = !url.startsWith("/");
|
|
5547
|
+
if (isExternalUrl) {
|
|
5548
|
+
const strategies = [
|
|
5549
|
+
// Strategy 1: Use globalThis.$fetch (original approach)
|
|
5550
|
+
() => globalThis.$fetch(url, options),
|
|
5551
|
+
// Strategy 2: If event is available, try using event context even for external URLs
|
|
5552
|
+
event ? () => event.$fetch(url, options) : null,
|
|
5553
|
+
// Strategy 3: Use native fetch as last resort
|
|
5554
|
+
() => $fetch(url, options)
|
|
5555
|
+
].filter(Boolean);
|
|
5556
|
+
let lastError = null;
|
|
5557
|
+
for (const strategy of strategies) {
|
|
5558
|
+
try {
|
|
5559
|
+
return await strategy();
|
|
5560
|
+
} catch (error) {
|
|
5561
|
+
lastError = error;
|
|
5562
|
+
continue;
|
|
5563
|
+
}
|
|
5564
|
+
}
|
|
5565
|
+
throw lastError;
|
|
5566
|
+
}
|
|
5567
|
+
const fetchContainer = url.startsWith("/") && event ? event : globalThis;
|
|
5568
|
+
return await fetchContainer.$fetch(url, options);
|
|
5569
|
+
}
|
|
4821
5570
|
async function fetchDataSource(input, event) {
|
|
4822
5571
|
const context = typeof input.context === "string" ? { name: input.context } : input.context || { name: "fetch" };
|
|
4823
|
-
context.tips = context.tips || [];
|
|
4824
5572
|
const url = typeof input.fetch === "string" ? input.fetch : input.fetch[0];
|
|
4825
5573
|
const options = typeof input.fetch === "string" ? {} : input.fetch[1];
|
|
4826
5574
|
const start = Date.now();
|
|
4827
|
-
const
|
|
5575
|
+
const isExternalUrl = !url.startsWith("/");
|
|
5576
|
+
const timeout = isExternalUrl ? 1e4 : options.timeout || 5e3;
|
|
4828
5577
|
const timeoutController = new AbortController();
|
|
4829
5578
|
const abortRequestTimeout = setTimeout(() => timeoutController.abort(), timeout);
|
|
4830
|
-
let isMaybeErrorResponse = false;
|
|
4831
|
-
const isXmlRequest = parseURL(url).pathname.endsWith(".xml");
|
|
4832
|
-
const fetchContainer = url.startsWith("/") && event ? event : globalThis;
|
|
4833
5579
|
try {
|
|
4834
|
-
|
|
5580
|
+
let isMaybeErrorResponse = false;
|
|
5581
|
+
const isXmlRequest = parseURL(url).pathname.endsWith(".xml");
|
|
5582
|
+
const mergedHeaders = defu$1(
|
|
5583
|
+
options?.headers,
|
|
5584
|
+
{
|
|
5585
|
+
Accept: isXmlRequest ? "text/xml" : "application/json"
|
|
5586
|
+
},
|
|
5587
|
+
event ? { host: getRequestHost(event, { xForwardedHost: true }) } : {}
|
|
5588
|
+
);
|
|
5589
|
+
const fetchOptions = {
|
|
4835
5590
|
...options,
|
|
4836
5591
|
responseType: isXmlRequest ? "text" : "json",
|
|
4837
5592
|
signal: timeoutController.signal,
|
|
4838
|
-
headers:
|
|
4839
|
-
|
|
4840
|
-
|
|
5593
|
+
headers: mergedHeaders,
|
|
5594
|
+
// Use ofetch's built-in retry for external sources
|
|
5595
|
+
...isExternalUrl && {
|
|
5596
|
+
retry: 2,
|
|
5597
|
+
retryDelay: 200
|
|
5598
|
+
},
|
|
4841
5599
|
// @ts-expect-error untyped
|
|
4842
5600
|
onResponse({ response }) {
|
|
4843
5601
|
if (typeof response._data === "string" && response._data.startsWith("<!DOCTYPE html>"))
|
|
4844
5602
|
isMaybeErrorResponse = true;
|
|
4845
5603
|
}
|
|
4846
|
-
}
|
|
5604
|
+
};
|
|
5605
|
+
const res = await tryFetchWithFallback(url, fetchOptions, event);
|
|
4847
5606
|
const timeTakenMs = Date.now() - start;
|
|
4848
5607
|
if (isMaybeErrorResponse) {
|
|
4849
|
-
context.tips.push("This is usually because the URL isn't correct or is throwing an error. Please check the URL");
|
|
4850
5608
|
return {
|
|
4851
5609
|
...input,
|
|
4852
5610
|
context,
|
|
@@ -4859,7 +5617,8 @@ async function fetchDataSource(input, event) {
|
|
|
4859
5617
|
if (typeof res === "object") {
|
|
4860
5618
|
urls = res.urls || res;
|
|
4861
5619
|
} else if (typeof res === "string" && parseURL(url).pathname.endsWith(".xml")) {
|
|
4862
|
-
|
|
5620
|
+
const result = await parseSitemapXml(res);
|
|
5621
|
+
urls = result.urls;
|
|
4863
5622
|
}
|
|
4864
5623
|
return {
|
|
4865
5624
|
...input,
|
|
@@ -4869,16 +5628,26 @@ async function fetchDataSource(input, event) {
|
|
|
4869
5628
|
};
|
|
4870
5629
|
} catch (_err) {
|
|
4871
5630
|
const error = _err;
|
|
4872
|
-
if (
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
5631
|
+
if (isExternalUrl) {
|
|
5632
|
+
const errorInfo = {
|
|
5633
|
+
url,
|
|
5634
|
+
timeout,
|
|
5635
|
+
error: error.message,
|
|
5636
|
+
statusCode: error.response?.status,
|
|
5637
|
+
statusText: error.response?.statusText,
|
|
5638
|
+
method: options?.method || "GET"
|
|
5639
|
+
};
|
|
5640
|
+
logger.error("Failed to fetch external source.", errorInfo);
|
|
5641
|
+
} else {
|
|
5642
|
+
logger.error("Failed to fetch source.", { url, error: error.message });
|
|
5643
|
+
}
|
|
4877
5644
|
return {
|
|
4878
5645
|
...input,
|
|
4879
5646
|
context,
|
|
4880
5647
|
urls: [],
|
|
4881
|
-
error: error.message
|
|
5648
|
+
error: error.message,
|
|
5649
|
+
_isFailure: true
|
|
5650
|
+
// Mark as failure to prevent caching
|
|
4882
5651
|
};
|
|
4883
5652
|
} finally {
|
|
4884
5653
|
if (abortRequestTimeout) {
|
|
@@ -4912,7 +5681,7 @@ async function resolveSitemapSources(sources, event) {
|
|
|
4912
5681
|
)).flat();
|
|
4913
5682
|
}
|
|
4914
5683
|
|
|
4915
|
-
const
|
|
5684
|
+
const _xIZ_0x = defineEventHandler(async (e) => {
|
|
4916
5685
|
const _runtimeConfig = useSitemapRuntimeConfig();
|
|
4917
5686
|
const { sitemaps: _sitemaps } = _runtimeConfig;
|
|
4918
5687
|
const runtimeConfig = { ..._runtimeConfig };
|
|
@@ -4923,18 +5692,18 @@ const _CJfHt9 = defineEventHandler(async (e) => {
|
|
|
4923
5692
|
for (const s of Object.keys(_sitemaps)) {
|
|
4924
5693
|
sitemaps[s] = {
|
|
4925
5694
|
..._sitemaps[s],
|
|
4926
|
-
sources: await resolveSitemapSources(await childSitemapSources(_sitemaps[s]))
|
|
5695
|
+
sources: await resolveSitemapSources(await childSitemapSources(_sitemaps[s]), e)
|
|
4927
5696
|
};
|
|
4928
5697
|
}
|
|
4929
5698
|
return {
|
|
4930
5699
|
nitroOrigin,
|
|
4931
5700
|
sitemaps,
|
|
4932
5701
|
runtimeConfig,
|
|
4933
|
-
globalSources: await resolveSitemapSources(globalSources)
|
|
5702
|
+
globalSources: await resolveSitemapSources(globalSources, e)
|
|
4934
5703
|
};
|
|
4935
5704
|
});
|
|
4936
5705
|
|
|
4937
|
-
const
|
|
5706
|
+
const _4BAWff = defineEventHandler(async (e) => {
|
|
4938
5707
|
const fixPath = createSitePathResolver(e, { absolute: false, withBase: true });
|
|
4939
5708
|
const { sitemapName: fallbackSitemapName, cacheMaxAgeSeconds, version, xslColumns, xslTips } = useSitemapRuntimeConfig();
|
|
4940
5709
|
setHeader(e, "Content-Type", "application/xslt+xml");
|
|
@@ -4954,17 +5723,37 @@ const _be_eqJ = defineEventHandler(async (e) => {
|
|
|
4954
5723
|
const isShowingCanonical = typeof canonicalQuery !== "undefined" && canonicalQuery !== "false";
|
|
4955
5724
|
const conditionalTips = [
|
|
4956
5725
|
'You are looking at a <a href="https://developer.mozilla.org/en-US/docs/Web/XSLT/Transforming_XML_with_XSLT/An_Overview" style="color: #398465" target="_blank">XML stylesheet</a>. Read the <a href="https://nuxtseo.com/sitemap/guides/customising-ui" style="color: #398465" target="_blank">docs</a> to learn how to customize it. View the page source to see the raw XML.',
|
|
4957
|
-
`URLs missing? Check Nuxt Devtools Sitemap tab (or the <a href="${withQuery("/__sitemap__/debug.json", { sitemap: sitemapName })}" style="color: #398465" target="_blank">debug endpoint</a>).`
|
|
5726
|
+
`URLs missing? Check Nuxt Devtools Sitemap tab (or the <a href="${xmlEscape(withQuery("/__sitemap__/debug.json", { sitemap: sitemapName }))}" style="color: #398465" target="_blank">debug endpoint</a>).`
|
|
4958
5727
|
];
|
|
5728
|
+
const fetchErrors = [];
|
|
5729
|
+
const xslQuery = getQuery$1(e);
|
|
5730
|
+
if (xslQuery.error_messages) {
|
|
5731
|
+
const errorMessages = xslQuery.error_messages;
|
|
5732
|
+
const errorUrls = xslQuery.error_urls;
|
|
5733
|
+
if (errorMessages) {
|
|
5734
|
+
const messages = Array.isArray(errorMessages) ? errorMessages : [errorMessages];
|
|
5735
|
+
const urls = Array.isArray(errorUrls) ? errorUrls : errorUrls ? [errorUrls] : [];
|
|
5736
|
+
messages.forEach((msg, i) => {
|
|
5737
|
+
const errorParts = [xmlEscape(msg)];
|
|
5738
|
+
if (urls[i]) {
|
|
5739
|
+
errorParts.push(xmlEscape(urls[i]));
|
|
5740
|
+
}
|
|
5741
|
+
fetchErrors.push(`<strong style="color: #dc2626;">Error ${i + 1}:</strong> ${errorParts.join(" - ")}`);
|
|
5742
|
+
});
|
|
5743
|
+
}
|
|
5744
|
+
}
|
|
4959
5745
|
if (!isShowingCanonical) {
|
|
4960
5746
|
const canonicalPreviewUrl = withQuery(referrer, { canonical: "" });
|
|
4961
|
-
conditionalTips.push(`Your canonical site URL is <strong>${siteUrl}</strong>.`);
|
|
4962
|
-
conditionalTips.push(`You can preview your canonical sitemap by visiting <a href="${canonicalPreviewUrl}" style="color: #398465; white-space: nowrap;">${fixPath(canonicalPreviewUrl)}?canonical</a>`);
|
|
5747
|
+
conditionalTips.push(`Your canonical site URL is <strong>${xmlEscape(siteUrl)}</strong>.`);
|
|
5748
|
+
conditionalTips.push(`You can preview your canonical sitemap by visiting <a href="${xmlEscape(canonicalPreviewUrl)}" style="color: #398465; white-space: nowrap;">${xmlEscape(fixPath(canonicalPreviewUrl))}?canonical</a>`);
|
|
4963
5749
|
} else {
|
|
4964
|
-
conditionalTips.push(`You are viewing the canonical sitemap. You can switch to using the request origin: <a href="${fixPath(referrer)}" style="color: #398465; white-space: nowrap ">${fixPath(referrer)}</a>`);
|
|
5750
|
+
conditionalTips.push(`You are viewing the canonical sitemap. You can switch to using the request origin: <a href="${xmlEscape(fixPath(referrer))}" style="color: #398465; white-space: nowrap ">${xmlEscape(fixPath(referrer))}</a>`);
|
|
4965
5751
|
}
|
|
4966
|
-
const
|
|
4967
|
-
const
|
|
5752
|
+
const hasRuntimeErrors = fetchErrors.length > 0;
|
|
5753
|
+
const showDevTips = xslTips !== false;
|
|
5754
|
+
const showSidebar = showDevTips || hasRuntimeErrors;
|
|
5755
|
+
const devTips = showDevTips ? conditionalTips.map((t) => `<li><p>${t}</p></li>`).join("\n") : "";
|
|
5756
|
+
const runtimeErrors = hasRuntimeErrors ? fetchErrors.map((t) => `<li><p>${t}</p></li>`).join("\n") : "";
|
|
4968
5757
|
let columns = [...xslColumns];
|
|
4969
5758
|
if (!columns.length) {
|
|
4970
5759
|
columns = [
|
|
@@ -5028,12 +5817,12 @@ const _be_eqJ = defineEventHandler(async (e) => {
|
|
|
5028
5817
|
}
|
|
5029
5818
|
|
|
5030
5819
|
.expl a {
|
|
5031
|
-
color: #398465
|
|
5820
|
+
color: #398465;
|
|
5032
5821
|
font-weight: 600;
|
|
5033
5822
|
}
|
|
5034
5823
|
|
|
5035
5824
|
.expl a:visited {
|
|
5036
|
-
color: #398465
|
|
5825
|
+
color: #398465;
|
|
5037
5826
|
}
|
|
5038
5827
|
|
|
5039
5828
|
a {
|
|
@@ -5084,8 +5873,8 @@ const _be_eqJ = defineEventHandler(async (e) => {
|
|
|
5084
5873
|
<div>
|
|
5085
5874
|
<div id="content">
|
|
5086
5875
|
<h1 class="text-2xl mb-3">XML Sitemap</h1>
|
|
5087
|
-
<h2>${title}</h2>
|
|
5088
|
-
${isNotIndexButHasIndex ? `<p style="font-size: 12px; margin-bottom: 1rem;"><a href="${fixPath("/sitemap_index.xml")}">${fixPath("/sitemap_index.xml")}</a></p>` : ""}
|
|
5876
|
+
<h2>${xmlEscape(title)}</h2>
|
|
5877
|
+
${isNotIndexButHasIndex ? `<p style="font-size: 12px; margin-bottom: 1rem;"><a href="${xmlEscape(fixPath("/sitemap_index.xml"))}">${xmlEscape(fixPath("/sitemap_index.xml"))}</a></p>` : ""}
|
|
5089
5878
|
<xsl:if test="count(sitemap:sitemapindex/sitemap:sitemap) > 0">
|
|
5090
5879
|
<p class="expl" style="margin-bottom: 1rem;">
|
|
5091
5880
|
This XML Sitemap Index file contains
|
|
@@ -5152,7 +5941,11 @@ const _be_eqJ = defineEventHandler(async (e) => {
|
|
|
5152
5941
|
</xsl:if>
|
|
5153
5942
|
</div>
|
|
5154
5943
|
</div>
|
|
5155
|
-
${
|
|
5944
|
+
${showSidebar ? `<div class="w-30 top-2 shadow rounded p-5 right-2" style="margin: 0 auto;">
|
|
5945
|
+
${showDevTips ? `<div><p><strong>Development Tips</strong></p><ul style="margin: 1rem 0; padding: 0;">${devTips}</ul></div>` : ""}
|
|
5946
|
+
${hasRuntimeErrors ? `<div${showDevTips ? ' style="margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #e5e7eb;"' : ""}><p><strong style="color: #dc2626;">Runtime Errors</strong></p><ul style="margin: 1rem 0; padding: 0;">${runtimeErrors}</ul></div>` : ""}
|
|
5947
|
+
${showDevTips ? `<p style="margin-top: 1rem;">${creditName}</p>` : ""}
|
|
5948
|
+
</div>` : ""}
|
|
5156
5949
|
</div>
|
|
5157
5950
|
</body>
|
|
5158
5951
|
</html>
|
|
@@ -5248,29 +6041,32 @@ function normaliseEntry(_e, defaults, resolvers) {
|
|
|
5248
6041
|
delete e.lastmod;
|
|
5249
6042
|
e.loc = resolve(e.loc, resolvers);
|
|
5250
6043
|
if (e.alternatives) {
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
6044
|
+
const alternatives = e.alternatives.map((a) => ({ ...a }));
|
|
6045
|
+
for (let i = 0; i < alternatives.length; i++) {
|
|
6046
|
+
const alt = alternatives[i];
|
|
6047
|
+
if (typeof alt.href === "string") {
|
|
6048
|
+
alt.href = resolve(alt.href, resolvers);
|
|
6049
|
+
} else if (typeof alt.href === "object" && alt.href) {
|
|
6050
|
+
alt.href = resolve(alt.href.href, resolvers);
|
|
6051
|
+
}
|
|
6052
|
+
}
|
|
6053
|
+
e.alternatives = mergeOnKey$1(alternatives, "hreflang");
|
|
5259
6054
|
}
|
|
5260
6055
|
if (e.images) {
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
i.loc = resolve(i.loc, resolvers);
|
|
5264
|
-
|
|
5265
|
-
|
|
6056
|
+
const images = e.images.map((i) => ({ ...i }));
|
|
6057
|
+
for (let i = 0; i < images.length; i++) {
|
|
6058
|
+
images[i].loc = resolve(images[i].loc, resolvers);
|
|
6059
|
+
}
|
|
6060
|
+
e.images = mergeOnKey$1(images, "loc");
|
|
5266
6061
|
}
|
|
5267
6062
|
if (e.videos) {
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
if (
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
}
|
|
6063
|
+
const videos = e.videos.map((v) => ({ ...v }));
|
|
6064
|
+
for (let i = 0; i < videos.length; i++) {
|
|
6065
|
+
if (videos[i].content_loc) {
|
|
6066
|
+
videos[i].content_loc = resolve(videos[i].content_loc, resolvers);
|
|
6067
|
+
}
|
|
6068
|
+
}
|
|
6069
|
+
e.videos = mergeOnKey$1(videos, "content_loc");
|
|
5274
6070
|
}
|
|
5275
6071
|
return e;
|
|
5276
6072
|
}
|
|
@@ -5306,111 +6102,257 @@ function normaliseDate(d) {
|
|
|
5306
6102
|
return date;
|
|
5307
6103
|
}
|
|
5308
6104
|
|
|
5309
|
-
function
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
const bLoc = typeof b === "string" ? b : b.loc;
|
|
5314
|
-
return aLoc.localeCompare(bLoc, void 0, { numeric: true });
|
|
5315
|
-
}
|
|
5316
|
-
).sort((a, b) => {
|
|
5317
|
-
const aLoc = (typeof a === "string" ? a : a.loc) || "";
|
|
5318
|
-
const bLoc = (typeof b === "string" ? b : b.loc) || "";
|
|
6105
|
+
function sortInPlace(urls) {
|
|
6106
|
+
urls.sort((a, b) => {
|
|
6107
|
+
const aLoc = typeof a === "string" ? a : a.loc;
|
|
6108
|
+
const bLoc = typeof b === "string" ? b : b.loc;
|
|
5319
6109
|
const aSegments = aLoc.split("/").length;
|
|
5320
6110
|
const bSegments = bLoc.split("/").length;
|
|
5321
|
-
if (aSegments
|
|
5322
|
-
return
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
return 0;
|
|
6111
|
+
if (aSegments !== bSegments) {
|
|
6112
|
+
return aSegments - bSegments;
|
|
6113
|
+
}
|
|
6114
|
+
return aLoc.localeCompare(bLoc, void 0, { numeric: true });
|
|
5326
6115
|
});
|
|
6116
|
+
return urls;
|
|
5327
6117
|
}
|
|
5328
6118
|
|
|
5329
|
-
function
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
return "news";
|
|
5338
|
-
default:
|
|
5339
|
-
return k;
|
|
6119
|
+
function parseChunkInfo(sitemapName, sitemaps, defaultChunkSize = 1e3) {
|
|
6120
|
+
if (typeof sitemaps.chunks !== "undefined" && !Number.isNaN(Number(sitemapName))) {
|
|
6121
|
+
return {
|
|
6122
|
+
isChunked: true,
|
|
6123
|
+
baseSitemapName: "sitemap",
|
|
6124
|
+
chunkIndex: Number(sitemapName),
|
|
6125
|
+
chunkSize: defaultChunkSize
|
|
6126
|
+
};
|
|
5340
6127
|
}
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
}
|
|
5356
|
-
const attributes = Object.entries(v).filter(([ssk]) => ssk !== sk).map(([ssk, ssv]) => `${ssk}="${escapeValueForXml(ssv)}"`).join(" ");
|
|
5357
|
-
return [
|
|
5358
|
-
` <${key}:${sk} ${attributes}>`,
|
|
5359
|
-
// value is the same sk
|
|
5360
|
-
v[sk],
|
|
5361
|
-
`</${key}:${sk}>`
|
|
5362
|
-
].join("");
|
|
5363
|
-
}).join("\n");
|
|
5364
|
-
}
|
|
5365
|
-
if (typeof sv === "object") {
|
|
5366
|
-
if (key === "video") {
|
|
5367
|
-
const attributes = Object.entries(sv).filter(([ssk]) => ssk !== sk).map(([ssk, ssv]) => `${ssk}="${escapeValueForXml(ssv)}"`).join(" ");
|
|
5368
|
-
return [
|
|
5369
|
-
` <${key}:${sk} ${attributes}>`,
|
|
5370
|
-
// value is the same sk
|
|
5371
|
-
sv[sk],
|
|
5372
|
-
`</${key}:${sk}>`
|
|
5373
|
-
].join("");
|
|
5374
|
-
}
|
|
5375
|
-
return [
|
|
5376
|
-
` <${key}:${sk}>`,
|
|
5377
|
-
...Object.entries(sv).map(([ssk, ssv]) => ` <${key}:${ssk}>${escapeValueForXml(ssv)}</${key}:${ssk}>`),
|
|
5378
|
-
` </${key}:${sk}>`
|
|
5379
|
-
].join("\n");
|
|
6128
|
+
if (sitemapName.includes("-")) {
|
|
6129
|
+
const parts = sitemapName.split("-");
|
|
6130
|
+
const lastPart = parts.pop();
|
|
6131
|
+
if (!Number.isNaN(Number(lastPart))) {
|
|
6132
|
+
const baseSitemapName = parts.join("-");
|
|
6133
|
+
const baseSitemap = sitemaps[baseSitemapName];
|
|
6134
|
+
if (baseSitemap && (baseSitemap.chunks || baseSitemap._isChunking)) {
|
|
6135
|
+
const chunkSize = typeof baseSitemap.chunks === "number" ? baseSitemap.chunks : baseSitemap.chunkSize || defaultChunkSize;
|
|
6136
|
+
return {
|
|
6137
|
+
isChunked: true,
|
|
6138
|
+
baseSitemapName,
|
|
6139
|
+
chunkIndex: Number(lastPart),
|
|
6140
|
+
chunkSize
|
|
6141
|
+
};
|
|
5380
6142
|
}
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
6143
|
+
}
|
|
6144
|
+
}
|
|
6145
|
+
return {
|
|
6146
|
+
isChunked: false,
|
|
6147
|
+
baseSitemapName: sitemapName,
|
|
6148
|
+
chunkIndex: void 0,
|
|
6149
|
+
chunkSize: defaultChunkSize
|
|
6150
|
+
};
|
|
5385
6151
|
}
|
|
5386
|
-
function
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
return
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
}
|
|
5395
|
-
return arr.map((obj) => handleObject(key, obj)).join("\n");
|
|
5396
|
-
}
|
|
5397
|
-
function handleEntry(k, e) {
|
|
5398
|
-
return Array.isArray(e[k]) ? handleArray(k, e[k]) : typeof e[k] === "object" ? handleObject(k, e[k]) : ` <${k}>${escapeValueForXml(e[k])}</${k}>`;
|
|
5399
|
-
}
|
|
5400
|
-
function wrapSitemapXml(input, resolvers, options) {
|
|
5401
|
-
const xsl = options.xsl ? resolvers.relativeBaseUrlResolver(options.xsl) : false;
|
|
5402
|
-
const credits = options.credits;
|
|
5403
|
-
input.unshift(`<?xml version="1.0" encoding="UTF-8"?>${xsl ? `<?xml-stylesheet type="text/xsl" href="${xsl}"?>` : ""}`);
|
|
5404
|
-
if (credits)
|
|
5405
|
-
input.push(`<!-- XML Sitemap generated by @nuxtjs/sitemap v${options.version} at ${(/* @__PURE__ */ new Date()).toISOString()} -->`);
|
|
5406
|
-
if (options.minify)
|
|
5407
|
-
return input.join("").replace(/(?<!<[^>]*)\s(?![^<]*>)/g, "");
|
|
5408
|
-
return input.join("\n");
|
|
6152
|
+
function sliceUrlsForChunk(urls, sitemapName, sitemaps, defaultChunkSize = 1e3) {
|
|
6153
|
+
const chunkInfo = parseChunkInfo(sitemapName, sitemaps, defaultChunkSize);
|
|
6154
|
+
if (chunkInfo.isChunked && chunkInfo.chunkIndex !== void 0) {
|
|
6155
|
+
const startIndex = chunkInfo.chunkIndex * chunkInfo.chunkSize;
|
|
6156
|
+
const endIndex = (chunkInfo.chunkIndex + 1) * chunkInfo.chunkSize;
|
|
6157
|
+
return urls.slice(startIndex, endIndex);
|
|
6158
|
+
}
|
|
6159
|
+
return urls;
|
|
5409
6160
|
}
|
|
6161
|
+
|
|
5410
6162
|
function escapeValueForXml(value) {
|
|
5411
6163
|
if (value === true || value === false)
|
|
5412
6164
|
return value ? "yes" : "no";
|
|
5413
|
-
return String(value)
|
|
6165
|
+
return xmlEscape(String(value));
|
|
6166
|
+
}
|
|
6167
|
+
const URLSET_OPENING_TAG = '<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd http://www.google.com/schemas/sitemap-image/1.1 http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
|
|
6168
|
+
function buildUrlXml(url) {
|
|
6169
|
+
const capacity = 50;
|
|
6170
|
+
const parts = Array.from({ length: capacity });
|
|
6171
|
+
let partIndex = 0;
|
|
6172
|
+
parts[partIndex++] = " <url>";
|
|
6173
|
+
if (url.loc) {
|
|
6174
|
+
parts[partIndex++] = ` <loc>${escapeValueForXml(url.loc)}</loc>`;
|
|
6175
|
+
}
|
|
6176
|
+
if (url.lastmod) {
|
|
6177
|
+
parts[partIndex++] = ` <lastmod>${url.lastmod}</lastmod>`;
|
|
6178
|
+
}
|
|
6179
|
+
if (url.changefreq) {
|
|
6180
|
+
parts[partIndex++] = ` <changefreq>${url.changefreq}</changefreq>`;
|
|
6181
|
+
}
|
|
6182
|
+
if (url.priority !== void 0) {
|
|
6183
|
+
const priorityValue = Number.parseFloat(String(url.priority));
|
|
6184
|
+
const formattedPriority = priorityValue % 1 === 0 ? String(priorityValue) : priorityValue.toFixed(1);
|
|
6185
|
+
parts[partIndex++] = ` <priority>${formattedPriority}</priority>`;
|
|
6186
|
+
}
|
|
6187
|
+
const keys = Object.keys(url).filter((k) => !k.startsWith("_") && !["loc", "lastmod", "changefreq", "priority"].includes(k));
|
|
6188
|
+
for (const key of keys) {
|
|
6189
|
+
const value = url[key];
|
|
6190
|
+
if (value === void 0 || value === null) continue;
|
|
6191
|
+
switch (key) {
|
|
6192
|
+
case "alternatives":
|
|
6193
|
+
if (Array.isArray(value) && value.length > 0) {
|
|
6194
|
+
for (const alt of value) {
|
|
6195
|
+
const attrs = Object.entries(alt).map(([k, v]) => `${k}="${escapeValueForXml(v)}"`).join(" ");
|
|
6196
|
+
parts[partIndex++] = ` <xhtml:link rel="alternate" ${attrs} />`;
|
|
6197
|
+
}
|
|
6198
|
+
}
|
|
6199
|
+
break;
|
|
6200
|
+
case "images":
|
|
6201
|
+
if (Array.isArray(value) && value.length > 0) {
|
|
6202
|
+
for (const img of value) {
|
|
6203
|
+
parts[partIndex++] = " <image:image>";
|
|
6204
|
+
parts[partIndex++] = ` <image:loc>${escapeValueForXml(img.loc)}</image:loc>`;
|
|
6205
|
+
if (img.title) parts[partIndex++] = ` <image:title>${escapeValueForXml(img.title)}</image:title>`;
|
|
6206
|
+
if (img.caption) parts[partIndex++] = ` <image:caption>${escapeValueForXml(img.caption)}</image:caption>`;
|
|
6207
|
+
if (img.geo_location) parts[partIndex++] = ` <image:geo_location>${escapeValueForXml(img.geo_location)}</image:geo_location>`;
|
|
6208
|
+
if (img.license) parts[partIndex++] = ` <image:license>${escapeValueForXml(img.license)}</image:license>`;
|
|
6209
|
+
parts[partIndex++] = " </image:image>";
|
|
6210
|
+
}
|
|
6211
|
+
}
|
|
6212
|
+
break;
|
|
6213
|
+
case "videos":
|
|
6214
|
+
if (Array.isArray(value) && value.length > 0) {
|
|
6215
|
+
for (const video of value) {
|
|
6216
|
+
parts[partIndex++] = " <video:video>";
|
|
6217
|
+
parts[partIndex++] = ` <video:title>${escapeValueForXml(video.title)}</video:title>`;
|
|
6218
|
+
if (video.thumbnail_loc) {
|
|
6219
|
+
parts[partIndex++] = ` <video:thumbnail_loc>${escapeValueForXml(video.thumbnail_loc)}</video:thumbnail_loc>`;
|
|
6220
|
+
}
|
|
6221
|
+
parts[partIndex++] = ` <video:description>${escapeValueForXml(video.description)}</video:description>`;
|
|
6222
|
+
if (video.content_loc) {
|
|
6223
|
+
parts[partIndex++] = ` <video:content_loc>${escapeValueForXml(video.content_loc)}</video:content_loc>`;
|
|
6224
|
+
}
|
|
6225
|
+
if (video.player_loc) {
|
|
6226
|
+
const attrs = video.player_loc.allow_embed ? ' allow_embed="yes"' : "";
|
|
6227
|
+
const autoplay = video.player_loc.autoplay ? ' autoplay="yes"' : "";
|
|
6228
|
+
parts[partIndex++] = ` <video:player_loc${attrs}${autoplay}>${escapeValueForXml(video.player_loc)}</video:player_loc>`;
|
|
6229
|
+
}
|
|
6230
|
+
if (video.duration !== void 0) {
|
|
6231
|
+
parts[partIndex++] = ` <video:duration>${video.duration}</video:duration>`;
|
|
6232
|
+
}
|
|
6233
|
+
if (video.expiration_date) {
|
|
6234
|
+
parts[partIndex++] = ` <video:expiration_date>${video.expiration_date}</video:expiration_date>`;
|
|
6235
|
+
}
|
|
6236
|
+
if (video.rating !== void 0) {
|
|
6237
|
+
parts[partIndex++] = ` <video:rating>${video.rating}</video:rating>`;
|
|
6238
|
+
}
|
|
6239
|
+
if (video.view_count !== void 0) {
|
|
6240
|
+
parts[partIndex++] = ` <video:view_count>${video.view_count}</video:view_count>`;
|
|
6241
|
+
}
|
|
6242
|
+
if (video.publication_date) {
|
|
6243
|
+
parts[partIndex++] = ` <video:publication_date>${video.publication_date}</video:publication_date>`;
|
|
6244
|
+
}
|
|
6245
|
+
if (video.family_friendly !== void 0) {
|
|
6246
|
+
parts[partIndex++] = ` <video:family_friendly>${video.family_friendly === "yes" || video.family_friendly === true ? "yes" : "no"}</video:family_friendly>`;
|
|
6247
|
+
}
|
|
6248
|
+
if (video.restriction) {
|
|
6249
|
+
const relationship = video.restriction.relationship || "allow";
|
|
6250
|
+
parts[partIndex++] = ` <video:restriction relationship="${relationship}">${escapeValueForXml(video.restriction.restriction)}</video:restriction>`;
|
|
6251
|
+
}
|
|
6252
|
+
if (video.platform) {
|
|
6253
|
+
const relationship = video.platform.relationship || "allow";
|
|
6254
|
+
parts[partIndex++] = ` <video:platform relationship="${relationship}">${escapeValueForXml(video.platform.platform)}</video:platform>`;
|
|
6255
|
+
}
|
|
6256
|
+
if (video.requires_subscription !== void 0) {
|
|
6257
|
+
parts[partIndex++] = ` <video:requires_subscription>${video.requires_subscription === "yes" || video.requires_subscription === true ? "yes" : "no"}</video:requires_subscription>`;
|
|
6258
|
+
}
|
|
6259
|
+
if (video.price) {
|
|
6260
|
+
const prices = Array.isArray(video.price) ? video.price : [video.price];
|
|
6261
|
+
for (const price of prices) {
|
|
6262
|
+
const attrs = [];
|
|
6263
|
+
if (price.currency) attrs.push(`currency="${price.currency}"`);
|
|
6264
|
+
if (price.type) attrs.push(`type="${price.type}"`);
|
|
6265
|
+
const attrsStr = attrs.length > 0 ? " " + attrs.join(" ") : "";
|
|
6266
|
+
parts[partIndex++] = ` <video:price${attrsStr}>${escapeValueForXml(price.price)}</video:price>`;
|
|
6267
|
+
}
|
|
6268
|
+
}
|
|
6269
|
+
if (video.uploader) {
|
|
6270
|
+
const info = video.uploader.info ? ` info="${escapeValueForXml(video.uploader.info)}"` : "";
|
|
6271
|
+
parts[partIndex++] = ` <video:uploader${info}>${escapeValueForXml(video.uploader.uploader)}</video:uploader>`;
|
|
6272
|
+
}
|
|
6273
|
+
if (video.live !== void 0) {
|
|
6274
|
+
parts[partIndex++] = ` <video:live>${video.live === "yes" || video.live === true ? "yes" : "no"}</video:live>`;
|
|
6275
|
+
}
|
|
6276
|
+
if (video.tag) {
|
|
6277
|
+
const tags = Array.isArray(video.tag) ? video.tag : [video.tag];
|
|
6278
|
+
for (const tag of tags) {
|
|
6279
|
+
parts[partIndex++] = ` <video:tag>${escapeValueForXml(tag)}</video:tag>`;
|
|
6280
|
+
}
|
|
6281
|
+
}
|
|
6282
|
+
if (video.category) {
|
|
6283
|
+
parts[partIndex++] = ` <video:category>${escapeValueForXml(video.category)}</video:category>`;
|
|
6284
|
+
}
|
|
6285
|
+
if (video.gallery_loc) {
|
|
6286
|
+
const title = video.gallery_loc.title ? ` title="${escapeValueForXml(video.gallery_loc.title)}"` : "";
|
|
6287
|
+
parts[partIndex++] = ` <video:gallery_loc${title}>${escapeValueForXml(video.gallery_loc)}</video:gallery_loc>`;
|
|
6288
|
+
}
|
|
6289
|
+
parts[partIndex++] = " </video:video>";
|
|
6290
|
+
}
|
|
6291
|
+
}
|
|
6292
|
+
break;
|
|
6293
|
+
case "news":
|
|
6294
|
+
if (value) {
|
|
6295
|
+
parts[partIndex++] = " <news:news>";
|
|
6296
|
+
parts[partIndex++] = " <news:publication>";
|
|
6297
|
+
parts[partIndex++] = ` <news:name>${escapeValueForXml(value.publication.name)}</news:name>`;
|
|
6298
|
+
parts[partIndex++] = ` <news:language>${escapeValueForXml(value.publication.language)}</news:language>`;
|
|
6299
|
+
parts[partIndex++] = " </news:publication>";
|
|
6300
|
+
if (value.title) {
|
|
6301
|
+
parts[partIndex++] = ` <news:title>${escapeValueForXml(value.title)}</news:title>`;
|
|
6302
|
+
}
|
|
6303
|
+
if (value.publication_date) {
|
|
6304
|
+
parts[partIndex++] = ` <news:publication_date>${value.publication_date}</news:publication_date>`;
|
|
6305
|
+
}
|
|
6306
|
+
if (value.access) {
|
|
6307
|
+
parts[partIndex++] = ` <news:access>${value.access}</news:access>`;
|
|
6308
|
+
}
|
|
6309
|
+
if (value.genres) {
|
|
6310
|
+
parts[partIndex++] = ` <news:genres>${escapeValueForXml(value.genres)}</news:genres>`;
|
|
6311
|
+
}
|
|
6312
|
+
if (value.keywords) {
|
|
6313
|
+
parts[partIndex++] = ` <news:keywords>${escapeValueForXml(value.keywords)}</news:keywords>`;
|
|
6314
|
+
}
|
|
6315
|
+
if (value.stock_tickers) {
|
|
6316
|
+
parts[partIndex++] = ` <news:stock_tickers>${escapeValueForXml(value.stock_tickers)}</news:stock_tickers>`;
|
|
6317
|
+
}
|
|
6318
|
+
parts[partIndex++] = " </news:news>";
|
|
6319
|
+
}
|
|
6320
|
+
break;
|
|
6321
|
+
}
|
|
6322
|
+
}
|
|
6323
|
+
parts[partIndex++] = " </url>";
|
|
6324
|
+
return parts.slice(0, partIndex).join("\n");
|
|
6325
|
+
}
|
|
6326
|
+
function urlsToXml(urls, resolvers, { version, xsl, credits, minify }, errorInfo) {
|
|
6327
|
+
const estimatedSize = urls.length + 5;
|
|
6328
|
+
const xmlParts = Array.from({ length: estimatedSize });
|
|
6329
|
+
let partIndex = 0;
|
|
6330
|
+
let xslHref = xsl ? resolvers.relativeBaseUrlResolver(xsl) : false;
|
|
6331
|
+
if (xslHref && errorInfo && errorInfo.messages.length > 0) {
|
|
6332
|
+
xslHref = withQuery(xslHref, {
|
|
6333
|
+
errors: "true",
|
|
6334
|
+
error_messages: errorInfo.messages,
|
|
6335
|
+
error_urls: errorInfo.urls
|
|
6336
|
+
});
|
|
6337
|
+
}
|
|
6338
|
+
if (xslHref) {
|
|
6339
|
+
xmlParts[partIndex++] = `<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="${escapeValueForXml(xslHref)}"?>`;
|
|
6340
|
+
} else {
|
|
6341
|
+
xmlParts[partIndex++] = '<?xml version="1.0" encoding="UTF-8"?>';
|
|
6342
|
+
}
|
|
6343
|
+
xmlParts[partIndex++] = URLSET_OPENING_TAG;
|
|
6344
|
+
for (const url of urls) {
|
|
6345
|
+
xmlParts[partIndex++] = buildUrlXml(url);
|
|
6346
|
+
}
|
|
6347
|
+
xmlParts[partIndex++] = "</urlset>";
|
|
6348
|
+
if (credits) {
|
|
6349
|
+
xmlParts[partIndex++] = `<!-- XML Sitemap generated by @nuxtjs/sitemap v${version} at ${(/* @__PURE__ */ new Date()).toISOString()} -->`;
|
|
6350
|
+
}
|
|
6351
|
+
const xmlContent = xmlParts.slice(0, partIndex);
|
|
6352
|
+
if (minify) {
|
|
6353
|
+
return xmlContent.join("").replace(/(?<!<[^>]*)\s(?![^<]*>)/g, "");
|
|
6354
|
+
}
|
|
6355
|
+
return xmlContent.join("\n");
|
|
5414
6356
|
}
|
|
5415
6357
|
|
|
5416
6358
|
function resolveSitemapEntries(sitemap, urls, runtimeConfig, resolvers) {
|
|
@@ -5493,9 +6435,23 @@ function resolveSitemapEntries(sitemap, urls, runtimeConfig, resolvers) {
|
|
|
5493
6435
|
});
|
|
5494
6436
|
} else {
|
|
5495
6437
|
for (const l of autoI18n.locales) {
|
|
5496
|
-
let loc =
|
|
5497
|
-
if (autoI18n.
|
|
5498
|
-
|
|
6438
|
+
let loc = e._pathWithoutPrefix;
|
|
6439
|
+
if (autoI18n.pages) {
|
|
6440
|
+
const pageKey = e._pathWithoutPrefix.replace(/^\//, "").replace(/\/index$/, "") || "index";
|
|
6441
|
+
const pageMappings = autoI18n.pages[pageKey];
|
|
6442
|
+
if (pageMappings && pageMappings[l.code] !== void 0) {
|
|
6443
|
+
const customPath = pageMappings[l.code];
|
|
6444
|
+
if (customPath === false)
|
|
6445
|
+
continue;
|
|
6446
|
+
if (typeof customPath === "string")
|
|
6447
|
+
loc = customPath.startsWith("/") ? customPath : `/${customPath}`;
|
|
6448
|
+
} else if (!autoI18n.differentDomains && !(["prefix_and_default", "prefix_except_default"].includes(autoI18n.strategy) && l.code === autoI18n.defaultLocale)) {
|
|
6449
|
+
loc = joinURL(`/${l.code}`, e._pathWithoutPrefix);
|
|
6450
|
+
}
|
|
6451
|
+
} else {
|
|
6452
|
+
if (!autoI18n.differentDomains && !(["prefix_and_default", "prefix_except_default"].includes(autoI18n.strategy) && l.code === autoI18n.defaultLocale))
|
|
6453
|
+
loc = joinURL(`/${l.code}`, e._pathWithoutPrefix);
|
|
6454
|
+
}
|
|
5499
6455
|
const _sitemap = isI18nMapped ? l._sitemap : void 0;
|
|
5500
6456
|
const newEntry = preNormalizeEntry({
|
|
5501
6457
|
_sitemap,
|
|
@@ -5507,14 +6463,30 @@ function resolveSitemapEntries(sitemap, urls, runtimeConfig, resolvers) {
|
|
|
5507
6463
|
alternatives: [{ code: "x-default", _hreflang: "x-default" }, ...autoI18n.locales].map((locale) => {
|
|
5508
6464
|
const code = locale.code === "x-default" ? autoI18n.defaultLocale : locale.code;
|
|
5509
6465
|
const isDefault = locale.code === "x-default" || locale.code === autoI18n.defaultLocale;
|
|
5510
|
-
let href =
|
|
5511
|
-
if (autoI18n.
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
if (
|
|
5515
|
-
|
|
5516
|
-
|
|
6466
|
+
let href = e._pathWithoutPrefix;
|
|
6467
|
+
if (autoI18n.pages) {
|
|
6468
|
+
const pageKey = e._pathWithoutPrefix.replace(/^\//, "").replace(/\/index$/, "") || "index";
|
|
6469
|
+
const pageMappings = autoI18n.pages[pageKey];
|
|
6470
|
+
if (pageMappings && pageMappings[code] !== void 0) {
|
|
6471
|
+
const customPath = pageMappings[code];
|
|
6472
|
+
if (customPath === false)
|
|
6473
|
+
return false;
|
|
6474
|
+
if (typeof customPath === "string")
|
|
6475
|
+
href = customPath.startsWith("/") ? customPath : `/${customPath}`;
|
|
6476
|
+
} else if (autoI18n.strategy === "prefix") {
|
|
5517
6477
|
href = joinURL("/", code, e._pathWithoutPrefix);
|
|
6478
|
+
} else if (["prefix_and_default", "prefix_except_default"].includes(autoI18n.strategy)) {
|
|
6479
|
+
if (!isDefault) {
|
|
6480
|
+
href = joinURL("/", code, e._pathWithoutPrefix);
|
|
6481
|
+
}
|
|
6482
|
+
}
|
|
6483
|
+
} else {
|
|
6484
|
+
if (autoI18n.strategy === "prefix") {
|
|
6485
|
+
href = joinURL("/", code, e._pathWithoutPrefix);
|
|
6486
|
+
} else if (["prefix_and_default", "prefix_except_default"].includes(autoI18n.strategy)) {
|
|
6487
|
+
if (!isDefault) {
|
|
6488
|
+
href = joinURL("/", code, e._pathWithoutPrefix);
|
|
6489
|
+
}
|
|
5518
6490
|
}
|
|
5519
6491
|
}
|
|
5520
6492
|
if (!filterPath(href))
|
|
@@ -5559,16 +6531,12 @@ async function buildSitemapUrls(sitemap, resolvers, runtimeConfig, nitro) {
|
|
|
5559
6531
|
// chunking
|
|
5560
6532
|
defaultSitemapsChunkSize
|
|
5561
6533
|
} = runtimeConfig;
|
|
5562
|
-
const
|
|
5563
|
-
function maybeSort(
|
|
5564
|
-
return sortEntries ?
|
|
6534
|
+
const chunkInfo = parseChunkInfo(sitemap.sitemapName, sitemaps, defaultSitemapsChunkSize);
|
|
6535
|
+
function maybeSort(urls2) {
|
|
6536
|
+
return sortEntries ? sortInPlace(urls2) : urls2;
|
|
5565
6537
|
}
|
|
5566
|
-
function maybeSlice(
|
|
5567
|
-
|
|
5568
|
-
const chunk = Number(sitemap.sitemapName);
|
|
5569
|
-
return urls.slice(chunk * defaultSitemapsChunkSize, (chunk + 1) * defaultSitemapsChunkSize);
|
|
5570
|
-
}
|
|
5571
|
-
return urls;
|
|
6538
|
+
function maybeSlice(urls2) {
|
|
6539
|
+
return sliceUrlsForChunk(urls2, sitemap.sitemapName, sitemaps, defaultSitemapsChunkSize);
|
|
5572
6540
|
}
|
|
5573
6541
|
if (autoI18n?.differentDomains) {
|
|
5574
6542
|
const domain = autoI18n.locales.find((e) => [e.language, e.code].includes(sitemap.sitemapName))?.domain;
|
|
@@ -5583,9 +6551,27 @@ async function buildSitemapUrls(sitemap, resolvers, runtimeConfig, nitro) {
|
|
|
5583
6551
|
});
|
|
5584
6552
|
}
|
|
5585
6553
|
}
|
|
5586
|
-
|
|
5587
|
-
|
|
6554
|
+
let effectiveSitemap = sitemap;
|
|
6555
|
+
const baseSitemapName = chunkInfo.baseSitemapName;
|
|
6556
|
+
if (chunkInfo.isChunked && baseSitemapName !== sitemap.sitemapName && sitemaps[baseSitemapName]) {
|
|
6557
|
+
effectiveSitemap = sitemaps[baseSitemapName];
|
|
6558
|
+
}
|
|
6559
|
+
let sourcesInput = effectiveSitemap.includeAppSources ? await globalSitemapSources() : [];
|
|
6560
|
+
sourcesInput.push(...await childSitemapSources(effectiveSitemap));
|
|
6561
|
+
if (nitro && resolvers.event) {
|
|
6562
|
+
const ctx = {
|
|
6563
|
+
event: resolvers.event,
|
|
6564
|
+
sitemapName: baseSitemapName,
|
|
6565
|
+
sources: sourcesInput
|
|
6566
|
+
};
|
|
6567
|
+
await nitro.hooks.callHook("sitemap:sources", ctx);
|
|
6568
|
+
sourcesInput = ctx.sources;
|
|
6569
|
+
}
|
|
5588
6570
|
const sources = await resolveSitemapSources(sourcesInput, resolvers.event);
|
|
6571
|
+
const failedSources = sources.filter((source) => source.error && source._isFailure).map((source) => ({
|
|
6572
|
+
url: typeof source.fetch === "string" ? source.fetch : source.fetch?.[0] || "unknown",
|
|
6573
|
+
error: source.error || "Unknown error"
|
|
6574
|
+
}));
|
|
5589
6575
|
const resolvedCtx = {
|
|
5590
6576
|
urls: sources.flatMap((s) => s.urls),
|
|
5591
6577
|
sitemapName: sitemap.sitemapName,
|
|
@@ -5599,22 +6585,8 @@ async function buildSitemapUrls(sitemap, resolvers, runtimeConfig, nitro) {
|
|
|
5599
6585
|
return true;
|
|
5600
6586
|
});
|
|
5601
6587
|
const sortedUrls = maybeSort(filteredUrls);
|
|
5602
|
-
|
|
5603
|
-
}
|
|
5604
|
-
function urlsToXml(urls, resolvers, { version, xsl, credits, minify }) {
|
|
5605
|
-
const urlset = urls.map((e) => {
|
|
5606
|
-
const keys = Object.keys(e).filter((k) => !k.startsWith("_"));
|
|
5607
|
-
return [
|
|
5608
|
-
" <url>",
|
|
5609
|
-
keys.map((k) => handleEntry(k, e)).filter(Boolean).join("\n"),
|
|
5610
|
-
" </url>"
|
|
5611
|
-
].join("\n");
|
|
5612
|
-
});
|
|
5613
|
-
return wrapSitemapXml([
|
|
5614
|
-
'<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd http://www.google.com/schemas/sitemap-image/1.1 http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">',
|
|
5615
|
-
urlset.join("\n"),
|
|
5616
|
-
"</urlset>"
|
|
5617
|
-
], resolvers, { version, xsl, credits, minify });
|
|
6588
|
+
const urls = maybeSlice(sortedUrls);
|
|
6589
|
+
return { urls, failedSources };
|
|
5618
6590
|
}
|
|
5619
6591
|
|
|
5620
6592
|
function useNitroUrlResolvers(e) {
|
|
@@ -5633,17 +6605,18 @@ function useNitroUrlResolvers(e) {
|
|
|
5633
6605
|
relativeBaseUrlResolver: createSitePathResolver(e, { absolute: false, withBase: true })
|
|
5634
6606
|
};
|
|
5635
6607
|
}
|
|
5636
|
-
async function
|
|
6608
|
+
async function buildSitemapXml(event, definition, resolvers, runtimeConfig) {
|
|
5637
6609
|
const { sitemapName } = definition;
|
|
5638
6610
|
const nitro = useNitroApp();
|
|
5639
|
-
const
|
|
5640
|
-
let sitemapUrls = await buildSitemapUrls(definition, resolvers, runtimeConfig, nitro);
|
|
6611
|
+
const { urls: sitemapUrls, failedSources } = await buildSitemapUrls(definition, resolvers, runtimeConfig, nitro);
|
|
5641
6612
|
const routeRuleMatcher = createNitroRouteRuleMatcher();
|
|
5642
6613
|
const { autoI18n } = runtimeConfig;
|
|
5643
|
-
|
|
6614
|
+
let validCount = 0;
|
|
6615
|
+
for (let i = 0; i < sitemapUrls.length; i++) {
|
|
6616
|
+
const u = sitemapUrls[i];
|
|
5644
6617
|
const path = u._path?.pathname || u.loc;
|
|
5645
6618
|
if (!getPathRobotConfig(event, { path, skipSiteIndexable: true }).indexable)
|
|
5646
|
-
|
|
6619
|
+
continue;
|
|
5647
6620
|
let routeRules = routeRuleMatcher(path);
|
|
5648
6621
|
if (autoI18n?.locales && autoI18n?.strategy !== "no_prefix") {
|
|
5649
6622
|
const match = splitForLocales(path, autoI18n.locales.map((l) => l.code));
|
|
@@ -5652,15 +6625,15 @@ async function createSitemap(event, definition, runtimeConfig) {
|
|
|
5652
6625
|
routeRules = defu$1(routeRules, routeRuleMatcher(pathWithoutPrefix));
|
|
5653
6626
|
}
|
|
5654
6627
|
if (routeRules.sitemap === false)
|
|
5655
|
-
|
|
5656
|
-
if (typeof routeRules.robots !== "undefined" && !routeRules.robots)
|
|
5657
|
-
|
|
5658
|
-
}
|
|
6628
|
+
continue;
|
|
6629
|
+
if (typeof routeRules.robots !== "undefined" && !routeRules.robots)
|
|
6630
|
+
continue;
|
|
5659
6631
|
const hasRobotsDisabled = Object.entries(routeRules.headers || {}).some(([name, value]) => name.toLowerCase() === "x-robots-tag" && value.toLowerCase().includes("noindex"));
|
|
5660
6632
|
if (routeRules.redirect || hasRobotsDisabled)
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
}
|
|
6633
|
+
continue;
|
|
6634
|
+
sitemapUrls[validCount++] = routeRules.sitemap ? defu$1(u, routeRules.sitemap) : u;
|
|
6635
|
+
}
|
|
6636
|
+
sitemapUrls.length = validCount;
|
|
5664
6637
|
const locSize = sitemapUrls.length;
|
|
5665
6638
|
const resolvedCtx = {
|
|
5666
6639
|
urls: sitemapUrls,
|
|
@@ -5671,22 +6644,72 @@ async function createSitemap(event, definition, runtimeConfig) {
|
|
|
5671
6644
|
if (resolvedCtx.urls.length !== locSize) {
|
|
5672
6645
|
resolvedCtx.urls = resolvedCtx.urls.map((e) => preNormalizeEntry(e, resolvers));
|
|
5673
6646
|
}
|
|
5674
|
-
const maybeSort = (urls2) => runtimeConfig.sortEntries ?
|
|
6647
|
+
const maybeSort = (urls2) => runtimeConfig.sortEntries ? sortInPlace(urls2) : urls2;
|
|
5675
6648
|
const normalizedPreDedupe = resolvedCtx.urls.map((e) => normaliseEntry(e, definition.defaults, resolvers));
|
|
5676
6649
|
const urls = maybeSort(mergeOnKey$1(normalizedPreDedupe, "_key").map((e) => normaliseEntry(e, definition.defaults, resolvers)));
|
|
5677
|
-
|
|
6650
|
+
if (definition._isChunking && definition.sitemapName.includes("-")) {
|
|
6651
|
+
const parts = definition.sitemapName.split("-");
|
|
6652
|
+
const lastPart = parts.pop();
|
|
6653
|
+
if (!Number.isNaN(Number(lastPart))) {
|
|
6654
|
+
const chunkIndex = Number(lastPart);
|
|
6655
|
+
const baseSitemapName = parts.join("-");
|
|
6656
|
+
if (urls.length === 0 && chunkIndex > 0) {
|
|
6657
|
+
throw createError({
|
|
6658
|
+
statusCode: 404,
|
|
6659
|
+
message: `Sitemap chunk ${chunkIndex} for "${baseSitemapName}" does not exist.`
|
|
6660
|
+
});
|
|
6661
|
+
}
|
|
6662
|
+
}
|
|
6663
|
+
}
|
|
6664
|
+
const errorInfo = failedSources.length > 0 ? {
|
|
6665
|
+
messages: failedSources.map((f) => f.error),
|
|
6666
|
+
urls: failedSources.map((f) => f.url)
|
|
6667
|
+
} : void 0;
|
|
6668
|
+
const sitemap = urlsToXml(urls, resolvers, runtimeConfig, errorInfo);
|
|
5678
6669
|
const ctx = { sitemap, sitemapName, event };
|
|
5679
6670
|
await nitro.hooks.callHook("sitemap:output", ctx);
|
|
6671
|
+
return ctx.sitemap;
|
|
6672
|
+
}
|
|
6673
|
+
defineCachedFunction(
|
|
6674
|
+
buildSitemapXml,
|
|
6675
|
+
{
|
|
6676
|
+
name: "sitemap:xml",
|
|
6677
|
+
group: "sitemap",
|
|
6678
|
+
maxAge: 60 * 10,
|
|
6679
|
+
// Default 10 minutes
|
|
6680
|
+
base: "sitemap",
|
|
6681
|
+
// Use the sitemap storage
|
|
6682
|
+
getKey: (event, definition) => {
|
|
6683
|
+
const host = getHeader(event, "host") || getHeader(event, "x-forwarded-host") || "";
|
|
6684
|
+
const proto = getHeader(event, "x-forwarded-proto") || "https";
|
|
6685
|
+
const sitemapName = definition.sitemapName || "default";
|
|
6686
|
+
return `${sitemapName}-${proto}-${host}`;
|
|
6687
|
+
},
|
|
6688
|
+
swr: true
|
|
6689
|
+
// Enable stale-while-revalidate
|
|
6690
|
+
}
|
|
6691
|
+
);
|
|
6692
|
+
async function createSitemap(event, definition, runtimeConfig) {
|
|
6693
|
+
const resolvers = useNitroUrlResolvers(event);
|
|
6694
|
+
const xml = await buildSitemapXml(event, definition, resolvers, runtimeConfig);
|
|
5680
6695
|
setHeader(event, "Content-Type", "text/xml; charset=UTF-8");
|
|
5681
|
-
if (runtimeConfig.cacheMaxAgeSeconds)
|
|
5682
|
-
setHeader(event, "Cache-Control", `public, max-age=${runtimeConfig.cacheMaxAgeSeconds},
|
|
5683
|
-
|
|
6696
|
+
if (runtimeConfig.cacheMaxAgeSeconds) {
|
|
6697
|
+
setHeader(event, "Cache-Control", `public, max-age=${runtimeConfig.cacheMaxAgeSeconds}, s-maxage=${runtimeConfig.cacheMaxAgeSeconds}, stale-while-revalidate=3600`);
|
|
6698
|
+
const now = /* @__PURE__ */ new Date();
|
|
6699
|
+
setHeader(event, "X-Sitemap-Generated", now.toISOString());
|
|
6700
|
+
setHeader(event, "X-Sitemap-Cache-Duration", `${runtimeConfig.cacheMaxAgeSeconds}s`);
|
|
6701
|
+
const expiryTime = new Date(now.getTime() + runtimeConfig.cacheMaxAgeSeconds * 1e3);
|
|
6702
|
+
setHeader(event, "X-Sitemap-Cache-Expires", expiryTime.toISOString());
|
|
6703
|
+
const remainingSeconds = Math.floor((expiryTime.getTime() - now.getTime()) / 1e3);
|
|
6704
|
+
setHeader(event, "X-Sitemap-Cache-Remaining", `${remainingSeconds}s`);
|
|
6705
|
+
} else {
|
|
5684
6706
|
setHeader(event, "Cache-Control", `no-cache, no-store`);
|
|
6707
|
+
}
|
|
5685
6708
|
event.context._isSitemap = true;
|
|
5686
|
-
return
|
|
6709
|
+
return xml;
|
|
5687
6710
|
}
|
|
5688
6711
|
|
|
5689
|
-
const
|
|
6712
|
+
const _n1jDWd = defineEventHandler(async (e) => {
|
|
5690
6713
|
const runtimeConfig = useSitemapRuntimeConfig();
|
|
5691
6714
|
const { sitemaps } = runtimeConfig;
|
|
5692
6715
|
if ("index" in sitemaps) {
|
|
@@ -6280,7 +7303,7 @@ function isInternalRoute(path) {
|
|
|
6280
7303
|
const lastSegment = path.split("/").pop() || path;
|
|
6281
7304
|
return lastSegment.includes(".") || path.startsWith("/__") || path.startsWith("@");
|
|
6282
7305
|
}
|
|
6283
|
-
const
|
|
7306
|
+
const _3rIYDU = defineEventHandler(async (e) => {
|
|
6284
7307
|
const { tasks, ids, path } = await readBody(e);
|
|
6285
7308
|
const runtimeConfig = useRuntimeConfig().public["nuxt-link-checker"] || {};
|
|
6286
7309
|
const partialCtx = {
|
|
@@ -6316,7 +7339,7 @@ const _DcvS2K = defineEventHandler(async (e) => {
|
|
|
6316
7339
|
skipInspections: runtimeConfig.skipInspections
|
|
6317
7340
|
});
|
|
6318
7341
|
const filePaths = [
|
|
6319
|
-
resolve$
|
|
7342
|
+
resolve$3(runtimeConfig.rootDir, links.find((l) => l.file && l.link === path)?.file),
|
|
6320
7343
|
...paths.map((p) => {
|
|
6321
7344
|
const [filepath] = p.split(":");
|
|
6322
7345
|
return filepath;
|
|
@@ -6340,7 +7363,7 @@ const contentLinkProvider = async (e) => {
|
|
|
6340
7363
|
}
|
|
6341
7364
|
const contentList = [];
|
|
6342
7365
|
for (const collection of collections) {
|
|
6343
|
-
contentList.push(
|
|
7366
|
+
contentList.push(queryCollection(e, collection).select("id", "path", "title").where("path", "IS NOT NULL").all());
|
|
6344
7367
|
}
|
|
6345
7368
|
const results = await Promise.all(contentList);
|
|
6346
7369
|
return results.flat().map((d) => {
|
|
@@ -6355,19 +7378,19 @@ const contentLinkProvider = async (e) => {
|
|
|
6355
7378
|
const pagePaths = [
|
|
6356
7379
|
{
|
|
6357
7380
|
"title": "",
|
|
6358
|
-
"link": "/
|
|
7381
|
+
"link": "/"
|
|
6359
7382
|
},
|
|
6360
7383
|
{
|
|
6361
7384
|
"title": "",
|
|
6362
|
-
"link": "/"
|
|
7385
|
+
"link": "/_ignis-info"
|
|
6363
7386
|
},
|
|
6364
7387
|
{
|
|
6365
7388
|
"title": "",
|
|
6366
|
-
"link": "/
|
|
7389
|
+
"link": "/_ignis-config"
|
|
6367
7390
|
}
|
|
6368
7391
|
];
|
|
6369
7392
|
|
|
6370
|
-
const
|
|
7393
|
+
const _Rhm_9d = defineCachedEventHandler(async (e) => {
|
|
6371
7394
|
const runtimeConfig = useRuntimeConfig().public["nuxt-link-checker"] || {};
|
|
6372
7395
|
const linkDb = [
|
|
6373
7396
|
...pagePaths
|
|
@@ -6387,7 +7410,7 @@ const _Utkbv0 = defineCachedEventHandler(async (e) => {
|
|
|
6387
7410
|
// avoid thrashing
|
|
6388
7411
|
});
|
|
6389
7412
|
|
|
6390
|
-
const
|
|
7413
|
+
const _tz9NUt = defineEventHandler(async (e) => {
|
|
6391
7414
|
return {
|
|
6392
7415
|
runtimeConfig: useRuntimeConfig(e).public["nuxt-link-checker"]
|
|
6393
7416
|
};
|
|
@@ -6395,7 +7418,7 @@ const _IFlV15 = defineEventHandler(async (e) => {
|
|
|
6395
7418
|
|
|
6396
7419
|
const fileMapping = {};
|
|
6397
7420
|
|
|
6398
|
-
const
|
|
7421
|
+
const _vGgZzc = defineEventHandler(async (e) => {
|
|
6399
7422
|
const path = parseURL(e.path).pathname;
|
|
6400
7423
|
if (fileMapping[path]) {
|
|
6401
7424
|
if (path.endsWith(".svg"))
|
|
@@ -6728,7 +7751,7 @@ async function getIslandContext(event) {
|
|
|
6728
7751
|
return ctx;
|
|
6729
7752
|
}
|
|
6730
7753
|
|
|
6731
|
-
const
|
|
7754
|
+
const _rFIeAt = eventHandler(async (event) => {
|
|
6732
7755
|
const collection = getRouterParam(event, "collection");
|
|
6733
7756
|
setHeader(event, "Content-Type", "text/plain");
|
|
6734
7757
|
const data = await useStorage().getItem(`build:content:database.compressed.mjs`) || "";
|
|
@@ -6746,8 +7769,8 @@ async function decompressSQLDump(base64Str, compressionType = "gzip") {
|
|
|
6746
7769
|
const binaryData = Uint8Array.from(atob(base64Str), (c) => c.charCodeAt(0));
|
|
6747
7770
|
const response = new Response(new Blob([binaryData]));
|
|
6748
7771
|
const decompressedStream = response.body?.pipeThrough(new DecompressionStream(compressionType));
|
|
6749
|
-
const
|
|
6750
|
-
return
|
|
7772
|
+
const text = await new Response(decompressedStream).text();
|
|
7773
|
+
return JSON.parse(text);
|
|
6751
7774
|
}
|
|
6752
7775
|
|
|
6753
7776
|
function refineContentFields(sql, doc) {
|
|
@@ -7010,7 +8033,7 @@ function cleanupQuery(query, options = { removeString: false }) {
|
|
|
7010
8033
|
return result;
|
|
7011
8034
|
}
|
|
7012
8035
|
|
|
7013
|
-
const
|
|
8036
|
+
const _1L1dwH = eventHandler(async (event) => {
|
|
7014
8037
|
const { sql } = await readBody(event);
|
|
7015
8038
|
const collection = getRouterParam(event, "collection");
|
|
7016
8039
|
assertSafeQuery(sql, collection);
|
|
@@ -7021,7 +8044,7 @@ const _Ye6p8H = eventHandler(async (event) => {
|
|
|
7021
8044
|
return loadDatabaseAdapter(conf).all(sql);
|
|
7022
8045
|
});
|
|
7023
8046
|
|
|
7024
|
-
const
|
|
8047
|
+
const _O1mb7t = lazyEventHandler(() => {
|
|
7025
8048
|
const opts = useRuntimeConfig().ipx || {};
|
|
7026
8049
|
const fsDir = opts?.fs?.dir ? (Array.isArray(opts.fs.dir) ? opts.fs.dir : [opts.fs.dir]).map((dir) => isAbsolute(dir) ? dir : fileURLToPath(new URL(dir, globalThis._importMeta_.url))) : void 0;
|
|
7027
8050
|
const fsStorage = opts.fs?.dir ? ipxFSStorage({ ...opts.fs, dir: fsDir }) : void 0;
|
|
@@ -7040,46 +8063,47 @@ const _uQBwCY = lazyEventHandler(() => {
|
|
|
7040
8063
|
});
|
|
7041
8064
|
|
|
7042
8065
|
const _lazy_u5Dhoc = () => Promise.resolve().then(function () { return neonTest$1; });
|
|
7043
|
-
const
|
|
8066
|
+
const _lazy_MPEx63 = () => Promise.resolve().then(function () { return renderer$1; });
|
|
7044
8067
|
|
|
7045
8068
|
const handlers = [
|
|
8069
|
+
{ route: '', handler: _WLD3jp, lazy: false, middleware: true, method: undefined },
|
|
7046
8070
|
{ route: '/api/neonTest', handler: _lazy_u5Dhoc, lazy: true, middleware: false, method: undefined },
|
|
7047
|
-
{ route: '/__nuxt_error', handler:
|
|
7048
|
-
{ route: '', handler:
|
|
7049
|
-
{ route: '', handler:
|
|
7050
|
-
{ route: '', handler:
|
|
7051
|
-
{ route: '', handler:
|
|
7052
|
-
{ route: '', handler:
|
|
7053
|
-
{ route: '/api/_nuxt_icon/:collection', handler:
|
|
8071
|
+
{ route: '/__nuxt_error', handler: _lazy_MPEx63, lazy: true, middleware: false, method: undefined },
|
|
8072
|
+
{ route: '', handler: _Jp0StA, lazy: false, middleware: false, method: undefined },
|
|
8073
|
+
{ route: '', handler: _ji0G_c, lazy: false, middleware: false, method: undefined },
|
|
8074
|
+
{ route: '', handler: _SCmHem, lazy: false, middleware: false, method: undefined },
|
|
8075
|
+
{ route: '', handler: _umXuS0, lazy: false, middleware: false, method: undefined },
|
|
8076
|
+
{ route: '', handler: _dtrJEZ, lazy: false, middleware: false, method: undefined },
|
|
8077
|
+
{ route: '/api/_nuxt_icon/:collection', handler: _Vmc_bU, lazy: false, middleware: false, method: undefined },
|
|
7054
8078
|
{ route: '/api/_neon/raw', handler: _mgiUeJ, lazy: false, middleware: false, method: undefined },
|
|
7055
8079
|
{ route: '/api/_neon/count', handler: _BzfLgA, lazy: false, middleware: false, method: undefined },
|
|
7056
8080
|
{ route: '/api/_neon/select', handler: _vZyrES, lazy: false, middleware: false, method: undefined },
|
|
7057
8081
|
{ route: '/api/_neon/insert', handler: _8fc9Bi, lazy: false, middleware: false, method: undefined },
|
|
7058
8082
|
{ route: '/api/_neon/update', handler: _cKepiO, lazy: false, middleware: false, method: undefined },
|
|
7059
8083
|
{ route: '/api/_neon/delete', handler: _ZwvYdn, lazy: false, middleware: false, method: undefined },
|
|
7060
|
-
{ route: '', handler:
|
|
7061
|
-
{ route: '/__site-config__/debug.json', handler:
|
|
7062
|
-
{ route: '/robots.txt', handler:
|
|
7063
|
-
{ route: '', handler:
|
|
7064
|
-
{ route: '/__robots__/debug.json', handler:
|
|
7065
|
-
{ route: '/__robots__/debug-path.json', handler:
|
|
7066
|
-
{ route: '/__sitemap__/nuxt-content-urls.json', handler:
|
|
7067
|
-
{ route: '/__sitemap__/debug.json', handler:
|
|
7068
|
-
{ route: '/__sitemap__/style.xsl', handler:
|
|
7069
|
-
{ route: '/sitemap.xml', handler:
|
|
7070
|
-
{ route: '/__link-checker__/inspect', handler:
|
|
7071
|
-
{ route: '/__link-checker__/links', handler:
|
|
7072
|
-
{ route: '/__link-checker__/debug.json', handler:
|
|
7073
|
-
{ route: '', handler:
|
|
8084
|
+
{ route: '', handler: _XVpHng, lazy: false, middleware: true, method: undefined },
|
|
8085
|
+
{ route: '/__site-config__/debug.json', handler: _LgdZze, lazy: false, middleware: false, method: undefined },
|
|
8086
|
+
{ route: '/robots.txt', handler: _uMK4YT, lazy: false, middleware: false, method: undefined },
|
|
8087
|
+
{ route: '', handler: _XpKgU4, lazy: false, middleware: true, method: undefined },
|
|
8088
|
+
{ route: '/__robots__/debug.json', handler: _WlQo7G, lazy: false, middleware: false, method: undefined },
|
|
8089
|
+
{ route: '/__robots__/debug-path.json', handler: _MyEbKg, lazy: false, middleware: false, method: undefined },
|
|
8090
|
+
{ route: '/__sitemap__/nuxt-content-urls.json', handler: _fUzllO, lazy: false, middleware: false, method: undefined },
|
|
8091
|
+
{ route: '/__sitemap__/debug.json', handler: _xIZ_0x, lazy: false, middleware: false, method: undefined },
|
|
8092
|
+
{ route: '/__sitemap__/style.xsl', handler: _4BAWff, lazy: false, middleware: false, method: undefined },
|
|
8093
|
+
{ route: '/sitemap.xml', handler: _n1jDWd, lazy: false, middleware: false, method: undefined },
|
|
8094
|
+
{ route: '/__link-checker__/inspect', handler: _3rIYDU, lazy: false, middleware: false, method: undefined },
|
|
8095
|
+
{ route: '/__link-checker__/links', handler: _Rhm_9d, lazy: false, middleware: false, method: undefined },
|
|
8096
|
+
{ route: '/__link-checker__/debug.json', handler: _tz9NUt, lazy: false, middleware: false, method: undefined },
|
|
8097
|
+
{ route: '', handler: _vGgZzc, lazy: false, middleware: true, method: undefined },
|
|
7074
8098
|
{ route: '/api/_auth/session', handler: _MGSDdR, lazy: false, middleware: false, method: "delete" },
|
|
7075
8099
|
{ route: '/api/_auth/session', handler: _7djcCh, lazy: false, middleware: false, method: "get" },
|
|
7076
8100
|
{ route: '/__nuxt_island/**', handler: _SxA8c9, lazy: false, middleware: false, method: undefined },
|
|
7077
|
-
{ route: '/__nuxt_content/:collection/sql_dump', handler:
|
|
7078
|
-
{ route: '/__nuxt_content/:collection/query', handler:
|
|
7079
|
-
{ route: '/_ipx/**', handler:
|
|
7080
|
-
{ route: '/_fonts/**', handler:
|
|
7081
|
-
{ route: '/_scripts/**', handler:
|
|
7082
|
-
{ route: '/**', handler:
|
|
8101
|
+
{ route: '/__nuxt_content/:collection/sql_dump.txt', handler: _rFIeAt, lazy: false, middleware: false, method: undefined },
|
|
8102
|
+
{ route: '/__nuxt_content/:collection/query', handler: _1L1dwH, lazy: false, middleware: false, method: undefined },
|
|
8103
|
+
{ route: '/_ipx/**', handler: _O1mb7t, lazy: false, middleware: false, method: undefined },
|
|
8104
|
+
{ route: '/_fonts/**', handler: _lazy_MPEx63, lazy: true, middleware: false, method: undefined },
|
|
8105
|
+
{ route: '/_scripts/**', handler: _lazy_MPEx63, lazy: true, middleware: false, method: undefined },
|
|
8106
|
+
{ route: '/**', handler: _lazy_MPEx63, lazy: true, middleware: false, method: undefined }
|
|
7083
8107
|
];
|
|
7084
8108
|
|
|
7085
8109
|
function createNitroApp() {
|
|
@@ -7312,10 +8336,10 @@ const template$1 = (messages) => {
|
|
|
7312
8336
|
return '<!DOCTYPE html><html lang="en"><head><title>' + escapeHtml(messages.statusCode) + " - " + escapeHtml(messages.statusMessage || "Internal Server Error") + `</title><meta charset="utf-8"><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0" name="viewport"><style>.spotlight{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);bottom:-40vh;filter:blur(30vh);height:60vh;opacity:.8}*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.pointer-events-none{pointer-events:none}.fixed{position:fixed}.left-0{left:0}.right-0{right:0}.z-10{z-index:10}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.h-auto{height:auto}.min-h-screen{min-height:100vh}.flex{display:flex}.flex-1{flex:1 1 0%}.flex-col{flex-direction:column}.overflow-y-auto{overflow-y:auto}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.bg-black\\/5{background-color:#0000000d}.bg-white{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.p-8{padding:2rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.pt-14{padding-top:3.5rem}.text-6xl{font-size:3.75rem;line-height:1}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-black{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light{font-weight:300}.font-medium{font-weight:500}.leading-tight{line-height:1.25}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\\:bg-black{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\\:bg-white\\/10{background-color:#ffffff1a}.dark\\:text-white{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (min-width:640px){.sm\\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\\:text-8xl{font-size:6rem;line-height:1}}</style><script>!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver((e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)})).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();<\/script></head><body class="antialiased bg-white dark:bg-black dark:text-white flex flex-col font-sans min-h-screen pt-14 px-10 text-black"><div class="fixed left-0 pointer-events-none right-0 spotlight"></div><h1 class="font-medium mb-6 sm:text-8xl text-6xl">` + escapeHtml(messages.statusCode) + '</h1><p class="font-light leading-tight mb-8 sm:text-2xl text-xl">' + escapeHtml(messages.description) + '</p><div class="bg-black/5 bg-white dark:bg-white/10 flex-1 h-auto overflow-y-auto rounded-t-md"><div class="font-light leading-tight p-8 text-xl z-10">' + escapeHtml(messages.stack) + "</div></div></body></html>";
|
|
7313
8337
|
};
|
|
7314
8338
|
|
|
7315
|
-
const errorDev = /*#__PURE__*/Object.freeze({
|
|
8339
|
+
const errorDev = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7316
8340
|
__proto__: null,
|
|
7317
8341
|
template: template$1
|
|
7318
|
-
});
|
|
8342
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7319
8343
|
|
|
7320
8344
|
const sources$1 = [
|
|
7321
8345
|
{
|
|
@@ -7347,51 +8371,51 @@ const sources$1 = [
|
|
|
7347
8371
|
},
|
|
7348
8372
|
"urls": [
|
|
7349
8373
|
{
|
|
7350
|
-
"loc": "/
|
|
8374
|
+
"loc": "/"
|
|
7351
8375
|
},
|
|
7352
8376
|
{
|
|
7353
|
-
"loc": "/"
|
|
8377
|
+
"loc": "/_ignis-info"
|
|
7354
8378
|
},
|
|
7355
8379
|
{
|
|
7356
|
-
"loc": "/
|
|
8380
|
+
"loc": "/_ignis-config"
|
|
7357
8381
|
}
|
|
7358
8382
|
],
|
|
7359
8383
|
"sourceType": "app"
|
|
7360
8384
|
}
|
|
7361
8385
|
];
|
|
7362
8386
|
|
|
7363
|
-
const globalSources = /*#__PURE__*/Object.freeze({
|
|
8387
|
+
const globalSources = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7364
8388
|
__proto__: null,
|
|
7365
8389
|
sources: sources$1
|
|
7366
|
-
});
|
|
8390
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7367
8391
|
|
|
7368
8392
|
const sources = {};
|
|
7369
8393
|
|
|
7370
|
-
const childSources = /*#__PURE__*/Object.freeze({
|
|
8394
|
+
const childSources = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7371
8395
|
__proto__: null,
|
|
7372
8396
|
sources: sources
|
|
7373
|
-
});
|
|
8397
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7374
8398
|
|
|
7375
8399
|
const server = () => {};
|
|
7376
8400
|
|
|
7377
|
-
const server$1 = /*#__PURE__*/Object.freeze({
|
|
8401
|
+
const server$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7378
8402
|
__proto__: null,
|
|
7379
8403
|
default: server
|
|
7380
|
-
});
|
|
8404
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7381
8405
|
|
|
7382
8406
|
const template = "";
|
|
7383
8407
|
|
|
7384
|
-
const _virtual__spaTemplate = /*#__PURE__*/Object.freeze({
|
|
8408
|
+
const _virtual__spaTemplate = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7385
8409
|
__proto__: null,
|
|
7386
8410
|
template: template
|
|
7387
|
-
});
|
|
8411
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7388
8412
|
|
|
7389
8413
|
const styles = {};
|
|
7390
8414
|
|
|
7391
|
-
const styles$1 = /*#__PURE__*/Object.freeze({
|
|
8415
|
+
const styles$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7392
8416
|
__proto__: null,
|
|
7393
8417
|
default: styles
|
|
7394
|
-
});
|
|
8418
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7395
8419
|
|
|
7396
8420
|
const neonTest = defineEventHandler(async () => {
|
|
7397
8421
|
const config = useRuntimeConfig().public.ignis;
|
|
@@ -7411,10 +8435,10 @@ const neonTest = defineEventHandler(async () => {
|
|
|
7411
8435
|
}
|
|
7412
8436
|
});
|
|
7413
8437
|
|
|
7414
|
-
const neonTest$1 = /*#__PURE__*/Object.freeze({
|
|
8438
|
+
const neonTest$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7415
8439
|
__proto__: null,
|
|
7416
8440
|
default: neonTest
|
|
7417
|
-
});
|
|
8441
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7418
8442
|
|
|
7419
8443
|
function renderPayloadResponse(ssrContext) {
|
|
7420
8444
|
return {
|
|
@@ -7551,6 +8575,7 @@ const renderer = defineRenderHandler(async (event) => {
|
|
|
7551
8575
|
});
|
|
7552
8576
|
}
|
|
7553
8577
|
if (!routeOptions.noScripts) {
|
|
8578
|
+
const tagPosition = "head";
|
|
7554
8579
|
ssrContext.head.push({
|
|
7555
8580
|
script: Object.values(scripts).map((resource) => ({
|
|
7556
8581
|
type: resource.module ? "module" : null,
|
|
@@ -7558,7 +8583,7 @@ const renderer = defineRenderHandler(async (event) => {
|
|
|
7558
8583
|
defer: resource.module ? null : true,
|
|
7559
8584
|
// if we are rendering script tag payloads that import an async payload
|
|
7560
8585
|
// we need to ensure this resolves before executing the Nuxt entry
|
|
7561
|
-
tagPosition
|
|
8586
|
+
tagPosition,
|
|
7562
8587
|
crossorigin: ""
|
|
7563
8588
|
}))
|
|
7564
8589
|
}, headEntryOptions);
|
|
@@ -7602,8 +8627,8 @@ function renderHTMLDocument(html) {
|
|
|
7602
8627
|
return `<!DOCTYPE html><html${joinAttrs(html.htmlAttrs)}><head>${joinTags(html.head)}</head><body${joinAttrs(html.bodyAttrs)}>${joinTags(html.bodyPrepend)}${joinTags(html.body)}${joinTags(html.bodyAppend)}</body></html>`;
|
|
7603
8628
|
}
|
|
7604
8629
|
|
|
7605
|
-
const renderer$1 = /*#__PURE__*/Object.freeze({
|
|
8630
|
+
const renderer$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7606
8631
|
__proto__: null,
|
|
7607
8632
|
default: renderer
|
|
7608
|
-
});
|
|
8633
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7609
8634
|
//# sourceMappingURL=index.mjs.map
|