@neocompose/cli 0.6.4 → 0.6.6
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 +15 -0
- package/dist/neo.mjs +58 -57
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.6.6] - 2026-07-21
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Include relation-kind metadata when pushing internal record relations so
|
|
8
|
+
`@relations` changes pass server transaction admission.
|
|
9
|
+
- Report the actual HTTP response status when a push is rejected.
|
|
10
|
+
|
|
11
|
+
## [0.6.5] - 2026-07-21
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- Persist newly authored lookup, dialogue lookup, and enum defaults as ID arrays,
|
|
16
|
+
including single-select lookup overrides with no base snapshot.
|
|
17
|
+
|
|
3
18
|
## [0.6.4] - 2026-07-20
|
|
4
19
|
|
|
5
20
|
### Added
|
package/dist/neo.mjs
CHANGED
|
@@ -17265,7 +17265,9 @@ function collectDeclarationSymbols(uri, document, declaration, symbols, diagnost
|
|
|
17265
17265
|
symbols,
|
|
17266
17266
|
diagnostics,
|
|
17267
17267
|
void 0,
|
|
17268
|
-
declaration.kind === "global" ? declaration.type.name : void 0
|
|
17268
|
+
declaration.kind === "global" ? declaration.type.name : void 0,
|
|
17269
|
+
void 0,
|
|
17270
|
+
declaration.docsText
|
|
17269
17271
|
);
|
|
17270
17272
|
if (declaration.kind === "enum") {
|
|
17271
17273
|
for (const option of declaration.options) {
|
|
@@ -17277,7 +17279,11 @@ function collectDeclarationSymbols(uri, document, declaration, symbols, diagnost
|
|
|
17277
17279
|
option.annotations,
|
|
17278
17280
|
declaration.name,
|
|
17279
17281
|
symbols,
|
|
17280
|
-
diagnostics
|
|
17282
|
+
diagnostics,
|
|
17283
|
+
void 0,
|
|
17284
|
+
void 0,
|
|
17285
|
+
void 0,
|
|
17286
|
+
option.docsText
|
|
17281
17287
|
);
|
|
17282
17288
|
}
|
|
17283
17289
|
return;
|
|
@@ -17312,7 +17318,8 @@ function collectDeclarationSymbols(uri, document, declaration, symbols, diagnost
|
|
|
17312
17318
|
diagnostics,
|
|
17313
17319
|
void 0,
|
|
17314
17320
|
member.type.name,
|
|
17315
|
-
member.kind === "function"
|
|
17321
|
+
member.kind === "function",
|
|
17322
|
+
member.docsText
|
|
17316
17323
|
);
|
|
17317
17324
|
if (member.kind === "function") {
|
|
17318
17325
|
for (const parameter3 of member.parameters) {
|
|
@@ -17480,7 +17487,7 @@ function collectFlowSymbols(uri, content, ownerName, scopeRange, symbols, diagno
|
|
|
17480
17487
|
}
|
|
17481
17488
|
}
|
|
17482
17489
|
}
|
|
17483
|
-
function collectSymbol(uri, kind, name, range2, annotations, ownerName, symbols, diagnostics, scopeRange, detail, callable) {
|
|
17490
|
+
function collectSymbol(uri, kind, name, range2, annotations, ownerName, symbols, diagnostics, scopeRange, detail, callable, documentation) {
|
|
17484
17491
|
if (RESERVED_NAMES3.has(name)) {
|
|
17485
17492
|
diagnostics.push({
|
|
17486
17493
|
uri,
|
|
@@ -17512,6 +17519,7 @@ function collectSymbol(uri, kind, name, range2, annotations, ownerName, symbols,
|
|
|
17512
17519
|
...scopeRange ? { scopeRange } : {},
|
|
17513
17520
|
...detail ? { detail } : {},
|
|
17514
17521
|
...callable ? { callable } : {},
|
|
17522
|
+
...documentation ? { documentation } : {},
|
|
17515
17523
|
location: { uri, range: range2 }
|
|
17516
17524
|
});
|
|
17517
17525
|
}
|
|
@@ -20269,14 +20277,17 @@ function activeNamedArgument(text, position) {
|
|
|
20269
20277
|
function projectHover(analysis, document, position) {
|
|
20270
20278
|
const resolved = projectSymbolAt(analysis, document, position);
|
|
20271
20279
|
if (!resolved) return null;
|
|
20272
|
-
const owner = resolved.symbol.ownerName ? ` on
|
|
20280
|
+
const owner = resolved.symbol.ownerName ? ` on \`${resolved.symbol.ownerName}\`` : "";
|
|
20281
|
+
const documentation = resolved.symbol.documentation ? `
|
|
20282
|
+
|
|
20283
|
+
${resolved.symbol.documentation}` : "";
|
|
20273
20284
|
const id2 = resolved.symbol.id ? `
|
|
20274
20285
|
|
|
20275
20286
|
ID: \`${resolved.symbol.id}\`` : "\n\nPending ID";
|
|
20276
20287
|
const detail = resolved.symbol.detail ? `: \`${resolved.symbol.detail}\`` : "";
|
|
20277
20288
|
return {
|
|
20278
20289
|
range: resolved.token.range,
|
|
20279
|
-
markdown: `**${resolved.symbol.kind}** \`${resolved.symbol.name}\`${detail}${owner}${id2}`
|
|
20290
|
+
markdown: `**${resolved.symbol.kind}** \`${resolved.symbol.name}\`${detail}${owner}${documentation}${id2}`
|
|
20280
20291
|
};
|
|
20281
20292
|
}
|
|
20282
20293
|
function projectDefinition(analysis, document, position) {
|
|
@@ -27841,6 +27852,8 @@ function memberCommon(context, ownerClass, declaration, id2, owner, base) {
|
|
|
27841
27852
|
}
|
|
27842
27853
|
function lowerFieldMember(context, ownerClass, declaration, id2, commonInput, base) {
|
|
27843
27854
|
const storedStatic = declaration.modifiers.includes("static");
|
|
27855
|
+
const settings = annotation(declaration.annotations, "settings");
|
|
27856
|
+
const storesSelectionArray = context.enumIdsByName.has(declaration.type.name) || declaration.type.name === "Dialogue" || Boolean(settings && argument(settings, "collection"));
|
|
27844
27857
|
const common = {
|
|
27845
27858
|
...commonInput,
|
|
27846
27859
|
// A stored static initializer authors the live value binding, never an
|
|
@@ -27852,10 +27865,10 @@ function lowerFieldMember(context, ownerClass, declaration, id2, commonInput, ba
|
|
|
27852
27865
|
declaration.type,
|
|
27853
27866
|
ownerClass,
|
|
27854
27867
|
base,
|
|
27855
|
-
id2
|
|
27868
|
+
id2,
|
|
27869
|
+
storesSelectionArray
|
|
27856
27870
|
)
|
|
27857
27871
|
};
|
|
27858
|
-
const settings = annotation(declaration.annotations, "settings");
|
|
27859
27872
|
const name = declaration.type.name;
|
|
27860
27873
|
if (name === "bool" || name === "null") {
|
|
27861
27874
|
return { ...common, kind: name };
|
|
@@ -28179,7 +28192,7 @@ function lowerType(context, type, ownerClass) {
|
|
|
28179
28192
|
if (type.name === "object") return { kind: "unknown", nullable };
|
|
28180
28193
|
throw new Error(`Unknown Neo type ${JSON.stringify(type.name)}.`);
|
|
28181
28194
|
}
|
|
28182
|
-
function lowerDefault(context, initializer, type, ownerClass, base, memberId) {
|
|
28195
|
+
function lowerDefault(context, initializer, type, ownerClass, base, memberId, storesSelectionArray) {
|
|
28183
28196
|
if (initializer === null) {
|
|
28184
28197
|
return base?.defaultValue && "serverValueId" in base.defaultValue ? base.defaultValue : null;
|
|
28185
28198
|
}
|
|
@@ -28188,10 +28201,7 @@ function lowerDefault(context, initializer, type, ownerClass, base, memberId) {
|
|
|
28188
28201
|
}
|
|
28189
28202
|
const expression = parseExpression(initializer);
|
|
28190
28203
|
let value = lowerExpressionValue(context, expression, type, ownerClass);
|
|
28191
|
-
if (value !== null &&
|
|
28192
|
-
value = [value];
|
|
28193
|
-
}
|
|
28194
|
-
if ((base?.kind === "lookup" || base?.kind === "dialogueLookup") && !Array.isArray(value)) {
|
|
28204
|
+
if (value !== null && storesSelectionArray && !Array.isArray(value)) {
|
|
28195
28205
|
value = [value];
|
|
28196
28206
|
}
|
|
28197
28207
|
return {
|
|
@@ -49551,15 +49561,6 @@ var init_doctor = __esm({
|
|
|
49551
49561
|
});
|
|
49552
49562
|
|
|
49553
49563
|
// ../src/database/project-version-intents.ts
|
|
49554
|
-
var project_version_intents_exports = {};
|
|
49555
|
-
__export(project_version_intents_exports, {
|
|
49556
|
-
PROJECT_VERSION_INTENT_SCHEMA_VERSION: () => PROJECT_VERSION_INTENT_SCHEMA_VERSION,
|
|
49557
|
-
ProjectVersionIntentType: () => ProjectVersionIntentType,
|
|
49558
|
-
assertProjectVersionIntentIsKnown: () => assertProjectVersionIntentIsKnown,
|
|
49559
|
-
assertProjectVersionIntentMatchesDiff: () => assertProjectVersionIntentMatchesDiff,
|
|
49560
|
-
createProjectVersionIntent: () => createProjectVersionIntent,
|
|
49561
|
-
isKnownProjectVersionIntentType: () => isKnownProjectVersionIntentType
|
|
49562
|
-
});
|
|
49563
49564
|
function createProjectVersionIntent(type, details) {
|
|
49564
49565
|
if (details === void 0) {
|
|
49565
49566
|
return {
|
|
@@ -49578,24 +49579,6 @@ function isKnownProjectVersionIntentType(value) {
|
|
|
49578
49579
|
value
|
|
49579
49580
|
);
|
|
49580
49581
|
}
|
|
49581
|
-
function assertProjectVersionIntentIsKnown(intent) {
|
|
49582
|
-
if (!isKnownProjectVersionIntentType(intent.type)) {
|
|
49583
|
-
throw new Error(`Unknown project version intent type "${intent.type}".`);
|
|
49584
|
-
}
|
|
49585
|
-
if (intent.schemaVersion !== PROJECT_VERSION_INTENT_SCHEMA_VERSION) {
|
|
49586
|
-
throw new Error(
|
|
49587
|
-
`Project version intent "${intent.type}" uses schema version ${intent.schemaVersion}; expected ${PROJECT_VERSION_INTENT_SCHEMA_VERSION}.`
|
|
49588
|
-
);
|
|
49589
|
-
}
|
|
49590
|
-
}
|
|
49591
|
-
function assertProjectVersionIntentMatchesDiff(args) {
|
|
49592
|
-
assertProjectVersionIntentIsKnown(args.intent);
|
|
49593
|
-
if (args.diff.set === void 0 && args.diff.unset === void 0) {
|
|
49594
|
-
throw new Error(
|
|
49595
|
-
`Project version intent "${args.intent.type}" cannot be recorded with an empty diff.`
|
|
49596
|
-
);
|
|
49597
|
-
}
|
|
49598
|
-
}
|
|
49599
49582
|
var ProjectVersionIntentType, PROJECT_VERSION_INTENT_SCHEMA_VERSION;
|
|
49600
49583
|
var init_project_version_intents = __esm({
|
|
49601
49584
|
"../src/database/project-version-intents.ts"() {
|
|
@@ -62072,6 +62055,34 @@ var init_project_file_push = __esm({
|
|
|
62072
62055
|
}
|
|
62073
62056
|
});
|
|
62074
62057
|
|
|
62058
|
+
// src/commands/push-change-intent.ts
|
|
62059
|
+
function createNeoCliPushIntent(change) {
|
|
62060
|
+
const intentType = `${change.recordKind}.${change.kind}`;
|
|
62061
|
+
if (!isKnownProjectVersionIntentType(intentType)) {
|
|
62062
|
+
throw new Error(`No project version intent exists for "${intentType}".`);
|
|
62063
|
+
}
|
|
62064
|
+
if (change.recordKind !== "internal-record-relation") {
|
|
62065
|
+
return createProjectVersionIntent(intentType, { source: "neo-cli" });
|
|
62066
|
+
}
|
|
62067
|
+
const relationData = change.kind === "delete" ? change.baseData : change.nextData;
|
|
62068
|
+
if (!isInternalRecordRelation(relationData)) {
|
|
62069
|
+
throw new Error(
|
|
62070
|
+
`Cannot push internal record relation "${change.recordId}": ${change.kind} change has invalid relation data.`
|
|
62071
|
+
);
|
|
62072
|
+
}
|
|
62073
|
+
return createProjectVersionIntent(intentType, {
|
|
62074
|
+
source: "neo-cli",
|
|
62075
|
+
relationKind: relationData.relationKind
|
|
62076
|
+
});
|
|
62077
|
+
}
|
|
62078
|
+
var init_push_change_intent = __esm({
|
|
62079
|
+
"src/commands/push-change-intent.ts"() {
|
|
62080
|
+
"use strict";
|
|
62081
|
+
init_project_version_intents();
|
|
62082
|
+
init_project2();
|
|
62083
|
+
}
|
|
62084
|
+
});
|
|
62085
|
+
|
|
62075
62086
|
// src/commands/push.ts
|
|
62076
62087
|
var push_exports = {};
|
|
62077
62088
|
__export(push_exports, {
|
|
@@ -62726,22 +62737,13 @@ ${blockingErrors.map((error) => ` ${error.message}`).join("\n")}`
|
|
|
62726
62737
|
{
|
|
62727
62738
|
operation: transactionOperation,
|
|
62728
62739
|
changes: status.changes.map((change) => {
|
|
62729
|
-
const intentType = `${change.recordKind}.${change.kind}`;
|
|
62730
|
-
if (!isKnownProjectVersionIntentType2(intentType)) {
|
|
62731
|
-
throw new Error(
|
|
62732
|
-
`No project version intent exists for "${intentType}".`
|
|
62733
|
-
);
|
|
62734
|
-
}
|
|
62735
62740
|
return {
|
|
62736
62741
|
recordKind: change.recordKind,
|
|
62737
62742
|
recordId: change.recordId,
|
|
62738
62743
|
operation: change.kind,
|
|
62739
62744
|
nextData: change.kind === "delete" ? void 0 : stripServerDerivedNeoScript(change.nextData),
|
|
62740
62745
|
deleted: change.kind === "delete" ? true : void 0,
|
|
62741
|
-
intent:
|
|
62742
|
-
intentType,
|
|
62743
|
-
{ source: "neo-cli" }
|
|
62744
|
-
),
|
|
62746
|
+
intent: createNeoCliPushIntent(change),
|
|
62745
62747
|
expectedBaseContentHash: change.kind === "create" ? null : change.casBaseHash ?? null
|
|
62746
62748
|
};
|
|
62747
62749
|
}),
|
|
@@ -62919,7 +62921,7 @@ ${blockingErrors.map((error) => ` ${error.message}`).join("\n")}`
|
|
|
62919
62921
|
} catch (retryError) {
|
|
62920
62922
|
progress.stop();
|
|
62921
62923
|
if (retryError instanceof NeoApiError) {
|
|
62922
|
-
reportPushRejection(retryError.body);
|
|
62924
|
+
reportPushRejection(retryError.status, retryError.body);
|
|
62923
62925
|
process.exitCode = 1;
|
|
62924
62926
|
return;
|
|
62925
62927
|
}
|
|
@@ -62932,7 +62934,7 @@ ${blockingErrors.map((error) => ` ${error.message}`).join("\n")}`
|
|
|
62932
62934
|
process.exitCode = 1;
|
|
62933
62935
|
return;
|
|
62934
62936
|
}
|
|
62935
|
-
reportPushRejection(rejection);
|
|
62937
|
+
reportPushRejection(error.status, rejection);
|
|
62936
62938
|
process.exitCode = 1;
|
|
62937
62939
|
return;
|
|
62938
62940
|
}
|
|
@@ -63054,7 +63056,7 @@ function stripServerDerivedNeoScript(value) {
|
|
|
63054
63056
|
if (next.kind === 23) delete next.action;
|
|
63055
63057
|
return next;
|
|
63056
63058
|
}
|
|
63057
|
-
function reportPushRejection(body) {
|
|
63059
|
+
function reportPushRejection(status, body) {
|
|
63058
63060
|
if (isObjectRecord2(body) && body.error === "base-hash-conflict") {
|
|
63059
63061
|
console.error(
|
|
63060
63062
|
'Push rejected: the server has newer state for these records. Run "neo pull" to merge, then push again.'
|
|
@@ -63081,7 +63083,7 @@ function reportPushRejection(body) {
|
|
|
63081
63083
|
);
|
|
63082
63084
|
return;
|
|
63083
63085
|
}
|
|
63084
|
-
console.error(`Push rejected (
|
|
63086
|
+
console.error(`Push rejected (${status}): ${JSON.stringify(body)}`);
|
|
63085
63087
|
}
|
|
63086
63088
|
function immediateTransactionId(result) {
|
|
63087
63089
|
if (!isObjectRecord2(result)) return null;
|
|
@@ -64054,7 +64056,7 @@ function compileMigrationAction(schema, migrationData) {
|
|
|
64054
64056
|
migrationContext: true
|
|
64055
64057
|
});
|
|
64056
64058
|
}
|
|
64057
|
-
var compileNSAction2, compileNSFunction2, compileNSGetter2, compileNSSetter2,
|
|
64059
|
+
var compileNSAction2, compileNSFunction2, compileNSGetter2, compileNSSetter2, ProjectTransactionInterruptedError, ProjectTransactionFailedError, PROJECT_TRANSACTION_POLL_DELAYS_MS;
|
|
64058
64060
|
var init_push = __esm({
|
|
64059
64061
|
"src/commands/push.ts"() {
|
|
64060
64062
|
"use strict";
|
|
@@ -64064,7 +64066,6 @@ var init_push = __esm({
|
|
|
64064
64066
|
init_document();
|
|
64065
64067
|
init_http();
|
|
64066
64068
|
init_ui();
|
|
64067
|
-
init_project_version_intents();
|
|
64068
64069
|
init_workspace();
|
|
64069
64070
|
init_project_documents();
|
|
64070
64071
|
init_workspace_status();
|
|
@@ -64074,8 +64075,8 @@ var init_push = __esm({
|
|
|
64074
64075
|
init_project_file_push();
|
|
64075
64076
|
init_project_manifest();
|
|
64076
64077
|
init_merge();
|
|
64078
|
+
init_push_change_intent();
|
|
64077
64079
|
({ compileNSAction: compileNSAction2, compileNSFunction: compileNSFunction2, compileNSGetter: compileNSGetter2, compileNSSetter: compileNSSetter2 } = compiler_adapter_exports);
|
|
64078
|
-
({ createProjectVersionIntent: createProjectVersionIntent2, isKnownProjectVersionIntentType: isKnownProjectVersionIntentType2 } = project_version_intents_exports);
|
|
64079
64080
|
ProjectTransactionInterruptedError = class extends Error {
|
|
64080
64081
|
constructor(transactionId) {
|
|
64081
64082
|
super(
|