@patterkit/ops 0.3.5 → 0.4.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/index.d.ts +25 -5
- package/dist/index.js +1873 -1799
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -82,15 +82,13 @@ interface ValidateResult {
|
|
|
82
82
|
staleBundles: HygieneIssue[];
|
|
83
83
|
/** Lingering `.patterconflict` sidecars - an unresolved merge (patter-merge.md §3.6). */
|
|
84
84
|
unresolvedMerges: HygieneIssue[];
|
|
85
|
+
/** Patter shards on disk that the project does NOT contain - see `orphanShards`. */
|
|
86
|
+
orphans: HygieneIssue[];
|
|
85
87
|
ok: boolean;
|
|
86
88
|
}
|
|
87
89
|
/** Run structural + expression + interpolation + hygiene + bundle-staleness + merge validation. */
|
|
88
90
|
declare function runValidate(loaded: LoadedProject): ValidateResult;
|
|
89
91
|
|
|
90
|
-
/** Compile a loaded project to the runtime bundle, applying its build localisation mode (spec §11):
|
|
91
|
-
* "embedded" (default) keeps every locale's strings inline; "ids" strips them so the runtime emits beat
|
|
92
|
-
* IDs (the game localises). `sourceDebug` keeps only the SOURCE locale, embedded for debug playback and
|
|
93
|
-
* flagged so the runtime warns it is not a shippable build. */
|
|
94
92
|
declare function runExport(loaded: LoadedProject): Bundle;
|
|
95
93
|
/** Compile WITHOUT the localisation-mode transform - the full bundle with every locale inline. Used where
|
|
96
94
|
* the host needs all strings regardless of build mode (e.g. Patterpad's Play window + Export Localisation). */
|
|
@@ -797,6 +795,24 @@ declare class UnsupportedMergeError extends Error {
|
|
|
797
795
|
}
|
|
798
796
|
type Obj = Record<string, unknown>;
|
|
799
797
|
/** Detect the merge type from a file's `schema` tag. */
|
|
798
|
+
/** The conflict sidecar's extension. One constant, because three callers now look for it. */
|
|
799
|
+
declare const CONFLICT_SIDECAR = ".patterconflict";
|
|
800
|
+
/**
|
|
801
|
+
* Turn a set of lingering `.patterconflict` paths into the issues that STOP work.
|
|
802
|
+
*
|
|
803
|
+
* The rule is patter-merge.md §3.6: a merged shard is valid canonical source with conflicted values
|
|
804
|
+
* resolved provisionally to OURS, so an unresolved merge cannot be allowed to reach CI or an export.
|
|
805
|
+
* That was stated in the design and enforced in exactly one place - `validate` - while `export` and
|
|
806
|
+
* `pack` never looked. Pack is the worse of the two: a pack carries shards but NOT sidecars, so
|
|
807
|
+
* sending one hands the recipient your side of a disagreement with nothing to say it was in dispute.
|
|
808
|
+
*
|
|
809
|
+
* It lives here, beside the sentence it enforces, because three call sites each re-deciding what a
|
|
810
|
+
* lingering sidecar means is how the rule drifted out of the code in the first place.
|
|
811
|
+
*/
|
|
812
|
+
declare function sidecarIssues(sidecarPaths: readonly string[]): Array<{
|
|
813
|
+
file: string;
|
|
814
|
+
message: string;
|
|
815
|
+
}>;
|
|
800
816
|
declare function detectMergeType(file: {
|
|
801
817
|
schema?: unknown;
|
|
802
818
|
}): MergeFileType;
|
|
@@ -804,6 +820,10 @@ declare function detectMergeType(file: {
|
|
|
804
820
|
declare function runMerge(base: Obj, ours: Obj, theirs: Obj, opts?: {
|
|
805
821
|
type?: MergeFileType;
|
|
806
822
|
}): MergeResult;
|
|
823
|
+
/** Every authoring key with a strategy of its own above. A key NOT here falls to the plain 3-way, which
|
|
824
|
+
* is coarse but never lossy; the set exists so the fallback does not re-merge what was already merged
|
|
825
|
+
* (an empty result from `setIf` must not be reconsidered as "unhandled"). */
|
|
826
|
+
declare const AUTHORING_HANDLED: Set<string>;
|
|
807
827
|
|
|
808
828
|
/** A document entry whose path escapes the target dir (rejected). */
|
|
809
829
|
declare class UnsafeEntryError extends Error {
|
|
@@ -887,4 +907,4 @@ declare function classesForChannel(classes: DocumentationClass[], channel: strin
|
|
|
887
907
|
*/
|
|
888
908
|
declare function resolveDocumentation(loaded: LoadedProject, channel: string): Map<string, DocLine[]>;
|
|
889
909
|
|
|
890
|
-
export { type ApplyStats, type BundlePosture, type CharacterReport, type Conflict, type ConflictKind, type CoverageAsyncHooks, type CoverageBeat, type CoverageHooks, type CoverageOptions, type CoverageReport, type DocumentManifest, type FormatResult, type HygieneIssue, type InitOptions, type InitResult, type InitVcs, type LoadedProject, type LocCatalog, type LocEntry, type LocaleReport, type MergeFileType, type MergeResult, type MergedShard, type PlannedWrite, type PlayEvent, type PlayOptions, type PlayOutcome, type PlayResult, type ProvenanceCheck, type ReplaceHit, type ReplaceOptions, type ReplacePlan, type ReportData, type ReportTotals, type ResolveEntry, SHARD_EXTENSIONS, type SceneReport, type ScriptDoc, type ScriptElement, type SearchFocus, type UnpackMergeResult, UnsafeEntryError, UnsupportedMergeError, type ValidateResult, type VoiceLine, type VoiceScript, type VoicedCounts, type WebExport, type WrittenCounts, applyLoc, applySceneOrder, applyWrites, bundleOutputPath, catalogToJson, catalogToPo, catalogToXlsx, classesForChannel, detectMergeType, extractLoc, findProjectFile, isUnsafeEntry, jsonToCatalog, listProjectTags, loadProject, loadProjectLanding, poToCatalog, proposeCoverageDrivers, renderCoverageText, renderPlay, renderReportText, resolveDocumentation, resolveStart, runCoverage, runCoverageAsync, runExport, runExportFull, runExportHtml, runExportWeb, runFormat, runInit, runMerge, runPack, runPlay, runPropertyUsage, runReplace, runReport, runReportXlsx, runResolve, runScriptDoc, runSearch, runStatusBrowse, runTagBrowse, runUnpack, runUnpackMerge, runValidate, runVoiceScript, scanAudioStatus, sceneIdForShard, scriptToDocx, scriptToPdf, vcsConfigWrites, voiceScriptToXlsx, xlsxToCatalog };
|
|
910
|
+
export { AUTHORING_HANDLED, type ApplyStats, type BundlePosture, CONFLICT_SIDECAR, type CharacterReport, type Conflict, type ConflictKind, type CoverageAsyncHooks, type CoverageBeat, type CoverageHooks, type CoverageOptions, type CoverageReport, type DocumentManifest, type FormatResult, type HygieneIssue, type InitOptions, type InitResult, type InitVcs, type LoadedProject, type LocCatalog, type LocEntry, type LocaleReport, type MergeFileType, type MergeResult, type MergedShard, type PlannedWrite, type PlayEvent, type PlayOptions, type PlayOutcome, type PlayResult, type ProvenanceCheck, type ReplaceHit, type ReplaceOptions, type ReplacePlan, type ReportData, type ReportTotals, type ResolveEntry, SHARD_EXTENSIONS, type SceneReport, type ScriptDoc, type ScriptElement, type SearchFocus, type UnpackMergeResult, UnsafeEntryError, UnsupportedMergeError, type ValidateResult, type VoiceLine, type VoiceScript, type VoicedCounts, type WebExport, type WrittenCounts, applyLoc, applySceneOrder, applyWrites, bundleOutputPath, catalogToJson, catalogToPo, catalogToXlsx, classesForChannel, detectMergeType, extractLoc, findProjectFile, isUnsafeEntry, jsonToCatalog, listProjectTags, loadProject, loadProjectLanding, poToCatalog, proposeCoverageDrivers, renderCoverageText, renderPlay, renderReportText, resolveDocumentation, resolveStart, runCoverage, runCoverageAsync, runExport, runExportFull, runExportHtml, runExportWeb, runFormat, runInit, runMerge, runPack, runPlay, runPropertyUsage, runReplace, runReport, runReportXlsx, runResolve, runScriptDoc, runSearch, runStatusBrowse, runTagBrowse, runUnpack, runUnpackMerge, runValidate, runVoiceScript, scanAudioStatus, sceneIdForShard, scriptToDocx, scriptToPdf, sidecarIssues, vcsConfigWrites, voiceScriptToXlsx, xlsxToCatalog };
|