@murumets-ee/content 0.29.0 → 0.29.2
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/client.d.mts +1 -1
- package/dist/entities/index.d.mts +1 -1
- package/dist/{index-C4hbhXsu.d.mts → index-kQaEm4Ft.d.mts} +43 -2
- package/dist/index-kQaEm4Ft.d.mts.map +1 -0
- package/dist/index.d.mts +1 -2
- package/package.json +6 -6
- package/dist/index-C4hbhXsu.d.mts.map +0 -1
- package/dist/types-CRnsF2Eb.d.mts +0 -43
- package/dist/types-CRnsF2Eb.d.mts.map +0 -1
package/dist/client.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as TranslationStatus, i as LocalePublishStatus, l as VersionEntry, n as DraftEntry, s as TranslationReport } from "./types-yRLOOCOn.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { s as FieldDiff } from "./index-kQaEm4Ft.mjs";
|
|
3
3
|
import { Entity, FieldConfig } from "@murumets-ee/entity";
|
|
4
4
|
import { Logger } from "@murumets-ee/core";
|
|
5
5
|
import { AdminClient, FindManyOptions, InferCreateInput, InferEntityDTO, InferUpdateInput } from "@murumets-ee/entity/admin";
|
|
@@ -97,6 +97,47 @@ type EntityCapability = 'drafts' | 'versions' | 'localeStatus' | 'translations';
|
|
|
97
97
|
*/
|
|
98
98
|
declare function entitySupports(entity: Entity, capability: EntityCapability): boolean;
|
|
99
99
|
//#endregion
|
|
100
|
+
//#region src/diff/types.d.ts
|
|
101
|
+
/**
|
|
102
|
+
* Diff result types for version comparison.
|
|
103
|
+
*/
|
|
104
|
+
/** A segment within a word-level text diff. */
|
|
105
|
+
interface DiffSegment {
|
|
106
|
+
type: 'equal' | 'add' | 'remove';
|
|
107
|
+
value: string;
|
|
108
|
+
}
|
|
109
|
+
/** Diff result for a single scalar field. */
|
|
110
|
+
interface FieldDiff {
|
|
111
|
+
field: string;
|
|
112
|
+
type: 'text' | 'number' | 'boolean' | 'date' | 'select' | 'media' | 'richtext' | 'json' | 'blockTree' | 'unknown';
|
|
113
|
+
from: unknown;
|
|
114
|
+
to: unknown;
|
|
115
|
+
/** Word-level diff segments (present for text/richtext/slug fields). */
|
|
116
|
+
segments?: DiffSegment[];
|
|
117
|
+
/** Block-level structural diff (present for `blockTree` fields). */
|
|
118
|
+
blockDiffs?: BlockDiffEntry[];
|
|
119
|
+
}
|
|
120
|
+
/** Status of a single block within a structural diff. */
|
|
121
|
+
type BlockDiffStatus = 'added' | 'removed' | 'moved' | 'changed' | 'unchanged';
|
|
122
|
+
/** Diff result for a single block within a `blockTree` field. */
|
|
123
|
+
interface BlockDiffEntry {
|
|
124
|
+
blockId: string;
|
|
125
|
+
blockType: string;
|
|
126
|
+
status: BlockDiffStatus;
|
|
127
|
+
fromIndex?: number | undefined;
|
|
128
|
+
toIndex?: number | undefined;
|
|
129
|
+
/** Per-prop diffs for changed blocks. */
|
|
130
|
+
propDiffs?: PropDiff[] | undefined;
|
|
131
|
+
}
|
|
132
|
+
/** Diff for a single prop within a changed block. */
|
|
133
|
+
interface PropDiff {
|
|
134
|
+
field: string;
|
|
135
|
+
from: unknown;
|
|
136
|
+
to: unknown;
|
|
137
|
+
/** Word-level segments for string props. */
|
|
138
|
+
segments?: DiffSegment[] | undefined;
|
|
139
|
+
}
|
|
140
|
+
//#endregion
|
|
100
141
|
//#region src/errors.d.ts
|
|
101
142
|
/**
|
|
102
143
|
* Domain errors for ContentClient + LockService.
|
|
@@ -144,5 +185,5 @@ declare class InvalidLocaleError extends Error {
|
|
|
144
185
|
constructor(locale: string, allowed: readonly string[]);
|
|
145
186
|
}
|
|
146
187
|
//#endregion
|
|
147
|
-
export { withOverrides as _,
|
|
148
|
-
//# sourceMappingURL=index-
|
|
188
|
+
export { VersionableFields as C, withOverrides as S, versionable as T, workflowable as _, BlockDiffStatus as a, WithOverridesFields as b, PropDiff as c, WORKFLOW_STATES as d, WORKFLOW_TRANSITIONS as f, isAllowedTransition as g, WorkflowableFields as h, BlockDiffEntry as i, EntityCapability as l, WorkflowTransitionError as m, EntityCapabilityError as n, DiffSegment as o, WorkflowState as p, InvalidLocaleError as r, FieldDiff as s, DraftNotFoundError as t, entitySupports as u, OverrideDirective as v, getVersionableOptions as w, hasWithOverrides as x, OverridesMap as y };
|
|
189
|
+
//# sourceMappingURL=index-kQaEm4Ft.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-kQaEm4Ft.d.mts","names":[],"sources":["../src/behaviors/versionable.ts","../src/behaviors/with-overrides.ts","../src/behaviors/workflowable.ts","../src/capabilities.ts","../src/diff/types.ts","../src/errors.ts"],"mappings":";;;;KAmBY,iBAAA;EACV,QAAA,EAAU,WAAA;IAAgB,QAAA;EAAA;EAC1B,YAAA,EAAc,SAAS;AAAA;AAAA,iBAQT,WAAA,CAAY,OAAA,GAAU,kBAAA,GAAqB,QAAA,CAAS,iBAAA;;;;iBAqDpD,qBAAA,CAAsB,SAAA,GAAY,QAAA,KAAa,QAAA,CAAS,kBAAA;;;;ACrCV;;;;KAQzD,iBAAA;EACC,IAAA;AAAA;EAEA,IAAA;EACA,KAAA,GAAQ,MAAA;EACR,MAAA,GAAS,MAAA,SAAe,MAAA;AAAA;EAExB,IAAA;EAAiB,KAAA,EAAO,MAAA;AAAA;AAAA,KAEzB,YAAA,GAAe,MAAM,SAAS,iBAAA;AAAA,KAEvB,mBAAA;EAcV,UAAA,EAAY,SAAS;AAAA;;;AAlBa;AAAA;iBAsLpB,aAAA,CAAA,GAAiB,QAAQ,CAAC,mBAAA;;;AApLU;AAEpD;;iBA8NgB,gBAAA,CACd,SAAA,EAAW,aAAa;EAAG,IAAA;AAAA,IAAiB,MAAA;;;cCjPjC,eAAA;AAAA,KACD,aAAA,WAAwB,eAAe;;;;AFmCuC;;;;cE1B7E,oBAAA;EAAA;;;;;;;;;iBAWG,mBAAA,CAAoB,IAAA,EAAM,aAAA,EAAe,EAAA,EAAI,aAAa;;;;;cA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
1
|
import { a as LockInfo, c as TranslationStatus, l as VersionEntry, n as DraftEntry, o as TranslationFieldStatus, r as LocaleConfig, s as TranslationReport, t as ContentConfig, u as VersionableOptions } from "./types-yRLOOCOn.mjs";
|
|
2
|
-
import { a as PropDiff, i as
|
|
3
|
-
import { _ as withOverrides, a as entitySupports, b as versionable, c as WorkflowState, d as isAllowedTransition, f as workflowable, g as hasWithOverrides, h as WithOverridesFields, i as EntityCapability, l as WorkflowTransitionError, m as OverridesMap, n as EntityCapabilityError, o as WORKFLOW_STATES, p as OverrideDirective, r as InvalidLocaleError, s as WORKFLOW_TRANSITIONS, t as DraftNotFoundError, u as WorkflowableFields, y as getVersionableOptions } from "./index-C4hbhXsu.mjs";
|
|
2
|
+
import { S as withOverrides, T as versionable, _ as workflowable, a as BlockDiffStatus, b as WithOverridesFields, c as PropDiff, d as WORKFLOW_STATES, f as WORKFLOW_TRANSITIONS, g as isAllowedTransition, h as WorkflowableFields, i as BlockDiffEntry, l as EntityCapability, m as WorkflowTransitionError, n as EntityCapabilityError, o as DiffSegment, p as WorkflowState, r as InvalidLocaleError, s as FieldDiff, t as DraftNotFoundError, u as entitySupports, v as OverrideDirective, w as getVersionableOptions, x as hasWithOverrides, y as OverridesMap } from "./index-kQaEm4Ft.mjs";
|
|
4
3
|
export { type BlockDiffEntry, type BlockDiffStatus, type ContentConfig, type DiffSegment, type DraftEntry, DraftNotFoundError, type EntityCapability, EntityCapabilityError, type FieldDiff, InvalidLocaleError, type LocaleConfig, type LockInfo, type OverrideDirective, type OverridesMap, type PropDiff, type TranslationFieldStatus, type TranslationReport, type TranslationStatus, type VersionEntry, type VersionableOptions, WORKFLOW_STATES, WORKFLOW_TRANSITIONS, type WithOverridesFields, type WorkflowState, WorkflowTransitionError, type WorkflowableFields, entitySupports, getVersionableOptions, hasWithOverrides, isAllowedTransition, versionable, withOverrides, workflowable };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@murumets-ee/content",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.2",
|
|
4
4
|
"license": "Elastic-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"drizzle-orm": "^0.45.2",
|
|
37
37
|
"server-only": "^0.0.1",
|
|
38
38
|
"zod": "^3.24.1",
|
|
39
|
-
"@murumets-ee/blocks": "0.29.
|
|
40
|
-
"@murumets-ee/core": "0.29.
|
|
41
|
-
"@murumets-ee/db": "0.29.
|
|
42
|
-
"@murumets-ee/entity": "0.29.
|
|
43
|
-
"@murumets-ee/logging": "0.29.
|
|
39
|
+
"@murumets-ee/blocks": "0.29.2",
|
|
40
|
+
"@murumets-ee/core": "0.29.2",
|
|
41
|
+
"@murumets-ee/db": "0.29.2",
|
|
42
|
+
"@murumets-ee/entity": "0.29.2",
|
|
43
|
+
"@murumets-ee/logging": "0.29.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/node": "^20.19.42",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-C4hbhXsu.d.mts","names":[],"sources":["../src/behaviors/versionable.ts","../src/behaviors/with-overrides.ts","../src/behaviors/workflowable.ts","../src/capabilities.ts","../src/errors.ts"],"mappings":";;;;KAmBY,iBAAA;EACV,QAAA,EAAU,WAAA;IAAgB,QAAA;EAAA;EAC1B,YAAA,EAAc,SAAS;AAAA;AAAA,iBAQT,WAAA,CAAY,OAAA,GAAU,kBAAA,GAAqB,QAAA,CAAS,iBAAA;;;;iBAqDpD,qBAAA,CAAsB,SAAA,GAAY,QAAA,KAAa,QAAA,CAAS,kBAAA;;;;ACrCV;;;;KAQzD,iBAAA;EACC,IAAA;AAAA;EAEA,IAAA;EACA,KAAA,GAAQ,MAAA;EACR,MAAA,GAAS,MAAA,SAAe,MAAA;AAAA;EAExB,IAAA;EAAiB,KAAA,EAAO,MAAA;AAAA;AAA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ff/types.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Diff result types for version comparison.
|
|
4
|
-
*/
|
|
5
|
-
/** A segment within a word-level text diff. */
|
|
6
|
-
interface DiffSegment {
|
|
7
|
-
type: 'equal' | 'add' | 'remove';
|
|
8
|
-
value: string;
|
|
9
|
-
}
|
|
10
|
-
/** Diff result for a single scalar field. */
|
|
11
|
-
interface FieldDiff {
|
|
12
|
-
field: string;
|
|
13
|
-
type: 'text' | 'number' | 'boolean' | 'date' | 'select' | 'media' | 'richtext' | 'json' | 'blockTree' | 'unknown';
|
|
14
|
-
from: unknown;
|
|
15
|
-
to: unknown;
|
|
16
|
-
/** Word-level diff segments (present for text/richtext/slug fields). */
|
|
17
|
-
segments?: DiffSegment[];
|
|
18
|
-
/** Block-level structural diff (present for `blockTree` fields). */
|
|
19
|
-
blockDiffs?: BlockDiffEntry[];
|
|
20
|
-
}
|
|
21
|
-
/** Status of a single block within a structural diff. */
|
|
22
|
-
type BlockDiffStatus = 'added' | 'removed' | 'moved' | 'changed' | 'unchanged';
|
|
23
|
-
/** Diff result for a single block within a `blockTree` field. */
|
|
24
|
-
interface BlockDiffEntry {
|
|
25
|
-
blockId: string;
|
|
26
|
-
blockType: string;
|
|
27
|
-
status: BlockDiffStatus;
|
|
28
|
-
fromIndex?: number | undefined;
|
|
29
|
-
toIndex?: number | undefined;
|
|
30
|
-
/** Per-prop diffs for changed blocks. */
|
|
31
|
-
propDiffs?: PropDiff[] | undefined;
|
|
32
|
-
}
|
|
33
|
-
/** Diff for a single prop within a changed block. */
|
|
34
|
-
interface PropDiff {
|
|
35
|
-
field: string;
|
|
36
|
-
from: unknown;
|
|
37
|
-
to: unknown;
|
|
38
|
-
/** Word-level segments for string props. */
|
|
39
|
-
segments?: DiffSegment[] | undefined;
|
|
40
|
-
}
|
|
41
|
-
//#endregion
|
|
42
|
-
export { PropDiff as a, FieldDiff as i, BlockDiffStatus as n, DiffSegment as r, BlockDiffEntry as t };
|
|
43
|
-
//# sourceMappingURL=types-CRnsF2Eb.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-CRnsF2Eb.d.mts","names":[],"sources":["../src/diff/types.ts"],"mappings":";;AAKA;;;UAAiB,WAAA;EACf,IAAA;EACA,KAAK;AAAA;;UAIU,SAAA;EACf,KAAA;EACA,IAAA;EAWA,IAAA;EACA,EAAA;EAEA;EAAA,QAAA,GAAW,WAAA;EAEX;EAAA,UAAA,GAAa,cAAc;AAAA;AAAA;AAAA,KAIjB,eAAA;;UAGK,cAAA;EACf,OAAA;EACA,SAAA;EACA,MAAA,EAAQ,eAAA;EACR,SAAA;EACA,OAAA;EAEoB;EAApB,SAAA,GAAY,QAAQ;AAAA;;UAIL,QAAA;EACf,KAAA;EACA,IAAA;EACA,EAAA;EAPY;EASZ,QAAA,GAAW,WAAW;AAAA"}
|