@neocompose/cli 0.13.0 → 0.14.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/CHANGELOG.md +37 -0
- package/dist/neo.mjs +70 -253
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.14.0] - 2026-07-28
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Stamp authored provenance on every row a materialized default produces.
|
|
8
|
+
Writing `new EyePart { Name = "RightEye" }` as a row in `EyesPart.Children`
|
|
9
|
+
copies `EyePart`'s default graph, and until now the copy had no link home:
|
|
10
|
+
a clip declared on `EyePart` addresses `EyePart`'s own class-default rows,
|
|
11
|
+
which no copy of them named, so it resolved on no nested instance at all.
|
|
12
|
+
Each copied row now carries the class-default row it came from, forwarding
|
|
13
|
+
that row's own stamp so a part three levels deep still points at the
|
|
14
|
+
original rather than an intermediate copy. Clips on nested class rows
|
|
15
|
+
resolve, at any depth, and the Unity exporter chains the stamp through a
|
|
16
|
+
placement unchanged. `neo pull` output is byte-identical either way.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- Push two sibling bare `new()` rows of a class whose default is row-backed.
|
|
21
|
+
Re-lowering a declared initializer adopted the `@id` written on it as the
|
|
22
|
+
copy's identity — which is the class-default row's id — so
|
|
23
|
+
`[new EyePart(), new EyePart()]` minted one id twice and failed with
|
|
24
|
+
`Value construction reuses identity`, and even a single such row was
|
|
25
|
+
rejected by the server as an existing value. That id is now the copy's
|
|
26
|
+
provenance instead of its identity.
|
|
27
|
+
- Keep `genericBindings` and `bindingMembers` on an authored seed row across
|
|
28
|
+
the push transport. The schema commit route rebuilt each seed from a field
|
|
29
|
+
whitelist that omitted both, so an authored `NeoAnimationChildOverride` row
|
|
30
|
+
lost its concrete generic environment between the CLI and the server's own
|
|
31
|
+
re-lowering, and the push failed as a trusted-lowering mismatch.
|
|
32
|
+
|
|
33
|
+
### Removed
|
|
34
|
+
|
|
35
|
+
- The nested-clip-owner advisory added in 0.12.0, along with the `warnings`
|
|
36
|
+
array `neo push --json`, `neo status --json` and `neo diff --json` carried
|
|
37
|
+
it in. It described a defect that provenance now fixes, so leaving it would
|
|
38
|
+
warn on correct code.
|
|
39
|
+
|
|
3
40
|
## [0.13.0] - 2026-07-28
|
|
4
41
|
|
|
5
42
|
### Added
|
package/dist/neo.mjs
CHANGED
|
@@ -34559,6 +34559,7 @@ function cloneDefaultValueForMember(args) {
|
|
|
34559
34559
|
);
|
|
34560
34560
|
}
|
|
34561
34561
|
const value = buildNewValue(args.projectId, body);
|
|
34562
|
+
value.sourceValueId = sourceValue.sourceValueId ?? sourceValue.id;
|
|
34562
34563
|
if (isMemberListBase(member) || isMemberDictionaryBase(member)) {
|
|
34563
34564
|
stampGenericBindings(value, member, args);
|
|
34564
34565
|
}
|
|
@@ -43823,7 +43824,8 @@ function staticValueSeedRow(value, loweredMemberId) {
|
|
|
43823
43824
|
(entry) => typeof entry[1] === "string"
|
|
43824
43825
|
)
|
|
43825
43826
|
)
|
|
43826
|
-
} : {}
|
|
43827
|
+
} : {},
|
|
43828
|
+
...typeof value.sourceValueId === "string" ? { sourceValueId: value.sourceValueId } : {}
|
|
43827
43829
|
};
|
|
43828
43830
|
}
|
|
43829
43831
|
function preserveReboundValue(context, currentValueId, nextValueId, binding) {
|
|
@@ -43868,7 +43870,7 @@ function lowerStaticSeed(context, member, sourceExpression, source, valueId) {
|
|
|
43868
43870
|
...localizedTexts.size === 0 ? {} : { localizedTexts: [...localizedTexts.values()] }
|
|
43869
43871
|
};
|
|
43870
43872
|
}
|
|
43871
|
-
function lowerSeedRow(context, member, sourceExpression, source, valueId, path, rows, localizedTexts, containerId, inheritedEnvironment) {
|
|
43873
|
+
function lowerSeedRow(context, member, sourceExpression, source, valueId, path, rows, localizedTexts, containerId, inheritedEnvironment, materialization) {
|
|
43872
43874
|
const { expression } = annotatedValue(sourceExpression);
|
|
43873
43875
|
const resolvedMember = resolveGenericSchemaMember(
|
|
43874
43876
|
context,
|
|
@@ -43941,11 +43943,16 @@ function lowerSeedRow(context, member, sourceExpression, source, valueId, path,
|
|
|
43941
43943
|
if (rows.has(childValueId)) {
|
|
43942
43944
|
throw new Error(`Value construction reuses identity ${childValueId}.`);
|
|
43943
43945
|
}
|
|
43946
|
+
const projectionStamp = materializedRowStamp(
|
|
43947
|
+
context,
|
|
43948
|
+
materializedChild(context, materialization, schemaKey)
|
|
43949
|
+
);
|
|
43944
43950
|
rows.set(childValueId, {
|
|
43945
43951
|
id: childValueId,
|
|
43946
43952
|
memberId: projectedMember.id,
|
|
43947
43953
|
value: [target.id],
|
|
43948
|
-
classId: null
|
|
43954
|
+
classId: null,
|
|
43955
|
+
...projectionStamp === null ? {} : { sourceValueId: projectionStamp }
|
|
43949
43956
|
});
|
|
43950
43957
|
body[schemaKey] = childValueId;
|
|
43951
43958
|
}
|
|
@@ -43972,7 +43979,8 @@ function lowerSeedRow(context, member, sourceExpression, source, valueId, path,
|
|
|
43972
43979
|
rows,
|
|
43973
43980
|
localizedTexts,
|
|
43974
43981
|
void 0,
|
|
43975
|
-
environment
|
|
43982
|
+
environment,
|
|
43983
|
+
materializedChild(context, materialization, assignment.name)
|
|
43976
43984
|
);
|
|
43977
43985
|
}
|
|
43978
43986
|
materializeRequiredDefaults(
|
|
@@ -44005,7 +44013,8 @@ function lowerSeedRow(context, member, sourceExpression, source, valueId, path,
|
|
|
44005
44013
|
rows,
|
|
44006
44014
|
localizedTexts,
|
|
44007
44015
|
resolvedMember.listKind === "unordered" ? valueId : void 0,
|
|
44008
|
-
inheritedEnvironment
|
|
44016
|
+
inheritedEnvironment,
|
|
44017
|
+
materializedChild(context, materialization, index)
|
|
44009
44018
|
)
|
|
44010
44019
|
);
|
|
44011
44020
|
value = resolvedMember.listKind === "unordered" ? [] : ids;
|
|
@@ -44029,7 +44038,8 @@ function lowerSeedRow(context, member, sourceExpression, source, valueId, path,
|
|
|
44029
44038
|
rows,
|
|
44030
44039
|
localizedTexts,
|
|
44031
44040
|
void 0,
|
|
44032
|
-
inheritedEnvironment
|
|
44041
|
+
inheritedEnvironment,
|
|
44042
|
+
materializedChild(context, materialization, entry.key.value)
|
|
44033
44043
|
);
|
|
44034
44044
|
}
|
|
44035
44045
|
value = body;
|
|
@@ -44066,13 +44076,15 @@ function lowerSeedRow(context, member, sourceExpression, source, valueId, path,
|
|
|
44066
44076
|
value = lowered.value;
|
|
44067
44077
|
classId = typeof lowered.classId === "string" ? lowered.classId : null;
|
|
44068
44078
|
}
|
|
44079
|
+
const sourceValueId = materializedRowStamp(context, materialization);
|
|
44069
44080
|
const row = {
|
|
44070
44081
|
id: valueId,
|
|
44071
44082
|
memberId: member.id,
|
|
44072
44083
|
value,
|
|
44073
44084
|
classId,
|
|
44074
44085
|
...containerId === void 0 ? {} : { containerId },
|
|
44075
|
-
...genericBindings === void 0 ? {} : { genericBindings }
|
|
44086
|
+
...genericBindings === void 0 ? {} : { genericBindings },
|
|
44087
|
+
...sourceValueId === null ? {} : { sourceValueId }
|
|
44076
44088
|
};
|
|
44077
44089
|
if (rows.has(valueId)) {
|
|
44078
44090
|
throw new Error(`Value construction reuses identity ${valueId}.`);
|
|
@@ -44101,10 +44113,43 @@ function materializeRequiredDefaults(context, member, effectiveClass, body, sour
|
|
|
44101
44113
|
rows,
|
|
44102
44114
|
localizedTexts,
|
|
44103
44115
|
void 0,
|
|
44104
|
-
environment
|
|
44116
|
+
environment,
|
|
44117
|
+
// The row filling this key comes from the member's inline declaration
|
|
44118
|
+
// default, which is not itself a row, so it carries no stamp. Its
|
|
44119
|
+
// children mirror that default's own rows and do.
|
|
44120
|
+
{ rowId: null, body: declaredDefaultBody(context, childMember) }
|
|
44105
44121
|
);
|
|
44106
44122
|
}
|
|
44107
44123
|
}
|
|
44124
|
+
function materializedRowStamp(context, materialization) {
|
|
44125
|
+
if (materialization === void 0) return null;
|
|
44126
|
+
const rowId = materialization.rowId;
|
|
44127
|
+
if (rowId === null) return null;
|
|
44128
|
+
const forwarded = valueData(context, rowId)?.sourceValueId;
|
|
44129
|
+
return stringOrNull(forwarded) ?? rowId;
|
|
44130
|
+
}
|
|
44131
|
+
function materializedChild(context, materialization, key) {
|
|
44132
|
+
if (materialization === void 0) return void 0;
|
|
44133
|
+
const rowId = defaultChildRowId(materialization.body, key);
|
|
44134
|
+
if (rowId === null) return { rowId: null, body: void 0 };
|
|
44135
|
+
return { rowId, body: valueData(context, rowId)?.value };
|
|
44136
|
+
}
|
|
44137
|
+
function defaultChildRowId(body, key) {
|
|
44138
|
+
if (typeof key === "number") {
|
|
44139
|
+
if (!Array.isArray(body)) return null;
|
|
44140
|
+
return stringOrNull(body[key]);
|
|
44141
|
+
}
|
|
44142
|
+
if (!isObjectRecord2(body)) return null;
|
|
44143
|
+
return stringOrNull(body[key]);
|
|
44144
|
+
}
|
|
44145
|
+
function declaredDefaultBody(context, member) {
|
|
44146
|
+
const declared = member.defaultValue;
|
|
44147
|
+
if (declared !== null && !("serverValueId" in declared)) {
|
|
44148
|
+
return declared.value;
|
|
44149
|
+
}
|
|
44150
|
+
const base = stateData(context, "member", member.id)?.defaultValue;
|
|
44151
|
+
return isObjectRecord2(base) ? base.value : void 0;
|
|
44152
|
+
}
|
|
44108
44153
|
function storedSchemaEntries(context, schemaClass2) {
|
|
44109
44154
|
const entries = /* @__PURE__ */ new Map();
|
|
44110
44155
|
const visited = /* @__PURE__ */ new Set();
|
|
@@ -44126,10 +44171,11 @@ function ownsValueRow(member) {
|
|
|
44126
44171
|
if (member.isReadOnly) return false;
|
|
44127
44172
|
return member.kind !== "computed" && member.kind !== "function" && member.kind !== "scriptFunction";
|
|
44128
44173
|
}
|
|
44129
|
-
function lowerSeedChild(context, member, expression, source, path, rows, localizedTexts, containerId, environment) {
|
|
44174
|
+
function lowerSeedChild(context, member, expression, source, path, rows, localizedTexts, containerId, environment, materialization) {
|
|
44130
44175
|
const symbolId = sourceValueSymbol(context, expression);
|
|
44131
44176
|
if (symbolId !== null) return symbolId;
|
|
44132
|
-
const
|
|
44177
|
+
const annotatedId = materialization === void 0 ? annotatedValue(expression).id : null;
|
|
44178
|
+
const valueId = annotatedId ?? pendingNestedValueId(source, path);
|
|
44133
44179
|
lowerSeedRow(
|
|
44134
44180
|
context,
|
|
44135
44181
|
member,
|
|
@@ -44140,7 +44186,8 @@ function lowerSeedChild(context, member, expression, source, path, rows, localiz
|
|
|
44140
44186
|
rows,
|
|
44141
44187
|
localizedTexts,
|
|
44142
44188
|
containerId,
|
|
44143
|
-
environment
|
|
44189
|
+
environment,
|
|
44190
|
+
materialization
|
|
44144
44191
|
);
|
|
44145
44192
|
return valueId;
|
|
44146
44193
|
}
|
|
@@ -45231,7 +45278,8 @@ function valueData(context, id2) {
|
|
|
45231
45278
|
value: pending.value,
|
|
45232
45279
|
classId: pending.classId,
|
|
45233
45280
|
...pending.containerId === void 0 ? {} : { containerId: pending.containerId },
|
|
45234
|
-
...pending.genericBindings === void 0 ? {} : { genericBindings: pending.genericBindings }
|
|
45281
|
+
...pending.genericBindings === void 0 ? {} : { genericBindings: pending.genericBindings },
|
|
45282
|
+
...pending.sourceValueId === void 0 ? {} : { sourceValueId: pending.sourceValueId }
|
|
45235
45283
|
};
|
|
45236
45284
|
}
|
|
45237
45285
|
return stateData(context, "value", id2);
|
|
@@ -46140,6 +46188,7 @@ function externallyReferencedValueIds(records2) {
|
|
|
46140
46188
|
if (isObjectRecord2(value)) {
|
|
46141
46189
|
for (const [childKey, child] of Object.entries(value)) {
|
|
46142
46190
|
if (childKey === "id") continue;
|
|
46191
|
+
if (childKey === "sourceValueId") continue;
|
|
46143
46192
|
visit(child);
|
|
46144
46193
|
}
|
|
46145
46194
|
}
|
|
@@ -48716,24 +48765,6 @@ function assertAnimationClipDocumentValid(document) {
|
|
|
48716
48765
|
context.validateClipMember(member);
|
|
48717
48766
|
}
|
|
48718
48767
|
}
|
|
48719
|
-
function collectAnimationClipNestedOwnerWarnings(document) {
|
|
48720
|
-
try {
|
|
48721
|
-
return new AnimationValidationContext(
|
|
48722
|
-
document
|
|
48723
|
-
).collectNestedOwnerWarnings();
|
|
48724
|
-
} catch {
|
|
48725
|
-
return [];
|
|
48726
|
-
}
|
|
48727
|
-
}
|
|
48728
|
-
function compareNestedChildrenRowUseSites(left, right) {
|
|
48729
|
-
if (left.ownerClassName !== right.ownerClassName) {
|
|
48730
|
-
return left.ownerClassName < right.ownerClassName ? -1 : 1;
|
|
48731
|
-
}
|
|
48732
|
-
if (left.rowValueId !== right.rowValueId) {
|
|
48733
|
-
return left.rowValueId < right.rowValueId ? -1 : 1;
|
|
48734
|
-
}
|
|
48735
|
-
return 0;
|
|
48736
|
-
}
|
|
48737
48768
|
function isRecord3(value) {
|
|
48738
48769
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
48739
48770
|
}
|
|
@@ -49612,188 +49643,6 @@ var init_animation_clips = __esm({
|
|
|
49612
49643
|
}
|
|
49613
49644
|
return false;
|
|
49614
49645
|
}
|
|
49615
|
-
// ---------------------------------------------------------------------------
|
|
49616
|
-
// P41 §2.3 SCAFFOLDING — DELETE EVERYTHING BELOW THIS BANNER WHEN P44 LANDS,
|
|
49617
|
-
// together with `collectAnimationClipNestedOwnerWarnings` and its tests. See
|
|
49618
|
-
// that function's doc block for why the check exists and why P44 retires it.
|
|
49619
|
-
// ---------------------------------------------------------------------------
|
|
49620
|
-
collectNestedOwnerWarnings() {
|
|
49621
|
-
const useSiteByClassId = this.nestedChildrenRowUseSites();
|
|
49622
|
-
if (useSiteByClassId.size === 0) return [];
|
|
49623
|
-
const warnings = [];
|
|
49624
|
-
for (const member of this.document.members) {
|
|
49625
|
-
if (!isMemberClass(member)) continue;
|
|
49626
|
-
if (!this.classHasWorldKind(member.classId, "animationClip")) continue;
|
|
49627
|
-
const ownerClassId2 = this.optionalClassBinding(
|
|
49628
|
-
member,
|
|
49629
|
-
WORLD_ANIMATION_CLIP_TARGET_PARAM_ID
|
|
49630
|
-
);
|
|
49631
|
-
if (ownerClassId2 === null) continue;
|
|
49632
|
-
const useSite = useSiteByClassId.get(ownerClassId2);
|
|
49633
|
-
if (useSite === void 0) continue;
|
|
49634
|
-
if (!this.clipDeclaresChildReferences(member)) continue;
|
|
49635
|
-
const ownerClassName = this.classById.get(ownerClassId2)?.name ?? ownerClassId2;
|
|
49636
|
-
const nestedRowClassName = this.classById.get(useSite.rowClassId)?.name ?? useSite.rowClassId;
|
|
49637
|
-
const nesting = useSite.rowClassId === ownerClassId2 ? "which is also used as a nested Children row" : `whose subclass "${nestedRowClassName}" is used as a nested Children row`;
|
|
49638
|
-
warnings.push({
|
|
49639
|
-
clipName: member.name,
|
|
49640
|
-
ownerClassName,
|
|
49641
|
-
nestedOwnerClassName: useSite.ownerClassName,
|
|
49642
|
-
nestedRowClassName,
|
|
49643
|
-
nestedRowValueId: useSite.rowValueId,
|
|
49644
|
-
message: `Animation clip "${member.name}" overrides or tracks children of "${ownerClassName}", ${nesting} (value "${useSite.rowValueId}" in class "${useSite.ownerClassName}"). A nested instance carries re-lowered copies of those rows, so the clip resolves none of them there. Give nested Children rows authored provenance (P44), or declare the child rows through a constructor (P43).`
|
|
49645
|
-
});
|
|
49646
|
-
}
|
|
49647
|
-
return warnings;
|
|
49648
|
-
}
|
|
49649
|
-
/**
|
|
49650
|
-
* Every class an authored `Children` list instantiates as a row, keyed by
|
|
49651
|
-
* that class and each of its ancestors — a nested row of a subclass inherits
|
|
49652
|
-
* the base class's clips, so the base is affected too.
|
|
49653
|
-
*
|
|
49654
|
-
* Both authoring shapes count. A class-default `Children` is one; a
|
|
49655
|
-
* `Children` list authored on a row inside one is the other, and it is the
|
|
49656
|
-
* shape P41 §3 itself writes — `CharacterBody.Children` holds a `HeadPart`
|
|
49657
|
-
* row whose own `Children` holds the hat. Scanning only class defaults would
|
|
49658
|
-
* miss every slot below the first level.
|
|
49659
|
-
*
|
|
49660
|
-
* A layer's directly placed objects hang off `NeoObjectLayerLink.Objects`, a
|
|
49661
|
-
* different member, so a directly placed class is never collected here.
|
|
49662
|
-
*/
|
|
49663
|
-
nestedChildrenRowUseSites() {
|
|
49664
|
-
const declaringClasses = /* @__PURE__ */ new Map();
|
|
49665
|
-
for (const schemaClass2 of this.document.classes) {
|
|
49666
|
-
for (const [schemaKey, memberId] of Object.entries(schemaClass2.schema)) {
|
|
49667
|
-
if (typeof memberId !== "string") continue;
|
|
49668
|
-
if (declaringClasses.has(memberId)) continue;
|
|
49669
|
-
declaringClasses.set(memberId, { schemaClass: schemaClass2, schemaKey });
|
|
49670
|
-
}
|
|
49671
|
-
}
|
|
49672
|
-
const sites = [];
|
|
49673
|
-
const pending = [];
|
|
49674
|
-
for (const member of this.document.members) {
|
|
49675
|
-
if (!this.memberDescendsFrom(member.id, WORLD_OBJECT_CHILDREN_MEMBER_ID)) {
|
|
49676
|
-
continue;
|
|
49677
|
-
}
|
|
49678
|
-
const declaration = declaringClasses.get(member.id);
|
|
49679
|
-
if (declaration === void 0) continue;
|
|
49680
|
-
const node = this.resolveDefinitionChild(
|
|
49681
|
-
null,
|
|
49682
|
-
declaration.schemaKey,
|
|
49683
|
-
member
|
|
49684
|
-
);
|
|
49685
|
-
pending.push(
|
|
49686
|
-
...this.childrenRowUseSites(node, member, declaration.schemaClass.name)
|
|
49687
|
-
);
|
|
49688
|
-
}
|
|
49689
|
-
const visited = /* @__PURE__ */ new Set();
|
|
49690
|
-
for (let index = 0; index < pending.length; index += 1) {
|
|
49691
|
-
const site = pending[index];
|
|
49692
|
-
if (site === void 0) continue;
|
|
49693
|
-
if (visited.has(site.rowValueId)) continue;
|
|
49694
|
-
visited.add(site.rowValueId);
|
|
49695
|
-
sites.push(site);
|
|
49696
|
-
const row = this.valueById.get(site.rowValueId);
|
|
49697
|
-
if (row === void 0) continue;
|
|
49698
|
-
const field = this.field(
|
|
49699
|
-
site.rowClassId,
|
|
49700
|
-
WORLD_OBJECT_CHILDREN_MEMBER_ID
|
|
49701
|
-
);
|
|
49702
|
-
if (field === null) continue;
|
|
49703
|
-
const rowClassName = this.classById.get(site.rowClassId)?.name ?? site.rowClassId;
|
|
49704
|
-
pending.push(
|
|
49705
|
-
...this.childrenRowUseSites(
|
|
49706
|
-
{ ...row, value: this.listFieldIds(row, field) },
|
|
49707
|
-
field.member,
|
|
49708
|
-
rowClassName
|
|
49709
|
-
)
|
|
49710
|
-
);
|
|
49711
|
-
}
|
|
49712
|
-
sites.sort(compareNestedChildrenRowUseSites);
|
|
49713
|
-
const useSiteByClassId = /* @__PURE__ */ new Map();
|
|
49714
|
-
for (const site of sites) {
|
|
49715
|
-
if (useSiteByClassId.has(site.rowClassId)) continue;
|
|
49716
|
-
useSiteByClassId.set(site.rowClassId, site);
|
|
49717
|
-
}
|
|
49718
|
-
for (const site of sites) {
|
|
49719
|
-
for (const classId of this.classAndAncestorIds(site.rowClassId)) {
|
|
49720
|
-
if (useSiteByClassId.has(classId)) continue;
|
|
49721
|
-
useSiteByClassId.set(classId, site);
|
|
49722
|
-
}
|
|
49723
|
-
}
|
|
49724
|
-
return useSiteByClassId;
|
|
49725
|
-
}
|
|
49726
|
-
/** The rows an authored `Children` list holds, as use sites of `ownerClassName`. */
|
|
49727
|
-
childrenRowUseSites(node, listMember, ownerClassName) {
|
|
49728
|
-
if (!Array.isArray(node?.value)) return [];
|
|
49729
|
-
const entryClassId = this.listEntryClassId(listMember);
|
|
49730
|
-
const sites = [];
|
|
49731
|
-
for (const rowValueId of node.value) {
|
|
49732
|
-
if (typeof rowValueId !== "string") continue;
|
|
49733
|
-
const row = this.valueById.get(rowValueId);
|
|
49734
|
-
const rowClassId = typeof row?.classId === "string" ? row.classId : entryClassId;
|
|
49735
|
-
if (rowClassId === void 0) continue;
|
|
49736
|
-
sites.push({ ownerClassName, rowValueId, rowClassId });
|
|
49737
|
-
}
|
|
49738
|
-
return sites;
|
|
49739
|
-
}
|
|
49740
|
-
/** True when the clip names at least one child through a track or override. */
|
|
49741
|
-
clipDeclaresChildReferences(clipMember) {
|
|
49742
|
-
const clipNode = this.optionalMemberRootNode(clipMember);
|
|
49743
|
-
if (clipNode === null) return false;
|
|
49744
|
-
const tracks = this.optionalListRows(
|
|
49745
|
-
clipNode,
|
|
49746
|
-
clipMember.classId,
|
|
49747
|
-
WORLD_ANIMATION_CLIP_TRACKS_MEMBER_ID
|
|
49748
|
-
);
|
|
49749
|
-
if (tracks !== null && tracks.length > 0) return true;
|
|
49750
|
-
const frames = this.optionalListRows(
|
|
49751
|
-
clipNode,
|
|
49752
|
-
clipMember.classId,
|
|
49753
|
-
WORLD_ANIMATION_CLIP_FRAMES_MEMBER_ID
|
|
49754
|
-
) ?? [];
|
|
49755
|
-
for (const frame of frames) {
|
|
49756
|
-
if (typeof frame.classId !== "string") continue;
|
|
49757
|
-
const childOverrides = this.optionalListRows(
|
|
49758
|
-
frame,
|
|
49759
|
-
frame.classId,
|
|
49760
|
-
WORLD_ANIMATION_FRAME_CHILD_OVERRIDES_MEMBER_ID
|
|
49761
|
-
);
|
|
49762
|
-
if (childOverrides !== null && childOverrides.length > 0) return true;
|
|
49763
|
-
}
|
|
49764
|
-
return false;
|
|
49765
|
-
}
|
|
49766
|
-
/** {@link requireListField} without the throws, for diagnostics-only readers. */
|
|
49767
|
-
optionalListRows(parent, classId, memberId) {
|
|
49768
|
-
const field = this.field(classId, memberId);
|
|
49769
|
-
if (field === null) return null;
|
|
49770
|
-
const ids = this.listFieldIds(parent, field);
|
|
49771
|
-
if (!Array.isArray(ids)) return null;
|
|
49772
|
-
const inferredClassId = this.listEntryClassId(field.member);
|
|
49773
|
-
const rows = [];
|
|
49774
|
-
for (const id2 of ids) {
|
|
49775
|
-
if (typeof id2 !== "string") return null;
|
|
49776
|
-
const entry = this.valueById.get(id2);
|
|
49777
|
-
if (entry === void 0) return null;
|
|
49778
|
-
rows.push(
|
|
49779
|
-
typeof entry.classId === "string" || inferredClassId === void 0 ? entry : { ...entry, classId: inferredClassId }
|
|
49780
|
-
);
|
|
49781
|
-
}
|
|
49782
|
-
return rows;
|
|
49783
|
-
}
|
|
49784
|
-
/** The class itself followed by every ancestor it extends. */
|
|
49785
|
-
classAndAncestorIds(classId) {
|
|
49786
|
-
const ids = [];
|
|
49787
|
-
const visited = /* @__PURE__ */ new Set();
|
|
49788
|
-
let current = this.classById.get(classId);
|
|
49789
|
-
if (current === void 0) return [classId];
|
|
49790
|
-
while (current !== void 0 && !visited.has(current.id)) {
|
|
49791
|
-
visited.add(current.id);
|
|
49792
|
-
ids.push(current.id);
|
|
49793
|
-
current = current.extendsClassId ? this.classById.get(current.extendsClassId) : void 0;
|
|
49794
|
-
}
|
|
49795
|
-
return ids;
|
|
49796
|
-
}
|
|
49797
49646
|
};
|
|
49798
49647
|
}
|
|
49799
49648
|
});
|
|
@@ -50072,7 +49921,6 @@ function compareWorkspacePaths(left, right) {
|
|
|
50072
49921
|
function computeWorkspaceStatus(workspace, options = {}) {
|
|
50073
49922
|
const conflictedFiles = [];
|
|
50074
49923
|
const parseErrors = [];
|
|
50075
|
-
const warnings = [];
|
|
50076
49924
|
const migrationSources = [];
|
|
50077
49925
|
const projectSources = [];
|
|
50078
49926
|
const sourceEntries = options.virtualSourceFiles === void 0 ? listProjectSourceFilesV4(workspace.root).map((filePath) => ({
|
|
@@ -50102,7 +49950,6 @@ function computeWorkspaceStatus(workspace, options = {}) {
|
|
|
50102
49950
|
changes: [],
|
|
50103
49951
|
conflictedFiles,
|
|
50104
49952
|
parseErrors,
|
|
50105
|
-
warnings,
|
|
50106
49953
|
reconstructed: /* @__PURE__ */ new Map(),
|
|
50107
49954
|
staticValueSeeds: /* @__PURE__ */ new Map(),
|
|
50108
49955
|
binaryChanges: [],
|
|
@@ -50151,7 +49998,6 @@ function computeWorkspaceStatus(workspace, options = {}) {
|
|
|
50151
49998
|
changes: [],
|
|
50152
49999
|
conflictedFiles,
|
|
50153
50000
|
parseErrors,
|
|
50154
|
-
warnings,
|
|
50155
50001
|
reconstructed: /* @__PURE__ */ new Map(),
|
|
50156
50002
|
staticValueSeeds,
|
|
50157
50003
|
binaryChanges: [],
|
|
@@ -50176,7 +50022,6 @@ function computeWorkspaceStatus(workspace, options = {}) {
|
|
|
50176
50022
|
changes: [],
|
|
50177
50023
|
conflictedFiles,
|
|
50178
50024
|
parseErrors,
|
|
50179
|
-
warnings,
|
|
50180
50025
|
reconstructed: /* @__PURE__ */ new Map(),
|
|
50181
50026
|
staticValueSeeds,
|
|
50182
50027
|
binaryChanges: [],
|
|
@@ -50224,7 +50069,6 @@ function computeWorkspaceStatus(workspace, options = {}) {
|
|
|
50224
50069
|
changes: [],
|
|
50225
50070
|
conflictedFiles,
|
|
50226
50071
|
parseErrors,
|
|
50227
|
-
warnings,
|
|
50228
50072
|
reconstructed: /* @__PURE__ */ new Map(),
|
|
50229
50073
|
staticValueSeeds: /* @__PURE__ */ new Map(),
|
|
50230
50074
|
binaryChanges: [],
|
|
@@ -50441,16 +50285,15 @@ function computeWorkspaceStatus(workspace, options = {}) {
|
|
|
50441
50285
|
)) {
|
|
50442
50286
|
parseErrors.push(new SchemaSourceError(message, "<project-files>", 1, 1));
|
|
50443
50287
|
}
|
|
50444
|
-
let validatedAnimationRecords = null;
|
|
50445
50288
|
try {
|
|
50446
|
-
|
|
50447
|
-
|
|
50448
|
-
|
|
50449
|
-
|
|
50450
|
-
|
|
50289
|
+
validateProspectiveAnimationRecordsV4(
|
|
50290
|
+
prospectiveAnimationRecords(
|
|
50291
|
+
workspace.state.records,
|
|
50292
|
+
reconstructed3,
|
|
50293
|
+
changes,
|
|
50294
|
+
staticValueSeeds
|
|
50295
|
+
)
|
|
50451
50296
|
);
|
|
50452
|
-
validateProspectiveAnimationRecordsV4(animationRecords);
|
|
50453
|
-
validatedAnimationRecords = animationRecords;
|
|
50454
50297
|
} catch (error) {
|
|
50455
50298
|
parseErrors.push(
|
|
50456
50299
|
new SchemaSourceError(
|
|
@@ -50461,11 +50304,6 @@ function computeWorkspaceStatus(workspace, options = {}) {
|
|
|
50461
50304
|
)
|
|
50462
50305
|
);
|
|
50463
50306
|
}
|
|
50464
|
-
if (validatedAnimationRecords !== null) {
|
|
50465
|
-
warnings.push(
|
|
50466
|
-
...collectProspectiveAnimationWarningsV4(validatedAnimationRecords)
|
|
50467
|
-
);
|
|
50468
|
-
}
|
|
50469
50307
|
for (const binary of binaryChanges) {
|
|
50470
50308
|
if (binary.action !== "missing-local") continue;
|
|
50471
50309
|
parseErrors.push(
|
|
@@ -50481,7 +50319,6 @@ function computeWorkspaceStatus(workspace, options = {}) {
|
|
|
50481
50319
|
changes,
|
|
50482
50320
|
conflictedFiles,
|
|
50483
50321
|
parseErrors,
|
|
50484
|
-
warnings,
|
|
50485
50322
|
reconstructed: reconstructed3,
|
|
50486
50323
|
staticValueSeeds,
|
|
50487
50324
|
binaryChanges,
|
|
@@ -50493,17 +50330,6 @@ function validateProspectiveAnimationRecordsV4(records2) {
|
|
|
50493
50330
|
if (document === null) return;
|
|
50494
50331
|
assertAnimationClipDocumentValid(document);
|
|
50495
50332
|
}
|
|
50496
|
-
function collectProspectiveAnimationWarningsV4(records2) {
|
|
50497
|
-
try {
|
|
50498
|
-
const document = prospectiveAnimationDocumentV4(records2);
|
|
50499
|
-
if (document === null) return [];
|
|
50500
|
-
return collectAnimationClipNestedOwnerWarnings(document).map(
|
|
50501
|
-
(warning) => warning.message
|
|
50502
|
-
);
|
|
50503
|
-
} catch {
|
|
50504
|
-
return [];
|
|
50505
|
-
}
|
|
50506
|
-
}
|
|
50507
50333
|
function prospectiveAnimationDocumentV4(records2) {
|
|
50508
50334
|
const candidates = [...records2];
|
|
50509
50335
|
const hasAnimationSchema = candidates.some(
|
|
@@ -69253,9 +69079,6 @@ ${blockingErrors.map((error) => ` ${error.message}`).join("\n")}`
|
|
|
69253
69079
|
changes: status.changes,
|
|
69254
69080
|
binaryChanges: status.binaryChanges ?? []
|
|
69255
69081
|
});
|
|
69256
|
-
if (options.json !== true) {
|
|
69257
|
-
for (const message of status.warnings) warn(message);
|
|
69258
|
-
}
|
|
69259
69082
|
if (status.changes.length === 0) {
|
|
69260
69083
|
if (options.json === true) {
|
|
69261
69084
|
console.log(
|
|
@@ -69264,8 +69087,7 @@ ${blockingErrors.map((error) => ` ${error.message}`).join("\n")}`
|
|
|
69264
69087
|
dryRun: options.dryRun,
|
|
69265
69088
|
changeCount: 0,
|
|
69266
69089
|
staticValueSeedCount: 0,
|
|
69267
|
-
changes: []
|
|
69268
|
-
warnings: status.warnings
|
|
69090
|
+
changes: []
|
|
69269
69091
|
})
|
|
69270
69092
|
);
|
|
69271
69093
|
} else {
|
|
@@ -69327,8 +69149,7 @@ ${blockingErrors.map((error) => ` ${error.message}`).join("\n")}`
|
|
|
69327
69149
|
kind: change.kind,
|
|
69328
69150
|
recordKind: change.recordKind,
|
|
69329
69151
|
recordId: change.recordId
|
|
69330
|
-
}))
|
|
69331
|
-
warnings: status.warnings
|
|
69152
|
+
}))
|
|
69332
69153
|
})
|
|
69333
69154
|
);
|
|
69334
69155
|
} else {
|
|
@@ -71532,7 +71353,6 @@ function projectStatusJsonV4(status, options) {
|
|
|
71532
71353
|
blocking: isBlockingSchemaSourceError(error),
|
|
71533
71354
|
message: error.message
|
|
71534
71355
|
})),
|
|
71535
|
-
warnings: status.warnings,
|
|
71536
71356
|
records: status.changes.map(
|
|
71537
71357
|
(change) => recordChangeJsonV4(change, status, options)
|
|
71538
71358
|
),
|
|
@@ -72211,9 +72031,6 @@ async function main() {
|
|
|
72211
72031
|
for (const error of status.parseErrors) {
|
|
72212
72032
|
console.log(`${sym.warn} ${error.message}`);
|
|
72213
72033
|
}
|
|
72214
|
-
for (const message of status.warnings) {
|
|
72215
|
-
console.log(`${sym.warn} ${message}`);
|
|
72216
|
-
}
|
|
72217
72034
|
for (const group of groupProjectStatusChangesV4(status)) {
|
|
72218
72035
|
console.log(color.bold(group.source));
|
|
72219
72036
|
for (const change of group.changes) {
|