@neocompose/cli 0.53.4 → 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,10 @@
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
+
3
8
  ## [0.53.4] - 2026-09-19
4
9
 
5
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.
package/dist/neo.mjs CHANGED
@@ -85700,6 +85700,171 @@ var init_init_source = __esm({
85700
85700
  }
85701
85701
  });
85702
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
+
85703
85868
  // ../src/runtime/materialize-values.ts
85704
85869
  function materializeInitializerValue2(args) {
85705
85870
  return materializeInitializerValue({
@@ -96596,9 +96761,42 @@ function appendAuthoredOwnedValueCascadeDeletes(args) {
96596
96761
  }
96597
96762
  }
96598
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
+ };
96599
96797
  const resolverDocument = composeResolverDocument(
96600
- postScope.document,
96601
- initializerEvaluatorLookups(postScope.document)
96798
+ replayDocument,
96799
+ initializerEvaluatorLookups(replayDocument)
96602
96800
  );
96603
96801
  const materializedIndex = buildVirtualInstanceMaterializedIndex({
96604
96802
  document: resolverDocument
@@ -100831,6 +101029,7 @@ var SERVER_COMPILATION_PROJECT_CACHE_LIMIT, serverCompilationProjectCache, READ_
100831
101029
  var init_project_version_schema_commit = __esm({
100832
101030
  "../src/database/project-version-schema-commit.ts"() {
100833
101031
  "use strict";
101032
+ init_document_initializer_compiler();
100834
101033
  init_effective_value_comparison();
100835
101034
  init_classes();
100836
101035
  init_constructor_parameter_settlement();
@@ -114574,7 +114773,7 @@ var init_stored_value_placements = __esm({
114574
114773
  });
114575
114774
 
114576
114775
  // src/project-source/root-source.ts
114577
- function emitProjectRootSourceV4(records2, manifest, materializedConstructors, localValues) {
114776
+ function emitProjectRootSourceV4(records2, manifest, materializedConstructors, localValues, options = {}) {
114578
114777
  const project = [...records2.values()].find(
114579
114778
  (record6) => !record6.deleted && record6.recordKind === "project"
114580
114779
  );
@@ -114586,6 +114785,7 @@ function emitProjectRootSourceV4(records2, manifest, materializedConstructors, l
114586
114785
  );
114587
114786
  const classes = new Map(manifest.classes.map((entry) => [entry.id, entry]));
114588
114787
  const values = emitStoredValueBindingSourcesV4(records2, memberIds, {
114788
+ ...options,
114589
114789
  manifest,
114590
114790
  targetTypedRoot: true,
114591
114791
  localValues
@@ -115159,7 +115359,7 @@ function cliEvaluatorLookups(document, options = {}) {
115159
115359
  return cliEvaluatorRuntime(document, options).databaseVM;
115160
115360
  }
115161
115361
  function cliEvaluatorRuntime(document, options = {}) {
115162
- const initializerCompiler = isPulledInitializerCompilationDocumentV4(document) ? pulledInitializerCompilerV4(document) : void 0;
115362
+ const initializerCompiler = isPulledInitializerCompilationDocumentV4(document) ? documentInitializerCompiler(document) : void 0;
115163
115363
  const databaseVM = headlessVirtualInstanceLookups(document, {
115164
115364
  ...options,
115165
115365
  ...initializerCompiler === void 0 ? {} : { initializerCompiler }
@@ -117245,7 +117445,7 @@ function collapseLocalizedSourceRevertsV4(args) {
117245
117445
  document: comparison,
117246
117446
  changes: normalized,
117247
117447
  editedValueIds: new Set(edited.map((change) => change.recordId)),
117248
- initializerCompiler: pulledInitializerCompilerV4(comparison)
117448
+ initializerCompiler: documentInitializerCompiler(comparison)
117249
117449
  });
117250
117450
  const normalizedById = new Map(
117251
117451
  normalized.map((change) => [change.recordId, change])
@@ -119031,69 +119231,6 @@ function createPulledConstructionReplayContext(args) {
119031
119231
  valuesById: new Map(args.document.values.map((value) => [value.id, value]))
119032
119232
  };
119033
119233
  }
119034
- function pulledInitializerCompilerStateV4(document, compilationProject) {
119035
- const existing = pulledInitializerCompilerStates.get(document);
119036
- if (existing !== void 0) {
119037
- if (compilationProject !== void 0) {
119038
- existing.compilationProject = compilationProject;
119039
- }
119040
- return existing;
119041
- }
119042
- const created = {
119043
- compilationProject: compilationProject ?? null
119044
- };
119045
- pulledInitializerCompilerStates.set(document, created);
119046
- return created;
119047
- }
119048
- function compilationProjectForPulledDocumentV4(document, state) {
119049
- state.compilationProject ??= createNeoScriptCompilationProject({
119050
- project: document.project,
119051
- projectFiles: document.projectFiles,
119052
- members: document.members,
119053
- classes: document.classes,
119054
- enums: document.enums,
119055
- interfaces: document.interfaces,
119056
- constructors: document.constructors ?? []
119057
- });
119058
- return state.compilationProject;
119059
- }
119060
- function memberCompilationIndexV4(document) {
119061
- const existing = pulledMemberCompilationIndexes.get(document);
119062
- if (existing !== void 0) return existing;
119063
- const created = {
119064
- membersById: new Map(
119065
- document.members.map((member) => [member.id, member])
119066
- ),
119067
- ownerClassesByMemberId: new Map(
119068
- document.classes.flatMap(
119069
- (schemaClass2) => Object.values(schemaClass2.schema).map(
119070
- (memberId) => [memberId, schemaClass2]
119071
- )
119072
- )
119073
- )
119074
- };
119075
- pulledMemberCompilationIndexes.set(document, created);
119076
- return created;
119077
- }
119078
- function pulledInitializerCompilerV4(document, compilationProject) {
119079
- const state = pulledInitializerCompilerStateV4(document, compilationProject);
119080
- return (site) => {
119081
- if (site.sourceValueId !== null) {
119082
- compilePulledValueInitializerBodyV4(
119083
- document,
119084
- site.sourceValueId,
119085
- compilationProjectForPulledDocumentV4(document, state)
119086
- );
119087
- return;
119088
- }
119089
- if (site.memberId === null) return;
119090
- compilePulledMemberInitializerBodyV4(
119091
- document,
119092
- site.memberId,
119093
- compilationProjectForPulledDocumentV4(document, state)
119094
- );
119095
- };
119096
- }
119097
119234
  function describePulledProjectBodyCompileError(error) {
119098
119235
  const fallback = error instanceof Error ? error.message : String(error);
119099
119236
  if (!(error instanceof CompileError)) return fallback;
@@ -119210,7 +119347,7 @@ function replayStoredConstructionV4(args) {
119210
119347
  // Replays need distinct compiler closures but read one immutable
119211
119348
  // member/value graph. Share its project-sized evaluator indexes.
119212
119349
  evaluatorCache: { key: document, revision: void 0 },
119213
- initializerCompiler: pulledInitializerCompilerV4(
119350
+ initializerCompiler: documentInitializerCompiler(
119214
119351
  document,
119215
119352
  compilationProject
119216
119353
  )
@@ -119264,68 +119401,6 @@ function compilePulledUncompiledConstructorsV4(document, compilationProject, rep
119264
119401
  }
119265
119402
  assertPulledConstructorsCompiled(document, replayContext);
119266
119403
  }
119267
- function valueInitializerCompilationSites(document) {
119268
- const cached = pulledValueInitializerCompilationSites.get(document);
119269
- if (cached !== void 0) return cached;
119270
- const rows = document.values.filter(isInitValueContent);
119271
- const valuesById = new Map(
119272
- document.values.map((value) => [value.id, value])
119273
- );
119274
- const ownershipTargetIds = valueIdsWithSourceChains(
119275
- new Set(rows.map((row) => row.id)),
119276
- valuesById
119277
- );
119278
- const rootOwners = /* @__PURE__ */ new Map();
119279
- const owners = resolveOwnerMembersForValues(
119280
- document,
119281
- ownershipTargetIds,
119282
- void 0,
119283
- rootOwners
119284
- );
119285
- const sites = /* @__PURE__ */ new Map();
119286
- for (const row of rows) {
119287
- const member = owners.get(row.id);
119288
- if (member === void 0) continue;
119289
- const ownerContext = initializerOwnerContext(
119290
- document,
119291
- row.id,
119292
- rootOwners,
119293
- valuesById
119294
- );
119295
- sites.set(row.id, {
119296
- row,
119297
- member,
119298
- ownerClass: ownerContext.ownerClass,
119299
- lexicalThisClass: ownerContext.lexicalThisClass
119300
- });
119301
- }
119302
- pulledValueInitializerCompilationSites.set(document, sites);
119303
- return sites;
119304
- }
119305
- function compilePulledValueInitializerBodyV4(document, valueId, compilationProject) {
119306
- const site = valueInitializerCompilationSites(document).get(valueId);
119307
- if (site === void 0) {
119308
- throw new Error(
119309
- "Cannot compile initializer dependency because its source value row is unresolved."
119310
- );
119311
- }
119312
- compileValueRowInitializerBody({
119313
- project: document.project,
119314
- projectFiles: document.projectFiles,
119315
- members: document.members,
119316
- classes: document.classes,
119317
- enums: document.enums,
119318
- interfaces: document.interfaces,
119319
- constructors: document.constructors ?? [],
119320
- member: site.member,
119321
- valueRow: site.row,
119322
- valueId: String(Reflect.get(site.row, "id")),
119323
- initializerOwnerClass: site.ownerClass,
119324
- lexicalThisClass: site.lexicalThisClass,
119325
- storedConstructionReplay: true,
119326
- ...compilationProject === void 0 ? {} : { compilationProject }
119327
- });
119328
- }
119329
119404
  function compilePulledProjectDocumentForEvaluationV4(document, compilationProject) {
119330
119405
  const sharedCompilationProject = compilationProject ?? createNeoScriptCompilationProject({
119331
119406
  project: document.project,
@@ -119336,7 +119411,7 @@ function compilePulledProjectDocumentForEvaluationV4(document, compilationProjec
119336
119411
  interfaces: document.interfaces,
119337
119412
  constructors: document.constructors ?? []
119338
119413
  });
119339
- pulledInitializerCompilerStateV4(document, sharedCompilationProject);
119414
+ documentInitializerCompiler(document, sharedCompilationProject);
119340
119415
  const compileArgs = {
119341
119416
  project: document.project,
119342
119417
  projectFiles: document.projectFiles,
@@ -119351,7 +119426,7 @@ function compilePulledProjectDocumentForEvaluationV4(document, compilationProjec
119351
119426
  compileConstructorRecord({ ...compileArgs, constructor: constructor2 });
119352
119427
  }
119353
119428
  assertPulledConstructorsCompiled(document);
119354
- const memberIndex = memberCompilationIndexV4(document);
119429
+ const memberIndex = documentMemberCompilationIndex(document);
119355
119430
  for (const member of compileArgs.members) {
119356
119431
  try {
119357
119432
  compileAuthoredMemberBodies({
@@ -119387,31 +119462,6 @@ function assertPulledConstructorsCompiled(document, replayContext) {
119387
119462
  }
119388
119463
  if (replayContext !== void 0) replayContext.constructorsValidated = true;
119389
119464
  }
119390
- function compilePulledMemberInitializerBodyV4(document, memberId, compilationProject) {
119391
- const compileArgs = {
119392
- project: document.project,
119393
- projectFiles: document.projectFiles,
119394
- members: document.members,
119395
- classes: document.classes,
119396
- enums: document.enums,
119397
- interfaces: document.interfaces,
119398
- constructors: document.constructors ?? []
119399
- };
119400
- const memberIndex = memberCompilationIndexV4(document);
119401
- const member = memberIndex.membersById.get(memberId);
119402
- if (member === void 0) {
119403
- throw new Error(
119404
- `Cannot compile initializer dependency for missing member "${memberId}".`
119405
- );
119406
- }
119407
- const thisClass = memberIndex.ownerClassesByMemberId.get(memberId) ?? null;
119408
- compileMemberInitializerBody({
119409
- ...compileArgs,
119410
- member,
119411
- thisClass,
119412
- ...compilationProject === void 0 ? {} : { compilationProject }
119413
- });
119414
- }
119415
119465
  function samePulledRecords(left, right) {
119416
119466
  if (left === right) return true;
119417
119467
  if (left.size !== right.size) return false;
@@ -119549,10 +119599,11 @@ function replayWorkspace(records2) {
119549
119599
  state: { records: stateRecords }
119550
119600
  };
119551
119601
  }
119552
- var pulledBodyCompileSites, pulledInitializerCompilerStates, pulledMemberCompilationIndexes, pulledValueInitializerCompilationSites, recentPulledDocuments, RECENT_PULLED_DOCUMENT_LIMIT;
119602
+ var pulledBodyCompileSites, recentPulledDocuments, RECENT_PULLED_DOCUMENT_LIMIT;
119553
119603
  var init_initializer_replay = __esm({
119554
119604
  "src/project-source/initializer-replay.ts"() {
119555
119605
  "use strict";
119606
+ init_document_initializer_compiler();
119556
119607
  init_members();
119557
119608
  init_compile_ns_property();
119558
119609
  init_materialize_values();
@@ -119565,9 +119616,6 @@ var init_initializer_replay = __esm({
119565
119616
  init_constructors2();
119566
119617
  init_compiler_adapter();
119567
119618
  pulledBodyCompileSites = /* @__PURE__ */ new WeakMap();
119568
- pulledInitializerCompilerStates = /* @__PURE__ */ new WeakMap();
119569
- pulledMemberCompilationIndexes = /* @__PURE__ */ new WeakMap();
119570
- pulledValueInitializerCompilationSites = /* @__PURE__ */ new WeakMap();
119571
119619
  recentPulledDocuments = [];
119572
119620
  RECENT_PULLED_DOCUMENT_LIMIT = 4;
119573
119621
  }
@@ -119580,18 +119628,19 @@ function inferredGenericClassBinding(classId) {
119580
119628
  function inferredGenericClassId(binding) {
119581
119629
  return binding?.startsWith(INFERRED_GENERIC_CLASS_PREFIX) ? binding.slice(INFERRED_GENERIC_CLASS_PREFIX.length) : null;
119582
119630
  }
119583
- function emitStaticValueSourcesV4(records2, manifest, localValues) {
119631
+ function emitStaticValueSourcesV4(records2, manifest, localValues, options = {}) {
119584
119632
  const memberIds = [];
119585
119633
  for (const record6 of records2.values()) {
119586
119634
  if (record6.recordKind === "member" && !record6.deleted && isObjectRecord2(record6.data) && record6.data.modifier === 3 && typeof record6.data.valueId === "string")
119587
119635
  memberIds.push(record6.recordId);
119588
119636
  }
119589
119637
  return emitStoredValueBindingSourcesV4(records2, memberIds, {
119638
+ ...options,
119590
119639
  manifest,
119591
119640
  localValues
119592
119641
  });
119593
119642
  }
119594
- function buildValueEmitContext(records2, manifest) {
119643
+ function buildValueEmitContext(records2, manifest, options = {}) {
119595
119644
  const rawMembers = dataById(records2, "member");
119596
119645
  const manifestMembers = new Map(
119597
119646
  manifest.members.map((member) => [member.id, member])
@@ -119622,6 +119671,7 @@ function buildValueEmitContext(records2, manifest) {
119622
119671
  let materializedGraph;
119623
119672
  let effectiveValues;
119624
119673
  return {
119674
+ storedValueBase: options.storedValueBase,
119625
119675
  records: records2,
119626
119676
  readDocument,
119627
119677
  readCompilationProject,
@@ -119629,7 +119679,7 @@ function buildValueEmitContext(records2, manifest) {
119629
119679
  readEffectiveValues: () => effectiveValues ??= new EffectiveValueReader({
119630
119680
  ...readDocument(),
119631
119681
  evaluatorCache: { key: readDocument(), revision: void 0 },
119632
- initializerCompiler: pulledInitializerCompilerV4(
119682
+ initializerCompiler: documentInitializerCompiler(
119633
119683
  readDocument(),
119634
119684
  readCompilationProject()
119635
119685
  )
@@ -119685,7 +119735,7 @@ function buildValueEmitContext(records2, manifest) {
119685
119735
  }
119686
119736
  function emitStoredValueBindingSourcesV4(records2, memberIds, options) {
119687
119737
  const context = {
119688
- ...buildValueEmitContext(records2, options.manifest),
119738
+ ...buildValueEmitContext(records2, options.manifest, options),
119689
119739
  localValues: options.localValues
119690
119740
  };
119691
119741
  const members = context.members;
@@ -119734,13 +119784,13 @@ function targetTypedVariantConstruction(code) {
119734
119784
  if (!prefix.test(code)) return code;
119735
119785
  return code.replace(prefix, "new(");
119736
119786
  }
119737
- function emitVariantValueSourcesV4(records2, manifest) {
119787
+ function emitVariantValueSourcesV4(records2, manifest, options = {}) {
119738
119788
  const initializers = /* @__PURE__ */ new Map();
119739
119789
  const recordKeysByVariant = /* @__PURE__ */ new Map();
119740
119790
  if (manifest.variants.length === 0) {
119741
119791
  return { initializers, recordKeysByVariant };
119742
119792
  }
119743
- const context = buildValueEmitContext(records2, manifest);
119793
+ const context = buildValueEmitContext(records2, manifest, options);
119744
119794
  const variantClass = [...manifest.classes].find(
119745
119795
  (entry) => entry.name === NEO_VARIANT_TYPE_NAME
119746
119796
  );
@@ -120026,8 +120076,8 @@ function rowBackedDefaultMemberIdsV4(state) {
120026
120076
  }
120027
120077
  return result;
120028
120078
  }
120029
- function emitMemberDefaultSourcesV4(records2, manifest) {
120030
- const context = buildValueEmitContext(records2, manifest);
120079
+ function emitMemberDefaultSourcesV4(records2, manifest, options = {}) {
120080
+ const context = buildValueEmitContext(records2, manifest, options);
120031
120081
  const initializers = /* @__PURE__ */ new Map();
120032
120082
  const recordKeysByMember = /* @__PURE__ */ new Map();
120033
120083
  for (const record6 of records2.values()) {
@@ -125339,11 +125389,13 @@ function classValueBody(context, member, value, visited, targetTyped, outerEnvir
125339
125389
  if (childMember === void 0)
125340
125390
  throw new Error(`Class ${name}.${key} has no member record.`);
125341
125391
  const preservesExternalBinding = context.collectionBindingValueIds.has(childId);
125342
- if (!preservesExternalBinding && emitsAsMemberDefaultDerivedAbsence(context, childMember, childId)) {
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)) {
125343
125395
  continue;
125344
125396
  }
125345
125397
  const replayChildId = replayBody[key];
125346
- if (!preservesExternalBinding && replayGraph !== null && typeof replayChildId === "string" && materializedValueSubgraphsEqual(
125398
+ if (!preservesExternalBinding && !context.storedValueBase?.has(childId) && replayGraph !== null && typeof replayChildId === "string" && materializedValueSubgraphsEqual(
125347
125399
  context,
125348
125400
  context.readEffectiveValues(),
125349
125401
  replayGraph,
@@ -127126,9 +127178,14 @@ function emitProjectDocumentFilesV4(records2, options = {}) {
127126
127178
  onInvalidStaticMemberOwnership: (recovery) => staticMemberOwnershipRecoveries.push(recovery)
127127
127179
  });
127128
127180
  const localValues = new LocalValueEmissionV4(options.localValues ?? []);
127129
- const staticValues = emitStaticValueSourcesV4(records2, manifest, localValues);
127130
- const memberDefaults = emitMemberDefaultSourcesV4(records2, manifest);
127131
- const variantValues = emitVariantValueSourcesV4(records2, manifest);
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);
127132
127189
  const baseSource = emitProjectSourcesV4(manifest, {
127133
127190
  staticInitializers: staticValues.initializers,
127134
127191
  defaultInitializers: memberDefaults.initializers,
@@ -127198,7 +127255,8 @@ function emitProjectDocumentFilesV4(records2, options = {}) {
127198
127255
  records2,
127199
127256
  manifest,
127200
127257
  materializedConstructors,
127201
- localValues
127258
+ localValues,
127259
+ options
127202
127260
  );
127203
127261
  const dialogueFiles = emitDialogueProjectSourcesV4(records2);
127204
127262
  const localFiles = localValues.files();
@@ -131995,6 +132053,9 @@ function createPendingProjectSourceIdentityV4(workspace, status, authoredValueSe
131995
132053
  }
131996
132054
  materializePendingSourceLocalization(records2, status);
131997
132055
  const emission = emitProjectDocumentFilesV4(records2, {
132056
+ storedValueBase: storedValueRowsByIdV4(
132057
+ Object.values(workspace.state.records)
132058
+ ),
131998
132059
  recordFiles: projectRecordFilesV4(
131999
132060
  Object.values(workspace.state.records),
132000
132061
  status.reconstructed.values()
@@ -133445,6 +133506,7 @@ var init_push = __esm({
133445
133506
  "src/commands/push.ts"() {
133446
133507
  "use strict";
133447
133508
  init_packed_value_parity();
133509
+ init_stored_value_placements();
133448
133510
  init_push_recovery();
133449
133511
  init_project_version_transaction_result();
133450
133512
  init_performance();
@@ -138725,7 +138787,7 @@ var init_registry2 = __esm({
138725
138787
  "schema-contract/registry.mjs"() {
138726
138788
  "use strict";
138727
138789
  PROJECT_SCHEMA_CONTRACT = Object.freeze({
138728
- cliVersion: "0.53.4",
138790
+ cliVersion: "0.53.5",
138729
138791
  projectFileUploadBatchSize: 32,
138730
138792
  documentRecords: {
138731
138793
  member: {
@@ -146546,7 +146608,7 @@ There is no --keep-current: preserving current semantic state defines flatten.
146546
146608
  async function main() {
146547
146609
  const args = parseArgs(process.argv.slice(2));
146548
146610
  if (args.command === "--version") {
146549
- console.log("0.53.4");
146611
+ console.log("0.53.5");
146550
146612
  return;
146551
146613
  }
146552
146614
  if (args.command === null || args.command === "help" || args.command === "--help" || args.command === "-h") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neocompose/cli",
3
- "version": "0.53.4",
3
+ "version": "0.53.5",
4
4
  "description": "Neo Compose native project-source CLI with bidirectional sync.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -9,7 +9,7 @@ description: >-
9
9
  `@neocompose/cli` or `node cli/bin/neo.mjs` in the neo-compose repository.
10
10
  ---
11
11
 
12
- <!-- reviewed-through-cli: 0.53.4 -->
12
+ <!-- reviewed-through-cli: 0.53.5 -->
13
13
 
14
14
  # Neo Compose CLI
15
15
 
@@ -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.4 -->
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