@intlayer/docs 8.1.2 → 8.1.5
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/blog/de/per-component_vs_centralized_i18n.md +1 -1
- package/blog/en/__per-component_vs_centralized_i18n.md +1 -1
- package/blog/en/per-component_vs_centralized_i18n.md +1 -1
- package/blog/en-GB/per-component_vs_centralized_i18n.md +1 -1
- package/blog/es/per-component_vs_centralized_i18n.md +1 -1
- package/blog/fr/per-component_vs_centralized_i18n.md +1 -1
- package/blog/pt/per-component_vs_centralized_i18n.md +1 -1
- package/dist/cjs/blog.cjs +1 -21
- package/dist/cjs/blog.cjs.map +1 -1
- package/dist/cjs/common.cjs +1 -77
- package/dist/cjs/common.cjs.map +1 -1
- package/dist/cjs/doc.cjs +1 -21
- package/dist/cjs/doc.cjs.map +1 -1
- package/dist/cjs/frequentQuestions.cjs +1 -21
- package/dist/cjs/frequentQuestions.cjs.map +1 -1
- package/dist/cjs/generated/blog.entry.cjs +1 -551
- package/dist/cjs/generated/blog.entry.cjs.map +1 -1
- package/dist/cjs/generated/docs.entry.cjs +1 -2971
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/cjs/generated/frequentQuestions.entry.cjs +1 -351
- package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
- package/dist/cjs/generated/legal.entry.cjs +1 -71
- package/dist/cjs/generated/legal.entry.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -34
- package/dist/cjs/legal.cjs +1 -21
- package/dist/cjs/legal.cjs.map +1 -1
- package/dist/esm/blog.mjs +1 -14
- package/dist/esm/blog.mjs.map +1 -1
- package/dist/esm/common.mjs +1 -66
- package/dist/esm/common.mjs.map +1 -1
- package/dist/esm/doc.mjs +1 -14
- package/dist/esm/doc.mjs.map +1 -1
- package/dist/esm/frequentQuestions.mjs +1 -14
- package/dist/esm/frequentQuestions.mjs.map +1 -1
- package/dist/esm/generated/blog.entry.mjs +1 -550
- package/dist/esm/generated/blog.entry.mjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +1 -2970
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/esm/generated/frequentQuestions.entry.mjs +1 -350
- package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
- package/dist/esm/generated/legal.entry.mjs +1 -70
- package/dist/esm/generated/legal.entry.mjs.map +1 -1
- package/dist/esm/index.mjs +1 -6
- package/dist/esm/legal.mjs +1 -14
- package/dist/esm/legal.mjs.map +1 -1
- package/dist/types/common.d.ts.map +1 -1
- package/docs/ar/agent_skills.md +1 -1
- package/docs/ar/cli/build.md +8 -0
- package/docs/ar/cli/index.md +1 -1
- package/docs/ar/compiler.md +1 -1
- package/docs/ar/configuration.md +34 -17
- package/docs/de/agent_skills.md +1 -1
- package/docs/de/cli/build.md +8 -0
- package/docs/de/cli/index.md +1 -1
- package/docs/de/compiler.md +1 -1
- package/docs/de/configuration.md +34 -17
- package/docs/en/agent_skills.md +1 -1
- package/docs/en/cli/build.md +8 -0
- package/docs/en/compiler.md +1 -1
- package/docs/en/configuration.md +79 -11
- package/docs/en-GB/agent_skills.md +1 -1
- package/docs/en-GB/cli/build.md +8 -0
- package/docs/en-GB/cli/index.md +1 -1
- package/docs/en-GB/compiler.md +1 -1
- package/docs/en-GB/configuration.md +34 -17
- package/docs/es/agent_skills.md +1 -1
- package/docs/es/cli/build.md +8 -0
- package/docs/es/cli/index.md +1 -1
- package/docs/es/compiler.md +1 -1
- package/docs/es/configuration.md +34 -17
- package/docs/fr/agent_skills.md +1 -1
- package/docs/fr/cli/build.md +8 -0
- package/docs/fr/cli/index.md +1 -1
- package/docs/fr/compiler.md +1 -1
- package/docs/fr/configuration.md +34 -17
- package/docs/hi/agent_skills.md +1 -1
- package/docs/hi/cli/build.md +8 -0
- package/docs/hi/cli/index.md +1 -1
- package/docs/hi/compiler.md +1 -1
- package/docs/hi/configuration.md +34 -17
- package/docs/id/agent_skills.md +1 -1
- package/docs/id/cli/build.md +8 -0
- package/docs/id/cli/index.md +1 -1
- package/docs/id/compiler.md +1 -1
- package/docs/id/configuration.md +34 -17
- package/docs/it/agent_skills.md +1 -1
- package/docs/it/cli/build.md +8 -0
- package/docs/it/cli/index.md +1 -1
- package/docs/it/compiler.md +1 -1
- package/docs/it/configuration.md +34 -17
- package/docs/ja/agent_skills.md +1 -1
- package/docs/ja/cli/build.md +8 -0
- package/docs/ja/cli/index.md +1 -1
- package/docs/ja/compiler.md +1 -1
- package/docs/ja/configuration.md +34 -17
- package/docs/ko/agent_skills.md +1 -1
- package/docs/ko/cli/build.md +8 -0
- package/docs/ko/cli/index.md +1 -1
- package/docs/ko/compiler.md +1 -1
- package/docs/ko/configuration.md +34 -17
- package/docs/pl/agent_skills.md +1 -1
- package/docs/pl/cli/build.md +8 -0
- package/docs/pl/cli/index.md +1 -1
- package/docs/pl/compiler.md +1 -1
- package/docs/pl/configuration.md +34 -17
- package/docs/pt/agent_skills.md +1 -1
- package/docs/pt/cli/build.md +8 -0
- package/docs/pt/cli/index.md +1 -1
- package/docs/pt/compiler.md +1 -1
- package/docs/pt/configuration.md +34 -17
- package/docs/ru/agent_skills.md +1 -1
- package/docs/ru/cli/build.md +8 -0
- package/docs/ru/cli/index.md +1 -1
- package/docs/ru/compiler.md +1 -1
- package/docs/ru/configuration.md +34 -17
- package/docs/tr/agent_skills.md +1 -1
- package/docs/tr/cli/build.md +8 -0
- package/docs/tr/cli/index.md +1 -1
- package/docs/tr/compiler.md +1 -1
- package/docs/tr/configuration.md +34 -17
- package/docs/uk/agent_skills.md +1 -1
- package/docs/uk/cli/build.md +8 -0
- package/docs/uk/cli/index.md +1 -1
- package/docs/uk/compiler.md +1 -1
- package/docs/uk/configuration.md +52 -6
- package/docs/vi/agent_skills.md +1 -1
- package/docs/vi/cli/build.md +8 -0
- package/docs/vi/cli/index.md +1 -1
- package/docs/vi/compiler.md +1 -1
- package/docs/vi/configuration.md +34 -17
- package/docs/zh/agent_skills.md +1 -1
- package/docs/zh/cli/build.md +8 -0
- package/docs/zh/cli/index.md +1 -1
- package/docs/zh/compiler.md +1 -1
- package/docs/zh/configuration.md +34 -17
- package/package.json +10 -11
- package/src/common.ts +2 -1
- package/src/generated/blog.entry.ts +1 -1
- package/src/generated/docs.entry.ts +1 -1
- package/src/generated/frequentQuestions.entry.ts +1 -1
- package/src/generated/legal.entry.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legal.entry.mjs","names":["pathDirname"],"sources":["../../../src/generated/legal.entry.ts"],"sourcesContent":["/* AUTO-GENERATED – DO NOT EDIT */\n/* REGENERATE USING `pnpm prepare` */\nimport { existsSync } from 'node:fs';\nimport { readFile } from 'node:fs/promises';\nimport { join, dirname as pathDirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { getPackageJsonPath, getProjectRequire } from '@intlayer/config';\nimport type { LocalesValues } from '@intlayer/types';\n\n// Robustly resolve the base directory of the @intlayer/docs package in both\n// bundled environments (Next.js) and standalone CLIs (MCP via npx).\nconst currentDir =\n typeof __dirname !== 'undefined'\n ? __dirname\n : pathDirname(fileURLToPath(import.meta.url));\n\nlet baseDir: string;\ntry {\n // Prefer resolving from the location of this file (works for CLIs).\n const projectRequire = getProjectRequire(currentDir);\n const docEntryPath = projectRequire.resolve('@intlayer/docs');\n baseDir = getPackageJsonPath(docEntryPath).baseDir;\n} catch {\n try {\n // Fallback: resolve from the consumer project (works for apps/bundlers).\n const projectRequire = getProjectRequire();\n const docEntryPath = projectRequire.resolve('@intlayer/docs');\n baseDir = getPackageJsonPath(docEntryPath).baseDir;\n } catch {\n // Last resort: walk up from currentDir (useful when executed inside @intlayer/docs).\n baseDir = getPackageJsonPath(currentDir).baseDir;\n }\n}\n\nconst readLocale = (\n relativeAfterLocale: string,\n locale: LocalesValues\n): Promise<string> => {\n const target1 = join(baseDir, `./legal/${locale}/${relativeAfterLocale}`);\n if (existsSync(target1)) {\n return readFile(target1, 'utf8');\n }\n const target2 = join(baseDir, `./legal/en/${relativeAfterLocale}`);\n if (existsSync(target2)) {\n return readFile(target2, 'utf8');\n }\n\n return Promise.reject(\n new Error(\n `[docs] File not found: ${relativeAfterLocale} - locale: ${locale} - path: ${target1} - path: ${target2}`\n )\n );\n};\n\nexport const legalEntry = {\n './legal/en/privacy_notice.md': {\n en: readLocale('privacy_notice.md', 'en'),\n ru: readLocale('privacy_notice.md', 'ru'),\n ja: readLocale('privacy_notice.md', 'ja'),\n fr: readLocale('privacy_notice.md', 'fr'),\n ko: readLocale('privacy_notice.md', 'ko'),\n zh: readLocale('privacy_notice.md', 'zh'),\n es: readLocale('privacy_notice.md', 'es'),\n de: readLocale('privacy_notice.md', 'de'),\n ar: readLocale('privacy_notice.md', 'ar'),\n it: readLocale('privacy_notice.md', 'it'),\n 'en-GB': readLocale('privacy_notice.md', 'en-GB'),\n pt: readLocale('privacy_notice.md', 'pt'),\n hi: readLocale('privacy_notice.md', 'hi'),\n tr: readLocale('privacy_notice.md', 'tr'),\n pl: readLocale('privacy_notice.md', 'pl'),\n id: readLocale('privacy_notice.md', 'id'),\n vi: readLocale('privacy_notice.md', 'vi'),\n uk: readLocale('privacy_notice.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './legal/en/terms_of_service.md': {\n en: readLocale('terms_of_service.md', 'en'),\n ru: readLocale('terms_of_service.md', 'ru'),\n ja: readLocale('terms_of_service.md', 'ja'),\n fr: readLocale('terms_of_service.md', 'fr'),\n ko: readLocale('terms_of_service.md', 'ko'),\n zh: readLocale('terms_of_service.md', 'zh'),\n es: readLocale('terms_of_service.md', 'es'),\n de: readLocale('terms_of_service.md', 'de'),\n ar: readLocale('terms_of_service.md', 'ar'),\n it: readLocale('terms_of_service.md', 'it'),\n 'en-GB': readLocale('terms_of_service.md', 'en-GB'),\n pt: readLocale('terms_of_service.md', 'pt'),\n hi: readLocale('terms_of_service.md', 'hi'),\n tr: readLocale('terms_of_service.md', 'tr'),\n pl: readLocale('terms_of_service.md', 'pl'),\n id: readLocale('terms_of_service.md', 'id'),\n vi: readLocale('terms_of_service.md', 'vi'),\n uk: readLocale('terms_of_service.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n} as const;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"legal.entry.mjs","names":["pathDirname"],"sources":["../../../src/generated/legal.entry.ts"],"sourcesContent":["/* AUTO-GENERATED – DO NOT EDIT */\n/* REGENERATE USING `pnpm prepare` */\nimport { existsSync } from 'node:fs';\nimport { readFile } from 'node:fs/promises';\nimport { join, dirname as pathDirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { getPackageJsonPath, getProjectRequire } from '@intlayer/config/utils';\nimport type { LocalesValues } from '@intlayer/types';\n\n// Robustly resolve the base directory of the @intlayer/docs package in both\n// bundled environments (Next.js) and standalone CLIs (MCP via npx).\nconst currentDir =\n typeof __dirname !== 'undefined'\n ? __dirname\n : pathDirname(fileURLToPath(import.meta.url));\n\nlet baseDir: string;\ntry {\n // Prefer resolving from the location of this file (works for CLIs).\n const projectRequire = getProjectRequire(currentDir);\n const docEntryPath = projectRequire.resolve('@intlayer/docs');\n baseDir = getPackageJsonPath(docEntryPath).baseDir;\n} catch {\n try {\n // Fallback: resolve from the consumer project (works for apps/bundlers).\n const projectRequire = getProjectRequire();\n const docEntryPath = projectRequire.resolve('@intlayer/docs');\n baseDir = getPackageJsonPath(docEntryPath).baseDir;\n } catch {\n // Last resort: walk up from currentDir (useful when executed inside @intlayer/docs).\n baseDir = getPackageJsonPath(currentDir).baseDir;\n }\n}\n\nconst readLocale = (\n relativeAfterLocale: string,\n locale: LocalesValues\n): Promise<string> => {\n const target1 = join(baseDir, `./legal/${locale}/${relativeAfterLocale}`);\n if (existsSync(target1)) {\n return readFile(target1, 'utf8');\n }\n const target2 = join(baseDir, `./legal/en/${relativeAfterLocale}`);\n if (existsSync(target2)) {\n return readFile(target2, 'utf8');\n }\n\n return Promise.reject(\n new Error(\n `[docs] File not found: ${relativeAfterLocale} - locale: ${locale} - path: ${target1} - path: ${target2}`\n )\n );\n};\n\nexport const legalEntry = {\n './legal/en/privacy_notice.md': {\n en: readLocale('privacy_notice.md', 'en'),\n ru: readLocale('privacy_notice.md', 'ru'),\n ja: readLocale('privacy_notice.md', 'ja'),\n fr: readLocale('privacy_notice.md', 'fr'),\n ko: readLocale('privacy_notice.md', 'ko'),\n zh: readLocale('privacy_notice.md', 'zh'),\n es: readLocale('privacy_notice.md', 'es'),\n de: readLocale('privacy_notice.md', 'de'),\n ar: readLocale('privacy_notice.md', 'ar'),\n it: readLocale('privacy_notice.md', 'it'),\n 'en-GB': readLocale('privacy_notice.md', 'en-GB'),\n pt: readLocale('privacy_notice.md', 'pt'),\n hi: readLocale('privacy_notice.md', 'hi'),\n tr: readLocale('privacy_notice.md', 'tr'),\n pl: readLocale('privacy_notice.md', 'pl'),\n id: readLocale('privacy_notice.md', 'id'),\n vi: readLocale('privacy_notice.md', 'vi'),\n uk: readLocale('privacy_notice.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './legal/en/terms_of_service.md': {\n en: readLocale('terms_of_service.md', 'en'),\n ru: readLocale('terms_of_service.md', 'ru'),\n ja: readLocale('terms_of_service.md', 'ja'),\n fr: readLocale('terms_of_service.md', 'fr'),\n ko: readLocale('terms_of_service.md', 'ko'),\n zh: readLocale('terms_of_service.md', 'zh'),\n es: readLocale('terms_of_service.md', 'es'),\n de: readLocale('terms_of_service.md', 'de'),\n ar: readLocale('terms_of_service.md', 'ar'),\n it: readLocale('terms_of_service.md', 'it'),\n 'en-GB': readLocale('terms_of_service.md', 'en-GB'),\n pt: readLocale('terms_of_service.md', 'pt'),\n hi: readLocale('terms_of_service.md', 'hi'),\n tr: readLocale('terms_of_service.md', 'tr'),\n pl: readLocale('terms_of_service.md', 'pl'),\n id: readLocale('terms_of_service.md', 'id'),\n vi: readLocale('terms_of_service.md', 'vi'),\n uk: readLocale('terms_of_service.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n} as const;\n"],"mappings":"2PAWA,MAAM,EACJ,OAAO,UAAc,IACjB,UACAA,EAAY,EAAc,OAAO,KAAK,IAAI,CAAC,CAEjD,IAAI,EACJ,GAAI,CAIF,EAAU,EAFa,EAAkB,EAAW,CAChB,QAAQ,iBAAiB,CACnB,CAAC,aACrC,CACN,GAAI,CAIF,EAAU,EAFa,GAAmB,CACN,QAAQ,iBAAiB,CACnB,CAAC,aACrC,CAEN,EAAU,EAAmB,EAAW,CAAC,SAI7C,MAAM,GACJ,EACA,IACoB,CACpB,IAAM,EAAU,EAAK,EAAS,WAAW,EAAO,GAAG,IAAsB,CACzE,GAAI,EAAW,EAAQ,CACrB,OAAO,EAAS,EAAS,OAAO,CAElC,IAAM,EAAU,EAAK,EAAS,cAAc,IAAsB,CAKlE,OAJI,EAAW,EAAQ,CACd,EAAS,EAAS,OAAO,CAG3B,QAAQ,OACT,MACF,0BAA0B,EAAoB,aAAa,EAAO,WAAW,EAAQ,WAAW,IACjG,CACF,EAGU,EAAa,CACxB,+BAAgC,CAC9B,GAAI,EAAW,oBAAqB,KAAK,CACzC,GAAI,EAAW,oBAAqB,KAAK,CACzC,GAAI,EAAW,oBAAqB,KAAK,CACzC,GAAI,EAAW,oBAAqB,KAAK,CACzC,GAAI,EAAW,oBAAqB,KAAK,CACzC,GAAI,EAAW,oBAAqB,KAAK,CACzC,GAAI,EAAW,oBAAqB,KAAK,CACzC,GAAI,EAAW,oBAAqB,KAAK,CACzC,GAAI,EAAW,oBAAqB,KAAK,CACzC,GAAI,EAAW,oBAAqB,KAAK,CACzC,QAAS,EAAW,oBAAqB,QAAQ,CACjD,GAAI,EAAW,oBAAqB,KAAK,CACzC,GAAI,EAAW,oBAAqB,KAAK,CACzC,GAAI,EAAW,oBAAqB,KAAK,CACzC,GAAI,EAAW,oBAAqB,KAAK,CACzC,GAAI,EAAW,oBAAqB,KAAK,CACzC,GAAI,EAAW,oBAAqB,KAAK,CACzC,GAAI,EAAW,oBAAqB,KAAK,CAC1C,CACD,iCAAkC,CAChC,GAAI,EAAW,sBAAuB,KAAK,CAC3C,GAAI,EAAW,sBAAuB,KAAK,CAC3C,GAAI,EAAW,sBAAuB,KAAK,CAC3C,GAAI,EAAW,sBAAuB,KAAK,CAC3C,GAAI,EAAW,sBAAuB,KAAK,CAC3C,GAAI,EAAW,sBAAuB,KAAK,CAC3C,GAAI,EAAW,sBAAuB,KAAK,CAC3C,GAAI,EAAW,sBAAuB,KAAK,CAC3C,GAAI,EAAW,sBAAuB,KAAK,CAC3C,GAAI,EAAW,sBAAuB,KAAK,CAC3C,QAAS,EAAW,sBAAuB,QAAQ,CACnD,GAAI,EAAW,sBAAuB,KAAK,CAC3C,GAAI,EAAW,sBAAuB,KAAK,CAC3C,GAAI,EAAW,sBAAuB,KAAK,CAC3C,GAAI,EAAW,sBAAuB,KAAK,CAC3C,GAAI,EAAW,sBAAuB,KAAK,CAC3C,GAAI,EAAW,sBAAuB,KAAK,CAC3C,GAAI,EAAW,sBAAuB,KAAK,CAC5C,CACF"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getDoc, getDocBySlug, getDocMetadata, getDocMetadataBySlug, getDocMetadataRecord, getDocs, getDocsKeys } from "./doc.mjs";
|
|
3
|
-
import { getFrequentQuestion, getFrequentQuestionBySlug, getFrequentQuestionMetadata, getFrequentQuestionMetadataBySlug, getFrequentQuestionMetadataRecord, getFrequentQuestions, getFrequentQuestionsKeys } from "./frequentQuestions.mjs";
|
|
4
|
-
import { getLegal, getLegalBySlug, getLegalMetadata, getLegalMetadataBySlug, getLegalMetadataRecord, getLegals, getLegalsKeys } from "./legal.mjs";
|
|
5
|
-
|
|
6
|
-
export { getBlog, getBlogBySlug, getBlogMetadata, getBlogMetadataBySlug, getBlogMetadataRecord, getBlogs, getBlogsKeys, getDoc, getDocBySlug, getDocMetadata, getDocMetadataBySlug, getDocMetadataRecord, getDocs, getDocsKeys, getFrequentQuestion, getFrequentQuestionBySlug, getFrequentQuestionMetadata, getFrequentQuestionMetadataBySlug, getFrequentQuestionMetadataRecord, getFrequentQuestions, getFrequentQuestionsKeys, getLegal, getLegalBySlug, getLegalMetadata, getLegalMetadataBySlug, getLegalMetadataRecord, getLegals, getLegalsKeys };
|
|
1
|
+
import{getBlog as e,getBlogBySlug as t,getBlogMetadata as n,getBlogMetadataBySlug as r,getBlogMetadataRecord as i,getBlogs as a,getBlogsKeys as o}from"./blog.mjs";import{getDoc as s,getDocBySlug as c,getDocMetadata as l,getDocMetadataBySlug as u,getDocMetadataRecord as d,getDocs as f,getDocsKeys as p}from"./doc.mjs";import{getFrequentQuestion as m,getFrequentQuestionBySlug as h,getFrequentQuestionMetadata as g,getFrequentQuestionMetadataBySlug as _,getFrequentQuestionMetadataRecord as v,getFrequentQuestions as y,getFrequentQuestionsKeys as b}from"./frequentQuestions.mjs";import{getLegal as x,getLegalBySlug as S,getLegalMetadata as C,getLegalMetadataBySlug as w,getLegalMetadataRecord as T,getLegals as E,getLegalsKeys as D}from"./legal.mjs";export{e as getBlog,t as getBlogBySlug,n as getBlogMetadata,r as getBlogMetadataBySlug,i as getBlogMetadataRecord,a as getBlogs,o as getBlogsKeys,s as getDoc,c as getDocBySlug,l as getDocMetadata,u as getDocMetadataBySlug,d as getDocMetadataRecord,f as getDocs,p as getDocsKeys,m as getFrequentQuestion,h as getFrequentQuestionBySlug,g as getFrequentQuestionMetadata,_ as getFrequentQuestionMetadataBySlug,v as getFrequentQuestionMetadataRecord,y as getFrequentQuestions,b as getFrequentQuestionsKeys,x as getLegal,S as getLegalBySlug,C as getLegalMetadata,w as getLegalMetadataBySlug,T as getLegalMetadataRecord,E as getLegals,D as getLegalsKeys};
|
package/dist/esm/legal.mjs
CHANGED
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { legalEntry } from "./generated/legal.entry.mjs";
|
|
3
|
-
|
|
4
|
-
//#region src/legal.ts
|
|
5
|
-
const getLegalsKeys = () => getKeys(legalEntry);
|
|
6
|
-
const getLegals = async (locale = defaultLocale) => getFiles(legalEntry, locale);
|
|
7
|
-
const getLegal = async (docName, locale = defaultLocale) => getFile(legalEntry, docName, locale);
|
|
8
|
-
const getLegalMetadataRecord = async (locale = defaultLocale) => getFileMetadataRecord(legalEntry, locale);
|
|
9
|
-
const getLegalMetadata = async (docName, locale = defaultLocale) => getFileMetadata(legalEntry, docName, locale);
|
|
10
|
-
const getLegalMetadataBySlug = async (slugs, locale = defaultLocale, strict = false) => await getFileMetadataBySlug(legalEntry, slugs, locale, strict);
|
|
11
|
-
const getLegalBySlug = async (slugs, locale = defaultLocale, strict = false) => await getFileBySlug(legalEntry, slugs, locale, strict);
|
|
12
|
-
|
|
13
|
-
//#endregion
|
|
14
|
-
export { getLegal, getLegalBySlug, getLegalMetadata, getLegalMetadataBySlug, getLegalMetadataRecord, getLegals, getLegalsKeys };
|
|
1
|
+
import{defaultLocale as e,getFile as t,getFileBySlug as n,getFileMetadata as r,getFileMetadataBySlug as i,getFileMetadataRecord as a,getFiles as o,getKeys as s}from"./common.mjs";import{legalEntry as c}from"./generated/legal.entry.mjs";const l=()=>s(c),u=async(t=e)=>o(c,t),d=async(n,r=e)=>t(c,n,r),f=async(t=e)=>a(c,t),p=async(t,n=e)=>r(c,t,n),m=async(t,n=e,r=!1)=>await i(c,t,n,r),h=async(t,r=e,i=!1)=>await n(c,t,r,i);export{d as getLegal,h as getLegalBySlug,p as getLegalMetadata,m as getLegalMetadataBySlug,f as getLegalMetadataRecord,u as getLegals,l as getLegalsKeys};
|
|
15
2
|
//# sourceMappingURL=legal.mjs.map
|
package/dist/esm/legal.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legal.mjs","names":[],"sources":["../../src/legal.ts"],"sourcesContent":["import type { DeclaredLocales, LocalesValues } from '@intlayer/types';\nimport {\n defaultLocale,\n type FileMetadata,\n getFile,\n getFileBySlug,\n getFileMetadata,\n getFileMetadataBySlug,\n getFileMetadataRecord,\n getFiles,\n getKeys,\n} from './common';\nimport { legalEntry } from './generated/legal.entry';\n\nexport type LegalKey = keyof typeof legalEntry;\nexport type Legals = Record<LegalKey, Record<LocalesValues, Promise<string>>>;\nexport type LegalMetadata = FileMetadata;\n\nexport const getLegalsKeys = (): (keyof typeof legalEntry)[] =>\n getKeys(legalEntry);\n\nexport const getLegals = async <L extends LocalesValues = DeclaredLocales>(\n locale: L = defaultLocale as L\n): Promise<Record<LegalKey, string>> => getFiles(legalEntry, locale);\n\nexport const getLegal = async <L extends LocalesValues = DeclaredLocales>(\n docName: keyof typeof legalEntry,\n locale: L = defaultLocale as L\n): Promise<string> => getFile(legalEntry, docName, locale);\n\nexport const getLegalMetadataRecord = async <\n L extends LocalesValues = DeclaredLocales,\n>(\n locale: L = defaultLocale as L\n): Promise<Record<LegalKey, FileMetadata>> =>\n getFileMetadataRecord(legalEntry, locale);\n\nexport const getLegalMetadata = async <\n D extends LegalKey,\n L extends LocalesValues = DeclaredLocales,\n>(\n docName: D,\n locale: L = defaultLocale as L\n): Promise<FileMetadata> => getFileMetadata(legalEntry, docName, locale);\n\nexport const getLegalMetadataBySlug = async <\n L extends LocalesValues = DeclaredLocales,\n>(\n slugs: string | string[],\n locale: L = defaultLocale as L,\n strict = false\n): Promise<FileMetadata[]> =>\n await getFileMetadataBySlug(legalEntry, slugs, locale, strict);\n\nexport const getLegalBySlug = async <L extends LocalesValues = DeclaredLocales>(\n slugs: string | string[],\n locale: L = defaultLocale as L,\n strict = false\n): Promise<string[]> => await getFileBySlug(legalEntry, slugs, locale, strict);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"legal.mjs","names":[],"sources":["../../src/legal.ts"],"sourcesContent":["import type { DeclaredLocales, LocalesValues } from '@intlayer/types';\nimport {\n defaultLocale,\n type FileMetadata,\n getFile,\n getFileBySlug,\n getFileMetadata,\n getFileMetadataBySlug,\n getFileMetadataRecord,\n getFiles,\n getKeys,\n} from './common';\nimport { legalEntry } from './generated/legal.entry';\n\nexport type LegalKey = keyof typeof legalEntry;\nexport type Legals = Record<LegalKey, Record<LocalesValues, Promise<string>>>;\nexport type LegalMetadata = FileMetadata;\n\nexport const getLegalsKeys = (): (keyof typeof legalEntry)[] =>\n getKeys(legalEntry);\n\nexport const getLegals = async <L extends LocalesValues = DeclaredLocales>(\n locale: L = defaultLocale as L\n): Promise<Record<LegalKey, string>> => getFiles(legalEntry, locale);\n\nexport const getLegal = async <L extends LocalesValues = DeclaredLocales>(\n docName: keyof typeof legalEntry,\n locale: L = defaultLocale as L\n): Promise<string> => getFile(legalEntry, docName, locale);\n\nexport const getLegalMetadataRecord = async <\n L extends LocalesValues = DeclaredLocales,\n>(\n locale: L = defaultLocale as L\n): Promise<Record<LegalKey, FileMetadata>> =>\n getFileMetadataRecord(legalEntry, locale);\n\nexport const getLegalMetadata = async <\n D extends LegalKey,\n L extends LocalesValues = DeclaredLocales,\n>(\n docName: D,\n locale: L = defaultLocale as L\n): Promise<FileMetadata> => getFileMetadata(legalEntry, docName, locale);\n\nexport const getLegalMetadataBySlug = async <\n L extends LocalesValues = DeclaredLocales,\n>(\n slugs: string | string[],\n locale: L = defaultLocale as L,\n strict = false\n): Promise<FileMetadata[]> =>\n await getFileMetadataBySlug(legalEntry, slugs, locale, strict);\n\nexport const getLegalBySlug = async <L extends LocalesValues = DeclaredLocales>(\n slugs: string | string[],\n locale: L = defaultLocale as L,\n strict = false\n): Promise<string[]> => await getFileBySlug(legalEntry, slugs, locale, strict);\n"],"mappings":"4OAkBA,MAAa,MACX,EAAQ,EAAW,CAER,EAAY,MACvB,EAAY,IAC0B,EAAS,EAAY,EAAO,CAEvD,EAAW,MACtB,EACA,EAAY,IACQ,EAAQ,EAAY,EAAS,EAAO,CAE7C,EAAyB,MAGpC,EAAY,IAEZ,EAAsB,EAAY,EAAO,CAE9B,EAAmB,MAI9B,EACA,EAAY,IACc,EAAgB,EAAY,EAAS,EAAO,CAE3D,EAAyB,MAGpC,EACA,EAAY,EACZ,EAAS,KAET,MAAM,EAAsB,EAAY,EAAO,EAAQ,EAAO,CAEnD,EAAiB,MAC5B,EACA,EAAY,EACZ,EAAS,KACa,MAAM,EAAc,EAAY,EAAO,EAAQ,EAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","names":[],"sources":["../../src/common.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"common.d.ts","names":[],"sources":["../../src/common.ts"],"mappings":";;;cAKa,aAAA;AAAA,cAEA,iBAAA;AAAA,cAEA,UAAA;AAAA,cAEA,OAAA,aAAqB,MAAA,eAAqB,GAAA,EAAK,CAAA,YAAW,CAAA;AAAA,cAG1D,QAAA,aACD,MAAA,gBAAsB,MAAA,CAAO,aAAA,EAAe,OAAA,YAEtD,KAAA,EAAO,CAAA,EACP,IAAA,GAAM,aAAA,KACL,OAAA,CAAQ,MAAA;AAAA,cAUE,OAAA,aACD,MAAA,SAAe,MAAA,CAAO,aAAA,EAAe,OAAA,YAE/C,KAAA,EAAO,CAAA,EACP,MAAA,QAAc,CAAA,EACd,MAAA,GAAQ,aAAA,KACP,OAAA;AAAA,KAsBS,YAAA;EACV,MAAA;EACA,GAAA;EACA,WAAA;EACA,SAAA;EACA,KAAA;EACA,KAAA;EACA,WAAA;EACA,QAAA;EACA,SAAA;EACA,SAAA;EACA,MAAA;EACA,YAAA;EACA,mBAAA;EACA,OAAA;IACE,OAAA;IACA,IAAA;IACA,OAAA;EAAA;AAAA;AAAA,cAIS,cAAA,GACX,MAAA,UACA,IAAA,UACA,MAAA,GAAQ,aAAA,KACP,YAAA;AAAA,cAwBU,eAAA,aACD,MAAA,SAAe,MAAA,CAAO,aAAA,EAAe,OAAA,sBACrC,YAAA,EAEV,KAAA,EAAO,CAAA,EACP,MAAA,QAAc,CAAA,EACd,MAAA,GAAQ,aAAA,KACP,OAAA,CAAQ,CAAA;AAAA,cAME,qBAAA,aACD,MAAA,SAAe,MAAA,CAAO,aAAA,EAAe,OAAA,YAE/C,KAAA,EAAO,CAAA,EACP,MAAA,GAAQ,aAAA,KACP,OAAA,CAAQ,MAAA,OAAa,CAAA,EAAG,YAAA;AAAA,cAWd,qBAAA,aACD,MAAA,SAAe,MAAA,CAAO,aAAA,EAAe,OAAA,YAE/C,KAAA,EAAO,CAAA,EACP,KAAA,qBACA,MAAA,GAAQ,aAAA,EACR,MAAA,eAAc,OAAA,CAAA,YAAA;AAAA,cAiCH,aAAA,aACD,MAAA,SAAe,MAAA,CAAO,aAAA,EAAe,OAAA,YAE/C,KAAA,EAAO,CAAA,EACP,KAAA,qBACA,MAAA,GAAQ,aAAA,EACR,MAAA,eAAc,OAAA"}
|
package/docs/ar/agent_skills.md
CHANGED
|
@@ -36,7 +36,7 @@ npx skills add aymericzip/intlayer-skills
|
|
|
36
36
|
|
|
37
37
|
1. اكتشاف الإطار الذي تستخدمه (مثل Next.js أو React أو Vite).
|
|
38
38
|
2. سوف يسألك عن المنصات التي تريد تثبيت المهارات لها (Cursor, Windsurf, VS Code, OpenCode, Claude Code, GitHub Copilot Workspace، إلخ).
|
|
39
|
-
3. سيُنشئ ملفات التكوين المطلوبة (مثل `.cursor/skills/
|
|
39
|
+
3. سيُنشئ ملفات التكوين المطلوبة (مثل `.cursor/skills/intlayer-next-js/SKILL.md` و `.windsurf/skills/intlayer-next-js/SKILL.md` و `.opencode/skills/intlayer-next-js/SKILL.md` و `.vscode/mcp.json` إلخ).
|
|
40
40
|
|
|
41
41
|
## المنصات المدعومة
|
|
42
42
|
|
package/docs/ar/cli/build.md
CHANGED
|
@@ -13,6 +13,10 @@ slugs:
|
|
|
13
13
|
- concept
|
|
14
14
|
- cli
|
|
15
15
|
- build
|
|
16
|
+
history:
|
|
17
|
+
- version: 8.1.5
|
|
18
|
+
date: 2026-02-23
|
|
19
|
+
changes: إضافة خيار checkTypes
|
|
16
20
|
---
|
|
17
21
|
|
|
18
22
|
# بناء القواميس
|
|
@@ -62,3 +66,7 @@ npx intlayer build --watch
|
|
|
62
66
|
- **`--no-cache`**: تعطيل التخزين المؤقت.
|
|
63
67
|
|
|
64
68
|
> مثال: `npx intlayer build --no-cache`
|
|
69
|
+
|
|
70
|
+
- **`--check-types`**: التحقق من أنواع ملفات إعلان المحتوى.
|
|
71
|
+
|
|
72
|
+
> مثال: `npx intlayer build --check-types`
|
package/docs/ar/cli/index.md
CHANGED
|
@@ -134,7 +134,7 @@ bun add intlayer-cli -g
|
|
|
134
134
|
|
|
135
135
|
### إدارة المكونات
|
|
136
136
|
|
|
137
|
-
- **[تحويل المكونات](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ar/cli/
|
|
137
|
+
- **[تحويل المكونات](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ar/cli/extract.md)** - تحويل المكونات الحالية لاستخدام Intlayer
|
|
138
138
|
|
|
139
139
|
### التهيئة
|
|
140
140
|
|
package/docs/ar/compiler.md
CHANGED
|
@@ -49,7 +49,7 @@ history:
|
|
|
49
49
|
|
|
50
50
|
لمقارنة معمارية أعمق، راجع منشور المدونة [المترجم مقابل i18n التصريحي](https://github.com/aymericzip/intlayer/blob/main/docs/blog/en/compiler_vs_declarative_i18n.md).
|
|
51
51
|
|
|
52
|
-
كبديل، لأتمتة عملية i18n الخاصة بك مع الحفاظ على السيطرة الكاملة على المحتوى الخاص بك، يوفر Intlayer أيضًا أمر الاستخراج التلقائي `intlayer
|
|
52
|
+
كبديل، لأتمتة عملية i18n الخاصة بك مع الحفاظ على السيطرة الكاملة على المحتوى الخاص بك، يوفر Intlayer أيضًا أمر الاستخراج التلقائي `intlayer extract` (راجع [وثائق CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ar/cli/extract.md))، أو أمر `Intlayer: extract content to Dictionary` من امتداد Intlayer VS Code (راجع [وثائق امتداد VS Code](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ar/vs_code_extension.md)).
|
|
53
53
|
|
|
54
54
|
## الاستخدام
|
|
55
55
|
|
package/docs/ar/configuration.md
CHANGED
|
@@ -85,6 +85,7 @@ history:
|
|
|
85
85
|
|
|
86
86
|
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
87
87
|
import { Locales, type IntlayerConfig } from "intlayer";
|
|
88
|
+
import { nextjsRewrite } from "intlayer/routing";
|
|
88
89
|
import { z } from "zod";
|
|
89
90
|
|
|
90
91
|
/**
|
|
@@ -191,12 +192,12 @@ const config: IntlayerConfig = {
|
|
|
191
192
|
/**
|
|
192
193
|
* Custom URL rewriting rules for locale-specific paths.
|
|
193
194
|
*/
|
|
194
|
-
rewrite: {
|
|
195
|
-
"/about": {
|
|
196
|
-
en: "/about",
|
|
197
|
-
fr: "/a-propos",
|
|
195
|
+
rewrite: nextjsRewrite({
|
|
196
|
+
"/[locale]/about": {
|
|
197
|
+
en: "/[locale]/about",
|
|
198
|
+
fr: "/[locale]/a-propos",
|
|
198
199
|
},
|
|
199
|
-
},
|
|
200
|
+
}),
|
|
200
201
|
},
|
|
201
202
|
|
|
202
203
|
/**
|
|
@@ -342,6 +343,12 @@ const config: IntlayerConfig = {
|
|
|
342
343
|
* Default: ['esm', 'cjs']
|
|
343
344
|
*/
|
|
344
345
|
outputFormat: ["esm"],
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Indicates if the build should check TypeScript types.
|
|
349
|
+
* Default: false
|
|
350
|
+
*/
|
|
351
|
+
checkTypes: false,
|
|
345
352
|
},
|
|
346
353
|
|
|
347
354
|
/**
|
|
@@ -416,7 +423,10 @@ const config: IntlayerConfig = {
|
|
|
416
423
|
/**
|
|
417
424
|
* Pattern to traverse the code to optimize.
|
|
418
425
|
*/
|
|
419
|
-
transformPattern: [
|
|
426
|
+
transformPattern: [
|
|
427
|
+
"**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}",
|
|
428
|
+
"!**/node_modules/**",
|
|
429
|
+
],
|
|
420
430
|
|
|
421
431
|
/**
|
|
422
432
|
* Pattern to exclude from the optimization.
|
|
@@ -629,26 +639,27 @@ export default config;
|
|
|
629
639
|
```typescript
|
|
630
640
|
routing: {
|
|
631
641
|
mode: "prefix-no-default", // استراتيجية احتياطية
|
|
632
|
-
rewrite: {
|
|
633
|
-
"/about": {
|
|
634
|
-
en: "/about",
|
|
635
|
-
fr: "/a-propos",
|
|
642
|
+
rewrite: nextjsRewrite({
|
|
643
|
+
"/[locale]/about": {
|
|
644
|
+
en: "/[locale]/about",
|
|
645
|
+
fr: "/[locale]/a-propos",
|
|
636
646
|
},
|
|
637
|
-
"/product/[slug]": {
|
|
638
|
-
en: "/product/[slug]",
|
|
639
|
-
fr: "/produit/[slug]",
|
|
647
|
+
"/[locale]/product/[slug]": {
|
|
648
|
+
en: "/[locale]/product/[slug]",
|
|
649
|
+
fr: "/[locale]/produit/[slug]",
|
|
640
650
|
},
|
|
641
|
-
"/blog/[category]/[id]": {
|
|
642
|
-
en: "/blog/[category]/[id]",
|
|
643
|
-
fr: "/journal/[category]/[id]",
|
|
651
|
+
"/[locale]/blog/[category]/[id]": {
|
|
652
|
+
en: "/[locale]/blog/[category]/[id]",
|
|
653
|
+
fr: "/[locale]/journal/[category]/[id]",
|
|
644
654
|
},
|
|
645
|
-
},
|
|
655
|
+
}),
|
|
646
656
|
}
|
|
647
657
|
```
|
|
648
658
|
- _ملاحظة_: قواعد إعادة الكتابة لها الأولوية على سلوك `mode` الافتراضي. إذا تطابق مسار مع قاعدة إعادة كتابة، سيتم استخدام المسار المترجم من تكوين إعادة الكتابة بدلاً من بادئة اللغة القياسية.
|
|
649
659
|
- _ملاحظة_: معاملات المسار الديناميكية مدعومة باستخدام ترميز الأقواس (على سبيل المثال، `[slug]`، `[id]`). يتم استخراج قيم المعاملات تلقائيًا من URL وإدراجها في المسار المعاد كتابته.
|
|
650
660
|
- _ملاحظة_: يعمل مع تطبيقات Next.js و Vite. ستعيد البرمجية الوسيطة/الوكيل كتابة الطلبات الواردة تلقائيًا لتطابق بنية المسار الداخلية.
|
|
651
661
|
- _ملاحظة_: عند إنشاء عناوين URL باستخدام `getLocalizedUrl()`، يتم تطبيق قواعد إعادة الكتابة تلقائيًا إذا تطابقت مع المسار المقدم.
|
|
662
|
+
- _Reference_ : لمزيد من المعلومات، راجع [إعادة كتابة عناوين URL المخصصة](https://github.com/aymericzip/intlayer/blob/main/docs/docs/ar/custom_url_rewrites.md).
|
|
652
663
|
|
|
653
664
|
- **serverSetCookie**:
|
|
654
665
|
- _النوع_: `string`
|
|
@@ -930,6 +941,12 @@ export default config;
|
|
|
930
941
|
- _ملاحظة_: إذا كان 'manual'، سيتم تعيين البناء فقط عند تنفيذ أمر البناء.
|
|
931
942
|
- _ملاحظة_: يمكن استخدامه لتعطيل بناء القواميس، على سبيل المثال عندما يجب تجنب التنفيذ في بيئة Node.js.
|
|
932
943
|
|
|
944
|
+
- **checkTypes**:
|
|
945
|
+
- _Type_: `boolean`
|
|
946
|
+
- _Default_: `false`
|
|
947
|
+
- _Description_: يشير إلى ما إذا كان البناء يجب أن يتحقق من أنواع TypeScript ويسجل الأخطاء.
|
|
948
|
+
- _Note_: هذا يمكن أن يبطئ عملية البناء.
|
|
949
|
+
|
|
933
950
|
- **optimize**:
|
|
934
951
|
- _النوع_: `boolean`
|
|
935
952
|
- _الافتراضي_: `process.env.NODE_ENV === 'production'`
|
package/docs/de/agent_skills.md
CHANGED
|
@@ -36,7 +36,7 @@ Wenn Sie diesen Befehl ausführen, wird er:
|
|
|
36
36
|
|
|
37
37
|
1. Das von Ihnen verwendete Framework erkennen (z. B. Next.js, React, Vite).
|
|
38
38
|
2. Sie fragen, für welche Plattformen Sie Fähigkeiten installieren möchten (Cursor, Windsurf, VS Code, OpenCode, Claude Code, GitHub Copilot Workspace usw.).
|
|
39
|
-
3. Die erforderlichen Konfigurationsdateien generieren (z. B. `.cursor/skills/
|
|
39
|
+
3. Die erforderlichen Konfigurationsdateien generieren (z. B. `.cursor/skills/intlayer-next-js/SKILL.md`, `.windsurf/skills/intlayer-next-js/SKILL.md`, `.opencode/skills/intlayer-next-js/SKILL.md`, `.vscode/mcp.json` usw.).
|
|
40
40
|
|
|
41
41
|
## Unterstützte Plattformen
|
|
42
42
|
|
package/docs/de/cli/build.md
CHANGED
|
@@ -13,6 +13,10 @@ slugs:
|
|
|
13
13
|
- concept
|
|
14
14
|
- cli
|
|
15
15
|
- build
|
|
16
|
+
history:
|
|
17
|
+
- version: 8.1.5
|
|
18
|
+
date: 2026-02-23
|
|
19
|
+
changes: checkTypes-Option hinzugefügt
|
|
16
20
|
---
|
|
17
21
|
|
|
18
22
|
# Wörterbücher erstellen
|
|
@@ -62,3 +66,7 @@ Dieser Befehl findet standardmäßig Ihre Deklarations-Inhaltsdateien unter `./s
|
|
|
62
66
|
- **`--no-cache`**: Deaktivieren Sie den Cache.
|
|
63
67
|
|
|
64
68
|
> Beispiel: `npx intlayer build --no-cache`
|
|
69
|
+
|
|
70
|
+
- **`--check-types`**: Überprüft die Typen der Inhaltsdeklarationsdateien.
|
|
71
|
+
|
|
72
|
+
> Beispiel: `npx intlayer build --check-types`
|
package/docs/de/cli/index.md
CHANGED
|
@@ -134,7 +134,7 @@ Um zu sehen, wie verfügbare Sprachen oder andere Parameter konfiguriert werden,
|
|
|
134
134
|
|
|
135
135
|
### Komponentenverwaltung
|
|
136
136
|
|
|
137
|
-
- **[Komponenten transformieren](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/cli/
|
|
137
|
+
- **[Komponenten transformieren](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/cli/extract.md)** – Bestehende Komponenten transformieren, um Intlayer zu verwenden
|
|
138
138
|
|
|
139
139
|
### Konfiguration
|
|
140
140
|
|
package/docs/de/compiler.md
CHANGED
|
@@ -49,7 +49,7 @@ Während der Compiler eine ausgezeichnete "funktioniert einfach so"-Erfahrung bi
|
|
|
49
49
|
|
|
50
50
|
Für einen tieferen architektonischen Vergleich siehe den Blogbeitrag [Compiler vs. Declarative i18n](https://github.com/aymericzip/intlayer/blob/main/docs/blog/de/compiler_vs_declarative_i18n.md).
|
|
51
51
|
|
|
52
|
-
Als Alternative, um Ihren i18n-Prozess zu automatisieren und gleichzeitig die volle Kontrolle über Ihren Inhalt zu behalten, bietet Intlayer auch einen Auto-Extraktionsbefehl `intlayer
|
|
52
|
+
Als Alternative, um Ihren i18n-Prozess zu automatisieren und gleichzeitig die volle Kontrolle über Ihren Inhalt zu behalten, bietet Intlayer auch einen Auto-Extraktionsbefehl `intlayer extract` (siehe [CLI-Dokumentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/cli/extract.md)) oder den Befehl `Intlayer: extract content to Dictionary` aus der Intlayer VS Code-Erweiterung (siehe [VS Code-Erweiterungsdokumentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/vs_code_extension.md)).
|
|
53
53
|
|
|
54
54
|
## Verwendung
|
|
55
55
|
|
package/docs/de/configuration.md
CHANGED
|
@@ -85,6 +85,7 @@ Intlayer akzeptiert JSON-, JS-, MJS- und TS-Konfigurationsdateiformate:
|
|
|
85
85
|
|
|
86
86
|
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
87
87
|
import { Locales, type IntlayerConfig } from "intlayer";
|
|
88
|
+
import { nextjsRewrite } from "intlayer/routing";
|
|
88
89
|
import { z } from "zod";
|
|
89
90
|
|
|
90
91
|
/**
|
|
@@ -191,12 +192,12 @@ const config: IntlayerConfig = {
|
|
|
191
192
|
/**
|
|
192
193
|
* Custom URL rewriting rules for locale-specific paths.
|
|
193
194
|
*/
|
|
194
|
-
rewrite: {
|
|
195
|
-
"/about": {
|
|
196
|
-
en: "/about",
|
|
197
|
-
fr: "/a-propos",
|
|
195
|
+
rewrite: nextjsRewrite({
|
|
196
|
+
"/[locale]/about": {
|
|
197
|
+
en: "/[locale]/about",
|
|
198
|
+
fr: "/[locale]/a-propos",
|
|
198
199
|
},
|
|
199
|
-
},
|
|
200
|
+
}),
|
|
200
201
|
},
|
|
201
202
|
|
|
202
203
|
/**
|
|
@@ -342,6 +343,12 @@ const config: IntlayerConfig = {
|
|
|
342
343
|
* Default: ['esm', 'cjs']
|
|
343
344
|
*/
|
|
344
345
|
outputFormat: ["esm"],
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Indicates if the build should check TypeScript types.
|
|
349
|
+
* Default: false
|
|
350
|
+
*/
|
|
351
|
+
checkTypes: false,
|
|
345
352
|
},
|
|
346
353
|
|
|
347
354
|
/**
|
|
@@ -416,7 +423,10 @@ const config: IntlayerConfig = {
|
|
|
416
423
|
/**
|
|
417
424
|
* Pattern to traverse the code to optimize.
|
|
418
425
|
*/
|
|
419
|
-
transformPattern: [
|
|
426
|
+
transformPattern: [
|
|
427
|
+
"**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}",
|
|
428
|
+
"!**/node_modules/**",
|
|
429
|
+
],
|
|
420
430
|
|
|
421
431
|
/**
|
|
422
432
|
* Pattern to exclude from the optimization.
|
|
@@ -629,26 +639,27 @@ Einstellungen, die das Verhalten der Middleware steuern, einschließlich wie die
|
|
|
629
639
|
```typescript
|
|
630
640
|
routing: {
|
|
631
641
|
mode: "prefix-no-default", // Fallback-Strategie
|
|
632
|
-
rewrite: {
|
|
633
|
-
"/about": {
|
|
634
|
-
en: "/about",
|
|
635
|
-
fr: "/a-propos",
|
|
642
|
+
rewrite: nextjsRewrite({
|
|
643
|
+
"/[locale]/about": {
|
|
644
|
+
en: "/[locale]/about",
|
|
645
|
+
fr: "/[locale]/a-propos",
|
|
636
646
|
},
|
|
637
|
-
"/product/[slug]": {
|
|
638
|
-
en: "/product/[slug]",
|
|
639
|
-
fr: "/produit/[slug]",
|
|
647
|
+
"/[locale]/product/[slug]": {
|
|
648
|
+
en: "/[locale]/product/[slug]",
|
|
649
|
+
fr: "/[locale]/produit/[slug]",
|
|
640
650
|
},
|
|
641
|
-
"/blog/[category]/[id]": {
|
|
642
|
-
en: "/blog/[category]/[id]",
|
|
643
|
-
fr: "/journal/[category]/[id]",
|
|
651
|
+
"/[locale]/blog/[category]/[id]": {
|
|
652
|
+
en: "/[locale]/blog/[category]/[id]",
|
|
653
|
+
fr: "/[locale]/journal/[category]/[id]",
|
|
644
654
|
},
|
|
645
|
-
},
|
|
655
|
+
}),
|
|
646
656
|
}
|
|
647
657
|
```
|
|
648
658
|
- _Hinweis_: Die Umschreiberegeln haben Vorrang vor dem Standard-`mode`-Verhalten. Wenn ein Pfad mit einer Umschreiberegel übereinstimmt, wird der lokalisierte Pfad aus der Umschreibkonfiguration anstelle der Standard-Sprachpräfixierung verwendet.
|
|
649
659
|
- _Hinweis_: Dynamische Routenparameter werden mit der Klammernotation unterstützt (z. B. `[slug]`, `[id]`). Die Parameterwerte werden automatisch aus der URL extrahiert und in den umgeschriebenen Pfad interpoliert.
|
|
650
660
|
- _Hinweis_: Funktioniert mit Next.js- und Vite-Anwendungen. Der Middleware/Proxy schreibt eingehende Anfragen automatisch um, um der internen Routenstruktur zu entsprechen.
|
|
651
661
|
- _Hinweis_: Beim Generieren von URLs mit `getLocalizedUrl()` werden die Umschreiberegeln automatisch angewendet, wenn sie mit dem bereitgestellten Pfad übereinstimmen.
|
|
662
|
+
- _Referenz_: Weitere Informationen finden Sie unter [Benutzerdefinierte URL-Umschreibungen](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/custom_url_rewrites.md).
|
|
652
663
|
|
|
653
664
|
- **serverSetCookie**:
|
|
654
665
|
- _Typ_: `string`
|
|
@@ -936,6 +947,12 @@ Build-Optionen gelten für die Plugins `@intlayer/babel` und `@intlayer/swc`.
|
|
|
936
947
|
- _Hinweis_: Wenn 'manual', wird der Build nur gesetzt, wenn der Build-Befehl ausgeführt wird.
|
|
937
948
|
- _Hinweis_: Kann verwendet werden, um die Erstellung von Wörterbüchern zu deaktivieren, z.B. wenn die Ausführung in einer Node.js-Umgebung vermieden werden sollte.
|
|
938
949
|
|
|
950
|
+
- **checkTypes**:
|
|
951
|
+
- _Type_: `boolean`
|
|
952
|
+
- _Default_: `false`
|
|
953
|
+
- _Description_: Gibt an, ob der Build TypeScript-Typen überprüfen und Fehler protokollieren soll.
|
|
954
|
+
- _Note_: Dies kann den Build-Vorgang verlangsamen.
|
|
955
|
+
|
|
939
956
|
- **optimize**:
|
|
940
957
|
- _Typ_: `boolean`
|
|
941
958
|
- _Standard_: `process.env.NODE_ENV === 'production'`
|
package/docs/en/agent_skills.md
CHANGED
|
@@ -36,7 +36,7 @@ When you run this command, it will:
|
|
|
36
36
|
|
|
37
37
|
1. Detect the framework you are using (e.g., Next.js, React, Vite).
|
|
38
38
|
2. Ask you which platforms you want to install skills for (Cursor, Windsurf, VS Code, OpenCode, Claude Code, GitHub Copilot Workspace, etc.).
|
|
39
|
-
3. Generate the required configuration files (e.g., `.cursor/skills/
|
|
39
|
+
3. Generate the required configuration files (e.g., `.cursor/skills/intlayer-next-js/SKILL.md`, `.windsurf/skills/intlayer-next-js/SKILL.md`, `.opencode/skills/intlayer-next-js/SKILL.md`, `.vscode/mcp.json`, etc.).
|
|
40
40
|
|
|
41
41
|
## Supported Platforms
|
|
42
42
|
|
package/docs/en/cli/build.md
CHANGED
|
@@ -13,6 +13,10 @@ slugs:
|
|
|
13
13
|
- concept
|
|
14
14
|
- cli
|
|
15
15
|
- build
|
|
16
|
+
history:
|
|
17
|
+
- version: 8.1.5
|
|
18
|
+
date: 2026-02-23
|
|
19
|
+
changes: Add checkTypes option
|
|
16
20
|
---
|
|
17
21
|
|
|
18
22
|
# Build Dictionaries
|
|
@@ -62,3 +66,7 @@ This command will find your declaration content files as default as `./src/**/*.
|
|
|
62
66
|
- **`--no-cache`**: Disable the cache.
|
|
63
67
|
|
|
64
68
|
> Example: `npx intlayer build --no-cache`
|
|
69
|
+
|
|
70
|
+
- **`--check-types`**: Check types of the content declaration files.
|
|
71
|
+
|
|
72
|
+
> Example: `npx intlayer build --check-types`
|
package/docs/en/compiler.md
CHANGED
|
@@ -49,7 +49,7 @@ While the compiler offers an excellent "just works" experience, it also introduc
|
|
|
49
49
|
|
|
50
50
|
For a deeper architectural comparison, see the blog post [Compiler vs. Declarative i18n](https://github.com/aymericzip/intlayer/blob/main/docs/blog/en/compiler_vs_declarative_i18n.md).
|
|
51
51
|
|
|
52
|
-
As an alternative, to automate your i18n process while keeping full control of your content, Intlayer also provides an auto-extraction command `intlayer
|
|
52
|
+
As an alternative, to automate your i18n process while keeping full control of your content, Intlayer also provides an auto-extraction command `intlayer extract` (see [CLI documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/cli/extract.md)), or the `Intlayer: extract content to Dictionary` command from the Intlayer VS Code extension (see [VS Code extension documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/vs_code_extension.md)).
|
|
53
53
|
|
|
54
54
|
## Usage
|
|
55
55
|
|
package/docs/en/configuration.md
CHANGED
|
@@ -14,6 +14,9 @@ slugs:
|
|
|
14
14
|
- concept
|
|
15
15
|
- configuration
|
|
16
16
|
history:
|
|
17
|
+
- version: 8.1.5
|
|
18
|
+
date: 2026-02-23
|
|
19
|
+
changes: Add compiler option 'build-only', and dictionary prefix
|
|
17
20
|
- version: 8.0.6
|
|
18
21
|
date: 2026-02-12
|
|
19
22
|
changes: Add support for Open Router, Alibaba, Amazon, Google Vertex Bedrock, Fireworks, Groq, Hugging Face, and Together.ai providers
|
|
@@ -109,6 +112,7 @@ Intlayer accepts JSON, JS, MJS, and TS configuration file formats:
|
|
|
109
112
|
|
|
110
113
|
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
111
114
|
import { Locales, type IntlayerConfig } from "intlayer";
|
|
115
|
+
import { nextjsRewrite } from "intlayer/routing";
|
|
112
116
|
import { z } from "zod";
|
|
113
117
|
|
|
114
118
|
/**
|
|
@@ -215,12 +219,12 @@ const config: IntlayerConfig = {
|
|
|
215
219
|
/**
|
|
216
220
|
* Custom URL rewriting rules for locale-specific paths.
|
|
217
221
|
*/
|
|
218
|
-
rewrite: {
|
|
219
|
-
"/about": {
|
|
220
|
-
en: "/about",
|
|
221
|
-
fr: "/a-propos",
|
|
222
|
+
rewrite: nextjsRewrite({
|
|
223
|
+
"/[locale]/about": {
|
|
224
|
+
en: "/[locale]/about",
|
|
225
|
+
fr: "/[locale]/a-propos",
|
|
222
226
|
},
|
|
223
|
-
},
|
|
227
|
+
}),
|
|
224
228
|
},
|
|
225
229
|
|
|
226
230
|
/**
|
|
@@ -377,6 +381,12 @@ const config: IntlayerConfig = {
|
|
|
377
381
|
* Default: ['esm', 'cjs']
|
|
378
382
|
*/
|
|
379
383
|
outputFormat: ["esm"],
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Indicates if the build should check TypeScript types.
|
|
387
|
+
* Default: false
|
|
388
|
+
*/
|
|
389
|
+
checkTypes: false,
|
|
380
390
|
},
|
|
381
391
|
|
|
382
392
|
/**
|
|
@@ -445,13 +455,17 @@ const config: IntlayerConfig = {
|
|
|
445
455
|
compiler: {
|
|
446
456
|
/**
|
|
447
457
|
* Indicates if the compiler should be enabled.
|
|
458
|
+
* Set to 'build-only' to skip the compiler during development and speed up start times.
|
|
448
459
|
*/
|
|
449
460
|
enabled: true,
|
|
450
461
|
|
|
451
462
|
/**
|
|
452
463
|
* Pattern to traverse the code to optimize.
|
|
453
464
|
*/
|
|
454
|
-
transformPattern: [
|
|
465
|
+
transformPattern: [
|
|
466
|
+
"**/*.{js,ts,mjs,cjs,jsx,tsx,vue,svelte}",
|
|
467
|
+
"!**/node_modules/**",
|
|
468
|
+
],
|
|
455
469
|
|
|
456
470
|
/**
|
|
457
471
|
* Pattern to exclude from the optimization.
|
|
@@ -461,7 +475,12 @@ const config: IntlayerConfig = {
|
|
|
461
475
|
/**
|
|
462
476
|
* Output directory for the optimized dictionaries.
|
|
463
477
|
*/
|
|
464
|
-
outputDir: "
|
|
478
|
+
outputDir: "i18n",
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Dictionary key prefix
|
|
482
|
+
*/
|
|
483
|
+
dictionaryKeyPrefix: "", // Remove base prefix
|
|
465
484
|
},
|
|
466
485
|
|
|
467
486
|
/**
|
|
@@ -682,7 +701,7 @@ Settings that control routing behavior, including URL structure, locale storage,
|
|
|
682
701
|
```typescript
|
|
683
702
|
routing: {
|
|
684
703
|
mode: "prefix-no-default", // Fallback strategy
|
|
685
|
-
rewrite: {
|
|
704
|
+
rewrite: nextjsRewrite({
|
|
686
705
|
"/about": {
|
|
687
706
|
en: "/about",
|
|
688
707
|
fr: "/a-propos",
|
|
@@ -695,13 +714,14 @@ Settings that control routing behavior, including URL structure, locale storage,
|
|
|
695
714
|
en: "/blog/[category]/[id]",
|
|
696
715
|
fr: "/journal/[category]/[id]",
|
|
697
716
|
},
|
|
698
|
-
},
|
|
717
|
+
}),
|
|
699
718
|
}
|
|
700
719
|
```
|
|
701
720
|
- _Note_: The rewrite rules take precedence over the default `mode` behavior. If a path matches a rewrite rule, the localized path from the rewrite configuration will be used instead of the standard locale prefixing.
|
|
702
721
|
- _Note_: Dynamic route parameters are supported using bracket notation (e.g., `[slug]`, `[id]`). The parameter values are automatically extracted from the URL and interpolated into the rewritten path.
|
|
703
722
|
- _Note_: Works with both Next.js and Vite applications. The middleware/proxy will automatically rewrite incoming requests to match the internal route structure.
|
|
704
723
|
- _Note_: When generating URLs with `getLocalizedUrl()`, the rewrite rules are automatically applied if they match the provided path.
|
|
724
|
+
- _Reference_: For more information, see [Custom URL Rewrites](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/custom_url_rewrites.md).
|
|
705
725
|
|
|
706
726
|
#### Cookie Attributes
|
|
707
727
|
|
|
@@ -817,6 +837,8 @@ export default defineConfig({
|
|
|
817
837
|
|
|
818
838
|
```typescript
|
|
819
839
|
// intlayer.config.ts
|
|
840
|
+
import { nextjsRewrite } from "intlayer/routing";
|
|
841
|
+
|
|
820
842
|
export default defineConfig({
|
|
821
843
|
internationalization: {
|
|
822
844
|
locales: ["en", "fr"],
|
|
@@ -825,7 +847,7 @@ export default defineConfig({
|
|
|
825
847
|
routing: {
|
|
826
848
|
mode: "prefix-no-default", // Fallback for non-rewritten paths
|
|
827
849
|
storage: "cookie",
|
|
828
|
-
rewrite: {
|
|
850
|
+
rewrite: nextjsRewrite({
|
|
829
851
|
"/about": {
|
|
830
852
|
en: "/about",
|
|
831
853
|
fr: "/a-propos",
|
|
@@ -838,7 +860,7 @@ export default defineConfig({
|
|
|
838
860
|
en: "/blog/[category]/[id]",
|
|
839
861
|
fr: "/journal/[category]/[id]",
|
|
840
862
|
},
|
|
841
|
-
},
|
|
863
|
+
}),
|
|
842
864
|
},
|
|
843
865
|
});
|
|
844
866
|
```
|
|
@@ -1148,6 +1170,12 @@ Build options apply to the `@intlayer/babel` and `@intlayer/swc` plugins.
|
|
|
1148
1170
|
- _Note_: Fetch mode will use the live sync API to fetch the dictionaries. If the API call fails, the dictionaries will be imported dynamically as "dynamic" mode.
|
|
1149
1171
|
- _Note_: This option will not impact the `getIntlayer`, `getDictionary`, `useDictionary`, `useDictionaryAsync` and `useDictionaryDynamic` functions.
|
|
1150
1172
|
- _Note_: **Deprecated**: Use `dictionary.importMode` instead.
|
|
1173
|
+
- **checkTypes**:
|
|
1174
|
+
- _Type_: `boolean`
|
|
1175
|
+
- _Default_: `false`
|
|
1176
|
+
- _Description_: Indicates if the build should check TypeScript types and log errors.
|
|
1177
|
+
- _Note_: This can slow down the build.
|
|
1178
|
+
|
|
1151
1179
|
- **outputFormat**:
|
|
1152
1180
|
- _Type_: `'esm' | 'cjs'`
|
|
1153
1181
|
- _Default_: `'esm'`
|
|
@@ -1163,3 +1191,43 @@ Build options apply to the `@intlayer/babel` and `@intlayer/swc` plugins.
|
|
|
1163
1191
|
- _Note_: Use this to limit optimization to relevant code files and improve build performance.
|
|
1164
1192
|
- _Note_: This option will be ignored if `optimize` is disabled.
|
|
1165
1193
|
- _Note_: Use glob pattern.
|
|
1194
|
+
|
|
1195
|
+
---
|
|
1196
|
+
|
|
1197
|
+
### Compiler Configuration
|
|
1198
|
+
|
|
1199
|
+
Settings that control the Intlayer compiler, which extracts dictionaries straight from your components.
|
|
1200
|
+
|
|
1201
|
+
#### Properties
|
|
1202
|
+
|
|
1203
|
+
- **enabled**:
|
|
1204
|
+
- _Type_: `boolean | 'build-only'`
|
|
1205
|
+
- _Default_: `true`
|
|
1206
|
+
- _Description_: Indicates if the compiler should be enabled to extract the dictionaries.
|
|
1207
|
+
- _Example_: `'build-only'`
|
|
1208
|
+
- _Note_: Setting it to `'build-only'` will skip the compiler during development mode to speed up build times. It will only run on build commands.
|
|
1209
|
+
|
|
1210
|
+
- **dictionaryKeyPrefix**:
|
|
1211
|
+
- _Type_: `string`
|
|
1212
|
+
- _Default_: `'comp-'`
|
|
1213
|
+
- _Description_: Prefix for the extracted dictionary keys.
|
|
1214
|
+
- _Example_: `'my-key-'`
|
|
1215
|
+
- _Note_: When dictionaries are extracted, the key is generated based on the file name. This prefix is added to the generated key to prevent conflicts.
|
|
1216
|
+
|
|
1217
|
+
- **transformPattern**:
|
|
1218
|
+
- _Type_: `string | string[]`
|
|
1219
|
+
- _Default_: `['**/*.{ts,tsx,jsx,js,cjs,mjs,svelte,vue}', '!**/node_modules/**']`
|
|
1220
|
+
- _Description_: Patterns that define which files should be traversed during optimization.
|
|
1221
|
+
- _Example_: `['src/**/*.{ts,tsx}', '!**/node_modules/**']`
|
|
1222
|
+
- _Note_: Use this to limit optimization to relevant code files and improve build performance.
|
|
1223
|
+
|
|
1224
|
+
- **excludePattern**:
|
|
1225
|
+
- _Type_: `string | string[]`
|
|
1226
|
+
- _Default_: `['**/node_modules/**']`
|
|
1227
|
+
- _Description_: Patterns that define which files should be excluded during optimization.
|
|
1228
|
+
- _Example_: `['**/node_modules/**', '!**/node_modules/react/**']`
|
|
1229
|
+
|
|
1230
|
+
- **outputDir**:
|
|
1231
|
+
- _Type_: `string`
|
|
1232
|
+
- _Default_: `'compiler'`
|
|
1233
|
+
- _Description_: The directory where the extracted dictionaries will be stored, relative to your project base path.
|