nuxt-ignis 0.3.2 → 0.4.0-rc.1
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 +1598 -550
- 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 +74 -56
- 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 +14 -11
- 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 +413 -318
- 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 +35 -34
- package/.nuxt/types/schema.d.ts +360 -36
- 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 +4 -8
- 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 +1 -1
- package/components/ignis/IgnisConfig.vue +38 -0
- package/components/{AppFeature.vue → ignis/IgnisFeature.vue} +2 -1
- package/components/ignis/IgnisFeatureList.vue +125 -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 +65 -0
- package/composables/useTranslation.ts +18 -9
- package/composables/useValibot.ts +16 -0
- package/composables/useZod.ts +16 -0
- package/features.ts +97 -15
- package/formkit.config.ts +8 -8
- package/i18n/locales/en.json +12 -4
- package/nuxt.config.ts +44 -6
- package/package.json +32 -20
- package/pages/_ignis-config.vue +3 -0
- package/pages/_ignis-info.vue +3 -0
- package/pages/index.vue +4 -6
- package/plugins/errorHandler.ts +26 -0
- package/public/_ignis-config.json +97 -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 +27 -0
- package/test/config/equipment-1-composable.txt +33 -0
- package/test/config/equipment-2-plugins.txt +34 -0
- package/test/config/equipment-all.txt +39 -0
- 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 +162 -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 +3 -2
- package/test/features/db-off.txt +3 -2
- package/test/features/db-supabase.txt +3 -2
- package/test/features/default.txt +3 -2
- package/test/features/disable-core.txt +2 -1
- package/test/features/enable-all.txt +3 -2
- package/test/features/equipment.txt +4 -0
- package/test/features/forms-formkit.txt +3 -2
- package/test/features/forms-off.txt +3 -2
- package/test/features/forms-vueform.txt +3 -2
- package/test/features/no-default-css.txt +4 -0
- package/test/features/regexp.txt +4 -0
- package/test/features/ui-nuxt-ui.txt +3 -2
- package/test/features/ui-off.txt +3 -2
- package/test/features/ui-tailwind.txt +3 -2
- package/test/features/validation-off.txt +4 -0
- package/test/features/validation-valibot.txt +5 -0
- package/test/features/validation-zod.txt +5 -0
- package/test/features.test.ts +84 -0
- package/utils/config/content.ts +35 -0
- package/utils/config/formkit.ts +23 -0
- package/utils/config/vueform.ts +25 -0
- package/utils/consola.ts +23 -13
- package/utils/content.ts +12 -25
- package/utils/formkit.ts +16 -0
- package/utils/vueform.ts +14 -11
- package/vueform.config.ts +3 -5
- 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 -119
- package/content/second.md +0 -11
- package/pages/ignis.vue +0 -3
- package/pages/second.vue +0 -59
- package/tailwind.config.ts +0 -29
- package/utils/config/content.config.ts +0 -12
- package/utils/config/vueform.config.ts +0 -20
package/.nuxt/dev/index.mjs
CHANGED
|
@@ -3,50 +3,51 @@ 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
35
|
import { preventSingleLetterOrphans } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/elrh-pslo@1.1.6/node_modules/elrh-pslo/dist/elrh-pslo.cjs';
|
|
36
|
+
import fs, { promises } from 'node:fs';
|
|
37
|
+
import { fileURLToPath } from 'node:url';
|
|
38
|
+
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
39
|
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$
|
|
40
|
+
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
41
|
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
42
|
import { collections } from 'file://C:/Git/nuxt-ignis/core/.nuxt/nuxt-icon-server-bundle.mjs';
|
|
40
43
|
import { neon } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/@neondatabase+serverless@1.0.0/node_modules/@neondatabase/serverless/index.mjs';
|
|
41
44
|
import SqlString from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/sqlstring@2.3.3/node_modules/sqlstring/index.js';
|
|
42
45
|
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@
|
|
46
|
+
import { diffLines } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/diff@8.0.2/node_modules/diff/libesm/index.js';
|
|
44
47
|
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';
|
|
48
|
+
import { walkResolver } from 'file://C:/Git/nuxt-ignis/core/node_modules/.pnpm/unhead@2.0.12/node_modules/unhead/dist/utils.mjs';
|
|
49
|
+
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';
|
|
50
|
+
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
51
|
|
|
51
52
|
const HASH_RE = /#/g;
|
|
52
53
|
const AMPERSAND_RE = /&/g;
|
|
@@ -58,6 +59,7 @@ const ENC_CARET_RE = /%5e/gi;
|
|
|
58
59
|
const ENC_BACKTICK_RE = /%60/gi;
|
|
59
60
|
const ENC_PIPE_RE = /%7c/gi;
|
|
60
61
|
const ENC_SPACE_RE = /%20/gi;
|
|
62
|
+
const ENC_SLASH_RE = /%2f/gi;
|
|
61
63
|
const ENC_ENC_SLASH_RE = /%252f/gi;
|
|
62
64
|
function encode(text) {
|
|
63
65
|
return encodeURI("" + text).replace(ENC_PIPE_RE, "|");
|
|
@@ -78,6 +80,9 @@ function decode(text = "") {
|
|
|
78
80
|
return "" + text;
|
|
79
81
|
}
|
|
80
82
|
}
|
|
83
|
+
function decodePath(text) {
|
|
84
|
+
return decode(text.replace(ENC_SLASH_RE, "%252F"));
|
|
85
|
+
}
|
|
81
86
|
function decodeQueryKey(text) {
|
|
82
87
|
return decode(text.replace(PLUS_RE, " "));
|
|
83
88
|
}
|
|
@@ -327,15 +332,15 @@ function stringifyParsedURL(parsed) {
|
|
|
327
332
|
|
|
328
333
|
const serverAssets = [{"baseName":"server","dir":"C:/Git/nuxt-ignis/core/server/assets"}];
|
|
329
334
|
|
|
330
|
-
const assets = createStorage();
|
|
335
|
+
const assets$1 = createStorage();
|
|
331
336
|
|
|
332
337
|
for (const asset of serverAssets) {
|
|
333
|
-
assets.mount(asset.baseName, unstorage_47drivers_47fs({ base: asset.dir, ignore: (asset?.ignore || []) }));
|
|
338
|
+
assets$1.mount(asset.baseName, unstorage_47drivers_47fs({ base: asset.dir, ignore: (asset?.ignore || []) }));
|
|
334
339
|
}
|
|
335
340
|
|
|
336
341
|
const storage$1 = createStorage({});
|
|
337
342
|
|
|
338
|
-
storage$1.mount('/assets', assets);
|
|
343
|
+
storage$1.mount('/assets', assets$1);
|
|
339
344
|
|
|
340
345
|
storage$1.mount('#rate-limiter-storage', unstorage_47drivers_47lru_45cache({"driver":"lruCache"}));
|
|
341
346
|
storage$1.mount('root', unstorage_47drivers_47fs({"driver":"fs","readOnly":true,"base":"C:/Git/nuxt-ignis/core","watchOptions":{"ignored":[null]}}));
|
|
@@ -866,12 +871,6 @@ function cloneWithProxy(obj, overrides) {
|
|
|
866
871
|
}
|
|
867
872
|
const cachedEventHandler = defineCachedEventHandler;
|
|
868
873
|
|
|
869
|
-
const defineAppConfig = (config) => config;
|
|
870
|
-
|
|
871
|
-
const appConfig0 = defineAppConfig({
|
|
872
|
-
textTitle: "Nuxt Ignis"
|
|
873
|
-
});
|
|
874
|
-
|
|
875
874
|
const inlineAppConfig = {
|
|
876
875
|
"nuxt": {},
|
|
877
876
|
"ui": {
|
|
@@ -1102,7 +1101,9 @@ const inlineAppConfig = {
|
|
|
1102
1101
|
}
|
|
1103
1102
|
};
|
|
1104
1103
|
|
|
1105
|
-
|
|
1104
|
+
|
|
1105
|
+
|
|
1106
|
+
const appConfig = defuFn(inlineAppConfig);
|
|
1106
1107
|
|
|
1107
1108
|
function getEnv(key, opts) {
|
|
1108
1109
|
const envKey = snakeCase(key).toUpperCase();
|
|
@@ -1183,7 +1184,7 @@ const _inlineRuntimeConfig = {
|
|
|
1183
1184
|
"/__nuxt_content/**": {
|
|
1184
1185
|
"robots": false
|
|
1185
1186
|
},
|
|
1186
|
-
"/__nuxt_content/content/sql_dump": {
|
|
1187
|
+
"/__nuxt_content/content/sql_dump.txt": {
|
|
1187
1188
|
"prerender": true
|
|
1188
1189
|
},
|
|
1189
1190
|
"/_scripts/**": {
|
|
@@ -1220,25 +1221,32 @@ const _inlineRuntimeConfig = {
|
|
|
1220
1221
|
},
|
|
1221
1222
|
"public": {
|
|
1222
1223
|
"ignis": {
|
|
1224
|
+
"html": {
|
|
1225
|
+
"lang": "en",
|
|
1226
|
+
"title": "Nuxt Ignis App"
|
|
1227
|
+
},
|
|
1223
1228
|
"log": {
|
|
1224
1229
|
"level": "info"
|
|
1225
1230
|
},
|
|
1231
|
+
"error": true,
|
|
1226
1232
|
"ssr": true,
|
|
1227
1233
|
"pages": true,
|
|
1234
|
+
"css": "",
|
|
1228
1235
|
"preset": {
|
|
1229
1236
|
"ui": "off",
|
|
1230
1237
|
"db": "off",
|
|
1231
|
-
"forms": "off"
|
|
1238
|
+
"forms": "off",
|
|
1239
|
+
"validation": "off"
|
|
1232
1240
|
},
|
|
1233
1241
|
"core": {
|
|
1242
|
+
"css": true,
|
|
1234
1243
|
"eslint": true,
|
|
1235
1244
|
"fonts": true,
|
|
1236
1245
|
"image": true,
|
|
1237
|
-
"pinia": true,
|
|
1238
|
-
"time": true,
|
|
1239
1246
|
"scripts": true,
|
|
1240
1247
|
"security": true,
|
|
1241
|
-
"vueuse": true
|
|
1248
|
+
"vueuse": true,
|
|
1249
|
+
"pinia": true
|
|
1242
1250
|
},
|
|
1243
1251
|
"ui": false,
|
|
1244
1252
|
"tailwind": false,
|
|
@@ -1255,20 +1263,29 @@ const _inlineRuntimeConfig = {
|
|
|
1255
1263
|
"config": "./formkit.config.ts"
|
|
1256
1264
|
},
|
|
1257
1265
|
"vueform": false,
|
|
1266
|
+
"valibot": false,
|
|
1267
|
+
"zod": false,
|
|
1258
1268
|
"content": false,
|
|
1269
|
+
"seo": false,
|
|
1270
|
+
"auth": false,
|
|
1259
1271
|
"openprops": false,
|
|
1260
1272
|
"pslo": {
|
|
1261
1273
|
"enabled": false,
|
|
1262
1274
|
"content": false
|
|
1263
1275
|
},
|
|
1264
|
-
"
|
|
1265
|
-
|
|
1276
|
+
"equipment": {
|
|
1277
|
+
"enabled": false,
|
|
1278
|
+
"composables": "",
|
|
1279
|
+
"plugins": ""
|
|
1280
|
+
},
|
|
1281
|
+
"regexp": false,
|
|
1282
|
+
"charts": false,
|
|
1266
1283
|
"warn": {
|
|
1267
1284
|
"duplicates": true
|
|
1268
1285
|
}
|
|
1269
1286
|
},
|
|
1270
1287
|
"nuxt-scripts": {
|
|
1271
|
-
"version": "0.11.
|
|
1288
|
+
"version": "0.11.10",
|
|
1272
1289
|
"defaultScriptOptions": {
|
|
1273
1290
|
"trigger": "onNuxtReady"
|
|
1274
1291
|
}
|
|
@@ -1278,7 +1295,7 @@ const _inlineRuntimeConfig = {
|
|
|
1278
1295
|
"neonRawWarning": true,
|
|
1279
1296
|
"neonDebugSQL": false,
|
|
1280
1297
|
"nuxt-link-checker": {
|
|
1281
|
-
"version": "4.3.
|
|
1298
|
+
"version": "4.3.1",
|
|
1282
1299
|
"hasSitemapModule": true,
|
|
1283
1300
|
"rootDir": "C:/Git/nuxt-ignis/core",
|
|
1284
1301
|
"excludeLinks": [],
|
|
@@ -1353,11 +1370,16 @@ const _inlineRuntimeConfig = {
|
|
|
1353
1370
|
"alternateLinkCanonicalQueries": false,
|
|
1354
1371
|
"hmr": true
|
|
1355
1372
|
},
|
|
1356
|
-
"multiDomainLocales": false
|
|
1373
|
+
"multiDomainLocales": false,
|
|
1374
|
+
"domainLocales": {
|
|
1375
|
+
"en": {
|
|
1376
|
+
"domain": ""
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1357
1379
|
}
|
|
1358
1380
|
},
|
|
1359
1381
|
"nuxt-scripts": {
|
|
1360
|
-
"version": "0.11.
|
|
1382
|
+
"version": "0.11.10"
|
|
1361
1383
|
},
|
|
1362
1384
|
"private": {
|
|
1363
1385
|
"basicAuth": false
|
|
@@ -1522,7 +1544,7 @@ const _inlineRuntimeConfig = {
|
|
|
1522
1544
|
}
|
|
1523
1545
|
],
|
|
1524
1546
|
"credits": true,
|
|
1525
|
-
"version": "7.
|
|
1547
|
+
"version": "7.4.3",
|
|
1526
1548
|
"sitemaps": {
|
|
1527
1549
|
"sitemap.xml": {
|
|
1528
1550
|
"sitemapName": "sitemap.xml",
|
|
@@ -1540,7 +1562,7 @@ const _inlineRuntimeConfig = {
|
|
|
1540
1562
|
},
|
|
1541
1563
|
"content": {
|
|
1542
1564
|
"databaseVersion": "v3.5.0",
|
|
1543
|
-
"version": "3.
|
|
1565
|
+
"version": "3.6.3",
|
|
1544
1566
|
"database": {
|
|
1545
1567
|
"type": "sqlite",
|
|
1546
1568
|
"filename": "./contents.sqlite"
|
|
@@ -1828,15 +1850,15 @@ const _inlineRuntimeConfig = {
|
|
|
1828
1850
|
"_context": "package.json",
|
|
1829
1851
|
"_priority": -10,
|
|
1830
1852
|
"name": "nuxt-ignis",
|
|
1831
|
-
"description": "
|
|
1853
|
+
"description": "A ready-to-use setup for your next application in Nuxt"
|
|
1832
1854
|
}
|
|
1833
1855
|
],
|
|
1834
|
-
"version": "3.
|
|
1856
|
+
"version": "3.2.2",
|
|
1835
1857
|
"debug": false,
|
|
1836
1858
|
"multiTenancy": []
|
|
1837
1859
|
},
|
|
1838
1860
|
"nuxt-robots": {
|
|
1839
|
-
"version": "5.
|
|
1861
|
+
"version": "5.4.0",
|
|
1840
1862
|
"isNuxtContentV2": false,
|
|
1841
1863
|
"debug": false,
|
|
1842
1864
|
"credits": true,
|
|
@@ -1859,7 +1881,8 @@ const _inlineRuntimeConfig = {
|
|
|
1859
1881
|
"header": true,
|
|
1860
1882
|
"robotsEnabledValue": "index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",
|
|
1861
1883
|
"robotsDisabledValue": "noindex, nofollow",
|
|
1862
|
-
"cacheControl": "max-age=14400, must-revalidate"
|
|
1884
|
+
"cacheControl": "max-age=14400, must-revalidate",
|
|
1885
|
+
"botDetection": true
|
|
1863
1886
|
},
|
|
1864
1887
|
"ipx": {
|
|
1865
1888
|
"baseURL": "/_ipx",
|
|
@@ -1867,7 +1890,7 @@ const _inlineRuntimeConfig = {
|
|
|
1867
1890
|
"fs": {
|
|
1868
1891
|
"dir": [
|
|
1869
1892
|
"C:/Git/nuxt-ignis/core/public",
|
|
1870
|
-
"C:/Git/nuxt-ignis/core/node_modules/.pnpm/nuxt-spec@0.0.4_@types+
|
|
1893
|
+
"C:/Git/nuxt-ignis/core/node_modules/.pnpm/nuxt-spec@0.0.4_@types+debu_dbaf4d77b84c2665c87205cc14ddf373/node_modules/nuxt-spec/public"
|
|
1871
1894
|
]
|
|
1872
1895
|
},
|
|
1873
1896
|
"http": {
|
|
@@ -2082,6 +2105,10 @@ const errorHandler$0 = (async function errorhandler(error, event, { defaultHandl
|
|
|
2082
2105
|
}
|
|
2083
2106
|
const html = await res.text();
|
|
2084
2107
|
for (const [header, value] of res.headers.entries()) {
|
|
2108
|
+
if (header === "set-cookie") {
|
|
2109
|
+
appendResponseHeader(event, header, value);
|
|
2110
|
+
continue;
|
|
2111
|
+
}
|
|
2085
2112
|
setResponseHeader(event, header, value);
|
|
2086
2113
|
}
|
|
2087
2114
|
setResponseStatus(event, res.status && res.status !== 200 ? res.status : defaultRes.status, res.statusText || defaultRes.statusText);
|
|
@@ -2239,7 +2266,7 @@ if (!window.__NUXT_DEVTOOLS_TIME_METRIC__) {
|
|
|
2239
2266
|
window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
|
|
2240
2267
|
`;
|
|
2241
2268
|
|
|
2242
|
-
const
|
|
2269
|
+
const _BUwpELsyks45lroxlJ7pWDnbGcceJZF9mVl7VPNuPm4 = (function(nitro) {
|
|
2243
2270
|
nitro.hooks.hook("render:html", (htmlContext) => {
|
|
2244
2271
|
htmlContext.head.push(`<script>${script$1}<\/script>`);
|
|
2245
2272
|
});
|
|
@@ -2247,7 +2274,7 @@ const _4xtY69JUQXVdqRY6G89AKPM78rluyxVyS_yCYbfwz2o = (function(nitro) {
|
|
|
2247
2274
|
|
|
2248
2275
|
const rootDir = "C:/Git/nuxt-ignis/core";
|
|
2249
2276
|
|
|
2250
|
-
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":{}};
|
|
2277
|
+
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"};
|
|
2251
2278
|
|
|
2252
2279
|
const appRootTag = "div";
|
|
2253
2280
|
|
|
@@ -2264,7 +2291,7 @@ const devReducers = {
|
|
|
2264
2291
|
URL: (data) => data instanceof URL ? data.toString() : void 0
|
|
2265
2292
|
};
|
|
2266
2293
|
const asyncContext = getContext("nuxt-dev", { asyncContext: true, AsyncLocalStorage });
|
|
2267
|
-
const
|
|
2294
|
+
const __pERcNNWV1OaEgG7uvohNfb6mvznh4KNsVmRCE4aV0 = (nitroApp) => {
|
|
2268
2295
|
const handler = nitroApp.h3App.handler;
|
|
2269
2296
|
nitroApp.h3App.handler = (event) => {
|
|
2270
2297
|
return asyncContext.callAsync({ logs: [], event }, () => handler(event));
|
|
@@ -2425,7 +2452,7 @@ function useSiteConfig(e, _options) {
|
|
|
2425
2452
|
return e.context.siteConfig.get(options);
|
|
2426
2453
|
}
|
|
2427
2454
|
|
|
2428
|
-
const
|
|
2455
|
+
const _Z5botqEqNb56svWtJhyEDnS6Z4dk8BSBwZjYp1KssfI = defineNitroPlugin(async (nitroApp) => {
|
|
2429
2456
|
nitroApp.hooks.hook("render:html", async (ctx, { event }) => {
|
|
2430
2457
|
getRouteRules(event);
|
|
2431
2458
|
process.env.NUXT_COMPONENT_ISLANDS && event.path.startsWith("/__nuxt_island");
|
|
@@ -2439,12 +2466,364 @@ const _vFyUmRhrsoPWtOg8n3nI006gpGkcTXipKwGkXHyIU = defineNitroPlugin(async (nitr
|
|
|
2439
2466
|
});
|
|
2440
2467
|
});
|
|
2441
2468
|
|
|
2469
|
+
const KNOWN_SEARCH_BOTS = [
|
|
2470
|
+
{
|
|
2471
|
+
pattern: "googlebot",
|
|
2472
|
+
name: "googlebot",
|
|
2473
|
+
secondaryPatterns: ["google.com/bot.html"]
|
|
2474
|
+
},
|
|
2475
|
+
{
|
|
2476
|
+
pattern: "bingbot",
|
|
2477
|
+
name: "bingbot",
|
|
2478
|
+
secondaryPatterns: ["msnbot"]
|
|
2479
|
+
},
|
|
2480
|
+
{
|
|
2481
|
+
pattern: "yandexbot",
|
|
2482
|
+
name: "yandexbot"
|
|
2483
|
+
},
|
|
2484
|
+
{
|
|
2485
|
+
pattern: "baiduspider",
|
|
2486
|
+
name: "baiduspider",
|
|
2487
|
+
secondaryPatterns: ["baidu.com"]
|
|
2488
|
+
},
|
|
2489
|
+
{
|
|
2490
|
+
pattern: "duckduckbot",
|
|
2491
|
+
name: "duckduckbot",
|
|
2492
|
+
secondaryPatterns: ["duckduckgo.com"]
|
|
2493
|
+
},
|
|
2494
|
+
{
|
|
2495
|
+
pattern: "slurp",
|
|
2496
|
+
name: "yahoo"
|
|
2497
|
+
}
|
|
2498
|
+
];
|
|
2499
|
+
const SOCIAL_BOTS = [
|
|
2500
|
+
{
|
|
2501
|
+
pattern: "twitterbot",
|
|
2502
|
+
name: "twitter",
|
|
2503
|
+
secondaryPatterns: ["twitter"]
|
|
2504
|
+
},
|
|
2505
|
+
{
|
|
2506
|
+
pattern: "facebookexternalhit",
|
|
2507
|
+
name: "facebook",
|
|
2508
|
+
secondaryPatterns: ["facebook.com"]
|
|
2509
|
+
},
|
|
2510
|
+
{
|
|
2511
|
+
pattern: "linkedinbot",
|
|
2512
|
+
name: "linkedin",
|
|
2513
|
+
secondaryPatterns: ["linkedin"]
|
|
2514
|
+
},
|
|
2515
|
+
{
|
|
2516
|
+
pattern: "pinterestbot",
|
|
2517
|
+
name: "pinterest",
|
|
2518
|
+
secondaryPatterns: ["pinterest"]
|
|
2519
|
+
},
|
|
2520
|
+
{
|
|
2521
|
+
pattern: "discordbot",
|
|
2522
|
+
name: "discord",
|
|
2523
|
+
secondaryPatterns: ["discordapp"]
|
|
2524
|
+
}
|
|
2525
|
+
];
|
|
2526
|
+
const SEO_BOTS = [
|
|
2527
|
+
{
|
|
2528
|
+
pattern: "mj12bot",
|
|
2529
|
+
name: "majestic12",
|
|
2530
|
+
secondaryPatterns: ["majestic12.co.uk/bot"]
|
|
2531
|
+
},
|
|
2532
|
+
{
|
|
2533
|
+
pattern: "ahrefsbot",
|
|
2534
|
+
name: "ahrefs",
|
|
2535
|
+
secondaryPatterns: ["ahrefs.com"]
|
|
2536
|
+
},
|
|
2537
|
+
{
|
|
2538
|
+
pattern: "semrushbot",
|
|
2539
|
+
name: "semrush",
|
|
2540
|
+
secondaryPatterns: ["semrush.com/bot"]
|
|
2541
|
+
},
|
|
2542
|
+
{
|
|
2543
|
+
pattern: "screaming frog",
|
|
2544
|
+
name: "screaming-frog",
|
|
2545
|
+
secondaryPatterns: ["screamingfrog.co.uk"]
|
|
2546
|
+
},
|
|
2547
|
+
{
|
|
2548
|
+
pattern: "rogerbot",
|
|
2549
|
+
name: "moz"
|
|
2550
|
+
}
|
|
2551
|
+
];
|
|
2552
|
+
const AI_BOTS = [
|
|
2553
|
+
{
|
|
2554
|
+
pattern: "anthropic",
|
|
2555
|
+
name: "anthropic"
|
|
2556
|
+
},
|
|
2557
|
+
{
|
|
2558
|
+
pattern: "claude",
|
|
2559
|
+
name: "claude"
|
|
2560
|
+
},
|
|
2561
|
+
{
|
|
2562
|
+
pattern: "gptbot",
|
|
2563
|
+
name: "gpt",
|
|
2564
|
+
secondaryPatterns: ["openai.com"]
|
|
2565
|
+
},
|
|
2566
|
+
{
|
|
2567
|
+
pattern: "googlebot-news",
|
|
2568
|
+
name: "google-news"
|
|
2569
|
+
},
|
|
2570
|
+
{
|
|
2571
|
+
pattern: "cohere",
|
|
2572
|
+
name: "cohere",
|
|
2573
|
+
secondaryPatterns: ["cohere.com"]
|
|
2574
|
+
},
|
|
2575
|
+
{
|
|
2576
|
+
pattern: "ccbot",
|
|
2577
|
+
name: "commoncrawl",
|
|
2578
|
+
secondaryPatterns: ["commoncrawl.org"]
|
|
2579
|
+
},
|
|
2580
|
+
{
|
|
2581
|
+
pattern: "perplexitybot",
|
|
2582
|
+
name: "perplexity",
|
|
2583
|
+
secondaryPatterns: ["perplexity.ai"]
|
|
2584
|
+
}
|
|
2585
|
+
];
|
|
2586
|
+
const HTTP_TOOL_BOTS = [
|
|
2587
|
+
{
|
|
2588
|
+
pattern: "python-requests",
|
|
2589
|
+
name: "requests",
|
|
2590
|
+
secondaryPatterns: ["python"]
|
|
2591
|
+
},
|
|
2592
|
+
{
|
|
2593
|
+
pattern: "wget",
|
|
2594
|
+
name: "wget"
|
|
2595
|
+
},
|
|
2596
|
+
{
|
|
2597
|
+
pattern: "curl",
|
|
2598
|
+
name: "curl",
|
|
2599
|
+
secondaryPatterns: ["curl"]
|
|
2600
|
+
}
|
|
2601
|
+
];
|
|
2602
|
+
const SECURITY_SCANNING_BOTS = [
|
|
2603
|
+
{
|
|
2604
|
+
pattern: "zgrab",
|
|
2605
|
+
name: "zgrab"
|
|
2606
|
+
},
|
|
2607
|
+
{
|
|
2608
|
+
pattern: "masscan",
|
|
2609
|
+
name: "masscan"
|
|
2610
|
+
},
|
|
2611
|
+
{
|
|
2612
|
+
pattern: "nmap",
|
|
2613
|
+
name: "nmap",
|
|
2614
|
+
secondaryPatterns: ["insecure.org"]
|
|
2615
|
+
},
|
|
2616
|
+
{
|
|
2617
|
+
pattern: "nikto",
|
|
2618
|
+
name: "nikto"
|
|
2619
|
+
},
|
|
2620
|
+
{
|
|
2621
|
+
pattern: "wpscan",
|
|
2622
|
+
name: "wpscan"
|
|
2623
|
+
}
|
|
2624
|
+
];
|
|
2625
|
+
const SCRAPING_BOTS = [
|
|
2626
|
+
{
|
|
2627
|
+
pattern: "scrapy",
|
|
2628
|
+
name: "scrapy",
|
|
2629
|
+
secondaryPatterns: ["scrapy.org"]
|
|
2630
|
+
}
|
|
2631
|
+
];
|
|
2632
|
+
const AUTOMATION_BOTS = [
|
|
2633
|
+
{
|
|
2634
|
+
pattern: "phantomjs",
|
|
2635
|
+
name: "phantomjs"
|
|
2636
|
+
},
|
|
2637
|
+
{
|
|
2638
|
+
pattern: "headless",
|
|
2639
|
+
name: "headless-browser"
|
|
2640
|
+
},
|
|
2641
|
+
{
|
|
2642
|
+
pattern: "playwright",
|
|
2643
|
+
name: "playwright"
|
|
2644
|
+
},
|
|
2645
|
+
{
|
|
2646
|
+
pattern: "selenium",
|
|
2647
|
+
name: "selenium",
|
|
2648
|
+
secondaryPatterns: ["webdriver"]
|
|
2649
|
+
},
|
|
2650
|
+
{
|
|
2651
|
+
pattern: "puppeteer",
|
|
2652
|
+
name: "puppeteer",
|
|
2653
|
+
secondaryPatterns: ["headless"]
|
|
2654
|
+
}
|
|
2655
|
+
];
|
|
2656
|
+
const GENERIC_BOTS = [
|
|
2657
|
+
{
|
|
2658
|
+
pattern: "bot",
|
|
2659
|
+
name: "generic-bot"
|
|
2660
|
+
},
|
|
2661
|
+
{
|
|
2662
|
+
pattern: "spider",
|
|
2663
|
+
name: "generic-spider"
|
|
2664
|
+
},
|
|
2665
|
+
{
|
|
2666
|
+
pattern: "crawler",
|
|
2667
|
+
name: "generic-crawler"
|
|
2668
|
+
},
|
|
2669
|
+
{
|
|
2670
|
+
pattern: "scraper",
|
|
2671
|
+
name: "generic-scraper"
|
|
2672
|
+
}
|
|
2673
|
+
];
|
|
2674
|
+
const BOT_MAP = [
|
|
2675
|
+
{
|
|
2676
|
+
type: "search-engine",
|
|
2677
|
+
bots: KNOWN_SEARCH_BOTS,
|
|
2678
|
+
trusted: true
|
|
2679
|
+
},
|
|
2680
|
+
{
|
|
2681
|
+
type: "social",
|
|
2682
|
+
bots: SOCIAL_BOTS,
|
|
2683
|
+
trusted: true
|
|
2684
|
+
},
|
|
2685
|
+
{
|
|
2686
|
+
type: "seo",
|
|
2687
|
+
bots: SEO_BOTS,
|
|
2688
|
+
trusted: true
|
|
2689
|
+
},
|
|
2690
|
+
{
|
|
2691
|
+
type: "ai",
|
|
2692
|
+
bots: AI_BOTS,
|
|
2693
|
+
trusted: true
|
|
2694
|
+
},
|
|
2695
|
+
{
|
|
2696
|
+
type: "generic",
|
|
2697
|
+
bots: GENERIC_BOTS,
|
|
2698
|
+
trusted: false
|
|
2699
|
+
},
|
|
2700
|
+
{
|
|
2701
|
+
type: "automation",
|
|
2702
|
+
bots: AUTOMATION_BOTS,
|
|
2703
|
+
trusted: false
|
|
2704
|
+
},
|
|
2705
|
+
{
|
|
2706
|
+
type: "http-tool",
|
|
2707
|
+
bots: HTTP_TOOL_BOTS,
|
|
2708
|
+
trusted: false
|
|
2709
|
+
},
|
|
2710
|
+
{
|
|
2711
|
+
type: "security-scanner",
|
|
2712
|
+
bots: SECURITY_SCANNING_BOTS,
|
|
2713
|
+
trusted: false
|
|
2714
|
+
},
|
|
2715
|
+
{
|
|
2716
|
+
type: "scraping",
|
|
2717
|
+
bots: SCRAPING_BOTS,
|
|
2718
|
+
trusted: false
|
|
2719
|
+
}
|
|
2720
|
+
];
|
|
2721
|
+
function matches(pattern, path) {
|
|
2722
|
+
const pathLength = path.length;
|
|
2723
|
+
const patternLength = pattern.length;
|
|
2724
|
+
const matchingLengths = Array.from({ length: pathLength + 1 }).fill(0);
|
|
2725
|
+
let numMatchingLengths = 1;
|
|
2726
|
+
let p = 0;
|
|
2727
|
+
while (p < patternLength) {
|
|
2728
|
+
if (pattern[p] === "$" && p + 1 === patternLength) {
|
|
2729
|
+
return matchingLengths[numMatchingLengths - 1] === pathLength;
|
|
2730
|
+
}
|
|
2731
|
+
if (pattern[p] === "*") {
|
|
2732
|
+
numMatchingLengths = pathLength - matchingLengths[0] + 1;
|
|
2733
|
+
for (let i = 1; i < numMatchingLengths; i++) {
|
|
2734
|
+
matchingLengths[i] = matchingLengths[i - 1] + 1;
|
|
2735
|
+
}
|
|
2736
|
+
} else {
|
|
2737
|
+
let numMatches = 0;
|
|
2738
|
+
for (let i = 0; i < numMatchingLengths; i++) {
|
|
2739
|
+
const matchLength = matchingLengths[i];
|
|
2740
|
+
if (matchLength < pathLength && path[matchLength] === pattern[p]) {
|
|
2741
|
+
matchingLengths[numMatches++] = matchLength + 1;
|
|
2742
|
+
}
|
|
2743
|
+
}
|
|
2744
|
+
if (numMatches === 0) {
|
|
2745
|
+
return false;
|
|
2746
|
+
}
|
|
2747
|
+
numMatchingLengths = numMatches;
|
|
2748
|
+
}
|
|
2749
|
+
p++;
|
|
2750
|
+
}
|
|
2751
|
+
return true;
|
|
2752
|
+
}
|
|
2753
|
+
function matchPathToRule(path, _rules) {
|
|
2754
|
+
let matchedRule = null;
|
|
2755
|
+
const rules = _rules.filter(Boolean);
|
|
2756
|
+
const rulesLength = rules.length;
|
|
2757
|
+
let i = 0;
|
|
2758
|
+
while (i < rulesLength) {
|
|
2759
|
+
const rule = rules[i];
|
|
2760
|
+
if (!rule || !matches(rule.pattern, path)) {
|
|
2761
|
+
i++;
|
|
2762
|
+
continue;
|
|
2763
|
+
}
|
|
2764
|
+
if (!matchedRule || rule.pattern.length > matchedRule.pattern.length) {
|
|
2765
|
+
matchedRule = rule;
|
|
2766
|
+
} else if (rule.pattern.length === matchedRule.pattern.length && rule.allow && !matchedRule.allow) {
|
|
2767
|
+
matchedRule = rule;
|
|
2768
|
+
}
|
|
2769
|
+
i++;
|
|
2770
|
+
}
|
|
2771
|
+
return matchedRule;
|
|
2772
|
+
}
|
|
2773
|
+
function asArray(v) {
|
|
2774
|
+
return typeof v === "undefined" ? [] : Array.isArray(v) ? v : [v];
|
|
2775
|
+
}
|
|
2776
|
+
function generateRobotsTxt({ groups, sitemaps }) {
|
|
2777
|
+
const lines = [];
|
|
2778
|
+
for (const group of groups) {
|
|
2779
|
+
for (const comment of group.comment || [])
|
|
2780
|
+
lines.push(`# ${comment}`);
|
|
2781
|
+
for (const userAgent of group.userAgent || ["*"])
|
|
2782
|
+
lines.push(`User-agent: ${userAgent}`);
|
|
2783
|
+
for (const allow of group.allow || [])
|
|
2784
|
+
lines.push(`Allow: ${allow}`);
|
|
2785
|
+
for (const disallow of group.disallow || [])
|
|
2786
|
+
lines.push(`Disallow: ${disallow}`);
|
|
2787
|
+
for (const cleanParam of group.cleanParam || [])
|
|
2788
|
+
lines.push(`Clean-param: ${cleanParam}`);
|
|
2789
|
+
lines.push("");
|
|
2790
|
+
}
|
|
2791
|
+
for (const sitemap of sitemaps)
|
|
2792
|
+
lines.push(`Sitemap: ${sitemap}`);
|
|
2793
|
+
return lines.join("\n");
|
|
2794
|
+
}
|
|
2795
|
+
createDefu((obj, key, value) => {
|
|
2796
|
+
if (Array.isArray(obj[key]) && Array.isArray(value))
|
|
2797
|
+
obj[key] = Array.from(/* @__PURE__ */ new Set([...obj[key], ...value]));
|
|
2798
|
+
return obj[key];
|
|
2799
|
+
});
|
|
2800
|
+
function createPatternMap() {
|
|
2801
|
+
const patternMap = /* @__PURE__ */ new Map();
|
|
2802
|
+
for (const def of BOT_MAP) {
|
|
2803
|
+
for (const bot of def.bots) {
|
|
2804
|
+
const patterns = [bot.pattern, ...bot.secondaryPatterns || []];
|
|
2805
|
+
for (const pattern of patterns) {
|
|
2806
|
+
patternMap.set(pattern.toLowerCase(), {
|
|
2807
|
+
botName: bot.name,
|
|
2808
|
+
botCategory: def.type,
|
|
2809
|
+
trusted: def.trusted
|
|
2810
|
+
});
|
|
2811
|
+
}
|
|
2812
|
+
}
|
|
2813
|
+
}
|
|
2814
|
+
return patternMap;
|
|
2815
|
+
}
|
|
2816
|
+
|
|
2817
|
+
function useRuntimeConfigNuxtRobots(event) {
|
|
2818
|
+
return useRuntimeConfig(event)["nuxt-robots"];
|
|
2819
|
+
}
|
|
2820
|
+
|
|
2442
2821
|
const logger$1 = createConsola({
|
|
2443
2822
|
defaults: { tag: "@nuxtjs/robots" }
|
|
2444
2823
|
});
|
|
2445
2824
|
|
|
2446
2825
|
async function resolveRobotsTxtContext(e, nitro = useNitroApp()) {
|
|
2447
|
-
const { groups, sitemap: sitemaps } =
|
|
2826
|
+
const { groups, sitemap: sitemaps } = useRuntimeConfigNuxtRobots(e);
|
|
2448
2827
|
const generateRobotsTxtCtx = {
|
|
2449
2828
|
event: e,
|
|
2450
2829
|
context: e ? "robots.txt" : "init",
|
|
@@ -2455,8 +2834,11 @@ async function resolveRobotsTxtContext(e, nitro = useNitroApp()) {
|
|
|
2455
2834
|
return generateRobotsTxtCtx;
|
|
2456
2835
|
}
|
|
2457
2836
|
|
|
2458
|
-
const
|
|
2459
|
-
const { isNuxtContentV2, robotsDisabledValue } =
|
|
2837
|
+
const __N1t3ZNCULqwSjGoVUR2rCd_NNid2x4qNEWZGlFs8vY = defineNitroPlugin(async (nitroApp) => {
|
|
2838
|
+
const { isNuxtContentV2, robotsDisabledValue, botDetection } = useRuntimeConfigNuxtRobots();
|
|
2839
|
+
if (botDetection !== false) {
|
|
2840
|
+
nitroApp._robotsPatternMap = createPatternMap();
|
|
2841
|
+
}
|
|
2460
2842
|
nitroApp._robots = {};
|
|
2461
2843
|
await resolveRobotsTxtContext(void 0, nitroApp);
|
|
2462
2844
|
const nuxtContentUrls = /* @__PURE__ */ new Set();
|
|
@@ -2911,7 +3293,7 @@ async function getSQLIfAllowed() {
|
|
|
2911
3293
|
}
|
|
2912
3294
|
|
|
2913
3295
|
const checksums = {
|
|
2914
|
-
"content": "v3.5.0--
|
|
3296
|
+
"content": "v3.5.0--bgIYhpjRuV8zbHJE_CfelwKpJ_Td6YuGJwixiek8lmI"
|
|
2915
3297
|
};
|
|
2916
3298
|
const checksumsStructure = {
|
|
2917
3299
|
"content": "bgIYhpjRuV8zbHJE_CfelwKpJ_Td6YuGJwixiek8lmI"
|
|
@@ -2925,15 +3307,15 @@ const contentManifest = {
|
|
|
2925
3307
|
"type": "page",
|
|
2926
3308
|
"fields": {
|
|
2927
3309
|
"id": "string",
|
|
2928
|
-
"
|
|
3310
|
+
"title": "string",
|
|
3311
|
+
"body": "json",
|
|
3312
|
+
"description": "string",
|
|
2929
3313
|
"extension": "string",
|
|
2930
3314
|
"meta": "json",
|
|
3315
|
+
"navigation": "json",
|
|
2931
3316
|
"path": "string",
|
|
2932
|
-
"title": "string",
|
|
2933
|
-
"description": "string",
|
|
2934
3317
|
"seo": "json",
|
|
2935
|
-
"
|
|
2936
|
-
"navigation": "json"
|
|
3318
|
+
"stem": "string"
|
|
2937
3319
|
}
|
|
2938
3320
|
},
|
|
2939
3321
|
"info": {
|
|
@@ -3095,17 +3477,23 @@ function singleQuote(value) {
|
|
|
3095
3477
|
}
|
|
3096
3478
|
|
|
3097
3479
|
async function fetchDatabase(event, collection) {
|
|
3098
|
-
return await $fetch(`/__nuxt_content/${collection}/sql_dump`, {
|
|
3480
|
+
return await $fetch(`/__nuxt_content/${collection}/sql_dump.txt`, {
|
|
3099
3481
|
context: event ? { cloudflare: event.context.cloudflare } : {},
|
|
3100
3482
|
responseType: "text",
|
|
3101
|
-
headers: {
|
|
3483
|
+
headers: {
|
|
3484
|
+
"content-type": "text/plain",
|
|
3485
|
+
...event?.node?.req?.headers?.cookie ? { cookie: event.node.req.headers.cookie } : {}
|
|
3486
|
+
},
|
|
3102
3487
|
query: { v: checksums[String(collection)], t: Date.now() }
|
|
3103
3488
|
});
|
|
3104
3489
|
}
|
|
3105
3490
|
async function fetchQuery(event, collection, sql) {
|
|
3106
3491
|
return await $fetch(`/__nuxt_content/${collection}/query`, {
|
|
3107
3492
|
context: event ? { cloudflare: event.context.cloudflare } : {},
|
|
3108
|
-
headers: {
|
|
3493
|
+
headers: {
|
|
3494
|
+
"content-type": "application/json",
|
|
3495
|
+
...event?.node?.req?.headers?.cookie ? { cookie: event.node.req.headers.cookie } : {}
|
|
3496
|
+
},
|
|
3109
3497
|
query: { v: checksums[String(collection)], t: Date.now() },
|
|
3110
3498
|
method: "POST",
|
|
3111
3499
|
body: {
|
|
@@ -3114,7 +3502,7 @@ async function fetchQuery(event, collection, sql) {
|
|
|
3114
3502
|
});
|
|
3115
3503
|
}
|
|
3116
3504
|
|
|
3117
|
-
const
|
|
3505
|
+
const queryCollection = (event, collection) => {
|
|
3118
3506
|
return collectionQueryBuilder(collection, (collection2, sql) => fetchQuery(event, collection2, sql));
|
|
3119
3507
|
};
|
|
3120
3508
|
|
|
@@ -3322,104 +3710,28 @@ function withSiteUrl(e, path, options = {}) {
|
|
|
3322
3710
|
});
|
|
3323
3711
|
}
|
|
3324
3712
|
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
let numMatches = 0;
|
|
3342
|
-
for (let i = 0; i < numMatchingLengths; i++) {
|
|
3343
|
-
const matchLength = matchingLengths[i];
|
|
3344
|
-
if (matchLength < pathLength && path[matchLength] === pattern[p]) {
|
|
3345
|
-
matchingLengths[numMatches++] = matchLength + 1;
|
|
3346
|
-
}
|
|
3347
|
-
}
|
|
3348
|
-
if (numMatches === 0) {
|
|
3349
|
-
return false;
|
|
3350
|
-
}
|
|
3351
|
-
numMatchingLengths = numMatches;
|
|
3352
|
-
}
|
|
3353
|
-
p++;
|
|
3354
|
-
}
|
|
3355
|
-
return true;
|
|
3356
|
-
}
|
|
3357
|
-
function matchPathToRule(path, _rules) {
|
|
3358
|
-
let matchedRule = null;
|
|
3359
|
-
const rules = _rules.filter(Boolean);
|
|
3360
|
-
const rulesLength = rules.length;
|
|
3361
|
-
let i = 0;
|
|
3362
|
-
while (i < rulesLength) {
|
|
3363
|
-
const rule = rules[i];
|
|
3364
|
-
if (!matches(rule.pattern, path)) {
|
|
3365
|
-
i++;
|
|
3366
|
-
continue;
|
|
3367
|
-
}
|
|
3368
|
-
if (!matchedRule || rule.pattern.length > matchedRule.pattern.length) {
|
|
3369
|
-
matchedRule = rule;
|
|
3370
|
-
} else if (rule.pattern.length === matchedRule.pattern.length && rule.allow && !matchedRule.allow) {
|
|
3371
|
-
matchedRule = rule;
|
|
3372
|
-
}
|
|
3373
|
-
i++;
|
|
3374
|
-
}
|
|
3375
|
-
return matchedRule;
|
|
3376
|
-
}
|
|
3377
|
-
function asArray(v) {
|
|
3378
|
-
return typeof v === "undefined" ? [] : Array.isArray(v) ? v : [v];
|
|
3713
|
+
const ROBOT_DIRECTIVE_VALUES = {
|
|
3714
|
+
// Standard directives
|
|
3715
|
+
enabled: "index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",
|
|
3716
|
+
disabled: "noindex, nofollow",
|
|
3717
|
+
index: "index",
|
|
3718
|
+
noindex: "noindex",
|
|
3719
|
+
follow: "follow",
|
|
3720
|
+
nofollow: "nofollow",
|
|
3721
|
+
none: "none",
|
|
3722
|
+
all: "all",
|
|
3723
|
+
// Non-standard directives (not part of official robots spec)
|
|
3724
|
+
noai: "noai",
|
|
3725
|
+
noimageai: "noimageai"
|
|
3726
|
+
};
|
|
3727
|
+
function formatMaxImagePreview(value) {
|
|
3728
|
+
return `max-image-preview:${value}`;
|
|
3379
3729
|
}
|
|
3380
|
-
function
|
|
3381
|
-
|
|
3382
|
-
for (const group of groups) {
|
|
3383
|
-
for (const comment of group.comment || [])
|
|
3384
|
-
lines.push(`# ${comment}`);
|
|
3385
|
-
for (const userAgent of group.userAgent || ["*"])
|
|
3386
|
-
lines.push(`User-agent: ${userAgent}`);
|
|
3387
|
-
for (const allow of group.allow || [])
|
|
3388
|
-
lines.push(`Allow: ${allow}`);
|
|
3389
|
-
for (const disallow of group.disallow || [])
|
|
3390
|
-
lines.push(`Disallow: ${disallow}`);
|
|
3391
|
-
for (const cleanParam of group.cleanParam || [])
|
|
3392
|
-
lines.push(`Clean-param: ${cleanParam}`);
|
|
3393
|
-
lines.push("");
|
|
3394
|
-
}
|
|
3395
|
-
for (const sitemap of sitemaps)
|
|
3396
|
-
lines.push(`Sitemap: ${sitemap}`);
|
|
3397
|
-
return lines.join("\n");
|
|
3730
|
+
function formatMaxSnippet(value) {
|
|
3731
|
+
return `max-snippet:${value}`;
|
|
3398
3732
|
}
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
obj[key] = Array.from(/* @__PURE__ */ new Set([...obj[key], ...value]));
|
|
3402
|
-
return obj[key];
|
|
3403
|
-
});
|
|
3404
|
-
function normaliseRobotsRouteRule(config) {
|
|
3405
|
-
let allow;
|
|
3406
|
-
if (typeof config.robots === "boolean")
|
|
3407
|
-
allow = config.robots;
|
|
3408
|
-
else if (typeof config.robots === "object" && typeof config.robots.indexable !== "undefined")
|
|
3409
|
-
allow = config.robots.indexable;
|
|
3410
|
-
let rule;
|
|
3411
|
-
if (typeof config.robots === "object" && typeof config.robots.rule !== "undefined")
|
|
3412
|
-
rule = config.robots.rule;
|
|
3413
|
-
else if (typeof config.robots === "string")
|
|
3414
|
-
rule = config.robots;
|
|
3415
|
-
if (rule && !allow)
|
|
3416
|
-
allow = rule !== "none" && !rule.includes("noindex");
|
|
3417
|
-
if (typeof allow === "undefined" && typeof rule === "undefined")
|
|
3418
|
-
return;
|
|
3419
|
-
return {
|
|
3420
|
-
allow,
|
|
3421
|
-
rule
|
|
3422
|
-
};
|
|
3733
|
+
function formatMaxVideoPreview(value) {
|
|
3734
|
+
return `max-video-preview:${value}`;
|
|
3423
3735
|
}
|
|
3424
3736
|
|
|
3425
3737
|
function withoutQuery$1(path) {
|
|
@@ -3442,10 +3754,56 @@ function createNitroRouteRuleMatcher$1(e) {
|
|
|
3442
3754
|
};
|
|
3443
3755
|
}
|
|
3444
3756
|
|
|
3757
|
+
function normaliseRobotsRouteRule(config) {
|
|
3758
|
+
let allow;
|
|
3759
|
+
if (typeof config.robots === "boolean")
|
|
3760
|
+
allow = config.robots;
|
|
3761
|
+
else if (typeof config.robots === "object" && "indexable" in config.robots && typeof config.robots.indexable !== "undefined")
|
|
3762
|
+
allow = config.robots.indexable;
|
|
3763
|
+
let rule;
|
|
3764
|
+
if (typeof config.robots === "object" && config.robots !== null) {
|
|
3765
|
+
if ("rule" in config.robots && typeof config.robots.rule !== "undefined") {
|
|
3766
|
+
rule = config.robots.rule;
|
|
3767
|
+
} else if (!("indexable" in config.robots)) {
|
|
3768
|
+
const directives = [];
|
|
3769
|
+
for (const [key, value] of Object.entries(config.robots)) {
|
|
3770
|
+
if (value === false || value === null || value === void 0)
|
|
3771
|
+
continue;
|
|
3772
|
+
if (key in ROBOT_DIRECTIVE_VALUES && typeof value === "boolean" && value) {
|
|
3773
|
+
directives.push(ROBOT_DIRECTIVE_VALUES[key]);
|
|
3774
|
+
} else if (key === "max-image-preview" && typeof value === "string") {
|
|
3775
|
+
directives.push(formatMaxImagePreview(value));
|
|
3776
|
+
} else if (key === "max-snippet" && typeof value === "number") {
|
|
3777
|
+
directives.push(formatMaxSnippet(value));
|
|
3778
|
+
} else if (key === "max-video-preview" && typeof value === "number") {
|
|
3779
|
+
directives.push(formatMaxVideoPreview(value));
|
|
3780
|
+
}
|
|
3781
|
+
}
|
|
3782
|
+
if (directives.length > 0) {
|
|
3783
|
+
rule = directives.join(", ");
|
|
3784
|
+
}
|
|
3785
|
+
}
|
|
3786
|
+
} else if (typeof config.robots === "string") {
|
|
3787
|
+
rule = config.robots;
|
|
3788
|
+
}
|
|
3789
|
+
if (rule && typeof allow === "undefined") {
|
|
3790
|
+
const disallowIndicators = ["none", "noindex", "noai", "noimageai"];
|
|
3791
|
+
allow = !disallowIndicators.some(
|
|
3792
|
+
(indicator) => rule === indicator || rule.split(",").some((part) => part.trim() === indicator)
|
|
3793
|
+
);
|
|
3794
|
+
}
|
|
3795
|
+
if (typeof allow === "undefined" && typeof rule === "undefined")
|
|
3796
|
+
return;
|
|
3797
|
+
return {
|
|
3798
|
+
allow,
|
|
3799
|
+
rule
|
|
3800
|
+
};
|
|
3801
|
+
}
|
|
3802
|
+
|
|
3445
3803
|
function getSiteRobotConfig(e) {
|
|
3446
3804
|
const query = getQuery$1(e);
|
|
3447
3805
|
const hints = [];
|
|
3448
|
-
const { groups, debug } =
|
|
3806
|
+
const { groups, debug } = useRuntimeConfigNuxtRobots(e);
|
|
3449
3807
|
let indexable = getSiteIndexable(e);
|
|
3450
3808
|
const queryIndexableEnabled = String(query.mockProductionEnv) === "true" || query.mockProductionEnv === "";
|
|
3451
3809
|
{
|
|
@@ -3474,7 +3832,7 @@ function getSiteRobotConfig(e) {
|
|
|
3474
3832
|
|
|
3475
3833
|
function getPathRobotConfig(e, options) {
|
|
3476
3834
|
const runtimeConfig = useRuntimeConfig(e);
|
|
3477
|
-
const { robotsDisabledValue, robotsEnabledValue, isNuxtContentV2 } =
|
|
3835
|
+
const { robotsDisabledValue, robotsEnabledValue, isNuxtContentV2 } = useRuntimeConfigNuxtRobots(e);
|
|
3478
3836
|
if (!options?.skipSiteIndexable) {
|
|
3479
3837
|
if (!getSiteRobotConfig(e).indexable) {
|
|
3480
3838
|
return {
|
|
@@ -3517,7 +3875,7 @@ function getPathRobotConfig(e, options) {
|
|
|
3517
3875
|
}
|
|
3518
3876
|
};
|
|
3519
3877
|
}
|
|
3520
|
-
const robotsTxtRule = matchPathToRule(path, group._rules);
|
|
3878
|
+
const robotsTxtRule = matchPathToRule(path, group._rules || []);
|
|
3521
3879
|
if (robotsTxtRule) {
|
|
3522
3880
|
if (!robotsTxtRule.allow) {
|
|
3523
3881
|
return {
|
|
@@ -3541,7 +3899,7 @@ function getPathRobotConfig(e, options) {
|
|
|
3541
3899
|
}
|
|
3542
3900
|
};
|
|
3543
3901
|
}
|
|
3544
|
-
nitroApp.
|
|
3902
|
+
nitroApp._robotsRuleMatcher = nitroApp._robotsRuleMatcher || createNitroRouteRuleMatcher$1(e);
|
|
3545
3903
|
let routeRulesPath = path;
|
|
3546
3904
|
if (runtimeConfig.public?.i18n?.locales) {
|
|
3547
3905
|
const { locales } = runtimeConfig.public.i18n;
|
|
@@ -3550,10 +3908,10 @@ function getPathRobotConfig(e, options) {
|
|
|
3550
3908
|
routeRulesPath = routeRulesPath.replace(`/${locale.code}`, "");
|
|
3551
3909
|
}
|
|
3552
3910
|
}
|
|
3553
|
-
const routeRules = normaliseRobotsRouteRule(nitroApp.
|
|
3911
|
+
const routeRules = normaliseRobotsRouteRule(nitroApp._robotsRuleMatcher(routeRulesPath));
|
|
3554
3912
|
if (routeRules && (typeof routeRules.allow !== "undefined" || typeof routeRules.rule !== "undefined")) {
|
|
3555
3913
|
return {
|
|
3556
|
-
indexable: routeRules.allow,
|
|
3914
|
+
indexable: routeRules.allow ?? false,
|
|
3557
3915
|
rule: routeRules.rule || (routeRules.allow ? robotsEnabledValue : robotsDisabledValue),
|
|
3558
3916
|
debug: {
|
|
3559
3917
|
source: "Route Rules"
|
|
@@ -3760,7 +4118,7 @@ function backwardsCompatibleSecurity(securityHeaders) {
|
|
|
3760
4118
|
return securityHeadersAsObject;
|
|
3761
4119
|
}
|
|
3762
4120
|
|
|
3763
|
-
const
|
|
4121
|
+
const _bhMjw8GUQRBOh08y1gcApVwqgcuV_Ay88JuONtrFNE = defineNitroPlugin(async (nitroApp) => {
|
|
3764
4122
|
const appSecurityOptions = getAppSecurityOptions();
|
|
3765
4123
|
const runtimeConfig = useRuntimeConfig();
|
|
3766
4124
|
for (const route in runtimeConfig.nitro.routeRules) {
|
|
@@ -3804,11 +4162,11 @@ const _JvOSxtiYN5RhTtiWK4gP6Qxjgh3Y8HYwNigx1wgQzE0 = defineNitroPlugin(async (ni
|
|
|
3804
4162
|
await nitroApp.hooks.callHook("nuxt-security:ready");
|
|
3805
4163
|
});
|
|
3806
4164
|
|
|
3807
|
-
const sriHashes = {"/_nuxt/builds/meta/dev.json":"sha384
|
|
4165
|
+
const sriHashes = {"/_nuxt/builds/meta/dev.json":"sha384-+xgR0t5BWUZLaa0is19Xv7bl4T6SugEejeruTlXpKi36anxR8eJCBoO5aTA1E6fi","/_nuxt/builds/latest.json":"sha384-OQzkdyTtFgBXlJA68NEmNSKCnE3s+ZCXqOHq2A0ikseGlvyyreuXffoahEUtyM8J","/_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-ReKa9RZNgEv0mkJHvGqfucC7zBljR+iZ+DyYIRDezmxGlfOGQtyzH5FkIVs4PCaF","/nuxt-spec.png":"sha384-lqerIwfMImy74T5uRR9ogeRAvkGehx21V4QBTVB0a6Zp+2VTFMZmjOtNAAti72LU"};
|
|
3808
4166
|
|
|
3809
4167
|
const SCRIPT_RE$1 = /<script((?=[^>]+\bsrc="([^"]+)")(?![^>]+\bintegrity="[^"]+")[^>]+)(?:\/>|><\/script>)/g;
|
|
3810
4168
|
const LINK_RE$1 = /<link((?=[^>]+\brel="(?:stylesheet|preload|modulepreload)")(?=[^>]+\bhref="([^"]+)")(?![^>]+\bintegrity="[\w\-+/=]+")[^>]+)>/g;
|
|
3811
|
-
const
|
|
4169
|
+
const _LUEXAZKBV0ePPfOhSg_6JUQdyilTeQaim2YKwW8 = defineNitroPlugin((nitroApp) => {
|
|
3812
4170
|
nitroApp.hooks.hook("render:html", (html, { event }) => {
|
|
3813
4171
|
const rules = resolveSecurityRules(event);
|
|
3814
4172
|
if (!rules.enabled || !rules.sri) {
|
|
@@ -3852,7 +4210,7 @@ function generateRandomNonce() {
|
|
|
3852
4210
|
return nonce;
|
|
3853
4211
|
}
|
|
3854
4212
|
|
|
3855
|
-
const
|
|
4213
|
+
const _UcTOs1Ung7KfBGkFiid8OwKa_mCxxlEiLE15hP_nP8 = defineNitroPlugin((nitroApp) => {
|
|
3856
4214
|
{
|
|
3857
4215
|
return;
|
|
3858
4216
|
}
|
|
@@ -3862,7 +4220,7 @@ const LINK_RE = /<link([^>]*?>)/gi;
|
|
|
3862
4220
|
const NONCE_RE = /nonce="[^"]+"/i;
|
|
3863
4221
|
const SCRIPT_RE = /<script([^>]*?>)/gi;
|
|
3864
4222
|
const STYLE_RE = /<style([^>]*?>)/gi;
|
|
3865
|
-
const
|
|
4223
|
+
const _1TnoulbyNEjnKeM7ID2u9Jhxymh2c_eJ0gaouLjpOLU = defineNitroPlugin((nitroApp) => {
|
|
3866
4224
|
nitroApp.hooks.hook("request", (event) => {
|
|
3867
4225
|
if (event.context.security?.nonce) {
|
|
3868
4226
|
return;
|
|
@@ -3908,7 +4266,7 @@ const _XhOSEDieM4_mfBI7ZVt8bJwMIqkowHxufWk5iOPyG8w = defineNitroPlugin((nitroApp
|
|
|
3908
4266
|
});
|
|
3909
4267
|
});
|
|
3910
4268
|
|
|
3911
|
-
const
|
|
4269
|
+
const _s9a6UFtdhxzyAoNtC707kPxVxb8AnaIv7TbZuBq97cA = defineNitroPlugin((nitroApp) => {
|
|
3912
4270
|
nitroApp.hooks.hook("render:html", (response, { event }) => {
|
|
3913
4271
|
if (response.island) {
|
|
3914
4272
|
return;
|
|
@@ -3956,13 +4314,13 @@ function updateCspVariables(csp, nonce, scriptHashes, styleHashes) {
|
|
|
3956
4314
|
return generatedCsp;
|
|
3957
4315
|
}
|
|
3958
4316
|
|
|
3959
|
-
const
|
|
4317
|
+
const _66aEGGOeNtcExwcSeAGysofsErgxIFLzvow0B4F5FtQ = defineNitroPlugin((nitroApp) => {
|
|
3960
4318
|
{
|
|
3961
4319
|
return;
|
|
3962
4320
|
}
|
|
3963
4321
|
});
|
|
3964
4322
|
|
|
3965
|
-
const
|
|
4323
|
+
const _17wfgbidit_XwRLLW6jOTCpHHhL0IVyMYd6hC8p2ve8 = defineNitroPlugin((nitroApp) => {
|
|
3966
4324
|
nitroApp.hooks.hook("render:response", (response, { event }) => {
|
|
3967
4325
|
const rules = resolveSecurityRules(event);
|
|
3968
4326
|
if (rules.enabled && rules.headers) {
|
|
@@ -3985,7 +4343,7 @@ const _DyMRzPH15AoEzH6bcFlYsDJQ8vPhi_NfbZ4pC9DNfyI = defineNitroPlugin((nitroApp
|
|
|
3985
4343
|
});
|
|
3986
4344
|
});
|
|
3987
4345
|
|
|
3988
|
-
const
|
|
4346
|
+
const _yUAn94jpUGoVq7_CVAFEN2XJYVARLEmPZsHDs6AYpDI = defineNitroPlugin((nitroApp) => {
|
|
3989
4347
|
nitroApp.hooks.hook("beforeResponse", (event) => {
|
|
3990
4348
|
const rules = resolveSecurityRules(event);
|
|
3991
4349
|
if (rules.enabled && rules.hidePoweredBy && !event.node.res.headersSent) {
|
|
@@ -3994,7 +4352,7 @@ const _tZXTnUnKl_u8d0rfkkU0LQbiR3UDjJkyevkUpuPgMg = defineNitroPlugin((nitroApp)
|
|
|
3994
4352
|
});
|
|
3995
4353
|
});
|
|
3996
4354
|
|
|
3997
|
-
const
|
|
4355
|
+
const _E33fyVSYcixGATPXDL9sKAyq3caNnkkPFWNIqgq8uE0 = defineNitroPlugin(async (nitroApp) => {
|
|
3998
4356
|
{
|
|
3999
4357
|
const prerenderedHeaders = await useStorage("assets:nuxt-security").getItem("headers.json") || {};
|
|
4000
4358
|
nitroApp.hooks.hook("beforeResponse", (event) => {
|
|
@@ -4010,24 +4368,113 @@ const _KIUo4nid7mjU4TFOv7ese0pfkfn6j2t89IVe_tmybyI = defineNitroPlugin(async (ni
|
|
|
4010
4368
|
});
|
|
4011
4369
|
|
|
4012
4370
|
const plugins = [
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4371
|
+
_BUwpELsyks45lroxlJ7pWDnbGcceJZF9mVl7VPNuPm4,
|
|
4372
|
+
__pERcNNWV1OaEgG7uvohNfb6mvznh4KNsVmRCE4aV0,
|
|
4373
|
+
_Z5botqEqNb56svWtJhyEDnS6Z4dk8BSBwZjYp1KssfI,
|
|
4374
|
+
__N1t3ZNCULqwSjGoVUR2rCd_NNid2x4qNEWZGlFs8vY,
|
|
4017
4375
|
_aS6mRx7bj_kthWDco8VHtcEWB9RO7OaYZ7jDuJ2mlM,
|
|
4018
4376
|
_7V99JalBsmMpJ4Im6qwrWJC2toR4GkZuF5sU0ekK6TU,
|
|
4019
4377
|
_gLOeqSTdYtSmvm3NLY8ox1LOh6DY4GgpRaz2D6f9XU,
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4378
|
+
_bhMjw8GUQRBOh08y1gcApVwqgcuV_Ay88JuONtrFNE,
|
|
4379
|
+
_LUEXAZKBV0ePPfOhSg_6JUQdyilTeQaim2YKwW8,
|
|
4380
|
+
_UcTOs1Ung7KfBGkFiid8OwKa_mCxxlEiLE15hP_nP8,
|
|
4381
|
+
_1TnoulbyNEjnKeM7ID2u9Jhxymh2c_eJ0gaouLjpOLU,
|
|
4382
|
+
_s9a6UFtdhxzyAoNtC707kPxVxb8AnaIv7TbZuBq97cA,
|
|
4383
|
+
_66aEGGOeNtcExwcSeAGysofsErgxIFLzvow0B4F5FtQ,
|
|
4384
|
+
_17wfgbidit_XwRLLW6jOTCpHHhL0IVyMYd6hC8p2ve8,
|
|
4385
|
+
_yUAn94jpUGoVq7_CVAFEN2XJYVARLEmPZsHDs6AYpDI,
|
|
4386
|
+
_E33fyVSYcixGATPXDL9sKAyq3caNnkkPFWNIqgq8uE0
|
|
4029
4387
|
];
|
|
4030
4388
|
|
|
4389
|
+
const assets = {};
|
|
4390
|
+
|
|
4391
|
+
function readAsset (id) {
|
|
4392
|
+
const serverDir = dirname$1(fileURLToPath(globalThis._importMeta_.url));
|
|
4393
|
+
return promises.readFile(resolve$2(serverDir, assets[id].path))
|
|
4394
|
+
}
|
|
4395
|
+
|
|
4396
|
+
const publicAssetBases = {"/_nuxt/builds/meta/":{"maxAge":31536000},"/_nuxt/builds/":{"maxAge":1},"/_fonts/":{"maxAge":31536000},"/_scripts/":{"maxAge":31536000}};
|
|
4397
|
+
|
|
4398
|
+
function isPublicAssetURL(id = '') {
|
|
4399
|
+
if (assets[id]) {
|
|
4400
|
+
return true
|
|
4401
|
+
}
|
|
4402
|
+
for (const base in publicAssetBases) {
|
|
4403
|
+
if (id.startsWith(base)) { return true }
|
|
4404
|
+
}
|
|
4405
|
+
return false
|
|
4406
|
+
}
|
|
4407
|
+
|
|
4408
|
+
function getAsset (id) {
|
|
4409
|
+
return assets[id]
|
|
4410
|
+
}
|
|
4411
|
+
|
|
4412
|
+
const METHODS = /* @__PURE__ */ new Set(["HEAD", "GET"]);
|
|
4413
|
+
const EncodingMap = { gzip: ".gz", br: ".br" };
|
|
4414
|
+
const _WLD3jp = eventHandler((event) => {
|
|
4415
|
+
if (event.method && !METHODS.has(event.method)) {
|
|
4416
|
+
return;
|
|
4417
|
+
}
|
|
4418
|
+
let id = decodePath(
|
|
4419
|
+
withLeadingSlash(withoutTrailingSlash(parseURL(event.path).pathname))
|
|
4420
|
+
);
|
|
4421
|
+
let asset;
|
|
4422
|
+
const encodingHeader = String(
|
|
4423
|
+
getRequestHeader(event, "accept-encoding") || ""
|
|
4424
|
+
);
|
|
4425
|
+
const encodings = [
|
|
4426
|
+
...encodingHeader.split(",").map((e) => EncodingMap[e.trim()]).filter(Boolean).sort(),
|
|
4427
|
+
""
|
|
4428
|
+
];
|
|
4429
|
+
if (encodings.length > 1) {
|
|
4430
|
+
appendResponseHeader(event, "Vary", "Accept-Encoding");
|
|
4431
|
+
}
|
|
4432
|
+
for (const encoding of encodings) {
|
|
4433
|
+
for (const _id of [id + encoding, joinURL(id, "index.html" + encoding)]) {
|
|
4434
|
+
const _asset = getAsset(_id);
|
|
4435
|
+
if (_asset) {
|
|
4436
|
+
asset = _asset;
|
|
4437
|
+
id = _id;
|
|
4438
|
+
break;
|
|
4439
|
+
}
|
|
4440
|
+
}
|
|
4441
|
+
}
|
|
4442
|
+
if (!asset) {
|
|
4443
|
+
if (isPublicAssetURL(id)) {
|
|
4444
|
+
removeResponseHeader(event, "Cache-Control");
|
|
4445
|
+
throw createError({ statusCode: 404 });
|
|
4446
|
+
}
|
|
4447
|
+
return;
|
|
4448
|
+
}
|
|
4449
|
+
const ifNotMatch = getRequestHeader(event, "if-none-match") === asset.etag;
|
|
4450
|
+
if (ifNotMatch) {
|
|
4451
|
+
setResponseStatus(event, 304, "Not Modified");
|
|
4452
|
+
return "";
|
|
4453
|
+
}
|
|
4454
|
+
const ifModifiedSinceH = getRequestHeader(event, "if-modified-since");
|
|
4455
|
+
const mtimeDate = new Date(asset.mtime);
|
|
4456
|
+
if (ifModifiedSinceH && asset.mtime && new Date(ifModifiedSinceH) >= mtimeDate) {
|
|
4457
|
+
setResponseStatus(event, 304, "Not Modified");
|
|
4458
|
+
return "";
|
|
4459
|
+
}
|
|
4460
|
+
if (asset.type && !getResponseHeader(event, "Content-Type")) {
|
|
4461
|
+
setResponseHeader(event, "Content-Type", asset.type);
|
|
4462
|
+
}
|
|
4463
|
+
if (asset.etag && !getResponseHeader(event, "ETag")) {
|
|
4464
|
+
setResponseHeader(event, "ETag", asset.etag);
|
|
4465
|
+
}
|
|
4466
|
+
if (asset.mtime && !getResponseHeader(event, "Last-Modified")) {
|
|
4467
|
+
setResponseHeader(event, "Last-Modified", mtimeDate.toUTCString());
|
|
4468
|
+
}
|
|
4469
|
+
if (asset.encoding && !getResponseHeader(event, "Content-Encoding")) {
|
|
4470
|
+
setResponseHeader(event, "Content-Encoding", asset.encoding);
|
|
4471
|
+
}
|
|
4472
|
+
if (asset.size > 0 && !getResponseHeader(event, "Content-Length")) {
|
|
4473
|
+
setResponseHeader(event, "Content-Length", asset.size);
|
|
4474
|
+
}
|
|
4475
|
+
return readAsset(id);
|
|
4476
|
+
});
|
|
4477
|
+
|
|
4031
4478
|
const defaultThrowErrorValue = { throwError: true };
|
|
4032
4479
|
const defaultSecurityConfig = (serverlUrl, strict) => {
|
|
4033
4480
|
const defaultConfig = {
|
|
@@ -4120,7 +4567,7 @@ const defaultSecurityConfig = (serverlUrl, strict) => {
|
|
|
4120
4567
|
|
|
4121
4568
|
const FILE_UPLOAD_HEADER = "multipart/form-data";
|
|
4122
4569
|
const defaultSizeLimiter = defaultSecurityConfig("").requestSizeLimiter;
|
|
4123
|
-
const
|
|
4570
|
+
const _Jp0StA = defineEventHandler((event) => {
|
|
4124
4571
|
const rules = resolveSecurityRules(event);
|
|
4125
4572
|
if (rules.enabled && rules.requestSizeLimiter) {
|
|
4126
4573
|
const requestSizeLimiter = defu(
|
|
@@ -4146,7 +4593,7 @@ const _nGzU2E = defineEventHandler((event) => {
|
|
|
4146
4593
|
}
|
|
4147
4594
|
});
|
|
4148
4595
|
|
|
4149
|
-
const
|
|
4596
|
+
const _ji0G_c = defineEventHandler((event) => {
|
|
4150
4597
|
const rules = resolveSecurityRules(event);
|
|
4151
4598
|
if (rules.enabled && rules.corsHandler) {
|
|
4152
4599
|
const { corsHandler } = rules;
|
|
@@ -4171,7 +4618,7 @@ const _DBwtAP = defineEventHandler((event) => {
|
|
|
4171
4618
|
}
|
|
4172
4619
|
});
|
|
4173
4620
|
|
|
4174
|
-
const
|
|
4621
|
+
const _SCmHem = defineEventHandler((event) => {
|
|
4175
4622
|
const rules = resolveSecurityRules(event);
|
|
4176
4623
|
if (rules.enabled && rules.allowedMethodsRestricter) {
|
|
4177
4624
|
const { allowedMethodsRestricter } = rules;
|
|
@@ -4191,7 +4638,7 @@ const _a3BfBQ = defineEventHandler((event) => {
|
|
|
4191
4638
|
|
|
4192
4639
|
const storage = useStorage("#rate-limiter-storage");
|
|
4193
4640
|
const defaultRateLimiter = defaultSecurityConfig("").rateLimiter;
|
|
4194
|
-
const
|
|
4641
|
+
const _umXuS0 = defineEventHandler(async (event) => {
|
|
4195
4642
|
const rules = resolveSecurityRules(event);
|
|
4196
4643
|
const route = resolveSecurityRoute(event);
|
|
4197
4644
|
if (rules.enabled && rules.rateLimiter) {
|
|
@@ -4254,7 +4701,7 @@ function getIP(event) {
|
|
|
4254
4701
|
return ip;
|
|
4255
4702
|
}
|
|
4256
4703
|
|
|
4257
|
-
const
|
|
4704
|
+
const _dtrJEZ = defineEventHandler(async (event) => {
|
|
4258
4705
|
const rules = resolveSecurityRules(event);
|
|
4259
4706
|
if (rules.enabled && rules.xssValidator) {
|
|
4260
4707
|
const filterOpt = {
|
|
@@ -4298,7 +4745,7 @@ const _DJziEh = defineEventHandler(async (event) => {
|
|
|
4298
4745
|
|
|
4299
4746
|
const warnOnceSet = /* @__PURE__ */ new Set();
|
|
4300
4747
|
const DEFAULT_ENDPOINT = "https://api.iconify.design";
|
|
4301
|
-
const
|
|
4748
|
+
const _Vmc_bU = defineCachedEventHandler(async (event) => {
|
|
4302
4749
|
const url = getRequestURL(event);
|
|
4303
4750
|
if (!url)
|
|
4304
4751
|
return createError({ status: 400, message: "Invalid icon request" });
|
|
@@ -4446,7 +4893,7 @@ const _ZwvYdn = defineEventHandler(async (event) => {
|
|
|
4446
4893
|
}
|
|
4447
4894
|
});
|
|
4448
4895
|
|
|
4449
|
-
const
|
|
4896
|
+
const _XVpHng = eventHandler(async (e) => {
|
|
4450
4897
|
if (e.context._initedSiteConfig)
|
|
4451
4898
|
return;
|
|
4452
4899
|
const runtimeConfig = useRuntimeConfig(e);
|
|
@@ -4498,7 +4945,7 @@ const _2TCn_1 = defineEventHandler(async (e) => {
|
|
|
4498
4945
|
e.context._initedSiteConfig = true;
|
|
4499
4946
|
});
|
|
4500
4947
|
|
|
4501
|
-
const
|
|
4948
|
+
const _LgdZze = eventHandler(async (e) => {
|
|
4502
4949
|
const siteConfig = useSiteConfig(e);
|
|
4503
4950
|
const nitroOrigin = useNitroOrigin(e);
|
|
4504
4951
|
const runtimeConfig = useRuntimeConfig(e);
|
|
@@ -4512,10 +4959,10 @@ const _ORf4yf = defineEventHandler(async (e) => {
|
|
|
4512
4959
|
};
|
|
4513
4960
|
});
|
|
4514
4961
|
|
|
4515
|
-
const
|
|
4516
|
-
const
|
|
4962
|
+
const _uMK4YT = defineEventHandler(async (e) => {
|
|
4963
|
+
const nitroApp = useNitroApp();
|
|
4517
4964
|
const { indexable, hints } = getSiteRobotConfig(e);
|
|
4518
|
-
const { credits, isNuxtContentV2, cacheControl } =
|
|
4965
|
+
const { credits, isNuxtContentV2, cacheControl } = useRuntimeConfigNuxtRobots(e);
|
|
4519
4966
|
let robotsTxtCtx = {
|
|
4520
4967
|
sitemaps: [],
|
|
4521
4968
|
groups: [
|
|
@@ -4567,14 +5014,14 @@ const _0QOObO = defineEventHandler(async (e) => {
|
|
|
4567
5014
|
setHeader(e, "Content-Type", "text/plain; charset=utf-8");
|
|
4568
5015
|
setHeader(e, "Cache-Control", "no-store" );
|
|
4569
5016
|
const hookCtx = { robotsTxt, e };
|
|
4570
|
-
await
|
|
5017
|
+
await nitroApp.hooks.callHook("robots:robots-txt", hookCtx);
|
|
4571
5018
|
return hookCtx.robotsTxt;
|
|
4572
5019
|
});
|
|
4573
5020
|
|
|
4574
|
-
const
|
|
5021
|
+
const _XpKgU4 = defineEventHandler(async (e) => {
|
|
4575
5022
|
if (e.path === "/robots.txt" || e.path.startsWith("/__") || e.path.startsWith("/api") || e.path.startsWith("/_nuxt"))
|
|
4576
5023
|
return;
|
|
4577
|
-
const nuxtRobotsConfig =
|
|
5024
|
+
const nuxtRobotsConfig = useRuntimeConfigNuxtRobots(e);
|
|
4578
5025
|
if (nuxtRobotsConfig) {
|
|
4579
5026
|
const { header } = nuxtRobotsConfig;
|
|
4580
5027
|
const robotConfig = getPathRobotConfig(e, { skipSiteIndexable: Boolean(getQuery$1(e)?.mockProductionEnv) });
|
|
@@ -4585,8 +5032,8 @@ const _2nM3bx = defineEventHandler(async (e) => {
|
|
|
4585
5032
|
}
|
|
4586
5033
|
});
|
|
4587
5034
|
|
|
4588
|
-
const
|
|
4589
|
-
const runtimeConfig =
|
|
5035
|
+
const _WlQo7G = defineEventHandler(async (e) => {
|
|
5036
|
+
const runtimeConfig = useRuntimeConfigNuxtRobots(e);
|
|
4590
5037
|
const { indexable, hints } = getSiteRobotConfig(e);
|
|
4591
5038
|
const siteConfig = useSiteConfig(e);
|
|
4592
5039
|
const robotsTxt = await e.$fetch("/robots.txt", {
|
|
@@ -4605,14 +5052,14 @@ const _4v3OAr = defineEventHandler(async (e) => {
|
|
|
4605
5052
|
};
|
|
4606
5053
|
});
|
|
4607
5054
|
|
|
4608
|
-
const
|
|
5055
|
+
const _MyEbKg = defineEventHandler(async (e) => {
|
|
4609
5056
|
const query = getQuery$1(e);
|
|
4610
5057
|
const path = query.path;
|
|
4611
5058
|
delete query.path;
|
|
4612
5059
|
const res = await $fetch.raw(withQuery(path, query));
|
|
4613
5060
|
const html = res._data;
|
|
4614
5061
|
const robotsHeader = String(res.headers.get("x-robots-tag"));
|
|
4615
|
-
const robotsMeta = html.match(/<meta[^>]+name=["']robots["'][^>]+content=["']([^"']+)["'](?:[^>]+data-hint=["']([^"']+)["'])?[^>]*>/i);
|
|
5062
|
+
const robotsMeta = String(html).match(/<meta[^>]+name=["']robots["'][^>]+content=["']([^"']+)["'](?:[^>]+data-hint=["']([^"']+)["'])?[^>]*>/i);
|
|
4616
5063
|
const [, robotsContent = null, robotsHint = null] = robotsMeta || [];
|
|
4617
5064
|
const [source, line] = robotsHint ? robotsHint.split(",") : [null, null];
|
|
4618
5065
|
return {
|
|
@@ -4629,7 +5076,7 @@ const _QTLJrY = defineEventHandler(async (e) => {
|
|
|
4629
5076
|
};
|
|
4630
5077
|
});
|
|
4631
5078
|
|
|
4632
|
-
const
|
|
5079
|
+
const _fUzllO = defineEventHandler(async (e) => {
|
|
4633
5080
|
const collections = [];
|
|
4634
5081
|
for (const collection in contentManifest) {
|
|
4635
5082
|
if (contentManifest[collection].fields.sitemap) {
|
|
@@ -4638,7 +5085,9 @@ const _CkQE1q = defineEventHandler(async (e) => {
|
|
|
4638
5085
|
}
|
|
4639
5086
|
const contentList = [];
|
|
4640
5087
|
for (const collection of collections) {
|
|
4641
|
-
contentList.push(
|
|
5088
|
+
contentList.push(
|
|
5089
|
+
queryCollection(e, collection).select("path", "sitemap").where("path", "IS NOT NULL").where("sitemap", "IS NOT NULL").all()
|
|
5090
|
+
);
|
|
4642
5091
|
}
|
|
4643
5092
|
const results = await Promise.all(contentList);
|
|
4644
5093
|
return results.flatMap((c) => {
|
|
@@ -4660,12 +5109,20 @@ const merger$1 = createDefu((obj, key, value) => {
|
|
|
4660
5109
|
return obj[key];
|
|
4661
5110
|
});
|
|
4662
5111
|
function mergeOnKey$1(arr, key) {
|
|
4663
|
-
const
|
|
4664
|
-
|
|
5112
|
+
const seen = /* @__PURE__ */ new Map();
|
|
5113
|
+
let resultLength = 0;
|
|
5114
|
+
const result = Array.from({ length: arr.length });
|
|
5115
|
+
for (const item of arr) {
|
|
4665
5116
|
const k = item[key];
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
5117
|
+
if (seen.has(k)) {
|
|
5118
|
+
const existingIndex = seen.get(k);
|
|
5119
|
+
result[existingIndex] = merger$1(item, result[existingIndex]);
|
|
5120
|
+
} else {
|
|
5121
|
+
seen.set(k, resultLength);
|
|
5122
|
+
result[resultLength++] = item;
|
|
5123
|
+
}
|
|
5124
|
+
}
|
|
5125
|
+
return result.slice(0, resultLength);
|
|
4669
5126
|
}
|
|
4670
5127
|
function splitForLocales(path, locales) {
|
|
4671
5128
|
const prefix = withLeadingSlash(path).split("/")[1];
|
|
@@ -4723,6 +5180,9 @@ function createFilter(options = {}) {
|
|
|
4723
5180
|
};
|
|
4724
5181
|
}
|
|
4725
5182
|
|
|
5183
|
+
function xmlEscape(str) {
|
|
5184
|
+
return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
5185
|
+
}
|
|
4726
5186
|
function useSitemapRuntimeConfig(e) {
|
|
4727
5187
|
const clone = JSON.parse(JSON.stringify(useRuntimeConfig(e).sitemap));
|
|
4728
5188
|
for (const k in clone.sitemaps) {
|
|
@@ -4734,111 +5194,432 @@ function useSitemapRuntimeConfig(e) {
|
|
|
4734
5194
|
return Object.freeze(clone);
|
|
4735
5195
|
}
|
|
4736
5196
|
|
|
4737
|
-
function
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
const
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
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
|
-
|
|
5197
|
+
function isValidString(value) {
|
|
5198
|
+
return typeof value === "string" && value.trim().length > 0;
|
|
5199
|
+
}
|
|
5200
|
+
function parseNumber(value) {
|
|
5201
|
+
if (typeof value === "number") return value;
|
|
5202
|
+
if (typeof value === "string" && value.trim()) {
|
|
5203
|
+
const num = Number.parseFloat(value.trim());
|
|
5204
|
+
return Number.isNaN(num) ? void 0 : num;
|
|
5205
|
+
}
|
|
5206
|
+
return void 0;
|
|
5207
|
+
}
|
|
5208
|
+
function parseInteger(value) {
|
|
5209
|
+
if (typeof value === "number") return Math.floor(value);
|
|
5210
|
+
if (typeof value === "string" && value.trim()) {
|
|
5211
|
+
const num = Number.parseInt(value.trim(), 10);
|
|
5212
|
+
return Number.isNaN(num) ? void 0 : num;
|
|
5213
|
+
}
|
|
5214
|
+
return void 0;
|
|
5215
|
+
}
|
|
5216
|
+
function extractUrlFromParsedElement(urlElement, warnings) {
|
|
5217
|
+
if (!isValidString(urlElement.loc)) {
|
|
5218
|
+
warnings.push({
|
|
5219
|
+
type: "validation",
|
|
5220
|
+
message: "URL entry missing required loc element",
|
|
5221
|
+
context: { url: String(urlElement.loc || "undefined") }
|
|
5222
|
+
});
|
|
5223
|
+
return null;
|
|
5224
|
+
}
|
|
5225
|
+
const urlObj = { loc: urlElement.loc };
|
|
5226
|
+
if (isValidString(urlElement.lastmod)) {
|
|
5227
|
+
urlObj.lastmod = urlElement.lastmod;
|
|
5228
|
+
}
|
|
5229
|
+
if (isValidString(urlElement.changefreq)) {
|
|
5230
|
+
const validFreqs = ["always", "hourly", "daily", "weekly", "monthly", "yearly", "never"];
|
|
5231
|
+
if (validFreqs.includes(urlElement.changefreq)) {
|
|
5232
|
+
urlObj.changefreq = urlElement.changefreq;
|
|
5233
|
+
} else {
|
|
5234
|
+
warnings.push({
|
|
5235
|
+
type: "validation",
|
|
5236
|
+
message: "Invalid changefreq value",
|
|
5237
|
+
context: { url: urlElement.loc, field: "changefreq", value: urlElement.changefreq }
|
|
5238
|
+
});
|
|
5239
|
+
}
|
|
5240
|
+
}
|
|
5241
|
+
const priority = parseNumber(urlElement.priority);
|
|
5242
|
+
if (priority !== void 0 && !Number.isNaN(priority)) {
|
|
5243
|
+
if (priority < 0 || priority > 1) {
|
|
5244
|
+
warnings.push({
|
|
5245
|
+
type: "validation",
|
|
5246
|
+
message: "Priority value should be between 0.0 and 1.0, clamping to valid range",
|
|
5247
|
+
context: { url: urlElement.loc, field: "priority", value: priority }
|
|
5248
|
+
});
|
|
5249
|
+
}
|
|
5250
|
+
urlObj.priority = Math.max(0, Math.min(1, priority));
|
|
5251
|
+
} else if (urlElement.priority !== void 0) {
|
|
5252
|
+
warnings.push({
|
|
5253
|
+
type: "validation",
|
|
5254
|
+
message: "Invalid priority value",
|
|
5255
|
+
context: { url: urlElement.loc, field: "priority", value: urlElement.priority }
|
|
5256
|
+
});
|
|
5257
|
+
}
|
|
5258
|
+
if (urlElement.image) {
|
|
5259
|
+
const images = Array.isArray(urlElement.image) ? urlElement.image : [urlElement.image];
|
|
5260
|
+
const validImages = images.map((img) => {
|
|
5261
|
+
if (isValidString(img.loc)) {
|
|
5262
|
+
return { loc: img.loc };
|
|
5263
|
+
} else {
|
|
5264
|
+
warnings.push({
|
|
5265
|
+
type: "validation",
|
|
5266
|
+
message: "Image missing required loc element",
|
|
5267
|
+
context: { url: urlElement.loc, field: "image.loc" }
|
|
5268
|
+
});
|
|
5269
|
+
return null;
|
|
5270
|
+
}
|
|
5271
|
+
}).filter((img) => img !== null);
|
|
5272
|
+
if (validImages.length > 0) {
|
|
5273
|
+
urlObj.images = validImages;
|
|
5274
|
+
}
|
|
5275
|
+
}
|
|
5276
|
+
if (urlElement.video) {
|
|
5277
|
+
const videos = Array.isArray(urlElement.video) ? urlElement.video : [urlElement.video];
|
|
5278
|
+
const validVideos = videos.map((video) => {
|
|
5279
|
+
const missingFields = [];
|
|
5280
|
+
if (!isValidString(video.title)) missingFields.push("title");
|
|
5281
|
+
if (!isValidString(video.thumbnail_loc)) missingFields.push("thumbnail_loc");
|
|
5282
|
+
if (!isValidString(video.description)) missingFields.push("description");
|
|
5283
|
+
if (!isValidString(video.content_loc)) missingFields.push("content_loc");
|
|
5284
|
+
if (missingFields.length > 0) {
|
|
5285
|
+
warnings.push({
|
|
5286
|
+
type: "validation",
|
|
5287
|
+
message: `Video missing required fields: ${missingFields.join(", ")}`,
|
|
5288
|
+
context: { url: urlElement.loc, field: "video" }
|
|
5289
|
+
});
|
|
5290
|
+
return null;
|
|
5291
|
+
}
|
|
5292
|
+
const videoObj = {
|
|
5293
|
+
title: video.title,
|
|
5294
|
+
thumbnail_loc: video.thumbnail_loc,
|
|
5295
|
+
description: video.description,
|
|
5296
|
+
content_loc: video.content_loc
|
|
5297
|
+
};
|
|
5298
|
+
if (isValidString(video.player_loc)) {
|
|
5299
|
+
videoObj.player_loc = video.player_loc;
|
|
5300
|
+
}
|
|
5301
|
+
const duration = parseInteger(video.duration);
|
|
5302
|
+
if (duration !== void 0) {
|
|
5303
|
+
videoObj.duration = duration;
|
|
5304
|
+
} else if (video.duration !== void 0) {
|
|
5305
|
+
warnings.push({
|
|
5306
|
+
type: "validation",
|
|
5307
|
+
message: "Invalid video duration value",
|
|
5308
|
+
context: { url: urlElement.loc, field: "video.duration", value: video.duration }
|
|
5309
|
+
});
|
|
5310
|
+
}
|
|
5311
|
+
if (isValidString(video.expiration_date)) {
|
|
5312
|
+
videoObj.expiration_date = video.expiration_date;
|
|
5313
|
+
}
|
|
5314
|
+
const rating = parseNumber(video.rating);
|
|
5315
|
+
if (rating !== void 0) {
|
|
5316
|
+
if (rating < 0 || rating > 5) {
|
|
5317
|
+
warnings.push({
|
|
5318
|
+
type: "validation",
|
|
5319
|
+
message: "Video rating should be between 0.0 and 5.0",
|
|
5320
|
+
context: { url: urlElement.loc, field: "video.rating", value: rating }
|
|
5321
|
+
});
|
|
5322
|
+
}
|
|
5323
|
+
videoObj.rating = rating;
|
|
5324
|
+
} else if (video.rating !== void 0) {
|
|
5325
|
+
warnings.push({
|
|
5326
|
+
type: "validation",
|
|
5327
|
+
message: "Invalid video rating value",
|
|
5328
|
+
context: { url: urlElement.loc, field: "video.rating", value: video.rating }
|
|
5329
|
+
});
|
|
5330
|
+
}
|
|
5331
|
+
const viewCount = parseInteger(video.view_count);
|
|
5332
|
+
if (viewCount !== void 0) {
|
|
5333
|
+
videoObj.view_count = viewCount;
|
|
5334
|
+
} else if (video.view_count !== void 0) {
|
|
5335
|
+
warnings.push({
|
|
5336
|
+
type: "validation",
|
|
5337
|
+
message: "Invalid video view_count value",
|
|
5338
|
+
context: { url: urlElement.loc, field: "video.view_count", value: video.view_count }
|
|
5339
|
+
});
|
|
5340
|
+
}
|
|
5341
|
+
if (isValidString(video.publication_date)) {
|
|
5342
|
+
videoObj.publication_date = video.publication_date;
|
|
5343
|
+
}
|
|
5344
|
+
if (isValidString(video.family_friendly)) {
|
|
5345
|
+
const validValues = ["yes", "no"];
|
|
5346
|
+
if (validValues.includes(video.family_friendly)) {
|
|
5347
|
+
videoObj.family_friendly = video.family_friendly;
|
|
5348
|
+
} else {
|
|
5349
|
+
warnings.push({
|
|
5350
|
+
type: "validation",
|
|
5351
|
+
message: 'Invalid video family_friendly value, should be "yes" or "no"',
|
|
5352
|
+
context: { url: urlElement.loc, field: "video.family_friendly", value: video.family_friendly }
|
|
5353
|
+
});
|
|
5354
|
+
}
|
|
5355
|
+
}
|
|
5356
|
+
if (isValidString(video.requires_subscription)) {
|
|
5357
|
+
const validValues = ["yes", "no"];
|
|
5358
|
+
if (validValues.includes(video.requires_subscription)) {
|
|
5359
|
+
videoObj.requires_subscription = video.requires_subscription;
|
|
5360
|
+
} else {
|
|
5361
|
+
warnings.push({
|
|
5362
|
+
type: "validation",
|
|
5363
|
+
message: 'Invalid video requires_subscription value, should be "yes" or "no"',
|
|
5364
|
+
context: { url: urlElement.loc, field: "video.requires_subscription", value: video.requires_subscription }
|
|
5365
|
+
});
|
|
5366
|
+
}
|
|
5367
|
+
}
|
|
5368
|
+
if (isValidString(video.live)) {
|
|
5369
|
+
const validValues = ["yes", "no"];
|
|
5370
|
+
if (validValues.includes(video.live)) {
|
|
5371
|
+
videoObj.live = video.live;
|
|
5372
|
+
} else {
|
|
5373
|
+
warnings.push({
|
|
5374
|
+
type: "validation",
|
|
5375
|
+
message: 'Invalid video live value, should be "yes" or "no"',
|
|
5376
|
+
context: { url: urlElement.loc, field: "video.live", value: video.live }
|
|
5377
|
+
});
|
|
5378
|
+
}
|
|
5379
|
+
}
|
|
5380
|
+
if (video.restriction && typeof video.restriction === "object") {
|
|
5381
|
+
const restriction = video.restriction;
|
|
5382
|
+
if (isValidString(restriction.relationship) && isValidString(restriction["#text"])) {
|
|
5383
|
+
const validRelationships = ["allow", "deny"];
|
|
5384
|
+
if (validRelationships.includes(restriction.relationship)) {
|
|
5385
|
+
videoObj.restriction = {
|
|
5386
|
+
relationship: restriction.relationship,
|
|
5387
|
+
restriction: restriction["#text"]
|
|
5388
|
+
};
|
|
5389
|
+
} else {
|
|
5390
|
+
warnings.push({
|
|
5391
|
+
type: "validation",
|
|
5392
|
+
message: 'Invalid video restriction relationship, should be "allow" or "deny"',
|
|
5393
|
+
context: { url: urlElement.loc, field: "video.restriction.relationship", value: restriction.relationship }
|
|
5394
|
+
});
|
|
5395
|
+
}
|
|
5396
|
+
}
|
|
5397
|
+
}
|
|
5398
|
+
if (video.platform && typeof video.platform === "object") {
|
|
5399
|
+
const platform = video.platform;
|
|
5400
|
+
if (isValidString(platform.relationship) && isValidString(platform["#text"])) {
|
|
5401
|
+
const validRelationships = ["allow", "deny"];
|
|
5402
|
+
if (validRelationships.includes(platform.relationship)) {
|
|
5403
|
+
videoObj.platform = {
|
|
5404
|
+
relationship: platform.relationship,
|
|
5405
|
+
platform: platform["#text"]
|
|
5406
|
+
};
|
|
5407
|
+
} else {
|
|
5408
|
+
warnings.push({
|
|
5409
|
+
type: "validation",
|
|
5410
|
+
message: 'Invalid video platform relationship, should be "allow" or "deny"',
|
|
5411
|
+
context: { url: urlElement.loc, field: "video.platform.relationship", value: platform.relationship }
|
|
5412
|
+
});
|
|
5413
|
+
}
|
|
5414
|
+
}
|
|
5415
|
+
}
|
|
5416
|
+
if (video.price) {
|
|
5417
|
+
const prices = Array.isArray(video.price) ? video.price : [video.price];
|
|
5418
|
+
const validPrices = prices.map((price) => {
|
|
5419
|
+
const priceValue = price["#text"];
|
|
5420
|
+
if (priceValue == null || typeof priceValue !== "string" && typeof priceValue !== "number") {
|
|
5421
|
+
warnings.push({
|
|
5422
|
+
type: "validation",
|
|
5423
|
+
message: "Video price missing value",
|
|
5424
|
+
context: { url: urlElement.loc, field: "video.price" }
|
|
5425
|
+
});
|
|
5426
|
+
return null;
|
|
5427
|
+
}
|
|
5428
|
+
const validTypes = ["rent", "purchase", "package", "subscription"];
|
|
5429
|
+
if (price.type && !validTypes.includes(price.type)) {
|
|
5430
|
+
warnings.push({
|
|
5431
|
+
type: "validation",
|
|
5432
|
+
message: `Invalid video price type "${price.type}", should be one of: ${validTypes.join(", ")}`,
|
|
5433
|
+
context: { url: urlElement.loc, field: "video.price.type", value: price.type }
|
|
5434
|
+
});
|
|
5435
|
+
}
|
|
5436
|
+
return {
|
|
5437
|
+
price: String(priceValue),
|
|
5438
|
+
currency: price.currency,
|
|
5439
|
+
type: price.type
|
|
5440
|
+
};
|
|
5441
|
+
}).filter((p) => p !== null);
|
|
5442
|
+
if (validPrices.length > 0) {
|
|
5443
|
+
videoObj.price = validPrices;
|
|
5444
|
+
}
|
|
5445
|
+
}
|
|
5446
|
+
if (video.uploader && typeof video.uploader === "object") {
|
|
5447
|
+
const uploader = video.uploader;
|
|
5448
|
+
if (isValidString(uploader.info) && isValidString(uploader["#text"])) {
|
|
5449
|
+
videoObj.uploader = {
|
|
5450
|
+
uploader: uploader["#text"],
|
|
5451
|
+
info: uploader.info
|
|
5452
|
+
};
|
|
5453
|
+
} else {
|
|
5454
|
+
warnings.push({
|
|
5455
|
+
type: "validation",
|
|
5456
|
+
message: "Video uploader missing required info or name",
|
|
5457
|
+
context: { url: urlElement.loc, field: "video.uploader" }
|
|
5458
|
+
});
|
|
5459
|
+
}
|
|
5460
|
+
}
|
|
5461
|
+
if (video.tag) {
|
|
5462
|
+
const tags = Array.isArray(video.tag) ? video.tag : [video.tag];
|
|
5463
|
+
const validTags = tags.filter(isValidString);
|
|
5464
|
+
if (validTags.length > 0) {
|
|
5465
|
+
videoObj.tag = validTags;
|
|
5466
|
+
}
|
|
5467
|
+
}
|
|
4793
5468
|
return videoObj;
|
|
4794
|
-
}).filter(
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
const
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
5469
|
+
}).filter((video) => video !== null);
|
|
5470
|
+
if (validVideos.length > 0) {
|
|
5471
|
+
urlObj.videos = validVideos;
|
|
5472
|
+
}
|
|
5473
|
+
}
|
|
5474
|
+
if (urlElement.link) {
|
|
5475
|
+
const links = Array.isArray(urlElement.link) ? urlElement.link : [urlElement.link];
|
|
5476
|
+
const alternatives = links.map((link) => {
|
|
5477
|
+
if (link.rel === "alternate" && isValidString(link.hreflang) && isValidString(link.href)) {
|
|
5478
|
+
return {
|
|
5479
|
+
hreflang: link.hreflang,
|
|
5480
|
+
href: link.href
|
|
5481
|
+
};
|
|
5482
|
+
} else {
|
|
5483
|
+
warnings.push({
|
|
5484
|
+
type: "validation",
|
|
5485
|
+
message: 'Alternative link missing required rel="alternate", hreflang, or href',
|
|
5486
|
+
context: { url: urlElement.loc, field: "link" }
|
|
5487
|
+
});
|
|
5488
|
+
return null;
|
|
5489
|
+
}
|
|
5490
|
+
}).filter((alt) => alt !== null);
|
|
5491
|
+
if (alternatives.length > 0) {
|
|
5492
|
+
urlObj.alternatives = alternatives;
|
|
5493
|
+
}
|
|
5494
|
+
}
|
|
5495
|
+
if (urlElement.news && typeof urlElement.news === "object") {
|
|
5496
|
+
const news = urlElement.news;
|
|
5497
|
+
if (isValidString(news.title) && isValidString(news.publication_date) && news.publication && isValidString(news.publication.name) && isValidString(news.publication.language)) {
|
|
5498
|
+
urlObj.news = {
|
|
5499
|
+
title: news.title,
|
|
5500
|
+
publication_date: news.publication_date,
|
|
5501
|
+
publication: {
|
|
5502
|
+
name: news.publication.name,
|
|
5503
|
+
language: news.publication.language
|
|
5504
|
+
}
|
|
5505
|
+
};
|
|
5506
|
+
} else {
|
|
5507
|
+
warnings.push({
|
|
5508
|
+
type: "validation",
|
|
5509
|
+
message: "News entry missing required fields (title, publication_date, publication.name, publication.language)",
|
|
5510
|
+
context: { url: urlElement.loc, field: "news" }
|
|
5511
|
+
});
|
|
5512
|
+
}
|
|
5513
|
+
}
|
|
5514
|
+
const filteredUrlObj = Object.fromEntries(
|
|
5515
|
+
Object.entries(urlObj).filter(
|
|
5516
|
+
([_, value]) => value != null && (!Array.isArray(value) || value.length > 0)
|
|
5517
|
+
)
|
|
5518
|
+
);
|
|
5519
|
+
return filteredUrlObj;
|
|
5520
|
+
}
|
|
5521
|
+
async function parseSitemapXml(xml) {
|
|
5522
|
+
const warnings = [];
|
|
5523
|
+
if (!xml) {
|
|
5524
|
+
throw new Error("Empty XML input provided");
|
|
5525
|
+
}
|
|
5526
|
+
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');
|
|
5527
|
+
const parser = new XMLParser({
|
|
5528
|
+
isArray: (tagName) => ["url", "image", "video", "link", "tag", "price"].includes(tagName),
|
|
5529
|
+
removeNSPrefix: true,
|
|
5530
|
+
parseAttributeValue: false,
|
|
5531
|
+
ignoreAttributes: false,
|
|
5532
|
+
attributeNamePrefix: "",
|
|
5533
|
+
trimValues: true
|
|
5534
|
+
});
|
|
5535
|
+
try {
|
|
5536
|
+
const parsed = parser.parse(xml);
|
|
5537
|
+
if (!parsed?.urlset) {
|
|
5538
|
+
throw new Error("XML does not contain a valid urlset element");
|
|
5539
|
+
}
|
|
5540
|
+
if (!parsed.urlset.url) {
|
|
5541
|
+
throw new Error("Sitemap contains no URL entries");
|
|
5542
|
+
}
|
|
5543
|
+
const urls = Array.isArray(parsed.urlset.url) ? parsed.urlset.url : [parsed.urlset.url];
|
|
5544
|
+
const validUrls = urls.map((url) => extractUrlFromParsedElement(url, warnings)).filter((url) => url !== null);
|
|
5545
|
+
if (validUrls.length === 0 && urls.length > 0) {
|
|
5546
|
+
warnings.push({
|
|
5547
|
+
type: "validation",
|
|
5548
|
+
message: "No valid URLs found in sitemap after validation"
|
|
5549
|
+
});
|
|
5550
|
+
}
|
|
5551
|
+
return { urls: validUrls, warnings };
|
|
5552
|
+
} catch (error) {
|
|
5553
|
+
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")) {
|
|
5554
|
+
throw error;
|
|
5555
|
+
}
|
|
5556
|
+
throw new Error(`Failed to parse XML: ${error instanceof Error ? error.message : String(error)}`);
|
|
5557
|
+
}
|
|
4811
5558
|
}
|
|
4812
5559
|
|
|
5560
|
+
async function tryFetchWithFallback(url, options, event) {
|
|
5561
|
+
const isExternalUrl = !url.startsWith("/");
|
|
5562
|
+
if (isExternalUrl) {
|
|
5563
|
+
const strategies = [
|
|
5564
|
+
// Strategy 1: Use globalThis.$fetch (original approach)
|
|
5565
|
+
() => globalThis.$fetch(url, options),
|
|
5566
|
+
// Strategy 2: If event is available, try using event context even for external URLs
|
|
5567
|
+
event ? () => event.$fetch(url, options) : null,
|
|
5568
|
+
// Strategy 3: Use native fetch as last resort
|
|
5569
|
+
() => $fetch(url, options)
|
|
5570
|
+
].filter(Boolean);
|
|
5571
|
+
let lastError = null;
|
|
5572
|
+
for (const strategy of strategies) {
|
|
5573
|
+
try {
|
|
5574
|
+
return await strategy();
|
|
5575
|
+
} catch (error) {
|
|
5576
|
+
lastError = error;
|
|
5577
|
+
continue;
|
|
5578
|
+
}
|
|
5579
|
+
}
|
|
5580
|
+
throw lastError;
|
|
5581
|
+
}
|
|
5582
|
+
const fetchContainer = url.startsWith("/") && event ? event : globalThis;
|
|
5583
|
+
return await fetchContainer.$fetch(url, options);
|
|
5584
|
+
}
|
|
4813
5585
|
async function fetchDataSource(input, event) {
|
|
4814
5586
|
const context = typeof input.context === "string" ? { name: input.context } : input.context || { name: "fetch" };
|
|
4815
|
-
context.tips = context.tips || [];
|
|
4816
5587
|
const url = typeof input.fetch === "string" ? input.fetch : input.fetch[0];
|
|
4817
5588
|
const options = typeof input.fetch === "string" ? {} : input.fetch[1];
|
|
4818
5589
|
const start = Date.now();
|
|
4819
|
-
const
|
|
5590
|
+
const isExternalUrl = !url.startsWith("/");
|
|
5591
|
+
const timeout = isExternalUrl ? 1e4 : options.timeout || 5e3;
|
|
4820
5592
|
const timeoutController = new AbortController();
|
|
4821
5593
|
const abortRequestTimeout = setTimeout(() => timeoutController.abort(), timeout);
|
|
4822
|
-
let isMaybeErrorResponse = false;
|
|
4823
|
-
const isXmlRequest = parseURL(url).pathname.endsWith(".xml");
|
|
4824
|
-
const fetchContainer = url.startsWith("/") && event ? event : globalThis;
|
|
4825
5594
|
try {
|
|
4826
|
-
|
|
5595
|
+
let isMaybeErrorResponse = false;
|
|
5596
|
+
const isXmlRequest = parseURL(url).pathname.endsWith(".xml");
|
|
5597
|
+
const mergedHeaders = defu$1(
|
|
5598
|
+
options?.headers,
|
|
5599
|
+
{
|
|
5600
|
+
Accept: isXmlRequest ? "text/xml" : "application/json"
|
|
5601
|
+
},
|
|
5602
|
+
event ? { host: getRequestHost(event, { xForwardedHost: true }) } : {}
|
|
5603
|
+
);
|
|
5604
|
+
const fetchOptions = {
|
|
4827
5605
|
...options,
|
|
4828
5606
|
responseType: isXmlRequest ? "text" : "json",
|
|
4829
5607
|
signal: timeoutController.signal,
|
|
4830
|
-
headers:
|
|
4831
|
-
|
|
4832
|
-
|
|
5608
|
+
headers: mergedHeaders,
|
|
5609
|
+
// Use ofetch's built-in retry for external sources
|
|
5610
|
+
...isExternalUrl && {
|
|
5611
|
+
retry: 2,
|
|
5612
|
+
retryDelay: 200
|
|
5613
|
+
},
|
|
4833
5614
|
// @ts-expect-error untyped
|
|
4834
5615
|
onResponse({ response }) {
|
|
4835
5616
|
if (typeof response._data === "string" && response._data.startsWith("<!DOCTYPE html>"))
|
|
4836
5617
|
isMaybeErrorResponse = true;
|
|
4837
5618
|
}
|
|
4838
|
-
}
|
|
5619
|
+
};
|
|
5620
|
+
const res = await tryFetchWithFallback(url, fetchOptions, event);
|
|
4839
5621
|
const timeTakenMs = Date.now() - start;
|
|
4840
5622
|
if (isMaybeErrorResponse) {
|
|
4841
|
-
context.tips.push("This is usually because the URL isn't correct or is throwing an error. Please check the URL");
|
|
4842
5623
|
return {
|
|
4843
5624
|
...input,
|
|
4844
5625
|
context,
|
|
@@ -4851,7 +5632,8 @@ async function fetchDataSource(input, event) {
|
|
|
4851
5632
|
if (typeof res === "object") {
|
|
4852
5633
|
urls = res.urls || res;
|
|
4853
5634
|
} else if (typeof res === "string" && parseURL(url).pathname.endsWith(".xml")) {
|
|
4854
|
-
|
|
5635
|
+
const result = await parseSitemapXml(res);
|
|
5636
|
+
urls = result.urls;
|
|
4855
5637
|
}
|
|
4856
5638
|
return {
|
|
4857
5639
|
...input,
|
|
@@ -4861,16 +5643,26 @@ async function fetchDataSource(input, event) {
|
|
|
4861
5643
|
};
|
|
4862
5644
|
} catch (_err) {
|
|
4863
5645
|
const error = _err;
|
|
4864
|
-
if (
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
5646
|
+
if (isExternalUrl) {
|
|
5647
|
+
const errorInfo = {
|
|
5648
|
+
url,
|
|
5649
|
+
timeout,
|
|
5650
|
+
error: error.message,
|
|
5651
|
+
statusCode: error.response?.status,
|
|
5652
|
+
statusText: error.response?.statusText,
|
|
5653
|
+
method: options?.method || "GET"
|
|
5654
|
+
};
|
|
5655
|
+
logger.error("Failed to fetch external source.", errorInfo);
|
|
5656
|
+
} else {
|
|
5657
|
+
logger.error("Failed to fetch source.", { url, error: error.message });
|
|
5658
|
+
}
|
|
4869
5659
|
return {
|
|
4870
5660
|
...input,
|
|
4871
5661
|
context,
|
|
4872
5662
|
urls: [],
|
|
4873
|
-
error: error.message
|
|
5663
|
+
error: error.message,
|
|
5664
|
+
_isFailure: true
|
|
5665
|
+
// Mark as failure to prevent caching
|
|
4874
5666
|
};
|
|
4875
5667
|
} finally {
|
|
4876
5668
|
if (abortRequestTimeout) {
|
|
@@ -4904,7 +5696,7 @@ async function resolveSitemapSources(sources, event) {
|
|
|
4904
5696
|
)).flat();
|
|
4905
5697
|
}
|
|
4906
5698
|
|
|
4907
|
-
const
|
|
5699
|
+
const _xIZ_0x = defineEventHandler(async (e) => {
|
|
4908
5700
|
const _runtimeConfig = useSitemapRuntimeConfig();
|
|
4909
5701
|
const { sitemaps: _sitemaps } = _runtimeConfig;
|
|
4910
5702
|
const runtimeConfig = { ..._runtimeConfig };
|
|
@@ -4915,18 +5707,18 @@ const _CJfHt9 = defineEventHandler(async (e) => {
|
|
|
4915
5707
|
for (const s of Object.keys(_sitemaps)) {
|
|
4916
5708
|
sitemaps[s] = {
|
|
4917
5709
|
..._sitemaps[s],
|
|
4918
|
-
sources: await resolveSitemapSources(await childSitemapSources(_sitemaps[s]))
|
|
5710
|
+
sources: await resolveSitemapSources(await childSitemapSources(_sitemaps[s]), e)
|
|
4919
5711
|
};
|
|
4920
5712
|
}
|
|
4921
5713
|
return {
|
|
4922
5714
|
nitroOrigin,
|
|
4923
5715
|
sitemaps,
|
|
4924
5716
|
runtimeConfig,
|
|
4925
|
-
globalSources: await resolveSitemapSources(globalSources)
|
|
5717
|
+
globalSources: await resolveSitemapSources(globalSources, e)
|
|
4926
5718
|
};
|
|
4927
5719
|
});
|
|
4928
5720
|
|
|
4929
|
-
const
|
|
5721
|
+
const _4BAWff = defineEventHandler(async (e) => {
|
|
4930
5722
|
const fixPath = createSitePathResolver(e, { absolute: false, withBase: true });
|
|
4931
5723
|
const { sitemapName: fallbackSitemapName, cacheMaxAgeSeconds, version, xslColumns, xslTips } = useSitemapRuntimeConfig();
|
|
4932
5724
|
setHeader(e, "Content-Type", "application/xslt+xml");
|
|
@@ -4946,17 +5738,37 @@ const _be_eqJ = defineEventHandler(async (e) => {
|
|
|
4946
5738
|
const isShowingCanonical = typeof canonicalQuery !== "undefined" && canonicalQuery !== "false";
|
|
4947
5739
|
const conditionalTips = [
|
|
4948
5740
|
'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.',
|
|
4949
|
-
`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>).`
|
|
5741
|
+
`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>).`
|
|
4950
5742
|
];
|
|
5743
|
+
const fetchErrors = [];
|
|
5744
|
+
const xslQuery = getQuery$1(e);
|
|
5745
|
+
if (xslQuery.error_messages) {
|
|
5746
|
+
const errorMessages = xslQuery.error_messages;
|
|
5747
|
+
const errorUrls = xslQuery.error_urls;
|
|
5748
|
+
if (errorMessages) {
|
|
5749
|
+
const messages = Array.isArray(errorMessages) ? errorMessages : [errorMessages];
|
|
5750
|
+
const urls = Array.isArray(errorUrls) ? errorUrls : errorUrls ? [errorUrls] : [];
|
|
5751
|
+
messages.forEach((msg, i) => {
|
|
5752
|
+
const errorParts = [xmlEscape(msg)];
|
|
5753
|
+
if (urls[i]) {
|
|
5754
|
+
errorParts.push(xmlEscape(urls[i]));
|
|
5755
|
+
}
|
|
5756
|
+
fetchErrors.push(`<strong style="color: #dc2626;">Error ${i + 1}:</strong> ${errorParts.join(" - ")}`);
|
|
5757
|
+
});
|
|
5758
|
+
}
|
|
5759
|
+
}
|
|
4951
5760
|
if (!isShowingCanonical) {
|
|
4952
5761
|
const canonicalPreviewUrl = withQuery(referrer, { canonical: "" });
|
|
4953
|
-
conditionalTips.push(`Your canonical site URL is <strong>${siteUrl}</strong>.`);
|
|
4954
|
-
conditionalTips.push(`You can preview your canonical sitemap by visiting <a href="${canonicalPreviewUrl}" style="color: #398465; white-space: nowrap;">${fixPath(canonicalPreviewUrl)}?canonical</a>`);
|
|
5762
|
+
conditionalTips.push(`Your canonical site URL is <strong>${xmlEscape(siteUrl)}</strong>.`);
|
|
5763
|
+
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>`);
|
|
4955
5764
|
} else {
|
|
4956
|
-
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>`);
|
|
5765
|
+
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>`);
|
|
4957
5766
|
}
|
|
4958
|
-
const
|
|
4959
|
-
const
|
|
5767
|
+
const hasRuntimeErrors = fetchErrors.length > 0;
|
|
5768
|
+
const showDevTips = xslTips !== false;
|
|
5769
|
+
const showSidebar = showDevTips || hasRuntimeErrors;
|
|
5770
|
+
const devTips = showDevTips ? conditionalTips.map((t) => `<li><p>${t}</p></li>`).join("\n") : "";
|
|
5771
|
+
const runtimeErrors = hasRuntimeErrors ? fetchErrors.map((t) => `<li><p>${t}</p></li>`).join("\n") : "";
|
|
4960
5772
|
let columns = [...xslColumns];
|
|
4961
5773
|
if (!columns.length) {
|
|
4962
5774
|
columns = [
|
|
@@ -5020,12 +5832,12 @@ const _be_eqJ = defineEventHandler(async (e) => {
|
|
|
5020
5832
|
}
|
|
5021
5833
|
|
|
5022
5834
|
.expl a {
|
|
5023
|
-
color: #398465
|
|
5835
|
+
color: #398465;
|
|
5024
5836
|
font-weight: 600;
|
|
5025
5837
|
}
|
|
5026
5838
|
|
|
5027
5839
|
.expl a:visited {
|
|
5028
|
-
color: #398465
|
|
5840
|
+
color: #398465;
|
|
5029
5841
|
}
|
|
5030
5842
|
|
|
5031
5843
|
a {
|
|
@@ -5076,8 +5888,8 @@ const _be_eqJ = defineEventHandler(async (e) => {
|
|
|
5076
5888
|
<div>
|
|
5077
5889
|
<div id="content">
|
|
5078
5890
|
<h1 class="text-2xl mb-3">XML Sitemap</h1>
|
|
5079
|
-
<h2>${title}</h2>
|
|
5080
|
-
${isNotIndexButHasIndex ? `<p style="font-size: 12px; margin-bottom: 1rem;"><a href="${fixPath("/sitemap_index.xml")}">${fixPath("/sitemap_index.xml")}</a></p>` : ""}
|
|
5891
|
+
<h2>${xmlEscape(title)}</h2>
|
|
5892
|
+
${isNotIndexButHasIndex ? `<p style="font-size: 12px; margin-bottom: 1rem;"><a href="${xmlEscape(fixPath("/sitemap_index.xml"))}">${xmlEscape(fixPath("/sitemap_index.xml"))}</a></p>` : ""}
|
|
5081
5893
|
<xsl:if test="count(sitemap:sitemapindex/sitemap:sitemap) > 0">
|
|
5082
5894
|
<p class="expl" style="margin-bottom: 1rem;">
|
|
5083
5895
|
This XML Sitemap Index file contains
|
|
@@ -5144,7 +5956,11 @@ const _be_eqJ = defineEventHandler(async (e) => {
|
|
|
5144
5956
|
</xsl:if>
|
|
5145
5957
|
</div>
|
|
5146
5958
|
</div>
|
|
5147
|
-
${
|
|
5959
|
+
${showSidebar ? `<div class="w-30 top-2 shadow rounded p-5 right-2" style="margin: 0 auto;">
|
|
5960
|
+
${showDevTips ? `<div><p><strong>Development Tips</strong></p><ul style="margin: 1rem 0; padding: 0;">${devTips}</ul></div>` : ""}
|
|
5961
|
+
${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>` : ""}
|
|
5962
|
+
${showDevTips ? `<p style="margin-top: 1rem;">${creditName}</p>` : ""}
|
|
5963
|
+
</div>` : ""}
|
|
5148
5964
|
</div>
|
|
5149
5965
|
</body>
|
|
5150
5966
|
</html>
|
|
@@ -5240,29 +6056,32 @@ function normaliseEntry(_e, defaults, resolvers) {
|
|
|
5240
6056
|
delete e.lastmod;
|
|
5241
6057
|
e.loc = resolve(e.loc, resolvers);
|
|
5242
6058
|
if (e.alternatives) {
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
6059
|
+
const alternatives = e.alternatives.map((a) => ({ ...a }));
|
|
6060
|
+
for (let i = 0; i < alternatives.length; i++) {
|
|
6061
|
+
const alt = alternatives[i];
|
|
6062
|
+
if (typeof alt.href === "string") {
|
|
6063
|
+
alt.href = resolve(alt.href, resolvers);
|
|
6064
|
+
} else if (typeof alt.href === "object" && alt.href) {
|
|
6065
|
+
alt.href = resolve(alt.href.href, resolvers);
|
|
6066
|
+
}
|
|
6067
|
+
}
|
|
6068
|
+
e.alternatives = mergeOnKey$1(alternatives, "hreflang");
|
|
5251
6069
|
}
|
|
5252
6070
|
if (e.images) {
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
i.loc = resolve(i.loc, resolvers);
|
|
5256
|
-
|
|
5257
|
-
|
|
6071
|
+
const images = e.images.map((i) => ({ ...i }));
|
|
6072
|
+
for (let i = 0; i < images.length; i++) {
|
|
6073
|
+
images[i].loc = resolve(images[i].loc, resolvers);
|
|
6074
|
+
}
|
|
6075
|
+
e.images = mergeOnKey$1(images, "loc");
|
|
5258
6076
|
}
|
|
5259
6077
|
if (e.videos) {
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
if (
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
}
|
|
6078
|
+
const videos = e.videos.map((v) => ({ ...v }));
|
|
6079
|
+
for (let i = 0; i < videos.length; i++) {
|
|
6080
|
+
if (videos[i].content_loc) {
|
|
6081
|
+
videos[i].content_loc = resolve(videos[i].content_loc, resolvers);
|
|
6082
|
+
}
|
|
6083
|
+
}
|
|
6084
|
+
e.videos = mergeOnKey$1(videos, "content_loc");
|
|
5266
6085
|
}
|
|
5267
6086
|
return e;
|
|
5268
6087
|
}
|
|
@@ -5298,111 +6117,257 @@ function normaliseDate(d) {
|
|
|
5298
6117
|
return date;
|
|
5299
6118
|
}
|
|
5300
6119
|
|
|
5301
|
-
function
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
const bLoc = typeof b === "string" ? b : b.loc;
|
|
5306
|
-
return aLoc.localeCompare(bLoc, void 0, { numeric: true });
|
|
5307
|
-
}
|
|
5308
|
-
).sort((a, b) => {
|
|
5309
|
-
const aLoc = (typeof a === "string" ? a : a.loc) || "";
|
|
5310
|
-
const bLoc = (typeof b === "string" ? b : b.loc) || "";
|
|
6120
|
+
function sortInPlace(urls) {
|
|
6121
|
+
urls.sort((a, b) => {
|
|
6122
|
+
const aLoc = typeof a === "string" ? a : a.loc;
|
|
6123
|
+
const bLoc = typeof b === "string" ? b : b.loc;
|
|
5311
6124
|
const aSegments = aLoc.split("/").length;
|
|
5312
6125
|
const bSegments = bLoc.split("/").length;
|
|
5313
|
-
if (aSegments
|
|
5314
|
-
return
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
return 0;
|
|
6126
|
+
if (aSegments !== bSegments) {
|
|
6127
|
+
return aSegments - bSegments;
|
|
6128
|
+
}
|
|
6129
|
+
return aLoc.localeCompare(bLoc, void 0, { numeric: true });
|
|
5318
6130
|
});
|
|
6131
|
+
return urls;
|
|
5319
6132
|
}
|
|
5320
6133
|
|
|
5321
|
-
function
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
return "news";
|
|
5330
|
-
default:
|
|
5331
|
-
return k;
|
|
6134
|
+
function parseChunkInfo(sitemapName, sitemaps, defaultChunkSize = 1e3) {
|
|
6135
|
+
if (typeof sitemaps.chunks !== "undefined" && !Number.isNaN(Number(sitemapName))) {
|
|
6136
|
+
return {
|
|
6137
|
+
isChunked: true,
|
|
6138
|
+
baseSitemapName: "sitemap",
|
|
6139
|
+
chunkIndex: Number(sitemapName),
|
|
6140
|
+
chunkSize: defaultChunkSize
|
|
6141
|
+
};
|
|
5332
6142
|
}
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
}
|
|
5348
|
-
const attributes = Object.entries(v).filter(([ssk]) => ssk !== sk).map(([ssk, ssv]) => `${ssk}="${escapeValueForXml(ssv)}"`).join(" ");
|
|
5349
|
-
return [
|
|
5350
|
-
` <${key}:${sk} ${attributes}>`,
|
|
5351
|
-
// value is the same sk
|
|
5352
|
-
v[sk],
|
|
5353
|
-
`</${key}:${sk}>`
|
|
5354
|
-
].join("");
|
|
5355
|
-
}).join("\n");
|
|
5356
|
-
}
|
|
5357
|
-
if (typeof sv === "object") {
|
|
5358
|
-
if (key === "video") {
|
|
5359
|
-
const attributes = Object.entries(sv).filter(([ssk]) => ssk !== sk).map(([ssk, ssv]) => `${ssk}="${escapeValueForXml(ssv)}"`).join(" ");
|
|
5360
|
-
return [
|
|
5361
|
-
` <${key}:${sk} ${attributes}>`,
|
|
5362
|
-
// value is the same sk
|
|
5363
|
-
sv[sk],
|
|
5364
|
-
`</${key}:${sk}>`
|
|
5365
|
-
].join("");
|
|
5366
|
-
}
|
|
5367
|
-
return [
|
|
5368
|
-
` <${key}:${sk}>`,
|
|
5369
|
-
...Object.entries(sv).map(([ssk, ssv]) => ` <${key}:${ssk}>${escapeValueForXml(ssv)}</${key}:${ssk}>`),
|
|
5370
|
-
` </${key}:${sk}>`
|
|
5371
|
-
].join("\n");
|
|
6143
|
+
if (sitemapName.includes("-")) {
|
|
6144
|
+
const parts = sitemapName.split("-");
|
|
6145
|
+
const lastPart = parts.pop();
|
|
6146
|
+
if (!Number.isNaN(Number(lastPart))) {
|
|
6147
|
+
const baseSitemapName = parts.join("-");
|
|
6148
|
+
const baseSitemap = sitemaps[baseSitemapName];
|
|
6149
|
+
if (baseSitemap && (baseSitemap.chunks || baseSitemap._isChunking)) {
|
|
6150
|
+
const chunkSize = typeof baseSitemap.chunks === "number" ? baseSitemap.chunks : baseSitemap.chunkSize || defaultChunkSize;
|
|
6151
|
+
return {
|
|
6152
|
+
isChunked: true,
|
|
6153
|
+
baseSitemapName,
|
|
6154
|
+
chunkIndex: Number(lastPart),
|
|
6155
|
+
chunkSize
|
|
6156
|
+
};
|
|
5372
6157
|
}
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
6158
|
+
}
|
|
6159
|
+
}
|
|
6160
|
+
return {
|
|
6161
|
+
isChunked: false,
|
|
6162
|
+
baseSitemapName: sitemapName,
|
|
6163
|
+
chunkIndex: void 0,
|
|
6164
|
+
chunkSize: defaultChunkSize
|
|
6165
|
+
};
|
|
5377
6166
|
}
|
|
5378
|
-
function
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
return
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
}
|
|
5387
|
-
return arr.map((obj) => handleObject(key, obj)).join("\n");
|
|
5388
|
-
}
|
|
5389
|
-
function handleEntry(k, e) {
|
|
5390
|
-
return Array.isArray(e[k]) ? handleArray(k, e[k]) : typeof e[k] === "object" ? handleObject(k, e[k]) : ` <${k}>${escapeValueForXml(e[k])}</${k}>`;
|
|
5391
|
-
}
|
|
5392
|
-
function wrapSitemapXml(input, resolvers, options) {
|
|
5393
|
-
const xsl = options.xsl ? resolvers.relativeBaseUrlResolver(options.xsl) : false;
|
|
5394
|
-
const credits = options.credits;
|
|
5395
|
-
input.unshift(`<?xml version="1.0" encoding="UTF-8"?>${xsl ? `<?xml-stylesheet type="text/xsl" href="${xsl}"?>` : ""}`);
|
|
5396
|
-
if (credits)
|
|
5397
|
-
input.push(`<!-- XML Sitemap generated by @nuxtjs/sitemap v${options.version} at ${(/* @__PURE__ */ new Date()).toISOString()} -->`);
|
|
5398
|
-
if (options.minify)
|
|
5399
|
-
return input.join("").replace(/(?<!<[^>]*)\s(?![^<]*>)/g, "");
|
|
5400
|
-
return input.join("\n");
|
|
6167
|
+
function sliceUrlsForChunk(urls, sitemapName, sitemaps, defaultChunkSize = 1e3) {
|
|
6168
|
+
const chunkInfo = parseChunkInfo(sitemapName, sitemaps, defaultChunkSize);
|
|
6169
|
+
if (chunkInfo.isChunked && chunkInfo.chunkIndex !== void 0) {
|
|
6170
|
+
const startIndex = chunkInfo.chunkIndex * chunkInfo.chunkSize;
|
|
6171
|
+
const endIndex = (chunkInfo.chunkIndex + 1) * chunkInfo.chunkSize;
|
|
6172
|
+
return urls.slice(startIndex, endIndex);
|
|
6173
|
+
}
|
|
6174
|
+
return urls;
|
|
5401
6175
|
}
|
|
6176
|
+
|
|
5402
6177
|
function escapeValueForXml(value) {
|
|
5403
6178
|
if (value === true || value === false)
|
|
5404
6179
|
return value ? "yes" : "no";
|
|
5405
|
-
return String(value)
|
|
6180
|
+
return xmlEscape(String(value));
|
|
6181
|
+
}
|
|
6182
|
+
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">';
|
|
6183
|
+
function buildUrlXml(url) {
|
|
6184
|
+
const capacity = 50;
|
|
6185
|
+
const parts = Array.from({ length: capacity });
|
|
6186
|
+
let partIndex = 0;
|
|
6187
|
+
parts[partIndex++] = " <url>";
|
|
6188
|
+
if (url.loc) {
|
|
6189
|
+
parts[partIndex++] = ` <loc>${escapeValueForXml(url.loc)}</loc>`;
|
|
6190
|
+
}
|
|
6191
|
+
if (url.lastmod) {
|
|
6192
|
+
parts[partIndex++] = ` <lastmod>${url.lastmod}</lastmod>`;
|
|
6193
|
+
}
|
|
6194
|
+
if (url.changefreq) {
|
|
6195
|
+
parts[partIndex++] = ` <changefreq>${url.changefreq}</changefreq>`;
|
|
6196
|
+
}
|
|
6197
|
+
if (url.priority !== void 0) {
|
|
6198
|
+
const priorityValue = Number.parseFloat(String(url.priority));
|
|
6199
|
+
const formattedPriority = priorityValue % 1 === 0 ? String(priorityValue) : priorityValue.toFixed(1);
|
|
6200
|
+
parts[partIndex++] = ` <priority>${formattedPriority}</priority>`;
|
|
6201
|
+
}
|
|
6202
|
+
const keys = Object.keys(url).filter((k) => !k.startsWith("_") && !["loc", "lastmod", "changefreq", "priority"].includes(k));
|
|
6203
|
+
for (const key of keys) {
|
|
6204
|
+
const value = url[key];
|
|
6205
|
+
if (value === void 0 || value === null) continue;
|
|
6206
|
+
switch (key) {
|
|
6207
|
+
case "alternatives":
|
|
6208
|
+
if (Array.isArray(value) && value.length > 0) {
|
|
6209
|
+
for (const alt of value) {
|
|
6210
|
+
const attrs = Object.entries(alt).map(([k, v]) => `${k}="${escapeValueForXml(v)}"`).join(" ");
|
|
6211
|
+
parts[partIndex++] = ` <xhtml:link rel="alternate" ${attrs} />`;
|
|
6212
|
+
}
|
|
6213
|
+
}
|
|
6214
|
+
break;
|
|
6215
|
+
case "images":
|
|
6216
|
+
if (Array.isArray(value) && value.length > 0) {
|
|
6217
|
+
for (const img of value) {
|
|
6218
|
+
parts[partIndex++] = " <image:image>";
|
|
6219
|
+
parts[partIndex++] = ` <image:loc>${escapeValueForXml(img.loc)}</image:loc>`;
|
|
6220
|
+
if (img.title) parts[partIndex++] = ` <image:title>${escapeValueForXml(img.title)}</image:title>`;
|
|
6221
|
+
if (img.caption) parts[partIndex++] = ` <image:caption>${escapeValueForXml(img.caption)}</image:caption>`;
|
|
6222
|
+
if (img.geo_location) parts[partIndex++] = ` <image:geo_location>${escapeValueForXml(img.geo_location)}</image:geo_location>`;
|
|
6223
|
+
if (img.license) parts[partIndex++] = ` <image:license>${escapeValueForXml(img.license)}</image:license>`;
|
|
6224
|
+
parts[partIndex++] = " </image:image>";
|
|
6225
|
+
}
|
|
6226
|
+
}
|
|
6227
|
+
break;
|
|
6228
|
+
case "videos":
|
|
6229
|
+
if (Array.isArray(value) && value.length > 0) {
|
|
6230
|
+
for (const video of value) {
|
|
6231
|
+
parts[partIndex++] = " <video:video>";
|
|
6232
|
+
parts[partIndex++] = ` <video:title>${escapeValueForXml(video.title)}</video:title>`;
|
|
6233
|
+
if (video.thumbnail_loc) {
|
|
6234
|
+
parts[partIndex++] = ` <video:thumbnail_loc>${escapeValueForXml(video.thumbnail_loc)}</video:thumbnail_loc>`;
|
|
6235
|
+
}
|
|
6236
|
+
parts[partIndex++] = ` <video:description>${escapeValueForXml(video.description)}</video:description>`;
|
|
6237
|
+
if (video.content_loc) {
|
|
6238
|
+
parts[partIndex++] = ` <video:content_loc>${escapeValueForXml(video.content_loc)}</video:content_loc>`;
|
|
6239
|
+
}
|
|
6240
|
+
if (video.player_loc) {
|
|
6241
|
+
const attrs = video.player_loc.allow_embed ? ' allow_embed="yes"' : "";
|
|
6242
|
+
const autoplay = video.player_loc.autoplay ? ' autoplay="yes"' : "";
|
|
6243
|
+
parts[partIndex++] = ` <video:player_loc${attrs}${autoplay}>${escapeValueForXml(video.player_loc)}</video:player_loc>`;
|
|
6244
|
+
}
|
|
6245
|
+
if (video.duration !== void 0) {
|
|
6246
|
+
parts[partIndex++] = ` <video:duration>${video.duration}</video:duration>`;
|
|
6247
|
+
}
|
|
6248
|
+
if (video.expiration_date) {
|
|
6249
|
+
parts[partIndex++] = ` <video:expiration_date>${video.expiration_date}</video:expiration_date>`;
|
|
6250
|
+
}
|
|
6251
|
+
if (video.rating !== void 0) {
|
|
6252
|
+
parts[partIndex++] = ` <video:rating>${video.rating}</video:rating>`;
|
|
6253
|
+
}
|
|
6254
|
+
if (video.view_count !== void 0) {
|
|
6255
|
+
parts[partIndex++] = ` <video:view_count>${video.view_count}</video:view_count>`;
|
|
6256
|
+
}
|
|
6257
|
+
if (video.publication_date) {
|
|
6258
|
+
parts[partIndex++] = ` <video:publication_date>${video.publication_date}</video:publication_date>`;
|
|
6259
|
+
}
|
|
6260
|
+
if (video.family_friendly !== void 0) {
|
|
6261
|
+
parts[partIndex++] = ` <video:family_friendly>${video.family_friendly === "yes" || video.family_friendly === true ? "yes" : "no"}</video:family_friendly>`;
|
|
6262
|
+
}
|
|
6263
|
+
if (video.restriction) {
|
|
6264
|
+
const relationship = video.restriction.relationship || "allow";
|
|
6265
|
+
parts[partIndex++] = ` <video:restriction relationship="${relationship}">${escapeValueForXml(video.restriction.restriction)}</video:restriction>`;
|
|
6266
|
+
}
|
|
6267
|
+
if (video.platform) {
|
|
6268
|
+
const relationship = video.platform.relationship || "allow";
|
|
6269
|
+
parts[partIndex++] = ` <video:platform relationship="${relationship}">${escapeValueForXml(video.platform.platform)}</video:platform>`;
|
|
6270
|
+
}
|
|
6271
|
+
if (video.requires_subscription !== void 0) {
|
|
6272
|
+
parts[partIndex++] = ` <video:requires_subscription>${video.requires_subscription === "yes" || video.requires_subscription === true ? "yes" : "no"}</video:requires_subscription>`;
|
|
6273
|
+
}
|
|
6274
|
+
if (video.price) {
|
|
6275
|
+
const prices = Array.isArray(video.price) ? video.price : [video.price];
|
|
6276
|
+
for (const price of prices) {
|
|
6277
|
+
const attrs = [];
|
|
6278
|
+
if (price.currency) attrs.push(`currency="${price.currency}"`);
|
|
6279
|
+
if (price.type) attrs.push(`type="${price.type}"`);
|
|
6280
|
+
const attrsStr = attrs.length > 0 ? " " + attrs.join(" ") : "";
|
|
6281
|
+
parts[partIndex++] = ` <video:price${attrsStr}>${escapeValueForXml(price.price)}</video:price>`;
|
|
6282
|
+
}
|
|
6283
|
+
}
|
|
6284
|
+
if (video.uploader) {
|
|
6285
|
+
const info = video.uploader.info ? ` info="${escapeValueForXml(video.uploader.info)}"` : "";
|
|
6286
|
+
parts[partIndex++] = ` <video:uploader${info}>${escapeValueForXml(video.uploader.uploader)}</video:uploader>`;
|
|
6287
|
+
}
|
|
6288
|
+
if (video.live !== void 0) {
|
|
6289
|
+
parts[partIndex++] = ` <video:live>${video.live === "yes" || video.live === true ? "yes" : "no"}</video:live>`;
|
|
6290
|
+
}
|
|
6291
|
+
if (video.tag) {
|
|
6292
|
+
const tags = Array.isArray(video.tag) ? video.tag : [video.tag];
|
|
6293
|
+
for (const tag of tags) {
|
|
6294
|
+
parts[partIndex++] = ` <video:tag>${escapeValueForXml(tag)}</video:tag>`;
|
|
6295
|
+
}
|
|
6296
|
+
}
|
|
6297
|
+
if (video.category) {
|
|
6298
|
+
parts[partIndex++] = ` <video:category>${escapeValueForXml(video.category)}</video:category>`;
|
|
6299
|
+
}
|
|
6300
|
+
if (video.gallery_loc) {
|
|
6301
|
+
const title = video.gallery_loc.title ? ` title="${escapeValueForXml(video.gallery_loc.title)}"` : "";
|
|
6302
|
+
parts[partIndex++] = ` <video:gallery_loc${title}>${escapeValueForXml(video.gallery_loc)}</video:gallery_loc>`;
|
|
6303
|
+
}
|
|
6304
|
+
parts[partIndex++] = " </video:video>";
|
|
6305
|
+
}
|
|
6306
|
+
}
|
|
6307
|
+
break;
|
|
6308
|
+
case "news":
|
|
6309
|
+
if (value) {
|
|
6310
|
+
parts[partIndex++] = " <news:news>";
|
|
6311
|
+
parts[partIndex++] = " <news:publication>";
|
|
6312
|
+
parts[partIndex++] = ` <news:name>${escapeValueForXml(value.publication.name)}</news:name>`;
|
|
6313
|
+
parts[partIndex++] = ` <news:language>${escapeValueForXml(value.publication.language)}</news:language>`;
|
|
6314
|
+
parts[partIndex++] = " </news:publication>";
|
|
6315
|
+
if (value.title) {
|
|
6316
|
+
parts[partIndex++] = ` <news:title>${escapeValueForXml(value.title)}</news:title>`;
|
|
6317
|
+
}
|
|
6318
|
+
if (value.publication_date) {
|
|
6319
|
+
parts[partIndex++] = ` <news:publication_date>${value.publication_date}</news:publication_date>`;
|
|
6320
|
+
}
|
|
6321
|
+
if (value.access) {
|
|
6322
|
+
parts[partIndex++] = ` <news:access>${value.access}</news:access>`;
|
|
6323
|
+
}
|
|
6324
|
+
if (value.genres) {
|
|
6325
|
+
parts[partIndex++] = ` <news:genres>${escapeValueForXml(value.genres)}</news:genres>`;
|
|
6326
|
+
}
|
|
6327
|
+
if (value.keywords) {
|
|
6328
|
+
parts[partIndex++] = ` <news:keywords>${escapeValueForXml(value.keywords)}</news:keywords>`;
|
|
6329
|
+
}
|
|
6330
|
+
if (value.stock_tickers) {
|
|
6331
|
+
parts[partIndex++] = ` <news:stock_tickers>${escapeValueForXml(value.stock_tickers)}</news:stock_tickers>`;
|
|
6332
|
+
}
|
|
6333
|
+
parts[partIndex++] = " </news:news>";
|
|
6334
|
+
}
|
|
6335
|
+
break;
|
|
6336
|
+
}
|
|
6337
|
+
}
|
|
6338
|
+
parts[partIndex++] = " </url>";
|
|
6339
|
+
return parts.slice(0, partIndex).join("\n");
|
|
6340
|
+
}
|
|
6341
|
+
function urlsToXml(urls, resolvers, { version, xsl, credits, minify }, errorInfo) {
|
|
6342
|
+
const estimatedSize = urls.length + 5;
|
|
6343
|
+
const xmlParts = Array.from({ length: estimatedSize });
|
|
6344
|
+
let partIndex = 0;
|
|
6345
|
+
let xslHref = xsl ? resolvers.relativeBaseUrlResolver(xsl) : false;
|
|
6346
|
+
if (xslHref && errorInfo && errorInfo.messages.length > 0) {
|
|
6347
|
+
xslHref = withQuery(xslHref, {
|
|
6348
|
+
errors: "true",
|
|
6349
|
+
error_messages: errorInfo.messages,
|
|
6350
|
+
error_urls: errorInfo.urls
|
|
6351
|
+
});
|
|
6352
|
+
}
|
|
6353
|
+
if (xslHref) {
|
|
6354
|
+
xmlParts[partIndex++] = `<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="${escapeValueForXml(xslHref)}"?>`;
|
|
6355
|
+
} else {
|
|
6356
|
+
xmlParts[partIndex++] = '<?xml version="1.0" encoding="UTF-8"?>';
|
|
6357
|
+
}
|
|
6358
|
+
xmlParts[partIndex++] = URLSET_OPENING_TAG;
|
|
6359
|
+
for (const url of urls) {
|
|
6360
|
+
xmlParts[partIndex++] = buildUrlXml(url);
|
|
6361
|
+
}
|
|
6362
|
+
xmlParts[partIndex++] = "</urlset>";
|
|
6363
|
+
if (credits) {
|
|
6364
|
+
xmlParts[partIndex++] = `<!-- XML Sitemap generated by @nuxtjs/sitemap v${version} at ${(/* @__PURE__ */ new Date()).toISOString()} -->`;
|
|
6365
|
+
}
|
|
6366
|
+
const xmlContent = xmlParts.slice(0, partIndex);
|
|
6367
|
+
if (minify) {
|
|
6368
|
+
return xmlContent.join("").replace(/(?<!<[^>]*)\s(?![^<]*>)/g, "");
|
|
6369
|
+
}
|
|
6370
|
+
return xmlContent.join("\n");
|
|
5406
6371
|
}
|
|
5407
6372
|
|
|
5408
6373
|
function resolveSitemapEntries(sitemap, urls, runtimeConfig, resolvers) {
|
|
@@ -5485,9 +6450,23 @@ function resolveSitemapEntries(sitemap, urls, runtimeConfig, resolvers) {
|
|
|
5485
6450
|
});
|
|
5486
6451
|
} else {
|
|
5487
6452
|
for (const l of autoI18n.locales) {
|
|
5488
|
-
let loc =
|
|
5489
|
-
if (autoI18n.
|
|
5490
|
-
|
|
6453
|
+
let loc = e._pathWithoutPrefix;
|
|
6454
|
+
if (autoI18n.pages) {
|
|
6455
|
+
const pageKey = e._pathWithoutPrefix.replace(/^\//, "").replace(/\/index$/, "") || "index";
|
|
6456
|
+
const pageMappings = autoI18n.pages[pageKey];
|
|
6457
|
+
if (pageMappings && pageMappings[l.code] !== void 0) {
|
|
6458
|
+
const customPath = pageMappings[l.code];
|
|
6459
|
+
if (customPath === false)
|
|
6460
|
+
continue;
|
|
6461
|
+
if (typeof customPath === "string")
|
|
6462
|
+
loc = customPath.startsWith("/") ? customPath : `/${customPath}`;
|
|
6463
|
+
} else if (!autoI18n.differentDomains && !(["prefix_and_default", "prefix_except_default"].includes(autoI18n.strategy) && l.code === autoI18n.defaultLocale)) {
|
|
6464
|
+
loc = joinURL(`/${l.code}`, e._pathWithoutPrefix);
|
|
6465
|
+
}
|
|
6466
|
+
} else {
|
|
6467
|
+
if (!autoI18n.differentDomains && !(["prefix_and_default", "prefix_except_default"].includes(autoI18n.strategy) && l.code === autoI18n.defaultLocale))
|
|
6468
|
+
loc = joinURL(`/${l.code}`, e._pathWithoutPrefix);
|
|
6469
|
+
}
|
|
5491
6470
|
const _sitemap = isI18nMapped ? l._sitemap : void 0;
|
|
5492
6471
|
const newEntry = preNormalizeEntry({
|
|
5493
6472
|
_sitemap,
|
|
@@ -5499,14 +6478,30 @@ function resolveSitemapEntries(sitemap, urls, runtimeConfig, resolvers) {
|
|
|
5499
6478
|
alternatives: [{ code: "x-default", _hreflang: "x-default" }, ...autoI18n.locales].map((locale) => {
|
|
5500
6479
|
const code = locale.code === "x-default" ? autoI18n.defaultLocale : locale.code;
|
|
5501
6480
|
const isDefault = locale.code === "x-default" || locale.code === autoI18n.defaultLocale;
|
|
5502
|
-
let href =
|
|
5503
|
-
if (autoI18n.
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
if (
|
|
5507
|
-
|
|
5508
|
-
|
|
6481
|
+
let href = e._pathWithoutPrefix;
|
|
6482
|
+
if (autoI18n.pages) {
|
|
6483
|
+
const pageKey = e._pathWithoutPrefix.replace(/^\//, "").replace(/\/index$/, "") || "index";
|
|
6484
|
+
const pageMappings = autoI18n.pages[pageKey];
|
|
6485
|
+
if (pageMappings && pageMappings[code] !== void 0) {
|
|
6486
|
+
const customPath = pageMappings[code];
|
|
6487
|
+
if (customPath === false)
|
|
6488
|
+
return false;
|
|
6489
|
+
if (typeof customPath === "string")
|
|
6490
|
+
href = customPath.startsWith("/") ? customPath : `/${customPath}`;
|
|
6491
|
+
} else if (autoI18n.strategy === "prefix") {
|
|
5509
6492
|
href = joinURL("/", code, e._pathWithoutPrefix);
|
|
6493
|
+
} else if (["prefix_and_default", "prefix_except_default"].includes(autoI18n.strategy)) {
|
|
6494
|
+
if (!isDefault) {
|
|
6495
|
+
href = joinURL("/", code, e._pathWithoutPrefix);
|
|
6496
|
+
}
|
|
6497
|
+
}
|
|
6498
|
+
} else {
|
|
6499
|
+
if (autoI18n.strategy === "prefix") {
|
|
6500
|
+
href = joinURL("/", code, e._pathWithoutPrefix);
|
|
6501
|
+
} else if (["prefix_and_default", "prefix_except_default"].includes(autoI18n.strategy)) {
|
|
6502
|
+
if (!isDefault) {
|
|
6503
|
+
href = joinURL("/", code, e._pathWithoutPrefix);
|
|
6504
|
+
}
|
|
5510
6505
|
}
|
|
5511
6506
|
}
|
|
5512
6507
|
if (!filterPath(href))
|
|
@@ -5551,16 +6546,12 @@ async function buildSitemapUrls(sitemap, resolvers, runtimeConfig, nitro) {
|
|
|
5551
6546
|
// chunking
|
|
5552
6547
|
defaultSitemapsChunkSize
|
|
5553
6548
|
} = runtimeConfig;
|
|
5554
|
-
const
|
|
5555
|
-
function maybeSort(
|
|
5556
|
-
return sortEntries ?
|
|
6549
|
+
const chunkInfo = parseChunkInfo(sitemap.sitemapName, sitemaps, defaultSitemapsChunkSize);
|
|
6550
|
+
function maybeSort(urls2) {
|
|
6551
|
+
return sortEntries ? sortInPlace(urls2) : urls2;
|
|
5557
6552
|
}
|
|
5558
|
-
function maybeSlice(
|
|
5559
|
-
|
|
5560
|
-
const chunk = Number(sitemap.sitemapName);
|
|
5561
|
-
return urls.slice(chunk * defaultSitemapsChunkSize, (chunk + 1) * defaultSitemapsChunkSize);
|
|
5562
|
-
}
|
|
5563
|
-
return urls;
|
|
6553
|
+
function maybeSlice(urls2) {
|
|
6554
|
+
return sliceUrlsForChunk(urls2, sitemap.sitemapName, sitemaps, defaultSitemapsChunkSize);
|
|
5564
6555
|
}
|
|
5565
6556
|
if (autoI18n?.differentDomains) {
|
|
5566
6557
|
const domain = autoI18n.locales.find((e) => [e.language, e.code].includes(sitemap.sitemapName))?.domain;
|
|
@@ -5575,9 +6566,27 @@ async function buildSitemapUrls(sitemap, resolvers, runtimeConfig, nitro) {
|
|
|
5575
6566
|
});
|
|
5576
6567
|
}
|
|
5577
6568
|
}
|
|
5578
|
-
|
|
5579
|
-
|
|
6569
|
+
let effectiveSitemap = sitemap;
|
|
6570
|
+
const baseSitemapName = chunkInfo.baseSitemapName;
|
|
6571
|
+
if (chunkInfo.isChunked && baseSitemapName !== sitemap.sitemapName && sitemaps[baseSitemapName]) {
|
|
6572
|
+
effectiveSitemap = sitemaps[baseSitemapName];
|
|
6573
|
+
}
|
|
6574
|
+
let sourcesInput = effectiveSitemap.includeAppSources ? await globalSitemapSources() : [];
|
|
6575
|
+
sourcesInput.push(...await childSitemapSources(effectiveSitemap));
|
|
6576
|
+
if (nitro && resolvers.event) {
|
|
6577
|
+
const ctx = {
|
|
6578
|
+
event: resolvers.event,
|
|
6579
|
+
sitemapName: baseSitemapName,
|
|
6580
|
+
sources: sourcesInput
|
|
6581
|
+
};
|
|
6582
|
+
await nitro.hooks.callHook("sitemap:sources", ctx);
|
|
6583
|
+
sourcesInput = ctx.sources;
|
|
6584
|
+
}
|
|
5580
6585
|
const sources = await resolveSitemapSources(sourcesInput, resolvers.event);
|
|
6586
|
+
const failedSources = sources.filter((source) => source.error && source._isFailure).map((source) => ({
|
|
6587
|
+
url: typeof source.fetch === "string" ? source.fetch : source.fetch?.[0] || "unknown",
|
|
6588
|
+
error: source.error || "Unknown error"
|
|
6589
|
+
}));
|
|
5581
6590
|
const resolvedCtx = {
|
|
5582
6591
|
urls: sources.flatMap((s) => s.urls),
|
|
5583
6592
|
sitemapName: sitemap.sitemapName,
|
|
@@ -5591,22 +6600,8 @@ async function buildSitemapUrls(sitemap, resolvers, runtimeConfig, nitro) {
|
|
|
5591
6600
|
return true;
|
|
5592
6601
|
});
|
|
5593
6602
|
const sortedUrls = maybeSort(filteredUrls);
|
|
5594
|
-
|
|
5595
|
-
}
|
|
5596
|
-
function urlsToXml(urls, resolvers, { version, xsl, credits, minify }) {
|
|
5597
|
-
const urlset = urls.map((e) => {
|
|
5598
|
-
const keys = Object.keys(e).filter((k) => !k.startsWith("_"));
|
|
5599
|
-
return [
|
|
5600
|
-
" <url>",
|
|
5601
|
-
keys.map((k) => handleEntry(k, e)).filter(Boolean).join("\n"),
|
|
5602
|
-
" </url>"
|
|
5603
|
-
].join("\n");
|
|
5604
|
-
});
|
|
5605
|
-
return wrapSitemapXml([
|
|
5606
|
-
'<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">',
|
|
5607
|
-
urlset.join("\n"),
|
|
5608
|
-
"</urlset>"
|
|
5609
|
-
], resolvers, { version, xsl, credits, minify });
|
|
6603
|
+
const urls = maybeSlice(sortedUrls);
|
|
6604
|
+
return { urls, failedSources };
|
|
5610
6605
|
}
|
|
5611
6606
|
|
|
5612
6607
|
function useNitroUrlResolvers(e) {
|
|
@@ -5625,17 +6620,18 @@ function useNitroUrlResolvers(e) {
|
|
|
5625
6620
|
relativeBaseUrlResolver: createSitePathResolver(e, { absolute: false, withBase: true })
|
|
5626
6621
|
};
|
|
5627
6622
|
}
|
|
5628
|
-
async function
|
|
6623
|
+
async function buildSitemapXml(event, definition, resolvers, runtimeConfig) {
|
|
5629
6624
|
const { sitemapName } = definition;
|
|
5630
6625
|
const nitro = useNitroApp();
|
|
5631
|
-
const
|
|
5632
|
-
let sitemapUrls = await buildSitemapUrls(definition, resolvers, runtimeConfig, nitro);
|
|
6626
|
+
const { urls: sitemapUrls, failedSources } = await buildSitemapUrls(definition, resolvers, runtimeConfig, nitro);
|
|
5633
6627
|
const routeRuleMatcher = createNitroRouteRuleMatcher();
|
|
5634
6628
|
const { autoI18n } = runtimeConfig;
|
|
5635
|
-
|
|
6629
|
+
let validCount = 0;
|
|
6630
|
+
for (let i = 0; i < sitemapUrls.length; i++) {
|
|
6631
|
+
const u = sitemapUrls[i];
|
|
5636
6632
|
const path = u._path?.pathname || u.loc;
|
|
5637
6633
|
if (!getPathRobotConfig(event, { path, skipSiteIndexable: true }).indexable)
|
|
5638
|
-
|
|
6634
|
+
continue;
|
|
5639
6635
|
let routeRules = routeRuleMatcher(path);
|
|
5640
6636
|
if (autoI18n?.locales && autoI18n?.strategy !== "no_prefix") {
|
|
5641
6637
|
const match = splitForLocales(path, autoI18n.locales.map((l) => l.code));
|
|
@@ -5644,15 +6640,15 @@ async function createSitemap(event, definition, runtimeConfig) {
|
|
|
5644
6640
|
routeRules = defu$1(routeRules, routeRuleMatcher(pathWithoutPrefix));
|
|
5645
6641
|
}
|
|
5646
6642
|
if (routeRules.sitemap === false)
|
|
5647
|
-
|
|
5648
|
-
if (typeof routeRules.robots !== "undefined" && !routeRules.robots)
|
|
5649
|
-
|
|
5650
|
-
}
|
|
6643
|
+
continue;
|
|
6644
|
+
if (typeof routeRules.robots !== "undefined" && !routeRules.robots)
|
|
6645
|
+
continue;
|
|
5651
6646
|
const hasRobotsDisabled = Object.entries(routeRules.headers || {}).some(([name, value]) => name.toLowerCase() === "x-robots-tag" && value.toLowerCase().includes("noindex"));
|
|
5652
6647
|
if (routeRules.redirect || hasRobotsDisabled)
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
}
|
|
6648
|
+
continue;
|
|
6649
|
+
sitemapUrls[validCount++] = routeRules.sitemap ? defu$1(u, routeRules.sitemap) : u;
|
|
6650
|
+
}
|
|
6651
|
+
sitemapUrls.length = validCount;
|
|
5656
6652
|
const locSize = sitemapUrls.length;
|
|
5657
6653
|
const resolvedCtx = {
|
|
5658
6654
|
urls: sitemapUrls,
|
|
@@ -5663,22 +6659,72 @@ async function createSitemap(event, definition, runtimeConfig) {
|
|
|
5663
6659
|
if (resolvedCtx.urls.length !== locSize) {
|
|
5664
6660
|
resolvedCtx.urls = resolvedCtx.urls.map((e) => preNormalizeEntry(e, resolvers));
|
|
5665
6661
|
}
|
|
5666
|
-
const maybeSort = (urls2) => runtimeConfig.sortEntries ?
|
|
6662
|
+
const maybeSort = (urls2) => runtimeConfig.sortEntries ? sortInPlace(urls2) : urls2;
|
|
5667
6663
|
const normalizedPreDedupe = resolvedCtx.urls.map((e) => normaliseEntry(e, definition.defaults, resolvers));
|
|
5668
6664
|
const urls = maybeSort(mergeOnKey$1(normalizedPreDedupe, "_key").map((e) => normaliseEntry(e, definition.defaults, resolvers)));
|
|
5669
|
-
|
|
6665
|
+
if (definition._isChunking && definition.sitemapName.includes("-")) {
|
|
6666
|
+
const parts = definition.sitemapName.split("-");
|
|
6667
|
+
const lastPart = parts.pop();
|
|
6668
|
+
if (!Number.isNaN(Number(lastPart))) {
|
|
6669
|
+
const chunkIndex = Number(lastPart);
|
|
6670
|
+
const baseSitemapName = parts.join("-");
|
|
6671
|
+
if (urls.length === 0 && chunkIndex > 0) {
|
|
6672
|
+
throw createError({
|
|
6673
|
+
statusCode: 404,
|
|
6674
|
+
message: `Sitemap chunk ${chunkIndex} for "${baseSitemapName}" does not exist.`
|
|
6675
|
+
});
|
|
6676
|
+
}
|
|
6677
|
+
}
|
|
6678
|
+
}
|
|
6679
|
+
const errorInfo = failedSources.length > 0 ? {
|
|
6680
|
+
messages: failedSources.map((f) => f.error),
|
|
6681
|
+
urls: failedSources.map((f) => f.url)
|
|
6682
|
+
} : void 0;
|
|
6683
|
+
const sitemap = urlsToXml(urls, resolvers, runtimeConfig, errorInfo);
|
|
5670
6684
|
const ctx = { sitemap, sitemapName, event };
|
|
5671
6685
|
await nitro.hooks.callHook("sitemap:output", ctx);
|
|
6686
|
+
return ctx.sitemap;
|
|
6687
|
+
}
|
|
6688
|
+
defineCachedFunction(
|
|
6689
|
+
buildSitemapXml,
|
|
6690
|
+
{
|
|
6691
|
+
name: "sitemap:xml",
|
|
6692
|
+
group: "sitemap",
|
|
6693
|
+
maxAge: 60 * 10,
|
|
6694
|
+
// Default 10 minutes
|
|
6695
|
+
base: "sitemap",
|
|
6696
|
+
// Use the sitemap storage
|
|
6697
|
+
getKey: (event, definition) => {
|
|
6698
|
+
const host = getHeader(event, "host") || getHeader(event, "x-forwarded-host") || "";
|
|
6699
|
+
const proto = getHeader(event, "x-forwarded-proto") || "https";
|
|
6700
|
+
const sitemapName = definition.sitemapName || "default";
|
|
6701
|
+
return `${sitemapName}-${proto}-${host}`;
|
|
6702
|
+
},
|
|
6703
|
+
swr: true
|
|
6704
|
+
// Enable stale-while-revalidate
|
|
6705
|
+
}
|
|
6706
|
+
);
|
|
6707
|
+
async function createSitemap(event, definition, runtimeConfig) {
|
|
6708
|
+
const resolvers = useNitroUrlResolvers(event);
|
|
6709
|
+
const xml = await buildSitemapXml(event, definition, resolvers, runtimeConfig);
|
|
5672
6710
|
setHeader(event, "Content-Type", "text/xml; charset=UTF-8");
|
|
5673
|
-
if (runtimeConfig.cacheMaxAgeSeconds)
|
|
5674
|
-
setHeader(event, "Cache-Control", `public, max-age=${runtimeConfig.cacheMaxAgeSeconds},
|
|
5675
|
-
|
|
6711
|
+
if (runtimeConfig.cacheMaxAgeSeconds) {
|
|
6712
|
+
setHeader(event, "Cache-Control", `public, max-age=${runtimeConfig.cacheMaxAgeSeconds}, s-maxage=${runtimeConfig.cacheMaxAgeSeconds}, stale-while-revalidate=3600`);
|
|
6713
|
+
const now = /* @__PURE__ */ new Date();
|
|
6714
|
+
setHeader(event, "X-Sitemap-Generated", now.toISOString());
|
|
6715
|
+
setHeader(event, "X-Sitemap-Cache-Duration", `${runtimeConfig.cacheMaxAgeSeconds}s`);
|
|
6716
|
+
const expiryTime = new Date(now.getTime() + runtimeConfig.cacheMaxAgeSeconds * 1e3);
|
|
6717
|
+
setHeader(event, "X-Sitemap-Cache-Expires", expiryTime.toISOString());
|
|
6718
|
+
const remainingSeconds = Math.floor((expiryTime.getTime() - now.getTime()) / 1e3);
|
|
6719
|
+
setHeader(event, "X-Sitemap-Cache-Remaining", `${remainingSeconds}s`);
|
|
6720
|
+
} else {
|
|
5676
6721
|
setHeader(event, "Cache-Control", `no-cache, no-store`);
|
|
6722
|
+
}
|
|
5677
6723
|
event.context._isSitemap = true;
|
|
5678
|
-
return
|
|
6724
|
+
return xml;
|
|
5679
6725
|
}
|
|
5680
6726
|
|
|
5681
|
-
const
|
|
6727
|
+
const _n1jDWd = defineEventHandler(async (e) => {
|
|
5682
6728
|
const runtimeConfig = useSitemapRuntimeConfig();
|
|
5683
6729
|
const { sitemaps } = runtimeConfig;
|
|
5684
6730
|
if ("index" in sitemaps) {
|
|
@@ -6272,7 +7318,7 @@ function isInternalRoute(path) {
|
|
|
6272
7318
|
const lastSegment = path.split("/").pop() || path;
|
|
6273
7319
|
return lastSegment.includes(".") || path.startsWith("/__") || path.startsWith("@");
|
|
6274
7320
|
}
|
|
6275
|
-
const
|
|
7321
|
+
const _3rIYDU = defineEventHandler(async (e) => {
|
|
6276
7322
|
const { tasks, ids, path } = await readBody(e);
|
|
6277
7323
|
const runtimeConfig = useRuntimeConfig().public["nuxt-link-checker"] || {};
|
|
6278
7324
|
const partialCtx = {
|
|
@@ -6308,7 +7354,7 @@ const _DcvS2K = defineEventHandler(async (e) => {
|
|
|
6308
7354
|
skipInspections: runtimeConfig.skipInspections
|
|
6309
7355
|
});
|
|
6310
7356
|
const filePaths = [
|
|
6311
|
-
resolve$
|
|
7357
|
+
resolve$3(runtimeConfig.rootDir, links.find((l) => l.file && l.link === path)?.file),
|
|
6312
7358
|
...paths.map((p) => {
|
|
6313
7359
|
const [filepath] = p.split(":");
|
|
6314
7360
|
return filepath;
|
|
@@ -6332,7 +7378,7 @@ const contentLinkProvider = async (e) => {
|
|
|
6332
7378
|
}
|
|
6333
7379
|
const contentList = [];
|
|
6334
7380
|
for (const collection of collections) {
|
|
6335
|
-
contentList.push(
|
|
7381
|
+
contentList.push(queryCollection(e, collection).select("id", "path", "title").where("path", "IS NOT NULL").all());
|
|
6336
7382
|
}
|
|
6337
7383
|
const results = await Promise.all(contentList);
|
|
6338
7384
|
return results.flat().map((d) => {
|
|
@@ -6347,19 +7393,19 @@ const contentLinkProvider = async (e) => {
|
|
|
6347
7393
|
const pagePaths = [
|
|
6348
7394
|
{
|
|
6349
7395
|
"title": "",
|
|
6350
|
-
"link": "/
|
|
7396
|
+
"link": "/"
|
|
6351
7397
|
},
|
|
6352
7398
|
{
|
|
6353
7399
|
"title": "",
|
|
6354
|
-
"link": "/"
|
|
7400
|
+
"link": "/_ignis-info"
|
|
6355
7401
|
},
|
|
6356
7402
|
{
|
|
6357
7403
|
"title": "",
|
|
6358
|
-
"link": "/
|
|
7404
|
+
"link": "/_ignis-config"
|
|
6359
7405
|
}
|
|
6360
7406
|
];
|
|
6361
7407
|
|
|
6362
|
-
const
|
|
7408
|
+
const _Rhm_9d = defineCachedEventHandler(async (e) => {
|
|
6363
7409
|
const runtimeConfig = useRuntimeConfig().public["nuxt-link-checker"] || {};
|
|
6364
7410
|
const linkDb = [
|
|
6365
7411
|
...pagePaths
|
|
@@ -6379,7 +7425,7 @@ const _Utkbv0 = defineCachedEventHandler(async (e) => {
|
|
|
6379
7425
|
// avoid thrashing
|
|
6380
7426
|
});
|
|
6381
7427
|
|
|
6382
|
-
const
|
|
7428
|
+
const _tz9NUt = defineEventHandler(async (e) => {
|
|
6383
7429
|
return {
|
|
6384
7430
|
runtimeConfig: useRuntimeConfig(e).public["nuxt-link-checker"]
|
|
6385
7431
|
};
|
|
@@ -6387,7 +7433,7 @@ const _IFlV15 = defineEventHandler(async (e) => {
|
|
|
6387
7433
|
|
|
6388
7434
|
const fileMapping = {};
|
|
6389
7435
|
|
|
6390
|
-
const
|
|
7436
|
+
const _vGgZzc = defineEventHandler(async (e) => {
|
|
6391
7437
|
const path = parseURL(e.path).pathname;
|
|
6392
7438
|
if (fileMapping[path]) {
|
|
6393
7439
|
if (path.endsWith(".svg"))
|
|
@@ -6720,7 +7766,7 @@ async function getIslandContext(event) {
|
|
|
6720
7766
|
return ctx;
|
|
6721
7767
|
}
|
|
6722
7768
|
|
|
6723
|
-
const
|
|
7769
|
+
const _rFIeAt = eventHandler(async (event) => {
|
|
6724
7770
|
const collection = getRouterParam(event, "collection");
|
|
6725
7771
|
setHeader(event, "Content-Type", "text/plain");
|
|
6726
7772
|
const data = await useStorage().getItem(`build:content:database.compressed.mjs`) || "";
|
|
@@ -6738,8 +7784,8 @@ async function decompressSQLDump(base64Str, compressionType = "gzip") {
|
|
|
6738
7784
|
const binaryData = Uint8Array.from(atob(base64Str), (c) => c.charCodeAt(0));
|
|
6739
7785
|
const response = new Response(new Blob([binaryData]));
|
|
6740
7786
|
const decompressedStream = response.body?.pipeThrough(new DecompressionStream(compressionType));
|
|
6741
|
-
const
|
|
6742
|
-
return
|
|
7787
|
+
const text = await new Response(decompressedStream).text();
|
|
7788
|
+
return JSON.parse(text);
|
|
6743
7789
|
}
|
|
6744
7790
|
|
|
6745
7791
|
function refineContentFields(sql, doc) {
|
|
@@ -7002,7 +8048,7 @@ function cleanupQuery(query, options = { removeString: false }) {
|
|
|
7002
8048
|
return result;
|
|
7003
8049
|
}
|
|
7004
8050
|
|
|
7005
|
-
const
|
|
8051
|
+
const _1L1dwH = eventHandler(async (event) => {
|
|
7006
8052
|
const { sql } = await readBody(event);
|
|
7007
8053
|
const collection = getRouterParam(event, "collection");
|
|
7008
8054
|
assertSafeQuery(sql, collection);
|
|
@@ -7013,7 +8059,7 @@ const _Ye6p8H = eventHandler(async (event) => {
|
|
|
7013
8059
|
return loadDatabaseAdapter(conf).all(sql);
|
|
7014
8060
|
});
|
|
7015
8061
|
|
|
7016
|
-
const
|
|
8062
|
+
const _O1mb7t = lazyEventHandler(() => {
|
|
7017
8063
|
const opts = useRuntimeConfig().ipx || {};
|
|
7018
8064
|
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;
|
|
7019
8065
|
const fsStorage = opts.fs?.dir ? ipxFSStorage({ ...opts.fs, dir: fsDir }) : void 0;
|
|
@@ -7032,46 +8078,47 @@ const _uQBwCY = lazyEventHandler(() => {
|
|
|
7032
8078
|
});
|
|
7033
8079
|
|
|
7034
8080
|
const _lazy_u5Dhoc = () => Promise.resolve().then(function () { return neonTest$1; });
|
|
7035
|
-
const
|
|
8081
|
+
const _lazy_MPEx63 = () => Promise.resolve().then(function () { return renderer$1; });
|
|
7036
8082
|
|
|
7037
8083
|
const handlers = [
|
|
8084
|
+
{ route: '', handler: _WLD3jp, lazy: false, middleware: true, method: undefined },
|
|
7038
8085
|
{ route: '/api/neonTest', handler: _lazy_u5Dhoc, lazy: true, middleware: false, method: undefined },
|
|
7039
|
-
{ route: '/__nuxt_error', handler:
|
|
7040
|
-
{ route: '', handler:
|
|
7041
|
-
{ route: '', handler:
|
|
7042
|
-
{ route: '', handler:
|
|
7043
|
-
{ route: '', handler:
|
|
7044
|
-
{ route: '', handler:
|
|
7045
|
-
{ route: '/api/_nuxt_icon/:collection', handler:
|
|
8086
|
+
{ route: '/__nuxt_error', handler: _lazy_MPEx63, lazy: true, middleware: false, method: undefined },
|
|
8087
|
+
{ route: '', handler: _Jp0StA, lazy: false, middleware: false, method: undefined },
|
|
8088
|
+
{ route: '', handler: _ji0G_c, lazy: false, middleware: false, method: undefined },
|
|
8089
|
+
{ route: '', handler: _SCmHem, lazy: false, middleware: false, method: undefined },
|
|
8090
|
+
{ route: '', handler: _umXuS0, lazy: false, middleware: false, method: undefined },
|
|
8091
|
+
{ route: '', handler: _dtrJEZ, lazy: false, middleware: false, method: undefined },
|
|
8092
|
+
{ route: '/api/_nuxt_icon/:collection', handler: _Vmc_bU, lazy: false, middleware: false, method: undefined },
|
|
7046
8093
|
{ route: '/api/_neon/raw', handler: _mgiUeJ, lazy: false, middleware: false, method: undefined },
|
|
7047
8094
|
{ route: '/api/_neon/count', handler: _BzfLgA, lazy: false, middleware: false, method: undefined },
|
|
7048
8095
|
{ route: '/api/_neon/select', handler: _vZyrES, lazy: false, middleware: false, method: undefined },
|
|
7049
8096
|
{ route: '/api/_neon/insert', handler: _8fc9Bi, lazy: false, middleware: false, method: undefined },
|
|
7050
8097
|
{ route: '/api/_neon/update', handler: _cKepiO, lazy: false, middleware: false, method: undefined },
|
|
7051
8098
|
{ route: '/api/_neon/delete', handler: _ZwvYdn, lazy: false, middleware: false, method: undefined },
|
|
7052
|
-
{ route: '', handler:
|
|
7053
|
-
{ route: '/__site-config__/debug.json', handler:
|
|
7054
|
-
{ route: '/robots.txt', handler:
|
|
7055
|
-
{ route: '', handler:
|
|
7056
|
-
{ route: '/__robots__/debug.json', handler:
|
|
7057
|
-
{ route: '/__robots__/debug-path.json', handler:
|
|
7058
|
-
{ route: '/__sitemap__/nuxt-content-urls.json', handler:
|
|
7059
|
-
{ route: '/__sitemap__/debug.json', handler:
|
|
7060
|
-
{ route: '/__sitemap__/style.xsl', handler:
|
|
7061
|
-
{ route: '/sitemap.xml', handler:
|
|
7062
|
-
{ route: '/__link-checker__/inspect', handler:
|
|
7063
|
-
{ route: '/__link-checker__/links', handler:
|
|
7064
|
-
{ route: '/__link-checker__/debug.json', handler:
|
|
7065
|
-
{ route: '', handler:
|
|
8099
|
+
{ route: '', handler: _XVpHng, lazy: false, middleware: true, method: undefined },
|
|
8100
|
+
{ route: '/__site-config__/debug.json', handler: _LgdZze, lazy: false, middleware: false, method: undefined },
|
|
8101
|
+
{ route: '/robots.txt', handler: _uMK4YT, lazy: false, middleware: false, method: undefined },
|
|
8102
|
+
{ route: '', handler: _XpKgU4, lazy: false, middleware: true, method: undefined },
|
|
8103
|
+
{ route: '/__robots__/debug.json', handler: _WlQo7G, lazy: false, middleware: false, method: undefined },
|
|
8104
|
+
{ route: '/__robots__/debug-path.json', handler: _MyEbKg, lazy: false, middleware: false, method: undefined },
|
|
8105
|
+
{ route: '/__sitemap__/nuxt-content-urls.json', handler: _fUzllO, lazy: false, middleware: false, method: undefined },
|
|
8106
|
+
{ route: '/__sitemap__/debug.json', handler: _xIZ_0x, lazy: false, middleware: false, method: undefined },
|
|
8107
|
+
{ route: '/__sitemap__/style.xsl', handler: _4BAWff, lazy: false, middleware: false, method: undefined },
|
|
8108
|
+
{ route: '/sitemap.xml', handler: _n1jDWd, lazy: false, middleware: false, method: undefined },
|
|
8109
|
+
{ route: '/__link-checker__/inspect', handler: _3rIYDU, lazy: false, middleware: false, method: undefined },
|
|
8110
|
+
{ route: '/__link-checker__/links', handler: _Rhm_9d, lazy: false, middleware: false, method: undefined },
|
|
8111
|
+
{ route: '/__link-checker__/debug.json', handler: _tz9NUt, lazy: false, middleware: false, method: undefined },
|
|
8112
|
+
{ route: '', handler: _vGgZzc, lazy: false, middleware: true, method: undefined },
|
|
7066
8113
|
{ route: '/api/_auth/session', handler: _MGSDdR, lazy: false, middleware: false, method: "delete" },
|
|
7067
8114
|
{ route: '/api/_auth/session', handler: _7djcCh, lazy: false, middleware: false, method: "get" },
|
|
7068
8115
|
{ route: '/__nuxt_island/**', handler: _SxA8c9, lazy: false, middleware: false, method: undefined },
|
|
7069
|
-
{ route: '/__nuxt_content/:collection/sql_dump', handler:
|
|
7070
|
-
{ route: '/__nuxt_content/:collection/query', handler:
|
|
7071
|
-
{ route: '/_ipx/**', handler:
|
|
7072
|
-
{ route: '/_fonts/**', handler:
|
|
7073
|
-
{ route: '/_scripts/**', handler:
|
|
7074
|
-
{ route: '/**', handler:
|
|
8116
|
+
{ route: '/__nuxt_content/:collection/sql_dump.txt', handler: _rFIeAt, lazy: false, middleware: false, method: undefined },
|
|
8117
|
+
{ route: '/__nuxt_content/:collection/query', handler: _1L1dwH, lazy: false, middleware: false, method: undefined },
|
|
8118
|
+
{ route: '/_ipx/**', handler: _O1mb7t, lazy: false, middleware: false, method: undefined },
|
|
8119
|
+
{ route: '/_fonts/**', handler: _lazy_MPEx63, lazy: true, middleware: false, method: undefined },
|
|
8120
|
+
{ route: '/_scripts/**', handler: _lazy_MPEx63, lazy: true, middleware: false, method: undefined },
|
|
8121
|
+
{ route: '/**', handler: _lazy_MPEx63, lazy: true, middleware: false, method: undefined }
|
|
7075
8122
|
];
|
|
7076
8123
|
|
|
7077
8124
|
function createNitroApp() {
|
|
@@ -7304,10 +8351,10 @@ const template$1 = (messages) => {
|
|
|
7304
8351
|
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>";
|
|
7305
8352
|
};
|
|
7306
8353
|
|
|
7307
|
-
const errorDev = /*#__PURE__*/Object.freeze({
|
|
8354
|
+
const errorDev = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7308
8355
|
__proto__: null,
|
|
7309
8356
|
template: template$1
|
|
7310
|
-
});
|
|
8357
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7311
8358
|
|
|
7312
8359
|
const sources$1 = [
|
|
7313
8360
|
{
|
|
@@ -7339,51 +8386,51 @@ const sources$1 = [
|
|
|
7339
8386
|
},
|
|
7340
8387
|
"urls": [
|
|
7341
8388
|
{
|
|
7342
|
-
"loc": "/
|
|
8389
|
+
"loc": "/"
|
|
7343
8390
|
},
|
|
7344
8391
|
{
|
|
7345
|
-
"loc": "/"
|
|
8392
|
+
"loc": "/_ignis-info"
|
|
7346
8393
|
},
|
|
7347
8394
|
{
|
|
7348
|
-
"loc": "/
|
|
8395
|
+
"loc": "/_ignis-config"
|
|
7349
8396
|
}
|
|
7350
8397
|
],
|
|
7351
8398
|
"sourceType": "app"
|
|
7352
8399
|
}
|
|
7353
8400
|
];
|
|
7354
8401
|
|
|
7355
|
-
const globalSources = /*#__PURE__*/Object.freeze({
|
|
8402
|
+
const globalSources = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7356
8403
|
__proto__: null,
|
|
7357
8404
|
sources: sources$1
|
|
7358
|
-
});
|
|
8405
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7359
8406
|
|
|
7360
8407
|
const sources = {};
|
|
7361
8408
|
|
|
7362
|
-
const childSources = /*#__PURE__*/Object.freeze({
|
|
8409
|
+
const childSources = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7363
8410
|
__proto__: null,
|
|
7364
8411
|
sources: sources
|
|
7365
|
-
});
|
|
8412
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7366
8413
|
|
|
7367
8414
|
const server = () => {};
|
|
7368
8415
|
|
|
7369
|
-
const server$1 = /*#__PURE__*/Object.freeze({
|
|
8416
|
+
const server$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7370
8417
|
__proto__: null,
|
|
7371
8418
|
default: server
|
|
7372
|
-
});
|
|
8419
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7373
8420
|
|
|
7374
8421
|
const template = "";
|
|
7375
8422
|
|
|
7376
|
-
const _virtual__spaTemplate = /*#__PURE__*/Object.freeze({
|
|
8423
|
+
const _virtual__spaTemplate = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7377
8424
|
__proto__: null,
|
|
7378
8425
|
template: template
|
|
7379
|
-
});
|
|
8426
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7380
8427
|
|
|
7381
8428
|
const styles = {};
|
|
7382
8429
|
|
|
7383
|
-
const styles$1 = /*#__PURE__*/Object.freeze({
|
|
8430
|
+
const styles$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7384
8431
|
__proto__: null,
|
|
7385
8432
|
default: styles
|
|
7386
|
-
});
|
|
8433
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7387
8434
|
|
|
7388
8435
|
const neonTest = defineEventHandler(async () => {
|
|
7389
8436
|
const config = useRuntimeConfig().public.ignis;
|
|
@@ -7403,10 +8450,10 @@ const neonTest = defineEventHandler(async () => {
|
|
|
7403
8450
|
}
|
|
7404
8451
|
});
|
|
7405
8452
|
|
|
7406
|
-
const neonTest$1 = /*#__PURE__*/Object.freeze({
|
|
8453
|
+
const neonTest$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7407
8454
|
__proto__: null,
|
|
7408
8455
|
default: neonTest
|
|
7409
|
-
});
|
|
8456
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7410
8457
|
|
|
7411
8458
|
function renderPayloadResponse(ssrContext) {
|
|
7412
8459
|
return {
|
|
@@ -7543,6 +8590,7 @@ const renderer = defineRenderHandler(async (event) => {
|
|
|
7543
8590
|
});
|
|
7544
8591
|
}
|
|
7545
8592
|
if (!routeOptions.noScripts) {
|
|
8593
|
+
const tagPosition = "head";
|
|
7546
8594
|
ssrContext.head.push({
|
|
7547
8595
|
script: Object.values(scripts).map((resource) => ({
|
|
7548
8596
|
type: resource.module ? "module" : null,
|
|
@@ -7550,7 +8598,7 @@ const renderer = defineRenderHandler(async (event) => {
|
|
|
7550
8598
|
defer: resource.module ? null : true,
|
|
7551
8599
|
// if we are rendering script tag payloads that import an async payload
|
|
7552
8600
|
// we need to ensure this resolves before executing the Nuxt entry
|
|
7553
|
-
tagPosition
|
|
8601
|
+
tagPosition,
|
|
7554
8602
|
crossorigin: ""
|
|
7555
8603
|
}))
|
|
7556
8604
|
}, headEntryOptions);
|
|
@@ -7594,8 +8642,8 @@ function renderHTMLDocument(html) {
|
|
|
7594
8642
|
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>`;
|
|
7595
8643
|
}
|
|
7596
8644
|
|
|
7597
|
-
const renderer$1 = /*#__PURE__*/Object.freeze({
|
|
8645
|
+
const renderer$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7598
8646
|
__proto__: null,
|
|
7599
8647
|
default: renderer
|
|
7600
|
-
});
|
|
8648
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7601
8649
|
//# sourceMappingURL=index.mjs.map
|