@omen.foundation/node-microservice-runtime 0.1.107 → 0.1.109
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/package.json +1 -1
- package/scripts/publish-service.mjs +21 -24
package/package.json
CHANGED
|
@@ -1073,13 +1073,6 @@ async function updateManifest({
|
|
|
1073
1073
|
});
|
|
1074
1074
|
}
|
|
1075
1075
|
|
|
1076
|
-
const requestBody = {
|
|
1077
|
-
autoDeploy: true,
|
|
1078
|
-
comments: comments ?? '',
|
|
1079
|
-
manifest: mappedServices,
|
|
1080
|
-
storageReferences: storageReferences.length > 0 ? storageReferences : null,
|
|
1081
|
-
};
|
|
1082
|
-
|
|
1083
1076
|
// Log storage references being sent to backend
|
|
1084
1077
|
if (storageReferences.length > 0) {
|
|
1085
1078
|
console.log(`[beamo-node] Publishing ${storageReferences.length} storage reference(s) in manifest:`);
|
|
@@ -1099,6 +1092,16 @@ async function updateManifest({
|
|
|
1099
1092
|
console.warn(`[beamo-node] Make sure you have @StorageObject('StorageName') decorators in your code.`);
|
|
1100
1093
|
}
|
|
1101
1094
|
|
|
1095
|
+
// Build request body matching C# CLI format exactly
|
|
1096
|
+
// C# sends: { comments, manifest, storageReferences } where storageReferences comes from manifest.storageReference
|
|
1097
|
+
// C# assigns it directly, so if null/empty it serializes as null (not omitted)
|
|
1098
|
+
const requestBody = {
|
|
1099
|
+
autoDeploy: true,
|
|
1100
|
+
comments: comments ?? '',
|
|
1101
|
+
manifest: mappedServices,
|
|
1102
|
+
storageReferences: storageReferences.length > 0 ? storageReferences : null,
|
|
1103
|
+
};
|
|
1104
|
+
|
|
1102
1105
|
const publishUrl = new URL('/basic/beamo/manifest', apiHost);
|
|
1103
1106
|
const publishHeaders = {
|
|
1104
1107
|
Authorization: `Bearer ${token}`,
|
|
@@ -1107,23 +1110,17 @@ async function updateManifest({
|
|
|
1107
1110
|
'X-BEAM-SCOPE': `${cid}.${pid}`,
|
|
1108
1111
|
};
|
|
1109
1112
|
|
|
1110
|
-
//
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
// console.error(`[beamo-node] - Backend will check: {registryURI}/{imageNameMD5}/manifests/{imageId}`);
|
|
1122
|
-
// console.error(`[beamo-node] - Backend will use headers: X-KS-PROJECTID: rc.projectId (from X-BEAM-SCOPE)`);
|
|
1123
|
-
// console.error(`[beamo-node] - NOTE: rc.gameId might differ from realm PID if backend resolves it differently`);
|
|
1124
|
-
// console.error(`[beamo-node] Request Body:`, JSON.stringify(requestBody, null, 2));
|
|
1125
|
-
// console.error(`[beamo-node] Service Entry in Manifest:`, JSON.stringify(mappedServices.find(s => s.serviceName === serviceId), null, 2));
|
|
1126
|
-
// }
|
|
1113
|
+
// Always log the full manifest being sent for debugging
|
|
1114
|
+
console.log(`\n=== MANIFEST BEING SENT TO BACKEND ===`);
|
|
1115
|
+
console.log(`URL: ${publishUrl}`);
|
|
1116
|
+
console.log(`Method: POST`);
|
|
1117
|
+
console.log(`Headers:`, JSON.stringify(publishHeaders, null, 2));
|
|
1118
|
+
console.log(`\nFull Request Body:`);
|
|
1119
|
+
console.log(JSON.stringify(requestBody, null, 2));
|
|
1120
|
+
console.log(`\nService Entry in Manifest:`);
|
|
1121
|
+
const serviceEntry = mappedServices.find(s => s.serviceName === serviceId);
|
|
1122
|
+
console.log(JSON.stringify(serviceEntry, null, 2));
|
|
1123
|
+
console.log(`=== END MANIFEST ===\n`);
|
|
1127
1124
|
|
|
1128
1125
|
const response = await fetch(publishUrl, {
|
|
1129
1126
|
method: 'POST',
|