@neocompose/cli 0.6.5 → 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 +8 -0
- package/dist/neo.mjs +35 -44
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
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
|
+
|
|
3
11
|
## [0.6.5] - 2026-07-21
|
|
4
12
|
|
|
5
13
|
### Fixed
|
package/dist/neo.mjs
CHANGED
|
@@ -49561,15 +49561,6 @@ var init_doctor = __esm({
|
|
|
49561
49561
|
});
|
|
49562
49562
|
|
|
49563
49563
|
// ../src/database/project-version-intents.ts
|
|
49564
|
-
var project_version_intents_exports = {};
|
|
49565
|
-
__export(project_version_intents_exports, {
|
|
49566
|
-
PROJECT_VERSION_INTENT_SCHEMA_VERSION: () => PROJECT_VERSION_INTENT_SCHEMA_VERSION,
|
|
49567
|
-
ProjectVersionIntentType: () => ProjectVersionIntentType,
|
|
49568
|
-
assertProjectVersionIntentIsKnown: () => assertProjectVersionIntentIsKnown,
|
|
49569
|
-
assertProjectVersionIntentMatchesDiff: () => assertProjectVersionIntentMatchesDiff,
|
|
49570
|
-
createProjectVersionIntent: () => createProjectVersionIntent,
|
|
49571
|
-
isKnownProjectVersionIntentType: () => isKnownProjectVersionIntentType
|
|
49572
|
-
});
|
|
49573
49564
|
function createProjectVersionIntent(type, details) {
|
|
49574
49565
|
if (details === void 0) {
|
|
49575
49566
|
return {
|
|
@@ -49588,24 +49579,6 @@ function isKnownProjectVersionIntentType(value) {
|
|
|
49588
49579
|
value
|
|
49589
49580
|
);
|
|
49590
49581
|
}
|
|
49591
|
-
function assertProjectVersionIntentIsKnown(intent) {
|
|
49592
|
-
if (!isKnownProjectVersionIntentType(intent.type)) {
|
|
49593
|
-
throw new Error(`Unknown project version intent type "${intent.type}".`);
|
|
49594
|
-
}
|
|
49595
|
-
if (intent.schemaVersion !== PROJECT_VERSION_INTENT_SCHEMA_VERSION) {
|
|
49596
|
-
throw new Error(
|
|
49597
|
-
`Project version intent "${intent.type}" uses schema version ${intent.schemaVersion}; expected ${PROJECT_VERSION_INTENT_SCHEMA_VERSION}.`
|
|
49598
|
-
);
|
|
49599
|
-
}
|
|
49600
|
-
}
|
|
49601
|
-
function assertProjectVersionIntentMatchesDiff(args) {
|
|
49602
|
-
assertProjectVersionIntentIsKnown(args.intent);
|
|
49603
|
-
if (args.diff.set === void 0 && args.diff.unset === void 0) {
|
|
49604
|
-
throw new Error(
|
|
49605
|
-
`Project version intent "${args.intent.type}" cannot be recorded with an empty diff.`
|
|
49606
|
-
);
|
|
49607
|
-
}
|
|
49608
|
-
}
|
|
49609
49582
|
var ProjectVersionIntentType, PROJECT_VERSION_INTENT_SCHEMA_VERSION;
|
|
49610
49583
|
var init_project_version_intents = __esm({
|
|
49611
49584
|
"../src/database/project-version-intents.ts"() {
|
|
@@ -62082,6 +62055,34 @@ var init_project_file_push = __esm({
|
|
|
62082
62055
|
}
|
|
62083
62056
|
});
|
|
62084
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
|
+
|
|
62085
62086
|
// src/commands/push.ts
|
|
62086
62087
|
var push_exports = {};
|
|
62087
62088
|
__export(push_exports, {
|
|
@@ -62736,22 +62737,13 @@ ${blockingErrors.map((error) => ` ${error.message}`).join("\n")}`
|
|
|
62736
62737
|
{
|
|
62737
62738
|
operation: transactionOperation,
|
|
62738
62739
|
changes: status.changes.map((change) => {
|
|
62739
|
-
const intentType = `${change.recordKind}.${change.kind}`;
|
|
62740
|
-
if (!isKnownProjectVersionIntentType2(intentType)) {
|
|
62741
|
-
throw new Error(
|
|
62742
|
-
`No project version intent exists for "${intentType}".`
|
|
62743
|
-
);
|
|
62744
|
-
}
|
|
62745
62740
|
return {
|
|
62746
62741
|
recordKind: change.recordKind,
|
|
62747
62742
|
recordId: change.recordId,
|
|
62748
62743
|
operation: change.kind,
|
|
62749
62744
|
nextData: change.kind === "delete" ? void 0 : stripServerDerivedNeoScript(change.nextData),
|
|
62750
62745
|
deleted: change.kind === "delete" ? true : void 0,
|
|
62751
|
-
intent:
|
|
62752
|
-
intentType,
|
|
62753
|
-
{ source: "neo-cli" }
|
|
62754
|
-
),
|
|
62746
|
+
intent: createNeoCliPushIntent(change),
|
|
62755
62747
|
expectedBaseContentHash: change.kind === "create" ? null : change.casBaseHash ?? null
|
|
62756
62748
|
};
|
|
62757
62749
|
}),
|
|
@@ -62929,7 +62921,7 @@ ${blockingErrors.map((error) => ` ${error.message}`).join("\n")}`
|
|
|
62929
62921
|
} catch (retryError) {
|
|
62930
62922
|
progress.stop();
|
|
62931
62923
|
if (retryError instanceof NeoApiError) {
|
|
62932
|
-
reportPushRejection(retryError.body);
|
|
62924
|
+
reportPushRejection(retryError.status, retryError.body);
|
|
62933
62925
|
process.exitCode = 1;
|
|
62934
62926
|
return;
|
|
62935
62927
|
}
|
|
@@ -62942,7 +62934,7 @@ ${blockingErrors.map((error) => ` ${error.message}`).join("\n")}`
|
|
|
62942
62934
|
process.exitCode = 1;
|
|
62943
62935
|
return;
|
|
62944
62936
|
}
|
|
62945
|
-
reportPushRejection(rejection);
|
|
62937
|
+
reportPushRejection(error.status, rejection);
|
|
62946
62938
|
process.exitCode = 1;
|
|
62947
62939
|
return;
|
|
62948
62940
|
}
|
|
@@ -63064,7 +63056,7 @@ function stripServerDerivedNeoScript(value) {
|
|
|
63064
63056
|
if (next.kind === 23) delete next.action;
|
|
63065
63057
|
return next;
|
|
63066
63058
|
}
|
|
63067
|
-
function reportPushRejection(body) {
|
|
63059
|
+
function reportPushRejection(status, body) {
|
|
63068
63060
|
if (isObjectRecord2(body) && body.error === "base-hash-conflict") {
|
|
63069
63061
|
console.error(
|
|
63070
63062
|
'Push rejected: the server has newer state for these records. Run "neo pull" to merge, then push again.'
|
|
@@ -63091,7 +63083,7 @@ function reportPushRejection(body) {
|
|
|
63091
63083
|
);
|
|
63092
63084
|
return;
|
|
63093
63085
|
}
|
|
63094
|
-
console.error(`Push rejected (
|
|
63086
|
+
console.error(`Push rejected (${status}): ${JSON.stringify(body)}`);
|
|
63095
63087
|
}
|
|
63096
63088
|
function immediateTransactionId(result) {
|
|
63097
63089
|
if (!isObjectRecord2(result)) return null;
|
|
@@ -64064,7 +64056,7 @@ function compileMigrationAction(schema, migrationData) {
|
|
|
64064
64056
|
migrationContext: true
|
|
64065
64057
|
});
|
|
64066
64058
|
}
|
|
64067
|
-
var compileNSAction2, compileNSFunction2, compileNSGetter2, compileNSSetter2,
|
|
64059
|
+
var compileNSAction2, compileNSFunction2, compileNSGetter2, compileNSSetter2, ProjectTransactionInterruptedError, ProjectTransactionFailedError, PROJECT_TRANSACTION_POLL_DELAYS_MS;
|
|
64068
64060
|
var init_push = __esm({
|
|
64069
64061
|
"src/commands/push.ts"() {
|
|
64070
64062
|
"use strict";
|
|
@@ -64074,7 +64066,6 @@ var init_push = __esm({
|
|
|
64074
64066
|
init_document();
|
|
64075
64067
|
init_http();
|
|
64076
64068
|
init_ui();
|
|
64077
|
-
init_project_version_intents();
|
|
64078
64069
|
init_workspace();
|
|
64079
64070
|
init_project_documents();
|
|
64080
64071
|
init_workspace_status();
|
|
@@ -64084,8 +64075,8 @@ var init_push = __esm({
|
|
|
64084
64075
|
init_project_file_push();
|
|
64085
64076
|
init_project_manifest();
|
|
64086
64077
|
init_merge();
|
|
64078
|
+
init_push_change_intent();
|
|
64087
64079
|
({ compileNSAction: compileNSAction2, compileNSFunction: compileNSFunction2, compileNSGetter: compileNSGetter2, compileNSSetter: compileNSSetter2 } = compiler_adapter_exports);
|
|
64088
|
-
({ createProjectVersionIntent: createProjectVersionIntent2, isKnownProjectVersionIntentType: isKnownProjectVersionIntentType2 } = project_version_intents_exports);
|
|
64089
64080
|
ProjectTransactionInterruptedError = class extends Error {
|
|
64090
64081
|
constructor(transactionId) {
|
|
64091
64082
|
super(
|