@omen.foundation/node-microservice-runtime 0.1.81 → 0.1.82

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omen.foundation/node-microservice-runtime",
3
- "version": "0.1.81",
3
+ "version": "0.1.82",
4
4
  "description": "Beamable microservice runtime for Node.js/TypeScript services.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1091,8 +1091,10 @@ async function main() {
1091
1091
  }
1092
1092
  }
1093
1093
 
1094
- const registryUrl = await getRegistryUrl(apiHost, token, cid, resolvedGamePid);
1095
- const uniqueName = md5Hex(`${cid}_${resolvedGamePid}_${serviceId}`).substring(0, 30);
1094
+ // Try using realm PID for registry URL (backend might check using realm PID scope)
1095
+ // If resolvedGamePid differs from pid, the backend might be checking with the wrong scope
1096
+ const registryUrl = await getRegistryUrl(apiHost, token, cid, pid);
1097
+ const uniqueName = md5Hex(`${cid}_${pid}_${serviceId}`).substring(0, 30);
1096
1098
  if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
1097
1099
  console.error(`[beamo-node] Registry URL: ${registryUrl}`);
1098
1100
  console.error(`[beamo-node] Unique name: ${uniqueName}`);
@@ -1117,36 +1119,9 @@ async function main() {
1117
1119
  });
1118
1120
  progress.complete('Image uploaded');
1119
1121
 
1120
- // Verify image exists in registry before proceeding
1121
- // Note: Backend might check using gamePid, so we verify using the same PID used for upload
1122
- const shortImageIdForVerify = shortDigest(fullImageId);
1123
- const baseUrl = `${registryUrl}${uniqueName}/`;
1124
- const verifyHeaders = {
1125
- 'x-ks-clientid': cid,
1126
- 'x-ks-projectid': pid, // Use realm PID (matches upload headers)
1127
- 'x-ks-token': token,
1128
- };
1129
-
1130
- // Wait a moment for registry to propagate, then verify
1131
- if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
1132
- console.error(`[beamo-node] Verifying image exists: ${baseUrl}manifests/${shortImageIdForVerify}`);
1133
- console.error(`[beamo-node] Using headers:`, { cid, pid, gamePid: resolvedGamePid });
1134
- }
1135
- await new Promise(resolve => setTimeout(resolve, 2000)); // Increased delay
1136
- const imageExists = await verifyManifestExists(baseUrl, shortImageIdForVerify, verifyHeaders);
1137
- if (!imageExists) {
1138
- throw new Error(`Image verification failed: manifest with tag ${shortImageIdForVerify} not found in registry at ${baseUrl}manifests/${shortImageIdForVerify}. The image may not have uploaded successfully. Check that the registry path and tag match what the backend expects.`);
1139
- }
1140
- if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
1141
- console.error(`[beamo-node] Image verification passed: ${baseUrl}manifests/${shortImageIdForVerify}`);
1142
- }
1143
-
1144
1122
  // Step 7: Discover storage, components, and dependencies
1145
1123
  progress.start('Discovering storage objects and components');
1146
1124
  const shortImageId = shortDigest(fullImageId);
1147
- // The backend looks up images using the short imageId tag (matches registry tag)
1148
- // Add a small delay to ensure registry has propagated the image before backend checks
1149
- await new Promise(resolve => setTimeout(resolve, 2000)); // 2 second delay
1150
1125
  const existingManifest = await fetchCurrentManifest(apiHost, token, cid, pid);
1151
1126
  const discoveredStorage = await discoverStorageObjects('src');
1152
1127
  const discoveredComponents = await discoverFederationComponents('src');
@@ -1166,7 +1141,7 @@ async function main() {
1166
1141
  cid,
1167
1142
  pid,
1168
1143
  serviceId,
1169
- shortImageId, // Use short hash - backend looks up by tag which matches registry tag
1144
+ shortImageId,
1170
1145
  comments: args.comments,
1171
1146
  existingManifest,
1172
1147
  discoveredStorage,