@contentrain/mcp 2.3.1 → 3.0.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.
- package/README.md +1 -1
- package/dist/{annotations-D3tlsF38.mjs → annotations-C-tQVmot.mjs} +15 -1
- package/dist/annotations-C-tQVmot.mjs.map +1 -0
- package/dist/{apply-manager-SLCRLHN_.mjs → apply-manager-BybvnUVC.mjs} +28 -18
- package/dist/apply-manager-BybvnUVC.mjs.map +1 -0
- package/dist/{astro-parser-LNjEspnf.mjs → astro-parser-Cb9uuBpW.mjs} +3 -3
- package/dist/{astro-parser-LNjEspnf.mjs.map → astro-parser-Cb9uuBpW.mjs.map} +1 -1
- package/dist/{availability-sWWRz2W0.mjs → availability-Dgcmvv99.mjs} +1 -1
- package/dist/{availability-sWWRz2W0.mjs.map → availability-Dgcmvv99.mjs.map} +1 -1
- package/dist/{branch-lifecycle-BAfgSQBv.mjs → branch-lifecycle-B6PXZ2N7.mjs} +11 -61
- package/dist/branch-lifecycle-B6PXZ2N7.mjs.map +1 -0
- package/dist/{branch-lifecycle-D4W0WIs4.d.mts → branch-lifecycle-DhzHfzs3.d.mts} +1 -1
- package/dist/{branch-lifecycle-D4W0WIs4.d.mts.map → branch-lifecycle-DhzHfzs3.d.mts.map} +1 -1
- package/dist/{compiler-CNzm2Y2I.mjs → compiler-B6hNQeCC.mjs} +2 -2
- package/dist/{compiler-CNzm2Y2I.mjs.map → compiler-B6hNQeCC.mjs.map} +1 -1
- package/dist/{compiler-sfc.cjs-y0B0L3MH.mjs → compiler-sfc.cjs-8yY7b5bx.mjs} +2 -2
- package/dist/{compiler-sfc.cjs-y0B0L3MH.mjs.map → compiler-sfc.cjs-8yY7b5bx.mjs.map} +1 -1
- package/dist/{config-oxxgznz7.mjs → config-VlRKRwAS.mjs} +1 -1
- package/dist/{config-oxxgznz7.mjs.map → config-VlRKRwAS.mjs.map} +1 -1
- package/dist/{content-manager-DWo3G64y.d.mts → content-manager-Dn4tqDw1.d.mts} +10 -7
- package/dist/content-manager-Dn4tqDw1.d.mts.map +1 -0
- package/dist/{context-DjglDPvj.mjs → context-C3x6I3cE.mjs} +4 -4
- package/dist/{context-DjglDPvj.mjs.map → context-C3x6I3cE.mjs.map} +1 -1
- package/dist/core/apply-manager.d.mts +8 -0
- package/dist/core/apply-manager.d.mts.map +1 -1
- package/dist/core/apply-manager.mjs +10 -9
- package/dist/core/config.d.mts +1 -1
- package/dist/core/config.mjs +1 -1
- package/dist/core/content-manager.d.mts +2 -2
- package/dist/core/content-manager.mjs +2 -2
- package/dist/core/context.d.mts +1 -1
- package/dist/core/context.mjs +5 -5
- package/dist/core/contracts/index.d.mts +2 -2
- package/dist/core/doctor.mjs +7 -6
- package/dist/core/graph-builder.mjs +2 -2
- package/dist/core/meta-manager.d.mts +8 -9
- package/dist/core/meta-manager.d.mts.map +1 -1
- package/dist/core/meta-manager.mjs +2 -2
- package/dist/core/model-manager.d.mts +39 -3
- package/dist/core/model-manager.d.mts.map +1 -1
- package/dist/core/model-manager.mjs +3 -3
- package/dist/core/ops/index.d.mts +40 -3
- package/dist/core/ops/index.d.mts.map +1 -1
- package/dist/core/ops/index.mjs +4 -4
- package/dist/core/overlay-reader.d.mts +1 -1
- package/dist/core/overlay-reader.mjs +1 -1
- package/dist/core/scan-config.mjs +1 -1
- package/dist/core/scanner.mjs +3 -3
- package/dist/core/validator/index.d.mts +1 -1
- package/dist/core/validator/index.d.mts.map +1 -1
- package/dist/core/validator/index.mjs +4 -4
- package/dist/{detect-CdDU4Ew_.mjs → detect-B0oXbQaP.mjs} +1 -1
- package/dist/{detect-CdDU4Ew_.mjs.map → detect-B0oXbQaP.mjs.map} +1 -1
- package/dist/{doctor-BwJ_nmqS.mjs → doctor-DNPuGgcg.mjs} +28 -15
- package/dist/doctor-DNPuGgcg.mjs.map +1 -0
- package/dist/{errors-e0YdjooK.mjs → errors-CvBS12e7.mjs} +1 -1
- package/dist/{errors-e0YdjooK.mjs.map → errors-CvBS12e7.mjs.map} +1 -1
- package/dist/fs-DLbVB-Ek.mjs.map +1 -1
- package/dist/git/branch-lifecycle.d.mts +1 -1
- package/dist/git/branch-lifecycle.mjs +3 -2
- package/dist/git/identity.d.mts +42 -0
- package/dist/git/identity.d.mts.map +1 -0
- package/dist/git/identity.mjs +2 -0
- package/dist/git/transaction.d.mts +1 -1
- package/dist/git/transaction.d.mts.map +1 -1
- package/dist/git/transaction.mjs +9 -8
- package/dist/{graph-builder-DK4Mh8Tn.mjs → graph-builder-BEocwW13.mjs} +2 -2
- package/dist/{graph-builder-DK4Mh8Tn.mjs.map → graph-builder-BEocwW13.mjs.map} +1 -1
- package/dist/{id-DV_T9Ic8.mjs → id-BjhaIxTL.mjs} +1 -1
- package/dist/{id-DV_T9Ic8.mjs.map → id-BjhaIxTL.mjs.map} +1 -1
- package/dist/identity-D8QoGxhT.mjs +125 -0
- package/dist/identity-D8QoGxhT.mjs.map +1 -0
- package/dist/{index-w8QHThNS.d.mts → index-BWbTJlXm.d.mts} +2 -2
- package/dist/index.mjs +21 -20
- package/dist/index.mjs.map +1 -1
- package/dist/{local-8dJ5NIWL.mjs → local-Db5X9mjZ.mjs} +25 -13
- package/dist/local-Db5X9mjZ.mjs.map +1 -0
- package/dist/{meta-manager-CJUiTgP2.mjs → meta-manager-B_Se183X.mjs} +29 -5
- package/dist/meta-manager-B_Se183X.mjs.map +1 -0
- package/dist/{model-manager-DP2CZiMT.mjs → model-manager-DgyKMjLN.mjs} +169 -25
- package/dist/model-manager-DgyKMjLN.mjs.map +1 -0
- package/dist/{node-BxujauDw.mjs → node-DUGiIkv1.mjs} +1 -1
- package/dist/{node-BxujauDw.mjs.map → node-DUGiIkv1.mjs.map} +1 -1
- package/dist/{ops-CGKIKwDc.mjs → ops-BzbThweu.mjs} +165 -26
- package/dist/ops-BzbThweu.mjs.map +1 -0
- package/dist/{overlay-reader-DNaVsgiS.mjs → overlay-reader-CkU_pGXZ.mjs} +1 -1
- package/dist/{overlay-reader-DNaVsgiS.mjs.map → overlay-reader-CkU_pGXZ.mjs.map} +1 -1
- package/dist/{paths-enT2coeX.mjs → paths-CdPPWpbG.mjs} +1 -1
- package/dist/{paths-enT2coeX.mjs.map → paths-CdPPWpbG.mjs.map} +1 -1
- package/dist/providers/github/index.d.mts +1 -1
- package/dist/providers/github/index.mjs +2 -2
- package/dist/providers/gitlab/index.d.mts +1 -1
- package/dist/providers/gitlab/index.mjs +2 -2
- package/dist/providers/local/index.d.mts +7 -1
- package/dist/providers/local/index.d.mts.map +1 -1
- package/dist/providers/local/index.mjs +11 -10
- package/dist/{scan-config-BlNLRCMx.mjs → scan-config-Dx49nCqk.mjs} +1 -1
- package/dist/{scan-config-BlNLRCMx.mjs.map → scan-config-Dx49nCqk.mjs.map} +1 -1
- package/dist/{scanner-CGWhmpDz.mjs → scanner-BSvXjfkp.mjs} +6 -6
- package/dist/{scanner-CGWhmpDz.mjs.map → scanner-BSvXjfkp.mjs.map} +1 -1
- package/dist/serialization-tmgfFBOh.mjs +2 -0
- package/dist/server/http/index.d.mts +1 -1
- package/dist/server/http/index.mjs +21 -20
- package/dist/server/http/index.mjs.map +1 -1
- package/dist/{server-DLauBiu2.d.mts → server-CLPNnhYL.d.mts} +2 -2
- package/dist/{server-DLauBiu2.d.mts.map → server-CLPNnhYL.d.mts.map} +1 -1
- package/dist/{server-CUZnuHQx.mjs → server-D-zJWbdI.mjs} +313 -115
- package/dist/server-D-zJWbdI.mjs.map +1 -0
- package/dist/server.d.mts +1 -1
- package/dist/server.mjs +21 -20
- package/dist/{source-map-generator-Bvbu-kM5.mjs → source-map-generator-DhjiQdV3.mjs} +1 -1
- package/dist/{source-map-generator-Bvbu-kM5.mjs.map → source-map-generator-DhjiQdV3.mjs.map} +1 -1
- package/dist/{svelte-parser-DaFK9iY0.mjs → svelte-parser-CwySu9yn.mjs} +3 -3
- package/dist/{svelte-parser-DaFK9iY0.mjs.map → svelte-parser-CwySu9yn.mjs.map} +1 -1
- package/dist/templates/index.mjs +1 -1
- package/dist/{templates-D6EllixQ.mjs → templates-CAkTIRkE.mjs} +430 -109
- package/dist/templates-CAkTIRkE.mjs.map +1 -0
- package/dist/testing/memory-provider.d.mts +52 -0
- package/dist/testing/memory-provider.d.mts.map +1 -0
- package/dist/testing/memory-provider.mjs +205 -0
- package/dist/testing/memory-provider.mjs.map +1 -0
- package/dist/tools/annotations.d.mts.map +1 -1
- package/dist/tools/annotations.mjs +1 -1
- package/dist/tools/availability.mjs +1 -1
- package/dist/{transaction-1SPznNt3.mjs → transaction-BW9ektWu.mjs} +13 -12
- package/dist/transaction-BW9ektWu.mjs.map +1 -0
- package/dist/{tsx-parser-md1N0Niu.mjs → tsx-parser-BvsK6lyG.mjs} +1 -1
- package/dist/{tsx-parser-md1N0Niu.mjs.map → tsx-parser-BvsK6lyG.mjs.map} +1 -1
- package/dist/tsx-parser-Byc7HlJ8.mjs +2 -0
- package/dist/util/detect.mjs +1 -1
- package/dist/util/fs.d.mts +1 -1
- package/dist/util/fs.d.mts.map +1 -1
- package/dist/util/id.mjs +1 -1
- package/dist/{validator-ChiYk6ap.mjs → validator-0sJ9vh1j.mjs} +65 -8
- package/dist/validator-0sJ9vh1j.mjs.map +1 -0
- package/dist/{vue-parser-CHxDohd8.mjs → vue-parser-auedZiJG.mjs} +3 -3
- package/dist/{vue-parser-CHxDohd8.mjs.map → vue-parser-auedZiJG.mjs.map} +1 -1
- package/package.json +13 -5
- package/testing/conformance/01-new-collection-entry/expected/.contentrain/meta/blog/en.json +1 -0
- package/testing/conformance/01-new-collection-entry/expected/.contentrain/models/blog.json +6 -5
- package/testing/conformance/01-new-collection-entry/setup/.contentrain/models/blog.json +6 -5
- package/testing/conformance/02-new-singleton/expected/.contentrain/meta/hero/en.json +1 -0
- package/testing/conformance/02-new-singleton/expected/.contentrain/models/hero.json +6 -5
- package/testing/conformance/02-new-singleton/setup/.contentrain/models/hero.json +6 -5
- package/testing/conformance/03-new-dictionary/expected/.contentrain/meta/ui-strings/en.json +1 -0
- package/testing/conformance/03-new-dictionary/expected/.contentrain/models/ui-strings.json +4 -3
- package/testing/conformance/03-new-dictionary/setup/.contentrain/models/ui-strings.json +4 -3
- package/dist/annotations-D3tlsF38.mjs.map +0 -1
- package/dist/apply-manager-SLCRLHN_.mjs.map +0 -1
- package/dist/branch-lifecycle-BAfgSQBv.mjs.map +0 -1
- package/dist/content-manager-DWo3G64y.d.mts.map +0 -1
- package/dist/doctor-BwJ_nmqS.mjs.map +0 -1
- package/dist/local-8dJ5NIWL.mjs.map +0 -1
- package/dist/meta-manager-CJUiTgP2.mjs.map +0 -1
- package/dist/model-manager-DP2CZiMT.mjs.map +0 -1
- package/dist/ops-CGKIKwDc.mjs.map +0 -1
- package/dist/serialization-B1CEzR4H.mjs +0 -2
- package/dist/server-CUZnuHQx.mjs.map +0 -1
- package/dist/templates-D6EllixQ.mjs.map +0 -1
- package/dist/transaction-1SPznNt3.mjs.map +0 -1
- package/dist/tsx-parser-C3XsIrwU.mjs +0 -2
- package/dist/validator-ChiYk6ap.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-VlRKRwAS.mjs","names":[],"sources":["../src/core/config.ts"],"sourcesContent":["import type { ContentrainConfig, Vocabulary } from '@contentrain/types'\nimport { join } from 'node:path'\nimport { contentrainDir, readJson } from '../util/fs.js'\nimport type { RepoReader } from './contracts/index.js'\n\nconst CONFIG_PATH = '.contentrain/config.json'\nconst VOCABULARY_PATH = '.contentrain/vocabulary.json'\n\nasync function readJsonViaReader<T>(reader: RepoReader, path: string): Promise<T | null> {\n try {\n return JSON.parse(await reader.readFile(path)) as T\n } catch {\n return null\n }\n}\n\nfunction normaliseConfig(raw: Partial<ContentrainConfig> | null): ContentrainConfig | null {\n if (!raw) return null\n return {\n version: raw.version ?? 1,\n stack: raw.stack ?? 'other',\n workflow: raw.workflow ?? 'auto-merge',\n locales: {\n default: raw.locales?.default ?? 'en',\n supported: raw.locales?.supported ?? [raw.locales?.default ?? 'en'],\n },\n domains: raw.domains ?? [],\n repository: raw.repository,\n assets_path: raw.assets_path,\n branchRetention: raw.branchRetention,\n branchWarnLimit: raw.branchWarnLimit,\n branchBlockLimit: raw.branchBlockLimit,\n remoteBranchCleanup: raw.remoteBranchCleanup,\n }\n}\n\n/**\n * Read `.contentrain/config.json` and normalise it with safe defaults.\n *\n * Accepts either a legacy `projectRoot` string (LocalReader is constructed\n * internally) or any `RepoReader` — tool handlers pass their provider so\n * the same logic resolves against local fs or the GitHub Git Data API.\n */\nexport function readConfig(projectRoot: string): Promise<ContentrainConfig | null>\nexport function readConfig(reader: RepoReader): Promise<ContentrainConfig | null>\nexport async function readConfig(input: string | RepoReader): Promise<ContentrainConfig | null> {\n if (typeof input === 'string') {\n const raw = await readJson<Partial<ContentrainConfig>>(join(contentrainDir(input), 'config.json'))\n return normaliseConfig(raw)\n }\n const raw = await readJsonViaReader<Partial<ContentrainConfig>>(input, CONFIG_PATH)\n return normaliseConfig(raw)\n}\n\n/**\n * Read `.contentrain/vocabulary.json`. Same dual signature as {@link readConfig}.\n */\nexport function readVocabulary(projectRoot: string): Promise<Vocabulary | null>\nexport function readVocabulary(reader: RepoReader): Promise<Vocabulary | null>\nexport async function readVocabulary(input: string | RepoReader): Promise<Vocabulary | null> {\n if (typeof input === 'string') {\n return readJson<Vocabulary>(join(contentrainDir(input), 'vocabulary.json'))\n }\n return readJsonViaReader<Vocabulary>(input, VOCABULARY_PATH)\n}\n"],"mappings":";;;AAKA,MAAM,cAAc;AACpB,MAAM,kBAAkB;AAExB,eAAe,kBAAqB,QAAoB,MAAiC;AACvF,KAAI;AACF,SAAO,KAAK,MAAM,MAAM,OAAO,SAAS,KAAK,CAAC;SACxC;AACN,SAAO;;;AAIX,SAAS,gBAAgB,KAAkE;AACzF,KAAI,CAAC,IAAK,QAAO;AACjB,QAAO;EACL,SAAS,IAAI,WAAW;EACxB,OAAO,IAAI,SAAS;EACpB,UAAU,IAAI,YAAY;EAC1B,SAAS;GACP,SAAS,IAAI,SAAS,WAAW;GACjC,WAAW,IAAI,SAAS,aAAa,CAAC,IAAI,SAAS,WAAW,KAAK;GACpE;EACD,SAAS,IAAI,WAAW,EAAE;EAC1B,YAAY,IAAI;EAChB,aAAa,IAAI;EACjB,iBAAiB,IAAI;EACrB,iBAAiB,IAAI;EACrB,kBAAkB,IAAI;EACtB,qBAAqB,IAAI;EAC1B;;AAYH,eAAsB,WAAW,OAA+D;AAC9F,KAAI,OAAO,UAAU,SAEnB,QAAO,gBADK,MAAM,SAAqC,KAAK,eAAe,MAAM,EAAE,cAAc,CAAC,CACvE;AAG7B,QAAO,gBADK,MAAM,kBAA8C,OAAO,YAAY,CACxD;;AAQ7B,eAAsB,eAAe,OAAwD;AAC3F,KAAI,OAAO,UAAU,SACnB,QAAO,SAAqB,KAAK,eAAe,MAAM,EAAE,kBAAkB,CAAC;AAE7E,QAAO,kBAA8B,OAAO,gBAAgB"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { _ as RepoReader } from "./index-
|
|
1
|
+
import { _ as RepoReader } from "./index-BWbTJlXm.mjs";
|
|
2
2
|
import { ContentrainConfig, LocaleStrategy, ModelDefinition, Vocabulary, parseMarkdownFrontmatter as parseFrontmatter, serializeMarkdownFrontmatter as serializeFrontmatter, validateEntryId as validateEntryId$1, validateLocale as validateLocale$1, validateSlug as validateSlug$1 } from "@contentrain/types";
|
|
3
3
|
|
|
4
4
|
//#region src/core/content-manager.d.ts
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
type ContentPathModel = Pick<ModelDefinition, 'id' | 'domain' | 'content_path'>;
|
|
6
|
+
type LocaleStrategyModel = Pick<ModelDefinition, 'locale_strategy'>;
|
|
7
|
+
type ContentFileModel = Pick<ModelDefinition, 'id' | 'i18n' | 'locale_strategy'>;
|
|
8
|
+
declare function resolveContentDir(projectRoot: string, model: ContentPathModel): string;
|
|
9
|
+
declare function resolveLocaleStrategy(model: LocaleStrategyModel): LocaleStrategy;
|
|
7
10
|
/** Build the file path for a JSON content file (singleton/collection/dictionary) */
|
|
8
|
-
declare function resolveJsonFilePath(dir: string, model:
|
|
11
|
+
declare function resolveJsonFilePath(dir: string, model: ContentFileModel, locale: string): string;
|
|
9
12
|
/** Build the file path for a markdown document */
|
|
10
|
-
declare function resolveMdFilePath(dir: string, model: ModelDefinition, locale: string, slug: string): string;
|
|
13
|
+
declare function resolveMdFilePath(dir: string, model: Pick<ModelDefinition, 'i18n' | 'locale_strategy'>, locale: string, slug: string): string;
|
|
11
14
|
interface ContentEntry {
|
|
12
15
|
id?: string;
|
|
13
16
|
slug?: string;
|
|
@@ -61,5 +64,5 @@ declare function readContent(projectRoot: string, model: ModelDefinition, opts:
|
|
|
61
64
|
slug?: string;
|
|
62
65
|
}): Promise<unknown>;
|
|
63
66
|
//#endregion
|
|
64
|
-
export {
|
|
65
|
-
//# sourceMappingURL=content-manager-
|
|
67
|
+
export { validateEntryId$1 as _, ListOpts as a, writeContent as b, deleteContent as c, readContent as d, resolveContentDir as f, serializeFrontmatter as g, resolveMdFilePath as h, DeleteOpts as i, listContent as l, resolveLocaleStrategy as m, ContentFileModel as n, LocaleStrategyModel as o, resolveJsonFilePath as p, ContentPathModel as r, WriteResult as s, ContentEntry as t, parseFrontmatter as u, validateLocale$1 as v, validateSlug$1 as y };
|
|
68
|
+
//# sourceMappingURL=content-manager-Dn4tqDw1.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-manager-Dn4tqDw1.d.mts","names":[],"sources":["../src/core/content-manager.ts"],"mappings":";;;;KAyBY,gBAAA,GAAmB,IAAA,CAAK,eAAA;AAAA,KACxB,mBAAA,GAAsB,IAAA,CAAK,eAAA;AAAA,KAC3B,gBAAA,GAAmB,IAAA,CAAK,eAAA;AAAA,iBAEpB,iBAAA,CAAkB,WAAA,UAAqB,KAAA,EAAO,gBAAA;AAAA,iBAO9C,qBAAA,CAAsB,KAAA,EAAO,mB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s";
|
|
2
2
|
import { a as readJson, s as writeJson, t as contentrainDir } from "./fs-DLbVB-Ek.mjs";
|
|
3
|
-
import { t as readConfig } from "./config-
|
|
4
|
-
import {
|
|
3
|
+
import { t as readConfig } from "./config-VlRKRwAS.mjs";
|
|
4
|
+
import { c as listModels, i as countEntries, l as readModel } from "./model-manager-DgyKMjLN.mjs";
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
//#region src/core/context.ts
|
|
7
7
|
const CONTEXT_PATH = ".contentrain/context.json";
|
|
@@ -112,4 +112,4 @@ async function buildContextChange(reader, operation, source, opts) {
|
|
|
112
112
|
//#endregion
|
|
113
113
|
export { readContext as n, writeContext as r, buildContextChange as t };
|
|
114
114
|
|
|
115
|
-
//# sourceMappingURL=context-
|
|
115
|
+
//# sourceMappingURL=context-C3x6I3cE.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-
|
|
1
|
+
{"version":3,"file":"context-C3x6I3cE.mjs","names":[],"sources":["../src/core/context.ts"],"sourcesContent":["import type { ContextJson, ContextSource } from '@contentrain/types'\nimport { join } from 'node:path'\nimport { contentrainDir, readJson, writeJson } from '../util/fs.js'\nimport type { FileChange, RepoReader } from './contracts/index.js'\nimport { canonicalStringify } from './serialization/index.js'\nimport { listModels, readModel, countEntries } from './model-manager.js'\nimport { readConfig } from './config.js'\n\nconst CONTEXT_PATH = '.contentrain/context.json'\n\n/**\n * Pre-computed stats a caller can pass to {@link buildContextChange} to skip\n * the model/entry scan. `entries` is nullable — a `null` is dropped from the\n * emitted context.json by {@link canonicalStringify}, exactly as a failed\n * scan is today.\n */\nexport interface ContextStats {\n models: number\n entries: number | null\n}\n\n/**\n * Read the committed `.contentrain/context.json` payload written by the\n * most recent content or model operation. Returns `null` when the file\n * does not exist (fresh project, or reader lookup failure).\n *\n * Dual signature — the local flow passes a `projectRoot` string, remote\n * flows (GitHubProvider, GitLabProvider, any custom `RepoReader`) pass\n * the reader directly so `contentrain_status` over HTTP can still\n * report the last operation + stats.\n */\nexport function readContext(projectRoot: string): Promise<ContextJson | null>\nexport function readContext(reader: RepoReader): Promise<ContextJson | null>\nexport async function readContext(input: string | RepoReader): Promise<ContextJson | null> {\n if (typeof input === 'string') {\n return readJson<ContextJson>(join(contentrainDir(input), 'context.json'))\n }\n try {\n const raw = await input.readFile(CONTEXT_PATH)\n return JSON.parse(raw) as ContextJson\n } catch {\n return null\n }\n}\n\nfunction resolveSource(explicit?: ContextSource): ContextSource {\n if (explicit) return explicit\n return process.env['CONTENTRAIN_SOURCE'] === 'mcp-studio' ? 'mcp-studio' : 'mcp-local'\n}\n\nasync function computeEntriesCount(projectRoot: string): Promise<number | null> {\n try {\n const models = await listModels(projectRoot)\n const fullModels = await Promise.all(models.map(m => readModel(projectRoot, m.id)))\n const counts = await Promise.all(\n fullModels\n .filter((m): m is NonNullable<typeof m> => m !== null)\n .map(m => countEntries(projectRoot, m)),\n )\n return counts.reduce((acc, c) => acc + c.total, 0)\n } catch {\n return null\n }\n}\n\nexport async function writeContext(\n projectRoot: string,\n operation: { tool: string, model: string, locale?: string, entries?: string[] },\n): Promise<void> {\n const models = await listModels(projectRoot)\n const config = await readConfig(projectRoot)\n const locales = config?.locales.supported ?? ['en']\n const totalEntries = await computeEntriesCount(projectRoot)\n const source = resolveSource()\n\n const context: ContextJson = {\n version: '1',\n lastOperation: {\n tool: operation.tool,\n model: operation.model,\n locale: operation.locale ?? config?.locales.default ?? 'en',\n entries: operation.entries,\n timestamp: new Date().toISOString(),\n source,\n },\n stats: {\n models: models.length,\n entries: totalEntries as number,\n locales,\n lastSync: new Date().toISOString(),\n },\n }\n\n await writeJson(join(contentrainDir(projectRoot), 'context.json'), context)\n}\n\n/**\n * Build a FileChange for `.contentrain/context.json` that remote providers\n * (GitHubProvider over HTTP, for example) can slot into their plan. The\n * local write path still uses {@link writeContext} directly because its\n * transaction layer writes into the post-apply worktree with real stats.\n *\n * Remote providers (Phase 5.5+) now also get accurate entry counts: the\n * reader-based {@link countEntries} walks each model over the provider's\n * read surface. GitHubProvider pays an extra round trip per model; the\n * payoff is a context.json that matches what the local write path emits,\n * so cross-provider merges stay deterministic.\n *\n * A caller that already knows the model/entry counts (e.g. Studio deriving\n * them from its own index) can pass `opts.stats` to skip that O(models·\n * locales) scan entirely — only `readConfig` remains, for the locale list\n * and the `lastOperation.locale` default. The emitted context.json is\n * byte-identical to the scanned variant for the same logical state.\n */\nexport async function buildContextChange(\n reader: RepoReader,\n operation: { tool: string, model: string, locale?: string, entries?: string[] },\n source?: ContextSource,\n opts?: { stats?: ContextStats },\n): Promise<FileChange> {\n const config = await readConfig(reader)\n const locales = config?.locales.supported ?? ['en']\n\n let modelCount: number\n let totalEntries: number | null\n if (opts?.stats) {\n modelCount = opts.stats.models\n totalEntries = opts.stats.entries\n } else {\n const models = await listModels(reader)\n modelCount = models.length\n try {\n const fullModels = await Promise.all(models.map(m => readModel(reader, m.id)))\n const counts = await Promise.all(\n fullModels\n .filter((m): m is NonNullable<typeof m> => m !== null)\n .map(m => countEntries(reader, m)),\n )\n totalEntries = counts.reduce((acc, c) => acc + c.total, 0)\n } catch {\n totalEntries = null\n }\n }\n\n const context: ContextJson = {\n version: '1',\n lastOperation: {\n tool: operation.tool,\n model: operation.model,\n locale: operation.locale ?? config?.locales.default ?? 'en',\n entries: operation.entries,\n timestamp: new Date().toISOString(),\n source: resolveSource(source),\n },\n stats: {\n models: modelCount,\n entries: totalEntries as number,\n locales,\n lastSync: new Date().toISOString(),\n },\n }\n\n return {\n path: CONTEXT_PATH,\n content: canonicalStringify(context),\n }\n}\n"],"mappings":";;;;;;AAQA,MAAM,eAAe;AAyBrB,eAAsB,YAAY,OAAyD;AACzF,KAAI,OAAO,UAAU,SACnB,QAAO,SAAsB,KAAK,eAAe,MAAM,EAAE,eAAe,CAAC;AAE3E,KAAI;EACF,MAAM,MAAM,MAAM,MAAM,SAAS,aAAa;AAC9C,SAAO,KAAK,MAAM,IAAI;SAChB;AACN,SAAO;;;AAIX,S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iBAAe,KAAK,MAAM;QACrB;EACL,MAAM,SAAS,MAAM,WAAW,OAAO;AACvC,eAAa,OAAO;AACpB,MAAI;GACF,MAAM,aAAa,MAAM,QAAQ,IAAI,OAAO,KAAI,MAAK,UAAU,QAAQ,EAAE,GAAG,CAAC,CAAC;AAM9E,mBALe,MAAM,QAAQ,IAC3B,WACG,QAAQ,MAAkC,MAAM,KAAK,CACrD,KAAI,MAAK,aAAa,QAAQ,EAAE,CAAC,CACrC,EACqB,QAAQ,KAAK,MAAM,MAAM,EAAE,OAAO,EAAE;UACpD;AACN,kBAAe;;;AAsBnB,QAAO;EACL,MAAM;EACN,SAAS,mBApBkB;GAC3B,SAAS;GACT,eAAe;IACb,MAAM,UAAU;IAChB,OAAO,UAAU;IACjB,QAAQ,UAAU,UAAU,QAAQ,QAAQ,WAAW;IACvD,SAAS,UAAU;IACnB,4BAAW,IAAI,MAAM,EAAC,aAAa;IACnC,QAAQ,cAAc,OAAO;IAC9B;GACD,OAAO;IACL,QAAQ;IACR,SAAS;IACT;IACA,2BAAU,IAAI,MAAM,EAAC,aAAa;IACnC;GACF,CAIqC;EACrC"}
|
|
@@ -6,6 +6,8 @@ interface ExtractionEntry {
|
|
|
6
6
|
kind: 'singleton' | 'collection' | 'dictionary' | 'document';
|
|
7
7
|
domain: string;
|
|
8
8
|
i18n?: boolean;
|
|
9
|
+
/** Optional — inferred from `fields` when omitted, and reported in the dry run. */
|
|
10
|
+
title_field?: string;
|
|
9
11
|
fields?: Record<string, FieldDef>;
|
|
10
12
|
entries: Array<{
|
|
11
13
|
locale?: string;
|
|
@@ -33,6 +35,12 @@ interface ExtractionPreview {
|
|
|
33
35
|
models_to_update: string[];
|
|
34
36
|
total_entries: number;
|
|
35
37
|
content_files: string[];
|
|
38
|
+
/**
|
|
39
|
+
* Resolved `title_field` per model, keyed by model id. Surfaced in the dry run
|
|
40
|
+
* because the extract envelope may omit it — without this the agent would be
|
|
41
|
+
* approving a schema decision it never saw.
|
|
42
|
+
*/
|
|
43
|
+
title_fields: Record<string, string>;
|
|
36
44
|
}
|
|
37
45
|
interface ExtractionResult {
|
|
38
46
|
dry_run: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-manager.d.mts","names":[],"sources":["../../src/core/apply-manager.ts"],"mappings":";;;UAYiB,eAAA;EACf,KAAA;EACA,IAAA;EACA,MAAA;EACA,IAAA;EACA,MAAA,GAAS,MAAA,SAAe,QAAA;EACxB,OAAA,EAAS,KAAA;IACP,MAAA;IACA,IAAA;IACA,IAAA,EAAM,MAAA;IACN,MAAA;MAAW,IAAA;MAAc,IAAA;MAAc,KAAA;IAAA;IACvC,OAAA,GAAU,KAAA;MAAQ,IAAA;MAAc,IAAA;MAAc,GAAA;MAAa,KAAA;IAAA;EAAA;AAAA;AAAA,UAI9C,eAAA;EACf,WAAA,EAAa,eAAA;EACb,OAAA;AAAA;AAAA,UAGe,iBAAA;EACf,gBAAA;EACA,gBAAA;EACA,aAAA;EACA,aAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"apply-manager.d.mts","names":[],"sources":["../../src/core/apply-manager.ts"],"mappings":";;;UAYiB,eAAA;EACf,KAAA;EACA,IAAA;EACA,MAAA;EACA,IAAA;EAGwB;EADxB,WAAA;EACA,MAAA,GAAS,MAAA,SAAe,QAAA;EACxB,OAAA,EAAS,KAAA;IACP,MAAA;IACA,IAAA;IACA,IAAA,EAAM,MAAA;IACN,MAAA;MAAW,IAAA;MAAc,IAAA;MAAc,KAAA;IAAA;IACvC,OAAA,GAAU,KAAA;MAAQ,IAAA;MAAc,IAAA;MAAc,GAAA;MAAa,KAAA;IAAA;EAAA;AAAA;AAAA,UAI9C,eAAA;EACf,WAAA,EAAa,eAAA;EACb,OAAA;AAAA;AAAA,UAGe,iBAAA;EACf,gBAAA;EACA,gBAAA;EACA,aAAA;EACA,aAAA;EAbgD;;;;AAIlD;EAeE,YAAA,EAAc,MAAA;AAAA;AAAA,UAGC,gBAAA;EACf,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UACA,KAAA,EAAO,UAAA,GACN,OAAA,CAAQ,WAAA;;;;;;;;;iBAgZK,aAAA,CAAc,IAAA,UAAc,QAAA,UAAkB,aAAA"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import "../serialization-
|
|
1
|
+
import "../serialization-tmgfFBOh.mjs";
|
|
2
2
|
import "../fs-DLbVB-Ek.mjs";
|
|
3
|
-
import "../meta-manager-
|
|
4
|
-
import "../
|
|
5
|
-
import "../
|
|
6
|
-
import "../
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
import "../
|
|
10
|
-
import
|
|
3
|
+
import "../meta-manager-B_Se183X.mjs";
|
|
4
|
+
import "../identity-D8QoGxhT.mjs";
|
|
5
|
+
import "../config-VlRKRwAS.mjs";
|
|
6
|
+
import "../branch-lifecycle-B6PXZ2N7.mjs";
|
|
7
|
+
import "../model-manager-DgyKMjLN.mjs";
|
|
8
|
+
import "../context-C3x6I3cE.mjs";
|
|
9
|
+
import "../id-BjhaIxTL.mjs";
|
|
10
|
+
import "../transaction-BW9ektWu.mjs";
|
|
11
|
+
import { a as detectFileFramework, c as validatePatchPath, i as checkSyntax, n as applyExtract, o as replaceInLine, r as applyReuse, s as validateFrameworkExpression, t as PATCHABLE_EXTENSIONS } from "../apply-manager-BybvnUVC.mjs";
|
|
11
12
|
export { PATCHABLE_EXTENSIONS, applyExtract, applyReuse, checkSyntax, detectFileFramework, replaceInLine, validateFrameworkExpression, validatePatchPath };
|
package/dist/core/config.d.mts
CHANGED
package/dist/core/config.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
export { ContentEntry, DeleteOpts, ListOpts, WriteResult, deleteContent, listContent, parseFrontmatter, readContent, resolveContentDir, resolveJsonFilePath, resolveLocaleStrategy, resolveMdFilePath, serializeFrontmatter, validateEntryId, validateLocale, validateSlug, writeContent };
|
|
1
|
+
import { _ as validateEntryId, a as ListOpts, b as writeContent, c as deleteContent, d as readContent, f as resolveContentDir, g as serializeFrontmatter, h as resolveMdFilePath, i as DeleteOpts, l as listContent, m as resolveLocaleStrategy, n as ContentFileModel, o as LocaleStrategyModel, p as resolveJsonFilePath, r as ContentPathModel, s as WriteResult, t as ContentEntry, u as parseFrontmatter, v as validateLocale, y as validateSlug } from "../content-manager-Dn4tqDw1.mjs";
|
|
2
|
+
export { ContentEntry, ContentFileModel, ContentPathModel, DeleteOpts, ListOpts, LocaleStrategyModel, WriteResult, deleteContent, listContent, parseFrontmatter, readContent, resolveContentDir, resolveJsonFilePath, resolveLocaleStrategy, resolveMdFilePath, serializeFrontmatter, validateEntryId, validateLocale, validateSlug, writeContent };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../fs-DLbVB-Ek.mjs";
|
|
2
|
-
import "../meta-manager-
|
|
3
|
-
import {
|
|
2
|
+
import "../meta-manager-B_Se183X.mjs";
|
|
3
|
+
import { C as validateLocale, S as validateEntryId, T as writeContent, _ as resolveContentDir, b as resolveMdFilePath, g as readContent, h as parseFrontmatter, m as listContent, p as deleteContent, v as resolveJsonFilePath, w as validateSlug, x as serializeFrontmatter, y as resolveLocaleStrategy } from "../model-manager-DgyKMjLN.mjs";
|
|
4
4
|
export { deleteContent, listContent, parseFrontmatter, readContent, resolveContentDir, resolveJsonFilePath, resolveLocaleStrategy, resolveMdFilePath, serializeFrontmatter, validateEntryId, validateLocale, validateSlug, writeContent };
|
package/dist/core/context.d.mts
CHANGED
package/dist/core/context.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../serialization-
|
|
1
|
+
import "../serialization-tmgfFBOh.mjs";
|
|
2
2
|
import "../fs-DLbVB-Ek.mjs";
|
|
3
|
-
import "../meta-manager-
|
|
4
|
-
import "../config-
|
|
5
|
-
import "../model-manager-
|
|
6
|
-
import { n as readContext, r as writeContext, t as buildContextChange } from "../context-
|
|
3
|
+
import "../meta-manager-B_Se183X.mjs";
|
|
4
|
+
import "../config-VlRKRwAS.mjs";
|
|
5
|
+
import "../model-manager-DgyKMjLN.mjs";
|
|
6
|
+
import { n as readContext, r as writeContext, t as buildContextChange } from "../context-C3x6I3cE.mjs";
|
|
7
7
|
export { buildContextChange, readContext, writeContext };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as RepoReader, a as FileChange, c as MediaAsset, d as MediaListResult, f as MediaProvider, g as RepoProvider, h as ProviderCapabilities, i as CommitAuthor, l as MediaIngestInput, m as MergeResult, n as Branch, o as FileDiff, p as MediaUpdateInput, r as Commit, s as LOCAL_CAPABILITIES, t as ApplyPlanInput, u as MediaListOptions, v as RepoWriter } from "../../index-
|
|
2
|
-
export { ApplyPlanInput, Branch, Commit, CommitAuthor, FileChange, FileDiff, LOCAL_CAPABILITIES, MediaAsset, MediaIngestInput, MediaListOptions, MediaListResult, MediaProvider, MediaUpdateInput, MergeResult, ProviderCapabilities, RepoProvider, RepoReader, RepoWriter };
|
|
1
|
+
import { _ as RepoReader, a as FileChange, c as MediaAsset, d as MediaListResult, f as MediaProvider, g as RepoProvider, h as ProviderCapabilities, i as CommitAuthor, l as MediaIngestInput, m as MergeResult, n as Branch, o as FileDiff, p as MediaUpdateInput, r as Commit, s as LOCAL_CAPABILITIES, t as ApplyPlanInput, u as MediaListOptions, v as RepoWriter, y as WriteReadiness } from "../../index-BWbTJlXm.mjs";
|
|
2
|
+
export { ApplyPlanInput, Branch, Commit, CommitAuthor, FileChange, FileDiff, LOCAL_CAPABILITIES, MediaAsset, MediaIngestInput, MediaListOptions, MediaListResult, MediaProvider, MediaUpdateInput, MergeResult, ProviderCapabilities, RepoProvider, RepoReader, RepoWriter, WriteReadiness };
|
package/dist/core/doctor.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import "../fs-DLbVB-Ek.mjs";
|
|
2
|
-
import "../meta-manager-
|
|
3
|
-
import "../
|
|
4
|
-
import "../
|
|
5
|
-
import "../branch-lifecycle-
|
|
6
|
-
import "../
|
|
7
|
-
import
|
|
2
|
+
import "../meta-manager-B_Se183X.mjs";
|
|
3
|
+
import "../identity-D8QoGxhT.mjs";
|
|
4
|
+
import "../config-VlRKRwAS.mjs";
|
|
5
|
+
import "../branch-lifecycle-B6PXZ2N7.mjs";
|
|
6
|
+
import "../model-manager-DgyKMjLN.mjs";
|
|
7
|
+
import "../scan-config-Dx49nCqk.mjs";
|
|
8
|
+
import { t as runDoctor } from "../doctor-DNPuGgcg.mjs";
|
|
8
9
|
export { runDoctor };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EntryMeta, ModelDefinition } from "@contentrain/types";
|
|
1
|
+
import { ContentStatus, EntryMeta, ModelDefinition } from "@contentrain/types";
|
|
2
2
|
|
|
3
3
|
//#region src/core/meta-manager.d.ts
|
|
4
4
|
interface MetaOpts {
|
|
@@ -15,15 +15,14 @@ interface MetaOpts {
|
|
|
15
15
|
}
|
|
16
16
|
declare function readMeta(projectRoot: string, model: ModelDefinition, opts: MetaOpts): Promise<EntryMeta | Record<string, EntryMeta> | null>;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Meta for a deliberate status change.
|
|
19
19
|
*
|
|
20
|
-
*
|
|
21
|
-
* field must not unpublish an entry.
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* Pass `existing: undefined` to mint meta for a genuinely new entry.
|
|
20
|
+
* Distinct from {@link mergeEntryMeta}, which preserves `status` on purpose —
|
|
21
|
+
* editing a field must not unpublish an entry. Changing the status IS the
|
|
22
|
+
* operation here, so it is the one place that may overwrite it. Everything
|
|
23
|
+
* else about the write is stamped identically.
|
|
26
24
|
*/
|
|
25
|
+
declare function applyStatusChange(existing: EntryMeta, status: ContentStatus): EntryMeta;
|
|
27
26
|
declare function mergeEntryMeta(existing: EntryMeta | undefined, data?: Record<string, unknown>): EntryMeta;
|
|
28
27
|
declare function writeMeta(projectRoot: string, model: ModelDefinition, opts: MetaOpts, meta: EntryMeta): Promise<void>;
|
|
29
28
|
/**
|
|
@@ -38,5 +37,5 @@ declare function writeMeta(projectRoot: string, model: ModelDefinition, opts: Me
|
|
|
38
37
|
declare function writeMetaEntries(projectRoot: string, model: ModelDefinition, opts: MetaOpts, updates: Record<string, EntryMeta>): Promise<string[]>;
|
|
39
38
|
declare function deleteMeta(projectRoot: string, model: ModelDefinition, opts: MetaOpts): Promise<void>;
|
|
40
39
|
//#endregion
|
|
41
|
-
export { deleteMeta, mergeEntryMeta, readMeta, writeMeta, writeMetaEntries };
|
|
40
|
+
export { applyStatusChange, deleteMeta, mergeEntryMeta, readMeta, writeMeta, writeMetaEntries };
|
|
42
41
|
//# sourceMappingURL=meta-manager.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta-manager.d.mts","names":[],"sources":["../../src/core/meta-manager.ts"],"mappings":";;;UAKU,QAAA;EACR,MAAA;EACA,OAAA;EACA,IAAA;;;;;;;EAOA,aAAA;AAAA;AAAA,iBAkBoB,QAAA,CACpB,WAAA,UACA,KAAA,EAAO,eAAA,EACP,IAAA,EAAM,QAAA,GACL,OAAA,CAAQ,SAAA,GAAY,MAAA,SAAe,SAAA
|
|
1
|
+
{"version":3,"file":"meta-manager.d.mts","names":[],"sources":["../../src/core/meta-manager.ts"],"mappings":";;;UAKU,QAAA;EACR,MAAA;EACA,OAAA;EACA,IAAA;;;;;;;EAOA,aAAA;AAAA;AAAA,iBAkBoB,QAAA,CACpB,WAAA,UACA,KAAA,EAAO,eAAA,EACP,IAAA,EAAM,QAAA,GACL,OAAA,CAAQ,SAAA,GAAY,MAAA,SAAe,SAAA;;;;;;;;;iBA8BtB,iBAAA,CAAkB,QAAA,EAAU,SAAA,EAAW,MAAA,EAAQ,aAAA,GAAgB,SAAA;AAAA,iBAS/D,cAAA,CACd,QAAA,EAAU,SAAA,cACV,IAAA,GAAO,MAAA,oBACN,SAAA;AAAA,iBAamB,SAAA,CACpB,WAAA,UACA,KAAA,EAAO,eAAA,EACP,IAAA,EAAM,QAAA,EACN,IAAA,EAAM,SAAA,GACL,OAAA;;;;;;;;;;iBAqBmB,gBAAA,CACpB,WAAA,UACA,KAAA,EAAO,eAAA,EACP,IAAA,EAAM,QAAA,EACN,OAAA,EAAS,MAAA,SAAe,SAAA,IACvB,OAAA;AAAA,iBAUmB,UAAA,CACpB,WAAA,UACA,KAAA,EAAO,eAAA,EACP,IAAA,EAAM,QAAA,GACL,OAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "../fs-DLbVB-Ek.mjs";
|
|
2
|
-
import { a as
|
|
3
|
-
export { deleteMeta, mergeEntryMeta, readMeta, writeMeta, writeMetaEntries };
|
|
2
|
+
import { a as writeMeta, i as readMeta, n as deleteMeta, o as writeMetaEntries, r as mergeEntryMeta, t as applyStatusChange } from "../meta-manager-B_Se183X.mjs";
|
|
3
|
+
export { applyStatusChange, deleteMeta, mergeEntryMeta, readMeta, writeMeta, writeMetaEntries };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as RepoReader } from "../index-
|
|
2
|
-
import { ModelDefinition, ModelSummary, ModelSummary as ModelSummary$1 } from "@contentrain/types";
|
|
1
|
+
import { _ as RepoReader } from "../index-BWbTJlXm.mjs";
|
|
2
|
+
import { MODEL_FIELD_ORDER, ModelDefinition, ModelSummary, ModelSummary as ModelSummary$1 } from "@contentrain/types";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/core/model-manager.d.ts
|
|
@@ -65,6 +65,41 @@ interface ModelDefinitionIssues {
|
|
|
65
65
|
/** Surface to the caller; the write proceeds. */
|
|
66
66
|
warnings: string[];
|
|
67
67
|
}
|
|
68
|
+
interface TitleFieldPick {
|
|
69
|
+
field: string;
|
|
70
|
+
/** Which rule chose it — surfaced to the user so an inferred title can be overruled. */
|
|
71
|
+
rule: 'dictionary' | 'name-match' | 'required-displayable' | 'displayable';
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Pick the field a model should title its entries by.
|
|
75
|
+
*
|
|
76
|
+
* Migration aid only — it exists to backfill models authored before `title_field`
|
|
77
|
+
* was required, and `contentrain validate --fix` is its one caller. New models
|
|
78
|
+
* declare the field; nothing here runs on the write path.
|
|
79
|
+
*
|
|
80
|
+
* Every rung filters by `isTitleFieldType` first. That filter is the whole point:
|
|
81
|
+
* an unfiltered name match hands the title to a field called `name` that happens
|
|
82
|
+
* to be typed `icon`, which is the exact bug this contract replaces.
|
|
83
|
+
*
|
|
84
|
+
* Returns `null` when no field can render as a title. That is a real answer, not a
|
|
85
|
+
* failure — guessing `image` or `relation` here would re-create the bug, so the
|
|
86
|
+
* validation error stands and a human picks.
|
|
87
|
+
*/
|
|
88
|
+
declare function inferTitleField(kind: string, fields?: Record<string, unknown>): TitleFieldPick | null;
|
|
89
|
+
/**
|
|
90
|
+
* The `title_field` rule table.
|
|
91
|
+
*
|
|
92
|
+
* Extracted so `validateModelDefinition` (write path) and the project validator
|
|
93
|
+
* (read path) report the same wording from one place, rather than one of them
|
|
94
|
+
* sniffing the other's strings.
|
|
95
|
+
*
|
|
96
|
+
* Chained so a model gets one title_field error, not a cascade of five.
|
|
97
|
+
*/
|
|
98
|
+
declare function titleFieldIssues(input: {
|
|
99
|
+
kind: string;
|
|
100
|
+
title_field?: unknown;
|
|
101
|
+
fields?: Record<string, unknown>;
|
|
102
|
+
}): ModelDefinitionIssues;
|
|
68
103
|
/**
|
|
69
104
|
* Validate a model definition before writing.
|
|
70
105
|
* Used by both the model_save tool and normalize extract.
|
|
@@ -72,8 +107,9 @@ interface ModelDefinitionIssues {
|
|
|
72
107
|
declare function validateModelDefinition(input: {
|
|
73
108
|
id: string;
|
|
74
109
|
kind: string;
|
|
110
|
+
title_field?: unknown;
|
|
75
111
|
fields?: Record<string, unknown>;
|
|
76
112
|
}): ModelDefinitionIssues;
|
|
77
113
|
//#endregion
|
|
78
|
-
export { FIELD_TYPE_ENUM, ModelDefinitionIssues, ModelReference, type ModelSummary, checkReferences, countEntries, deleteModel, fieldDefZodSchema, listModels, readModel, validateModelDefinition, writeModel };
|
|
114
|
+
export { FIELD_TYPE_ENUM, MODEL_FIELD_ORDER, ModelDefinitionIssues, ModelReference, type ModelSummary, TitleFieldPick, checkReferences, countEntries, deleteModel, fieldDefZodSchema, inferTitleField, listModels, readModel, titleFieldIssues, validateModelDefinition, writeModel };
|
|
79
115
|
//# sourceMappingURL=model-manager.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-manager.d.mts","names":[],"sources":["../../src/core/model-manager.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"model-manager.d.mts","names":[],"sources":["../../src/core/model-manager.ts"],"mappings":";;;;;AAkCA;;;;;;;AAAA,iBAAgB,UAAA,CAAW,WAAA,WAAsB,OAAA,CAAQ,cAAA;AAAA,iBACzC,UAAA,CAAW,MAAA,EAAQ,UAAA,GAAa,OAAA,CAAQ,cAAA;AAAxD;;;AAAA,iBAgCgB,SAAA,CAAU,WAAA,UAAqB,OAAA,WAAkB,OAAA,CAAQ,eAAA;AAAA,iBACzD,SAAA,CAAU,MAAA,EAAQ,UAAA,EAAY,OAAA,WAAkB,OAAA,CAAQ,eAAA;;;;;;;;iBA4JxD,YAAA,CACd,WAAA,UACA,KAAA,EAAO,eAAA,GACN,OAAA;EAAU,KAAA;EAAe,OAAA,EAAS,MAAA;AAAA;AAAA,iBACrB,YAAA,CACd,MAAA,EAAQ,UAAA,EACR,KAAA,EAAO,eAAA,GACN,OAAA;EAAU,KAAA;EAAe,OAAA,EAAS,MAAA;AAAA;AAAA,iBA8Hf,UAAA,CAAW,WAAA,UAAqB,KAAA,EAAO,eAAA,GAAkB,OAAA;AAAA,iBASzD,WAAA,CAAY,WAAA,UAAqB,OAAA,WAAkB,OAAA;AAAA,UA+BxD,cAAA;EACf,KAAA;EACA,KAAA;EACA,IAAA;AAAA;;;;;;;;;iBAWc,eAAA,CAAgB,WAAA,UAAqB,OAAA,WAAkB,OAAA,CAAQ,cAAA;AAAA,iBAC/D,eAAA,CAAgB,MAAA,EAAQ,UAAA,EAAY,OAAA,WAAkB,OAAA,CAAQ,cAAA;AAAA,cA8BjE,eAAA;;AA1Nb;;;;;;;cA4Oa,iBAAA,EAAmB,CAAA,CAAE,OAAA,CAAQ,MAAA;AAAA,UAqCzB,qBAAA;EA/QR;EAiRP,MAAA;EAhRC;EAkRD,QAAA;AAAA;AAAA,UA+Me,cAAA;EACf,KAAA;EAleyC;EAoezC,IAAA;AAAA;;;;;;;;;;;;;;;;iBAwDc,eAAA,CAAgB,IAAA,UAAc,MAAA,GAAS,MAAA,oBAA0B,cAAA;;AA1ZjF;;;;;;;;iBA2bgB,gBAAA,CACd,KAAA;EAAS,IAAA;EAAc,WAAA;EAAuB,MAAA,GAAS,MAAA;AAAA,IACtD,qBAAA;;;;;iBAyCa,uBAAA,CAId,KAAA;EAAS,EAAA;EAAY,IAAA;EAAc,WAAA;EAAuB,MAAA,GAAS,MAAA;AAAA,IAClE,qBAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../fs-DLbVB-Ek.mjs";
|
|
2
|
-
import "../meta-manager-
|
|
3
|
-
import { a as
|
|
4
|
-
export { FIELD_TYPE_ENUM, checkReferences, countEntries, deleteModel, fieldDefZodSchema, listModels, readModel, validateModelDefinition, writeModel };
|
|
2
|
+
import "../meta-manager-B_Se183X.mjs";
|
|
3
|
+
import { a as deleteModel, c as listModels, d as validateModelDefinition, f as writeModel, i as countEntries, l as readModel, n as MODEL_FIELD_ORDER, o as fieldDefZodSchema, r as checkReferences, s as inferTitleField, t as FIELD_TYPE_ENUM, u as titleFieldIssues } from "../model-manager-DgyKMjLN.mjs";
|
|
4
|
+
export { FIELD_TYPE_ENUM, MODEL_FIELD_ORDER, checkReferences, countEntries, deleteModel, fieldDefZodSchema, inferTitleField, listModels, readModel, titleFieldIssues, validateModelDefinition, writeModel };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as RepoReader, a as FileChange } from "../../index-
|
|
2
|
-
import { t as ContentEntry } from "../../content-manager-
|
|
1
|
+
import { _ as RepoReader, a as FileChange } from "../../index-BWbTJlXm.mjs";
|
|
2
|
+
import { t as ContentEntry } from "../../content-manager-Dn4tqDw1.mjs";
|
|
3
3
|
import { ContentrainConfig, ModelDefinition, Vocabulary } from "@contentrain/types";
|
|
4
4
|
|
|
5
5
|
//#region src/core/ops/apply-to-worktree.d.ts
|
|
@@ -173,5 +173,42 @@ declare function documentFilePath(model: Pick<ModelDefinition, 'id' | 'domain' |
|
|
|
173
173
|
*/
|
|
174
174
|
declare function metaFilePath(model: Pick<ModelDefinition, 'id' | 'kind' | 'i18n'>, locale: string, defaultLocale: string, slug?: string): string;
|
|
175
175
|
//#endregion
|
|
176
|
-
|
|
176
|
+
//#region src/core/ops/vocabulary-save.d.ts
|
|
177
|
+
interface VocabularySaveInput {
|
|
178
|
+
/**
|
|
179
|
+
* Terms to add or update, keyed by term slug, each holding its translations
|
|
180
|
+
* keyed by locale. Merged with what is already there — a term absent from
|
|
181
|
+
* this map is untouched.
|
|
182
|
+
*/
|
|
183
|
+
terms: Record<string, Record<string, string>>;
|
|
184
|
+
}
|
|
185
|
+
interface VocabularyDeleteInput {
|
|
186
|
+
/** Term slugs to remove. A slug that is not present is reported, not an error. */
|
|
187
|
+
terms: string[];
|
|
188
|
+
}
|
|
189
|
+
interface VocabularySaveResult {
|
|
190
|
+
added: string[];
|
|
191
|
+
updated: string[];
|
|
192
|
+
total: number;
|
|
193
|
+
}
|
|
194
|
+
interface VocabularyDeleteResult {
|
|
195
|
+
deleted: string[];
|
|
196
|
+
missing: string[];
|
|
197
|
+
total: number;
|
|
198
|
+
}
|
|
199
|
+
type VocabularySavePlan = OpPlan<VocabularySaveResult>;
|
|
200
|
+
type VocabularyDeletePlan = OpPlan<VocabularyDeleteResult>;
|
|
201
|
+
/**
|
|
202
|
+
* Build the FileChange[] to add or update vocabulary terms.
|
|
203
|
+
*
|
|
204
|
+
* Vocabulary had no write tool at all: the rules forbid editing `.contentrain/`
|
|
205
|
+
* by hand, and there was no supported way to obey that. This closes it through
|
|
206
|
+
* the same plan/apply path every other write uses, so it lands on a `cr/*`
|
|
207
|
+
* branch and follows the project's workflow like anything else.
|
|
208
|
+
*/
|
|
209
|
+
declare function planVocabularySave(reader: RepoReader, input: VocabularySaveInput): Promise<VocabularySavePlan>;
|
|
210
|
+
/** Build the FileChange[] to remove vocabulary terms. */
|
|
211
|
+
declare function planVocabularyDelete(reader: RepoReader, input: VocabularyDeleteInput): Promise<VocabularyDeletePlan>;
|
|
212
|
+
//#endregion
|
|
213
|
+
export { type ContentDeleteInput, type ContentDeletePlan, type ContentSaveEntryResult, type ContentSavePlan, type ModelDeleteInput, type ModelDeletePlan, type ModelSaveInput, type ModelSavePlan, type ModelSaveResult, type OpPlan, type VocabularyDeleteInput, type VocabularyDeletePlan, type VocabularySaveInput, type VocabularySavePlan, applyChangesToWorktree, contentDirPath, contentFilePath, documentFilePath, metaFilePath, planContentDelete, planContentSave, planModelDelete, planModelSave, planVocabularyDelete, planVocabularySave };
|
|
177
214
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/core/ops/apply-to-worktree.ts","../../../src/core/ops/types.ts","../../../src/core/ops/content-delete.ts","../../../src/core/ops/content-save.ts","../../../src/core/ops/model-delete.ts","../../../src/core/ops/model-save.ts","../../../src/core/ops/paths.ts"],"mappings":";;;;;;;;;AAkBA;;;;;;;;;;iBAAsB,sBAAA,CAAuB,QAAA,UAAkB,OAAA,WAAkB,UAAA,KAAe,OAAA;;;;;;;AAAhG;;;;UCRiB,MAAA;EDQgE;ECN/E,OAAA,EAAS,UAAA;EDMqF;ECJ9F,MAAA,EAAQ,OAAA;EDI6F;ECFrG,UAAA;AAAA;AAAA,UAGe,sBAAA;EACf,MAAA;EACA,EAAA;EACA,IAAA;EACA,MAAA;EACA,UAAA;AAAA;AAAA,KAGU,eAAA,GAAkB,MAAA,CAAO,sBAAA;;;UCpBpB,kBAAA;EACf,KAAA,EAAO,eAAA;EACP,EAAA;EACA,IAAA;EACA,MAAA;EACA,IAAA;EFM2C;;;;EED3C,aAAA;AAAA;AAAA,KAGU,iBAAA,GAAoB,MAAA;;;ADVhC;;;;;;;;;;;iBCoDsB,iBAAA,CACpB,MAAA,EAAQ,UAAA,EACR,KAAA,EAAO,kBAAA,GACN,OAAA,CAAQ,iBAAA;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/core/ops/apply-to-worktree.ts","../../../src/core/ops/types.ts","../../../src/core/ops/content-delete.ts","../../../src/core/ops/content-save.ts","../../../src/core/ops/model-delete.ts","../../../src/core/ops/model-save.ts","../../../src/core/ops/paths.ts","../../../src/core/ops/vocabulary-save.ts"],"mappings":";;;;;;;;;AAkBA;;;;;;;;;;iBAAsB,sBAAA,CAAuB,QAAA,UAAkB,OAAA,WAAkB,UAAA,KAAe,OAAA;;;;;;;AAAhG;;;;UCRiB,MAAA;EDQgE;ECN/E,OAAA,EAAS,UAAA;EDMqF;ECJ9F,MAAA,EAAQ,OAAA;EDI6F;ECFrG,UAAA;AAAA;AAAA,UAGe,sBAAA;EACf,MAAA;EACA,EAAA;EACA,IAAA;EACA,MAAA;EACA,UAAA;AAAA;AAAA,KAGU,eAAA,GAAkB,MAAA,CAAO,sBAAA;;;UCpBpB,kBAAA;EACf,KAAA,EAAO,eAAA;EACP,EAAA;EACA,IAAA;EACA,MAAA;EACA,IAAA;EFM2C;;;;EED3C,aAAA;AAAA;AAAA,KAGU,iBAAA,GAAoB,MAAA;;;ADVhC;;;;;;;;;;;iBCoDsB,iBAAA,CACpB,MAAA,EAAQ,UAAA,EACR,KAAA,EAAO,kBAAA,GACN,OAAA,CAAQ,iBAAA;;;UCpDD,SAAA;EACR,KAAA,EAAO,eAAA;EACP,OAAA,EAAS,YAAA;EACT,MAAA,EAAQ,iBAAA;EACR,UAAA,GAAa,UA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;ANlB1C;;;;iBM4EsB,kBAAA,CACpB,MAAA,EAAQ,UAAA,EACR,KAAA,EAAO,mBAAA,GACN,OAAA,CAAQ,kBAAA;;iBA2DW,oBAAA,CACpB,MAAA,EAAQ,UAAA,EACR,KAAA,EAAO,qBAAA,GACN,OAAA,CAAQ,oBAAA"}
|
package/dist/core/ops/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import "../../serialization-
|
|
1
|
+
import { a as planContentSave, i as planModelDelete, n as planVocabularySave, o as planContentDelete, r as planModelSave, s as applyChangesToWorktree, t as planVocabularyDelete } from "../../ops-BzbThweu.mjs";
|
|
2
|
+
import "../../serialization-tmgfFBOh.mjs";
|
|
3
3
|
import { i as metaFilePath, n as contentFilePath, r as documentFilePath, t as contentDirPath } from "../../paths-CmVw5Cw2.mjs";
|
|
4
4
|
import "../../fs-DLbVB-Ek.mjs";
|
|
5
|
-
import "../../meta-manager-
|
|
6
|
-
export { applyChangesToWorktree, contentDirPath, contentFilePath, documentFilePath, metaFilePath, planContentDelete, planContentSave, planModelDelete, planModelSave };
|
|
5
|
+
import "../../meta-manager-B_Se183X.mjs";
|
|
6
|
+
export { applyChangesToWorktree, contentDirPath, contentFilePath, documentFilePath, metaFilePath, planContentDelete, planContentSave, planModelDelete, planModelSave, planVocabularyDelete, planVocabularySave };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as OverlayReader } from "../overlay-reader-
|
|
1
|
+
import { t as OverlayReader } from "../overlay-reader-CkU_pGXZ.mjs";
|
|
2
2
|
export { OverlayReader };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "../fs-DLbVB-Ek.mjs";
|
|
2
|
-
import { a as classifyFile, i as autoDetectSourceDirs, n as SCAN_EXTENSIONS, o as discoverFiles, r as SCAN_IGNORE_DIRS, t as MAX_SCAN_FILES } from "../scan-config-
|
|
2
|
+
import { a as classifyFile, i as autoDetectSourceDirs, n as SCAN_EXTENSIONS, o as discoverFiles, r as SCAN_IGNORE_DIRS, t as MAX_SCAN_FILES } from "../scan-config-Dx49nCqk.mjs";
|
|
3
3
|
export { MAX_SCAN_FILES, SCAN_EXTENSIONS, SCAN_IGNORE_DIRS, autoDetectSourceDirs, classifyFile, discoverFiles };
|
package/dist/core/scanner.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../fs-DLbVB-Ek.mjs";
|
|
2
|
-
import "../scan-config-
|
|
3
|
-
import { n as scanSummary, t as scanCandidates } from "../scanner-
|
|
4
|
-
import "../tsx-parser-
|
|
2
|
+
import "../scan-config-Dx49nCqk.mjs";
|
|
3
|
+
import { n as scanSummary, t as scanCandidates } from "../scanner-BSvXjfkp.mjs";
|
|
4
|
+
import "../tsx-parser-BvsK6lyG.mjs";
|
|
5
5
|
export { scanCandidates, scanSummary };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as RepoReader } from "../../index-
|
|
1
|
+
import { _ as RepoReader } from "../../index-BWbTJlXm.mjs";
|
|
2
2
|
import { EntryMeta, FieldDef, ModelDefinition, ValidationError, ValidationResult } from "@contentrain/types";
|
|
3
3
|
|
|
4
4
|
//#region src/core/validator/entry.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/core/validator/entry.ts","../../../src/core/validator/relation-integrity.ts","../../../src/core/validator/project.ts","../../../src/core/validator/schedule.ts"],"mappings":";;;;;;;AAUA;;;;UAAiB,iBAAA;EAMN;EAJT,UAAA,GAAa,MAAA,SAAe,MAAA;EAIJ;EAFxB,cAAA;EAFa;EAIb,MAAA,GAAS,eAAA;AAAA;;;;;AAgBX;;;;;;;;;iBAAgB,eAAA,CACd,IAAA,EAAM,MAAA,mBACN,MAAA,EAAQ,MAAA,SAAe,QAAA,GACvB,OAAA,UACA,MAAA,UACA,OAAA,WACA,GAAA,GAAM,iBAAA,GACL,gBAAA;;;;;;AA7BH;;;;;;;;;UCIiB,cAAA;EACf,MAAA;EACA,OAAA,GAAU,MAAA;AAAA;;KAIA,iBAAA,IACV,aAAA,UACA,YAAA,aACG,OAAA,CAAQ,MAAA;AAAA,UAEI,6BAAA;EDOD;ECLd,QAAA;;;;;;EAMA,aAAA,IACE,aAAA,UACA,YAAA,aACG,OAAA,CAAQ,cAAA;AAAA;;;;;;;;;;;;iBAcO,sBAAA,CACpB,IAAA,EAAM,MAAA,mBACN,MAAA,EAAQ,MAAA,SAAe,QAAA,GACvB,OAAA,UACA,MAAA,UACA,OAAA,sBACA,WAAA,EAAa,iBAAA,EACb,IAAA,GAAM,6BAAA,GACL,OAAA,CAAQ,eAAA;;;UCxCM,eAAA;EACf,KAAA;EACA,GAAA;AAAA;AAAA,UAGe,cAAA;EACf,KAAA;EACA,OAAA;IACE,MAAA;IACA,QAAA;IACA,OAAA;IACA,cAAA;IACA,eAAA;EAAA;EAEF,MAAA,EAAQ,eAAA;EACR,KAAA;AAAA;;;AFDF;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/core/validator/entry.ts","../../../src/core/validator/relation-integrity.ts","../../../src/core/validator/project.ts","../../../src/core/validator/schedule.ts"],"mappings":";;;;;;;AAUA;;;;UAAiB,iBAAA;EAMN;EAJT,UAAA,GAAa,MAAA,SAAe,MAAA;EAIJ;EAFxB,cAAA;EAFa;EAIb,MAAA,GAAS,eAAA;AAAA;;;;;AAgBX;;;;;;;;;iBAAgB,eAAA,CACd,IAAA,EAAM,MAAA,mBACN,MAAA,EAAQ,MAAA,SAAe,QAAA,GACvB,OAAA,UACA,MAAA,UACA,OAAA,WACA,GAAA,GAAM,iBAAA,GACL,gBAAA;;;;;;AA7BH;;;;;;;;;UCIiB,cAAA;EACf,MAAA;EACA,OAAA,GAAU,MAAA;AAAA;;KAIA,iBAAA,IACV,aAAA,UACA,YAAA,aACG,OAAA,CAAQ,MAAA;AAAA,UAEI,6BAAA;EDOD;ECLd,QAAA;;;;;;EAMA,aAAA,IACE,aAAA,UACA,YAAA,aACG,OAAA,CAAQ,cAAA;AAAA;;;;;;;;;;;;iBAcO,sBAAA,CACpB,IAAA,EAAM,MAAA,mBACN,MAAA,EAAQ,MAAA,SAAe,QAAA,GACvB,OAAA,UACA,MAAA,UACA,OAAA,sBACA,WAAA,EAAa,iBAAA,EACb,IAAA,GAAM,6BAAA,GACL,OAAA,CAAQ,eAAA;;;UCxCM,eAAA;EACf,KAAA;EACA,GAAA;AAAA;AAAA,UAGe,cAAA;EACf,KAAA;EACA,OAAA;IACE,MAAA;IACA,QAAA;IACA,OAAA;IACA,cAAA;IACA,eAAA;EAAA;EAEF,MAAA,EAAQ,eAAA;EACR,KAAA;AAAA;;;AFDF;;;;;;;;;;;;;iBEo5BsB,eAAA,CAAgB,WAAA,UAAqB,OAAA,GAAU,eAAA,GAAkB,OAAA,CAAQ,cAAA;AAAA,iBACzE,eAAA,CAAgB,MAAA,EAAQ,UAAA,EAAY,OAAA,GAAU,eAAA,GAAkB,OAAA,CAAQ,cAAA;;;;;;AF36B9F;;;;;iBGAgB,sBAAA,CACd,IAAA,EAAM,SAAA,EACN,GAAA;EAAO,KAAA;EAAe,MAAA;EAAgB,KAAA;EAAgB,IAAA;AAAA,GACtD,MAAA,EAAQ,eAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../fs-DLbVB-Ek.mjs";
|
|
2
|
-
import "../../meta-manager-
|
|
3
|
-
import "../../config-
|
|
4
|
-
import "../../model-manager-
|
|
5
|
-
import { i as validateContent, n as validateScheduleFields, r as checkRelationIntegrity, t as validateProject } from "../../validator-
|
|
2
|
+
import "../../meta-manager-B_Se183X.mjs";
|
|
3
|
+
import "../../config-VlRKRwAS.mjs";
|
|
4
|
+
import "../../model-manager-DgyKMjLN.mjs";
|
|
5
|
+
import { i as validateContent, n as validateScheduleFields, r as checkRelationIntegrity, t as validateProject } from "../../validator-0sJ9vh1j.mjs";
|
|
6
6
|
export { checkRelationIntegrity, validateContent, validateProject, validateScheduleFields };
|