@i18n-micro/utils 1.0.15 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accept-language.cjs +1 -1
- package/dist/active-locales.cjs +1 -1
- package/dist/app-path.cjs +1 -1
- package/dist/app-path.d.cts +12 -0
- package/dist/app-path.d.ts +12 -0
- package/dist/app-path.mjs +61 -4
- package/dist/auto-detect-path.cjs +1 -1
- package/dist/auto-detect-path.mjs +2 -4
- package/dist/build.cjs +1 -1
- package/dist/build.mjs +42 -42
- package/dist/cache-control.cjs +1 -1
- package/dist/cache-control.mjs +4 -6
- package/dist/cookie.cjs +1 -1
- package/dist/cookie.mjs +14 -14
- package/dist/deep-merge.cjs +1 -1
- package/dist/deep-merge.mjs +4 -1
- package/dist/merge-i18n-head.cjs +1 -1
- package/dist/merge-i18n-head.mjs +22 -16
- package/dist/merge-source.cjs +1 -1
- package/dist/merge-source.mjs +36 -33
- package/dist/normalize.cjs +1 -1
- package/dist/parse-path.cjs +1 -1
- package/dist/parse-path.mjs +15 -7
- package/dist/payload-config.cjs +1 -1
- package/dist/payload-config.mjs +20 -28
- package/dist/payload-fetch.cjs +1 -1
- package/dist/payload-stats.cjs +1 -1
- package/dist/payload-stats.mjs +26 -23
- package/dist/payload-url.cjs +1 -1
- package/dist/payload-url.mjs +17 -17
- package/dist/resolve-hreflang.cjs +1 -1
- package/dist/resolve-hreflang.mjs +20 -9
- package/dist/resolve-locale.cjs +1 -1
- package/dist/resolve-og-locale.cjs +1 -1
- package/dist/resolve-og-locale.mjs +3 -7
- package/dist/route-pattern.cjs +1 -1
- package/dist/route.cjs +1 -1
- package/dist/route.mjs +22 -26
- package/dist/runtime-config.cjs +1 -1
- package/dist/runtime-config.mjs +17 -17
- package/dist/source-loader.cjs +1 -1
- package/dist/split-locale-routes.cjs +1 -1
- package/dist/split-locale-routes.mjs +13 -10
- package/package.json +7 -7
package/dist/parse-path.mjs
CHANGED
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
import { deepMergeTranslations as i } from "./deep-merge.mjs";
|
|
2
2
|
function l(e) {
|
|
3
3
|
const t = e.replace(/\\/g, "/");
|
|
4
|
-
if (!t.endsWith(".json"))
|
|
5
|
-
return { type: "ignore" };
|
|
4
|
+
if (!t.endsWith(".json")) return { type: "ignore" };
|
|
6
5
|
if (t.startsWith("pages/")) {
|
|
7
6
|
const n = t.match(/^pages\/(.+)\/([^/]+)\.json$/);
|
|
8
|
-
if (!n?.[1] || !n[2])
|
|
9
|
-
return { type: "ignore" };
|
|
7
|
+
if (!n?.[1] || !n[2]) return { type: "ignore" };
|
|
10
8
|
const r = p(n[1].split("/"));
|
|
11
|
-
return r ? {
|
|
9
|
+
return r ? {
|
|
10
|
+
type: "page",
|
|
11
|
+
pageName: r,
|
|
12
|
+
locale: n[2]
|
|
13
|
+
} : { type: "ignore" };
|
|
12
14
|
}
|
|
13
15
|
const o = t.match(/^([^/]+)\.json$/);
|
|
14
|
-
return o?.[1] ? {
|
|
16
|
+
return o?.[1] ? {
|
|
17
|
+
type: "root",
|
|
18
|
+
locale: o[1]
|
|
19
|
+
} : { type: "ignore" };
|
|
15
20
|
}
|
|
16
21
|
function s(e, t = !1) {
|
|
17
22
|
const o = l(e);
|
|
18
|
-
return t && o.type === "page" ? {
|
|
23
|
+
return t && o.type === "page" ? {
|
|
24
|
+
type: "root",
|
|
25
|
+
locale: o.locale
|
|
26
|
+
} : o;
|
|
19
27
|
}
|
|
20
28
|
function p(e) {
|
|
21
29
|
return e.length === 0 ? null : e.join("-");
|
package/dist/payload-config.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let i=require("node:path");var u=500,d=10485760;function s(e){return e.translationPayloads?.mode==="source"?"source":"premerged"}function c(e){const a=s(e),r=a==="source";return{mode:a,serverAssets:e.translationPayloads?.serverAssets!==!1,serverHandler:e.translationPayloads?.serverHandler!==!1,publicAssets:r?e.translationPayloads?.publicAssets===!0:e.translationPayloads?.publicAssets!==!1,prerenderRoutes:e.translationPayloads?.prerenderRoutes===!0,publicDir:e.translationPayloads?.publicDir,warnFileCount:e.translationPayloads?.warnFileCount,warnSizeBytes:e.translationPayloads?.warnSizeBytes}}function n(e,a){const r=e.translationPayloads?.publicDir;return r!=null&&String(r).length>0?String(r).replace(/^\/+|\/+$/g,"").replace(/\/{2,}/g,"/")||"_locales":(a??e.apiBaseUrl??"_locales").replace(/^\/+|\/+$/g,"").replace(/\/{2,}/g,"/")||"_locales"}function y(e,a,r){return(0,i.join)(e??"./dist",n(a,r))}function P(e,a){return e.publicAssets?!0:a&&e.serverAssets}function p(e,a){return!a&&e.serverAssets}function A(e){return{warnFileCount:e?.warnFileCount??500,warnSizeBytes:e?.warnSizeBytes??10485760}}function l(e){return e.serverAssets||e.serverHandler||e.publicAssets||e.prerenderRoutes}function T(e){const a=[];return!e.translationPayloads.serverAssets&&!e.translationPayloads.publicAssets&&!e.apiBaseServerHost&&a.push("[nuxt-i18n-micro] translationPayloads.serverAssets and publicAssets are false and apiBaseServerHost is not set. SSR will load empty translations unless you provide an external server payload host."),l(e.translationPayloads)||(e.apiBaseServerHost||a.push("[nuxt-i18n-micro] translationPayloads disabled all local outputs but apiBaseServerHost is not set. SSR will load empty translations unless you provide an external server payload host."),e.apiBaseClientHost||a.push("[nuxt-i18n-micro] translationPayloads disabled all local outputs but apiBaseClientHost is not set. Client-side navigation may load empty translations unless you provide an external client payload host.")),a}function t(e){return e>=1048576?`${(e/1048576).toFixed(1)} MB`:e>=1024?`${(e/1024).toFixed(1)} KB`:`${e} B`}function v(e,a){const r=a?.warnFileCount??500,o=a?.warnSizeBytes??10485760;return e.fileCount<r&&e.totalBytes<o?null:`[nuxt-i18n-micro] Generated translation payloads are large (${e.fileCount} files, ${t(e.totalBytes)}). Consider translationPayloads.mode: 'source' for public output, hosting payloads externally, or disabling unused public/prerender outputs.`}exports.DEFAULT_TRANSLATION_PAYLOAD_WARN_FILE_COUNT=u;exports.DEFAULT_TRANSLATION_PAYLOAD_WARN_SIZE_BYTES=d;exports.formatBytes=t;exports.getTranslationPayloadMisconfigurationWarnings=T;exports.getTranslationPayloadSizeWarning=v;exports.hasLocalTranslationPayloadOutput=l;exports.resolveTranslationPayloadMode=s;exports.resolveTranslationPayloadOptions=c;exports.resolveTranslationPayloadPublicDir=y;exports.resolveTranslationPayloadPublicRel=n;exports.resolveTranslationPayloadWarningThresholds=A;exports.shouldCopyTranslationPayloadsToPublic=P;exports.shouldRegisterNitroServerAssets=p;
|
package/dist/payload-config.mjs
CHANGED
|
@@ -1,29 +1,27 @@
|
|
|
1
|
-
import { join as
|
|
2
|
-
|
|
3
|
-
function
|
|
1
|
+
import { join as n } from "node:path";
|
|
2
|
+
var d = 500, c = 10485760;
|
|
3
|
+
function t(e) {
|
|
4
4
|
return e.translationPayloads?.mode === "source" ? "source" : "premerged";
|
|
5
5
|
}
|
|
6
6
|
function y(e) {
|
|
7
|
-
const a =
|
|
7
|
+
const a = t(e), r = a === "source";
|
|
8
8
|
return {
|
|
9
9
|
mode: a,
|
|
10
10
|
serverAssets: e.translationPayloads?.serverAssets !== !1,
|
|
11
11
|
serverHandler: e.translationPayloads?.serverHandler !== !1,
|
|
12
12
|
publicAssets: r ? e.translationPayloads?.publicAssets === !0 : e.translationPayloads?.publicAssets !== !1,
|
|
13
|
-
// Off by default: prerendering `/_locales` without a live handler writes empty public stubs.
|
|
14
|
-
// Opt in when you need static `/{apiBaseUrl}/.../data.json` and payloads are already available.
|
|
15
13
|
prerenderRoutes: e.translationPayloads?.prerenderRoutes === !0,
|
|
16
14
|
publicDir: e.translationPayloads?.publicDir,
|
|
17
15
|
warnFileCount: e.translationPayloads?.warnFileCount,
|
|
18
16
|
warnSizeBytes: e.translationPayloads?.warnSizeBytes
|
|
19
17
|
};
|
|
20
18
|
}
|
|
21
|
-
function
|
|
19
|
+
function l(e, a) {
|
|
22
20
|
const r = e.translationPayloads?.publicDir;
|
|
23
21
|
return r != null && String(r).length > 0 ? String(r).replace(/^\/+|\/+$/g, "").replace(/\/{2,}/g, "/") || "_locales" : (a ?? e.apiBaseUrl ?? "_locales").replace(/^\/+|\/+$/g, "").replace(/\/{2,}/g, "/") || "_locales";
|
|
24
22
|
}
|
|
25
23
|
function p(e, a, r) {
|
|
26
|
-
return
|
|
24
|
+
return n(e ?? "./dist", l(a, r));
|
|
27
25
|
}
|
|
28
26
|
function f(e, a) {
|
|
29
27
|
return e.publicAssets ? !0 : a && e.serverAssets;
|
|
@@ -33,41 +31,35 @@ function v(e, a) {
|
|
|
33
31
|
}
|
|
34
32
|
function A(e) {
|
|
35
33
|
return {
|
|
36
|
-
warnFileCount: e?.warnFileCount ??
|
|
37
|
-
warnSizeBytes: e?.warnSizeBytes ??
|
|
34
|
+
warnFileCount: e?.warnFileCount ?? 500,
|
|
35
|
+
warnSizeBytes: e?.warnSizeBytes ?? 10485760
|
|
38
36
|
};
|
|
39
37
|
}
|
|
40
|
-
function
|
|
38
|
+
function o(e) {
|
|
41
39
|
return e.serverAssets || e.serverHandler || e.publicAssets || e.prerenderRoutes;
|
|
42
40
|
}
|
|
43
41
|
function P(e) {
|
|
44
42
|
const a = [];
|
|
45
|
-
return !e.translationPayloads.serverAssets && !e.translationPayloads.publicAssets && !e.apiBaseServerHost && a.push(
|
|
46
|
-
"[nuxt-i18n-micro] translationPayloads.serverAssets and publicAssets are false and apiBaseServerHost is not set. SSR will load empty translations unless you provide an external server payload host."
|
|
47
|
-
), u(e.translationPayloads) || (e.apiBaseServerHost || a.push(
|
|
48
|
-
"[nuxt-i18n-micro] translationPayloads disabled all local outputs but apiBaseServerHost is not set. SSR will load empty translations unless you provide an external server payload host."
|
|
49
|
-
), e.apiBaseClientHost || a.push(
|
|
50
|
-
"[nuxt-i18n-micro] translationPayloads disabled all local outputs but apiBaseClientHost is not set. Client-side navigation may load empty translations unless you provide an external client payload host."
|
|
51
|
-
)), a;
|
|
43
|
+
return !e.translationPayloads.serverAssets && !e.translationPayloads.publicAssets && !e.apiBaseServerHost && a.push("[nuxt-i18n-micro] translationPayloads.serverAssets and publicAssets are false and apiBaseServerHost is not set. SSR will load empty translations unless you provide an external server payload host."), o(e.translationPayloads) || (e.apiBaseServerHost || a.push("[nuxt-i18n-micro] translationPayloads disabled all local outputs but apiBaseServerHost is not set. SSR will load empty translations unless you provide an external server payload host."), e.apiBaseClientHost || a.push("[nuxt-i18n-micro] translationPayloads disabled all local outputs but apiBaseClientHost is not set. Client-side navigation may load empty translations unless you provide an external client payload host.")), a;
|
|
52
44
|
}
|
|
53
|
-
function
|
|
54
|
-
return e >=
|
|
45
|
+
function i(e) {
|
|
46
|
+
return e >= 1048576 ? `${(e / 1048576).toFixed(1)} MB` : e >= 1024 ? `${(e / 1024).toFixed(1)} KB` : `${e} B`;
|
|
55
47
|
}
|
|
56
48
|
function S(e, a) {
|
|
57
|
-
const r = a?.warnFileCount ??
|
|
58
|
-
return e.fileCount < r && e.totalBytes < s ? null : `[nuxt-i18n-micro] Generated translation payloads are large (${e.fileCount} files, ${
|
|
49
|
+
const r = a?.warnFileCount ?? 500, s = a?.warnSizeBytes ?? 10485760;
|
|
50
|
+
return e.fileCount < r && e.totalBytes < s ? null : `[nuxt-i18n-micro] Generated translation payloads are large (${e.fileCount} files, ${i(e.totalBytes)}). Consider translationPayloads.mode: 'source' for public output, hosting payloads externally, or disabling unused public/prerender outputs.`;
|
|
59
51
|
}
|
|
60
52
|
export {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
d as DEFAULT_TRANSLATION_PAYLOAD_WARN_FILE_COUNT,
|
|
54
|
+
c as DEFAULT_TRANSLATION_PAYLOAD_WARN_SIZE_BYTES,
|
|
55
|
+
i as formatBytes,
|
|
64
56
|
P as getTranslationPayloadMisconfigurationWarnings,
|
|
65
57
|
S as getTranslationPayloadSizeWarning,
|
|
66
|
-
|
|
67
|
-
|
|
58
|
+
o as hasLocalTranslationPayloadOutput,
|
|
59
|
+
t as resolveTranslationPayloadMode,
|
|
68
60
|
y as resolveTranslationPayloadOptions,
|
|
69
61
|
p as resolveTranslationPayloadPublicDir,
|
|
70
|
-
|
|
62
|
+
l as resolveTranslationPayloadPublicRel,
|
|
71
63
|
A as resolveTranslationPayloadWarningThresholds,
|
|
72
64
|
f as shouldCopyTranslationPayloadsToPublic,
|
|
73
65
|
v as shouldRegisterNitroServerAssets
|
package/dist/payload-fetch.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./normalize.cjs"),l=require("./payload-url.cjs");async function u(e,r,t,s){if(!e.apiBaseServerHost)return{};const a=l.buildTranslationPayloadFetchRequest({apiBaseUrl:e.apiBaseUrl??"_locales",routeName:t,locale:r,isServer:!0,baseURL:e.apiBaseServerHost,apiBaseServerHost:e.apiBaseServerHost,dateBuild:e.dateBuild});try{const o=await s(a.path,{baseURL:a.baseURL,params:a.params});return i.toTranslations(o)}catch{return{}}}exports.fetchTranslationPayloadFromHost=u;
|
package/dist/payload-stats.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let u=require("node:path"),y=require("node:crypto"),s=require("node:fs"),c=require("node:zlib");function f(n,e){for(const t of(0,s.readdirSync)(n,{withFileTypes:!0})){const o=(0,u.join)(n,t.name);t.isDirectory()?f(o,e):t.name.endsWith(".json")&&e.push(o)}}function S(n){const e={fileCount:0,totalBytes:0};if(!(0,s.existsSync)(n))return e;const t=[];f(n,t);for(const o of t)e.fileCount+=1,e.totalBytes+=(0,s.statSync)(o).size;return e}function d(n,e){const t=(0,y.createHash)("sha256");let o=0;for(const a of n){const l=(0,u.join)(a,e);if(!(0,s.existsSync)(l))continue;const r=[];f(l,r),r.sort();for(const i of r)t.update((0,u.relative)(l,i)),t.update("\0"),t.update((0,s.readFileSync)(i)),o+=1}return o>0?t.digest("hex").slice(0,16):null}var h=1024;function T(n,e){if(!e||!(0,s.existsSync)(n))return 0;const t=e===!0||e.gzip!==!1,o=e===!0||e.brotli!==!1;if(!t&&!o)return 0;const a=[];f(n,a);let l=0;for(const r of a){const i=(0,s.readFileSync)(r);i.length<h||(t&&(0,s.writeFileSync)(`${r}.gz`,(0,c.gzipSync)(i,{level:9})),o&&(0,s.writeFileSync)(`${r}.br`,(0,c.brotliCompressSync)(i,{params:{[c.constants.BROTLI_PARAM_QUALITY]:11,[c.constants.BROTLI_PARAM_SIZE_HINT]:i.length}})),l+=1)}return l}exports.compressTranslationPayloads=T;exports.hashTranslationSources=d;exports.scanTranslationPayloadDirectory=S;
|
package/dist/payload-stats.mjs
CHANGED
|
@@ -1,49 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { join as y, relative as p } from "node:path";
|
|
2
|
+
import { createHash as S } from "node:crypto";
|
|
3
|
+
import { existsSync as a, readFileSync as h, readdirSync as m, statSync as T, writeFileSync as c } from "node:fs";
|
|
4
|
+
import { brotliCompressSync as d, constants as u, gzipSync as _ } from "node:zlib";
|
|
5
5
|
function f(n, t) {
|
|
6
6
|
for (const e of m(n, { withFileTypes: !0 })) {
|
|
7
|
-
const o =
|
|
7
|
+
const o = y(n, e.name);
|
|
8
8
|
e.isDirectory() ? f(o, t) : e.name.endsWith(".json") && t.push(o);
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
function A(n) {
|
|
12
|
-
const t = {
|
|
13
|
-
|
|
12
|
+
const t = {
|
|
13
|
+
fileCount: 0,
|
|
14
|
+
totalBytes: 0
|
|
15
|
+
};
|
|
16
|
+
if (!a(n)) return t;
|
|
14
17
|
const e = [];
|
|
15
18
|
f(n, e);
|
|
16
19
|
for (const o of e)
|
|
17
|
-
t.fileCount += 1, t.totalBytes +=
|
|
20
|
+
t.fileCount += 1, t.totalBytes += T(o).size;
|
|
18
21
|
return t;
|
|
19
22
|
}
|
|
20
23
|
function B(n, t) {
|
|
21
|
-
const e =
|
|
24
|
+
const e = S("sha256");
|
|
22
25
|
let o = 0;
|
|
23
26
|
for (const l of n) {
|
|
24
|
-
const i =
|
|
25
|
-
if (!
|
|
26
|
-
const
|
|
27
|
-
f(i,
|
|
28
|
-
for (const
|
|
29
|
-
e.update(
|
|
27
|
+
const i = y(l, t);
|
|
28
|
+
if (!a(i)) continue;
|
|
29
|
+
const r = [];
|
|
30
|
+
f(i, r), r.sort();
|
|
31
|
+
for (const s of r)
|
|
32
|
+
e.update(p(i, s)), e.update("\0"), e.update(h(s)), o += 1;
|
|
30
33
|
}
|
|
31
34
|
return o > 0 ? e.digest("hex").slice(0, 16) : null;
|
|
32
35
|
}
|
|
33
|
-
|
|
36
|
+
var g = 1024;
|
|
34
37
|
function b(n, t) {
|
|
35
|
-
if (!t || !
|
|
38
|
+
if (!t || !a(n)) return 0;
|
|
36
39
|
const e = t === !0 || t.gzip !== !1, o = t === !0 || t.brotli !== !1;
|
|
37
40
|
if (!e && !o) return 0;
|
|
38
41
|
const l = [];
|
|
39
42
|
f(n, l);
|
|
40
43
|
let i = 0;
|
|
41
|
-
for (const
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
), i += 1);
|
|
44
|
+
for (const r of l) {
|
|
45
|
+
const s = h(r);
|
|
46
|
+
s.length < g || (e && c(`${r}.gz`, _(s, { level: 9 })), o && c(`${r}.br`, d(s, { params: {
|
|
47
|
+
[u.BROTLI_PARAM_QUALITY]: 11,
|
|
48
|
+
[u.BROTLI_PARAM_SIZE_HINT]: s.length
|
|
49
|
+
} })), i += 1);
|
|
47
50
|
}
|
|
48
51
|
return i;
|
|
49
52
|
}
|
package/dist/payload-url.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function r(a,l){const e=a||"index";return l?.[e]??e}function o(a,l,e){return`/${a.replace(/^\/+|\/+$/g,"")}/${l}/${e}/data.json`.replace(/\/{2,}/g,"/")}function t(a){return(a.isServer?a.apiBaseServerHost:a.apiBaseClientHost)??a.baseURL}function n(a){const l=r(a.routeName,a.routesLocaleLinks);return{path:o(a.apiBaseUrl,l,a.locale),baseURL:t(a),params:a.dateBuild?{v:a.dateBuild}:void 0}}function i(a,l=!0){const e=Math.floor(a??0);return!Number.isSafeInteger(e)||e<=0?null:l?`public, max-age=${e}, immutable`:"public, max-age=0, must-revalidate"}exports.buildTranslationPayloadCacheControl=i;exports.buildTranslationPayloadFetchRequest=n;exports.buildTranslationPayloadPath=o;exports.resolveTranslationPayloadBaseURL=t;exports.resolveTranslationPayloadPage=r;
|
package/dist/payload-url.mjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
function l(a,
|
|
2
|
-
const
|
|
3
|
-
return
|
|
1
|
+
function l(a, r) {
|
|
2
|
+
const e = a || "index";
|
|
3
|
+
return r?.[e] ?? e;
|
|
4
4
|
}
|
|
5
|
-
function
|
|
6
|
-
return `/${a.replace(/^\/+|\/+$/g, "")}/${
|
|
5
|
+
function t(a, r, e) {
|
|
6
|
+
return `/${a.replace(/^\/+|\/+$/g, "")}/${r}/${e}/data.json`.replace(/\/{2,}/g, "/");
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function n(a) {
|
|
9
9
|
return (a.isServer ? a.apiBaseServerHost : a.apiBaseClientHost) ?? a.baseURL;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
const
|
|
11
|
+
function o(a) {
|
|
12
|
+
const r = l(a.routeName, a.routesLocaleLinks);
|
|
13
13
|
return {
|
|
14
|
-
path:
|
|
15
|
-
baseURL:
|
|
14
|
+
path: t(a.apiBaseUrl, r, a.locale),
|
|
15
|
+
baseURL: n(a),
|
|
16
16
|
params: a.dateBuild ? { v: a.dateBuild } : void 0
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
const
|
|
21
|
-
return !Number.isSafeInteger(
|
|
19
|
+
function s(a, r = !0) {
|
|
20
|
+
const e = Math.floor(a ?? 0);
|
|
21
|
+
return !Number.isSafeInteger(e) || e <= 0 ? null : r ? `public, max-age=${e}, immutable` : "public, max-age=0, must-revalidate";
|
|
22
22
|
}
|
|
23
23
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
s as buildTranslationPayloadCacheControl,
|
|
25
|
+
o as buildTranslationPayloadFetchRequest,
|
|
26
|
+
t as buildTranslationPayloadPath,
|
|
27
|
+
n as resolveTranslationPayloadBaseURL,
|
|
28
28
|
l as resolveTranslationPayloadPage
|
|
29
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function i(e){return e.iso?.trim()||String(e.code)}function u(e){const r=e.match(/^([A-Za-z]{2,3})(?:[-_](.+))?$/);return r?{language:r[1],region:r[2]}:{language:e}}function d(e,r={}){const{hreflangBaseLanguage:f=!1}=r;if(!f)return e.map(t=>{const o=String(t.code);return{hreflang:i(t),localeCode:o}});const g=new Map;for(const t of e){const o=String(t.code),a=i(t),{language:n,region:l}=u(a);n&&l&&!g.has(n)&&g.set(n,o),g.set(a,o)}const c=new Set,s=[];for(const t of e){const o=String(t.code),a=i(t),{language:n,region:l}=u(a);n&&l&&g.get(n)===o&&!c.has(n)&&(c.add(n),s.push({hreflang:n,localeCode:o})),c.has(a)||(c.add(a),s.push({hreflang:a,localeCode:o}))}return s}exports.resolveHreflangAlternates=d;
|
|
@@ -3,26 +3,37 @@ function u(n) {
|
|
|
3
3
|
}
|
|
4
4
|
function f(n) {
|
|
5
5
|
const r = n.match(/^([A-Za-z]{2,3})(?:[-_](.+))?$/);
|
|
6
|
-
return r ? {
|
|
6
|
+
return r ? {
|
|
7
|
+
language: r[1],
|
|
8
|
+
region: r[2]
|
|
9
|
+
} : { language: n };
|
|
7
10
|
}
|
|
8
11
|
function d(n, r = {}) {
|
|
9
12
|
const { hreflangBaseLanguage: l = !1 } = r;
|
|
10
|
-
if (!l)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
if (!l) return n.map((o) => {
|
|
14
|
+
const t = String(o.code);
|
|
15
|
+
return {
|
|
16
|
+
hreflang: u(o),
|
|
17
|
+
localeCode: t
|
|
18
|
+
};
|
|
19
|
+
});
|
|
15
20
|
const g = /* @__PURE__ */ new Map();
|
|
16
21
|
for (const o of n) {
|
|
17
22
|
const t = String(o.code), a = u(o), { language: e, region: i } = f(a);
|
|
18
23
|
e && i && !g.has(e) && g.set(e, t), g.set(a, t);
|
|
19
24
|
}
|
|
20
|
-
const
|
|
25
|
+
const c = /* @__PURE__ */ new Set(), s = [];
|
|
21
26
|
for (const o of n) {
|
|
22
27
|
const t = String(o.code), a = u(o), { language: e, region: i } = f(a);
|
|
23
|
-
e && i && g.get(e) === t && !
|
|
28
|
+
e && i && g.get(e) === t && !c.has(e) && (c.add(e), s.push({
|
|
29
|
+
hreflang: e,
|
|
30
|
+
localeCode: t
|
|
31
|
+
})), c.has(a) || (c.add(a), s.push({
|
|
32
|
+
hreflang: a,
|
|
33
|
+
localeCode: t
|
|
34
|
+
}));
|
|
24
35
|
}
|
|
25
|
-
return
|
|
36
|
+
return s;
|
|
26
37
|
}
|
|
27
38
|
export {
|
|
28
39
|
d as resolveHreflangAlternates
|
package/dist/resolve-locale.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./accept-language.cjs");function d(i){const{defaultLocale:n,validLocales:e,autoDetectLanguage:s,hasLocaleInUrl:c,urlLocale:l,queryLocale:r,cookieLocale:t,acceptLanguageHeader:o}=i;let a=n,u=!1;return c&&l&&e.includes(l)?(a=l,u=!0):r&&e.includes(r)?(a=r,u=!0):t&&e.includes(t)&&(a=t,u=!0),L.applyAutoDetectLanguage(a,u,s,o??void 0,e)}function f(i){const{defaultLocale:n,validLocales:e,autoDetectLanguage:s,stateLocale:c,cookieLocale:l,acceptLanguageHeader:r,ignoreStateLocale:t=!1}=i;let o=n,a=!1;return!t&&c&&e.includes(c)?(o=c,a=!0):l&&e.includes(l)&&(o=l,a=!0),L.applyAutoDetectLanguage(o,a,s,r??void 0,e)}exports.resolvePreferredLocale=f;exports.resolveServerLocale=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function l(n){const t=n.og?.trim();if(t)return t;const e=n.iso?.trim();if(!e)return null;const r=e.indexOf("_");if(r>0){const s=e.slice(0,r),o=e.slice(r+1);if(s.length>=2&&o.length===2)return`${s.toLowerCase()}_${o.toUpperCase()}`}const i=e.indexOf("-");if(i>0){const s=e.slice(0,i),o=e.slice(i+1);if(s.length>=2&&o.length===2&&/^[A-Za-z]{2}$/.test(o))return`${s.toLowerCase()}_${o.toUpperCase()}`}return null}function c(n,t={}){if(l(n)!==null||t.missingWarn===!1||process.env.NODE_ENV==="production")return;const e=t.tag??"og:locale",r=String(n.code??"unknown"),i=n.iso?`, iso: '${n.iso}'`:"";console.warn(`[i18n] Cannot derive ${e} for locale '${r}'${i}. Set locale.og (e.g. 'en_US') or use iso with a 2-letter region (e.g. 'en-US').`)}exports.resolveOgLocale=l;exports.warnUnresolvedOgLocale=c;
|
|
@@ -6,23 +6,19 @@ function c(n) {
|
|
|
6
6
|
const r = e.indexOf("_");
|
|
7
7
|
if (r > 0) {
|
|
8
8
|
const s = e.slice(0, r), o = e.slice(r + 1);
|
|
9
|
-
if (s.length >= 2 && o.length === 2)
|
|
10
|
-
return `${s.toLowerCase()}_${o.toUpperCase()}`;
|
|
9
|
+
if (s.length >= 2 && o.length === 2) return `${s.toLowerCase()}_${o.toUpperCase()}`;
|
|
11
10
|
}
|
|
12
11
|
const i = e.indexOf("-");
|
|
13
12
|
if (i > 0) {
|
|
14
13
|
const s = e.slice(0, i), o = e.slice(i + 1);
|
|
15
|
-
if (s.length >= 2 && o.length === 2 && /^[A-Za-z]{2}$/.test(o))
|
|
16
|
-
return `${s.toLowerCase()}_${o.toUpperCase()}`;
|
|
14
|
+
if (s.length >= 2 && o.length === 2 && /^[A-Za-z]{2}$/.test(o)) return `${s.toLowerCase()}_${o.toUpperCase()}`;
|
|
17
15
|
}
|
|
18
16
|
return null;
|
|
19
17
|
}
|
|
20
18
|
function l(n, t = {}) {
|
|
21
19
|
if (c(n) !== null || t.missingWarn === !1 || process.env.NODE_ENV === "production") return;
|
|
22
20
|
const e = t.tag ?? "og:locale", r = String(n.code ?? "unknown"), i = n.iso ? `, iso: '${n.iso}'` : "";
|
|
23
|
-
console.warn(
|
|
24
|
-
`[i18n] Cannot derive ${e} for locale '${r}'${i}. Set locale.og (e.g. 'en_US') or use iso with a 2-letter region (e.g. 'en-US').`
|
|
25
|
-
);
|
|
21
|
+
console.warn(`[i18n] Cannot derive ${e} for locale '${r}'${i}. Set locale.og (e.g. 'en_US') or use iso with a 2-letter region (e.g. 'en-US').`);
|
|
26
22
|
}
|
|
27
23
|
export {
|
|
28
24
|
c as resolveOgLocale,
|
package/dist/route-pattern.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function a(e){return e.replace(/\/:locale\([^)]+\)/g,"").replace(/\/:([^()]+)\(\)/g,"/[$1]").replace(/\/:([^()]+)/g,"/[$1]")}function o(e,r="localized-"){if(!e)return;const t=e.replace(r,"");return t.length>0?t:void 0}function i(e){return e?`/${e}`:void 0}function n(e){return e.replace(/^\//,"")}exports.extractBaseRoutePattern=a;exports.routeNameToPath=i;exports.stripLeadingSlash=n;exports.stripLocalizedRouteNamePrefix=o;
|
package/dist/route.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./route-pattern.cjs");function u(e,t,h="localized-",d){const s=e.path,r=e.name?.toString(),o=a.stripLocalizedRouteNamePrefix(r,h),c=a.routeNameToPath(o);let i=r&&t?.[r]||o&&t?.[o]||c&&t?.[c]||c&&t?.[a.stripLeadingSlash(c)]||t?.[s]||s&&t?.[a.stripLeadingSlash(s)];if(!i&&t&&d?.length){const n=s.split("/").filter(Boolean),f=n[0];if(f&&d.includes(f)&&n.length>1){const l=`/${n.slice(1).join("/")}`,m=l==="/"?"/":a.stripLeadingSlash(l);i=t[l]??t[m]??void 0}}if(!i&&e.matched&&e.matched.length>0){const n=e.matched[0];if(!n)return null;const f=a.extractBaseRoutePattern(n.path);t?.[f]&&(i=t[f])}return i||null}function p(e,t,h,d="localized-"){if(!t)return!1;const s=e.path,r=e.name?.toString(),o=a.stripLocalizedRouteNamePrefix(r,d),c=a.routeNameToPath(o),i=n=>n===void 0?!1:typeof n=="boolean"?n:Array.isArray(n)&&h?n.includes(h):!1;if(i(t[s])||r&&i(t[r])||o&&i(t[o])||c&&i(t[c]))return!0;if(e.matched&&e.matched.length>0){const n=e.matched[0];if(!n)return!1;if(i(t[a.extractBaseRoutePattern(n.path)]))return!0}return!1}exports.findAllowedLocalesForRoute=u;exports.isMetaDisabledForRoute=p;
|
package/dist/route.mjs
CHANGED
|
@@ -1,38 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
function
|
|
3
|
-
const
|
|
4
|
-
let
|
|
5
|
-
if (!
|
|
6
|
-
const n =
|
|
7
|
-
if (
|
|
8
|
-
const s = `/${n.slice(1).join("/")}`,
|
|
9
|
-
|
|
1
|
+
import { extractBaseRoutePattern as l, routeNameToPath as p, stripLeadingSlash as d, stripLocalizedRouteNamePrefix as R } from "./route-pattern.mjs";
|
|
2
|
+
function P(i, t, c = "localized-", m) {
|
|
3
|
+
const h = i.path, f = i.name?.toString(), o = R(f, c), r = p(o);
|
|
4
|
+
let e = f && t?.[f] || o && t?.[o] || r && t?.[r] || r && t?.[d(r)] || t?.[h] || h && t?.[d(h)];
|
|
5
|
+
if (!e && t && m?.length) {
|
|
6
|
+
const n = h.split("/").filter(Boolean), a = n[0];
|
|
7
|
+
if (a && m.includes(a) && n.length > 1) {
|
|
8
|
+
const s = `/${n.slice(1).join("/")}`, g = s === "/" ? "/" : d(s);
|
|
9
|
+
e = t[s] ?? t[g] ?? void 0;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
if (!
|
|
13
|
-
const n =
|
|
12
|
+
if (!e && i.matched && i.matched.length > 0) {
|
|
13
|
+
const n = i.matched[0];
|
|
14
14
|
if (!n) return null;
|
|
15
|
-
const
|
|
16
|
-
t?.[
|
|
15
|
+
const a = l(n.path);
|
|
16
|
+
t?.[a] && (e = t[a]);
|
|
17
17
|
}
|
|
18
|
-
return
|
|
18
|
+
return e || null;
|
|
19
19
|
}
|
|
20
|
-
function z(
|
|
21
|
-
if (!t)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (i
|
|
25
|
-
|
|
26
|
-
if (e.matched && e.matched.length > 0) {
|
|
27
|
-
const n = e.matched[0];
|
|
20
|
+
function z(i, t, c, m = "localized-") {
|
|
21
|
+
if (!t) return !1;
|
|
22
|
+
const h = i.path, f = i.name?.toString(), o = R(f, m), r = p(o), e = (n) => n === void 0 ? !1 : typeof n == "boolean" ? n : Array.isArray(n) && c ? n.includes(c) : !1;
|
|
23
|
+
if (e(t[h]) || f && e(t[f]) || o && e(t[o]) || r && e(t[r])) return !0;
|
|
24
|
+
if (i.matched && i.matched.length > 0) {
|
|
25
|
+
const n = i.matched[0];
|
|
28
26
|
if (!n) return !1;
|
|
29
|
-
|
|
30
|
-
if (i(t[f]))
|
|
31
|
-
return !0;
|
|
27
|
+
if (e(t[l(n.path)])) return !0;
|
|
32
28
|
}
|
|
33
29
|
return !1;
|
|
34
30
|
}
|
|
35
31
|
export {
|
|
36
|
-
|
|
32
|
+
P as findAllowedLocalesForRoute,
|
|
37
33
|
z as isMetaDisabledForRoute
|
|
38
34
|
};
|
package/dist/runtime-config.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function o(e){if(typeof e!="string")return;const t=e.trim();return t.length>0?t:void 0}function L(e){if(Array.isArray(e)){const t=e.map(l=>o(l)).filter(l=>!!l);return t.length>0?t:void 0}if(typeof e=="string"){const t=e.split(",").map(l=>l.trim()).filter(l=>l.length>0);return t.length>0?t:void 0}}function m(){return{defaultLocale:o(process.env.NUXT_I18N_DEFAULT_LOCALE)??o(process.env.NUXT_PUBLIC_I18N_RUNTIME_DEFAULT_LOCALE),fallbackLocale:o(process.env.NUXT_I18N_FALLBACK_LOCALE)??o(process.env.NUXT_PUBLIC_I18N_RUNTIME_FALLBACK_LOCALE),disabledLocales:L(process.env.NUXT_I18N_DISABLED_LOCALES)??L(process.env.NUXT_PUBLIC_I18N_RUNTIME_DISABLED_LOCALES),strategy:o(process.env.NUXT_I18N_STRATEGY)??o(process.env.NUXT_PUBLIC_I18N_RUNTIME_STRATEGY)}}function g(e){const t=e?.i18nRuntime;if(!t||typeof t!="object")return{};const l=t;return{defaultLocale:o(l.defaultLocale),fallbackLocale:o(l.fallbackLocale),disabledLocales:L(l.disabledLocales),strategy:o(l.strategy)}}function v(e){return Object.assign({},e)}function b(e){return e.map(t=>v(t))}function y(e){const t=m(),l=g(e);return{defaultLocale:l.defaultLocale??t.defaultLocale,fallbackLocale:l.fallbackLocale??t.fallbackLocale,disabledLocales:l.disabledLocales??t.disabledLocales,strategy:l.strategy??t.strategy}}function p(e,t,l=a=>console.warn(a)){const a=y(t),n=b(e.locales??[]);if(a.strategy&&a.strategy!==e.strategy&&l(`[nuxt-i18n-micro] runtime i18n strategy override is ignored: "${a.strategy}" (build strategy: "${e.strategy}"). Build a separate artifact for each strategy.`),a.disabledLocales&&a.disabledLocales.length>0){const r=new Set(a.disabledLocales);for(const u of n)u.disabled=r.has(u.code)}const i=n.filter(r=>!r.disabled);if(i.length===0)return a.disabledLocales&&a.disabledLocales.length>0&&l("[nuxt-i18n-micro] runtime disabledLocales override would disable all locales; override ignored."),{...e,locales:b(e.locales??[])};const _=new Set(n.map(r=>r.code));let c=a.defaultLocale??e.defaultLocale,s=a.fallbackLocale??e.fallbackLocale;s&&!_.has(s)&&(l(`[nuxt-i18n-micro] runtime fallbackLocale "${s}" is not defined in locales; override ignored.`),s=e.fallbackLocale);const f=new Set(i.map(r=>r.code)),d=i[0]?.code??e.defaultLocale??"en";return(!c||!f.has(c))&&(a.defaultLocale?l(`[nuxt-i18n-micro] runtime defaultLocale "${a.defaultLocale}" is not enabled; falling back to "${d}".`):c&&!f.has(c)&&l(`[nuxt-i18n-micro] defaultLocale "${c}" is disabled by runtime overrides; falling back to "${d}".`),c=d),{...e,locales:n,defaultLocale:c,fallbackLocale:s}}exports.resolveI18nConfigWithRuntimeOverrides=p;
|
package/dist/runtime-config.mjs
CHANGED
|
@@ -32,13 +32,13 @@ function g(e) {
|
|
|
32
32
|
strategy: o(l.strategy)
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function p(e) {
|
|
36
36
|
return Object.assign({}, e);
|
|
37
37
|
}
|
|
38
38
|
function _(e) {
|
|
39
|
-
return e.map((a) =>
|
|
39
|
+
return e.map((a) => p(a));
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function v(e) {
|
|
42
42
|
const a = m(), l = g(e);
|
|
43
43
|
return {
|
|
44
44
|
defaultLocale: l.defaultLocale ?? a.defaultLocale,
|
|
@@ -48,26 +48,26 @@ function p(e) {
|
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
function y(e, a, l = (t) => console.warn(t)) {
|
|
51
|
-
const t =
|
|
52
|
-
if (t.strategy && t.strategy !== e.strategy && l(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const r = new Set(t.disabledLocales);
|
|
56
|
-
for (const u of n)
|
|
57
|
-
u.disabled = r.has(u.code);
|
|
51
|
+
const t = v(a), n = _(e.locales ?? []);
|
|
52
|
+
if (t.strategy && t.strategy !== e.strategy && l(`[nuxt-i18n-micro] runtime i18n strategy override is ignored: "${t.strategy}" (build strategy: "${e.strategy}"). Build a separate artifact for each strategy.`), t.disabledLocales && t.disabledLocales.length > 0) {
|
|
53
|
+
const s = new Set(t.disabledLocales);
|
|
54
|
+
for (const u of n) u.disabled = s.has(u.code);
|
|
58
55
|
}
|
|
59
|
-
const i = n.filter((
|
|
56
|
+
const i = n.filter((s) => !s.disabled);
|
|
60
57
|
if (i.length === 0)
|
|
61
|
-
return t.disabledLocales && t.disabledLocales.length > 0 && l("[nuxt-i18n-micro] runtime disabledLocales override would disable all locales; override ignored."), {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const
|
|
58
|
+
return t.disabledLocales && t.disabledLocales.length > 0 && l("[nuxt-i18n-micro] runtime disabledLocales override would disable all locales; override ignored."), {
|
|
59
|
+
...e,
|
|
60
|
+
locales: _(e.locales ?? [])
|
|
61
|
+
};
|
|
62
|
+
const b = new Set(n.map((s) => s.code));
|
|
63
|
+
let c = t.defaultLocale ?? e.defaultLocale, r = t.fallbackLocale ?? e.fallbackLocale;
|
|
64
|
+
r && !b.has(r) && (l(`[nuxt-i18n-micro] runtime fallbackLocale "${r}" is not defined in locales; override ignored.`), r = e.fallbackLocale);
|
|
65
|
+
const f = new Set(i.map((s) => s.code)), d = i[0]?.code ?? e.defaultLocale ?? "en";
|
|
66
66
|
return (!c || !f.has(c)) && (t.defaultLocale ? l(`[nuxt-i18n-micro] runtime defaultLocale "${t.defaultLocale}" is not enabled; falling back to "${d}".`) : c && !f.has(c) && l(`[nuxt-i18n-micro] defaultLocale "${c}" is disabled by runtime overrides; falling back to "${d}".`), c = d), {
|
|
67
67
|
...e,
|
|
68
68
|
locales: n,
|
|
69
69
|
defaultLocale: c,
|
|
70
|
-
fallbackLocale:
|
|
70
|
+
fallbackLocale: r
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
export {
|
package/dist/source-loader.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./merge-source.cjs"),n=require("./normalize.cjs");async function c(r,o){return e.mergeSourceTranslations({...o,readLocaleFile:async a=>{const t=await r.getItem(e.toSourceStorageKey(a));return n.toTranslationRecord(t)}})}exports.loadSourceTranslationsFromStorage=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function s(r){const o=[],n={},a=new Set;for(const t of r){const e=t.name?.trim();if(!e)throw new Error("[splitLocaleRoutes] each entry needs a non-empty `name`");if(!t.path)throw new Error(`[splitLocaleRoutes] entry "${e}" needs a \`path\``);if(!t.file)throw new Error(`[splitLocaleRoutes] entry "${e}" needs a \`file\``);if(a.has(e))throw new Error(`[splitLocaleRoutes] duplicate route name "${e}"`);a.add(e),o.push({name:e,path:t.path,file:t.file}),t.paths!==void 0&&(n[e]=t.paths)}return{pages:o,globalLocaleRoutes:n}}exports.splitLocaleRoutes=s;
|
|
@@ -2,17 +2,20 @@ function s(a) {
|
|
|
2
2
|
const o = [], n = {}, r = /* @__PURE__ */ new Set();
|
|
3
3
|
for (const t of a) {
|
|
4
4
|
const e = t.name?.trim();
|
|
5
|
-
if (!e)
|
|
6
|
-
|
|
7
|
-
if (!t.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
if (!e) throw new Error("[splitLocaleRoutes] each entry needs a non-empty `name`");
|
|
6
|
+
if (!t.path) throw new Error(`[splitLocaleRoutes] entry "${e}" needs a \`path\``);
|
|
7
|
+
if (!t.file) throw new Error(`[splitLocaleRoutes] entry "${e}" needs a \`file\``);
|
|
8
|
+
if (r.has(e)) throw new Error(`[splitLocaleRoutes] duplicate route name "${e}"`);
|
|
9
|
+
r.add(e), o.push({
|
|
10
|
+
name: e,
|
|
11
|
+
path: t.path,
|
|
12
|
+
file: t.file
|
|
13
|
+
}), t.paths !== void 0 && (n[e] = t.paths);
|
|
14
14
|
}
|
|
15
|
-
return {
|
|
15
|
+
return {
|
|
16
|
+
pages: o,
|
|
17
|
+
globalLocaleRoutes: n
|
|
18
|
+
};
|
|
16
19
|
}
|
|
17
20
|
export {
|
|
18
21
|
s as splitLocaleRoutes
|