@dialecte/scl 0.3.15 → 0.3.17
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/{hooks-CLIa7kxj.js → hooks-BBGXNK0x.js} +1916 -1292
- package/dist/v2019C1/config/dialecte.config.d.ts +2 -2
- package/dist/v2019C1/config/dialecte.config.d.ts.map +1 -1
- package/dist/v2019C1/constants/topology-tags.d.ts +7 -0
- package/dist/v2019C1/constants/topology-tags.d.ts.map +1 -1
- package/dist/v2019C1/extensions/clean-up/transaction/orphan-lnode-bindings.d.ts +7 -2
- package/dist/v2019C1/extensions/clean-up/transaction/orphan-lnode-bindings.d.ts.map +1 -1
- package/dist/v2019C1/extensions/identity/index.d.ts +2 -0
- package/dist/v2019C1/extensions/identity/index.d.ts.map +1 -1
- package/dist/v2019C1/extensions/identity/query/index.d.ts +3 -0
- package/dist/v2019C1/extensions/identity/query/index.d.ts.map +1 -0
- package/dist/v2019C1/extensions/identity/query/resolve-identity.d.ts +18 -0
- package/dist/v2019C1/extensions/identity/query/resolve-identity.d.ts.map +1 -0
- package/dist/v2019C1/extensions/identity/query/resolve-identity.types.d.ts +19 -0
- package/dist/v2019C1/extensions/identity/query/resolve-identity.types.d.ts.map +1 -0
- package/dist/v2019C1/extensions/identity/transaction/write-identity.d.ts +3 -0
- package/dist/v2019C1/extensions/identity/transaction/write-identity.d.ts.map +1 -1
- package/dist/v2019C1/extensions/identity/transaction/write-identity.types.d.ts +1 -1
- package/dist/v2019C1/extensions/identity/transaction/write-identity.types.d.ts.map +1 -1
- package/dist/v2019C1/extensions/index.d.ts +1 -0
- package/dist/v2019C1/extensions/index.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/apply/apply.d.ts +2 -2
- package/dist/v2019C1/extensions/lifecycle/apply/apply.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/apply/apply.types.d.ts +4 -0
- package/dist/v2019C1/extensions/lifecycle/apply/apply.types.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/contract.types.d.ts +20 -1
- package/dist/v2019C1/extensions/lifecycle/contract.types.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/cross-cutting/finalize-cloned-identity.d.ts +24 -0
- package/dist/v2019C1/extensions/lifecycle/cross-cutting/finalize-cloned-identity.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/cross-cutting/index.d.ts +1 -0
- package/dist/v2019C1/extensions/lifecycle/cross-cutting/index.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/engine/correlate.d.ts +30 -0
- package/dist/v2019C1/extensions/lifecycle/engine/correlate.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/engine/decide.d.ts +9 -2
- package/dist/v2019C1/extensions/lifecycle/engine/decide.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/engine/diff.d.ts +7 -1
- package/dist/v2019C1/extensions/lifecycle/engine/diff.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/engine/diff.types.d.ts +9 -1
- package/dist/v2019C1/extensions/lifecycle/engine/diff.types.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/engine/group.d.ts +1 -1
- package/dist/v2019C1/extensions/lifecycle/engine/match-child.d.ts +31 -0
- package/dist/v2019C1/extensions/lifecycle/engine/match-child.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/engine/match-key.d.ts +26 -0
- package/dist/v2019C1/extensions/lifecycle/engine/match-key.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/engine/reconcile.d.ts +8 -2
- package/dist/v2019C1/extensions/lifecycle/engine/reconcile.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/engine/reference-match.d.ts +25 -0
- package/dist/v2019C1/extensions/lifecycle/engine/reference-match.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/extract/transaction/post-extraction-cleanup.d.ts +3 -3
- package/dist/v2019C1/extensions/lifecycle/extract/transaction/ssd.d.ts +6 -4
- package/dist/v2019C1/extensions/lifecycle/extract/transaction/ssd.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/index.d.ts +1 -1
- package/dist/v2019C1/extensions/lifecycle/instance/find-instance.d.ts +30 -9
- package/dist/v2019C1/extensions/lifecycle/instance/find-instance.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/instance/index.d.ts +1 -1
- package/dist/v2019C1/extensions/lifecycle/instance/index.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/asd.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/asd.types.d.ts +6 -0
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/asd.types.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/fsd.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/fsd.types.d.ts +6 -0
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/fsd.types.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/index.d.ts +2 -0
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/index.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/ssd.d.ts +19 -0
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/ssd.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/ssd.types.d.ts +25 -0
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/ssd.types.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/layers/topology/clone-topology-content.d.ts +15 -12
- package/dist/v2019C1/extensions/lifecycle/layers/topology/clone-topology-content.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/layers/topology/clone-topology-content.types.d.ts +14 -0
- package/dist/v2019C1/extensions/lifecycle/layers/topology/clone-topology-content.types.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/layers/topology/ensure-topology-frame.d.ts +25 -0
- package/dist/v2019C1/extensions/lifecycle/layers/topology/ensure-topology-frame.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/layers/topology/ensure-topology-frame.types.d.ts +22 -0
- package/dist/v2019C1/extensions/lifecycle/layers/topology/ensure-topology-frame.types.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/layers/topology/index.d.ts +5 -0
- package/dist/v2019C1/extensions/lifecycle/layers/topology/index.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/layers/topology/reconcile-topology-frame.d.ts +29 -0
- package/dist/v2019C1/extensions/lifecycle/layers/topology/reconcile-topology-frame.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/layers/topology/scope-content.d.ts +15 -0
- package/dist/v2019C1/extensions/lifecycle/layers/topology/scope-content.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/layers/topology/scope-content.types.d.ts +8 -0
- package/dist/v2019C1/extensions/lifecycle/layers/topology/scope-content.types.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/report/presentation-scope.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/report/query/index.d.ts +1 -0
- package/dist/v2019C1/extensions/lifecycle/report/query/index.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/report/query/report-asd.d.ts +1 -0
- package/dist/v2019C1/extensions/lifecycle/report/query/report-asd.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/report/query/report-fsd.d.ts +2 -1
- package/dist/v2019C1/extensions/lifecycle/report/query/report-fsd.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/report/query/report-function-satellites.d.ts +1 -1
- package/dist/v2019C1/extensions/lifecycle/report/query/report-function.d.ts +1 -1
- package/dist/v2019C1/extensions/lifecycle/report/query/report-ssd.d.ts +22 -0
- package/dist/v2019C1/extensions/lifecycle/report/query/report-ssd.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/report/query/report-topology-frame.d.ts +23 -0
- package/dist/v2019C1/extensions/lifecycle/report/query/report-topology-frame.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/report/query/satellite-companions.d.ts +1 -1
- package/dist/v2019C1/extensions/lifecycle/report/query/satellite-companions.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/report/report.d.ts +1 -1
- package/dist/v2019C1/extensions/lifecycle/report/report.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/scenario.d.ts +1 -2
- package/dist/v2019C1/extensions/lifecycle/scenario.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/transplant/transaction/primitives/merge-children-into.d.ts +5 -0
- package/dist/v2019C1/extensions/lifecycle/transplant/transaction/primitives/merge-children-into.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/update/transaction/asd.d.ts +3 -1
- package/dist/v2019C1/extensions/lifecycle/update/transaction/asd.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/update/transaction/cross-cutting-satellites.d.ts +4 -3
- package/dist/v2019C1/extensions/lifecycle/update/transaction/cross-cutting-satellites.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/update/transaction/fsd.d.ts +3 -2
- package/dist/v2019C1/extensions/lifecycle/update/transaction/fsd.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/update/transaction/function-satellites.d.ts +2 -2
- package/dist/v2019C1/extensions/lifecycle/update/transaction/function-satellites.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/update/transaction/index.d.ts +1 -0
- package/dist/v2019C1/extensions/lifecycle/update/transaction/index.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/update/transaction/satellite-reconcile.d.ts +2 -1
- package/dist/v2019C1/extensions/lifecycle/update/transaction/satellite-reconcile.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/update/transaction/ssd.d.ts +36 -0
- package/dist/v2019C1/extensions/lifecycle/update/transaction/ssd.d.ts.map +1 -0
- package/dist/v2019C1/hooks/after-standardized-record/uuid-attribute.d.ts.map +1 -1
- package/dist/v2019C1/hooks/io/io-hooks.d.ts +2 -2
- package/dist/v2019C1/index.js +10 -10
- package/dist/v2019C1/test/assert-valid-scl-xml.d.ts +24 -0
- package/dist/v2019C1/test/assert-valid-scl-xml.d.ts.map +1 -0
- package/dist/v2019C1/test/assert-valid-scl-xml.types.d.ts +45 -0
- package/dist/v2019C1/test/assert-valid-scl-xml.types.d.ts.map +1 -0
- package/dist/v2019C1/test/hydrated-test.d.ts +9 -1
- package/dist/v2019C1/test/hydrated-test.d.ts.map +1 -1
- package/dist/v2019C1/test.js +113 -19
- package/package.json +4 -2
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Config } from '../../../config';
|
|
2
|
+
import { AnyTreeRecord } from '@dialecte/core';
|
|
3
|
+
import type * as Core from '@dialecte/core';
|
|
4
|
+
/** A read surface shared by the diff (Query) and reconcile (Transaction) sides. */
|
|
5
|
+
type Reader = Core.Query<Config> | Core.Transaction<Config>;
|
|
6
|
+
/**
|
|
7
|
+
* Find the instance child that corresponds to a source child — the ONE matcher shared by the diff
|
|
8
|
+
* (report) and reconcile (apply) sides, so both pair children identically:
|
|
9
|
+
* - **Identified** elements match by `templateUuid` lineage (the source `uuid`) via `index`, guarded
|
|
10
|
+
* to the same tag: a placeholder `templateUuid` smeared across unrelated tags (real .ssd files
|
|
11
|
+
* reuse one dummy value on Substation, LNode, ...) can coincide with a source `uuid`; a cross-type
|
|
12
|
+
* hit is a collision, not a lineage.
|
|
13
|
+
* - A uuid-less **REFERENCE** (e.g. `FunctionRef`) matches by its reference IDENTITY — the target
|
|
14
|
+
* `*Uuid` it points to, mapped back to template space — never by tag position; with a name-space
|
|
15
|
+
* fallback for projects authored with placeholder `templateUuid`s. `refsAlwaysAdded` forces a fresh
|
|
16
|
+
* instantiation's refs to surface as `added` instead of matching a prior instance's ref.
|
|
17
|
+
* - Any other uuid-less element (e.g. `FunctionRoleContent`) matches a same-tag sibling by position.
|
|
18
|
+
*
|
|
19
|
+
* The source side reads raw identities; the candidate (target) side is normalized to template space —
|
|
20
|
+
* that role split is internal here, so callers never pass a space/`mapToTemplate` flag.
|
|
21
|
+
*/
|
|
22
|
+
export declare function matchChild(sourceQuery: Reader, params: {
|
|
23
|
+
targetQuery: Reader;
|
|
24
|
+
sourceChild: AnyTreeRecord;
|
|
25
|
+
instanceParent: AnyTreeRecord;
|
|
26
|
+
index: Map<string, AnyTreeRecord>;
|
|
27
|
+
matchedInstanceIds: ReadonlySet<string>;
|
|
28
|
+
refsAlwaysAdded?: boolean;
|
|
29
|
+
}): Promise<AnyTreeRecord | undefined>;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=match-child.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match-child.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/engine/match-child.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAEnD,mFAAmF;AACnF,KAAK,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;AAE3D;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,UAAU,CAC/B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE;IACP,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,aAAa,CAAA;IAC1B,cAAc,EAAE,aAAa,CAAA;IAC7B,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IACjC,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACvC,eAAe,CAAC,EAAE,OAAO,CAAA;CACzB,GACC,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CA+CpC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Config } from '../../../config';
|
|
2
|
+
import { MatchKey } from '../scenario';
|
|
3
|
+
import { AnyTreeRecord } from '@dialecte/core';
|
|
4
|
+
import type * as Core from '@dialecte/core';
|
|
5
|
+
/** A read surface shared by the diff (Query) and reconcile (Transaction) sides. */
|
|
6
|
+
type Reader = Core.Query<Config> | Core.Transaction<Config>;
|
|
7
|
+
/**
|
|
8
|
+
* Index an instance subtree by its `matchKey` attribute (`templateUuid`, or `uuid` for fork), so a
|
|
9
|
+
* source element's `uuid` can find its instance in O(1) by lineage. Shared verbatim by the diff
|
|
10
|
+
* (report) and reconcile (apply) sides so both derive the same key → element map.
|
|
11
|
+
*/
|
|
12
|
+
export declare function indexByMatchKey(reader: Reader, params: {
|
|
13
|
+
node: AnyTreeRecord;
|
|
14
|
+
index: Map<string, AnyTreeRecord>;
|
|
15
|
+
matchKey: MatchKey;
|
|
16
|
+
}): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Collect every `uuid` in a source subtree — the set of template lineages that still exist, used to
|
|
19
|
+
* decide which instance elements were removed from the template. Shared by both engine sides.
|
|
20
|
+
*/
|
|
21
|
+
export declare function collectUuids(reader: Reader, params: {
|
|
22
|
+
node: AnyTreeRecord;
|
|
23
|
+
out: Set<string>;
|
|
24
|
+
}): Promise<void>;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=match-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match-key.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/engine/match-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAA;AACvE,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAEnD,mFAAmF;AACnF,KAAK,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;AAE3D;;;;GAIG;AACH,wBAAsB,eAAe,CACpC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAA;CAAE,GACpF,OAAO,CAAC,IAAI,CAAC,CAKf;AAED;;;GAGG;AACH,wBAAsB,YAAY,CACjC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAE,GAC/C,OAAO,CAAC,IAAI,CAAC,CAKf"}
|
|
@@ -6,7 +6,7 @@ import { MatchKey } from '../scenario';
|
|
|
6
6
|
import { AnyRefOrRecord } from '@dialecte/core';
|
|
7
7
|
import type * as Core from '@dialecte/core';
|
|
8
8
|
/**
|
|
9
|
-
* Engine apply-core
|
|
9
|
+
* Engine apply-core: reconcile an updated template subtree
|
|
10
10
|
* (`sourceRootRef`) ONTO an existing instance (`instanceRootRef`) instead of
|
|
11
11
|
* duplicating it. Elements match by `templateUuid` (= the source element's
|
|
12
12
|
* `uuid`, immutable across template versions):
|
|
@@ -42,5 +42,11 @@ export declare function reconcile(tx: Core.Transaction<Config>, params: {
|
|
|
42
42
|
matchKey?: MatchKey;
|
|
43
43
|
/** Identity write mode for added elements. `stamp-template` (default) or `keep` (fork). */
|
|
44
44
|
identityMode?: IdentityMode;
|
|
45
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Child tags to treat as BOUNDARIES: their subtrees are left untouched (not reconciled,
|
|
47
|
+
* added, or deleted) because another pass owns them (e.g. the topology frame reconcile
|
|
48
|
+
* delegates Application/Function to the fn/app cascade).
|
|
49
|
+
*/
|
|
50
|
+
omit?: readonly string[];
|
|
51
|
+
}): Promise<Map<string, AnyRefOrRecord>>;
|
|
46
52
|
//# sourceMappingURL=reconcile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reconcile.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/engine/reconcile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reconcile.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/engine/reconcile.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACrE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAA;AACpF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gEAAgE,CAAA;AAClG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAA;AACvE,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,gBAAgB,CAAA;AAEnE;;;;;;;;;;;;;;;;GAgBG;AAEH,wBAAsB,SAAS,CAC9B,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAC5B,MAAM,EAAE;IACP,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/B,aAAa,EAAE,cAAc,CAAA;IAC7B,eAAe,EAAE,cAAc,CAAA;IAC/B;;;OAGG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAA;IACtB;;;OAGG;IACH,SAAS,CAAC,EAAE,kBAAkB,CAAA;IAC9B,gFAAgF;IAChF,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IACrC,qFAAqF;IACrF,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,2FAA2F;IAC3F,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CACxB,GACC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAsDtC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Config } from '../../../config';
|
|
2
|
+
import { AnyTreeRecord } from '@dialecte/core';
|
|
3
|
+
import type * as Core from '@dialecte/core';
|
|
4
|
+
/** A read surface shared by the diff (Query) and reconcile (Transaction) sides. */
|
|
5
|
+
type Reader = Core.Query<Config> | Core.Transaction<Config>;
|
|
6
|
+
/**
|
|
7
|
+
* The reference identity of a link element: the set of target `*Uuid` attributes it carries, as a
|
|
8
|
+
* stable string. When `mapToTemplate` is set (the INSTANCE/target side), each target uuid is resolved
|
|
9
|
+
* to its element's `templateUuid` so an instantiated (remapped) reference compares equal to the
|
|
10
|
+
* template reference it came from. The SOURCE side passes the raw uuids, which are already template
|
|
11
|
+
* space. Returns `undefined` when no uuid attribute is set (unresolved ref), so matching falls back to
|
|
12
|
+
* position. Lineage-aware by design — this is a matching helper, not an agnostic identity read.
|
|
13
|
+
*/
|
|
14
|
+
export declare function referenceIdentity(query: Reader, node: AnyTreeRecord, options: {
|
|
15
|
+
mapToTemplate: boolean;
|
|
16
|
+
}): Promise<string | undefined>;
|
|
17
|
+
/**
|
|
18
|
+
* Fallback identity for a reference node: the NAME of each resolved target element. Stable across
|
|
19
|
+
* instantiate even when the project uses placeholder `templateUuid`s that are not the source
|
|
20
|
+
* element's own `uuid` (so the uuid round-trip in {@link referenceIdentity} cannot bridge the two
|
|
21
|
+
* sides). Undefined when no target resolves to a named element.
|
|
22
|
+
*/
|
|
23
|
+
export declare function referenceNameIdentity(query: Reader, node: AnyTreeRecord): Promise<string | undefined>;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=reference-match.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference-match.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/engine/reference-match.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAEnD,mFAAmF;AACnF,KAAK,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;AAE3D;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACtC,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,aAAa,EACnB,OAAO,EAAE;IAAE,aAAa,EAAE,OAAO,CAAA;CAAE,GACjC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAa7B;AAyBD;;;;;GAKG;AACH,wBAAsB,qBAAqB,CAC1C,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,aAAa,GACjB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAY7B"}
|
|
@@ -3,9 +3,9 @@ import type * as Core from '@dialecte/core';
|
|
|
3
3
|
/**
|
|
4
4
|
* Universal post-extraction cleanup run after cloning records into a target DB.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* 1. Remap: orphanUuidRefs (clear/delete refs whose target is absent)
|
|
7
|
+
* 2. Resolve orphan LNodes: resetLNode (reset IED bindings)
|
|
8
|
+
* 3. Prune: pruneEmptyContainers (empty Private elements + empty ref containers)
|
|
9
9
|
*
|
|
10
10
|
* Same function runs for all extraction scopes (FSD, ASD, ISD).
|
|
11
11
|
* Behavior differs based on target DB content.
|
|
@@ -3,10 +3,12 @@ import type * as Core from '@dialecte/core';
|
|
|
3
3
|
/**
|
|
4
4
|
* Extract a bay-typical (or wider process scope) from a project into a standalone SSD template.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* Records an SSD `Header`, then `cloneTopologyContent` REPRODUCES the scope's structural frame
|
|
7
|
+
* (Substation/VoltageLevel/Bay + BayType + equipment) and CONSUMES the application layer (each
|
|
8
|
+
* `Application` + its composed `Function`s + type closure + satellites). The reproduced ancestors
|
|
9
|
+
* above the selected entrypoint are then TEMPLATE-named (the scaffolding marker: the first named
|
|
10
|
+
* level below the TEMPLATE-named ancestors is the instantiable root), the entrypoint keeps its name
|
|
11
|
+
* with `templateUuid` stripped, uuid refs are repointed and orphans cleaned up.
|
|
10
12
|
*/
|
|
11
13
|
export declare function ssd(tx: Core.Transaction<Config>, params: {
|
|
12
14
|
sourceQuery: Core.Query<Config>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssd.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/extract/transaction/ssd.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C
|
|
1
|
+
{"version":3,"file":"ssd.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/extract/transaction/ssd.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C;;;;;;;;;GASG;AACH,wBAAsB,GAAG,CACxB,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAC5B,MAAM,EAAE;IACP,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/B,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,cAAc,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IAC1E,IAAI,EAAE,GAAG,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAA;IACrD,GAAG,EAAE,GAAG,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAA;IAChD,aAAa,CAAC,EAAE,GAAG,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,CAAA;CACtE,GACC,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAoDjC"}
|
|
@@ -23,7 +23,7 @@ import * as updateTransaction from './update';
|
|
|
23
23
|
* sourceQuery, ref, anchor })` returns a `DiffReport`
|
|
24
24
|
* (fast/full classification) — nothing is written.
|
|
25
25
|
*
|
|
26
|
-
* Two-track surface (verb-agnostic
|
|
26
|
+
* Two-track surface (verb-agnostic): `query.lifecycle.report(...)`
|
|
27
27
|
* classifies, then `tx.lifecycle.apply(tx, { ..., report })` applies the fast
|
|
28
28
|
* track headless (full track returns the report for decision review — nothing is
|
|
29
29
|
* written until decisions come back).
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Scl, Config } from '../../../config';
|
|
2
|
+
import { ElementIdentity } from '../../identity/query';
|
|
2
3
|
import { MatchKey } from '../scenario';
|
|
3
4
|
import { AnyTrackedRecord, AnyTreeRecord } from '@dialecte/core';
|
|
4
5
|
import type * as Core from '@dialecte/core';
|
|
@@ -40,8 +41,8 @@ export declare function findInstancesUnder(reader: Reader, params: {
|
|
|
40
41
|
export declare function findInstanceByTemplateUuid(reader: Reader, params: {
|
|
41
42
|
tagName: Scl.ElementsOf;
|
|
42
43
|
sourceUuid: string | undefined;
|
|
43
|
-
sourceName?: string;
|
|
44
44
|
matchKey?: MatchKey;
|
|
45
|
+
sourceIdentity?: ElementIdentity;
|
|
45
46
|
}): Promise<AnyTrackedRecord | undefined>;
|
|
46
47
|
/**
|
|
47
48
|
* ALL records of `tagName` anywhere whose `templateUuid` equals the source uuid,
|
|
@@ -49,20 +50,40 @@ export declare function findInstanceByTemplateUuid(reader: Reader, params: {
|
|
|
49
50
|
* where there is no placement anchor (the ASD report/apply cascade), so several
|
|
50
51
|
* instances of one template are enumerated and gated as a subset (multi-instance).
|
|
51
52
|
*
|
|
52
|
-
*
|
|
53
|
-
* `
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
53
|
+
* Matching is schema-driven (`resolveIdentity`), no name fallback:
|
|
54
|
+
* - **uuid-bearing** `tagName` → LINEAGE ONLY (`instance[matchKey] === sourceUuid`). A miss is a
|
|
55
|
+
* miss; a same-name element sharing no lineage is never adopted (that was the scaffold-`TEMPLATE`
|
|
56
|
+
* bug). A project whose lineage is a hand-authored placeholder is a data defect surfaced by the UI
|
|
57
|
+
* `checkTemplateUuids` warning, not recovered here.
|
|
58
|
+
* - **uuid-less** `tagName` with schema `identityFields` → matched by the `sourceIdentity` fields
|
|
59
|
+
* tuple, unambiguous only (e.g. DataTypeTemplates types by `id`). Callers pass `sourceIdentity`
|
|
60
|
+
* (from `resolveIdentity(sourceRecord)`) for these; uuid-bearing callers pass nothing.
|
|
59
61
|
*/
|
|
60
62
|
export declare function findInstancesByTemplateUuid(reader: Reader, params: {
|
|
61
63
|
tagName: Scl.ElementsOf;
|
|
62
64
|
sourceUuid: string | undefined;
|
|
63
|
-
sourceName?: string;
|
|
64
65
|
/** Attribute matched against `sourceUuid`. Default `templateUuid`; `uuid` for fork. */
|
|
65
66
|
matchKey?: MatchKey;
|
|
67
|
+
/** The source element's identity, required only for a uuid-less (fields-identified) tag. */
|
|
68
|
+
sourceIdentity?: ElementIdentity;
|
|
66
69
|
}): Promise<AnyTrackedRecord[]>;
|
|
70
|
+
/**
|
|
71
|
+
* Narrow a set of matched instances to those SCOPED to one specific target instance: the instance
|
|
72
|
+
* itself, or any instance structurally UNDER it. When `targetInstance` is undefined, every instance
|
|
73
|
+
* passes (the default — operate on ALL instances of the template, a template-rollout).
|
|
74
|
+
*
|
|
75
|
+
* This is the multi-instance anchor seam: a consumer names ONE target instance (e.g. a specific
|
|
76
|
+
* pasted Bay) and every enumeration point in the update/report verbs filters through here, so the
|
|
77
|
+
* frame, the applications and the composed functions all resolve under the chosen instance and no
|
|
78
|
+
* other. The containment predicate makes it uniform across layers — a Bay `targetInstance` scopes
|
|
79
|
+
* its descendant Applications/Functions; a Function/Application `targetInstance` scopes itself.
|
|
80
|
+
*/
|
|
81
|
+
export declare function scopeToTargetInstance<GenericRecord extends {
|
|
82
|
+
id: string;
|
|
83
|
+
tagName: string;
|
|
84
|
+
}>(reader: Reader, params: {
|
|
85
|
+
instances: readonly GenericRecord[];
|
|
86
|
+
targetInstance: Scl.Ref<Scl.ElementsOf> | undefined;
|
|
87
|
+
}): Promise<GenericRecord[]>;
|
|
67
88
|
export {};
|
|
68
89
|
//# sourceMappingURL=find-instance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-instance.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/instance/find-instance.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"find-instance.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/instance/find-instance.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAA;AACvE,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAErE,iFAAiF;AACjF,KAAK,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;AAE3D;;;;GAIG;AACH,wBAAsB,iBAAiB,CACtC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE;IACP,YAAY,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IACrC,OAAO,EAAE,GAAG,CAAC,UAAU,CAAA;IACvB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,uFAAuF;IACvF,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACnB,GACC,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAGpC;AAED;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACvC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE;IACP,YAAY,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IACrC,OAAO,EAAE,GAAG,CAAC,UAAU,CAAA;IACvB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,uFAAuF;IACvF,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACnB,GACC,OAAO,CAAC,aAAa,EAAE,CAAC,CAQ1B;AAyBD;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAC/C,MAAM,EAAE,MAAM,EACd,MAAM,EAAE;IACP,OAAO,EAAE,GAAG,CAAC,UAAU,CAAA;IACvB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,cAAc,CAAC,EAAE,eAAe,CAAA;CAChC,GACC,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAGvC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,2BAA2B,CAChD,MAAM,EAAE,MAAM,EACd,MAAM,EAAE;IACP,OAAO,EAAE,GAAG,CAAC,UAAU,CAAA;IACvB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,uFAAuF;IACvF,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,4FAA4F;IAC5F,cAAc,CAAC,EAAE,eAAe,CAAA;CAChC,GACC,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA6B7B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,qBAAqB,CAAC,aAAa,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAChG,MAAM,EAAE,MAAM,EACd,MAAM,EAAE;IACP,SAAS,EAAE,SAAS,aAAa,EAAE,CAAA;IACnC,cAAc,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,SAAS,CAAA;CACnD,GACC,OAAO,CAAC,aAAa,EAAE,CAAC,CAiB1B"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { collectComposedFunctionUuids } from './composed-functions';
|
|
2
|
-
export { findInstanceByTemplateUuid, findInstancesByTemplateUuid, findInstancesUnder, findInstanceUnder, } from './find-instance';
|
|
2
|
+
export { findInstanceByTemplateUuid, findInstancesByTemplateUuid, findInstancesUnder, findInstanceUnder, scopeToTargetInstance, } from './find-instance';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/instance/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,EACN,0BAA0B,EAC1B,2BAA2B,EAC3B,kBAAkB,EAClB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/instance/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,EACN,0BAA0B,EAC1B,2BAA2B,EAC3B,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,GACrB,MAAM,iBAAiB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asd.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/instantiate/transaction/asd.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,KAAK,EAAE,MAAM,EAAO,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"asd.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/instantiate/transaction/asd.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,KAAK,EAAE,MAAM,EAAO,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAgF7F"}
|
|
@@ -20,5 +20,11 @@ export type AsdResult = {
|
|
|
20
20
|
composedFunctionRefs: (Scl.Ref<'Function'> | Scl.Ref<'SubFunction'>)[];
|
|
21
21
|
/** Full source-record -> target-record mapping for the cloned content. */
|
|
22
22
|
recordMappings: Scl.CloneMapping[];
|
|
23
|
+
/**
|
|
24
|
+
* Every source->target mapping produced, including the cross-cutting satellites that live outside
|
|
25
|
+
* the Application subtree — the full set the report→applied correlation needs for a first-time
|
|
26
|
+
* instantiate (`sourceToTargetMap` over these).
|
|
27
|
+
*/
|
|
28
|
+
mappings: Scl.CloneMapping[];
|
|
23
29
|
};
|
|
24
30
|
//# sourceMappingURL=asd.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asd.types.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/instantiate/transaction/asd.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAA;AACpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAA;AAC5F,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C,MAAM,MAAM,SAAS,GAAG;IACvB,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/B,yDAAyD;IACzD,cAAc,EAAE,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;IACtC,wFAAwF;IACxF,YAAY,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IACrC,wFAAwF;IACxF,SAAS,CAAC,EAAE,kBAAkB,CAAA;IAC9B,iFAAiF;IACjF,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACvB,kDAAkD;IAClD,cAAc,EAAE,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;IACtC,gFAAgF;IAChF,oBAAoB,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,EAAE,CAAA;IACtE,0EAA0E;IAC1E,cAAc,EAAE,GAAG,CAAC,YAAY,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"asd.types.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/instantiate/transaction/asd.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAA;AACpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAA;AAC5F,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C,MAAM,MAAM,SAAS,GAAG;IACvB,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/B,yDAAyD;IACzD,cAAc,EAAE,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;IACtC,wFAAwF;IACxF,YAAY,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IACrC,wFAAwF;IACxF,SAAS,CAAC,EAAE,kBAAkB,CAAA;IAC9B,iFAAiF;IACjF,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACvB,kDAAkD;IAClD,cAAc,EAAE,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;IACtC,gFAAgF;IAChF,oBAAoB,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,EAAE,CAAA;IACtE,0EAA0E;IAC1E,cAAc,EAAE,GAAG,CAAC,YAAY,EAAE,CAAA;IAClC;;;;OAIG;IACH,QAAQ,EAAE,GAAG,CAAC,YAAY,EAAE,CAAA;CAC5B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fsd.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/instantiate/transaction/fsd.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,KAAK,EAAE,MAAM,EAAO,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"fsd.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/instantiate/transaction/fsd.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,KAAK,EAAE,MAAM,EAAO,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAoE7F"}
|
|
@@ -21,5 +21,11 @@ export type FsdResult = {
|
|
|
21
21
|
functionRef: Scl.Ref<'Function'> | Scl.Ref<'SubFunction'>;
|
|
22
22
|
/** Full source-record -> target-record mapping for the cloned subtree. */
|
|
23
23
|
recordMappings: Scl.CloneMapping[];
|
|
24
|
+
/**
|
|
25
|
+
* Every source->target mapping produced, including the carried satellites (FunctionCategory,
|
|
26
|
+
* Variable, BehaviorDescription) that live outside the subtree — the full set the report→applied
|
|
27
|
+
* correlation needs for a first-time instantiate (`sourceToTargetMap` over these).
|
|
28
|
+
*/
|
|
29
|
+
mappings: Scl.CloneMapping[];
|
|
24
30
|
};
|
|
25
31
|
//# sourceMappingURL=fsd.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fsd.types.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/instantiate/transaction/fsd.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAA;AACpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAA;AAC5F,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C,MAAM,MAAM,SAAS,GAAG;IACvB,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/B,uEAAuE;IACvE,WAAW,EAAE,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;IACzD,6EAA6E;IAC7E,YAAY,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IACrC,wFAAwF;IACxF,SAAS,CAAC,EAAE,kBAAkB,CAAA;IAC9B,iFAAiF;IACjF,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACvB;;;OAGG;IACH,WAAW,EAAE,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;IACzD,0EAA0E;IAC1E,cAAc,EAAE,GAAG,CAAC,YAAY,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"fsd.types.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/instantiate/transaction/fsd.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAA;AACpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAA;AAC5F,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C,MAAM,MAAM,SAAS,GAAG;IACvB,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/B,uEAAuE;IACvE,WAAW,EAAE,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;IACzD,6EAA6E;IAC7E,YAAY,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IACrC,wFAAwF;IACxF,SAAS,CAAC,EAAE,kBAAkB,CAAA;IAC9B,iFAAiF;IACjF,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACvB;;;OAGG;IACH,WAAW,EAAE,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;IACzD,0EAA0E;IAC1E,cAAc,EAAE,GAAG,CAAC,YAAY,EAAE,CAAA;IAClC;;;;OAIG;IACH,QAAQ,EAAE,GAAG,CAAC,YAAY,EAAE,CAAA;CAC5B,CAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { fsd } from './fsd';
|
|
2
2
|
export { asd } from './asd';
|
|
3
|
+
export { ssd } from './ssd';
|
|
3
4
|
export { resolveTargetStructure } from './resolve-target-structure';
|
|
4
5
|
export type { FsdParams } from './fsd.types';
|
|
5
6
|
export type { AsdParams } from './asd.types';
|
|
7
|
+
export type { SsdParams } from './ssd.types';
|
|
6
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/instantiate/transaction/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACnE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/instantiate/transaction/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACnE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SsdParams, SsdResult } from './ssd.types';
|
|
2
|
+
import { Config } from '../../../../config';
|
|
3
|
+
import type * as Core from '@dialecte/core';
|
|
4
|
+
/**
|
|
5
|
+
* Instantiate the process-section content carried by an SSD into a target project.
|
|
6
|
+
*
|
|
7
|
+
* The topology layer OWNS its frame: `cloneTopologyContent` REPRODUCES the source structural
|
|
8
|
+
* skeleton (Substation/VoltageLevel/Bay + BayType + equipment) by name under `targetParent`, then
|
|
9
|
+
* consumes the application/function layers to place the Applications + their composed Functions +
|
|
10
|
+
* standalone Functions (with the type closure) under the name-correct level. Cross-cutting satellites
|
|
11
|
+
* travel too; then the identity policy applies (`stamp-template` for bay-typical reuse = fresh uuid +
|
|
12
|
+
* templateUuid, `keep` for a project base = preserved uuids). The instantiation is recorded once as a
|
|
13
|
+
* document-level `SclFileReference` under the target `Header > SourceFiles`.
|
|
14
|
+
*
|
|
15
|
+
* The scope defaults to the SSD's instantiable root (the first named level down the
|
|
16
|
+
* `Substation -> VoltageLevel -> Bay` chain).
|
|
17
|
+
*/
|
|
18
|
+
export declare function ssd(tx: Core.Transaction<Config>, params: SsdParams): Promise<SsdResult>;
|
|
19
|
+
//# sourceMappingURL=ssd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssd.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/instantiate/transaction/ssd.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C;;;;;;;;;;;;;GAaG;AACH,wBAAsB,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAuE7F"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Config, Scl } from '../../../../config';
|
|
2
|
+
import { TopologyStructuralTag } from '../../../../constants';
|
|
3
|
+
import { KeepNameTypesFrom } from '../../../data-model/transaction';
|
|
4
|
+
import { CollisionOverrides } from '../../engine/decide.types';
|
|
5
|
+
import type * as Core from '@dialecte/core';
|
|
6
|
+
export type SsdParams = {
|
|
7
|
+
sourceQuery: Core.Query<Config>;
|
|
8
|
+
/** The SSD scope to instantiate. Defaults to the SSD's instantiable root. */
|
|
9
|
+
scopeRef?: Scl.Ref<TopologyStructuralTag>;
|
|
10
|
+
/** Target parent the SSD content is instantiated under (e.g. a project Bay). */
|
|
11
|
+
targetParent: Scl.Ref<Scl.ElementsOf>;
|
|
12
|
+
/** Identity policy: `stamp-template` (bay-typical reuse, default) or `keep` (project-base). */
|
|
13
|
+
mode?: 'stamp-template' | 'keep';
|
|
14
|
+
/** User-edited values per source element id (full track); drives collision override. */
|
|
15
|
+
overrides?: CollisionOverrides;
|
|
16
|
+
/** Type-dedup name authority, forwarded to `importTypes`. Default `'target'`. */
|
|
17
|
+
keepNameTypesFrom?: KeepNameTypesFrom;
|
|
18
|
+
};
|
|
19
|
+
export type SsdResult = {
|
|
20
|
+
/** The SSD scope root that was instantiated (source-side ref). */
|
|
21
|
+
scopeRef: Scl.Ref<TopologyStructuralTag>;
|
|
22
|
+
/** Full source-record -> target-record mapping for the cloned content. */
|
|
23
|
+
recordMappings: Scl.CloneMapping[];
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=ssd.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssd.types.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/instantiate/transaction/ssd.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAA;AACpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAA;AAC5F,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C,MAAM,MAAM,SAAS,GAAG;IACvB,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/B,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAA;IACzC,gFAAgF;IAChF,YAAY,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IACrC,+FAA+F;IAC/F,IAAI,CAAC,EAAE,gBAAgB,GAAG,MAAM,CAAA;IAChC,wFAAwF;IACxF,SAAS,CAAC,EAAE,kBAAkB,CAAA;IAC9B,iFAAiF;IACjF,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACvB,kEAAkE;IAClE,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAA;IACxC,0EAA0E;IAC1E,cAAc,EAAE,GAAG,CAAC,YAAY,EAAE,CAAA;CAClC,CAAA"}
|
|
@@ -1,27 +1,30 @@
|
|
|
1
|
+
import { CloneTopologyContentResult } from './clone-topology-content.types';
|
|
1
2
|
import { Config, Scl } from '../../../../config';
|
|
2
3
|
import { TopologyStructuralTag } from '../../../../constants';
|
|
3
|
-
import { TargetStructure } from '../../transplant/transaction';
|
|
4
4
|
import { OmitEntry } from '@dialecte/core';
|
|
5
5
|
import type * as Core from '@dialecte/core';
|
|
6
6
|
/**
|
|
7
|
-
* Topology-layer take-over
|
|
8
|
-
* self-contained target.
|
|
7
|
+
* Topology-layer take-over: gathers a topology scope's content into a self-contained target.
|
|
9
8
|
*
|
|
10
|
-
* 1. **
|
|
9
|
+
* 1. **Frame** - reproduces the source structural skeleton (Substation/VoltageLevel/Bay + their
|
|
10
|
+
* own `Private`/BayType, equipment, connectivity) by name via {@link ensureTopologyFrame}. The
|
|
11
|
+
* topology layer OWNS this content, so it is carried here rather than fed in.
|
|
12
|
+
* 2. **Applications** under `scopeRef` - delegates to `cloneApplicationContent`, CONSUMING the
|
|
11
13
|
* application layer (Application + its composed `Function`s + type closure + satellites).
|
|
12
|
-
*
|
|
13
|
-
* 3. **Equipment** (the topology layer's own content) placed back at its structural level.
|
|
14
|
+
* 3. **Standalone Functions** structurally under the scope that no Application already pulled in.
|
|
14
15
|
*
|
|
15
|
-
* Each is placed
|
|
16
|
-
* `CloneMapping[]
|
|
16
|
+
* Each fn/app is placed under its name-correct reproduced level (via the frame index), so multiple
|
|
17
|
+
* bays never collapse. Direction-agnostic: returns the full `CloneMapping[]` plus the placed roots
|
|
18
|
+
* and the frame index; the caller applies identity policy, `applyUuidRemap`, and placement-collision.
|
|
17
19
|
*
|
|
18
|
-
* This is the building block a bay-typical extract (and later SCD) composes.
|
|
20
|
+
* This is the building block a bay-typical instantiate/extract (and later SCD) composes.
|
|
19
21
|
*/
|
|
20
22
|
export declare function cloneTopologyContent(tx: Core.Transaction<Config>, params: {
|
|
21
23
|
sourceQuery: Core.Query<Config>;
|
|
22
24
|
scopeRef: Scl.Ref<TopologyStructuralTag>;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
/** The target element the reproduced frame is rooted under (typically the SCL root). */
|
|
26
|
+
targetParent: Scl.Ref<Scl.ElementsOf>;
|
|
27
|
+
/** Child tags to drop from clones (extract prunes provenance refs). */
|
|
25
28
|
omit?: OmitEntry<Config>[];
|
|
26
|
-
}): Promise<
|
|
29
|
+
}): Promise<CloneTopologyContentResult>;
|
|
27
30
|
//# sourceMappingURL=clone-topology-content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clone-topology-content.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/layers/topology/clone-topology-content.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"clone-topology-content.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/layers/topology/clone-topology-content.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAA;AAChF,OAAO,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAChE,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,oBAAoB,CACzC,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAC5B,MAAM,EAAE;IACP,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/B,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAA;IACxC,wFAAwF;IACxF,YAAY,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IACrC,uEAAuE;IACvE,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,CAAA;CAC1B,GACC,OAAO,CAAC,0BAA0B,CAAC,CAqDrC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Scl } from '../../../../config';
|
|
2
|
+
export type CloneTopologyContentResult = {
|
|
3
|
+
/** All source -> target clone mappings for the gathered content (frame + fn/app). */
|
|
4
|
+
mappings: Scl.CloneMapping[];
|
|
5
|
+
/**
|
|
6
|
+
* Source refs of the top-level placed elements (Applications, their composed Functions,
|
|
7
|
+
* standalone Functions) - the elements a caller runs placement-collision on. The structural
|
|
8
|
+
* frame is placed by merge-by-name, so it is not included here.
|
|
9
|
+
*/
|
|
10
|
+
placedRoots: Scl.Ref<Scl.ElementsOf>[];
|
|
11
|
+
/** Source structural element id -> reproduced target ref, for name-correct placement. */
|
|
12
|
+
frameIndex: Map<string, Scl.Ref<Scl.ElementsOf>>;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=clone-topology-content.types.d.ts.map
|
package/dist/v2019C1/extensions/lifecycle/layers/topology/clone-topology-content.types.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clone-topology-content.types.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/layers/topology/clone-topology-content.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAE3C,MAAM,MAAM,0BAA0B,GAAG;IACxC,qFAAqF;IACrF,QAAQ,EAAE,GAAG,CAAC,YAAY,EAAE,CAAA;IAC5B;;;;OAIG;IACH,WAAW,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAA;IACtC,yFAAyF;IACzF,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAA;CAChD,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { EnsureTopologyFrameParams, EnsureTopologyFrameResult } from './ensure-topology-frame.types';
|
|
2
|
+
import { Config, Scl } from '../../../../config';
|
|
3
|
+
import { TargetStructure } from '../../transplant/transaction';
|
|
4
|
+
import type * as Core from '@dialecte/core';
|
|
5
|
+
/**
|
|
6
|
+
* Reproduce the source topology frame into the target, keyed by structural POSITION (never by name).
|
|
7
|
+
*
|
|
8
|
+
* The topology layer OWNS its structural frame (Substation/VoltageLevel/Bay + their `Private`/BayType,
|
|
9
|
+
* equipment, connectivity). Ancestors ABOVE the scope root are the target CONTEXT: reused from
|
|
10
|
+
* `targetParent`'s existing chain where present, created from source where absent (so an empty target
|
|
11
|
+
* gets the whole chain). The scope root and its structural DESCENDANTS are always CREATED from source
|
|
12
|
+
* with their own content, OMITTING the delegated fn/app children (the fn/app layers place those), and
|
|
13
|
+
* stamped by the caller so a later update can match them by `templateUuid`.
|
|
14
|
+
*
|
|
15
|
+
* Returns a `frameIndex` (source structural id -> target ref) so callers place fn/app content under
|
|
16
|
+
* the correct target level even across multiple bays.
|
|
17
|
+
*/
|
|
18
|
+
export declare function ensureTopologyFrame(tx: Core.Transaction<Config>, params: EnsureTopologyFrameParams): Promise<EnsureTopologyFrameResult>;
|
|
19
|
+
/**
|
|
20
|
+
* The structural chain (Substation/VL/Bay) of `ref` mapped to its reproduced target records, as a
|
|
21
|
+
* `TargetStructure`. Lets a caller place fn/app content under the name-correct target level of `ref`,
|
|
22
|
+
* even across multiple bays, using `resolveStructureRef` / `createAncestryResolver`.
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolveFrameStructure(tx: Core.Transaction<Config>, sourceQuery: Core.Query<Config>, ref: Scl.Ref<Scl.ElementsOf>, frameIndex: ReadonlyMap<string, Scl.Ref<Scl.ElementsOf>>): Promise<TargetStructure>;
|
|
25
|
+
//# sourceMappingURL=ensure-topology-frame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ensure-topology-frame.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/layers/topology/ensure-topology-frame.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACX,yBAAyB,EACzB,yBAAyB,EACzB,MAAM,+BAA+B,CAAA;AACtC,OAAO,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAC5F,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAW3C;;;;;;;;;;;;GAYG;AACH,wBAAsB,mBAAmB,CACxC,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAC5B,MAAM,EAAE,yBAAyB,GAC/B,OAAO,CAAC,yBAAyB,CAAC,CAkDpC;AAqHD;;;;GAIG;AACH,wBAAsB,qBAAqB,CAC1C,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAC5B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAC/B,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,EAC5B,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,GACtD,OAAO,CAAC,eAAe,CAAC,CAW1B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Config, Scl } from '../../../../config';
|
|
2
|
+
import { TargetStructure } from '../../transplant/transaction';
|
|
3
|
+
import { OmitEntry } from '@dialecte/core';
|
|
4
|
+
import type * as Core from '@dialecte/core';
|
|
5
|
+
export type EnsureTopologyFrameParams = {
|
|
6
|
+
sourceQuery: Core.Query<Config>;
|
|
7
|
+
/** The instantiable root of the source frame (Substation / VoltageLevel / Bay). */
|
|
8
|
+
scopeRef: Scl.Ref<Scl.ElementsOf>;
|
|
9
|
+
/** The target element the reproduced frame is rooted under (typically the SCL root). */
|
|
10
|
+
targetParent: Scl.Ref<Scl.ElementsOf>;
|
|
11
|
+
/** Extra child tags to drop from the frame's own-content clones (e.g. extract prunes provenance). */
|
|
12
|
+
omit?: OmitEntry<Config>[];
|
|
13
|
+
};
|
|
14
|
+
export type EnsureTopologyFrameResult = {
|
|
15
|
+
/** The scope root's own structural chain (Substation/VL/Bay), for single-scope placement compat. */
|
|
16
|
+
structure: TargetStructure;
|
|
17
|
+
/** Source structural element id -> its reproduced target ref (multi-bay-safe placement). */
|
|
18
|
+
frameIndex: Map<string, Scl.Ref<Scl.ElementsOf>>;
|
|
19
|
+
/** Source -> target mappings for every reproduced structural element and its own-content clones. */
|
|
20
|
+
mappings: Scl.CloneMapping[];
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=ensure-topology-frame.types.d.ts.map
|
package/dist/v2019C1/extensions/lifecycle/layers/topology/ensure-topology-frame.types.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ensure-topology-frame.types.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/layers/topology/ensure-topology-frame.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAC5F,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,MAAM,yBAAyB,GAAG;IACvC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/B,mFAAmF;IACnF,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IACjC,wFAAwF;IACxF,YAAY,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IACrC,qGAAqG;IACrG,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACvC,oGAAoG;IACpG,SAAS,EAAE,eAAe,CAAA;IAC1B,4FAA4F;IAC5F,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAA;IAChD,oGAAoG;IACpG,QAAQ,EAAE,GAAG,CAAC,YAAY,EAAE,CAAA;CAC5B,CAAA"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
export { resolveInstantiableRoot } from './root-selection';
|
|
2
2
|
export { cloneTopologyContent } from './clone-topology-content';
|
|
3
|
+
export { ensureTopologyFrame, resolveFrameStructure } from './ensure-topology-frame';
|
|
4
|
+
export { reconcileTopologyFrame } from './reconcile-topology-frame';
|
|
5
|
+
export { resolveTopologyReconcilables } from './scope-content';
|
|
6
|
+
export type { TopologyReconcilables } from './scope-content.types';
|
|
7
|
+
export type { EnsureTopologyFrameParams, EnsureTopologyFrameResult, } from './ensure-topology-frame.types';
|
|
3
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/layers/topology/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/layers/topology/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAA;AAC9D,YAAY,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAClE,YAAY,EACX,yBAAyB,EACzB,yBAAyB,GACzB,MAAM,+BAA+B,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Config, Scl } from '../../../../config';
|
|
2
|
+
import { TopologyStructuralTag } from '../../../../constants';
|
|
3
|
+
import { IdentityMode } from '../../../identity/transaction/write-identity.types';
|
|
4
|
+
import { DecisionMap, DiffReport } from '../../engine/diff.types';
|
|
5
|
+
import { MatchKey } from '../../scenario';
|
|
6
|
+
import type * as Core from '@dialecte/core';
|
|
7
|
+
/**
|
|
8
|
+
* Reconcile a topology scope's OWN structural content (Substation/VoltageLevel/Bay attributes +
|
|
9
|
+
* BayType + equipment) against a newer source, matched by identity.
|
|
10
|
+
*
|
|
11
|
+
* Finds the scope instances by `templateUuid` (stamp) / `uuid` (keep) - rename-robust, since the
|
|
12
|
+
* frame carries stamped lineage - then runs the shared engine `reconcile` over each matched
|
|
13
|
+
* instance's structural subtree with the fn/app tags as a BOUNDARY, so the delegated
|
|
14
|
+
* Applications/Functions are left to the fn/app cascade. Several bays may share one `templateUuid`
|
|
15
|
+
* (a bay-typical instantiated more than once): EACH is reconciled, gated by ONLY its own report
|
|
16
|
+
* groups (partitioned by instance) so the user can update a subset. No-op when no instance exists
|
|
17
|
+
* (a first-time update instantiates instead).
|
|
18
|
+
*/
|
|
19
|
+
export declare function reconcileTopologyFrame(tx: Core.Transaction<Config>, params: {
|
|
20
|
+
sourceQuery: Core.Query<Config>;
|
|
21
|
+
scopeRef: Scl.Ref<TopologyStructuralTag>;
|
|
22
|
+
matchKey: MatchKey;
|
|
23
|
+
identityMode: IdentityMode;
|
|
24
|
+
report?: DiffReport;
|
|
25
|
+
decisions?: DecisionMap;
|
|
26
|
+
/** Multi-instance anchor: reconcile only the frame instance that IS the target (or under it). */
|
|
27
|
+
targetInstance?: Scl.Ref<Scl.ElementsOf>;
|
|
28
|
+
}): Promise<void>;
|
|
29
|
+
//# sourceMappingURL=reconcile-topology-frame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconcile-topology-frame.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/lifecycle/layers/topology/reconcile-topology-frame.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gEAAgE,CAAA;AAClG,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAA;AAC/F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAA;AACvE,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C;;;;;;;;;;;GAWG;AACH,wBAAsB,sBAAsB,CAC3C,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAC5B,MAAM,EAAE;IACP,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/B,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAA;IACxC,QAAQ,EAAE,QAAQ,CAAA;IAClB,YAAY,EAAE,YAAY,CAAA;IAC1B,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,SAAS,CAAC,EAAE,WAAW,CAAA;IACvB,iGAAiG;IACjG,cAAc,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;CACxC,GACC,OAAO,CAAC,IAAI,CAAC,CAkCf"}
|