@g1cloud/entity-modeler-next 5.2.51 → 5.2.52
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/agent/resolver.d.ts +22 -3
- package/dist/core/embedGraph.d.ts +19 -0
- package/dist/editor/association.d.ts +5 -0
- package/dist/entity-modeler-next.css +1 -1
- package/dist/entity-modeler.js +8898 -8806
- package/dist/entity-modeler.umd.cjs +34 -34
- package/dist/i18n/ko.d.ts +2 -0
- package/package.json +1 -1
package/dist/agent/resolver.d.ts
CHANGED
|
@@ -122,15 +122,34 @@ export type ResolveError = {
|
|
|
122
122
|
*
|
|
123
123
|
* ★**연쇄 임베드(임베더블 → «다른» 임베더블)와 갈라야 한다** — 그쪽은 **정당하고 실재한다**
|
|
124
124
|
* (프로덕션 v2 43문서 실측: 연쇄 **3** · 자기 임베드 **0** — `ApplyPriceDcPromo.dcRule → PromoDcRule` 등).
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
125
|
+
*
|
|
126
|
+
* ★★**판정은 이제 `core/embedGraph.findEmbedCycle` 이 한다** — GUI 와 «같은 술어»다. 종전엔 이 자리가
|
|
127
|
+
* `from.modelId === to.modelId` 단순 비교였고 GUI 는 임베더블↔임베더블을 통째로 무시해서, **두 경로가
|
|
128
|
+
* 서로 다른 것을 막고 둘 다 간접 순환(A→B→A)을 못 봤다**(자기 비교는 1단만 본다). 그 GUI 쪽 차단은
|
|
129
|
+
* 해제됐고(연쇄는 정당), 남은 거부가 이 코드와 아래 `embed-cycle-unsupported` 둘이다.
|
|
128
130
|
*/
|
|
129
131
|
| {
|
|
130
132
|
code: 'embed-self-unsupported';
|
|
131
133
|
opIndex: number;
|
|
132
134
|
handle: AssocHandle;
|
|
133
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* 임베드가 **순환**을 이룬다 — 자기 임베드의 «간접» 형태(A 가 B 를 품고 B 가 A 를 품는다).
|
|
138
|
+
*
|
|
139
|
+
* ★**코드를 자기 임베드와 가르는 이유**는 호출자가 **고칠 자리가 다르기** 때문이다: 자기 임베드는
|
|
140
|
+
* 보낸 op 자체가 잘못이지만, 순환은 **이미 저장된 반대 방향 임베드**가 상대편이라 그쪽을 먼저 정리해야
|
|
141
|
+
* 한다. 그래서 `path` 에 순환을 이루는 엔터티 **이름**을 순서대로 담는다(모호할 때 사람이 고를 수 있는
|
|
142
|
+
* 지목 수단 — modelId 나열만으론 어느 자리를 지울지 못 고른다).
|
|
143
|
+
*
|
|
144
|
+
* ⚠️**같은 배치 안에서 나눠 보내는 우회도 막는다** — `A→B` 와 `B→A` 를 두 op 으로 보내면 각 op 은
|
|
145
|
+
* 저장 전 모델만 보고 무해해 보인다. 선행 op 이 만든 간선을 `pending` 으로 함께 넘겨 판정한다.
|
|
146
|
+
*/
|
|
147
|
+
| {
|
|
148
|
+
code: 'embed-cycle-unsupported';
|
|
149
|
+
opIndex: number;
|
|
150
|
+
handle: AssocHandle;
|
|
151
|
+
path: string[];
|
|
152
|
+
}
|
|
134
153
|
/**
|
|
135
154
|
* `association.add` 의 end 중 하나가 `SERIALIZED_TYPE` — **거부 사유가 임베더블과 다르다**.
|
|
136
155
|
*
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Entity, ModelId } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* 아직 모델에 반영되지 않은 임베드 간선 — AI 배치의 **같은 배치 선행 op** 산출분.
|
|
4
|
+
*
|
|
5
|
+
* ★이게 없으면 한 배치 안에서 `A→B`·`B→A` 를 나눠 보내 순환을 만들 수 있다(각 op 은 저장 전 모델만
|
|
6
|
+
* 보므로 혼자서는 무해해 보인다). resolver 가 `addedAttributes` 에서 뽑아 넘긴다.
|
|
7
|
+
*/
|
|
8
|
+
export interface PendingEmbedEdge {
|
|
9
|
+
ownerId: ModelId;
|
|
10
|
+
embeddableRef: ModelId;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* `ownerId` 가 `embeddableId` 를 임베드하면 순환이 되는가 — 되면 **그 순환 경로**, 아니면 `null`.
|
|
14
|
+
*
|
|
15
|
+
* 경로는 `findIdentifyingCycles`(validation)의 관례를 따라 **닫힘 반복 없이 멤버만** 담는다:
|
|
16
|
+
* 자기 임베드는 `[A]`, `A→B→A` 는 `[A, B]`. 호출자는 `!= null` 로 거부하고, 필요하면 그 경로를
|
|
17
|
+
* 메시지·에러 payload 로 쓴다(«고칠 수 있는 자리»를 지목하기 위한 정보다).
|
|
18
|
+
*/
|
|
19
|
+
export declare function findEmbedCycle(entities: readonly Entity[], ownerId: ModelId, embeddableId: ModelId, pending?: readonly PendingEmbedEdge[]): ModelId[] | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { Command, EditorState } from '../command/types';
|
|
3
|
+
import { Translator } from '../i18n';
|
|
3
4
|
import { EditorController } from './controller';
|
|
4
5
|
import { ModelId } from '../core/types';
|
|
5
6
|
/** 이 축이 팩토리 클로저에서 쓰는 것 전부. 늘어나면 여기 선언이 먼저 늘어난다(= 의존 인벤토리). */
|
|
@@ -14,5 +15,9 @@ export interface AssociationContext {
|
|
|
14
15
|
gateEntityLocked: (id: ModelId) => boolean;
|
|
15
16
|
/** 잠금 게이트(관계) — 양끝 중 하나라도 잠기면 차단(그 의미론의 단일 출처). */
|
|
16
17
|
gateAssocLocked: (assocId: ModelId) => boolean;
|
|
18
|
+
/** 번역 — 아래 임베드 순환 차단의 «이유» 안내에 쓴다(엔티티·속성 축의 구조 차단 안내와 같은 짝). */
|
|
19
|
+
t: Translator;
|
|
20
|
+
/** 구조 차단 안내 — 무음 차단은 "고장"으로 읽힌다(VE-2 규율 · 직렬화 타입 분기의 실사용 보고 선례). */
|
|
21
|
+
emitGateNotice: (text: string) => void;
|
|
17
22
|
}
|
|
18
23
|
export declare function createAssociationApi(ctx: AssociationContext): Pick<EditorController, 'addAssociation' | 'addEmbedAssociation' | 'setEmbedCardinality' | 'removeAssociation' | 'setAssociationIdentifying' | 'updateAssociationEnd'>;
|