@omen.foundation/node-microservice-runtime 0.1.96 → 0.1.98
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 +16 -2
package/package.json
CHANGED
|
@@ -511,13 +511,27 @@ async function resolveGamePid(apiHost, token, cid, pid, explicitGamePid) {
|
|
|
511
511
|
return pid;
|
|
512
512
|
}
|
|
513
513
|
|
|
514
|
+
// Match C# CLI FindRoot() logic: walk up parent chain until Parent == null (root)
|
|
514
515
|
const byPid = new Map(projects.map((project) => [project.pid, project]));
|
|
515
516
|
let current = byPid.get(pid);
|
|
517
|
+
if (!current) {
|
|
518
|
+
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
519
|
+
console.error(`[beamo-node] Realm PID not found in projects, using realm PID: ${pid}`);
|
|
520
|
+
}
|
|
521
|
+
return pid;
|
|
522
|
+
}
|
|
523
|
+
|
|
516
524
|
const visited = new Set();
|
|
517
|
-
|
|
525
|
+
// Walk up parent chain until we find root (parent == null or isRoot == true)
|
|
526
|
+
while (current && (current.parent != null && current.parent !== '' && !current.isRoot) && !visited.has(current.parent)) {
|
|
518
527
|
visited.add(current.pid);
|
|
519
528
|
current = byPid.get(current.parent);
|
|
529
|
+
if (!current) {
|
|
530
|
+
// Parent not found in projects list, current is as far as we can go
|
|
531
|
+
break;
|
|
532
|
+
}
|
|
520
533
|
}
|
|
534
|
+
// current is now the root (or the original if no parent chain)
|
|
521
535
|
const resolved = current?.pid ?? pid;
|
|
522
536
|
|
|
523
537
|
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
@@ -1000,7 +1014,7 @@ async function updateManifest({
|
|
|
1000
1014
|
storageReferences,
|
|
1001
1015
|
};
|
|
1002
1016
|
|
|
1003
|
-
const publishUrl = new URL('/
|
|
1017
|
+
const publishUrl = new URL('/basic/beamo/manifest', apiHost);
|
|
1004
1018
|
const publishHeaders = {
|
|
1005
1019
|
Authorization: `Bearer ${token}`,
|
|
1006
1020
|
Accept: 'application/json',
|