nuxt-i18n-micro 1.12.0 → 1.12.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.
@@ -1 +1 @@
1
- import{i as o,r as u,g as f,h as d,j as v,k as l,l as i,m as h,n as m}from"./CPg1EBcD.js";function U(t,a={}){const e=a.head||o();if(e)return e.ssr?e.push(t,a):p(e,t,a)}function p(t,a,e={}){const s=u(!1),n=u({});f(()=>{n.value=s.value?{}:d(a)});const r=t.push(n.value,e);return v(n,c=>{r.patch(c)}),m()&&(l(()=>{r.dispose()}),i(()=>{s.value=!0}),h(()=>{s.value=!1})),r}export{U as u};
1
+ import{i as o,r as u,g as f,h as d,j as v,k as l,l as i,m as h,n as m}from"./D1fvHJQV.js";function U(t,a={}){const e=a.head||o();if(e)return e.ssr?e.push(t,a):p(e,t,a)}function p(t,a,e={}){const s=u(!1),n=u({});f(()=>{n.value=s.value?{}:d(a)});const r=t.push(n.value,e);return v(n,c=>{r.patch(c)}),m()&&(l(()=>{r.dispose()}),i(()=>{s.value=!0}),h(()=>{s.value=!1})),r}export{U as u};
@@ -1 +1 @@
1
- import{u as o}from"./CoSSsslv.js";import{_ as a,o as s,c as i,a as e,t as r,p as u,f as l}from"./CPg1EBcD.js";const c=t=>(u("data-v-b63e9691"),t=t(),l(),t),d={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},p=c(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),h={class:"max-w-520px text-center"},b=["textContent"],g=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const n=t;return o({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[],style:[{children:'*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color, #e5e7eb)}:before,:after{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;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;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:before,:after{--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 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(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: }'}]}),(m,x)=>(s(),i("div",d,[p,e("div",h,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:r(t.statusCode)},null,8,b),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:r(t.description)},null,8,g)])]))}},w=a(f,[["__scopeId","data-v-b63e9691"]]);export{w as default};
1
+ import{u as o}from"./DxMn4SAe.js";import{_ as a,o as s,c as i,a as e,t as r,p as u,f as l}from"./D1fvHJQV.js";const c=t=>(u("data-v-b63e9691"),t=t(),l(),t),d={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},p=c(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),h={class:"max-w-520px text-center"},b=["textContent"],g=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const n=t;return o({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[],style:[{children:'*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color, #e5e7eb)}:before,:after{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;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;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:before,:after{--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 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(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: }'}]}),(m,x)=>(s(),i("div",d,[p,e("div",h,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:r(t.statusCode)},null,8,b),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:r(t.description)},null,8,g)])]))}},w=a(f,[["__scopeId","data-v-b63e9691"]]);export{w as default};
@@ -1 +1 @@
1
- {"id":"24c74c8a-5e70-496a-9f3c-403618a1c940","timestamp":1725114367778}
1
+ {"id":"1ab60d52-2c05-4618-8e25-19d2de5cb6af","timestamp":1725115421029}
@@ -0,0 +1 @@
1
+ {"id":"1ab60d52-2c05-4618-8e25-19d2de5cb6af","timestamp":1725115421029,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
@@ -1,12 +1,12 @@
1
1
  <!DOCTYPE html><html data-capo=""><head><meta charset="utf-8">
2
2
  <meta name="viewport" content="width=device-width, initial-scale=1">
3
3
  <link rel="stylesheet" href="/__nuxt-i18n-micro/_nuxt/entry.DjxsrOxm.css">
4
- <link rel="modulepreload" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/CPg1EBcD.js">
4
+ <link rel="modulepreload" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/D1fvHJQV.js">
5
5
  <link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/B6E6ObS_.js">
6
6
  <link rel="prefetch" as="style" href="/__nuxt-i18n-micro/_nuxt/error-404.D-AvUzLt.css">
7
- <link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/ySYvy69W.js">
8
- <link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/CoSSsslv.js">
7
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/BpNRGTHy.js">
8
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/DxMn4SAe.js">
9
9
  <link rel="prefetch" as="style" href="/__nuxt-i18n-micro/_nuxt/error-500.21ZDxC33.css">
10
- <link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/-CPbXxGs.js">
11
- <script type="module" src="/__nuxt-i18n-micro/_nuxt/CPg1EBcD.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"serverRendered":1},false]</script>
12
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"24c74c8a-5e70-496a-9f3c-403618a1c940",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
10
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/DzdJBprQ.js">
11
+ <script type="module" src="/__nuxt-i18n-micro/_nuxt/D1fvHJQV.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"serverRendered":1},false]</script>
12
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"1ab60d52-2c05-4618-8e25-19d2de5cb6af",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-i18n-micro",
3
3
  "configKey": "i18n",
4
- "version": "1.12.0",
4
+ "version": "1.12.1",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.3",
7
7
  "unbuild": "2.0.0"
package/dist/module.mjs CHANGED
@@ -216,16 +216,18 @@ const module = defineNuxtModule({
216
216
  writeFileSync(filePath, JSON.stringify({}), "utf-8");
217
217
  }
218
218
  }
219
- locales.forEach((locale) => {
220
- const globalFilePath = path.join(nuxt.options.rootDir, options.translationDir, `${locale.code}.json`);
221
- ensureFileExists(globalFilePath);
222
- if (!options.disablePageLocales) {
223
- pagesNames.forEach((name) => {
224
- const pageFilePath = path.join(pagesDir, `${name}/${locale.code}.json`);
225
- ensureFileExists(pageFilePath);
226
- });
227
- }
228
- });
219
+ if (!options.disableWatcher) {
220
+ locales.forEach((locale) => {
221
+ const globalFilePath = path.join(nuxt.options.rootDir, options.translationDir, `${locale.code}.json`);
222
+ ensureFileExists(globalFilePath);
223
+ if (!options.disablePageLocales) {
224
+ pagesNames.forEach((name) => {
225
+ const pageFilePath = path.join(pagesDir, `${name}/${locale.code}.json`);
226
+ ensureFileExists(pageFilePath);
227
+ });
228
+ }
229
+ });
230
+ }
229
231
  const newRoutes = [];
230
232
  for (let i = 0; i < pages.length; i++) {
231
233
  let localizeChildren = function(routes, parentPath = "") {
@@ -329,24 +331,22 @@ const module = defineNuxtModule({
329
331
  nitroConfig.prerender = nitroConfig.prerender || {};
330
332
  nitroConfig.prerender.routes = routes;
331
333
  });
332
- if (!options.disableWatcher) {
333
- nuxt.hook("nitro:build:before", async (_nitro) => {
334
- const isProd = nuxt.options.dev === false;
335
- if (!isProd) {
336
- const translationPath = path.resolve(nuxt.options.rootDir, options.translationDir);
337
- console.log("\u2139 add file watcher", translationPath);
338
- const watcherEvent = async (path2) => {
339
- watcher.close();
340
- console.log("\u21BB update store item", path2);
341
- nuxt.callHook("restart");
342
- };
343
- const watcher = watch(translationPath, { depth: 1, persistent: true }).on("change", watcherEvent);
344
- nuxt.hook("close", () => {
345
- watcher.close();
346
- });
347
- }
348
- });
349
- }
334
+ nuxt.hook("nitro:build:before", async (_nitro) => {
335
+ const isProd = nuxt.options.dev === false;
336
+ if (!isProd) {
337
+ const translationPath = path.resolve(nuxt.options.rootDir, options.translationDir);
338
+ console.log("\u2139 add file watcher", translationPath);
339
+ const watcherEvent = async (path2) => {
340
+ watcher.close();
341
+ console.log("\u21BB update store item", path2);
342
+ nuxt.callHook("restart");
343
+ };
344
+ const watcher = watch(translationPath, { depth: 1, persistent: true }).on("change", watcherEvent);
345
+ nuxt.hook("close", () => {
346
+ watcher.close();
347
+ });
348
+ }
349
+ });
350
350
  nuxt.hook("prerender:routes", async (prerenderRoutes) => {
351
351
  const routesSet = prerenderRoutes.routes;
352
352
  const additionalRoutes = /* @__PURE__ */ new Set();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-i18n-micro",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "description": "Nuxt I18n Micro is a lightweight, high-performance internationalization module for Nuxt, designed to handle multi-language support with minimal overhead, fast build times, and efficient runtime performance.",
5
5
  "repository": "s00d/nuxt-i18n-micro",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- {"id":"24c74c8a-5e70-496a-9f3c-403618a1c940","timestamp":1725114367778,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}