@neocompose/cli 0.87.1 → 0.87.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/neo-runtime.mjs +503 -419
- package/dist/test-worker.mjs +5 -2
- package/package.json +1 -1
- package/skills/neocompose-cli/SKILL.md +1 -1
- package/skills/neocompose-cli/references/cli-development.md +1 -1
- package/skills/neocompose-cli/references/commands-and-sync.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.87.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 60b71af: Keep stored Lookup selections stable when comparing constructor replay. Isolate uncompiled initializer bodies before animation validation and local test/dry-run evaluation, preventing frozen-record errors and false pending value seeds. Preserve generic bindings and the correct receiver while forwarding base-constructor arguments. Evaluate computed animation defaults consistently during validation and export.
|
|
8
|
+
|
|
3
9
|
## 0.87.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/neo-runtime.mjs
CHANGED
|
@@ -18457,7 +18457,7 @@ var init_registry = __esm({
|
|
|
18457
18457
|
"../packages/manifest/schema-contract/registry.mjs"() {
|
|
18458
18458
|
"use strict";
|
|
18459
18459
|
PROJECT_SCHEMA_CONTRACT = Object.freeze({
|
|
18460
|
-
cliVersion: "0.87.
|
|
18460
|
+
cliVersion: "0.87.2",
|
|
18461
18461
|
projectFileUploadBatchSize: 32,
|
|
18462
18462
|
documentRecords: {
|
|
18463
18463
|
member: {
|
|
@@ -46436,7 +46436,7 @@ function evaluateBaseConstructorArguments(record7, baseRecord, argumentValues, t
|
|
|
46436
46436
|
argument2.name,
|
|
46437
46437
|
executeCompiledFunction(
|
|
46438
46438
|
getter,
|
|
46439
|
-
|
|
46439
|
+
bindThisValue(ctx, thisValue),
|
|
46440
46440
|
argumentValues,
|
|
46441
46441
|
false
|
|
46442
46442
|
)
|
|
@@ -47985,7 +47985,10 @@ function constructDeclaredClassValueWithinFrame(descriptor, record7, info, scope
|
|
|
47985
47985
|
const preparedArgumentScopes = prepareConstructorArgumentScopes(
|
|
47986
47986
|
record7,
|
|
47987
47987
|
argumentValues,
|
|
47988
|
-
|
|
47988
|
+
{
|
|
47989
|
+
...bindThisValue(ctx, null),
|
|
47990
|
+
__initializerGenericEnv: descriptor.instanceEnv
|
|
47991
|
+
}
|
|
47989
47992
|
);
|
|
47990
47993
|
const createdValues = [];
|
|
47991
47994
|
const storageKeyDeclarations = /* @__PURE__ */ new Map();
|
|
@@ -112961,8 +112964,15 @@ function createTypedValueNormalizer(reader, document, childrenByContainerId, par
|
|
|
112961
112964
|
return result;
|
|
112962
112965
|
};
|
|
112963
112966
|
const normalizeTypedLiteral = (value, typeInfo) => {
|
|
112964
|
-
if (referenceTargets !== void 0 && typeInfo.type === 29 /* Reference */
|
|
112965
|
-
return referenceTargets(value);
|
|
112967
|
+
if (referenceTargets !== void 0 && typeInfo.type === 29 /* Reference */) {
|
|
112968
|
+
if (typeof value === "string") return referenceTargets(value);
|
|
112969
|
+
if (Array.isArray(value))
|
|
112970
|
+
return value.map((entry) => normalizeTypedLiteral(entry, typeInfo));
|
|
112971
|
+
}
|
|
112972
|
+
if (typeInfo.type === 9 /* Lookup */ && Array.isArray(value))
|
|
112973
|
+
return value.map(
|
|
112974
|
+
(entry) => normalizeTypedLiteral(entry, typeInfo.entryTypeInfo)
|
|
112975
|
+
);
|
|
112966
112976
|
if (typeInfo.type === 25 /* NSDelegate */ && value !== null && typeof value === "object" && !Array.isArray(value) && typeof Reflect.get(value, "code") === "string") {
|
|
112967
112977
|
const captures = Reflect.get(value, "captures");
|
|
112968
112978
|
return {
|
|
@@ -113583,6 +113593,14 @@ var init_effective_value_reader = __esm({
|
|
|
113583
113593
|
this.classDefaultRows.set(valueId, projected);
|
|
113584
113594
|
return projected;
|
|
113585
113595
|
}
|
|
113596
|
+
/** Project all resolved graphs, including fields backed by declaration defaults. */
|
|
113597
|
+
rowsWithClassDefaults() {
|
|
113598
|
+
const rows = /* @__PURE__ */ new Map();
|
|
113599
|
+
for (const row of this.effectiveRows.values()) {
|
|
113600
|
+
rows.set(row.id, this.rowWithClassDefaults(row.id) ?? row);
|
|
113601
|
+
}
|
|
113602
|
+
return rows;
|
|
113603
|
+
}
|
|
113586
113604
|
/** Resolve every owned descendant before a caller finalizes its read tracking. */
|
|
113587
113605
|
resolveGraph(valueId, placement) {
|
|
113588
113606
|
this.placements.set(valueId, placement);
|
|
@@ -126601,159 +126619,247 @@ var init_dialogue_lower = __esm({
|
|
|
126601
126619
|
}
|
|
126602
126620
|
});
|
|
126603
126621
|
|
|
126604
|
-
// src/
|
|
126605
|
-
function
|
|
126606
|
-
const
|
|
126607
|
-
if (
|
|
126608
|
-
|
|
126609
|
-
|
|
126610
|
-
|
|
126611
|
-
|
|
126612
|
-
if (isFrozenJsonData(base)) {
|
|
126613
|
-
freezeJsonData(fields);
|
|
126614
|
-
authoredFields.set(base, fields);
|
|
126615
|
-
storedRows.set(fields, base);
|
|
126622
|
+
// ../src/database/document-initializer-compiler.ts
|
|
126623
|
+
function initializerCompilerState(document, compilationProject) {
|
|
126624
|
+
const existing = documentInitializerCompilerStates.get(document);
|
|
126625
|
+
if (existing !== void 0) {
|
|
126626
|
+
if (compilationProject !== void 0) {
|
|
126627
|
+
existing.compilationProject = compilationProject;
|
|
126628
|
+
}
|
|
126629
|
+
return existing;
|
|
126616
126630
|
}
|
|
126617
|
-
|
|
126631
|
+
const created = {
|
|
126632
|
+
compilationProject: compilationProject ?? null
|
|
126633
|
+
};
|
|
126634
|
+
documentInitializerCompilerStates.set(document, created);
|
|
126635
|
+
return created;
|
|
126618
126636
|
}
|
|
126619
|
-
function
|
|
126620
|
-
|
|
126621
|
-
|
|
126622
|
-
|
|
126623
|
-
|
|
126624
|
-
|
|
126625
|
-
|
|
126626
|
-
|
|
126627
|
-
|
|
126637
|
+
function compilationProjectForDocument(document, state) {
|
|
126638
|
+
state.compilationProject ??= createNeoScriptCompilationProject({
|
|
126639
|
+
project: document.project,
|
|
126640
|
+
projectFiles: document.projectFiles,
|
|
126641
|
+
dialogueGroups: document.dialogueGroups,
|
|
126642
|
+
members: document.members,
|
|
126643
|
+
classes: document.classes,
|
|
126644
|
+
enums: document.enums,
|
|
126645
|
+
interfaces: document.interfaces,
|
|
126646
|
+
constructors: document.constructors ?? []
|
|
126647
|
+
});
|
|
126648
|
+
return state.compilationProject;
|
|
126649
|
+
}
|
|
126650
|
+
function documentMemberCompilationIndex(document) {
|
|
126651
|
+
const existing = documentMemberCompilationIndexes.get(document);
|
|
126652
|
+
if (existing !== void 0) return existing;
|
|
126653
|
+
const created = {
|
|
126654
|
+
membersById: new Map(
|
|
126655
|
+
document.members.map((member) => [member.id, member])
|
|
126656
|
+
),
|
|
126657
|
+
ownerClassesByMemberId: new Map(
|
|
126658
|
+
document.classes.flatMap(
|
|
126659
|
+
(schemaClass2) => Object.values(schemaClass2.schema).map(
|
|
126660
|
+
(memberId) => [memberId, schemaClass2]
|
|
126661
|
+
)
|
|
126662
|
+
)
|
|
126663
|
+
)
|
|
126664
|
+
};
|
|
126665
|
+
documentMemberCompilationIndexes.set(document, created);
|
|
126666
|
+
return created;
|
|
126667
|
+
}
|
|
126668
|
+
function documentInitializerCompiler(document, compilationProject) {
|
|
126669
|
+
const state = initializerCompilerState(document, compilationProject);
|
|
126670
|
+
return (site) => {
|
|
126671
|
+
if (site.sourceValueId !== null) {
|
|
126672
|
+
compileValueInitializerDependency(
|
|
126673
|
+
document,
|
|
126674
|
+
site.sourceValueId,
|
|
126675
|
+
compilationProjectForDocument(document, state)
|
|
126676
|
+
);
|
|
126677
|
+
return;
|
|
126678
|
+
}
|
|
126679
|
+
if (site.memberId === null) return;
|
|
126680
|
+
compileMemberInitializerDependency(
|
|
126681
|
+
document,
|
|
126682
|
+
site.memberId,
|
|
126683
|
+
compilationProjectForDocument(document, state)
|
|
126684
|
+
);
|
|
126685
|
+
};
|
|
126686
|
+
}
|
|
126687
|
+
function valueInitializerCompilationSites(document) {
|
|
126688
|
+
const cached = documentValueInitializerCompilationSites.get(document);
|
|
126689
|
+
if (cached !== void 0) return cached;
|
|
126690
|
+
const rows = document.values.filter(isInitValueContent);
|
|
126691
|
+
const valuesById = new Map(
|
|
126692
|
+
document.values.map((value) => [value.id, value])
|
|
126693
|
+
);
|
|
126694
|
+
const ownershipTargetIds = valueIdsWithSourceChains(
|
|
126695
|
+
new Set(rows.map((row) => row.id)),
|
|
126696
|
+
valuesById
|
|
126697
|
+
);
|
|
126698
|
+
const rootOwners = /* @__PURE__ */ new Map();
|
|
126699
|
+
const owners = resolveOwnerMembersForValues(
|
|
126700
|
+
document,
|
|
126701
|
+
ownershipTargetIds,
|
|
126702
|
+
void 0,
|
|
126703
|
+
rootOwners
|
|
126704
|
+
);
|
|
126705
|
+
const sites = /* @__PURE__ */ new Map();
|
|
126706
|
+
for (const row of rows) {
|
|
126707
|
+
const member = owners.get(row.id);
|
|
126708
|
+
if (member === void 0) continue;
|
|
126709
|
+
const ownerContext = initializerOwnerContext(
|
|
126710
|
+
document,
|
|
126711
|
+
row.id,
|
|
126712
|
+
rootOwners,
|
|
126713
|
+
valuesById
|
|
126714
|
+
);
|
|
126715
|
+
sites.set(row.id, {
|
|
126716
|
+
row,
|
|
126717
|
+
member,
|
|
126718
|
+
ownerClass: ownerContext.declaringClass,
|
|
126719
|
+
lexicalThisClass: ownerContext.lexicalThisClass
|
|
126720
|
+
});
|
|
126628
126721
|
}
|
|
126629
|
-
|
|
126722
|
+
documentValueInitializerCompilationSites.set(document, sites);
|
|
126723
|
+
return sites;
|
|
126630
126724
|
}
|
|
126631
|
-
function
|
|
126632
|
-
const
|
|
126633
|
-
if (
|
|
126634
|
-
|
|
126635
|
-
|
|
126636
|
-
|
|
126637
|
-
if (baseData3[field] !== void 0) fullData[field] = baseData3[field];
|
|
126725
|
+
function compileValueInitializerDependency(document, valueId, compilationProject) {
|
|
126726
|
+
const site = valueInitializerCompilationSites(document).get(valueId);
|
|
126727
|
+
if (site === void 0) {
|
|
126728
|
+
throw new Error(
|
|
126729
|
+
"Cannot compile initializer dependency because its source value row is unresolved."
|
|
126730
|
+
);
|
|
126638
126731
|
}
|
|
126639
|
-
|
|
126732
|
+
compileValueRowInitializerBody({
|
|
126733
|
+
project: document.project,
|
|
126734
|
+
projectFiles: document.projectFiles,
|
|
126735
|
+
dialogueGroups: document.dialogueGroups,
|
|
126736
|
+
members: document.members,
|
|
126737
|
+
classes: document.classes,
|
|
126738
|
+
enums: document.enums,
|
|
126739
|
+
interfaces: document.interfaces,
|
|
126740
|
+
constructors: document.constructors ?? [],
|
|
126741
|
+
member: site.member,
|
|
126742
|
+
valueRow: { ...site.row },
|
|
126743
|
+
valueId: site.row.id,
|
|
126744
|
+
initializerOwnerClass: site.ownerClass,
|
|
126745
|
+
lexicalThisClass: site.lexicalThisClass,
|
|
126746
|
+
storedConstructionReplay: true,
|
|
126747
|
+
...compilationProject === void 0 ? {} : { compilationProject }
|
|
126748
|
+
});
|
|
126640
126749
|
}
|
|
126641
|
-
function
|
|
126642
|
-
|
|
126750
|
+
function compileMemberInitializerDependency(document, memberId, compilationProject) {
|
|
126751
|
+
const compileArgs = {
|
|
126752
|
+
project: document.project,
|
|
126753
|
+
projectFiles: document.projectFiles,
|
|
126754
|
+
dialogueGroups: document.dialogueGroups,
|
|
126755
|
+
members: document.members,
|
|
126756
|
+
classes: document.classes,
|
|
126757
|
+
enums: document.enums,
|
|
126758
|
+
interfaces: document.interfaces,
|
|
126759
|
+
constructors: document.constructors ?? []
|
|
126760
|
+
};
|
|
126761
|
+
const memberIndex = documentMemberCompilationIndex(document);
|
|
126762
|
+
const member = memberIndex.membersById.get(memberId);
|
|
126763
|
+
if (member === void 0) {
|
|
126764
|
+
throw new Error(
|
|
126765
|
+
`Cannot compile initializer dependency for missing member "${memberId}".`
|
|
126766
|
+
);
|
|
126767
|
+
}
|
|
126768
|
+
const thisClass = memberIndex.ownerClassesByMemberId.get(memberId) ?? null;
|
|
126769
|
+
compileMemberInitializerBody({
|
|
126770
|
+
...compileArgs,
|
|
126771
|
+
member,
|
|
126772
|
+
thisClass,
|
|
126773
|
+
...compilationProject === void 0 ? {} : { compilationProject }
|
|
126774
|
+
});
|
|
126643
126775
|
}
|
|
126644
|
-
var
|
|
126645
|
-
var
|
|
126646
|
-
"src/
|
|
126776
|
+
var documentInitializerCompilerStates, documentMemberCompilationIndexes, documentValueInitializerCompilationSites;
|
|
126777
|
+
var init_document_initializer_compiler = __esm({
|
|
126778
|
+
"../src/database/document-initializer-compiler.ts"() {
|
|
126647
126779
|
"use strict";
|
|
126648
|
-
|
|
126649
|
-
|
|
126650
|
-
|
|
126651
|
-
|
|
126652
|
-
|
|
126780
|
+
init_members();
|
|
126781
|
+
init_compile_ns_property();
|
|
126782
|
+
init_compiler_adapter();
|
|
126783
|
+
init_value_row_owner_members();
|
|
126784
|
+
documentInitializerCompilerStates = /* @__PURE__ */ new WeakMap();
|
|
126785
|
+
documentMemberCompilationIndexes = /* @__PURE__ */ new WeakMap();
|
|
126786
|
+
documentValueInitializerCompilationSites = /* @__PURE__ */ new WeakMap();
|
|
126653
126787
|
}
|
|
126654
126788
|
});
|
|
126655
126789
|
|
|
126656
|
-
//
|
|
126657
|
-
function
|
|
126658
|
-
|
|
126659
|
-
|
|
126660
|
-
|
|
126661
|
-
const byId = new Map(oldEntries.map((entry) => [entry.id, entry]));
|
|
126662
|
-
const products = entries.map((entry) => {
|
|
126663
|
-
const old = byId.get(entry.id);
|
|
126664
|
-
return old !== void 0 && jsonDataEqual(entry, old) ? old : freezeJsonData(entry);
|
|
126665
|
-
});
|
|
126666
|
-
return products.length === oldEntries.length && products.every((entry, index) => entry === oldEntries[index]) ? oldEntries : products;
|
|
126667
|
-
}
|
|
126668
|
-
const result = freezeJsonData({
|
|
126669
|
-
...manifest,
|
|
126670
|
-
classes: collection(manifest.classes, previous.classes),
|
|
126671
|
-
constructors: collection(manifest.constructors, previous.constructors),
|
|
126672
|
-
members: collection(manifest.members, previous.members),
|
|
126673
|
-
interfaces: collection(manifest.interfaces, previous.interfaces),
|
|
126674
|
-
enums: collection(manifest.enums, previous.enums),
|
|
126675
|
-
variants: collection(manifest.variants, previous.variants),
|
|
126676
|
-
variantFolders: collection(
|
|
126677
|
-
manifest.variantFolders,
|
|
126678
|
-
previous.variantFolders
|
|
126679
|
-
),
|
|
126680
|
-
textureTemplates: collection(
|
|
126681
|
-
manifest.textureTemplates,
|
|
126682
|
-
previous.textureTemplates
|
|
126683
|
-
),
|
|
126684
|
-
audioTemplates: collection(
|
|
126685
|
-
manifest.audioTemplates,
|
|
126686
|
-
previous.audioTemplates
|
|
126687
|
-
),
|
|
126688
|
-
localizationStatuses: collection(
|
|
126689
|
-
manifest.localizationStatuses,
|
|
126690
|
-
previous.localizationStatuses
|
|
126691
|
-
),
|
|
126692
|
-
internalRecordRelations: collection(
|
|
126693
|
-
manifest.internalRecordRelations,
|
|
126694
|
-
previous.internalRecordRelations
|
|
126695
|
-
),
|
|
126696
|
-
localization: jsonDataEqual(manifest.localization, previous.localization) ? previous.localization : manifest.localization
|
|
126790
|
+
// ../packages/neoscript-runtime/src/materialize-values.ts
|
|
126791
|
+
function materializeInitializerValue2(args) {
|
|
126792
|
+
return materializeInitializerValue({
|
|
126793
|
+
...args,
|
|
126794
|
+
evaluateInitializer: evaluateMemberInitializer
|
|
126697
126795
|
});
|
|
126698
|
-
const product = jsonDataEqual(previous, result) ? previous : result;
|
|
126699
|
-
previousManifests.set(base, product);
|
|
126700
|
-
return product;
|
|
126701
|
-
}
|
|
126702
|
-
function createSchemaDocumentMemo() {
|
|
126703
|
-
const products = /* @__PURE__ */ new WeakMap();
|
|
126704
|
-
return (base, documents, discriminator, compute) => {
|
|
126705
|
-
if (!isFrozenJsonData(base) || !documents.every(isFrozenJsonData))
|
|
126706
|
-
return compute();
|
|
126707
|
-
const previous = products.get(base);
|
|
126708
|
-
if (previous?.discriminator === discriminator && previous.documents.length === documents.length && documents.every(
|
|
126709
|
-
(document, index) => document === previous.documents[index]
|
|
126710
|
-
))
|
|
126711
|
-
return previous.result;
|
|
126712
|
-
const result = compute();
|
|
126713
|
-
products.set(base, { documents: [...documents], discriminator, result });
|
|
126714
|
-
return result;
|
|
126715
|
-
};
|
|
126716
126796
|
}
|
|
126717
|
-
|
|
126718
|
-
|
|
126719
|
-
if (jsonDataEqual(document.data, data)) return document;
|
|
126720
|
-
const previous = patchedDocuments.get(document);
|
|
126721
|
-
if (previous !== void 0 && jsonDataEqual(previous.data, data))
|
|
126722
|
-
return previous;
|
|
126723
|
-
const result = freezeJsonData({ ...document, data });
|
|
126724
|
-
patchedDocuments.set(document, result);
|
|
126725
|
-
return result;
|
|
126726
|
-
}
|
|
126727
|
-
var previousManifests, patchedDocuments;
|
|
126728
|
-
var init_schema_products = __esm({
|
|
126729
|
-
"src/project-source/schema-products.ts"() {
|
|
126797
|
+
var init_materialize_values = __esm({
|
|
126798
|
+
"../packages/neoscript-runtime/src/materialize-values.ts"() {
|
|
126730
126799
|
"use strict";
|
|
126731
|
-
|
|
126732
|
-
|
|
126733
|
-
patchedDocuments = /* @__PURE__ */ new WeakMap();
|
|
126800
|
+
init_evaluateInitializer();
|
|
126801
|
+
init_initializer_materialization();
|
|
126734
126802
|
}
|
|
126735
126803
|
});
|
|
126736
126804
|
|
|
126737
|
-
// src/
|
|
126738
|
-
function
|
|
126739
|
-
const
|
|
126740
|
-
if (
|
|
126741
|
-
const
|
|
126742
|
-
|
|
126743
|
-
|
|
126744
|
-
|
|
126745
|
-
|
|
126746
|
-
|
|
126747
|
-
|
|
126805
|
+
// ../packages/models/src/localization/localized-text-create-envelope.ts
|
|
126806
|
+
function completeLocalizedTextCreateEnvelope(data, config) {
|
|
126807
|
+
const text = asUnknownRecord(data);
|
|
126808
|
+
if (text === null) return data;
|
|
126809
|
+
const localeValues = asUnknownRecord(text.localeValues);
|
|
126810
|
+
const mainLocaleValue = localeValues === null ? null : asUnknownRecord(localeValues[config.mainLocale]);
|
|
126811
|
+
const completedMainLocaleValue = mainLocaleValue === null ? null : {
|
|
126812
|
+
...mainLocaleValue,
|
|
126813
|
+
...mainLocaleValue.statusId === void 0 ? { statusId: config.mainLocaleDefaultStatusId } : {},
|
|
126814
|
+
...mainLocaleValue.updatedAt === void 0 && text.updatedAt !== void 0 ? { updatedAt: text.updatedAt } : {}
|
|
126815
|
+
};
|
|
126816
|
+
return {
|
|
126817
|
+
...text,
|
|
126818
|
+
...text.links === void 0 ? { links: [] } : {},
|
|
126819
|
+
...localeValues === null || completedMainLocaleValue === null ? {} : {
|
|
126820
|
+
localeValues: {
|
|
126821
|
+
...localeValues,
|
|
126822
|
+
[config.mainLocale]: completedMainLocaleValue
|
|
126823
|
+
}
|
|
126824
|
+
}
|
|
126825
|
+
};
|
|
126826
|
+
}
|
|
126827
|
+
function buildLocalizedTextCreateForLink(args) {
|
|
126828
|
+
const completed = completeLocalizedTextCreateEnvelope(
|
|
126829
|
+
{
|
|
126830
|
+
id: args.id,
|
|
126831
|
+
projectId: args.projectId,
|
|
126832
|
+
...args.memberSource === void 0 ? {} : { memberSource: args.memberSource },
|
|
126833
|
+
sourceComment: null,
|
|
126834
|
+
links: args.memberSource === void 0 ? [args.link] : [],
|
|
126835
|
+
localeValues: {
|
|
126836
|
+
[args.config.mainLocale]: {
|
|
126837
|
+
value: args.value,
|
|
126838
|
+
localeComment: null
|
|
126839
|
+
}
|
|
126840
|
+
},
|
|
126841
|
+
createdAt: args.now,
|
|
126842
|
+
updatedAt: args.now
|
|
126843
|
+
},
|
|
126844
|
+
args.config
|
|
126845
|
+
);
|
|
126846
|
+
if (!isLocalizedText(completed)) {
|
|
126847
|
+
throw new Error(
|
|
126848
|
+
`Localized text "${args.id}" could not be completed into a valid create envelope.`
|
|
126849
|
+
);
|
|
126748
126850
|
}
|
|
126749
|
-
return
|
|
126851
|
+
return completed;
|
|
126750
126852
|
}
|
|
126751
|
-
|
|
126752
|
-
|
|
126753
|
-
|
|
126853
|
+
function asUnknownRecord(value) {
|
|
126854
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
126855
|
+
return null;
|
|
126856
|
+
}
|
|
126857
|
+
return value;
|
|
126858
|
+
}
|
|
126859
|
+
var init_localized_text_create_envelope = __esm({
|
|
126860
|
+
"../packages/models/src/localization/localized-text-create-envelope.ts"() {
|
|
126754
126861
|
"use strict";
|
|
126755
|
-
|
|
126756
|
-
bases = /* @__PURE__ */ new WeakMap();
|
|
126862
|
+
init_localization_types();
|
|
126757
126863
|
}
|
|
126758
126864
|
});
|
|
126759
126865
|
|
|
@@ -127763,250 +127869,6 @@ var init_neo_script_recompile_scope = __esm({
|
|
|
127763
127869
|
}
|
|
127764
127870
|
});
|
|
127765
127871
|
|
|
127766
|
-
// ../src/database/document-initializer-compiler.ts
|
|
127767
|
-
function initializerCompilerState(document, compilationProject) {
|
|
127768
|
-
const existing = documentInitializerCompilerStates.get(document);
|
|
127769
|
-
if (existing !== void 0) {
|
|
127770
|
-
if (compilationProject !== void 0) {
|
|
127771
|
-
existing.compilationProject = compilationProject;
|
|
127772
|
-
}
|
|
127773
|
-
return existing;
|
|
127774
|
-
}
|
|
127775
|
-
const created = {
|
|
127776
|
-
compilationProject: compilationProject ?? null
|
|
127777
|
-
};
|
|
127778
|
-
documentInitializerCompilerStates.set(document, created);
|
|
127779
|
-
return created;
|
|
127780
|
-
}
|
|
127781
|
-
function compilationProjectForDocument(document, state) {
|
|
127782
|
-
state.compilationProject ??= createNeoScriptCompilationProject({
|
|
127783
|
-
project: document.project,
|
|
127784
|
-
projectFiles: document.projectFiles,
|
|
127785
|
-
dialogueGroups: document.dialogueGroups,
|
|
127786
|
-
members: document.members,
|
|
127787
|
-
classes: document.classes,
|
|
127788
|
-
enums: document.enums,
|
|
127789
|
-
interfaces: document.interfaces,
|
|
127790
|
-
constructors: document.constructors ?? []
|
|
127791
|
-
});
|
|
127792
|
-
return state.compilationProject;
|
|
127793
|
-
}
|
|
127794
|
-
function documentMemberCompilationIndex(document) {
|
|
127795
|
-
const existing = documentMemberCompilationIndexes.get(document);
|
|
127796
|
-
if (existing !== void 0) return existing;
|
|
127797
|
-
const created = {
|
|
127798
|
-
membersById: new Map(
|
|
127799
|
-
document.members.map((member) => [member.id, member])
|
|
127800
|
-
),
|
|
127801
|
-
ownerClassesByMemberId: new Map(
|
|
127802
|
-
document.classes.flatMap(
|
|
127803
|
-
(schemaClass2) => Object.values(schemaClass2.schema).map(
|
|
127804
|
-
(memberId) => [memberId, schemaClass2]
|
|
127805
|
-
)
|
|
127806
|
-
)
|
|
127807
|
-
)
|
|
127808
|
-
};
|
|
127809
|
-
documentMemberCompilationIndexes.set(document, created);
|
|
127810
|
-
return created;
|
|
127811
|
-
}
|
|
127812
|
-
function documentInitializerCompiler(document, compilationProject) {
|
|
127813
|
-
const state = initializerCompilerState(document, compilationProject);
|
|
127814
|
-
return (site) => {
|
|
127815
|
-
if (site.sourceValueId !== null) {
|
|
127816
|
-
compileValueInitializerDependency(
|
|
127817
|
-
document,
|
|
127818
|
-
site.sourceValueId,
|
|
127819
|
-
compilationProjectForDocument(document, state)
|
|
127820
|
-
);
|
|
127821
|
-
return;
|
|
127822
|
-
}
|
|
127823
|
-
if (site.memberId === null) return;
|
|
127824
|
-
compileMemberInitializerDependency(
|
|
127825
|
-
document,
|
|
127826
|
-
site.memberId,
|
|
127827
|
-
compilationProjectForDocument(document, state)
|
|
127828
|
-
);
|
|
127829
|
-
};
|
|
127830
|
-
}
|
|
127831
|
-
function valueInitializerCompilationSites(document) {
|
|
127832
|
-
const cached = documentValueInitializerCompilationSites.get(document);
|
|
127833
|
-
if (cached !== void 0) return cached;
|
|
127834
|
-
const rows = document.values.filter(isInitValueContent);
|
|
127835
|
-
const valuesById = new Map(
|
|
127836
|
-
document.values.map((value) => [value.id, value])
|
|
127837
|
-
);
|
|
127838
|
-
const ownershipTargetIds = valueIdsWithSourceChains(
|
|
127839
|
-
new Set(rows.map((row) => row.id)),
|
|
127840
|
-
valuesById
|
|
127841
|
-
);
|
|
127842
|
-
const rootOwners = /* @__PURE__ */ new Map();
|
|
127843
|
-
const owners = resolveOwnerMembersForValues(
|
|
127844
|
-
document,
|
|
127845
|
-
ownershipTargetIds,
|
|
127846
|
-
void 0,
|
|
127847
|
-
rootOwners
|
|
127848
|
-
);
|
|
127849
|
-
const sites = /* @__PURE__ */ new Map();
|
|
127850
|
-
for (const row of rows) {
|
|
127851
|
-
const member = owners.get(row.id);
|
|
127852
|
-
if (member === void 0) continue;
|
|
127853
|
-
const ownerContext = initializerOwnerContext(
|
|
127854
|
-
document,
|
|
127855
|
-
row.id,
|
|
127856
|
-
rootOwners,
|
|
127857
|
-
valuesById
|
|
127858
|
-
);
|
|
127859
|
-
sites.set(row.id, {
|
|
127860
|
-
row,
|
|
127861
|
-
member,
|
|
127862
|
-
ownerClass: ownerContext.declaringClass,
|
|
127863
|
-
lexicalThisClass: ownerContext.lexicalThisClass
|
|
127864
|
-
});
|
|
127865
|
-
}
|
|
127866
|
-
documentValueInitializerCompilationSites.set(document, sites);
|
|
127867
|
-
return sites;
|
|
127868
|
-
}
|
|
127869
|
-
function compileValueInitializerDependency(document, valueId, compilationProject) {
|
|
127870
|
-
const site = valueInitializerCompilationSites(document).get(valueId);
|
|
127871
|
-
if (site === void 0) {
|
|
127872
|
-
throw new Error(
|
|
127873
|
-
"Cannot compile initializer dependency because its source value row is unresolved."
|
|
127874
|
-
);
|
|
127875
|
-
}
|
|
127876
|
-
compileValueRowInitializerBody({
|
|
127877
|
-
project: document.project,
|
|
127878
|
-
projectFiles: document.projectFiles,
|
|
127879
|
-
dialogueGroups: document.dialogueGroups,
|
|
127880
|
-
members: document.members,
|
|
127881
|
-
classes: document.classes,
|
|
127882
|
-
enums: document.enums,
|
|
127883
|
-
interfaces: document.interfaces,
|
|
127884
|
-
constructors: document.constructors ?? [],
|
|
127885
|
-
member: site.member,
|
|
127886
|
-
valueRow: { ...site.row },
|
|
127887
|
-
valueId: site.row.id,
|
|
127888
|
-
initializerOwnerClass: site.ownerClass,
|
|
127889
|
-
lexicalThisClass: site.lexicalThisClass,
|
|
127890
|
-
storedConstructionReplay: true,
|
|
127891
|
-
...compilationProject === void 0 ? {} : { compilationProject }
|
|
127892
|
-
});
|
|
127893
|
-
}
|
|
127894
|
-
function compileMemberInitializerDependency(document, memberId, compilationProject) {
|
|
127895
|
-
const compileArgs = {
|
|
127896
|
-
project: document.project,
|
|
127897
|
-
projectFiles: document.projectFiles,
|
|
127898
|
-
dialogueGroups: document.dialogueGroups,
|
|
127899
|
-
members: document.members,
|
|
127900
|
-
classes: document.classes,
|
|
127901
|
-
enums: document.enums,
|
|
127902
|
-
interfaces: document.interfaces,
|
|
127903
|
-
constructors: document.constructors ?? []
|
|
127904
|
-
};
|
|
127905
|
-
const memberIndex = documentMemberCompilationIndex(document);
|
|
127906
|
-
const member = memberIndex.membersById.get(memberId);
|
|
127907
|
-
if (member === void 0) {
|
|
127908
|
-
throw new Error(
|
|
127909
|
-
`Cannot compile initializer dependency for missing member "${memberId}".`
|
|
127910
|
-
);
|
|
127911
|
-
}
|
|
127912
|
-
const thisClass = memberIndex.ownerClassesByMemberId.get(memberId) ?? null;
|
|
127913
|
-
compileMemberInitializerBody({
|
|
127914
|
-
...compileArgs,
|
|
127915
|
-
member,
|
|
127916
|
-
thisClass,
|
|
127917
|
-
...compilationProject === void 0 ? {} : { compilationProject }
|
|
127918
|
-
});
|
|
127919
|
-
}
|
|
127920
|
-
var documentInitializerCompilerStates, documentMemberCompilationIndexes, documentValueInitializerCompilationSites;
|
|
127921
|
-
var init_document_initializer_compiler = __esm({
|
|
127922
|
-
"../src/database/document-initializer-compiler.ts"() {
|
|
127923
|
-
"use strict";
|
|
127924
|
-
init_members();
|
|
127925
|
-
init_compile_ns_property();
|
|
127926
|
-
init_compiler_adapter();
|
|
127927
|
-
init_value_row_owner_members();
|
|
127928
|
-
documentInitializerCompilerStates = /* @__PURE__ */ new WeakMap();
|
|
127929
|
-
documentMemberCompilationIndexes = /* @__PURE__ */ new WeakMap();
|
|
127930
|
-
documentValueInitializerCompilationSites = /* @__PURE__ */ new WeakMap();
|
|
127931
|
-
}
|
|
127932
|
-
});
|
|
127933
|
-
|
|
127934
|
-
// ../packages/neoscript-runtime/src/materialize-values.ts
|
|
127935
|
-
function materializeInitializerValue2(args) {
|
|
127936
|
-
return materializeInitializerValue({
|
|
127937
|
-
...args,
|
|
127938
|
-
evaluateInitializer: evaluateMemberInitializer
|
|
127939
|
-
});
|
|
127940
|
-
}
|
|
127941
|
-
var init_materialize_values = __esm({
|
|
127942
|
-
"../packages/neoscript-runtime/src/materialize-values.ts"() {
|
|
127943
|
-
"use strict";
|
|
127944
|
-
init_evaluateInitializer();
|
|
127945
|
-
init_initializer_materialization();
|
|
127946
|
-
}
|
|
127947
|
-
});
|
|
127948
|
-
|
|
127949
|
-
// ../packages/models/src/localization/localized-text-create-envelope.ts
|
|
127950
|
-
function completeLocalizedTextCreateEnvelope(data, config) {
|
|
127951
|
-
const text = asUnknownRecord(data);
|
|
127952
|
-
if (text === null) return data;
|
|
127953
|
-
const localeValues = asUnknownRecord(text.localeValues);
|
|
127954
|
-
const mainLocaleValue = localeValues === null ? null : asUnknownRecord(localeValues[config.mainLocale]);
|
|
127955
|
-
const completedMainLocaleValue = mainLocaleValue === null ? null : {
|
|
127956
|
-
...mainLocaleValue,
|
|
127957
|
-
...mainLocaleValue.statusId === void 0 ? { statusId: config.mainLocaleDefaultStatusId } : {},
|
|
127958
|
-
...mainLocaleValue.updatedAt === void 0 && text.updatedAt !== void 0 ? { updatedAt: text.updatedAt } : {}
|
|
127959
|
-
};
|
|
127960
|
-
return {
|
|
127961
|
-
...text,
|
|
127962
|
-
...text.links === void 0 ? { links: [] } : {},
|
|
127963
|
-
...localeValues === null || completedMainLocaleValue === null ? {} : {
|
|
127964
|
-
localeValues: {
|
|
127965
|
-
...localeValues,
|
|
127966
|
-
[config.mainLocale]: completedMainLocaleValue
|
|
127967
|
-
}
|
|
127968
|
-
}
|
|
127969
|
-
};
|
|
127970
|
-
}
|
|
127971
|
-
function buildLocalizedTextCreateForLink(args) {
|
|
127972
|
-
const completed = completeLocalizedTextCreateEnvelope(
|
|
127973
|
-
{
|
|
127974
|
-
id: args.id,
|
|
127975
|
-
projectId: args.projectId,
|
|
127976
|
-
...args.memberSource === void 0 ? {} : { memberSource: args.memberSource },
|
|
127977
|
-
sourceComment: null,
|
|
127978
|
-
links: args.memberSource === void 0 ? [args.link] : [],
|
|
127979
|
-
localeValues: {
|
|
127980
|
-
[args.config.mainLocale]: {
|
|
127981
|
-
value: args.value,
|
|
127982
|
-
localeComment: null
|
|
127983
|
-
}
|
|
127984
|
-
},
|
|
127985
|
-
createdAt: args.now,
|
|
127986
|
-
updatedAt: args.now
|
|
127987
|
-
},
|
|
127988
|
-
args.config
|
|
127989
|
-
);
|
|
127990
|
-
if (!isLocalizedText(completed)) {
|
|
127991
|
-
throw new Error(
|
|
127992
|
-
`Localized text "${args.id}" could not be completed into a valid create envelope.`
|
|
127993
|
-
);
|
|
127994
|
-
}
|
|
127995
|
-
return completed;
|
|
127996
|
-
}
|
|
127997
|
-
function asUnknownRecord(value) {
|
|
127998
|
-
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
127999
|
-
return null;
|
|
128000
|
-
}
|
|
128001
|
-
return value;
|
|
128002
|
-
}
|
|
128003
|
-
var init_localized_text_create_envelope = __esm({
|
|
128004
|
-
"../packages/models/src/localization/localized-text-create-envelope.ts"() {
|
|
128005
|
-
"use strict";
|
|
128006
|
-
init_localization_types();
|
|
128007
|
-
}
|
|
128008
|
-
});
|
|
128009
|
-
|
|
128010
127872
|
// ../src/database/project-record-live-references.ts
|
|
128011
127873
|
function projectRecordLiveReferenceIds(kind, data, targetIds) {
|
|
128012
127874
|
const ids = /* @__PURE__ */ new Set();
|
|
@@ -148517,7 +148379,7 @@ function materializeDeclarationInitializersForAnimationValidation(document, scop
|
|
|
148517
148379
|
(member) => isClassTypedMember(member) && animationFamilyClassIds.has(member.classId) && isInitValueContent(member.defaultValue) ? [member.id] : []
|
|
148518
148380
|
)
|
|
148519
148381
|
);
|
|
148520
|
-
if (initializers.length === 0 &&
|
|
148382
|
+
if (initializers.length === 0 && !document.members.some((member) => isInitValueContent(member.defaultValue))) {
|
|
148521
148383
|
return document;
|
|
148522
148384
|
}
|
|
148523
148385
|
const initializerRootOwners = /* @__PURE__ */ new Map();
|
|
@@ -148611,19 +148473,19 @@ function materializeDeclarationInitializersForAnimationValidation(document, scop
|
|
|
148611
148473
|
document.members.map((entry) => [entry.id, entry])
|
|
148612
148474
|
);
|
|
148613
148475
|
const classNeedsExpansion = /* @__PURE__ */ new Map();
|
|
148614
|
-
const
|
|
148615
|
-
const
|
|
148476
|
+
const memberHasInitializer = /* @__PURE__ */ new Map();
|
|
148477
|
+
const reachesInitializer = (memberId) => {
|
|
148616
148478
|
const path = [];
|
|
148617
148479
|
const visited = /* @__PURE__ */ new Set();
|
|
148618
148480
|
let currentId = memberId;
|
|
148619
148481
|
let result = false;
|
|
148620
148482
|
while (currentId !== void 0 && !visited.has(currentId)) {
|
|
148621
|
-
const cached =
|
|
148483
|
+
const cached = memberHasInitializer.get(currentId);
|
|
148622
148484
|
if (cached !== void 0) {
|
|
148623
148485
|
result = cached;
|
|
148624
148486
|
break;
|
|
148625
148487
|
}
|
|
148626
|
-
if (parameterizedDeclarationMemberIds.has(currentId)) {
|
|
148488
|
+
if (parameterizedDeclarationMemberIds.has(currentId) || isInitValueContent(membersById.get(currentId)?.defaultValue)) {
|
|
148627
148489
|
result = true;
|
|
148628
148490
|
break;
|
|
148629
148491
|
}
|
|
@@ -148631,30 +148493,54 @@ function materializeDeclarationInitializersForAnimationValidation(document, scop
|
|
|
148631
148493
|
path.push(currentId);
|
|
148632
148494
|
currentId = membersById.get(currentId)?.extendsMemberId;
|
|
148633
148495
|
}
|
|
148634
|
-
for (const id2 of path)
|
|
148496
|
+
for (const id2 of path) memberHasInitializer.set(id2, result);
|
|
148635
148497
|
return result;
|
|
148636
148498
|
};
|
|
148637
|
-
const
|
|
148499
|
+
const inheritsInitializer = (classId) => {
|
|
148638
148500
|
const cached = classNeedsExpansion.get(classId);
|
|
148639
148501
|
if (cached !== void 0) return cached;
|
|
148640
148502
|
const schemaClass2 = classesById.get(classId);
|
|
148641
148503
|
if (schemaClass2 === void 0) return false;
|
|
148642
148504
|
classNeedsExpansion.set(classId, false);
|
|
148643
148505
|
for (const memberId of Object.values(schemaClass2.schema)) {
|
|
148644
|
-
if (
|
|
148506
|
+
if (reachesInitializer(memberId)) {
|
|
148645
148507
|
classNeedsExpansion.set(classId, true);
|
|
148646
148508
|
return true;
|
|
148647
148509
|
}
|
|
148648
148510
|
}
|
|
148649
|
-
const result = typeof schemaClass2.extendsClassId === "string" &&
|
|
148511
|
+
const result = typeof schemaClass2.extendsClassId === "string" && inheritsInitializer(schemaClass2.extendsClassId);
|
|
148650
148512
|
classNeedsExpansion.set(classId, result);
|
|
148651
148513
|
return result;
|
|
148652
148514
|
};
|
|
148653
|
-
const
|
|
148654
|
-
|
|
148515
|
+
const defaultRoots = /* @__PURE__ */ new Map();
|
|
148516
|
+
members2 = members2.map((member) => {
|
|
148517
|
+
if (scopeMemberIds !== void 0 && !scopeMemberIds.has(member.id))
|
|
148518
|
+
return member;
|
|
148519
|
+
if (!isClassTypedMember(member) || !animationFamilyClassIds.has(member.classId) || !inheritsInitializer(member.classId) || !isLiteralValueContent(member.defaultValue))
|
|
148520
|
+
return member;
|
|
148521
|
+
const content = member.defaultValue;
|
|
148522
|
+
if (content.value === null || typeof content.value !== "object" || Array.isArray(content.value))
|
|
148523
|
+
return member;
|
|
148524
|
+
const root = {
|
|
148525
|
+
...content,
|
|
148526
|
+
id: `animation-validation-default:${member.id}`,
|
|
148527
|
+
classId: content.classId ?? member.classId,
|
|
148528
|
+
projectId: document.project.id,
|
|
148529
|
+
createdAt: 0,
|
|
148530
|
+
updatedAt: 0
|
|
148531
|
+
};
|
|
148532
|
+
defaultRoots.set(root.id, member);
|
|
148533
|
+
valuesById.set(root.id, root);
|
|
148534
|
+
materializationBatch.upsert([root]);
|
|
148535
|
+
const projected = { ...member, valueId: root.id };
|
|
148536
|
+
delete projected.defaultValue;
|
|
148537
|
+
return projected;
|
|
148538
|
+
});
|
|
148539
|
+
const animationRoots = [...valuesById.values()].filter(
|
|
148540
|
+
(row) => isLiteralValueContent(row) && typeof row.classId === "string" && animationFamilyClassIds.has(row.classId) && inheritsInitializer(row.classId)
|
|
148655
148541
|
);
|
|
148656
148542
|
const rootsToExpand = animationRootsInValidationScope({
|
|
148657
|
-
document,
|
|
148543
|
+
document: { ...document, members: members2, values: [...valuesById.values()] },
|
|
148658
148544
|
valuesById,
|
|
148659
148545
|
animationFamilyClassIds,
|
|
148660
148546
|
animationRoots,
|
|
@@ -148664,10 +148550,30 @@ function materializeDeclarationInitializersForAnimationValidation(document, scop
|
|
|
148664
148550
|
const lookups = initializerEvaluatorLookups(
|
|
148665
148551
|
materializationBatch.document()
|
|
148666
148552
|
);
|
|
148553
|
+
const unstamped = rootsToExpand.filter(
|
|
148554
|
+
(root) => !isLiteralValueContent(root) || !isVirtualInstanceRootShape(root)
|
|
148555
|
+
);
|
|
148556
|
+
const placements = unstamped.length === 0 ? /* @__PURE__ */ new Map() : resolveSemanticOwnerMembersForValues(
|
|
148557
|
+
document,
|
|
148558
|
+
new Set(unstamped.map((row) => row.id))
|
|
148559
|
+
);
|
|
148560
|
+
const reader = unstamped.length === 0 ? void 0 : new EffectiveValueReader({
|
|
148561
|
+
...document,
|
|
148562
|
+
values: [...valuesById.values()]
|
|
148563
|
+
});
|
|
148667
148564
|
for (const root of rootsToExpand) {
|
|
148668
|
-
|
|
148669
|
-
|
|
148565
|
+
if (isLiteralValueContent(root) && isVirtualInstanceRootShape(root)) {
|
|
148566
|
+
for (const row of lookups.virtualInstanceRowsForValue(root.id))
|
|
148567
|
+
expandedRows.set(row.id, row);
|
|
148568
|
+
continue;
|
|
148670
148569
|
}
|
|
148570
|
+
const placement = defaultRoots.get(root.id) ?? placements.get(root.id);
|
|
148571
|
+
if (placement === void 0 || reader === void 0) continue;
|
|
148572
|
+
reader.resolveGraph(root.id, placement);
|
|
148573
|
+
}
|
|
148574
|
+
if (reader !== void 0) {
|
|
148575
|
+
for (const row of reader.rowsWithClassDefaults().values())
|
|
148576
|
+
expandedRows.set(row.id, row);
|
|
148671
148577
|
}
|
|
148672
148578
|
}
|
|
148673
148579
|
if (deferred.size > 0) {
|
|
@@ -149722,6 +149628,7 @@ var KNOWN_TRANSACTION_OPERATIONS, assertPreparedInheritanceFlagsValid, assertPre
|
|
|
149722
149628
|
var init_project_version_whole_graph_validation = __esm({
|
|
149723
149629
|
"../src/database/project-version-whole-graph-validation.ts"() {
|
|
149724
149630
|
"use strict";
|
|
149631
|
+
init_effective_value_reader();
|
|
149725
149632
|
init_commit_preparation_pass_cache();
|
|
149726
149633
|
init_member_kinds();
|
|
149727
149634
|
init_project_schema_index();
|
|
@@ -151605,17 +151512,19 @@ function readPulledProjectDocumentUncachedV4(records3) {
|
|
|
151605
151512
|
});
|
|
151606
151513
|
return {
|
|
151607
151514
|
...document,
|
|
151608
|
-
members: document.members.map(
|
|
151609
|
-
(member) => isFrozenJsonData(member) && !hasUncompiledInitializer(Reflect.get(member, "defaultValue")) ? member : isolateMemberBodies(member)
|
|
151610
|
-
),
|
|
151515
|
+
members: document.members.map(isolateReplayMember),
|
|
151611
151516
|
constructors: document.constructors?.map(
|
|
151612
151517
|
(constructor2) => isFrozenJsonData(constructor2) && isNeoClassConstructor(constructor2) ? constructor2 : { ...constructor2 }
|
|
151613
151518
|
),
|
|
151614
|
-
values: document.values.map(
|
|
151615
|
-
(value) => isFrozenJsonData(value) && !hasUncompiledInitializer(value) ? value : isolateInitializerEnvelope(value)
|
|
151616
|
-
)
|
|
151519
|
+
values: document.values.map(isolateReplayValue)
|
|
151617
151520
|
};
|
|
151618
151521
|
}
|
|
151522
|
+
function isolateReplayMember(member) {
|
|
151523
|
+
return isFrozenJsonData(member) && !hasUncompiledInitializer(Reflect.get(member, "defaultValue")) ? member : isolateMemberBodies(member);
|
|
151524
|
+
}
|
|
151525
|
+
function isolateReplayValue(value) {
|
|
151526
|
+
return isFrozenJsonData(value) && !hasUncompiledInitializer(value) ? value : isolateInitializerEnvelope(value);
|
|
151527
|
+
}
|
|
151619
151528
|
function hasUncompiledInitializer(envelope) {
|
|
151620
151529
|
if (!isObjectRecord(envelope)) return false;
|
|
151621
151530
|
const init = envelope.init;
|
|
@@ -151775,6 +151684,162 @@ var init_initializer_replay = __esm({
|
|
|
151775
151684
|
}
|
|
151776
151685
|
});
|
|
151777
151686
|
|
|
151687
|
+
// src/project-source/record-fields.ts
|
|
151688
|
+
function nonVolatileFields(base) {
|
|
151689
|
+
const known = authoredFields.get(base);
|
|
151690
|
+
if (known !== void 0) return known;
|
|
151691
|
+
const fields = { ...base };
|
|
151692
|
+
delete fields.projectId;
|
|
151693
|
+
delete fields.createdAt;
|
|
151694
|
+
delete fields.updatedAt;
|
|
151695
|
+
if (isFrozenJsonData(base)) {
|
|
151696
|
+
freezeJsonData(fields);
|
|
151697
|
+
authoredFields.set(base, fields);
|
|
151698
|
+
storedRows.set(fields, base);
|
|
151699
|
+
}
|
|
151700
|
+
return fields;
|
|
151701
|
+
}
|
|
151702
|
+
function reuseAuthoredRecordFields(fields, base) {
|
|
151703
|
+
if (!isObjectRecord(base) || !isFrozenJsonData(base)) return fields;
|
|
151704
|
+
const stored = nonVolatileFields(base);
|
|
151705
|
+
if (fields === stored) return stored;
|
|
151706
|
+
const keys = Object.keys(fields);
|
|
151707
|
+
if (keys.length !== Object.keys(stored).length) return fields;
|
|
151708
|
+
for (const key of keys) {
|
|
151709
|
+
if (!Object.hasOwn(stored, key)) return fields;
|
|
151710
|
+
if (!Object.is(fields[key], stored[key])) return fields;
|
|
151711
|
+
}
|
|
151712
|
+
return stored;
|
|
151713
|
+
}
|
|
151714
|
+
function mergeMigrationServerFields(fileFields, baseData3) {
|
|
151715
|
+
const original = storedRows.get(fileFields);
|
|
151716
|
+
if (original !== void 0 && original === baseData3) return original;
|
|
151717
|
+
const fullData = { ...fileFields };
|
|
151718
|
+
if (!isObjectRecord(baseData3)) return fullData;
|
|
151719
|
+
for (const field of MIGRATION_VOLATILE_FIELDS) {
|
|
151720
|
+
if (baseData3[field] !== void 0) fullData[field] = baseData3[field];
|
|
151721
|
+
}
|
|
151722
|
+
return fullData;
|
|
151723
|
+
}
|
|
151724
|
+
function overlayAuthoredRecordFields(fileFields, base) {
|
|
151725
|
+
return storedRows.get(fileFields) === base ? base : { ...base, ...fileFields };
|
|
151726
|
+
}
|
|
151727
|
+
var authoredFields, storedRows;
|
|
151728
|
+
var init_record_fields = __esm({
|
|
151729
|
+
"src/project-source/record-fields.ts"() {
|
|
151730
|
+
"use strict";
|
|
151731
|
+
init_value_comparison();
|
|
151732
|
+
init_immutable_json3();
|
|
151733
|
+
init_migration_files();
|
|
151734
|
+
authoredFields = /* @__PURE__ */ new WeakMap();
|
|
151735
|
+
storedRows = /* @__PURE__ */ new WeakMap();
|
|
151736
|
+
}
|
|
151737
|
+
});
|
|
151738
|
+
|
|
151739
|
+
// src/project-source/schema-products.ts
|
|
151740
|
+
function reuseSchemaProducts(base, manifest) {
|
|
151741
|
+
if (!isFrozenJsonData(base)) return manifest;
|
|
151742
|
+
const previous = previousManifests.get(base) ?? base;
|
|
151743
|
+
function collection(entries, oldEntries) {
|
|
151744
|
+
const byId = new Map(oldEntries.map((entry) => [entry.id, entry]));
|
|
151745
|
+
const products = entries.map((entry) => {
|
|
151746
|
+
const old = byId.get(entry.id);
|
|
151747
|
+
return old !== void 0 && jsonDataEqual(entry, old) ? old : freezeJsonData(entry);
|
|
151748
|
+
});
|
|
151749
|
+
return products.length === oldEntries.length && products.every((entry, index) => entry === oldEntries[index]) ? oldEntries : products;
|
|
151750
|
+
}
|
|
151751
|
+
const result = freezeJsonData({
|
|
151752
|
+
...manifest,
|
|
151753
|
+
classes: collection(manifest.classes, previous.classes),
|
|
151754
|
+
constructors: collection(manifest.constructors, previous.constructors),
|
|
151755
|
+
members: collection(manifest.members, previous.members),
|
|
151756
|
+
interfaces: collection(manifest.interfaces, previous.interfaces),
|
|
151757
|
+
enums: collection(manifest.enums, previous.enums),
|
|
151758
|
+
variants: collection(manifest.variants, previous.variants),
|
|
151759
|
+
variantFolders: collection(
|
|
151760
|
+
manifest.variantFolders,
|
|
151761
|
+
previous.variantFolders
|
|
151762
|
+
),
|
|
151763
|
+
textureTemplates: collection(
|
|
151764
|
+
manifest.textureTemplates,
|
|
151765
|
+
previous.textureTemplates
|
|
151766
|
+
),
|
|
151767
|
+
audioTemplates: collection(
|
|
151768
|
+
manifest.audioTemplates,
|
|
151769
|
+
previous.audioTemplates
|
|
151770
|
+
),
|
|
151771
|
+
localizationStatuses: collection(
|
|
151772
|
+
manifest.localizationStatuses,
|
|
151773
|
+
previous.localizationStatuses
|
|
151774
|
+
),
|
|
151775
|
+
internalRecordRelations: collection(
|
|
151776
|
+
manifest.internalRecordRelations,
|
|
151777
|
+
previous.internalRecordRelations
|
|
151778
|
+
),
|
|
151779
|
+
localization: jsonDataEqual(manifest.localization, previous.localization) ? previous.localization : manifest.localization
|
|
151780
|
+
});
|
|
151781
|
+
const product = jsonDataEqual(previous, result) ? previous : result;
|
|
151782
|
+
previousManifests.set(base, product);
|
|
151783
|
+
return product;
|
|
151784
|
+
}
|
|
151785
|
+
function createSchemaDocumentMemo() {
|
|
151786
|
+
const products = /* @__PURE__ */ new WeakMap();
|
|
151787
|
+
return (base, documents, discriminator, compute) => {
|
|
151788
|
+
if (!isFrozenJsonData(base) || !documents.every(isFrozenJsonData))
|
|
151789
|
+
return compute();
|
|
151790
|
+
const previous = products.get(base);
|
|
151791
|
+
if (previous?.discriminator === discriminator && previous.documents.length === documents.length && documents.every(
|
|
151792
|
+
(document, index) => document === previous.documents[index]
|
|
151793
|
+
))
|
|
151794
|
+
return previous.result;
|
|
151795
|
+
const result = compute();
|
|
151796
|
+
products.set(base, { documents: [...documents], discriminator, result });
|
|
151797
|
+
return result;
|
|
151798
|
+
};
|
|
151799
|
+
}
|
|
151800
|
+
function reusePatchedSchemaDocument(document, data) {
|
|
151801
|
+
if (!isFrozenJsonData(document)) return { ...document, data };
|
|
151802
|
+
if (jsonDataEqual(document.data, data)) return document;
|
|
151803
|
+
const previous = patchedDocuments.get(document);
|
|
151804
|
+
if (previous !== void 0 && jsonDataEqual(previous.data, data))
|
|
151805
|
+
return previous;
|
|
151806
|
+
const result = freezeJsonData({ ...document, data });
|
|
151807
|
+
patchedDocuments.set(document, result);
|
|
151808
|
+
return result;
|
|
151809
|
+
}
|
|
151810
|
+
var previousManifests, patchedDocuments;
|
|
151811
|
+
var init_schema_products = __esm({
|
|
151812
|
+
"src/project-source/schema-products.ts"() {
|
|
151813
|
+
"use strict";
|
|
151814
|
+
init_immutable_json3();
|
|
151815
|
+
previousManifests = /* @__PURE__ */ new WeakMap();
|
|
151816
|
+
patchedDocuments = /* @__PURE__ */ new WeakMap();
|
|
151817
|
+
}
|
|
151818
|
+
});
|
|
151819
|
+
|
|
151820
|
+
// src/project-source/source-base-cache.ts
|
|
151821
|
+
function sourceBaseV4(records3, compute) {
|
|
151822
|
+
const cached = bases.get(records3);
|
|
151823
|
+
if (cached !== void 0) return cached;
|
|
151824
|
+
const result = compute();
|
|
151825
|
+
if (isFrozenJsonData(records3)) {
|
|
151826
|
+
freezeJsonData(result.lowering.records);
|
|
151827
|
+
freezeJsonData(result.documents);
|
|
151828
|
+
freezeJsonData(result.manifest);
|
|
151829
|
+
freezeJsonData(result.recoveries);
|
|
151830
|
+
bases.set(records3, result);
|
|
151831
|
+
}
|
|
151832
|
+
return result;
|
|
151833
|
+
}
|
|
151834
|
+
var bases;
|
|
151835
|
+
var init_source_base_cache = __esm({
|
|
151836
|
+
"src/project-source/source-base-cache.ts"() {
|
|
151837
|
+
"use strict";
|
|
151838
|
+
init_immutable_json3();
|
|
151839
|
+
bases = /* @__PURE__ */ new WeakMap();
|
|
151840
|
+
}
|
|
151841
|
+
});
|
|
151842
|
+
|
|
151778
151843
|
// src/project-source/listener-emission.ts
|
|
151779
151844
|
function emitListenerPositions(args) {
|
|
151780
151845
|
const root = args.rows.get(args.rootId);
|
|
@@ -172868,7 +172933,8 @@ function replayAnimationDeclarationInitializersV4(records3, document, fallbackVa
|
|
|
172868
172933
|
const init = Reflect.get(row, "init");
|
|
172869
172934
|
return isObjectRecord(init) && typeof init.code === "string" ? [{ row, code: init.code }] : [];
|
|
172870
172935
|
});
|
|
172871
|
-
if (initializers.length === 0)
|
|
172936
|
+
if (initializers.length === 0 && !document.members.some((member) => isInitValueContent(member.defaultValue)))
|
|
172937
|
+
return document;
|
|
172872
172938
|
const rootKinds = /* @__PURE__ */ new Map();
|
|
172873
172939
|
const rootOwners = /* @__PURE__ */ new Map();
|
|
172874
172940
|
const valuesById = new Map(
|
|
@@ -172914,7 +172980,12 @@ function replayAnimationDeclarationInitializersV4(records3, document, fallbackVa
|
|
|
172914
172980
|
constructor2
|
|
172915
172981
|
])
|
|
172916
172982
|
);
|
|
172917
|
-
|
|
172983
|
+
compilePulledProjectDocumentForEvaluationV4(
|
|
172984
|
+
replayDocument,
|
|
172985
|
+
compilationProject,
|
|
172986
|
+
recompileTargets?.(replayDocument)
|
|
172987
|
+
);
|
|
172988
|
+
assertPulledConstructorsCompiled(replayDocument);
|
|
172918
172989
|
const values = new Map([
|
|
172919
172990
|
...fallbackValues,
|
|
172920
172991
|
...document.values.map((row) => [row.id, row])
|
|
@@ -172949,14 +173020,6 @@ function replayAnimationDeclarationInitializersV4(records3, document, fallbackVa
|
|
|
172949
173020
|
);
|
|
172950
173021
|
let replay;
|
|
172951
173022
|
try {
|
|
172952
|
-
if (!documentBodiesCompiled) {
|
|
172953
|
-
compilePulledProjectDocumentForEvaluationV4(
|
|
172954
|
-
replayDocument,
|
|
172955
|
-
compilationProject,
|
|
172956
|
-
recompileTargets?.(replayDocument)
|
|
172957
|
-
);
|
|
172958
|
-
documentBodiesCompiled = true;
|
|
172959
|
-
}
|
|
172960
173023
|
replay = replayStoredConstructionV4({
|
|
172961
173024
|
records: pulled,
|
|
172962
173025
|
document: replayDocument,
|
|
@@ -172995,7 +173058,13 @@ function replayAnimationDeclarationInitializersV4(records3, document, fallbackVa
|
|
|
172995
173058
|
values.set(id2, value);
|
|
172996
173059
|
}
|
|
172997
173060
|
}
|
|
172998
|
-
return {
|
|
173061
|
+
return {
|
|
173062
|
+
...document,
|
|
173063
|
+
...materializeDeclarationInitializersForAnimationValidation({
|
|
173064
|
+
...replayDocument,
|
|
173065
|
+
values: [...values.values()]
|
|
173066
|
+
})
|
|
173067
|
+
};
|
|
172999
173068
|
}
|
|
173000
173069
|
function animationValidationInputsChanged(changes, seeds) {
|
|
173001
173070
|
for (const seed of seeds.values()) {
|
|
@@ -173181,6 +173250,11 @@ function withValidationClassId(value, classId) {
|
|
|
173181
173250
|
validationRowsBySource.set(value, row);
|
|
173182
173251
|
return row;
|
|
173183
173252
|
}
|
|
173253
|
+
function animationRuntimeRecord(record7) {
|
|
173254
|
+
if (!isObjectRecord(record7))
|
|
173255
|
+
throw new Error("Animation runtime record must be a non-array object.");
|
|
173256
|
+
return record7;
|
|
173257
|
+
}
|
|
173184
173258
|
function expandProspectiveAnimationInstances(document) {
|
|
173185
173259
|
const animationRoots = document.values.filter(
|
|
173186
173260
|
(row) => isLiteralValueContent(row) && isVirtualInstanceRootShape(row) && typeof row.classId === "string" && classBelongsToAnimationFamily(document.classesById, row.classId)
|
|
@@ -173189,11 +173263,15 @@ function expandProspectiveAnimationInstances(document) {
|
|
|
173189
173263
|
const lookups = cliEvaluatorLookups(
|
|
173190
173264
|
{
|
|
173191
173265
|
...document.runtimeContext,
|
|
173192
|
-
project: document.project,
|
|
173193
|
-
classes: document.classes,
|
|
173266
|
+
project: animationRuntimeRecord(document.project),
|
|
173267
|
+
classes: document.classes.map(animationRuntimeRecord),
|
|
173194
173268
|
constructors: document.constructors,
|
|
173195
|
-
members: document.members
|
|
173196
|
-
|
|
173269
|
+
members: document.members.map(
|
|
173270
|
+
(member) => animationRuntimeRecord(isolateReplayMember(member))
|
|
173271
|
+
),
|
|
173272
|
+
values: document.values.map(
|
|
173273
|
+
(value) => animationRuntimeRecord(isolateReplayValue(value))
|
|
173274
|
+
)
|
|
173197
173275
|
},
|
|
173198
173276
|
{ includeValueGraphIndexes: true }
|
|
173199
173277
|
);
|
|
@@ -174048,6 +174126,8 @@ var sourceSchemaValidation, pulledAnimationValues, animationCompilationProject,
|
|
|
174048
174126
|
var init_workspace_status_core = __esm({
|
|
174049
174127
|
"src/project-source/workspace-status-core.ts"() {
|
|
174050
174128
|
"use strict";
|
|
174129
|
+
init_initializer_replay();
|
|
174130
|
+
init_project_version_whole_graph_validation();
|
|
174051
174131
|
init_record_fields();
|
|
174052
174132
|
init_schema_products();
|
|
174053
174133
|
init_source_base_cache();
|
|
@@ -211784,7 +211864,11 @@ async function prepareLocalCandidateV4(workspace, options = {}) {
|
|
|
211784
211864
|
);
|
|
211785
211865
|
return {
|
|
211786
211866
|
status,
|
|
211787
|
-
document
|
|
211867
|
+
document: {
|
|
211868
|
+
...document,
|
|
211869
|
+
members: document.members.map(isolateReplayMember),
|
|
211870
|
+
values: document.values.map(isolateReplayValue)
|
|
211871
|
+
},
|
|
211788
211872
|
sourceHash,
|
|
211789
211873
|
preparedLocal
|
|
211790
211874
|
};
|
|
@@ -228904,7 +228988,7 @@ var releaseWorkspaceLock = () => void 0;
|
|
|
228904
228988
|
async function main() {
|
|
228905
228989
|
const args = parseArgs(process.argv.slice(2));
|
|
228906
228990
|
if (args.command === "--version") {
|
|
228907
|
-
console.log("0.87.
|
|
228991
|
+
console.log("0.87.2");
|
|
228908
228992
|
return;
|
|
228909
228993
|
}
|
|
228910
228994
|
if (args.command === null || args.command === "help" || args.command === "--help" || args.command === "-h") {
|
package/dist/test-worker.mjs
CHANGED
|
@@ -33839,7 +33839,7 @@ function evaluateBaseConstructorArguments(record4, baseRecord, argumentValues, t
|
|
|
33839
33839
|
argument2.name,
|
|
33840
33840
|
executeCompiledFunction(
|
|
33841
33841
|
getter,
|
|
33842
|
-
|
|
33842
|
+
bindThisValue(ctx, thisValue),
|
|
33843
33843
|
argumentValues,
|
|
33844
33844
|
false
|
|
33845
33845
|
)
|
|
@@ -35389,7 +35389,10 @@ function constructDeclaredClassValueWithinFrame(descriptor, record4, info, scope
|
|
|
35389
35389
|
const preparedArgumentScopes = prepareConstructorArgumentScopes(
|
|
35390
35390
|
record4,
|
|
35391
35391
|
argumentValues,
|
|
35392
|
-
|
|
35392
|
+
{
|
|
35393
|
+
...bindThisValue(ctx, null),
|
|
35394
|
+
__initializerGenericEnv: descriptor.instanceEnv
|
|
35395
|
+
}
|
|
35393
35396
|
);
|
|
35394
35397
|
const createdValues = [];
|
|
35395
35398
|
const storageKeyDeclarations = /* @__PURE__ */ new Map();
|
package/package.json
CHANGED
|
@@ -129,7 +129,7 @@ wrappers.
|
|
|
129
129
|
The marker near the top of `SKILL.md` must exactly match the package version:
|
|
130
130
|
|
|
131
131
|
```html
|
|
132
|
-
<!-- reviewed-through-cli: 0.87.
|
|
132
|
+
<!-- reviewed-through-cli: 0.87.2 -->
|
|
133
133
|
```
|
|
134
134
|
|
|
135
135
|
The quoted version above is checked too, so this instruction cannot go stale
|
|
@@ -37,7 +37,7 @@ Constructor-created values keep references to their effective sibling rows when
|
|
|
37
37
|
replayed. An unchanged project stays clean after push and pull, including nested
|
|
38
38
|
constructor values with reference arguments; it does not need another push before
|
|
39
39
|
export. Animation validation uses the project's registered files and texture
|
|
40
|
-
templates, including when constructors supply sprite defaults.
|
|
40
|
+
templates, including when constructors supply sprite defaults. Status and export stay clean when animation defaults use initializers, and when constructor arguments select collection rows through Lookups.
|
|
41
41
|
|
|
42
42
|
Use `neo pull --regenerate-source-names` to replace generated default dialogue
|
|
43
43
|
names with readable ones. It keeps chosen names and rewrites references. Use
|