@neocompose/cli 0.53.3 → 0.53.5
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
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.53.5] - 2026-09-19
|
|
4
|
+
|
|
5
|
+
- `neo test` and `neo push --dry-run` compile pending member initializers and their newly authored callable dependencies when a deletion replays a surviving constructed instance. Adding a computed default and deleting an owned row in one push no longer fails with "has no compiled body".
|
|
6
|
+
- Clearing a stored list, dictionary, or nested object override, or resetting a scalar to its declared default, preserves its stored binding during source verification. `neo test` and `neo push --dry-run` no longer reject these edits as omitted parent changes.
|
|
7
|
+
|
|
8
|
+
## [0.53.4] - 2026-09-19
|
|
9
|
+
|
|
10
|
+
- `neo test` preserves runtime types and getter overrides for nested save objects after writes rebuild the evaluator ownership index. Virtual children reuse their known owning graph when no stored parent link exists.
|
|
11
|
+
|
|
3
12
|
## [0.53.3] - 2026-09-19
|
|
4
13
|
|
|
5
14
|
- Executable object initializers can set immutable stored members during construction. Later mutation and readonly-member restrictions still apply.
|
package/dist/neo.mjs
CHANGED
|
@@ -75442,7 +75442,14 @@ function memberForValueRow(row, ctx) {
|
|
|
75442
75442
|
if (indexes2.memberByRowId.has(row.id)) {
|
|
75443
75443
|
return indexes2.memberByRowId.get(row.id) ?? null;
|
|
75444
75444
|
}
|
|
75445
|
-
|
|
75445
|
+
let member = resolveMemberForValueRow(row, ctx, /* @__PURE__ */ new Set());
|
|
75446
|
+
if (member === null) {
|
|
75447
|
+
const rows = ctx.vm.databaseVM?.virtualInstanceRowsForValue(row.id);
|
|
75448
|
+
if (rows !== void 0 && rows.length > 0) {
|
|
75449
|
+
ensureVirtualExpansionIndexed(rows, ctx, indexes2);
|
|
75450
|
+
member = resolveMemberForValueRow(row, ctx, /* @__PURE__ */ new Set());
|
|
75451
|
+
}
|
|
75452
|
+
}
|
|
75446
75453
|
indexes2.memberByRowId.set(row.id, member);
|
|
75447
75454
|
return member;
|
|
75448
75455
|
}
|
|
@@ -83918,7 +83925,8 @@ function createHeadlessVirtualInstanceResolver(args) {
|
|
|
83918
83925
|
requirement: 1 /* Required */
|
|
83919
83926
|
});
|
|
83920
83927
|
}
|
|
83921
|
-
|
|
83928
|
+
const knownGraph = graphByValueId.get(receiverValueId);
|
|
83929
|
+
return knownGraph === void 0 ? emptyRows : expandRoot(knownGraph.instanceRootId, void 0);
|
|
83922
83930
|
};
|
|
83923
83931
|
return {
|
|
83924
83932
|
virtualInstanceRowsForValue,
|
|
@@ -85692,6 +85700,171 @@ var init_init_source = __esm({
|
|
|
85692
85700
|
}
|
|
85693
85701
|
});
|
|
85694
85702
|
|
|
85703
|
+
// ../src/database/document-initializer-compiler.ts
|
|
85704
|
+
function initializerCompilerState(document, compilationProject) {
|
|
85705
|
+
const existing = documentInitializerCompilerStates.get(document);
|
|
85706
|
+
if (existing !== void 0) {
|
|
85707
|
+
if (compilationProject !== void 0) {
|
|
85708
|
+
existing.compilationProject = compilationProject;
|
|
85709
|
+
}
|
|
85710
|
+
return existing;
|
|
85711
|
+
}
|
|
85712
|
+
const created = {
|
|
85713
|
+
compilationProject: compilationProject ?? null
|
|
85714
|
+
};
|
|
85715
|
+
documentInitializerCompilerStates.set(document, created);
|
|
85716
|
+
return created;
|
|
85717
|
+
}
|
|
85718
|
+
function compilationProjectForDocument(document, state) {
|
|
85719
|
+
state.compilationProject ??= createNeoScriptCompilationProject({
|
|
85720
|
+
project: document.project,
|
|
85721
|
+
projectFiles: document.projectFiles,
|
|
85722
|
+
members: document.members,
|
|
85723
|
+
classes: document.classes,
|
|
85724
|
+
enums: document.enums,
|
|
85725
|
+
interfaces: document.interfaces,
|
|
85726
|
+
constructors: document.constructors ?? []
|
|
85727
|
+
});
|
|
85728
|
+
return state.compilationProject;
|
|
85729
|
+
}
|
|
85730
|
+
function documentMemberCompilationIndex(document) {
|
|
85731
|
+
const existing = documentMemberCompilationIndexes.get(document);
|
|
85732
|
+
if (existing !== void 0) return existing;
|
|
85733
|
+
const created = {
|
|
85734
|
+
membersById: new Map(
|
|
85735
|
+
document.members.map((member) => [member.id, member])
|
|
85736
|
+
),
|
|
85737
|
+
ownerClassesByMemberId: new Map(
|
|
85738
|
+
document.classes.flatMap(
|
|
85739
|
+
(schemaClass2) => Object.values(schemaClass2.schema).map(
|
|
85740
|
+
(memberId) => [memberId, schemaClass2]
|
|
85741
|
+
)
|
|
85742
|
+
)
|
|
85743
|
+
)
|
|
85744
|
+
};
|
|
85745
|
+
documentMemberCompilationIndexes.set(document, created);
|
|
85746
|
+
return created;
|
|
85747
|
+
}
|
|
85748
|
+
function documentInitializerCompiler(document, compilationProject) {
|
|
85749
|
+
const state = initializerCompilerState(document, compilationProject);
|
|
85750
|
+
return (site) => {
|
|
85751
|
+
if (site.sourceValueId !== null) {
|
|
85752
|
+
compileValueInitializerDependency(
|
|
85753
|
+
document,
|
|
85754
|
+
site.sourceValueId,
|
|
85755
|
+
compilationProjectForDocument(document, state)
|
|
85756
|
+
);
|
|
85757
|
+
return;
|
|
85758
|
+
}
|
|
85759
|
+
if (site.memberId === null) return;
|
|
85760
|
+
compileMemberInitializerDependency(
|
|
85761
|
+
document,
|
|
85762
|
+
site.memberId,
|
|
85763
|
+
compilationProjectForDocument(document, state)
|
|
85764
|
+
);
|
|
85765
|
+
};
|
|
85766
|
+
}
|
|
85767
|
+
function valueInitializerCompilationSites(document) {
|
|
85768
|
+
const cached = documentValueInitializerCompilationSites.get(document);
|
|
85769
|
+
if (cached !== void 0) return cached;
|
|
85770
|
+
const rows = document.values.filter(isInitValueContent);
|
|
85771
|
+
const valuesById = new Map(
|
|
85772
|
+
document.values.map((value) => [value.id, value])
|
|
85773
|
+
);
|
|
85774
|
+
const ownershipTargetIds = valueIdsWithSourceChains(
|
|
85775
|
+
new Set(rows.map((row) => row.id)),
|
|
85776
|
+
valuesById
|
|
85777
|
+
);
|
|
85778
|
+
const rootOwners = /* @__PURE__ */ new Map();
|
|
85779
|
+
const owners = resolveOwnerMembersForValues(
|
|
85780
|
+
document,
|
|
85781
|
+
ownershipTargetIds,
|
|
85782
|
+
void 0,
|
|
85783
|
+
rootOwners
|
|
85784
|
+
);
|
|
85785
|
+
const sites = /* @__PURE__ */ new Map();
|
|
85786
|
+
for (const row of rows) {
|
|
85787
|
+
const member = owners.get(row.id);
|
|
85788
|
+
if (member === void 0) continue;
|
|
85789
|
+
const ownerContext = initializerOwnerContext(
|
|
85790
|
+
document,
|
|
85791
|
+
row.id,
|
|
85792
|
+
rootOwners,
|
|
85793
|
+
valuesById
|
|
85794
|
+
);
|
|
85795
|
+
sites.set(row.id, {
|
|
85796
|
+
row,
|
|
85797
|
+
member,
|
|
85798
|
+
ownerClass: ownerContext.ownerClass,
|
|
85799
|
+
lexicalThisClass: ownerContext.lexicalThisClass
|
|
85800
|
+
});
|
|
85801
|
+
}
|
|
85802
|
+
documentValueInitializerCompilationSites.set(document, sites);
|
|
85803
|
+
return sites;
|
|
85804
|
+
}
|
|
85805
|
+
function compileValueInitializerDependency(document, valueId, compilationProject) {
|
|
85806
|
+
const site = valueInitializerCompilationSites(document).get(valueId);
|
|
85807
|
+
if (site === void 0) {
|
|
85808
|
+
throw new Error(
|
|
85809
|
+
"Cannot compile initializer dependency because its source value row is unresolved."
|
|
85810
|
+
);
|
|
85811
|
+
}
|
|
85812
|
+
compileValueRowInitializerBody({
|
|
85813
|
+
project: document.project,
|
|
85814
|
+
projectFiles: document.projectFiles,
|
|
85815
|
+
members: document.members,
|
|
85816
|
+
classes: document.classes,
|
|
85817
|
+
enums: document.enums,
|
|
85818
|
+
interfaces: document.interfaces,
|
|
85819
|
+
constructors: document.constructors ?? [],
|
|
85820
|
+
member: site.member,
|
|
85821
|
+
valueRow: { ...site.row },
|
|
85822
|
+
valueId: site.row.id,
|
|
85823
|
+
initializerOwnerClass: site.ownerClass,
|
|
85824
|
+
lexicalThisClass: site.lexicalThisClass,
|
|
85825
|
+
storedConstructionReplay: true,
|
|
85826
|
+
...compilationProject === void 0 ? {} : { compilationProject }
|
|
85827
|
+
});
|
|
85828
|
+
}
|
|
85829
|
+
function compileMemberInitializerDependency(document, memberId, compilationProject) {
|
|
85830
|
+
const compileArgs = {
|
|
85831
|
+
project: document.project,
|
|
85832
|
+
projectFiles: document.projectFiles,
|
|
85833
|
+
members: document.members,
|
|
85834
|
+
classes: document.classes,
|
|
85835
|
+
enums: document.enums,
|
|
85836
|
+
interfaces: document.interfaces,
|
|
85837
|
+
constructors: document.constructors ?? []
|
|
85838
|
+
};
|
|
85839
|
+
const memberIndex = documentMemberCompilationIndex(document);
|
|
85840
|
+
const member = memberIndex.membersById.get(memberId);
|
|
85841
|
+
if (member === void 0) {
|
|
85842
|
+
throw new Error(
|
|
85843
|
+
`Cannot compile initializer dependency for missing member "${memberId}".`
|
|
85844
|
+
);
|
|
85845
|
+
}
|
|
85846
|
+
const thisClass = memberIndex.ownerClassesByMemberId.get(memberId) ?? null;
|
|
85847
|
+
compileMemberInitializerBody({
|
|
85848
|
+
...compileArgs,
|
|
85849
|
+
member,
|
|
85850
|
+
thisClass,
|
|
85851
|
+
...compilationProject === void 0 ? {} : { compilationProject }
|
|
85852
|
+
});
|
|
85853
|
+
}
|
|
85854
|
+
var documentInitializerCompilerStates, documentMemberCompilationIndexes, documentValueInitializerCompilationSites;
|
|
85855
|
+
var init_document_initializer_compiler = __esm({
|
|
85856
|
+
"../src/database/document-initializer-compiler.ts"() {
|
|
85857
|
+
"use strict";
|
|
85858
|
+
init_members();
|
|
85859
|
+
init_compile_ns_property();
|
|
85860
|
+
init_compiler_adapter();
|
|
85861
|
+
init_value_row_owner_members();
|
|
85862
|
+
documentInitializerCompilerStates = /* @__PURE__ */ new WeakMap();
|
|
85863
|
+
documentMemberCompilationIndexes = /* @__PURE__ */ new WeakMap();
|
|
85864
|
+
documentValueInitializerCompilationSites = /* @__PURE__ */ new WeakMap();
|
|
85865
|
+
}
|
|
85866
|
+
});
|
|
85867
|
+
|
|
85695
85868
|
// ../src/runtime/materialize-values.ts
|
|
85696
85869
|
function materializeInitializerValue2(args) {
|
|
85697
85870
|
return materializeInitializerValue({
|
|
@@ -96588,9 +96761,42 @@ function appendAuthoredOwnedValueCascadeDeletes(args) {
|
|
|
96588
96761
|
}
|
|
96589
96762
|
}
|
|
96590
96763
|
if (survivingConstructionIds.size > 0) {
|
|
96764
|
+
const replayMembers = documentMemberCompilationIndex(postScope.document);
|
|
96765
|
+
const replayConstructors = indexRecordsById(
|
|
96766
|
+
postScope.document.constructors ?? []
|
|
96767
|
+
);
|
|
96768
|
+
let compilationProject;
|
|
96769
|
+
for (const change of args.authoredChanges) {
|
|
96770
|
+
if (change.operation === "delete") continue;
|
|
96771
|
+
const member = change.recordKind === "member" ? replayMembers.membersById.get(change.recordId) : void 0;
|
|
96772
|
+
const constructor2 = change.recordKind === "constructor" ? replayConstructors.get(change.recordId) : void 0;
|
|
96773
|
+
const callable2 = member !== void 0 && (member.kind === 23 /* NSFunction */ || member.kind === 10 /* NSProperty */ || member.kind === 26 /* NSAction */);
|
|
96774
|
+
if (constructor2 === void 0 && !callable2) continue;
|
|
96775
|
+
compilationProject ??= cachedServerCompilationProject(postScope.document);
|
|
96776
|
+
const compileArgs = { ...postScope.document, compilationProject };
|
|
96777
|
+
if (constructor2 !== void 0)
|
|
96778
|
+
compileConstructorRecord({
|
|
96779
|
+
...compileArgs,
|
|
96780
|
+
constructors: postScope.document.constructors ?? [],
|
|
96781
|
+
constructor: constructor2
|
|
96782
|
+
});
|
|
96783
|
+
if (callable2)
|
|
96784
|
+
compileAuthoredMemberBodies({
|
|
96785
|
+
...compileArgs,
|
|
96786
|
+
member,
|
|
96787
|
+
thisClass: replayMembers.ownerClassesByMemberId.get(member.id) ?? null
|
|
96788
|
+
});
|
|
96789
|
+
}
|
|
96790
|
+
const replayDocument = {
|
|
96791
|
+
...postScope.document,
|
|
96792
|
+
initializerCompiler: documentInitializerCompiler(
|
|
96793
|
+
postScope.document,
|
|
96794
|
+
compilationProject
|
|
96795
|
+
)
|
|
96796
|
+
};
|
|
96591
96797
|
const resolverDocument = composeResolverDocument(
|
|
96592
|
-
|
|
96593
|
-
initializerEvaluatorLookups(
|
|
96798
|
+
replayDocument,
|
|
96799
|
+
initializerEvaluatorLookups(replayDocument)
|
|
96594
96800
|
);
|
|
96595
96801
|
const materializedIndex = buildVirtualInstanceMaterializedIndex({
|
|
96596
96802
|
document: resolverDocument
|
|
@@ -100823,6 +101029,7 @@ var SERVER_COMPILATION_PROJECT_CACHE_LIMIT, serverCompilationProjectCache, READ_
|
|
|
100823
101029
|
var init_project_version_schema_commit = __esm({
|
|
100824
101030
|
"../src/database/project-version-schema-commit.ts"() {
|
|
100825
101031
|
"use strict";
|
|
101032
|
+
init_document_initializer_compiler();
|
|
100826
101033
|
init_effective_value_comparison();
|
|
100827
101034
|
init_classes();
|
|
100828
101035
|
init_constructor_parameter_settlement();
|
|
@@ -114566,7 +114773,7 @@ var init_stored_value_placements = __esm({
|
|
|
114566
114773
|
});
|
|
114567
114774
|
|
|
114568
114775
|
// src/project-source/root-source.ts
|
|
114569
|
-
function emitProjectRootSourceV4(records2, manifest, materializedConstructors, localValues) {
|
|
114776
|
+
function emitProjectRootSourceV4(records2, manifest, materializedConstructors, localValues, options = {}) {
|
|
114570
114777
|
const project = [...records2.values()].find(
|
|
114571
114778
|
(record6) => !record6.deleted && record6.recordKind === "project"
|
|
114572
114779
|
);
|
|
@@ -114578,6 +114785,7 @@ function emitProjectRootSourceV4(records2, manifest, materializedConstructors, l
|
|
|
114578
114785
|
);
|
|
114579
114786
|
const classes = new Map(manifest.classes.map((entry) => [entry.id, entry]));
|
|
114580
114787
|
const values = emitStoredValueBindingSourcesV4(records2, memberIds, {
|
|
114788
|
+
...options,
|
|
114581
114789
|
manifest,
|
|
114582
114790
|
targetTypedRoot: true,
|
|
114583
114791
|
localValues
|
|
@@ -115151,7 +115359,7 @@ function cliEvaluatorLookups(document, options = {}) {
|
|
|
115151
115359
|
return cliEvaluatorRuntime(document, options).databaseVM;
|
|
115152
115360
|
}
|
|
115153
115361
|
function cliEvaluatorRuntime(document, options = {}) {
|
|
115154
|
-
const initializerCompiler = isPulledInitializerCompilationDocumentV4(document) ?
|
|
115362
|
+
const initializerCompiler = isPulledInitializerCompilationDocumentV4(document) ? documentInitializerCompiler(document) : void 0;
|
|
115155
115363
|
const databaseVM = headlessVirtualInstanceLookups(document, {
|
|
115156
115364
|
...options,
|
|
115157
115365
|
...initializerCompiler === void 0 ? {} : { initializerCompiler }
|
|
@@ -117237,7 +117445,7 @@ function collapseLocalizedSourceRevertsV4(args) {
|
|
|
117237
117445
|
document: comparison,
|
|
117238
117446
|
changes: normalized,
|
|
117239
117447
|
editedValueIds: new Set(edited.map((change) => change.recordId)),
|
|
117240
|
-
initializerCompiler:
|
|
117448
|
+
initializerCompiler: documentInitializerCompiler(comparison)
|
|
117241
117449
|
});
|
|
117242
117450
|
const normalizedById = new Map(
|
|
117243
117451
|
normalized.map((change) => [change.recordId, change])
|
|
@@ -119023,69 +119231,6 @@ function createPulledConstructionReplayContext(args) {
|
|
|
119023
119231
|
valuesById: new Map(args.document.values.map((value) => [value.id, value]))
|
|
119024
119232
|
};
|
|
119025
119233
|
}
|
|
119026
|
-
function pulledInitializerCompilerStateV4(document, compilationProject) {
|
|
119027
|
-
const existing = pulledInitializerCompilerStates.get(document);
|
|
119028
|
-
if (existing !== void 0) {
|
|
119029
|
-
if (compilationProject !== void 0) {
|
|
119030
|
-
existing.compilationProject = compilationProject;
|
|
119031
|
-
}
|
|
119032
|
-
return existing;
|
|
119033
|
-
}
|
|
119034
|
-
const created = {
|
|
119035
|
-
compilationProject: compilationProject ?? null
|
|
119036
|
-
};
|
|
119037
|
-
pulledInitializerCompilerStates.set(document, created);
|
|
119038
|
-
return created;
|
|
119039
|
-
}
|
|
119040
|
-
function compilationProjectForPulledDocumentV4(document, state) {
|
|
119041
|
-
state.compilationProject ??= createNeoScriptCompilationProject({
|
|
119042
|
-
project: document.project,
|
|
119043
|
-
projectFiles: document.projectFiles,
|
|
119044
|
-
members: document.members,
|
|
119045
|
-
classes: document.classes,
|
|
119046
|
-
enums: document.enums,
|
|
119047
|
-
interfaces: document.interfaces,
|
|
119048
|
-
constructors: document.constructors ?? []
|
|
119049
|
-
});
|
|
119050
|
-
return state.compilationProject;
|
|
119051
|
-
}
|
|
119052
|
-
function memberCompilationIndexV4(document) {
|
|
119053
|
-
const existing = pulledMemberCompilationIndexes.get(document);
|
|
119054
|
-
if (existing !== void 0) return existing;
|
|
119055
|
-
const created = {
|
|
119056
|
-
membersById: new Map(
|
|
119057
|
-
document.members.map((member) => [member.id, member])
|
|
119058
|
-
),
|
|
119059
|
-
ownerClassesByMemberId: new Map(
|
|
119060
|
-
document.classes.flatMap(
|
|
119061
|
-
(schemaClass2) => Object.values(schemaClass2.schema).map(
|
|
119062
|
-
(memberId) => [memberId, schemaClass2]
|
|
119063
|
-
)
|
|
119064
|
-
)
|
|
119065
|
-
)
|
|
119066
|
-
};
|
|
119067
|
-
pulledMemberCompilationIndexes.set(document, created);
|
|
119068
|
-
return created;
|
|
119069
|
-
}
|
|
119070
|
-
function pulledInitializerCompilerV4(document, compilationProject) {
|
|
119071
|
-
const state = pulledInitializerCompilerStateV4(document, compilationProject);
|
|
119072
|
-
return (site) => {
|
|
119073
|
-
if (site.sourceValueId !== null) {
|
|
119074
|
-
compilePulledValueInitializerBodyV4(
|
|
119075
|
-
document,
|
|
119076
|
-
site.sourceValueId,
|
|
119077
|
-
compilationProjectForPulledDocumentV4(document, state)
|
|
119078
|
-
);
|
|
119079
|
-
return;
|
|
119080
|
-
}
|
|
119081
|
-
if (site.memberId === null) return;
|
|
119082
|
-
compilePulledMemberInitializerBodyV4(
|
|
119083
|
-
document,
|
|
119084
|
-
site.memberId,
|
|
119085
|
-
compilationProjectForPulledDocumentV4(document, state)
|
|
119086
|
-
);
|
|
119087
|
-
};
|
|
119088
|
-
}
|
|
119089
119234
|
function describePulledProjectBodyCompileError(error) {
|
|
119090
119235
|
const fallback = error instanceof Error ? error.message : String(error);
|
|
119091
119236
|
if (!(error instanceof CompileError)) return fallback;
|
|
@@ -119202,7 +119347,7 @@ function replayStoredConstructionV4(args) {
|
|
|
119202
119347
|
// Replays need distinct compiler closures but read one immutable
|
|
119203
119348
|
// member/value graph. Share its project-sized evaluator indexes.
|
|
119204
119349
|
evaluatorCache: { key: document, revision: void 0 },
|
|
119205
|
-
initializerCompiler:
|
|
119350
|
+
initializerCompiler: documentInitializerCompiler(
|
|
119206
119351
|
document,
|
|
119207
119352
|
compilationProject
|
|
119208
119353
|
)
|
|
@@ -119256,68 +119401,6 @@ function compilePulledUncompiledConstructorsV4(document, compilationProject, rep
|
|
|
119256
119401
|
}
|
|
119257
119402
|
assertPulledConstructorsCompiled(document, replayContext);
|
|
119258
119403
|
}
|
|
119259
|
-
function valueInitializerCompilationSites(document) {
|
|
119260
|
-
const cached = pulledValueInitializerCompilationSites.get(document);
|
|
119261
|
-
if (cached !== void 0) return cached;
|
|
119262
|
-
const rows = document.values.filter(isInitValueContent);
|
|
119263
|
-
const valuesById = new Map(
|
|
119264
|
-
document.values.map((value) => [value.id, value])
|
|
119265
|
-
);
|
|
119266
|
-
const ownershipTargetIds = valueIdsWithSourceChains(
|
|
119267
|
-
new Set(rows.map((row) => row.id)),
|
|
119268
|
-
valuesById
|
|
119269
|
-
);
|
|
119270
|
-
const rootOwners = /* @__PURE__ */ new Map();
|
|
119271
|
-
const owners = resolveOwnerMembersForValues(
|
|
119272
|
-
document,
|
|
119273
|
-
ownershipTargetIds,
|
|
119274
|
-
void 0,
|
|
119275
|
-
rootOwners
|
|
119276
|
-
);
|
|
119277
|
-
const sites = /* @__PURE__ */ new Map();
|
|
119278
|
-
for (const row of rows) {
|
|
119279
|
-
const member = owners.get(row.id);
|
|
119280
|
-
if (member === void 0) continue;
|
|
119281
|
-
const ownerContext = initializerOwnerContext(
|
|
119282
|
-
document,
|
|
119283
|
-
row.id,
|
|
119284
|
-
rootOwners,
|
|
119285
|
-
valuesById
|
|
119286
|
-
);
|
|
119287
|
-
sites.set(row.id, {
|
|
119288
|
-
row,
|
|
119289
|
-
member,
|
|
119290
|
-
ownerClass: ownerContext.ownerClass,
|
|
119291
|
-
lexicalThisClass: ownerContext.lexicalThisClass
|
|
119292
|
-
});
|
|
119293
|
-
}
|
|
119294
|
-
pulledValueInitializerCompilationSites.set(document, sites);
|
|
119295
|
-
return sites;
|
|
119296
|
-
}
|
|
119297
|
-
function compilePulledValueInitializerBodyV4(document, valueId, compilationProject) {
|
|
119298
|
-
const site = valueInitializerCompilationSites(document).get(valueId);
|
|
119299
|
-
if (site === void 0) {
|
|
119300
|
-
throw new Error(
|
|
119301
|
-
"Cannot compile initializer dependency because its source value row is unresolved."
|
|
119302
|
-
);
|
|
119303
|
-
}
|
|
119304
|
-
compileValueRowInitializerBody({
|
|
119305
|
-
project: document.project,
|
|
119306
|
-
projectFiles: document.projectFiles,
|
|
119307
|
-
members: document.members,
|
|
119308
|
-
classes: document.classes,
|
|
119309
|
-
enums: document.enums,
|
|
119310
|
-
interfaces: document.interfaces,
|
|
119311
|
-
constructors: document.constructors ?? [],
|
|
119312
|
-
member: site.member,
|
|
119313
|
-
valueRow: site.row,
|
|
119314
|
-
valueId: String(Reflect.get(site.row, "id")),
|
|
119315
|
-
initializerOwnerClass: site.ownerClass,
|
|
119316
|
-
lexicalThisClass: site.lexicalThisClass,
|
|
119317
|
-
storedConstructionReplay: true,
|
|
119318
|
-
...compilationProject === void 0 ? {} : { compilationProject }
|
|
119319
|
-
});
|
|
119320
|
-
}
|
|
119321
119404
|
function compilePulledProjectDocumentForEvaluationV4(document, compilationProject) {
|
|
119322
119405
|
const sharedCompilationProject = compilationProject ?? createNeoScriptCompilationProject({
|
|
119323
119406
|
project: document.project,
|
|
@@ -119328,7 +119411,7 @@ function compilePulledProjectDocumentForEvaluationV4(document, compilationProjec
|
|
|
119328
119411
|
interfaces: document.interfaces,
|
|
119329
119412
|
constructors: document.constructors ?? []
|
|
119330
119413
|
});
|
|
119331
|
-
|
|
119414
|
+
documentInitializerCompiler(document, sharedCompilationProject);
|
|
119332
119415
|
const compileArgs = {
|
|
119333
119416
|
project: document.project,
|
|
119334
119417
|
projectFiles: document.projectFiles,
|
|
@@ -119343,7 +119426,7 @@ function compilePulledProjectDocumentForEvaluationV4(document, compilationProjec
|
|
|
119343
119426
|
compileConstructorRecord({ ...compileArgs, constructor: constructor2 });
|
|
119344
119427
|
}
|
|
119345
119428
|
assertPulledConstructorsCompiled(document);
|
|
119346
|
-
const memberIndex =
|
|
119429
|
+
const memberIndex = documentMemberCompilationIndex(document);
|
|
119347
119430
|
for (const member of compileArgs.members) {
|
|
119348
119431
|
try {
|
|
119349
119432
|
compileAuthoredMemberBodies({
|
|
@@ -119379,31 +119462,6 @@ function assertPulledConstructorsCompiled(document, replayContext) {
|
|
|
119379
119462
|
}
|
|
119380
119463
|
if (replayContext !== void 0) replayContext.constructorsValidated = true;
|
|
119381
119464
|
}
|
|
119382
|
-
function compilePulledMemberInitializerBodyV4(document, memberId, compilationProject) {
|
|
119383
|
-
const compileArgs = {
|
|
119384
|
-
project: document.project,
|
|
119385
|
-
projectFiles: document.projectFiles,
|
|
119386
|
-
members: document.members,
|
|
119387
|
-
classes: document.classes,
|
|
119388
|
-
enums: document.enums,
|
|
119389
|
-
interfaces: document.interfaces,
|
|
119390
|
-
constructors: document.constructors ?? []
|
|
119391
|
-
};
|
|
119392
|
-
const memberIndex = memberCompilationIndexV4(document);
|
|
119393
|
-
const member = memberIndex.membersById.get(memberId);
|
|
119394
|
-
if (member === void 0) {
|
|
119395
|
-
throw new Error(
|
|
119396
|
-
`Cannot compile initializer dependency for missing member "${memberId}".`
|
|
119397
|
-
);
|
|
119398
|
-
}
|
|
119399
|
-
const thisClass = memberIndex.ownerClassesByMemberId.get(memberId) ?? null;
|
|
119400
|
-
compileMemberInitializerBody({
|
|
119401
|
-
...compileArgs,
|
|
119402
|
-
member,
|
|
119403
|
-
thisClass,
|
|
119404
|
-
...compilationProject === void 0 ? {} : { compilationProject }
|
|
119405
|
-
});
|
|
119406
|
-
}
|
|
119407
119465
|
function samePulledRecords(left, right) {
|
|
119408
119466
|
if (left === right) return true;
|
|
119409
119467
|
if (left.size !== right.size) return false;
|
|
@@ -119541,10 +119599,11 @@ function replayWorkspace(records2) {
|
|
|
119541
119599
|
state: { records: stateRecords }
|
|
119542
119600
|
};
|
|
119543
119601
|
}
|
|
119544
|
-
var pulledBodyCompileSites,
|
|
119602
|
+
var pulledBodyCompileSites, recentPulledDocuments, RECENT_PULLED_DOCUMENT_LIMIT;
|
|
119545
119603
|
var init_initializer_replay = __esm({
|
|
119546
119604
|
"src/project-source/initializer-replay.ts"() {
|
|
119547
119605
|
"use strict";
|
|
119606
|
+
init_document_initializer_compiler();
|
|
119548
119607
|
init_members();
|
|
119549
119608
|
init_compile_ns_property();
|
|
119550
119609
|
init_materialize_values();
|
|
@@ -119557,9 +119616,6 @@ var init_initializer_replay = __esm({
|
|
|
119557
119616
|
init_constructors2();
|
|
119558
119617
|
init_compiler_adapter();
|
|
119559
119618
|
pulledBodyCompileSites = /* @__PURE__ */ new WeakMap();
|
|
119560
|
-
pulledInitializerCompilerStates = /* @__PURE__ */ new WeakMap();
|
|
119561
|
-
pulledMemberCompilationIndexes = /* @__PURE__ */ new WeakMap();
|
|
119562
|
-
pulledValueInitializerCompilationSites = /* @__PURE__ */ new WeakMap();
|
|
119563
119619
|
recentPulledDocuments = [];
|
|
119564
119620
|
RECENT_PULLED_DOCUMENT_LIMIT = 4;
|
|
119565
119621
|
}
|
|
@@ -119572,18 +119628,19 @@ function inferredGenericClassBinding(classId) {
|
|
|
119572
119628
|
function inferredGenericClassId(binding) {
|
|
119573
119629
|
return binding?.startsWith(INFERRED_GENERIC_CLASS_PREFIX) ? binding.slice(INFERRED_GENERIC_CLASS_PREFIX.length) : null;
|
|
119574
119630
|
}
|
|
119575
|
-
function emitStaticValueSourcesV4(records2, manifest, localValues) {
|
|
119631
|
+
function emitStaticValueSourcesV4(records2, manifest, localValues, options = {}) {
|
|
119576
119632
|
const memberIds = [];
|
|
119577
119633
|
for (const record6 of records2.values()) {
|
|
119578
119634
|
if (record6.recordKind === "member" && !record6.deleted && isObjectRecord2(record6.data) && record6.data.modifier === 3 && typeof record6.data.valueId === "string")
|
|
119579
119635
|
memberIds.push(record6.recordId);
|
|
119580
119636
|
}
|
|
119581
119637
|
return emitStoredValueBindingSourcesV4(records2, memberIds, {
|
|
119638
|
+
...options,
|
|
119582
119639
|
manifest,
|
|
119583
119640
|
localValues
|
|
119584
119641
|
});
|
|
119585
119642
|
}
|
|
119586
|
-
function buildValueEmitContext(records2, manifest) {
|
|
119643
|
+
function buildValueEmitContext(records2, manifest, options = {}) {
|
|
119587
119644
|
const rawMembers = dataById(records2, "member");
|
|
119588
119645
|
const manifestMembers = new Map(
|
|
119589
119646
|
manifest.members.map((member) => [member.id, member])
|
|
@@ -119614,6 +119671,7 @@ function buildValueEmitContext(records2, manifest) {
|
|
|
119614
119671
|
let materializedGraph;
|
|
119615
119672
|
let effectiveValues;
|
|
119616
119673
|
return {
|
|
119674
|
+
storedValueBase: options.storedValueBase,
|
|
119617
119675
|
records: records2,
|
|
119618
119676
|
readDocument,
|
|
119619
119677
|
readCompilationProject,
|
|
@@ -119621,7 +119679,7 @@ function buildValueEmitContext(records2, manifest) {
|
|
|
119621
119679
|
readEffectiveValues: () => effectiveValues ??= new EffectiveValueReader({
|
|
119622
119680
|
...readDocument(),
|
|
119623
119681
|
evaluatorCache: { key: readDocument(), revision: void 0 },
|
|
119624
|
-
initializerCompiler:
|
|
119682
|
+
initializerCompiler: documentInitializerCompiler(
|
|
119625
119683
|
readDocument(),
|
|
119626
119684
|
readCompilationProject()
|
|
119627
119685
|
)
|
|
@@ -119677,7 +119735,7 @@ function buildValueEmitContext(records2, manifest) {
|
|
|
119677
119735
|
}
|
|
119678
119736
|
function emitStoredValueBindingSourcesV4(records2, memberIds, options) {
|
|
119679
119737
|
const context = {
|
|
119680
|
-
...buildValueEmitContext(records2, options.manifest),
|
|
119738
|
+
...buildValueEmitContext(records2, options.manifest, options),
|
|
119681
119739
|
localValues: options.localValues
|
|
119682
119740
|
};
|
|
119683
119741
|
const members = context.members;
|
|
@@ -119726,13 +119784,13 @@ function targetTypedVariantConstruction(code) {
|
|
|
119726
119784
|
if (!prefix.test(code)) return code;
|
|
119727
119785
|
return code.replace(prefix, "new(");
|
|
119728
119786
|
}
|
|
119729
|
-
function emitVariantValueSourcesV4(records2, manifest) {
|
|
119787
|
+
function emitVariantValueSourcesV4(records2, manifest, options = {}) {
|
|
119730
119788
|
const initializers = /* @__PURE__ */ new Map();
|
|
119731
119789
|
const recordKeysByVariant = /* @__PURE__ */ new Map();
|
|
119732
119790
|
if (manifest.variants.length === 0) {
|
|
119733
119791
|
return { initializers, recordKeysByVariant };
|
|
119734
119792
|
}
|
|
119735
|
-
const context = buildValueEmitContext(records2, manifest);
|
|
119793
|
+
const context = buildValueEmitContext(records2, manifest, options);
|
|
119736
119794
|
const variantClass = [...manifest.classes].find(
|
|
119737
119795
|
(entry) => entry.name === NEO_VARIANT_TYPE_NAME
|
|
119738
119796
|
);
|
|
@@ -120018,8 +120076,8 @@ function rowBackedDefaultMemberIdsV4(state) {
|
|
|
120018
120076
|
}
|
|
120019
120077
|
return result;
|
|
120020
120078
|
}
|
|
120021
|
-
function emitMemberDefaultSourcesV4(records2, manifest) {
|
|
120022
|
-
const context = buildValueEmitContext(records2, manifest);
|
|
120079
|
+
function emitMemberDefaultSourcesV4(records2, manifest, options = {}) {
|
|
120080
|
+
const context = buildValueEmitContext(records2, manifest, options);
|
|
120023
120081
|
const initializers = /* @__PURE__ */ new Map();
|
|
120024
120082
|
const recordKeysByMember = /* @__PURE__ */ new Map();
|
|
120025
120083
|
for (const record6 of records2.values()) {
|
|
@@ -125331,11 +125389,13 @@ function classValueBody(context, member, value, visited, targetTyped, outerEnvir
|
|
|
125331
125389
|
if (childMember === void 0)
|
|
125332
125390
|
throw new Error(`Class ${name}.${key} has no member record.`);
|
|
125333
125391
|
const preservesExternalBinding = context.collectionBindingValueIds.has(childId);
|
|
125334
|
-
|
|
125392
|
+
const baseChildBody = context.storedValueBase?.get(childId)?.value;
|
|
125393
|
+
const clearedStoredClassOverrides = isObjectRecord2(baseChildBody) && Object.keys(baseChildBody).length > 0;
|
|
125394
|
+
if (!preservesExternalBinding && !clearedStoredClassOverrides && emitsAsMemberDefaultDerivedAbsence(context, childMember, childId)) {
|
|
125335
125395
|
continue;
|
|
125336
125396
|
}
|
|
125337
125397
|
const replayChildId = replayBody[key];
|
|
125338
|
-
if (!preservesExternalBinding && replayGraph !== null && typeof replayChildId === "string" && materializedValueSubgraphsEqual(
|
|
125398
|
+
if (!preservesExternalBinding && !context.storedValueBase?.has(childId) && replayGraph !== null && typeof replayChildId === "string" && materializedValueSubgraphsEqual(
|
|
125339
125399
|
context,
|
|
125340
125400
|
context.readEffectiveValues(),
|
|
125341
125401
|
replayGraph,
|
|
@@ -127118,9 +127178,14 @@ function emitProjectDocumentFilesV4(records2, options = {}) {
|
|
|
127118
127178
|
onInvalidStaticMemberOwnership: (recovery) => staticMemberOwnershipRecoveries.push(recovery)
|
|
127119
127179
|
});
|
|
127120
127180
|
const localValues = new LocalValueEmissionV4(options.localValues ?? []);
|
|
127121
|
-
const staticValues = emitStaticValueSourcesV4(
|
|
127122
|
-
|
|
127123
|
-
|
|
127181
|
+
const staticValues = emitStaticValueSourcesV4(
|
|
127182
|
+
records2,
|
|
127183
|
+
manifest,
|
|
127184
|
+
localValues,
|
|
127185
|
+
options
|
|
127186
|
+
);
|
|
127187
|
+
const memberDefaults = emitMemberDefaultSourcesV4(records2, manifest, options);
|
|
127188
|
+
const variantValues = emitVariantValueSourcesV4(records2, manifest, options);
|
|
127124
127189
|
const baseSource = emitProjectSourcesV4(manifest, {
|
|
127125
127190
|
staticInitializers: staticValues.initializers,
|
|
127126
127191
|
defaultInitializers: memberDefaults.initializers,
|
|
@@ -127190,7 +127255,8 @@ function emitProjectDocumentFilesV4(records2, options = {}) {
|
|
|
127190
127255
|
records2,
|
|
127191
127256
|
manifest,
|
|
127192
127257
|
materializedConstructors,
|
|
127193
|
-
localValues
|
|
127258
|
+
localValues,
|
|
127259
|
+
options
|
|
127194
127260
|
);
|
|
127195
127261
|
const dialogueFiles = emitDialogueProjectSourcesV4(records2);
|
|
127196
127262
|
const localFiles = localValues.files();
|
|
@@ -131987,6 +132053,9 @@ function createPendingProjectSourceIdentityV4(workspace, status, authoredValueSe
|
|
|
131987
132053
|
}
|
|
131988
132054
|
materializePendingSourceLocalization(records2, status);
|
|
131989
132055
|
const emission = emitProjectDocumentFilesV4(records2, {
|
|
132056
|
+
storedValueBase: storedValueRowsByIdV4(
|
|
132057
|
+
Object.values(workspace.state.records)
|
|
132058
|
+
),
|
|
131990
132059
|
recordFiles: projectRecordFilesV4(
|
|
131991
132060
|
Object.values(workspace.state.records),
|
|
131992
132061
|
status.reconstructed.values()
|
|
@@ -133437,6 +133506,7 @@ var init_push = __esm({
|
|
|
133437
133506
|
"src/commands/push.ts"() {
|
|
133438
133507
|
"use strict";
|
|
133439
133508
|
init_packed_value_parity();
|
|
133509
|
+
init_stored_value_placements();
|
|
133440
133510
|
init_push_recovery();
|
|
133441
133511
|
init_project_version_transaction_result();
|
|
133442
133512
|
init_performance();
|
|
@@ -138717,7 +138787,7 @@ var init_registry2 = __esm({
|
|
|
138717
138787
|
"schema-contract/registry.mjs"() {
|
|
138718
138788
|
"use strict";
|
|
138719
138789
|
PROJECT_SCHEMA_CONTRACT = Object.freeze({
|
|
138720
|
-
cliVersion: "0.53.
|
|
138790
|
+
cliVersion: "0.53.5",
|
|
138721
138791
|
projectFileUploadBatchSize: 32,
|
|
138722
138792
|
documentRecords: {
|
|
138723
138793
|
member: {
|
|
@@ -146538,7 +146608,7 @@ There is no --keep-current: preserving current semantic state defines flatten.
|
|
|
146538
146608
|
async function main() {
|
|
146539
146609
|
const args = parseArgs(process.argv.slice(2));
|
|
146540
146610
|
if (args.command === "--version") {
|
|
146541
|
-
console.log("0.53.
|
|
146611
|
+
console.log("0.53.5");
|
|
146542
146612
|
return;
|
|
146543
146613
|
}
|
|
146544
146614
|
if (args.command === null || args.command === "help" || args.command === "--help" || args.command === "-h") {
|
package/package.json
CHANGED
|
@@ -97,7 +97,7 @@ wrappers.
|
|
|
97
97
|
The marker near the top of `SKILL.md` must exactly match the package version:
|
|
98
98
|
|
|
99
99
|
```html
|
|
100
|
-
<!-- reviewed-through-cli: 0.53.
|
|
100
|
+
<!-- reviewed-through-cli: 0.53.5 -->
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
The quoted version above is checked too, so this instruction cannot go stale
|