intlayer 9.4.1 → 9.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -330,4 +330,4 @@ Contribute on [GitHub](https://github.com/aymericzip/intlayer), [GitLab](https:/
330
330
 
331
331
  If you like Intlayer, give us a ⭐ on GitHub. It helps others discover the project! [See why GitHub Stars matter](https://github.com/aymericzip/intlayer/blob/main/CONTRIBUTING.md#why-github-stars-matter-).
332
332
 
333
- [![Star History Chart](https://star-history.dera.page/svg?repos=aymericzip/intlayer&type=Date)](https://star-history.dera.page/#aymericzip/intlayer&Date)
333
+ [![Star History Chart](https://api.star-history.com/svg?repos=aymericzip/intlayer&type=Date)](https://api.star-history.com/#aymericzip/intlayer&Date)
@@ -9,7 +9,7 @@ const cleanPath = (pattern) => pattern.startsWith("/") ? pattern : `/${pattern}`
9
9
  * Standardizes pattern to :param syntax.
10
10
  * Supports:
11
11
  * - Next.js/SvelteKit/Nuxt: [slug], [...slug], [[slug]]
12
- * - TanStack Router: $slug
12
+ * - TanStack Router: $slug, {$slug}, {-$slug}
13
13
  * - Solid Router: *slug
14
14
  * - React/Vue Router: :slug, *
15
15
  */
@@ -22,14 +22,19 @@ const normalizePattern = (pattern, framework) => {
22
22
  } else if (framework === "nuxt") {
23
23
  normalized = normalized.replace(/\[\.\.\.([^\]]+)\]/g, ":$1*").replace(/\[([^\]]+)\]/g, ":$1");
24
24
  } else {
25
- normalized = normalized.replace(/\$([^/]+)/g, ":$1").replace(/\*([^/]+)/g, ":$1*").replace(/:([^/]+)\?/g, ":$1?").replace(/\*/g, ":path*");
25
+ normalized = normalized.replace(/\{-\$([^}/]+)\}/g, ":$1?").replace(/\{\$([^}/]+)\}/g, ":$1").replace(/\$([^/]+)/g, ":$1").replace(/\*([^/]+)/g, ":$1*").replace(/:([^/]+)\?/g, ":$1?").replace(/\*/g, ":path*");
26
26
  }
27
27
  return normalized;
28
28
  };
29
29
  /**
30
30
  * Removes locale markers from the pattern.
31
+ *
32
+ * Runs after {@link normalizePattern}, so the locale is usually already a
33
+ * `:locale` — optional (`:locale?`) when the route declares it as such, which
34
+ * every TanStack Start app using `{-$locale}` does. The raw framework spellings
35
+ * are kept as alternatives for callers passing an unnormalized pattern.
31
36
  */
32
- const stripLocale = (pattern) => pattern.replace(/\/?(:locale|\[locale\]|\$locale)\/?/g, "/").replace(/\/+/g, "/").replace(/\/$/, "") || "/";
37
+ const stripLocale = (pattern) => pattern.replace(/\/?(:locale\??|\[locale\]|\{-?\$locale\}|\$locale)\/?/g, "/").replace(/\/+/g, "/").replace(/\/$/, "") || "/";
33
38
  /**
34
39
  * Factory to create formatters that populate 'url' and a specific proxy key.
35
40
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../src/routing/index.ts"],"sourcesContent":["import type {\n RewriteObject,\n RewriteRule,\n RewriteRules,\n} from '@intlayer/types/config';\nimport type { StrictModeLocaleMap } from '@intlayer/types/module_augmentation';\n\nconst buildRules = (\n rules: Record<string, StrictModeLocaleMap<string>>,\n processor: (pattern: string) => string\n): RewriteRules => ({\n rules: Object.entries(rules).map(([canonical, localized]) => ({\n canonical: processor(canonical),\n localized: Object.fromEntries(\n Object.entries(localized).map(([locale, pattern]) => [\n locale,\n pattern ? processor(pattern) : pattern,\n ])\n ) as StrictModeLocaleMap<string>,\n })) as RewriteRule[],\n});\n\nconst cleanPath = (pattern: string) =>\n pattern.startsWith('/') ? pattern : `/${pattern}`;\n\n/**\n * Standardizes pattern to :param syntax.\n * Supports:\n * - Next.js/SvelteKit/Nuxt: [slug], [...slug], [[slug]]\n * - TanStack Router: $slug\n * - Solid Router: *slug\n * - React/Vue Router: :slug, *\n */\nconst normalizePattern = (pattern: string, framework?: string) => {\n let normalized = pattern;\n\n if (framework === 'nextjs') {\n normalized = normalized\n .replace(/\\[\\[\\.\\.\\.([^\\]]+)\\]\\]/g, ':$1*') // [[...slug]] -> :slug* (0+)\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1+') // [...slug] -> :slug+ (1+)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else if (framework === 'sveltekit') {\n normalized = normalized\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1*') // [...path] -> :path* (0+)\n .replace(/\\[\\[([^\\]]+)\\]\\]/g, ':$1?') // [[optional]] -> :optional? (0-1)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else if (framework === 'nuxt') {\n normalized = normalized\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1*') // [...slug] -> :slug* (0+)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else {\n // Default / Generic (React Router, Vue Router, Solid Router, TanStack Router)\n normalized = normalized\n .replace(/\\$([^/]+)/g, ':$1') // TanStack $slug -> :slug\n .replace(/\\*([^/]+)/g, ':$1*') // Solid *slug -> :slug*\n .replace(/:([^/]+)\\?/g, ':$1?') // Vue Router/React Router :slug? -> :slug?\n .replace(/\\*/g, ':path*'); // React Router * -> :path*\n }\n\n return normalized;\n};\n\n/**\n * Removes locale markers from the pattern.\n */\nconst stripLocale = (pattern: string) =>\n pattern\n .replace(/\\/?(:locale|\\[locale\\]|\\$locale)\\/?/g, '/')\n .replace(/\\/+/g, '/')\n .replace(/\\/$/, '') || '/';\n\n/**\n * Factory to create formatters that populate 'url' and a specific proxy key.\n */\nconst createFormatter =\n (proxyKey: 'nextjs' | 'vite', framework?: string) =>\n <T extends string = string>(\n rules: Record<T, Partial<StrictModeLocaleMap<string>>>\n ): RewriteObject => {\n const normalize = (pattern: string) => normalizePattern(pattern, framework);\n const strip = (pattern: string) => stripLocale(normalize(pattern));\n\n return {\n url: buildRules(rules as any, (pattern) => cleanPath(strip(pattern))),\n [proxyKey]: buildRules(rules as any, (pattern) =>\n cleanPath(normalize(pattern))\n ),\n } as RewriteObject;\n };\n\n/**\n * Formatter for Next.js style rewrites.\n * Patterns use Next.js dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (1+)\n * - Optional catch-all: `[[...slug]]` (0+)\n * - Locale: `[locale]`\n */\nexport const nextjsRewrite = createFormatter('nextjs', 'nextjs');\n\n/**\n * Formatter for SvelteKit style rewrites.\n * Patterns use SvelteKit dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (0+)\n * - Locale: `[locale]`\n */\nexport const svelteKitRewrite = createFormatter('vite', 'sveltekit');\n\n/**\n * Formatter for React Router style rewrites.\n * Patterns use React Router dynamic routing syntax:\n * - Slug: `:slug`\n * - Optional slug: `:slug?`\n * - Catch-all: `*`\n * - Locale: `:locale`\n */\nexport const reactRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Vue style rewrites.\n * Patterns use Vue Router 4 dynamic routing syntax:\n * - Slug: `:slug`\n * - Optional slug: `:slug?`\n * - Catch-all: `:slug*` or `:slug+`\n * - Locale: `:locale`\n */\nexport const vueRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Solid Router style rewrites.\n * Patterns use Solid Router dynamic routing syntax:\n * - Slug: `:slug`\n * - Catch-all: `*slug`\n * - Locale: `:locale`\n */\nexport const solidRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Nuxt style rewrites.\n * Patterns use Nuxt 3 dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (0+)\n * - Locale: `[locale]`\n */\nexport const nuxtRewrite = createFormatter('vite', 'nuxt');\n\n/**\n * Formatter for TanStack Router style rewrites.\n * Patterns use TanStack Router dynamic routing syntax:\n * - Slug: `$slug`\n * - Catch-all: `*`\n * - Locale: `$locale`\n */\nexport const tanstackRouterRewrite = createFormatter('vite');\n\n/**\n * Generic formatter for Vite-based projects.\n * Supports most dynamic routing syntaxes and normalizes them for the Vite proxy.\n */\nexport const viteRewrite = createFormatter('vite');\n"],"mappings":";;AAOA,MAAM,cACJ,OACA,eACkB,EAClB,OAAO,OAAO,QAAQ,KAAK,CAAC,CAAC,KAAK,CAAC,WAAW,gBAAgB;CAC5D,WAAW,UAAU,SAAS;CAC9B,WAAW,OAAO,YAChB,OAAO,QAAQ,SAAS,CAAC,CAAC,KAAK,CAAC,QAAQ,aAAa,CACnD,QACA,UAAU,UAAU,OAAO,IAAI,OACjC,CAAC,CACH;AACF,EAAE,EACJ;AAEA,MAAM,aAAa,YACjB,QAAQ,WAAW,GAAG,IAAI,UAAU,IAAI;;;;;;;;;AAU1C,MAAM,oBAAoB,SAAiB,cAAuB;CAChE,IAAI,aAAa;CAEjB,IAAI,cAAc,UAAU;EAC1B,aAAa,WACV,QAAQ,2BAA2B,MAAM,CAAC,CAC1C,QAAQ,uBAAuB,MAAM,CAAC,CACtC,QAAQ,iBAAiB,KAAK;CACnC,OAAO,IAAI,cAAc,aAAa;EACpC,aAAa,WACV,QAAQ,uBAAuB,MAAM,CAAC,CACtC,QAAQ,qBAAqB,MAAM,CAAC,CACpC,QAAQ,iBAAiB,KAAK;CACnC,OAAO,IAAI,cAAc,QAAQ;EAC/B,aAAa,WACV,QAAQ,uBAAuB,MAAM,CAAC,CACtC,QAAQ,iBAAiB,KAAK;CACnC,OAAO;EAEL,aAAa,WACV,QAAQ,cAAc,KAAK,CAAC,CAC5B,QAAQ,cAAc,MAAM,CAAC,CAC7B,QAAQ,eAAe,MAAM,CAAC,CAC9B,QAAQ,OAAO,QAAQ;CAC5B;CAEA,OAAO;AACT;;;;AAKA,MAAM,eAAe,YACnB,QACG,QAAQ,wCAAwC,GAAG,CAAC,CACpD,QAAQ,QAAQ,GAAG,CAAC,CACpB,QAAQ,OAAO,EAAE,KAAK;;;;AAK3B,MAAM,mBACH,UAA6B,eAE5B,UACkB;CAClB,MAAM,aAAa,YAAoB,iBAAiB,SAAS,SAAS;CAC1E,MAAM,SAAS,YAAoB,YAAY,UAAU,OAAO,CAAC;CAEjE,OAAO;EACL,KAAK,WAAW,QAAe,YAAY,UAAU,MAAM,OAAO,CAAC,CAAC;GACnE,WAAW,WAAW,QAAe,YACpC,UAAU,UAAU,OAAO,CAAC,CAC9B;CACF;AACF;;;;;;;;;AAUF,MAAa,gBAAgB,gBAAgB,UAAU,QAAQ;;;;;;;;AAS/D,MAAa,mBAAmB,gBAAgB,QAAQ,WAAW;;;;;;;;;AAUnE,MAAa,qBAAqB,gBAAgB,MAAM;;;;;;;;;AAUxD,MAAa,mBAAmB,gBAAgB,MAAM;;;;;;;;AAStD,MAAa,qBAAqB,gBAAgB,MAAM;;;;;;;;AASxD,MAAa,cAAc,gBAAgB,QAAQ,MAAM;;;;;;;;AASzD,MAAa,wBAAwB,gBAAgB,MAAM;;;;;AAM3D,MAAa,cAAc,gBAAgB,MAAM"}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../../src/routing/index.ts"],"sourcesContent":["import type {\n RewriteObject,\n RewriteRule,\n RewriteRules,\n} from '@intlayer/types/config';\nimport type { StrictModeLocaleMap } from '@intlayer/types/module_augmentation';\n\nconst buildRules = (\n rules: Record<string, StrictModeLocaleMap<string>>,\n processor: (pattern: string) => string\n): RewriteRules => ({\n rules: Object.entries(rules).map(([canonical, localized]) => ({\n canonical: processor(canonical),\n localized: Object.fromEntries(\n Object.entries(localized).map(([locale, pattern]) => [\n locale,\n pattern ? processor(pattern) : pattern,\n ])\n ) as StrictModeLocaleMap<string>,\n })) as RewriteRule[],\n});\n\nconst cleanPath = (pattern: string) =>\n pattern.startsWith('/') ? pattern : `/${pattern}`;\n\n/**\n * Standardizes pattern to :param syntax.\n * Supports:\n * - Next.js/SvelteKit/Nuxt: [slug], [...slug], [[slug]]\n * - TanStack Router: $slug, {$slug}, {-$slug}\n * - Solid Router: *slug\n * - React/Vue Router: :slug, *\n */\nconst normalizePattern = (pattern: string, framework?: string) => {\n let normalized = pattern;\n\n if (framework === 'nextjs') {\n normalized = normalized\n .replace(/\\[\\[\\.\\.\\.([^\\]]+)\\]\\]/g, ':$1*') // [[...slug]] -> :slug* (0+)\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1+') // [...slug] -> :slug+ (1+)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else if (framework === 'sveltekit') {\n normalized = normalized\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1*') // [...path] -> :path* (0+)\n .replace(/\\[\\[([^\\]]+)\\]\\]/g, ':$1?') // [[optional]] -> :optional? (0-1)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else if (framework === 'nuxt') {\n normalized = normalized\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1*') // [...slug] -> :slug* (0+)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else {\n // Default / Generic (React Router, Vue Router, Solid Router, TanStack Router)\n normalized = normalized\n .replace(/\\{-\\$([^}/]+)\\}/g, ':$1?') // TanStack {-$slug} -> :slug? (0-1)\n .replace(/\\{\\$([^}/]+)\\}/g, ':$1') // TanStack {$slug} -> :slug (1)\n .replace(/\\$([^/]+)/g, ':$1') // TanStack $slug -> :slug\n .replace(/\\*([^/]+)/g, ':$1*') // Solid *slug -> :slug*\n .replace(/:([^/]+)\\?/g, ':$1?') // Vue Router/React Router :slug? -> :slug?\n .replace(/\\*/g, ':path*'); // React Router * -> :path*\n }\n\n return normalized;\n};\n\n/**\n * Removes locale markers from the pattern.\n *\n * Runs after {@link normalizePattern}, so the locale is usually already a\n * `:locale` — optional (`:locale?`) when the route declares it as such, which\n * every TanStack Start app using `{-$locale}` does. The raw framework spellings\n * are kept as alternatives for callers passing an unnormalized pattern.\n */\nconst stripLocale = (pattern: string) =>\n pattern\n .replace(/\\/?(:locale\\??|\\[locale\\]|\\{-?\\$locale\\}|\\$locale)\\/?/g, '/')\n .replace(/\\/+/g, '/')\n .replace(/\\/$/, '') || '/';\n\n/**\n * Factory to create formatters that populate 'url' and a specific proxy key.\n */\nconst createFormatter =\n (proxyKey: 'nextjs' | 'vite', framework?: string) =>\n <T extends string = string>(\n rules: Record<T, Partial<StrictModeLocaleMap<string>>>\n ): RewriteObject => {\n const normalize = (pattern: string) => normalizePattern(pattern, framework);\n const strip = (pattern: string) => stripLocale(normalize(pattern));\n\n return {\n url: buildRules(rules as any, (pattern) => cleanPath(strip(pattern))),\n [proxyKey]: buildRules(rules as any, (pattern) =>\n cleanPath(normalize(pattern))\n ),\n } as RewriteObject;\n };\n\n/**\n * Formatter for Next.js style rewrites.\n * Patterns use Next.js dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (1+)\n * - Optional catch-all: `[[...slug]]` (0+)\n * - Locale: `[locale]`\n */\nexport const nextjsRewrite = createFormatter('nextjs', 'nextjs');\n\n/**\n * Formatter for SvelteKit style rewrites.\n * Patterns use SvelteKit dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (0+)\n * - Locale: `[locale]`\n */\nexport const svelteKitRewrite = createFormatter('vite', 'sveltekit');\n\n/**\n * Formatter for React Router style rewrites.\n * Patterns use React Router dynamic routing syntax:\n * - Slug: `:slug`\n * - Optional slug: `:slug?`\n * - Catch-all: `*`\n * - Locale: `:locale`\n */\nexport const reactRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Vue style rewrites.\n * Patterns use Vue Router 4 dynamic routing syntax:\n * - Slug: `:slug`\n * - Optional slug: `:slug?`\n * - Catch-all: `:slug*` or `:slug+`\n * - Locale: `:locale`\n */\nexport const vueRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Solid Router style rewrites.\n * Patterns use Solid Router dynamic routing syntax:\n * - Slug: `:slug`\n * - Catch-all: `*slug`\n * - Locale: `:locale`\n */\nexport const solidRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Nuxt style rewrites.\n * Patterns use Nuxt 3 dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (0+)\n * - Locale: `[locale]`\n */\nexport const nuxtRewrite = createFormatter('vite', 'nuxt');\n\n/**\n * Formatter for TanStack Router style rewrites.\n * Patterns use TanStack Router dynamic routing syntax:\n * - Slug: `$slug`\n * - Catch-all: `*`\n * - Locale: `$locale`\n */\nexport const tanstackRouterRewrite = createFormatter('vite');\n\n/**\n * Generic formatter for Vite-based projects.\n * Supports most dynamic routing syntaxes and normalizes them for the Vite proxy.\n */\nexport const viteRewrite = createFormatter('vite');\n"],"mappings":";;AAOA,MAAM,cACJ,OACA,eACkB,EAClB,OAAO,OAAO,QAAQ,KAAK,CAAC,CAAC,KAAK,CAAC,WAAW,gBAAgB;CAC5D,WAAW,UAAU,SAAS;CAC9B,WAAW,OAAO,YAChB,OAAO,QAAQ,SAAS,CAAC,CAAC,KAAK,CAAC,QAAQ,aAAa,CACnD,QACA,UAAU,UAAU,OAAO,IAAI,OACjC,CAAC,CACH;AACF,EAAE,EACJ;AAEA,MAAM,aAAa,YACjB,QAAQ,WAAW,GAAG,IAAI,UAAU,IAAI;;;;;;;;;AAU1C,MAAM,oBAAoB,SAAiB,cAAuB;CAChE,IAAI,aAAa;CAEjB,IAAI,cAAc,UAAU;EAC1B,aAAa,WACV,QAAQ,2BAA2B,MAAM,CAAC,CAC1C,QAAQ,uBAAuB,MAAM,CAAC,CACtC,QAAQ,iBAAiB,KAAK;CACnC,OAAO,IAAI,cAAc,aAAa;EACpC,aAAa,WACV,QAAQ,uBAAuB,MAAM,CAAC,CACtC,QAAQ,qBAAqB,MAAM,CAAC,CACpC,QAAQ,iBAAiB,KAAK;CACnC,OAAO,IAAI,cAAc,QAAQ;EAC/B,aAAa,WACV,QAAQ,uBAAuB,MAAM,CAAC,CACtC,QAAQ,iBAAiB,KAAK;CACnC,OAAO;EAEL,aAAa,WACV,QAAQ,oBAAoB,MAAM,CAAC,CACnC,QAAQ,mBAAmB,KAAK,CAAC,CACjC,QAAQ,cAAc,KAAK,CAAC,CAC5B,QAAQ,cAAc,MAAM,CAAC,CAC7B,QAAQ,eAAe,MAAM,CAAC,CAC9B,QAAQ,OAAO,QAAQ;CAC5B;CAEA,OAAO;AACT;;;;;;;;;AAUA,MAAM,eAAe,YACnB,QACG,QAAQ,0DAA0D,GAAG,CAAC,CACtE,QAAQ,QAAQ,GAAG,CAAC,CACpB,QAAQ,OAAO,EAAE,KAAK;;;;AAK3B,MAAM,mBACH,UAA6B,eAE5B,UACkB;CAClB,MAAM,aAAa,YAAoB,iBAAiB,SAAS,SAAS;CAC1E,MAAM,SAAS,YAAoB,YAAY,UAAU,OAAO,CAAC;CAEjE,OAAO;EACL,KAAK,WAAW,QAAe,YAAY,UAAU,MAAM,OAAO,CAAC,CAAC;GACnE,WAAW,WAAW,QAAe,YACpC,UAAU,UAAU,OAAO,CAAC,CAC9B;CACF;AACF;;;;;;;;;AAUF,MAAa,gBAAgB,gBAAgB,UAAU,QAAQ;;;;;;;;AAS/D,MAAa,mBAAmB,gBAAgB,QAAQ,WAAW;;;;;;;;;AAUnE,MAAa,qBAAqB,gBAAgB,MAAM;;;;;;;;;AAUxD,MAAa,mBAAmB,gBAAgB,MAAM;;;;;;;;AAStD,MAAa,qBAAqB,gBAAgB,MAAM;;;;;;;;AASxD,MAAa,cAAc,gBAAgB,QAAQ,MAAM;;;;;;;;AASzD,MAAa,wBAAwB,gBAAgB,MAAM;;;;;AAM3D,MAAa,cAAc,gBAAgB,MAAM"}
@@ -8,7 +8,7 @@ const cleanPath = (pattern) => pattern.startsWith("/") ? pattern : `/${pattern}`
8
8
  * Standardizes pattern to :param syntax.
9
9
  * Supports:
10
10
  * - Next.js/SvelteKit/Nuxt: [slug], [...slug], [[slug]]
11
- * - TanStack Router: $slug
11
+ * - TanStack Router: $slug, {$slug}, {-$slug}
12
12
  * - Solid Router: *slug
13
13
  * - React/Vue Router: :slug, *
14
14
  */
@@ -21,14 +21,19 @@ const normalizePattern = (pattern, framework) => {
21
21
  } else if (framework === "nuxt") {
22
22
  normalized = normalized.replace(/\[\.\.\.([^\]]+)\]/g, ":$1*").replace(/\[([^\]]+)\]/g, ":$1");
23
23
  } else {
24
- normalized = normalized.replace(/\$([^/]+)/g, ":$1").replace(/\*([^/]+)/g, ":$1*").replace(/:([^/]+)\?/g, ":$1?").replace(/\*/g, ":path*");
24
+ normalized = normalized.replace(/\{-\$([^}/]+)\}/g, ":$1?").replace(/\{\$([^}/]+)\}/g, ":$1").replace(/\$([^/]+)/g, ":$1").replace(/\*([^/]+)/g, ":$1*").replace(/:([^/]+)\?/g, ":$1?").replace(/\*/g, ":path*");
25
25
  }
26
26
  return normalized;
27
27
  };
28
28
  /**
29
29
  * Removes locale markers from the pattern.
30
+ *
31
+ * Runs after {@link normalizePattern}, so the locale is usually already a
32
+ * `:locale` — optional (`:locale?`) when the route declares it as such, which
33
+ * every TanStack Start app using `{-$locale}` does. The raw framework spellings
34
+ * are kept as alternatives for callers passing an unnormalized pattern.
30
35
  */
31
- const stripLocale = (pattern) => pattern.replace(/\/?(:locale|\[locale\]|\$locale)\/?/g, "/").replace(/\/+/g, "/").replace(/\/$/, "") || "/";
36
+ const stripLocale = (pattern) => pattern.replace(/\/?(:locale\??|\[locale\]|\{-?\$locale\}|\$locale)\/?/g, "/").replace(/\/+/g, "/").replace(/\/$/, "") || "/";
32
37
  /**
33
38
  * Factory to create formatters that populate 'url' and a specific proxy key.
34
39
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/routing/index.ts"],"sourcesContent":["import type {\n RewriteObject,\n RewriteRule,\n RewriteRules,\n} from '@intlayer/types/config';\nimport type { StrictModeLocaleMap } from '@intlayer/types/module_augmentation';\n\nconst buildRules = (\n rules: Record<string, StrictModeLocaleMap<string>>,\n processor: (pattern: string) => string\n): RewriteRules => ({\n rules: Object.entries(rules).map(([canonical, localized]) => ({\n canonical: processor(canonical),\n localized: Object.fromEntries(\n Object.entries(localized).map(([locale, pattern]) => [\n locale,\n pattern ? processor(pattern) : pattern,\n ])\n ) as StrictModeLocaleMap<string>,\n })) as RewriteRule[],\n});\n\nconst cleanPath = (pattern: string) =>\n pattern.startsWith('/') ? pattern : `/${pattern}`;\n\n/**\n * Standardizes pattern to :param syntax.\n * Supports:\n * - Next.js/SvelteKit/Nuxt: [slug], [...slug], [[slug]]\n * - TanStack Router: $slug\n * - Solid Router: *slug\n * - React/Vue Router: :slug, *\n */\nconst normalizePattern = (pattern: string, framework?: string) => {\n let normalized = pattern;\n\n if (framework === 'nextjs') {\n normalized = normalized\n .replace(/\\[\\[\\.\\.\\.([^\\]]+)\\]\\]/g, ':$1*') // [[...slug]] -> :slug* (0+)\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1+') // [...slug] -> :slug+ (1+)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else if (framework === 'sveltekit') {\n normalized = normalized\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1*') // [...path] -> :path* (0+)\n .replace(/\\[\\[([^\\]]+)\\]\\]/g, ':$1?') // [[optional]] -> :optional? (0-1)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else if (framework === 'nuxt') {\n normalized = normalized\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1*') // [...slug] -> :slug* (0+)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else {\n // Default / Generic (React Router, Vue Router, Solid Router, TanStack Router)\n normalized = normalized\n .replace(/\\$([^/]+)/g, ':$1') // TanStack $slug -> :slug\n .replace(/\\*([^/]+)/g, ':$1*') // Solid *slug -> :slug*\n .replace(/:([^/]+)\\?/g, ':$1?') // Vue Router/React Router :slug? -> :slug?\n .replace(/\\*/g, ':path*'); // React Router * -> :path*\n }\n\n return normalized;\n};\n\n/**\n * Removes locale markers from the pattern.\n */\nconst stripLocale = (pattern: string) =>\n pattern\n .replace(/\\/?(:locale|\\[locale\\]|\\$locale)\\/?/g, '/')\n .replace(/\\/+/g, '/')\n .replace(/\\/$/, '') || '/';\n\n/**\n * Factory to create formatters that populate 'url' and a specific proxy key.\n */\nconst createFormatter =\n (proxyKey: 'nextjs' | 'vite', framework?: string) =>\n <T extends string = string>(\n rules: Record<T, Partial<StrictModeLocaleMap<string>>>\n ): RewriteObject => {\n const normalize = (pattern: string) => normalizePattern(pattern, framework);\n const strip = (pattern: string) => stripLocale(normalize(pattern));\n\n return {\n url: buildRules(rules as any, (pattern) => cleanPath(strip(pattern))),\n [proxyKey]: buildRules(rules as any, (pattern) =>\n cleanPath(normalize(pattern))\n ),\n } as RewriteObject;\n };\n\n/**\n * Formatter for Next.js style rewrites.\n * Patterns use Next.js dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (1+)\n * - Optional catch-all: `[[...slug]]` (0+)\n * - Locale: `[locale]`\n */\nexport const nextjsRewrite = createFormatter('nextjs', 'nextjs');\n\n/**\n * Formatter for SvelteKit style rewrites.\n * Patterns use SvelteKit dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (0+)\n * - Locale: `[locale]`\n */\nexport const svelteKitRewrite = createFormatter('vite', 'sveltekit');\n\n/**\n * Formatter for React Router style rewrites.\n * Patterns use React Router dynamic routing syntax:\n * - Slug: `:slug`\n * - Optional slug: `:slug?`\n * - Catch-all: `*`\n * - Locale: `:locale`\n */\nexport const reactRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Vue style rewrites.\n * Patterns use Vue Router 4 dynamic routing syntax:\n * - Slug: `:slug`\n * - Optional slug: `:slug?`\n * - Catch-all: `:slug*` or `:slug+`\n * - Locale: `:locale`\n */\nexport const vueRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Solid Router style rewrites.\n * Patterns use Solid Router dynamic routing syntax:\n * - Slug: `:slug`\n * - Catch-all: `*slug`\n * - Locale: `:locale`\n */\nexport const solidRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Nuxt style rewrites.\n * Patterns use Nuxt 3 dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (0+)\n * - Locale: `[locale]`\n */\nexport const nuxtRewrite = createFormatter('vite', 'nuxt');\n\n/**\n * Formatter for TanStack Router style rewrites.\n * Patterns use TanStack Router dynamic routing syntax:\n * - Slug: `$slug`\n * - Catch-all: `*`\n * - Locale: `$locale`\n */\nexport const tanstackRouterRewrite = createFormatter('vite');\n\n/**\n * Generic formatter for Vite-based projects.\n * Supports most dynamic routing syntaxes and normalizes them for the Vite proxy.\n */\nexport const viteRewrite = createFormatter('vite');\n"],"mappings":";AAOA,MAAM,cACJ,OACA,eACkB,EAClB,OAAO,OAAO,QAAQ,KAAK,CAAC,CAAC,KAAK,CAAC,WAAW,gBAAgB;CAC5D,WAAW,UAAU,SAAS;CAC9B,WAAW,OAAO,YAChB,OAAO,QAAQ,SAAS,CAAC,CAAC,KAAK,CAAC,QAAQ,aAAa,CACnD,QACA,UAAU,UAAU,OAAO,IAAI,OACjC,CAAC,CACH;AACF,EAAE,EACJ;AAEA,MAAM,aAAa,YACjB,QAAQ,WAAW,GAAG,IAAI,UAAU,IAAI;;;;;;;;;AAU1C,MAAM,oBAAoB,SAAiB,cAAuB;CAChE,IAAI,aAAa;CAEjB,IAAI,cAAc,UAAU;EAC1B,aAAa,WACV,QAAQ,2BAA2B,MAAM,CAAC,CAC1C,QAAQ,uBAAuB,MAAM,CAAC,CACtC,QAAQ,iBAAiB,KAAK;CACnC,OAAO,IAAI,cAAc,aAAa;EACpC,aAAa,WACV,QAAQ,uBAAuB,MAAM,CAAC,CACtC,QAAQ,qBAAqB,MAAM,CAAC,CACpC,QAAQ,iBAAiB,KAAK;CACnC,OAAO,IAAI,cAAc,QAAQ;EAC/B,aAAa,WACV,QAAQ,uBAAuB,MAAM,CAAC,CACtC,QAAQ,iBAAiB,KAAK;CACnC,OAAO;EAEL,aAAa,WACV,QAAQ,cAAc,KAAK,CAAC,CAC5B,QAAQ,cAAc,MAAM,CAAC,CAC7B,QAAQ,eAAe,MAAM,CAAC,CAC9B,QAAQ,OAAO,QAAQ;CAC5B;CAEA,OAAO;AACT;;;;AAKA,MAAM,eAAe,YACnB,QACG,QAAQ,wCAAwC,GAAG,CAAC,CACpD,QAAQ,QAAQ,GAAG,CAAC,CACpB,QAAQ,OAAO,EAAE,KAAK;;;;AAK3B,MAAM,mBACH,UAA6B,eAE5B,UACkB;CAClB,MAAM,aAAa,YAAoB,iBAAiB,SAAS,SAAS;CAC1E,MAAM,SAAS,YAAoB,YAAY,UAAU,OAAO,CAAC;CAEjE,OAAO;EACL,KAAK,WAAW,QAAe,YAAY,UAAU,MAAM,OAAO,CAAC,CAAC;GACnE,WAAW,WAAW,QAAe,YACpC,UAAU,UAAU,OAAO,CAAC,CAC9B;CACF;AACF;;;;;;;;;AAUF,MAAa,gBAAgB,gBAAgB,UAAU,QAAQ;;;;;;;;AAS/D,MAAa,mBAAmB,gBAAgB,QAAQ,WAAW;;;;;;;;;AAUnE,MAAa,qBAAqB,gBAAgB,MAAM;;;;;;;;;AAUxD,MAAa,mBAAmB,gBAAgB,MAAM;;;;;;;;AAStD,MAAa,qBAAqB,gBAAgB,MAAM;;;;;;;;AASxD,MAAa,cAAc,gBAAgB,QAAQ,MAAM;;;;;;;;AASzD,MAAa,wBAAwB,gBAAgB,MAAM;;;;;AAM3D,MAAa,cAAc,gBAAgB,MAAM"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/routing/index.ts"],"sourcesContent":["import type {\n RewriteObject,\n RewriteRule,\n RewriteRules,\n} from '@intlayer/types/config';\nimport type { StrictModeLocaleMap } from '@intlayer/types/module_augmentation';\n\nconst buildRules = (\n rules: Record<string, StrictModeLocaleMap<string>>,\n processor: (pattern: string) => string\n): RewriteRules => ({\n rules: Object.entries(rules).map(([canonical, localized]) => ({\n canonical: processor(canonical),\n localized: Object.fromEntries(\n Object.entries(localized).map(([locale, pattern]) => [\n locale,\n pattern ? processor(pattern) : pattern,\n ])\n ) as StrictModeLocaleMap<string>,\n })) as RewriteRule[],\n});\n\nconst cleanPath = (pattern: string) =>\n pattern.startsWith('/') ? pattern : `/${pattern}`;\n\n/**\n * Standardizes pattern to :param syntax.\n * Supports:\n * - Next.js/SvelteKit/Nuxt: [slug], [...slug], [[slug]]\n * - TanStack Router: $slug, {$slug}, {-$slug}\n * - Solid Router: *slug\n * - React/Vue Router: :slug, *\n */\nconst normalizePattern = (pattern: string, framework?: string) => {\n let normalized = pattern;\n\n if (framework === 'nextjs') {\n normalized = normalized\n .replace(/\\[\\[\\.\\.\\.([^\\]]+)\\]\\]/g, ':$1*') // [[...slug]] -> :slug* (0+)\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1+') // [...slug] -> :slug+ (1+)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else if (framework === 'sveltekit') {\n normalized = normalized\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1*') // [...path] -> :path* (0+)\n .replace(/\\[\\[([^\\]]+)\\]\\]/g, ':$1?') // [[optional]] -> :optional? (0-1)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else if (framework === 'nuxt') {\n normalized = normalized\n .replace(/\\[\\.\\.\\.([^\\]]+)\\]/g, ':$1*') // [...slug] -> :slug* (0+)\n .replace(/\\[([^\\]]+)\\]/g, ':$1'); // [slug] -> :slug (1)\n } else {\n // Default / Generic (React Router, Vue Router, Solid Router, TanStack Router)\n normalized = normalized\n .replace(/\\{-\\$([^}/]+)\\}/g, ':$1?') // TanStack {-$slug} -> :slug? (0-1)\n .replace(/\\{\\$([^}/]+)\\}/g, ':$1') // TanStack {$slug} -> :slug (1)\n .replace(/\\$([^/]+)/g, ':$1') // TanStack $slug -> :slug\n .replace(/\\*([^/]+)/g, ':$1*') // Solid *slug -> :slug*\n .replace(/:([^/]+)\\?/g, ':$1?') // Vue Router/React Router :slug? -> :slug?\n .replace(/\\*/g, ':path*'); // React Router * -> :path*\n }\n\n return normalized;\n};\n\n/**\n * Removes locale markers from the pattern.\n *\n * Runs after {@link normalizePattern}, so the locale is usually already a\n * `:locale` — optional (`:locale?`) when the route declares it as such, which\n * every TanStack Start app using `{-$locale}` does. The raw framework spellings\n * are kept as alternatives for callers passing an unnormalized pattern.\n */\nconst stripLocale = (pattern: string) =>\n pattern\n .replace(/\\/?(:locale\\??|\\[locale\\]|\\{-?\\$locale\\}|\\$locale)\\/?/g, '/')\n .replace(/\\/+/g, '/')\n .replace(/\\/$/, '') || '/';\n\n/**\n * Factory to create formatters that populate 'url' and a specific proxy key.\n */\nconst createFormatter =\n (proxyKey: 'nextjs' | 'vite', framework?: string) =>\n <T extends string = string>(\n rules: Record<T, Partial<StrictModeLocaleMap<string>>>\n ): RewriteObject => {\n const normalize = (pattern: string) => normalizePattern(pattern, framework);\n const strip = (pattern: string) => stripLocale(normalize(pattern));\n\n return {\n url: buildRules(rules as any, (pattern) => cleanPath(strip(pattern))),\n [proxyKey]: buildRules(rules as any, (pattern) =>\n cleanPath(normalize(pattern))\n ),\n } as RewriteObject;\n };\n\n/**\n * Formatter for Next.js style rewrites.\n * Patterns use Next.js dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (1+)\n * - Optional catch-all: `[[...slug]]` (0+)\n * - Locale: `[locale]`\n */\nexport const nextjsRewrite = createFormatter('nextjs', 'nextjs');\n\n/**\n * Formatter for SvelteKit style rewrites.\n * Patterns use SvelteKit dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (0+)\n * - Locale: `[locale]`\n */\nexport const svelteKitRewrite = createFormatter('vite', 'sveltekit');\n\n/**\n * Formatter for React Router style rewrites.\n * Patterns use React Router dynamic routing syntax:\n * - Slug: `:slug`\n * - Optional slug: `:slug?`\n * - Catch-all: `*`\n * - Locale: `:locale`\n */\nexport const reactRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Vue style rewrites.\n * Patterns use Vue Router 4 dynamic routing syntax:\n * - Slug: `:slug`\n * - Optional slug: `:slug?`\n * - Catch-all: `:slug*` or `:slug+`\n * - Locale: `:locale`\n */\nexport const vueRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Solid Router style rewrites.\n * Patterns use Solid Router dynamic routing syntax:\n * - Slug: `:slug`\n * - Catch-all: `*slug`\n * - Locale: `:locale`\n */\nexport const solidRouterRewrite = createFormatter('vite');\n\n/**\n * Formatter for Nuxt style rewrites.\n * Patterns use Nuxt 3 dynamic routing syntax:\n * - Slug: `[slug]`\n * - Catch-all: `[...slug]` (0+)\n * - Locale: `[locale]`\n */\nexport const nuxtRewrite = createFormatter('vite', 'nuxt');\n\n/**\n * Formatter for TanStack Router style rewrites.\n * Patterns use TanStack Router dynamic routing syntax:\n * - Slug: `$slug`\n * - Catch-all: `*`\n * - Locale: `$locale`\n */\nexport const tanstackRouterRewrite = createFormatter('vite');\n\n/**\n * Generic formatter for Vite-based projects.\n * Supports most dynamic routing syntaxes and normalizes them for the Vite proxy.\n */\nexport const viteRewrite = createFormatter('vite');\n"],"mappings":";AAOA,MAAM,cACJ,OACA,eACkB,EAClB,OAAO,OAAO,QAAQ,KAAK,CAAC,CAAC,KAAK,CAAC,WAAW,gBAAgB;CAC5D,WAAW,UAAU,SAAS;CAC9B,WAAW,OAAO,YAChB,OAAO,QAAQ,SAAS,CAAC,CAAC,KAAK,CAAC,QAAQ,aAAa,CACnD,QACA,UAAU,UAAU,OAAO,IAAI,OACjC,CAAC,CACH;AACF,EAAE,EACJ;AAEA,MAAM,aAAa,YACjB,QAAQ,WAAW,GAAG,IAAI,UAAU,IAAI;;;;;;;;;AAU1C,MAAM,oBAAoB,SAAiB,cAAuB;CAChE,IAAI,aAAa;CAEjB,IAAI,cAAc,UAAU;EAC1B,aAAa,WACV,QAAQ,2BAA2B,MAAM,CAAC,CAC1C,QAAQ,uBAAuB,MAAM,CAAC,CACtC,QAAQ,iBAAiB,KAAK;CACnC,OAAO,IAAI,cAAc,aAAa;EACpC,aAAa,WACV,QAAQ,uBAAuB,MAAM,CAAC,CACtC,QAAQ,qBAAqB,MAAM,CAAC,CACpC,QAAQ,iBAAiB,KAAK;CACnC,OAAO,IAAI,cAAc,QAAQ;EAC/B,aAAa,WACV,QAAQ,uBAAuB,MAAM,CAAC,CACtC,QAAQ,iBAAiB,KAAK;CACnC,OAAO;EAEL,aAAa,WACV,QAAQ,oBAAoB,MAAM,CAAC,CACnC,QAAQ,mBAAmB,KAAK,CAAC,CACjC,QAAQ,cAAc,KAAK,CAAC,CAC5B,QAAQ,cAAc,MAAM,CAAC,CAC7B,QAAQ,eAAe,MAAM,CAAC,CAC9B,QAAQ,OAAO,QAAQ;CAC5B;CAEA,OAAO;AACT;;;;;;;;;AAUA,MAAM,eAAe,YACnB,QACG,QAAQ,0DAA0D,GAAG,CAAC,CACtE,QAAQ,QAAQ,GAAG,CAAC,CACpB,QAAQ,OAAO,EAAE,KAAK;;;;AAK3B,MAAM,mBACH,UAA6B,eAE5B,UACkB;CAClB,MAAM,aAAa,YAAoB,iBAAiB,SAAS,SAAS;CAC1E,MAAM,SAAS,YAAoB,YAAY,UAAU,OAAO,CAAC;CAEjE,OAAO;EACL,KAAK,WAAW,QAAe,YAAY,UAAU,MAAM,OAAO,CAAC,CAAC;GACnE,WAAW,WAAW,QAAe,YACpC,UAAU,UAAU,OAAO,CAAC,CAC9B;CACF;AACF;;;;;;;;;AAUF,MAAa,gBAAgB,gBAAgB,UAAU,QAAQ;;;;;;;;AAS/D,MAAa,mBAAmB,gBAAgB,QAAQ,WAAW;;;;;;;;;AAUnE,MAAa,qBAAqB,gBAAgB,MAAM;;;;;;;;;AAUxD,MAAa,mBAAmB,gBAAgB,MAAM;;;;;;;;AAStD,MAAa,qBAAqB,gBAAgB,MAAM;;;;;;;;AASxD,MAAa,cAAc,gBAAgB,QAAQ,MAAM;;;;;;;;AASzD,MAAa,wBAAwB,gBAAgB,MAAM;;;;;AAM3D,MAAa,cAAc,gBAAgB,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/routing/index.ts"],"mappings":";;;;;;;;;;;cAkGa,gBAtBV,2BAAgB,OACR,OAAO,GAAG,QAAQ,kCACxB;;;;;;;;cA6BQ,mBA/BV,2BAAgB,OACR,OAAO,GAAG,QAAQ,kCACxB;;;;;;;;;cAuCQ,qBAzCV,2BAAgB,OACR,OAAO,GAAG,QAAQ,kCACxB;;;;;;;;;cAiDQ,mBAnDV,2BAAgB,OACR,OAAO,GAAG,QAAQ,kCACxB;;;;;;;;cA0DQ,qBA5DV,2BAAgB,OACR,OAAO,GAAG,QAAQ,kCACxB;;;;;;;;cAmEQ,cArEV,2BAAgB,OACR,OAAO,GAAG,QAAQ,kCACxB;;;;;;;;cA4EQ,wBA9EV,2BAAgB,OACR,OAAO,GAAG,QAAQ,kCACxB;;;;;cAkFQ,cApFV,2BAAgB,OACR,OAAO,GAAG,QAAQ,kCACxB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/routing/index.ts"],"mappings":";;;;;;;;;;;cAyGa,gBAtBV,2BAAgB,OACR,OAAO,GAAG,QAAQ,kCACxB;;;;;;;;cA6BQ,mBA/BV,2BAAgB,OACR,OAAO,GAAG,QAAQ,kCACxB;;;;;;;;;cAuCQ,qBAzCV,2BAAgB,OACR,OAAO,GAAG,QAAQ,kCACxB;;;;;;;;;cAiDQ,mBAnDV,2BAAgB,OACR,OAAO,GAAG,QAAQ,kCACxB;;;;;;;;cA0DQ,qBA5DV,2BAAgB,OACR,OAAO,GAAG,QAAQ,kCACxB;;;;;;;;cAmEQ,cArEV,2BAAgB,OACR,OAAO,GAAG,QAAQ,kCACxB;;;;;;;;cA4EQ,wBA9EV,2BAAgB,OACR,OAAO,GAAG,QAAQ,kCACxB;;;;;cAkFQ,cApFV,2BAAgB,OACR,OAAO,GAAG,QAAQ,kCACxB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intlayer",
3
- "version": "9.4.1",
3
+ "version": "9.4.2",
4
4
  "private": false,
5
5
  "description": "Manage internationalization i18n in a simple way, through TypeScript, declaration file, declare your multilingual content every where in your code.",
6
6
  "keywords": [
@@ -95,13 +95,13 @@
95
95
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
96
96
  },
97
97
  "dependencies": {
98
- "@intlayer/cli": "9.4.1",
99
- "@intlayer/config": "9.4.1",
100
- "@intlayer/core": "9.4.1",
101
- "@intlayer/types": "9.4.1"
98
+ "@intlayer/cli": "9.4.2",
99
+ "@intlayer/config": "9.4.2",
100
+ "@intlayer/core": "9.4.2",
101
+ "@intlayer/types": "9.4.2"
102
102
  },
103
103
  "devDependencies": {
104
- "@types/node": "26.3.0",
104
+ "@types/node": "26.4.1",
105
105
  "@utils/ts-config": "1.0.4",
106
106
  "@utils/ts-config-types": "1.0.4",
107
107
  "@utils/tsdown-config": "1.0.4",