@intlayer/engine 9.5.12 → 9.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/installSkills/skills/cli.md +28 -1
- package/dist/assets/installSkills/skills/compat.md +1 -1
- package/dist/assets/installSkills/skills/dev-tools.md +8 -6
- package/dist/cjs/build.cjs +12 -2
- package/dist/cjs/buildIntlayerDictionary/buildIntlayerDictionary.cjs +12 -11
- package/dist/cjs/buildIntlayerDictionary/buildIntlayerDictionary.cjs.map +1 -1
- package/dist/cjs/buildIntlayerDictionary/index.cjs +4 -1
- package/dist/cjs/buildIntlayerDictionary/rebuildUnmergedDictionaries.cjs +23 -0
- package/dist/cjs/buildIntlayerDictionary/rebuildUnmergedDictionaries.cjs.map +1 -0
- package/dist/cjs/cli.cjs +12 -0
- package/dist/cjs/fetchDistantDictionaries.cjs.map +1 -1
- package/dist/cjs/handleAdditionalContentDeclarationFile.cjs +1 -1
- package/dist/cjs/handleContentDeclarationFileChange.cjs +1 -1
- package/dist/cjs/handleUnlinkedContentDeclarationFile.cjs +1 -1
- package/dist/cjs/init/cms.cjs +18 -0
- package/dist/cjs/init/cms.cjs.map +1 -1
- package/dist/cjs/init/index.cjs +23 -10
- package/dist/cjs/init/index.cjs.map +1 -1
- package/dist/cjs/init/utils/configManipulation.cjs +28 -0
- package/dist/cjs/init/utils/configManipulation.cjs.map +1 -1
- package/dist/cjs/init/utils/contentLayout.cjs +61 -0
- package/dist/cjs/init/utils/contentLayout.cjs.map +1 -0
- package/dist/cjs/init/utils/index.cjs +1 -0
- package/dist/cjs/init/utils/packageManager.cjs +1 -1
- package/dist/cjs/init/utils/packageManager.cjs.map +1 -1
- package/dist/cjs/installMCP/installMCP.cjs +35 -25
- package/dist/cjs/installMCP/installMCP.cjs.map +1 -1
- package/dist/cjs/installSkills/index.cjs +26 -1
- package/dist/cjs/installSkills/index.cjs.map +1 -1
- package/dist/cjs/listDictionariesPath.cjs +2 -5
- package/dist/cjs/listDictionariesPath.cjs.map +1 -1
- package/dist/cjs/listGitFiles.cjs +3 -5
- package/dist/cjs/listGitFiles.cjs.map +1 -1
- package/dist/cjs/listProjects.cjs +1 -2
- package/dist/cjs/listProjects.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/index.cjs +1 -1
- package/dist/cjs/loadDictionaries/loadDictionaries.cjs +1 -1
- package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs.map +1 -1
- package/dist/cjs/utils/buildComponentFilesList.cjs +18 -30
- package/dist/cjs/utils/buildComponentFilesList.cjs.map +1 -1
- package/dist/cjs/utils/chunkJSON.cjs +1 -1
- package/dist/cjs/utils/chunkJSON.cjs.map +1 -1
- package/dist/cjs/utils/index.cjs +2 -0
- package/dist/cjs/utils/isDirectoryExcluded.cjs +36 -0
- package/dist/cjs/utils/isDirectoryExcluded.cjs.map +1 -0
- package/dist/cjs/watcher.cjs +5 -2
- package/dist/cjs/watcher.cjs.map +1 -1
- package/dist/cjs/writeConfiguration/index.cjs +23 -0
- package/dist/cjs/writeConfiguration/index.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/index.cjs +6 -0
- package/dist/cjs/writeContentDeclaration/processContentDeclarationContent.cjs +20 -13
- package/dist/cjs/writeContentDeclaration/processContentDeclarationContent.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/renderContentDeclaration.cjs +213 -0
- package/dist/cjs/writeContentDeclaration/renderContentDeclaration.cjs.map +1 -0
- package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs +5 -51
- package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/writeMarkdownFile.cjs +2 -31
- package/dist/cjs/writeContentDeclaration/writeMarkdownFile.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/writeYamlFile.cjs +2 -8
- package/dist/cjs/writeContentDeclaration/writeYamlFile.cjs.map +1 -1
- package/dist/esm/build.mjs +7 -5
- package/dist/esm/buildIntlayerDictionary/buildIntlayerDictionary.mjs +12 -12
- package/dist/esm/buildIntlayerDictionary/buildIntlayerDictionary.mjs.map +1 -1
- package/dist/esm/buildIntlayerDictionary/index.mjs +3 -2
- package/dist/esm/buildIntlayerDictionary/rebuildUnmergedDictionaries.mjs +22 -0
- package/dist/esm/buildIntlayerDictionary/rebuildUnmergedDictionaries.mjs.map +1 -0
- package/dist/esm/cli.mjs +5 -3
- package/dist/esm/fetchDistantDictionaries.mjs.map +1 -1
- package/dist/esm/handleAdditionalContentDeclarationFile.mjs +1 -1
- package/dist/esm/handleContentDeclarationFileChange.mjs +1 -1
- package/dist/esm/handleUnlinkedContentDeclarationFile.mjs +1 -1
- package/dist/esm/init/cms.mjs +19 -2
- package/dist/esm/init/cms.mjs.map +1 -1
- package/dist/esm/init/index.mjs +24 -11
- package/dist/esm/init/index.mjs.map +1 -1
- package/dist/esm/init/utils/configManipulation.mjs +28 -1
- package/dist/esm/init/utils/configManipulation.mjs.map +1 -1
- package/dist/esm/init/utils/contentLayout.mjs +58 -0
- package/dist/esm/init/utils/contentLayout.mjs.map +1 -0
- package/dist/esm/init/utils/index.mjs +2 -2
- package/dist/esm/init/utils/packageManager.mjs +1 -1
- package/dist/esm/init/utils/packageManager.mjs.map +1 -1
- package/dist/esm/installMCP/installMCP.mjs +35 -25
- package/dist/esm/installMCP/installMCP.mjs.map +1 -1
- package/dist/esm/installSkills/index.mjs +27 -3
- package/dist/esm/installSkills/index.mjs.map +1 -1
- package/dist/esm/listDictionariesPath.mjs +2 -5
- package/dist/esm/listDictionariesPath.mjs.map +1 -1
- package/dist/esm/listGitFiles.mjs +1 -1
- package/dist/esm/listGitFiles.mjs.map +1 -1
- package/dist/esm/listProjects.mjs +1 -1
- package/dist/esm/listProjects.mjs.map +1 -1
- package/dist/esm/loadDictionaries/index.mjs +1 -1
- package/dist/esm/loadDictionaries/loadDictionaries.mjs +1 -1
- package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs.map +1 -1
- package/dist/esm/utils/buildComponentFilesList.mjs +19 -31
- package/dist/esm/utils/buildComponentFilesList.mjs.map +1 -1
- package/dist/esm/utils/chunkJSON.mjs +1 -1
- package/dist/esm/utils/chunkJSON.mjs.map +1 -1
- package/dist/esm/utils/index.mjs +2 -1
- package/dist/esm/utils/isDirectoryExcluded.mjs +35 -0
- package/dist/esm/utils/isDirectoryExcluded.mjs.map +1 -0
- package/dist/esm/utils/runParallel/pidTree.mjs +3 -3
- package/dist/esm/utils/runParallel/pidTree.mjs.map +1 -1
- package/dist/esm/utils/runParallel/ps.mjs +2 -2
- package/dist/esm/utils/runParallel/ps.mjs.map +1 -1
- package/dist/esm/utils/runParallel/wmic.mjs +2 -2
- package/dist/esm/utils/runParallel/wmic.mjs.map +1 -1
- package/dist/esm/watcher.mjs +5 -2
- package/dist/esm/watcher.mjs.map +1 -1
- package/dist/esm/writeConfiguration/index.mjs +23 -1
- package/dist/esm/writeConfiguration/index.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/index.mjs +2 -1
- package/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs +20 -13
- package/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/renderContentDeclaration.mjs +208 -0
- package/dist/esm/writeContentDeclaration/renderContentDeclaration.mjs.map +1 -0
- package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs +5 -51
- package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/writeMarkdownFile.mjs +2 -31
- package/dist/esm/writeContentDeclaration/writeMarkdownFile.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/writeYamlFile.mjs +2 -8
- package/dist/esm/writeContentDeclaration/writeYamlFile.mjs.map +1 -1
- package/dist/types/build.d.ts +5 -3
- package/dist/types/buildIntlayerDictionary/buildIntlayerDictionary.d.ts +6 -0
- package/dist/types/buildIntlayerDictionary/buildIntlayerDictionary.d.ts.map +1 -1
- package/dist/types/buildIntlayerDictionary/index.d.ts +3 -2
- package/dist/types/buildIntlayerDictionary/rebuildUnmergedDictionaries.d.ts +14 -0
- package/dist/types/buildIntlayerDictionary/rebuildUnmergedDictionaries.d.ts.map +1 -0
- package/dist/types/cli.d.ts +6 -4
- package/dist/types/fetchDistantDictionaries.d.ts +1 -1
- package/dist/types/fetchDistantDictionaries.d.ts.map +1 -1
- package/dist/types/init/cms.d.ts +6 -0
- package/dist/types/init/cms.d.ts.map +1 -1
- package/dist/types/init/index.d.ts +15 -14
- package/dist/types/init/index.d.ts.map +1 -1
- package/dist/types/init/utils/configManipulation.d.ts +8 -0
- package/dist/types/init/utils/configManipulation.d.ts.map +1 -1
- package/dist/types/init/utils/contentLayout.d.ts +42 -0
- package/dist/types/init/utils/contentLayout.d.ts.map +1 -0
- package/dist/types/init/utils/index.d.ts +2 -2
- package/dist/types/init/utils/packageManager.d.ts +9 -3
- package/dist/types/init/utils/packageManager.d.ts.map +1 -1
- package/dist/types/installMCP/installMCP.d.ts +4 -0
- package/dist/types/installMCP/installMCP.d.ts.map +1 -1
- package/dist/types/installSkills/index.d.ts +6 -0
- package/dist/types/installSkills/index.d.ts.map +1 -1
- package/dist/types/listDictionariesPath.d.ts +1 -1
- package/dist/types/listDictionariesPath.d.ts.map +1 -1
- package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts +1 -1
- package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts.map +1 -1
- package/dist/types/utils/buildComponentFilesList.d.ts +6 -6
- package/dist/types/utils/buildComponentFilesList.d.ts.map +1 -1
- package/dist/types/utils/chunkJSON.d.ts.map +1 -1
- package/dist/types/utils/index.d.ts +2 -1
- package/dist/types/utils/isDirectoryExcluded.d.ts +15 -0
- package/dist/types/utils/isDirectoryExcluded.d.ts.map +1 -0
- package/dist/types/watcher.d.ts.map +1 -1
- package/dist/types/writeConfiguration/index.d.ts +13 -0
- package/dist/types/writeConfiguration/index.d.ts.map +1 -1
- package/dist/types/writeContentDeclaration/index.d.ts +2 -1
- package/dist/types/writeContentDeclaration/processContentDeclarationContent.d.ts +8 -2
- package/dist/types/writeContentDeclaration/processContentDeclarationContent.d.ts.map +1 -1
- package/dist/types/writeContentDeclaration/renderContentDeclaration.d.ts +61 -0
- package/dist/types/writeContentDeclaration/renderContentDeclaration.d.ts.map +1 -0
- package/dist/types/writeContentDeclaration/writeContentDeclaration.d.ts.map +1 -1
- package/dist/types/writeContentDeclaration/writeMarkdownFile.d.ts.map +1 -1
- package/dist/types/writeContentDeclaration/writeYamlFile.d.ts.map +1 -1
- package/package.json +18 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunkJSON.d.ts","names":[],"sources":["../../../src/utils/chunkJSON.ts"],"mappings":";;;;;;;;KAUK;KACA,YAAY,gBAAgB,aAAa;YAElC;GACT,YAAY;;KAGV,YAAY;KAEZ,OAAO;KAEP;EAAa;EAAW,MAAM;EAAM,OAAO;;KAC3C;EACH;EACA,MAAM;EACN;EACA;EACA;;KAEG,QAAQ,WAAW;KAEnB;YAEO;EACV;EACA;EACA;EACA,UAAU;EACV;EACA,SAAS;;;;;
|
|
1
|
+
{"version":3,"file":"chunkJSON.d.ts","names":[],"sources":["../../../src/utils/chunkJSON.ts"],"mappings":";;;;;;;;KAUK;KACA,YAAY,gBAAgB,aAAa;YAElC;GACT,YAAY;;KAGV,YAAY;KAEZ,OAAO;KAEP;EAAa;EAAW,MAAM;EAAM,OAAO;;KAC3C;EACH;EACA,MAAM;EACN;EACA;EACA;;KAEG,QAAQ,WAAW;KAEnB;YAEO;EACV;EACA;EACA;EACA,UAAU;EACV;EACA,SAAS;;;;;qBAgNE,YAAS,OACb,aAAa,WAAS,qBAE5B;;;;;;;;;;;qBAsHU,6BAA0B,OAC9B,cACN,aAAa;qBAiGH,eAAY,QAAY,gBAAc,aAAa"}
|
|
@@ -8,6 +8,7 @@ import { formatLocale, formatPath } from "./formatter.js";
|
|
|
8
8
|
import { getChunk } from "./getChunk.js";
|
|
9
9
|
import { getContentExtension } from "./getContentExtension.js";
|
|
10
10
|
import { getPathHash } from "./getPathHash.js";
|
|
11
|
+
import { isDirectoryExcluded } from "./isDirectoryExcluded.js";
|
|
11
12
|
import { mergeChunks } from "./mergeChunks.js";
|
|
12
13
|
import { parallelize } from "./parallelize.js";
|
|
13
14
|
import { Queue, pLimit } from "./pLimit.js";
|
|
@@ -23,4 +24,4 @@ import { splitTextByLines } from "./splitTextByLine.js";
|
|
|
23
24
|
import { StartContentWatcherOptions, startContentWatcher } from "./startContentWatcher.js";
|
|
24
25
|
import { verifyIdenticObjectFormat } from "./verifyIdenticObjectFormat.js";
|
|
25
26
|
import { withFileLock } from "./withFileLock.js";
|
|
26
|
-
export { CLI_CONTENT_WATCHER_ENV_VAR, ContentDeclarationFileName, ContentWatcherOwner, ContentWatcherSource, Extension, Format, JSONObject, JsonChunk, ParallelHandle, Primitive, Queue, Recursive, RunOnceContext, StartContentWatcherOptions, acquireContentWatcherLock, assembleJSON, autoDecorateContent, buildComponentFilesList, chunkArray, chunkJSON, claimCliContentWatcher, excludeObjectFormat, formatLocale, formatPath, getChunk, getCliContentWatcherLabel, getContentExtension, getContentWatcherLockFilePath, getContentWatcherOwner, getExtensionFromFormat, getFormatFromExtension, getGlobalLimiter, getPathHash, getTaskLimiter, mergeChunks, pLimit, parallelize, parallelizeGlobal, parseContentDeclarationFileName, reconstructFromSingleChunk, reduceObjectFormat, reportRedundantContentWatcher, resolveObjectPromises, resolveRelativePath, runOnce, runParallel, sortAlphabetically, splitTextByLines, startContentWatcher, verifyIdenticObjectFormat, withFileLock };
|
|
27
|
+
export { CLI_CONTENT_WATCHER_ENV_VAR, ContentDeclarationFileName, ContentWatcherOwner, ContentWatcherSource, Extension, Format, JSONObject, JsonChunk, ParallelHandle, Primitive, Queue, Recursive, RunOnceContext, StartContentWatcherOptions, acquireContentWatcherLock, assembleJSON, autoDecorateContent, buildComponentFilesList, chunkArray, chunkJSON, claimCliContentWatcher, excludeObjectFormat, formatLocale, formatPath, getChunk, getCliContentWatcherLabel, getContentExtension, getContentWatcherLockFilePath, getContentWatcherOwner, getExtensionFromFormat, getFormatFromExtension, getGlobalLimiter, getPathHash, getTaskLimiter, isDirectoryExcluded, mergeChunks, pLimit, parallelize, parallelizeGlobal, parseContentDeclarationFileName, reconstructFromSingleChunk, reduceObjectFormat, reportRedundantContentWatcher, resolveObjectPromises, resolveRelativePath, runOnce, runParallel, sortAlphabetically, splitTextByLines, startContentWatcher, verifyIdenticObjectFormat, withFileLock };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/utils/isDirectoryExcluded.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Whether a directory path lies inside a directory matched by one of the
|
|
4
|
+
* exclude patterns (e.g. `packages/ds/dist/esm` against `**\/dist/**`).
|
|
5
|
+
*
|
|
6
|
+
* Used to keep explicitly configured directories (`codeDir`, `contentDir`)
|
|
7
|
+
* from being dropped by an exclusion that only matches their ancestors.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* isDirectoryExcluded('ds/dist/esm', ['**\/dist/**']); // true
|
|
11
|
+
* isDirectoryExcluded('src/distance', ['**\/dist/**']); // false
|
|
12
|
+
*/
|
|
13
|
+
export declare const isDirectoryExcluded: (directoryPath: string, excludePatterns: string[]) => boolean;
|
|
14
|
+
//#endregion
|
|
15
|
+
//# sourceMappingURL=isDirectoryExcluded.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isDirectoryExcluded.d.ts","names":[],"sources":["../../../src/utils/isDirectoryExcluded.ts"],"mappings":";;;;;;;;;;;;qBAgCa,sBAAmB,uBACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watcher.d.ts","names":[],"sources":["../../src/watcher.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"watcher.d.ts","names":[],"sources":["../../src/watcher.ts"],"mappings":";;;KA2DK;EACH,gBAAgB;EAChB,gBAAgB;EAChB;EACA;;qBAsBW,QAAK,UAAoB,iBAAY;EAkDZ,mBAAM;;qBA6R/B,wBAAqB,UAAoB,iBAAY"}
|
|
@@ -2,5 +2,18 @@ import { IntlayerConfig } from "@intlayer/types/config";
|
|
|
2
2
|
//#region src/writeConfiguration/index.d.ts
|
|
3
3
|
export declare const isCachedConfigurationUpToDate: (configuration: IntlayerConfig) => Promise<boolean | null>;
|
|
4
4
|
export declare const writeConfiguration: (configuration: IntlayerConfig) => Promise<void>;
|
|
5
|
+
/** Editor settings the built configuration can be overridden with. */
|
|
6
|
+
export type BuiltEditorOverride = Partial<Pick<IntlayerConfig['editor'], 'enabled' | 'editorURL'>>;
|
|
7
|
+
/**
|
|
8
|
+
* Writes the built configuration (`.intlayer/config`) with editor settings
|
|
9
|
+
* overridden, leaving the user configuration file untouched. Lets the visual
|
|
10
|
+
* editor connect to the application when the configuration disables it, or
|
|
11
|
+
* points at another URL. The next configuration build restores the
|
|
12
|
+
* configured values.
|
|
13
|
+
*
|
|
14
|
+
* @returns The overridden keys that differ from the configuration; nothing is
|
|
15
|
+
* written when empty.
|
|
16
|
+
*/
|
|
17
|
+
export declare const overrideBuiltEditorConfiguration: (configuration: IntlayerConfig, editorOverride: BuiltEditorOverride) => Promise<(keyof BuiltEditorOverride)[]>;
|
|
5
18
|
//#endregion
|
|
6
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/writeConfiguration/index.ts"],"mappings":";;qBAMa,gCAA6B,eACzB,mBACd;qBAWU,qBAAkB,eAAyB,mBAAc"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/writeConfiguration/index.ts"],"mappings":";;qBAMa,gCAA6B,eACzB,mBACd;qBAWU,qBAAkB,eAAyB,mBAAc;;YAkB1D,sBAAsB,QAChC,KAAK;;;;;;;;;;;qBAaM,mCAAgC,eAC5B,gBAAc,gBACb,wBACf,eAAe"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { detectExportedComponentName } from "./detectExportedComponentName.js";
|
|
2
2
|
import { DictionaryStatus } from "./dictionaryStatus.js";
|
|
3
|
+
import { RenderContentDeclarationOptions, RenderedContentDeclaration, formatContentDeclaration, isRenderableContentDeclarationPath, renderContentDeclaration, renderMarkdownContentDeclaration, renderYamlContentDeclaration } from "./renderContentDeclaration.js";
|
|
3
4
|
import { transformJSFile } from "./transformJSFile.js";
|
|
4
5
|
import { writeContentDeclaration } from "./writeContentDeclaration.js";
|
|
5
6
|
import { writeJSFile } from "./writeJSFile.js";
|
|
6
|
-
export { DictionaryStatus, detectExportedComponentName, transformJSFile, writeContentDeclaration, writeJSFile };
|
|
7
|
+
export { DictionaryStatus, RenderContentDeclarationOptions, RenderedContentDeclaration, detectExportedComponentName, formatContentDeclaration, isRenderableContentDeclarationPath, renderContentDeclaration, renderMarkdownContentDeclaration, renderYamlContentDeclaration, transformJSFile, writeContentDeclaration, writeJSFile };
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { Dictionary } from "@intlayer/types/dictionary";
|
|
2
2
|
//#region src/writeContentDeclaration/processContentDeclarationContent.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Receives the content of a `file()` node instead of writing it to disk.
|
|
5
|
+
* `filePath` is relative to the project base directory.
|
|
6
|
+
*/
|
|
7
|
+
export type ExternalFileHandler = (filePath: string, content: string) => void;
|
|
3
8
|
/**
|
|
4
9
|
* Process content declaration content
|
|
5
10
|
*
|
|
6
11
|
* It filter node that are autogenerated by intlayer to do not rewrite them in the content declaration file.
|
|
7
12
|
*
|
|
8
|
-
* And write external sources as file content if necessary.
|
|
13
|
+
* And write external sources as file content if necessary. Pass
|
|
14
|
+
* `onExternalFile` to collect them instead of writing them to disk.
|
|
9
15
|
*/
|
|
10
|
-
export declare const processContentDeclarationContent: (dictionary: Dictionary) => Promise<any>;
|
|
16
|
+
export declare const processContentDeclarationContent: (dictionary: Dictionary, onExternalFile?: ExternalFileHandler) => Promise<any>;
|
|
11
17
|
//#endregion
|
|
12
18
|
//# sourceMappingURL=processContentDeclarationContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processContentDeclarationContent.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/processContentDeclarationContent.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"processContentDeclarationContent.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/processContentDeclarationContent.ts"],"mappings":";;;;;;YAqBY,uBAAuB,kBAAkB;;;;;;;;;qBA4HxC,mCAAgC,YAC/B,YAAU,iBACN,wBAAmB"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ExternalFileHandler } from "./processContentDeclarationContent.js";
|
|
2
|
+
import { IntlayerConfig } from "@intlayer/types/config";
|
|
3
|
+
import { Dictionary } from "@intlayer/types/dictionary";
|
|
4
|
+
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
5
|
+
//#region src/writeContentDeclaration/renderContentDeclaration.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Whether a content declaration file can be rewritten from a dictionary.
|
|
8
|
+
* Other extensions (e.g. `.po`) are owned by plugins.
|
|
9
|
+
*/
|
|
10
|
+
export declare const isRenderableContentDeclarationPath: (filePath: string) => boolean;
|
|
11
|
+
type FormatContentDeclarationOptions = {
|
|
12
|
+
/** Plugins `formatOutput` hooks are applied when provided. */
|
|
13
|
+
configuration?: IntlayerConfig;
|
|
14
|
+
localeList?: LocalesValues[];
|
|
15
|
+
/** Collects `file()` node contents instead of writing them to disk. */
|
|
16
|
+
onExternalFile?: ExternalFileHandler;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Cleans a dictionary before persisting it: strips auto-generated node
|
|
20
|
+
* metadata, filters locales, and applies the plugins `formatOutput` hooks.
|
|
21
|
+
*/
|
|
22
|
+
export declare const formatContentDeclaration: (dictionary: Dictionary, options?: FormatContentDeclarationOptions) => Promise<Dictionary>;
|
|
23
|
+
/**
|
|
24
|
+
* Renders a `.content.md` file. When the current file is provided, its
|
|
25
|
+
* frontmatter fields are kept and only overridden by the dictionary ones; the
|
|
26
|
+
* original frontmatter text is reused verbatim when nothing changed.
|
|
27
|
+
*/
|
|
28
|
+
export declare const renderMarkdownContentDeclaration: (dictionary: Dictionary, existingFileContent?: string) => string;
|
|
29
|
+
/**
|
|
30
|
+
* Renders a `.content.yaml` file. When the current file is provided, its
|
|
31
|
+
* fields are kept and only overridden by the dictionary ones; the original
|
|
32
|
+
* text is returned untouched when nothing changed.
|
|
33
|
+
*/
|
|
34
|
+
export declare const renderYamlContentDeclaration: (dictionary: Dictionary, existingFileContent?: string) => string;
|
|
35
|
+
export type RenderContentDeclarationOptions = {
|
|
36
|
+
/** Path of the content declaration file, used to pick its format. */
|
|
37
|
+
filePath: string;
|
|
38
|
+
/** Current source of the file. */
|
|
39
|
+
fileContent: string;
|
|
40
|
+
/** Applies the plugins `formatOutput` hooks when provided. */
|
|
41
|
+
configuration?: IntlayerConfig;
|
|
42
|
+
localeList?: LocalesValues[];
|
|
43
|
+
/** Forces the `noMetadata` mode; detected from the source when omitted. */
|
|
44
|
+
noMetadata?: boolean;
|
|
45
|
+
};
|
|
46
|
+
export type RenderedContentDeclaration = {
|
|
47
|
+
/** New source of the content declaration file. */
|
|
48
|
+
fileContent: string;
|
|
49
|
+
/** Content of the `file()` nodes, keyed by path relative to the base dir. */
|
|
50
|
+
externalFiles: Record<string, string>;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Renders the new source of an existing content declaration file from a
|
|
54
|
+
* dictionary, without touching the file system. JS/TS and JSON sources are
|
|
55
|
+
* updated through their AST so untouched code keeps its formatting.
|
|
56
|
+
*
|
|
57
|
+
* Returns `undefined` for formats owned by plugins (e.g. `.po`).
|
|
58
|
+
*/
|
|
59
|
+
export declare const renderContentDeclaration: (dictionary: Dictionary, options: RenderContentDeclarationOptions) => Promise<RenderedContentDeclaration | undefined>;
|
|
60
|
+
//#endregion
|
|
61
|
+
//# sourceMappingURL=renderContentDeclaration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderContentDeclaration.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/renderContentDeclaration.ts"],"mappings":";;;;;;;;;qBA+Ea,qCAAkC;KAa1C;;EAEH,gBAAgB;EAChB,aAAa;;EAEb,iBAAiB;;;;;;qBAON,2BAAwB,YACvB,YAAU,UACb,oCACR,QAAQ;;;;;;qBA2HE,mCAAgC,YAC/B,YAAU;;;;;;qBA2CX,+BAA4B,YAC3B,YAAU;YA4CZ;;EAEV;;EAEA;;EAEA,gBAAgB;EAChB,aAAa;;EAEb;;YAGU;;EAEV;;EAEA,eAAe;;;;;;;;;qBAUJ,2BAAwB,YACvB,YAAU,SACb,oCACR,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeContentDeclaration.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/writeContentDeclaration.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"writeContentDeclaration.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/writeContentDeclaration.ts"],"mappings":";;;;;;KAmBK;EACH;EACA,aAAa;EACb,iBAAiB;;qBAON,0BAAuB,YACtB,YAAU,eACP,gBAAc,UACnB,mCACT;EAAU,QAAQ;EAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeMarkdownFile.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/writeMarkdownFile.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"writeMarkdownFile.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/writeMarkdownFile.ts"],"mappings":";;;qBAQa,oBAAiB,0BACJ,YACZ,YAAU,eACP,mBACd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeYamlFile.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/writeYamlFile.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"writeYamlFile.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/writeYamlFile.ts"],"mappings":";;;qBAQa,gBAAa,0BACA,YACZ,YAAU,eACP,mBACd"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/engine",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.7.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Scans and builds Intlayer declaration files into dictionaries based on Intlayer configuration.",
|
|
6
6
|
"keywords": [
|
|
@@ -85,6 +85,11 @@
|
|
|
85
85
|
"require": "./dist/cjs/docReview/index.cjs",
|
|
86
86
|
"import": "./dist/esm/docReview/index.mjs"
|
|
87
87
|
},
|
|
88
|
+
"./contentDeclaration": {
|
|
89
|
+
"types": "./dist/types/writeContentDeclaration/renderContentDeclaration.d.ts",
|
|
90
|
+
"require": "./dist/cjs/writeContentDeclaration/renderContentDeclaration.cjs",
|
|
91
|
+
"import": "./dist/esm/writeContentDeclaration/renderContentDeclaration.mjs"
|
|
92
|
+
},
|
|
88
93
|
"./package.json": "./package.json"
|
|
89
94
|
},
|
|
90
95
|
"main": "dist/cjs/index.cjs",
|
|
@@ -122,6 +127,9 @@
|
|
|
122
127
|
"docReview": [
|
|
123
128
|
"./dist/types/docReview/index.d.ts"
|
|
124
129
|
],
|
|
130
|
+
"contentDeclaration": [
|
|
131
|
+
"./dist/types/writeContentDeclaration/renderContentDeclaration.d.ts"
|
|
132
|
+
],
|
|
125
133
|
"package.json": [
|
|
126
134
|
"./package.json"
|
|
127
135
|
]
|
|
@@ -150,31 +158,31 @@
|
|
|
150
158
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
151
159
|
},
|
|
152
160
|
"dependencies": {
|
|
153
|
-
"@intlayer/api": "9.
|
|
154
|
-
"@intlayer/config": "9.
|
|
155
|
-
"@intlayer/core": "9.
|
|
156
|
-
"@intlayer/dictionaries-entry": "9.
|
|
157
|
-
"@intlayer/types": "9.
|
|
161
|
+
"@intlayer/api": "9.7.0",
|
|
162
|
+
"@intlayer/config": "9.6.0",
|
|
163
|
+
"@intlayer/core": "9.7.0",
|
|
164
|
+
"@intlayer/dictionaries-entry": "9.6.0",
|
|
165
|
+
"@intlayer/types": "9.7.0",
|
|
158
166
|
"@parcel/watcher": "2.6.0",
|
|
159
167
|
"defu": "6.1.7",
|
|
160
168
|
"fast-glob": "3.3.3",
|
|
161
169
|
"recast": "0.24.0",
|
|
162
|
-
"simple-git": "
|
|
170
|
+
"simple-git": "4.0.2",
|
|
163
171
|
"zod-to-ts": "2.1.0"
|
|
164
172
|
},
|
|
165
173
|
"devDependencies": {
|
|
166
|
-
"@types/node": "^
|
|
174
|
+
"@types/node": "^26",
|
|
167
175
|
"@utils/ts-config": "1.0.4",
|
|
168
176
|
"@utils/ts-config-types": "1.0.4",
|
|
169
177
|
"@utils/tsdown-config": "1.0.4",
|
|
170
178
|
"rimraf": "6.1.3",
|
|
171
179
|
"tsdown": "0.23.0",
|
|
172
180
|
"typescript": "7.0.2",
|
|
173
|
-
"vitest": "5.0.
|
|
181
|
+
"vitest": "5.0.3",
|
|
174
182
|
"zod": "4.6.5"
|
|
175
183
|
},
|
|
176
184
|
"peerDependencies": {
|
|
177
|
-
"@intlayer/babel": "9.
|
|
185
|
+
"@intlayer/babel": "9.6.0"
|
|
178
186
|
},
|
|
179
187
|
"peerDependenciesMeta": {
|
|
180
188
|
"@intlayer/babel": {
|