@neocompose/cli 0.10.3 → 0.10.4

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,26 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.10.4] - 2026-07-26
4
+
5
+ ### Fixed
6
+
7
+ - Materialize the required keys a bare `new()` omits. A constructor body was
8
+ built from constructor projections and explicit assignments only, so
9
+ `Birthday = new()` lowered to `{}` and the commit was rejected with
10
+ `missing required schema key "Day"` -- naming a key whose default the source
11
+ declares one line away. Each omitted required key now lowers the member's own
12
+ declared initializer, so a nested `new()` recurses and a row-backed default
13
+ is copied rather than shared. Optional keys stay absent, and a required key
14
+ whose member declares no default is unchanged.
15
+
16
+ - Stop rejecting the transaction status response over a field the server no
17
+ longer sends. `resultCursor` was removed from the status payload as dead --
18
+ it was hardcoded null and read only as the starting result-page cursor,
19
+ where an empty cursor means the same thing -- but push still required it to
20
+ be present, so every push large enough to go durable failed with
21
+ `resultCursor must be a string or null` after the write had already
22
+ committed.
23
+
3
24
  ## [0.10.3] - 2026-07-25
4
25
 
5
26
  ### Fixed
package/dist/neo.mjs CHANGED
@@ -42417,6 +42417,7 @@ function buildValueLowerContext(state, manifest, options = {}) {
42417
42417
  mainLocale: projectMainLocaleFromState(state),
42418
42418
  valuePlacements: indexValuePlacements(state),
42419
42419
  parsedInitializers,
42420
+ declaredInitializers: indexDeclaredInitializers(options.analysis),
42420
42421
  reconstructed: /* @__PURE__ */ new Map(),
42421
42422
  pendingValues: /* @__PURE__ */ new Map(),
42422
42423
  pendingLocalizedTexts: /* @__PURE__ */ new Map(),
@@ -42424,6 +42425,27 @@ function buildValueLowerContext(state, manifest, options = {}) {
42424
42425
  pendingBindingMembersByClassId: /* @__PURE__ */ new Map()
42425
42426
  };
42426
42427
  }
42428
+ function indexDeclaredInitializers(analysis) {
42429
+ const initializers = /* @__PURE__ */ new Map();
42430
+ if (analysis === void 0) return initializers;
42431
+ for (const sourceClass of analysis.schema.classes) {
42432
+ for (const declaration of sourceClass.members) {
42433
+ if (declaration.kind !== "field" || declaration.initializer === null) {
42434
+ continue;
42435
+ }
42436
+ if (declaration.modifiers.includes("static")) continue;
42437
+ initializers.set(
42438
+ sourceIdentityId(
42439
+ declaration,
42440
+ "member",
42441
+ `${sourceClass.name}.${declaration.name}`
42442
+ ),
42443
+ declaration.initializer
42444
+ );
42445
+ }
42446
+ }
42447
+ return initializers;
42448
+ }
42427
42449
  function lowerStoredValueBindingsV4(state, manifest, bindings, options = {}) {
42428
42450
  const context = buildValueLowerContext(state, manifest, options);
42429
42451
  const memberValueIds = /* @__PURE__ */ new Map();
@@ -42889,6 +42911,17 @@ function lowerSeedRow(context, member, sourceExpression, source, valueId, path,
42889
42911
  environment
42890
42912
  );
42891
42913
  }
42914
+ materializeRequiredDefaults(
42915
+ context,
42916
+ resolvedMember,
42917
+ effectiveClass,
42918
+ body,
42919
+ source,
42920
+ path,
42921
+ rows,
42922
+ localizedTexts,
42923
+ environment
42924
+ );
42892
42925
  value = body;
42893
42926
  } else if (resolvedMember.kind === "list") {
42894
42927
  if (expression.kind === "litNull") {
@@ -42984,6 +43017,51 @@ function lowerSeedRow(context, member, sourceExpression, source, valueId, path,
42984
43017
  context.pendingValues.set(valueId, row);
42985
43018
  return row;
42986
43019
  }
43020
+ function materializeRequiredDefaults(context, member, effectiveClass, body, source, path, rows, localizedTexts, environment) {
43021
+ if (member.partial === true) return;
43022
+ for (const [schemaKey, childMember] of storedSchemaEntries(
43023
+ context,
43024
+ effectiveClass
43025
+ )) {
43026
+ if (body[schemaKey] !== void 0) continue;
43027
+ if (!childMember.required) continue;
43028
+ if (childMember.kind === "class" && childMember.partial === true) continue;
43029
+ const initializer = context.declaredInitializers.get(childMember.id);
43030
+ if (initializer === void 0) continue;
43031
+ body[schemaKey] = lowerSeedChild(
43032
+ context,
43033
+ recursivePartialMember(member, childMember),
43034
+ parseCachedInitializer(context.parsedInitializers, initializer),
43035
+ source,
43036
+ `${path}.${schemaKey}`,
43037
+ rows,
43038
+ localizedTexts,
43039
+ void 0,
43040
+ environment
43041
+ );
43042
+ }
43043
+ }
43044
+ function storedSchemaEntries(context, schemaClass2) {
43045
+ const entries = /* @__PURE__ */ new Map();
43046
+ const visited = /* @__PURE__ */ new Set();
43047
+ let current = schemaClass2;
43048
+ while (current !== void 0 && !visited.has(current.id)) {
43049
+ visited.add(current.id);
43050
+ for (const [schemaKey, memberId] of Object.entries(current.schema)) {
43051
+ if (entries.has(schemaKey)) continue;
43052
+ const child = context.members.get(memberId);
43053
+ if (child === void 0) continue;
43054
+ if (!ownsValueRow(child)) continue;
43055
+ entries.set(schemaKey, child);
43056
+ }
43057
+ current = current.extendsClassId === null ? void 0 : context.classes.get(current.extendsClassId);
43058
+ }
43059
+ return [...entries];
43060
+ }
43061
+ function ownsValueRow(member) {
43062
+ if (member.isReadOnly) return false;
43063
+ return member.kind !== "computed" && member.kind !== "function" && member.kind !== "scriptFunction";
43064
+ }
42987
43065
  function lowerSeedChild(context, member, expression, source, path, rows, localizedTexts, containerId, environment) {
42988
43066
  const symbolId = sourceValueSymbol(context, expression);
42989
43067
  if (symbolId !== null) return symbolId;
@@ -66668,10 +66746,6 @@ function readProjectVersionTransactionStatus(value, transactionId) {
66668
66746
  value.errorMessage,
66669
66747
  `Project transaction "${transactionId}" errorMessage`
66670
66748
  );
66671
- const resultCursor = readNullableString(
66672
- value.resultCursor,
66673
- `Project transaction "${transactionId}" resultCursor`
66674
- );
66675
66749
  return {
66676
66750
  transactionId,
66677
66751
  commitStatus: value.commitStatus,
@@ -66692,8 +66766,7 @@ function readProjectVersionTransactionStatus(value, transactionId) {
66692
66766
  `Project transaction "${transactionId}" appliedChunkCount`
66693
66767
  ),
66694
66768
  errorCode,
66695
- errorMessage: errorMessage3,
66696
- resultCursor
66769
+ errorMessage: errorMessage3
66697
66770
  };
66698
66771
  }
66699
66772
  function readProjectVersionTransactionResultPage(value, transactionId) {
@@ -66901,7 +66974,7 @@ async function downloadProjectVersionTransactionResult(args) {
66901
66974
  const assignments = {};
66902
66975
  const changedRecords = [];
66903
66976
  const seenCursors = /* @__PURE__ */ new Set();
66904
- let cursor = args.status.resultCursor ?? "";
66977
+ let cursor = "";
66905
66978
  for (; ; ) {
66906
66979
  if (seenCursors.has(cursor)) {
66907
66980
  throw new Error(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neocompose/cli",
3
- "version": "0.10.3",
3
+ "version": "0.10.4",
4
4
  "description": "Neo Compose native project-source CLI with bidirectional sync.",
5
5
  "license": "MIT",
6
6
  "type": "module",