@intlayer/chokidar 8.10.0-canary.0 → 8.10.0-canary.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.
@@ -30,7 +30,8 @@ const loadMarkdownContentDeclaration = async (path) => {
30
30
  ...version !== void 0 && { version },
31
31
  content: {
32
32
  nodeType: _intlayer_types_nodeType.MARKDOWN,
33
- [_intlayer_types_nodeType.MARKDOWN]: fileContent
33
+ [_intlayer_types_nodeType.MARKDOWN]: fileContent,
34
+ metadata: frontmatter
34
35
  }
35
36
  };
36
37
  } catch (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"loadMarkdownContentDeclaration.cjs","names":["MARKDOWN"],"sources":["../../../src/loadDictionaries/loadMarkdownContentDeclaration.ts"],"sourcesContent":["import { readFile } from 'node:fs/promises';\nimport { basename } from 'node:path';\nimport { getMarkdownMetadata } from '@intlayer/core/markdown';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport { MARKDOWN } from '@intlayer/types/nodeType';\n\ntype MarkdownFrontmatter = {\n key?: string;\n locale?: string;\n title?: string;\n description?: string;\n tags?: string[];\n fill?: any;\n importMode?: string;\n location?: string;\n priority?: number;\n version?: string;\n [key: string]: any;\n};\n\nexport const loadMarkdownContentDeclaration = async (\n path: string\n): Promise<Dictionary | undefined> => {\n try {\n const fileContent = await readFile(path, 'utf-8');\n const frontmatter = getMarkdownMetadata<MarkdownFrontmatter>(fileContent);\n\n // Derive key from filename (e.g. \"my-doc.content.md\" → \"my-doc\") if not in frontmatter\n const fileName = basename(path).replace(/\\.content\\.md$/, '');\n const key = frontmatter.key ?? fileName;\n\n if (!key) {\n console.error(\n `[intlayer] Missing key in markdown content declaration: ${path}`\n );\n return undefined;\n }\n\n const {\n key: _key,\n locale,\n title,\n description,\n tags,\n fill,\n importMode,\n location,\n priority,\n version,\n } = frontmatter;\n\n return {\n key,\n ...(locale !== undefined && { locale }),\n ...(title !== undefined && { title }),\n ...(description !== undefined && { description }),\n ...(tags !== undefined && { tags }),\n ...(fill !== undefined && { fill }),\n ...(importMode !== undefined && { importMode }),\n ...(location !== undefined && { location }),\n ...(priority !== undefined && { priority }),\n ...(version !== undefined && { version }),\n content: {\n nodeType: MARKDOWN,\n [MARKDOWN]: fileContent,\n },\n } as Dictionary;\n } catch (error) {\n console.error(\n `Error loading markdown content declaration at ${path}:`,\n error\n );\n return undefined;\n }\n};\n"],"mappings":";;;;;;;;AAoBA,MAAa,iCAAiC,OAC5C,SACoC;CACpC,IAAI;EACF,MAAM,cAAc,qCAAe,MAAM,OAAO;EAChD,MAAM,+DAAuD,WAAW;EAGxE,MAAM,mCAAoB,IAAI,EAAE,QAAQ,kBAAkB,EAAE;EAC5D,MAAM,MAAM,YAAY,OAAO;EAE/B,IAAI,CAAC,KAAK;GACR,QAAQ,MACN,2DAA2D,MAC7D;GACA;EACF;EAEA,MAAM,EACJ,KAAK,MACL,QACA,OACA,aACA,MACA,MACA,YACA,UACA,UACA,YACE;EAEJ,OAAO;GACL;GACA,GAAI,WAAW,UAAa,EAAE,OAAO;GACrC,GAAI,UAAU,UAAa,EAAE,MAAM;GACnC,GAAI,gBAAgB,UAAa,EAAE,YAAY;GAC/C,GAAI,SAAS,UAAa,EAAE,KAAK;GACjC,GAAI,SAAS,UAAa,EAAE,KAAK;GACjC,GAAI,eAAe,UAAa,EAAE,WAAW;GAC7C,GAAI,aAAa,UAAa,EAAE,SAAS;GACzC,GAAI,aAAa,UAAa,EAAE,SAAS;GACzC,GAAI,YAAY,UAAa,EAAE,QAAQ;GACvC,SAAS;IACP,UAAUA;KACTA,oCAAW;GACd;EACF;CACF,SAAS,OAAO;EACd,QAAQ,MACN,iDAAiD,KAAK,IACtD,KACF;EACA;CACF;AACF"}
1
+ {"version":3,"file":"loadMarkdownContentDeclaration.cjs","names":["MARKDOWN"],"sources":["../../../src/loadDictionaries/loadMarkdownContentDeclaration.ts"],"sourcesContent":["import { readFile } from 'node:fs/promises';\nimport { basename } from 'node:path';\nimport { getMarkdownMetadata } from '@intlayer/core/markdown';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport { MARKDOWN } from '@intlayer/types/nodeType';\n\ntype MarkdownFrontmatter = {\n key?: string;\n locale?: string;\n title?: string;\n description?: string;\n tags?: string[];\n fill?: any;\n importMode?: string;\n location?: string;\n priority?: number;\n version?: string;\n [key: string]: any;\n};\n\nexport const loadMarkdownContentDeclaration = async (\n path: string\n): Promise<Dictionary | undefined> => {\n try {\n const fileContent = await readFile(path, 'utf-8');\n const frontmatter = getMarkdownMetadata<MarkdownFrontmatter>(fileContent);\n\n // Derive key from filename (e.g. \"my-doc.content.md\" → \"my-doc\") if not in frontmatter\n const fileName = basename(path).replace(/\\.content\\.md$/, '');\n const key = frontmatter.key ?? fileName;\n\n if (!key) {\n console.error(\n `[intlayer] Missing key in markdown content declaration: ${path}`\n );\n return undefined;\n }\n\n const {\n key: _key,\n locale,\n title,\n description,\n tags,\n fill,\n importMode,\n location,\n priority,\n version,\n } = frontmatter;\n\n return {\n key,\n ...(locale !== undefined && { locale }),\n ...(title !== undefined && { title }),\n ...(description !== undefined && { description }),\n ...(tags !== undefined && { tags }),\n ...(fill !== undefined && { fill }),\n ...(importMode !== undefined && { importMode }),\n ...(location !== undefined && { location }),\n ...(priority !== undefined && { priority }),\n ...(version !== undefined && { version }),\n content: {\n nodeType: MARKDOWN,\n [MARKDOWN]: fileContent,\n metadata: frontmatter,\n },\n } as Dictionary;\n } catch (error) {\n console.error(\n `Error loading markdown content declaration at ${path}:`,\n error\n );\n return undefined;\n }\n};\n"],"mappings":";;;;;;;;AAoBA,MAAa,iCAAiC,OAC5C,SACoC;CACpC,IAAI;EACF,MAAM,cAAc,qCAAe,MAAM,OAAO;EAChD,MAAM,+DAAuD,WAAW;EAGxE,MAAM,mCAAoB,IAAI,EAAE,QAAQ,kBAAkB,EAAE;EAC5D,MAAM,MAAM,YAAY,OAAO;EAE/B,IAAI,CAAC,KAAK;GACR,QAAQ,MACN,2DAA2D,MAC7D;GACA;EACF;EAEA,MAAM,EACJ,KAAK,MACL,QACA,OACA,aACA,MACA,MACA,YACA,UACA,UACA,YACE;EAEJ,OAAO;GACL;GACA,GAAI,WAAW,UAAa,EAAE,OAAO;GACrC,GAAI,UAAU,UAAa,EAAE,MAAM;GACnC,GAAI,gBAAgB,UAAa,EAAE,YAAY;GAC/C,GAAI,SAAS,UAAa,EAAE,KAAK;GACjC,GAAI,SAAS,UAAa,EAAE,KAAK;GACjC,GAAI,eAAe,UAAa,EAAE,WAAW;GAC7C,GAAI,aAAa,UAAa,EAAE,SAAS;GACzC,GAAI,aAAa,UAAa,EAAE,SAAS;GACzC,GAAI,YAAY,UAAa,EAAE,QAAQ;GACvC,SAAS;IACP,UAAUA;KACTA,oCAAW;IACZ,UAAU;GACZ;EACF;CACF,SAAS,OAAO;EACd,QAAQ,MACN,iDAAiD,KAAK,IACtD,KACF;EACA;CACF;AACF"}
@@ -28,7 +28,8 @@ const loadMarkdownContentDeclaration = async (path) => {
28
28
  ...version !== void 0 && { version },
29
29
  content: {
30
30
  nodeType: MARKDOWN,
31
- [MARKDOWN]: fileContent
31
+ [MARKDOWN]: fileContent,
32
+ metadata: frontmatter
32
33
  }
33
34
  };
34
35
  } catch (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"loadMarkdownContentDeclaration.mjs","names":[],"sources":["../../../src/loadDictionaries/loadMarkdownContentDeclaration.ts"],"sourcesContent":["import { readFile } from 'node:fs/promises';\nimport { basename } from 'node:path';\nimport { getMarkdownMetadata } from '@intlayer/core/markdown';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport { MARKDOWN } from '@intlayer/types/nodeType';\n\ntype MarkdownFrontmatter = {\n key?: string;\n locale?: string;\n title?: string;\n description?: string;\n tags?: string[];\n fill?: any;\n importMode?: string;\n location?: string;\n priority?: number;\n version?: string;\n [key: string]: any;\n};\n\nexport const loadMarkdownContentDeclaration = async (\n path: string\n): Promise<Dictionary | undefined> => {\n try {\n const fileContent = await readFile(path, 'utf-8');\n const frontmatter = getMarkdownMetadata<MarkdownFrontmatter>(fileContent);\n\n // Derive key from filename (e.g. \"my-doc.content.md\" → \"my-doc\") if not in frontmatter\n const fileName = basename(path).replace(/\\.content\\.md$/, '');\n const key = frontmatter.key ?? fileName;\n\n if (!key) {\n console.error(\n `[intlayer] Missing key in markdown content declaration: ${path}`\n );\n return undefined;\n }\n\n const {\n key: _key,\n locale,\n title,\n description,\n tags,\n fill,\n importMode,\n location,\n priority,\n version,\n } = frontmatter;\n\n return {\n key,\n ...(locale !== undefined && { locale }),\n ...(title !== undefined && { title }),\n ...(description !== undefined && { description }),\n ...(tags !== undefined && { tags }),\n ...(fill !== undefined && { fill }),\n ...(importMode !== undefined && { importMode }),\n ...(location !== undefined && { location }),\n ...(priority !== undefined && { priority }),\n ...(version !== undefined && { version }),\n content: {\n nodeType: MARKDOWN,\n [MARKDOWN]: fileContent,\n },\n } as Dictionary;\n } catch (error) {\n console.error(\n `Error loading markdown content declaration at ${path}:`,\n error\n );\n return undefined;\n }\n};\n"],"mappings":";;;;;;AAoBA,MAAa,iCAAiC,OAC5C,SACoC;CACpC,IAAI;EACF,MAAM,cAAc,MAAM,SAAS,MAAM,OAAO;EAChD,MAAM,cAAc,oBAAyC,WAAW;EAGxE,MAAM,WAAW,SAAS,IAAI,EAAE,QAAQ,kBAAkB,EAAE;EAC5D,MAAM,MAAM,YAAY,OAAO;EAE/B,IAAI,CAAC,KAAK;GACR,QAAQ,MACN,2DAA2D,MAC7D;GACA;EACF;EAEA,MAAM,EACJ,KAAK,MACL,QACA,OACA,aACA,MACA,MACA,YACA,UACA,UACA,YACE;EAEJ,OAAO;GACL;GACA,GAAI,WAAW,UAAa,EAAE,OAAO;GACrC,GAAI,UAAU,UAAa,EAAE,MAAM;GACnC,GAAI,gBAAgB,UAAa,EAAE,YAAY;GAC/C,GAAI,SAAS,UAAa,EAAE,KAAK;GACjC,GAAI,SAAS,UAAa,EAAE,KAAK;GACjC,GAAI,eAAe,UAAa,EAAE,WAAW;GAC7C,GAAI,aAAa,UAAa,EAAE,SAAS;GACzC,GAAI,aAAa,UAAa,EAAE,SAAS;GACzC,GAAI,YAAY,UAAa,EAAE,QAAQ;GACvC,SAAS;IACP,UAAU;KACT,WAAW;GACd;EACF;CACF,SAAS,OAAO;EACd,QAAQ,MACN,iDAAiD,KAAK,IACtD,KACF;EACA;CACF;AACF"}
1
+ {"version":3,"file":"loadMarkdownContentDeclaration.mjs","names":[],"sources":["../../../src/loadDictionaries/loadMarkdownContentDeclaration.ts"],"sourcesContent":["import { readFile } from 'node:fs/promises';\nimport { basename } from 'node:path';\nimport { getMarkdownMetadata } from '@intlayer/core/markdown';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport { MARKDOWN } from '@intlayer/types/nodeType';\n\ntype MarkdownFrontmatter = {\n key?: string;\n locale?: string;\n title?: string;\n description?: string;\n tags?: string[];\n fill?: any;\n importMode?: string;\n location?: string;\n priority?: number;\n version?: string;\n [key: string]: any;\n};\n\nexport const loadMarkdownContentDeclaration = async (\n path: string\n): Promise<Dictionary | undefined> => {\n try {\n const fileContent = await readFile(path, 'utf-8');\n const frontmatter = getMarkdownMetadata<MarkdownFrontmatter>(fileContent);\n\n // Derive key from filename (e.g. \"my-doc.content.md\" → \"my-doc\") if not in frontmatter\n const fileName = basename(path).replace(/\\.content\\.md$/, '');\n const key = frontmatter.key ?? fileName;\n\n if (!key) {\n console.error(\n `[intlayer] Missing key in markdown content declaration: ${path}`\n );\n return undefined;\n }\n\n const {\n key: _key,\n locale,\n title,\n description,\n tags,\n fill,\n importMode,\n location,\n priority,\n version,\n } = frontmatter;\n\n return {\n key,\n ...(locale !== undefined && { locale }),\n ...(title !== undefined && { title }),\n ...(description !== undefined && { description }),\n ...(tags !== undefined && { tags }),\n ...(fill !== undefined && { fill }),\n ...(importMode !== undefined && { importMode }),\n ...(location !== undefined && { location }),\n ...(priority !== undefined && { priority }),\n ...(version !== undefined && { version }),\n content: {\n nodeType: MARKDOWN,\n [MARKDOWN]: fileContent,\n metadata: frontmatter,\n },\n } as Dictionary;\n } catch (error) {\n console.error(\n `Error loading markdown content declaration at ${path}:`,\n error\n );\n return undefined;\n }\n};\n"],"mappings":";;;;;;AAoBA,MAAa,iCAAiC,OAC5C,SACoC;CACpC,IAAI;EACF,MAAM,cAAc,MAAM,SAAS,MAAM,OAAO;EAChD,MAAM,cAAc,oBAAyC,WAAW;EAGxE,MAAM,WAAW,SAAS,IAAI,EAAE,QAAQ,kBAAkB,EAAE;EAC5D,MAAM,MAAM,YAAY,OAAO;EAE/B,IAAI,CAAC,KAAK;GACR,QAAQ,MACN,2DAA2D,MAC7D;GACA;EACF;EAEA,MAAM,EACJ,KAAK,MACL,QACA,OACA,aACA,MACA,MACA,YACA,UACA,UACA,YACE;EAEJ,OAAO;GACL;GACA,GAAI,WAAW,UAAa,EAAE,OAAO;GACrC,GAAI,UAAU,UAAa,EAAE,MAAM;GACnC,GAAI,gBAAgB,UAAa,EAAE,YAAY;GAC/C,GAAI,SAAS,UAAa,EAAE,KAAK;GACjC,GAAI,SAAS,UAAa,EAAE,KAAK;GACjC,GAAI,eAAe,UAAa,EAAE,WAAW;GAC7C,GAAI,aAAa,UAAa,EAAE,SAAS;GACzC,GAAI,aAAa,UAAa,EAAE,SAAS;GACzC,GAAI,YAAY,UAAa,EAAE,QAAQ;GACvC,SAAS;IACP,UAAU;KACT,WAAW;IACZ,UAAU;GACZ;EACF;CACF,SAAS,OAAO;EACd,QAAQ,MACN,iDAAiD,KAAK,IACtD,KACF;EACA;CACF;AACF"}
@@ -0,0 +1,3 @@
1
+ import { Dictionary } from "@intlayer/types/dictionary";
2
+ import { LocalesValues as LocalesValues$1 } from "@intlayer/types/module_augmentation";
3
+ export type { LocalesValues$1 as LocalesValues };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/chokidar",
3
- "version": "8.10.0-canary.0",
3
+ "version": "8.10.0-canary.1",
4
4
  "private": false,
5
5
  "description": "Uses chokidar to scan and build Intlayer declaration files into dictionaries based on Intlayer configuration.",
6
6
  "keywords": [
@@ -109,13 +109,13 @@
109
109
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
110
110
  },
111
111
  "dependencies": {
112
- "@intlayer/api": "8.10.0-canary.0",
113
- "@intlayer/config": "8.10.0-canary.0",
114
- "@intlayer/core": "8.10.0-canary.0",
115
- "@intlayer/dictionaries-entry": "8.10.0-canary.0",
116
- "@intlayer/remote-dictionaries-entry": "8.10.0-canary.0",
117
- "@intlayer/types": "8.10.0-canary.0",
118
- "@intlayer/unmerged-dictionaries-entry": "8.10.0-canary.0",
112
+ "@intlayer/api": "8.10.0-canary.1",
113
+ "@intlayer/config": "8.10.0-canary.1",
114
+ "@intlayer/core": "8.10.0-canary.1",
115
+ "@intlayer/dictionaries-entry": "8.10.0-canary.1",
116
+ "@intlayer/remote-dictionaries-entry": "8.10.0-canary.1",
117
+ "@intlayer/types": "8.10.0-canary.1",
118
+ "@intlayer/unmerged-dictionaries-entry": "8.10.0-canary.1",
119
119
  "chokidar": "5.0.0",
120
120
  "defu": "6.1.7",
121
121
  "fast-glob": "3.3.3",
@@ -124,7 +124,7 @@
124
124
  "zod-to-ts": "2.0.0"
125
125
  },
126
126
  "devDependencies": {
127
- "@types/node": "25.9.0",
127
+ "@types/node": "25.9.1",
128
128
  "@utils/ts-config": "1.0.4",
129
129
  "@utils/ts-config-types": "1.0.4",
130
130
  "@utils/tsdown-config": "1.0.4",