@omen.foundation/node-microservice-runtime 0.1.99 → 0.1.100
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 +277 -277
package/package.json
CHANGED
|
@@ -303,12 +303,12 @@ async function prepareUploadLocation(baseUrl, headers) {
|
|
|
303
303
|
'Content-Length': '0',
|
|
304
304
|
};
|
|
305
305
|
|
|
306
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
}
|
|
306
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
307
|
+
// console.error(`[beamo-node] [SUBSTEP: Prepare Upload Location]`);
|
|
308
|
+
// console.error(`[beamo-node] URL: ${url}`);
|
|
309
|
+
// console.error(`[beamo-node] Method: POST`);
|
|
310
|
+
// console.error(`[beamo-node] Headers:`, JSON.stringify(requestHeaders, null, 2));
|
|
311
|
+
// }
|
|
312
312
|
|
|
313
313
|
let response;
|
|
314
314
|
try {
|
|
@@ -326,48 +326,48 @@ async function prepareUploadLocation(baseUrl, headers) {
|
|
|
326
326
|
...(error instanceof Error && error.stack ? { stack: error.stack } : {}),
|
|
327
327
|
...(error instanceof Error && error.cause ? { cause: error.cause } : {}),
|
|
328
328
|
};
|
|
329
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
330
|
-
|
|
331
|
-
}
|
|
329
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
330
|
+
// console.error('[beamo-node] Network error:', errorDetails);
|
|
331
|
+
// }
|
|
332
332
|
throw new Error(`Network error preparing upload location: ${errorMsg}. URL: ${url.toString()}`);
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
}
|
|
335
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
336
|
+
// console.error(`[beamo-node] Response Status: ${response.status}`);
|
|
337
|
+
// console.error(`[beamo-node] Response Headers:`, JSON.stringify(Object.fromEntries(response.headers.entries()), null, 2));
|
|
338
|
+
// }
|
|
339
339
|
|
|
340
340
|
if (!response.ok) {
|
|
341
341
|
const text = await response.text();
|
|
342
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
342
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
343
|
+
// console.error('[beamo-node] Upload location failed', {
|
|
344
|
+
// status: response.status,
|
|
345
|
+
// statusText: response.statusText,
|
|
346
|
+
// headers: Object.fromEntries(response.headers.entries()),
|
|
347
|
+
// body: text.substring(0, 500),
|
|
348
|
+
// });
|
|
349
|
+
// }
|
|
350
350
|
throw new Error(`Failed to prepare upload location: ${response.status} ${text}`);
|
|
351
351
|
}
|
|
352
352
|
const location = response.headers.get('location');
|
|
353
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
354
|
-
|
|
355
|
-
}
|
|
353
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
354
|
+
// console.error(`[beamo-node] Upload Location: ${location}`);
|
|
355
|
+
// }
|
|
356
356
|
return location;
|
|
357
357
|
}
|
|
358
358
|
|
|
359
359
|
async function uploadBlob(baseUrl, digest, buffer, headers) {
|
|
360
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
}
|
|
360
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
361
|
+
// console.error(`[beamo-node] [SUBSTEP: Upload Blob]`);
|
|
362
|
+
// console.error(`[beamo-node] Digest: ${digest}`);
|
|
363
|
+
// console.error(`[beamo-node] Size: ${buffer.length} bytes`);
|
|
364
|
+
// }
|
|
365
365
|
|
|
366
366
|
const exists = await checkBlobExists(baseUrl, digest, headers);
|
|
367
367
|
if (exists) {
|
|
368
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
369
|
-
|
|
370
|
-
}
|
|
368
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
369
|
+
// console.error(`[beamo-node] Blob already exists, skipping upload`);
|
|
370
|
+
// }
|
|
371
371
|
return { digest, size: buffer.length };
|
|
372
372
|
}
|
|
373
373
|
|
|
@@ -384,12 +384,12 @@ async function uploadBlob(baseUrl, digest, buffer, headers) {
|
|
|
384
384
|
locationUrl.searchParams.set('digest', digest);
|
|
385
385
|
const uploadUrl = locationUrl;
|
|
386
386
|
|
|
387
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
}
|
|
387
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
388
|
+
// console.error(`[beamo-node] Upload URL: ${uploadUrl}`);
|
|
389
|
+
// console.error(`[beamo-node] Method: PUT`);
|
|
390
|
+
// const uploadHeaders = { ...headers, 'Content-Type': 'application/octet-stream' };
|
|
391
|
+
// console.error(`[beamo-node] Upload Headers:`, JSON.stringify(uploadHeaders, null, 2));
|
|
392
|
+
// }
|
|
393
393
|
|
|
394
394
|
const response = await fetch(uploadUrl, {
|
|
395
395
|
method: 'PUT',
|
|
@@ -397,22 +397,22 @@ async function uploadBlob(baseUrl, digest, buffer, headers) {
|
|
|
397
397
|
body: buffer,
|
|
398
398
|
});
|
|
399
399
|
|
|
400
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
}
|
|
404
|
-
|
|
400
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
401
|
+
// console.error(`[beamo-node] Response Status: ${response.status}`);
|
|
402
|
+
// console.error(`[beamo-node] Response Headers:`, JSON.stringify(Object.fromEntries(response.headers.entries()), null, 2));
|
|
403
|
+
// }
|
|
404
|
+
|
|
405
405
|
if (!response.ok) {
|
|
406
406
|
const text = await response.text();
|
|
407
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
408
|
-
|
|
409
|
-
}
|
|
407
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
408
|
+
// console.error(`[beamo-node] Response Body: ${text.substring(0, 500)}`);
|
|
409
|
+
// }
|
|
410
410
|
throw new Error(`Failed to upload blob ${digest}: ${response.status} ${text}`);
|
|
411
411
|
}
|
|
412
412
|
|
|
413
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
414
|
-
|
|
415
|
-
}
|
|
413
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
414
|
+
// console.error(`[beamo-node] Blob upload successful`);
|
|
415
|
+
// }
|
|
416
416
|
|
|
417
417
|
return { digest, size: buffer.length };
|
|
418
418
|
}
|
|
@@ -424,14 +424,14 @@ async function uploadManifest(baseUrl, manifestJson, shortImageId, headers) {
|
|
|
424
424
|
const url = new URL(`manifests/${shortImageId}`, baseUrl);
|
|
425
425
|
const requestHeaders = { ...headers, 'Content-Type': MANIFEST_MEDIA_TYPE };
|
|
426
426
|
|
|
427
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
}
|
|
427
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
428
|
+
// console.error(`[beamo-node] [SUBSTEP: Upload Manifest to Registry]`);
|
|
429
|
+
// console.error(`[beamo-node] URL: ${url}`);
|
|
430
|
+
// console.error(`[beamo-node] Method: PUT`);
|
|
431
|
+
// console.error(`[beamo-node] Tag: ${shortImageId}`);
|
|
432
|
+
// console.error(`[beamo-node] Headers:`, JSON.stringify(requestHeaders, null, 2));
|
|
433
|
+
// console.error(`[beamo-node] Manifest JSON:`, manifestJsonString);
|
|
434
|
+
// }
|
|
435
435
|
|
|
436
436
|
const response = await fetch(url, {
|
|
437
437
|
method: 'PUT',
|
|
@@ -439,22 +439,22 @@ async function uploadManifest(baseUrl, manifestJson, shortImageId, headers) {
|
|
|
439
439
|
body: manifestJsonString,
|
|
440
440
|
});
|
|
441
441
|
|
|
442
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
}
|
|
442
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
443
|
+
// console.error(`[beamo-node] Response Status: ${response.status}`);
|
|
444
|
+
// console.error(`[beamo-node] Response Headers:`, JSON.stringify(Object.fromEntries(response.headers.entries()), null, 2));
|
|
445
|
+
// }
|
|
446
446
|
|
|
447
447
|
if (!response.ok) {
|
|
448
448
|
const text = await response.text();
|
|
449
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
450
|
-
|
|
451
|
-
}
|
|
449
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
450
|
+
// console.error(`[beamo-node] Response Body: ${text.substring(0, 500)}`);
|
|
451
|
+
// }
|
|
452
452
|
throw new Error(`Failed to upload manifest: ${response.status} ${text}`);
|
|
453
453
|
}
|
|
454
454
|
|
|
455
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
456
|
-
|
|
457
|
-
}
|
|
455
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
456
|
+
// console.error(`[beamo-node] Manifest upload successful`);
|
|
457
|
+
// }
|
|
458
458
|
}
|
|
459
459
|
|
|
460
460
|
async function fetchJson(url, options = {}) {
|
|
@@ -469,12 +469,12 @@ async function fetchJson(url, options = {}) {
|
|
|
469
469
|
}
|
|
470
470
|
|
|
471
471
|
async function resolveGamePid(apiHost, token, cid, pid, explicitGamePid) {
|
|
472
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
}
|
|
472
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
473
|
+
// console.error(`[beamo-node] [STEP: Resolve Game PID]`);
|
|
474
|
+
// console.error(`[beamo-node] Explicit Game PID: ${explicitGamePid || '(none)'}`);
|
|
475
|
+
// console.error(`[beamo-node] Realm PID: ${pid}`);
|
|
476
|
+
// console.error(`[beamo-node] NOTE: Always resolving root project (Game ID) from API, ignoring explicit value`);
|
|
477
|
+
// }
|
|
478
478
|
|
|
479
479
|
// Always resolve the root project from the API (matching C# CLI's FindRoot().Pid)
|
|
480
480
|
// The explicit game PID might be incorrect (could be realm PID instead of root)
|
|
@@ -488,22 +488,22 @@ async function resolveGamePid(apiHost, token, cid, pid, explicitGamePid) {
|
|
|
488
488
|
...(scope ? { 'X-BEAM-SCOPE': scope } : {}),
|
|
489
489
|
};
|
|
490
490
|
|
|
491
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
}
|
|
491
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
492
|
+
// console.error(`[beamo-node] Fetching game PID from: ${url}`);
|
|
493
|
+
// console.error(`[beamo-node] Headers:`, JSON.stringify(requestHeaders, null, 2));
|
|
494
|
+
// }
|
|
495
495
|
|
|
496
496
|
const body = await fetchJson(url, { headers: requestHeaders });
|
|
497
497
|
|
|
498
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
499
|
-
|
|
500
|
-
}
|
|
498
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
499
|
+
// console.error(`[beamo-node] Response:`, JSON.stringify(body, null, 2));
|
|
500
|
+
// }
|
|
501
501
|
|
|
502
502
|
const projects = Array.isArray(body?.projects) ? body.projects : [];
|
|
503
503
|
if (projects.length === 0) {
|
|
504
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
505
|
-
|
|
506
|
-
}
|
|
504
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
505
|
+
// console.error(`[beamo-node] No projects found, using realm PID: ${pid}`);
|
|
506
|
+
// }
|
|
507
507
|
return pid;
|
|
508
508
|
}
|
|
509
509
|
|
|
@@ -511,9 +511,9 @@ async function resolveGamePid(apiHost, token, cid, pid, explicitGamePid) {
|
|
|
511
511
|
const byPid = new Map(projects.map((project) => [project.pid, project]));
|
|
512
512
|
let current = byPid.get(pid);
|
|
513
513
|
if (!current) {
|
|
514
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
515
|
-
|
|
516
|
-
}
|
|
514
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
515
|
+
// console.error(`[beamo-node] Realm PID not found in projects, using realm PID: ${pid}`);
|
|
516
|
+
// }
|
|
517
517
|
return pid;
|
|
518
518
|
}
|
|
519
519
|
|
|
@@ -530,13 +530,13 @@ async function resolveGamePid(apiHost, token, cid, pid, explicitGamePid) {
|
|
|
530
530
|
// current is now the root (or the original if no parent chain)
|
|
531
531
|
const resolved = current?.pid ?? pid;
|
|
532
532
|
|
|
533
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
}
|
|
533
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
534
|
+
// console.error(`[beamo-node] Resolved Game PID (root): ${resolved}`);
|
|
535
|
+
// if (explicitGamePid && explicitGamePid !== resolved) {
|
|
536
|
+
// console.error(`[beamo-node] ⚠️ WARNING: Explicit Game PID (${explicitGamePid}) does not match resolved root (${resolved})`);
|
|
537
|
+
// console.error(`[beamo-node] Using resolved root (${resolved}) for imageNameMD5 calculation`);
|
|
538
|
+
// }
|
|
539
|
+
// }
|
|
540
540
|
return resolved;
|
|
541
541
|
} catch (error) {
|
|
542
542
|
// Debug logging only
|
|
@@ -588,18 +588,18 @@ async function getRegistryUrl(apiHost, token, cid, pid) {
|
|
|
588
588
|
...(scope ? { 'X-BEAM-SCOPE': scope } : {}),
|
|
589
589
|
};
|
|
590
590
|
|
|
591
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
}
|
|
591
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
592
|
+
// console.error(`[beamo-node] [STEP: Get Registry URL]`);
|
|
593
|
+
// console.error(`[beamo-node] URL: ${url}`);
|
|
594
|
+
// console.error(`[beamo-node] Headers:`, JSON.stringify(headers, null, 2));
|
|
595
|
+
// console.error(`[beamo-node] Scope: ${scope}`);
|
|
596
|
+
// }
|
|
597
597
|
|
|
598
598
|
const body = await fetchJson(url, { headers });
|
|
599
599
|
|
|
600
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
601
|
-
|
|
602
|
-
}
|
|
600
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
601
|
+
// console.error(`[beamo-node] Response:`, JSON.stringify(body, null, 2));
|
|
602
|
+
// }
|
|
603
603
|
|
|
604
604
|
const uri = body.uri || body.registry || body.url;
|
|
605
605
|
if (!uri) {
|
|
@@ -611,9 +611,9 @@ async function getRegistryUrl(apiHost, token, cid, pid) {
|
|
|
611
611
|
// parsedUri.Host in C# is just the hostname (no port), so we use hostname here
|
|
612
612
|
const registryUrl = `${parsed.protocol}//${parsed.hostname}/v2/`;
|
|
613
613
|
|
|
614
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
615
|
-
|
|
616
|
-
}
|
|
614
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
615
|
+
// console.error(`[beamo-node] Normalized Registry URL: ${registryUrl}`);
|
|
616
|
+
// }
|
|
617
617
|
|
|
618
618
|
return registryUrl;
|
|
619
619
|
}
|
|
@@ -640,18 +640,18 @@ async function uploadDockerImage({
|
|
|
640
640
|
'x-ks-token': token, // Access token from login
|
|
641
641
|
};
|
|
642
642
|
|
|
643
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
}
|
|
643
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
644
|
+
// console.error(`[beamo-node] [STEP: Upload Docker Image]`);
|
|
645
|
+
// console.error(`[beamo-node] Base URL: ${baseUrl}`);
|
|
646
|
+
// console.error(`[beamo-node] Registry URL: ${registryUrl}`);
|
|
647
|
+
// console.error(`[beamo-node] Unique Name: ${uniqueName}`);
|
|
648
|
+
// console.error(`[beamo-node] Service ID: ${serviceId}`);
|
|
649
|
+
// console.error(`[beamo-node] CID: ${cid}`);
|
|
650
|
+
// console.error(`[beamo-node] Realm PID: ${pid}`);
|
|
651
|
+
// console.error(`[beamo-node] Game PID: ${gamePid}`);
|
|
652
|
+
// console.error(`[beamo-node] Full Image ID: ${fullImageId}`);
|
|
653
|
+
// console.error(`[beamo-node] Upload Headers:`, JSON.stringify(headers, null, 2));
|
|
654
|
+
// }
|
|
655
655
|
|
|
656
656
|
const { manifestEntry, configBuffer, layers } = await readDockerImageTar(imageTarPath);
|
|
657
657
|
|
|
@@ -660,37 +660,37 @@ async function uploadDockerImage({
|
|
|
660
660
|
process.stdout.write(`\r${colors.blue}↑${colors.reset} Uploading config...`);
|
|
661
661
|
}
|
|
662
662
|
const configDigestValue = sha256Digest(configBuffer);
|
|
663
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
}
|
|
663
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
664
|
+
// console.error(`[beamo-node] [SUBSTEP: Upload Config]`);
|
|
665
|
+
// console.error(`[beamo-node] Config Digest: ${configDigestValue}`);
|
|
666
|
+
// console.error(`[beamo-node] Config Size: ${configBuffer.length} bytes`);
|
|
667
|
+
// }
|
|
668
668
|
const configDigest = await uploadBlob(baseUrl, configDigestValue, configBuffer, headers);
|
|
669
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
670
|
-
|
|
671
|
-
}
|
|
669
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
670
|
+
// console.error(`[beamo-node] Config Upload Result:`, JSON.stringify(configDigest, null, 2));
|
|
671
|
+
// }
|
|
672
672
|
|
|
673
673
|
// Upload layers with progress
|
|
674
674
|
const layerDescriptors = [];
|
|
675
675
|
const totalLayers = layers.length;
|
|
676
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
}
|
|
676
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
677
|
+
// console.error(`[beamo-node] [SUBSTEP: Upload Layers]`);
|
|
678
|
+
// console.error(`[beamo-node] Total Layers: ${totalLayers}`);
|
|
679
|
+
// }
|
|
680
680
|
for (let i = 0; i < layers.length; i++) {
|
|
681
681
|
if (progress) {
|
|
682
682
|
process.stdout.write(`\r${colors.blue}↑${colors.reset} Uploading layers (${i + 1}/${totalLayers})...`);
|
|
683
683
|
}
|
|
684
684
|
const layerDigestValue = sha256Digest(layers[i].buffer);
|
|
685
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
}
|
|
685
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
686
|
+
// console.error(`[beamo-node] Layer ${i + 1}/${totalLayers}:`);
|
|
687
|
+
// console.error(`[beamo-node] Digest: ${layerDigestValue}`);
|
|
688
|
+
// console.error(`[beamo-node] Size: ${layers[i].buffer.length} bytes`);
|
|
689
|
+
// }
|
|
690
690
|
const descriptor = await uploadBlob(baseUrl, layerDigestValue, layers[i].buffer, headers);
|
|
691
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
692
|
-
|
|
693
|
-
}
|
|
691
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
692
|
+
// console.error(`[beamo-node] Upload Result:`, JSON.stringify(descriptor, null, 2));
|
|
693
|
+
// }
|
|
694
694
|
layerDescriptors.push({
|
|
695
695
|
digest: descriptor.digest,
|
|
696
696
|
size: descriptor.size,
|
|
@@ -714,15 +714,15 @@ async function uploadDockerImage({
|
|
|
714
714
|
process.stdout.write(`\r${colors.blue}↑${colors.reset} Uploading manifest...`);
|
|
715
715
|
}
|
|
716
716
|
const shortImageId = shortDigest(fullImageId);
|
|
717
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
}
|
|
717
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
718
|
+
// console.error(`[beamo-node] [SUBSTEP: Upload Manifest]`);
|
|
719
|
+
// console.error(`[beamo-node] Short Image ID: ${shortImageId}`);
|
|
720
|
+
// console.error(`[beamo-node] Manifest JSON:`, JSON.stringify(uploadManifestJson, null, 2));
|
|
721
|
+
// }
|
|
722
722
|
await uploadManifest(baseUrl, uploadManifestJson, shortImageId, headers);
|
|
723
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
724
|
-
|
|
725
|
-
}
|
|
723
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
724
|
+
// console.error(`[beamo-node] Manifest Upload Complete`);
|
|
725
|
+
// }
|
|
726
726
|
if (progress) {
|
|
727
727
|
process.stdout.write('\r');
|
|
728
728
|
}
|
|
@@ -1022,23 +1022,23 @@ async function updateManifest({
|
|
|
1022
1022
|
'X-BEAM-SCOPE': `${cid}.${pid}`,
|
|
1023
1023
|
};
|
|
1024
1024
|
|
|
1025
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
}
|
|
1025
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1026
|
+
// console.error(`[beamo-node] [STEP: Publish Manifest to Backend]`);
|
|
1027
|
+
// console.error(`[beamo-node] URL: ${publishUrl}`);
|
|
1028
|
+
// console.error(`[beamo-node] Method: POST`);
|
|
1029
|
+
// console.error(`[beamo-node] Headers:`, JSON.stringify(publishHeaders, null, 2));
|
|
1030
|
+
// console.error(`[beamo-node] Service: ${serviceId}`);
|
|
1031
|
+
// console.error(`[beamo-node] CID: ${cid}`);
|
|
1032
|
+
// console.error(`[beamo-node] Realm PID (from X-BEAM-SCOPE): ${pid}`);
|
|
1033
|
+
// console.error(`[beamo-node] Short Image ID: ${shortImageId}`);
|
|
1034
|
+
// console.error(`[beamo-node] Expected Backend Check:`);
|
|
1035
|
+
// console.error(`[beamo-node] - Backend will calculate imageNameMD5 using: rc.cid, rc.gameId, serviceName`);
|
|
1036
|
+
// console.error(`[beamo-node] - Backend will check: {registryURI}/{imageNameMD5}/manifests/{imageId}`);
|
|
1037
|
+
// console.error(`[beamo-node] - Backend will use headers: X-KS-PROJECTID: rc.projectId (from X-BEAM-SCOPE)`);
|
|
1038
|
+
// console.error(`[beamo-node] - NOTE: rc.gameId might differ from realm PID if backend resolves it differently`);
|
|
1039
|
+
// console.error(`[beamo-node] Request Body:`, JSON.stringify(requestBody, null, 2));
|
|
1040
|
+
// console.error(`[beamo-node] Service Entry in Manifest:`, JSON.stringify(mappedServices.find(s => s.serviceName === serviceId), null, 2));
|
|
1041
|
+
// }
|
|
1042
1042
|
|
|
1043
1043
|
const response = await fetch(publishUrl, {
|
|
1044
1044
|
method: 'POST',
|
|
@@ -1046,25 +1046,25 @@ async function updateManifest({
|
|
|
1046
1046
|
body: JSON.stringify(requestBody),
|
|
1047
1047
|
});
|
|
1048
1048
|
|
|
1049
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1049
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1050
|
+
// console.error(`[beamo-node] Response Status: ${response.status}`);
|
|
1051
|
+
// console.error(`[beamo-node] Response Headers:`, JSON.stringify(Object.fromEntries(response.headers.entries()), null, 2));
|
|
1052
|
+
// }
|
|
1053
|
+
|
|
1054
1054
|
if (!response.ok) {
|
|
1055
1055
|
const text = await response.text();
|
|
1056
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
}
|
|
1056
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1057
|
+
// console.error(`[beamo-node] Response Body: ${text}`);
|
|
1058
|
+
// console.error(`[beamo-node] Full Request Body (for debugging):`, JSON.stringify(requestBody, null, 2));
|
|
1059
|
+
// }
|
|
1060
1060
|
throw new Error(`Failed to publish manifest: ${response.status} ${text}`);
|
|
1061
1061
|
}
|
|
1062
1062
|
|
|
1063
1063
|
const responseBody = await response.json();
|
|
1064
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
}
|
|
1064
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1065
|
+
// console.error(`[beamo-node] Response Body:`, JSON.stringify(responseBody, null, 2));
|
|
1066
|
+
// console.error(`[beamo-node] ✓ Manifest published successfully`);
|
|
1067
|
+
// }
|
|
1068
1068
|
}
|
|
1069
1069
|
|
|
1070
1070
|
async function prepareDockerContext({ entry, distDir, openapiPath, packageJson, packageLock, nodeVersion }) {
|
|
@@ -1267,16 +1267,16 @@ async function main() {
|
|
|
1267
1267
|
const inspect = await runCommand('docker', ['image', 'inspect', '--format', '{{.Id}}', dockerTag], { capture: true });
|
|
1268
1268
|
const fullImageId = inspect.stdout.trim();
|
|
1269
1269
|
const imageTarPath = path.join(tempRoot, `${serviceId.replace(/[^a-z0-9-_]/gi, '_')}.tar`);
|
|
1270
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
}
|
|
1270
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1271
|
+
// // Calculate short digest manually (shortDigest function defined later)
|
|
1272
|
+
// const longImageId = fullImageId.includes(':') ? fullImageId.split(':')[1] : fullImageId;
|
|
1273
|
+
// const shortImageIdPreview = longImageId.substring(0, 12);
|
|
1274
|
+
// console.error(`[beamo-node] [STEP: Extract Image ID]`);
|
|
1275
|
+
// console.error(`[beamo-node] Docker Tag: ${dockerTag}`);
|
|
1276
|
+
// console.error(`[beamo-node] Full Image ID: ${fullImageId}`);
|
|
1277
|
+
// console.error(`[beamo-node] Short Image ID (preview): ${shortImageIdPreview}`);
|
|
1278
|
+
// console.error(`[beamo-node] Image Tar Path: ${imageTarPath}`);
|
|
1279
|
+
// }
|
|
1280
1280
|
await runCommand('docker', ['image', 'save', dockerTag, '-o', imageTarPath], { silent: true });
|
|
1281
1281
|
progress.complete('Image prepared');
|
|
1282
1282
|
|
|
@@ -1305,21 +1305,21 @@ async function main() {
|
|
|
1305
1305
|
|
|
1306
1306
|
// Match C# CLI: GetDockerImageRegistryUri() uses realm PID from context (X-BEAM-SCOPE)
|
|
1307
1307
|
// uniqueName uses gamePid (matches backend's rc.gameId), but registry URL uses realm PID
|
|
1308
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
}
|
|
1308
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1309
|
+
// console.error(`[beamo-node] [STEP: Calculate Registry Path]`);
|
|
1310
|
+
// console.error(`[beamo-node] CID: ${cid}`);
|
|
1311
|
+
// console.error(`[beamo-node] Realm PID: ${pid}`);
|
|
1312
|
+
// console.error(`[beamo-node] Resolved Game PID: ${resolvedGamePid}`);
|
|
1313
|
+
// console.error(`[beamo-node] Service ID: ${serviceId}`);
|
|
1314
|
+
// }
|
|
1315
1315
|
const registryUrl = await getRegistryUrl(apiHost, token, cid, pid);
|
|
1316
1316
|
const uniqueNameInput = `${cid}_${resolvedGamePid}_${serviceId}`;
|
|
1317
1317
|
const uniqueName = md5Hex(uniqueNameInput).substring(0, 30);
|
|
1318
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
}
|
|
1318
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1319
|
+
// console.error(`[beamo-node] Unique Name Input: ${uniqueNameInput}`);
|
|
1320
|
+
// console.error(`[beamo-node] Unique Name (MD5 first 30 chars): ${uniqueName}`);
|
|
1321
|
+
// console.error(`[beamo-node] Registry URL: ${registryUrl}`);
|
|
1322
|
+
// }
|
|
1323
1323
|
progress.complete('Authenticated');
|
|
1324
1324
|
|
|
1325
1325
|
// Step 6: Upload Docker image
|
|
@@ -1348,19 +1348,19 @@ async function main() {
|
|
|
1348
1348
|
'x-ks-token': token,
|
|
1349
1349
|
};
|
|
1350
1350
|
|
|
1351
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
}
|
|
1351
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1352
|
+
// console.error(`[beamo-node] [STEP: Post-Upload Verification]`);
|
|
1353
|
+
// console.error(`[beamo-node] Full Image ID: ${fullImageId}`);
|
|
1354
|
+
// console.error(`[beamo-node] Short Image ID: ${shortImageId}`);
|
|
1355
|
+
// console.error(`[beamo-node] Base URL: ${baseUrl}`);
|
|
1356
|
+
// console.error(`[beamo-node] Verification URL: ${baseUrl}manifests/${shortImageId}`);
|
|
1357
|
+
// console.error(`[beamo-node] Verify Headers:`, JSON.stringify(verifyHeaders, null, 2));
|
|
1358
|
+
// }
|
|
1359
1359
|
|
|
1360
1360
|
// Wait a moment for registry to propagate
|
|
1361
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1362
|
-
|
|
1363
|
-
}
|
|
1361
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1362
|
+
// console.error(`[beamo-node] Waiting 3 seconds for registry propagation...`);
|
|
1363
|
+
// }
|
|
1364
1364
|
await new Promise(resolve => setTimeout(resolve, 3000));
|
|
1365
1365
|
|
|
1366
1366
|
const imageExists = await verifyManifestExists(baseUrl, shortImageId, verifyHeaders);
|
|
@@ -1368,72 +1368,72 @@ async function main() {
|
|
|
1368
1368
|
throw new Error(`Image verification failed: manifest with tag ${shortImageId} not found in registry at ${baseUrl}manifests/${shortImageId}. The image may not have uploaded successfully.`);
|
|
1369
1369
|
}
|
|
1370
1370
|
|
|
1371
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1372
|
-
|
|
1373
|
-
}
|
|
1371
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1372
|
+
// console.error(`[beamo-node] ✓ Image verification passed`);
|
|
1373
|
+
// }
|
|
1374
1374
|
|
|
1375
1375
|
// CRITICAL: Perform exact backend check simulation
|
|
1376
1376
|
// The backend uses HEAD request with specific headers - let's verify it works
|
|
1377
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
}
|
|
1377
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1378
|
+
// console.error(`[beamo-node] [STEP: Backend Check Simulation]`);
|
|
1379
|
+
// console.error(`[beamo-node] Simulating exact backend check...`);
|
|
1380
|
+
// const backendCheckUrl = `${registryUrl}${uniqueName}/manifests/${shortImageId}`;
|
|
1381
|
+
// console.error(`[beamo-node] Backend will check: ${backendCheckUrl}`);
|
|
1382
|
+
// console.error(`[beamo-node] Backend will use headers:`, JSON.stringify(verifyHeaders, null, 2));
|
|
1383
|
+
// try {
|
|
1384
|
+
// const backendCheckResponse = await fetch(backendCheckUrl, {
|
|
1385
|
+
// method: 'HEAD',
|
|
1386
|
+
// headers: verifyHeaders,
|
|
1387
|
+
// });
|
|
1388
|
+
// console.error(`[beamo-node] Backend simulation response status: ${backendCheckResponse.status}`);
|
|
1389
|
+
// if (backendCheckResponse.status !== 200) {
|
|
1390
|
+
// console.error(`[beamo-node] ⚠️ Backend simulation FAILED - status ${backendCheckResponse.status}`);
|
|
1391
|
+
// const responseText = await backendCheckResponse.text().catch(() => '');
|
|
1392
|
+
// console.error(`[beamo-node] Response: ${responseText}`);
|
|
1393
|
+
// } else {
|
|
1394
|
+
// console.error(`[beamo-node] ✓ Backend simulation passed`);
|
|
1395
|
+
// }
|
|
1396
|
+
// } catch (error) {
|
|
1397
|
+
// console.error(`[beamo-node] ⚠️ Backend simulation error: ${error.message}`);
|
|
1398
|
+
// }
|
|
1399
|
+
// }
|
|
1400
1400
|
|
|
1401
1401
|
// CRITICAL: Before publishing, verify using the backend's expected gameId
|
|
1402
1402
|
// The backend resolves rc.gameId from the realm hierarchy, which might differ from our resolvedGamePid
|
|
1403
1403
|
// We need to check what the backend will actually use
|
|
1404
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
}
|
|
1404
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1405
|
+
// console.error(`[beamo-node] [STEP: Pre-Publish Backend Simulation]`);
|
|
1406
|
+
// console.error(`[beamo-node] Simulating backend's imageNameMD5 calculation...`);
|
|
1407
|
+
// console.error(`[beamo-node] Backend will use: rc.cid, rc.gameId (resolved from realm hierarchy), serviceName`);
|
|
1408
|
+
// console.error(`[beamo-node] Our calculation used: cid=${cid}, gamePid=${resolvedGamePid}, serviceName=${serviceId}`);
|
|
1409
|
+
// console.error(`[beamo-node] Our uniqueName: ${uniqueName}`);
|
|
1410
|
+
// console.error(`[beamo-node] WARNING: If backend's rc.gameId differs from our resolvedGamePid, the check will fail!`);
|
|
1411
|
+
// }
|
|
1412
1412
|
|
|
1413
1413
|
// Try to resolve what the backend's rc.gameId will be by making the same API call the backend would make
|
|
1414
1414
|
// The backend resolves gameId from the realm hierarchy when processing X-BEAM-SCOPE
|
|
1415
|
-
try {
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
} catch (error) {
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
}
|
|
1415
|
+
// try {
|
|
1416
|
+
// const backendGamePidCheck = await resolveGamePid(apiHost, token, cid, pid, null); // Force resolution
|
|
1417
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1418
|
+
// console.error(`[beamo-node] Backend's expected gameId (resolved from realm hierarchy): ${backendGamePidCheck}`);
|
|
1419
|
+
// if (backendGamePidCheck !== resolvedGamePid) {
|
|
1420
|
+
// console.error(`[beamo-node] ⚠️ MISMATCH DETECTED!`);
|
|
1421
|
+
// console.error(`[beamo-node] Our resolvedGamePid: ${resolvedGamePid}`);
|
|
1422
|
+
// console.error(`[beamo-node] Backend's expected gameId: ${backendGamePidCheck}`);
|
|
1423
|
+
// console.error(`[beamo-node] This will cause imageNameMD5 mismatch!`);
|
|
1424
|
+
// const backendUniqueNameInput = `${cid}_${backendGamePidCheck}_${serviceId}`;
|
|
1425
|
+
// const backendUniqueName = md5Hex(backendUniqueNameInput).substring(0, 30);
|
|
1426
|
+
// console.error(`[beamo-node] Backend will check: ${registryUrl}${backendUniqueName}/manifests/${shortImageId}`);
|
|
1427
|
+
// console.error(`[beamo-node] But we uploaded to: ${registryUrl}${uniqueName}/manifests/${shortImageId}`);
|
|
1428
|
+
// } else {
|
|
1429
|
+
// console.error(`[beamo-node] ✓ Game PID matches - backend should find the image`);
|
|
1430
|
+
// }
|
|
1431
|
+
// }
|
|
1432
|
+
// } catch (error) {
|
|
1433
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1434
|
+
// console.error(`[beamo-node] Could not verify backend gameId resolution: ${error.message}`);
|
|
1435
|
+
// }
|
|
1436
|
+
// }
|
|
1437
1437
|
|
|
1438
1438
|
// Step 7: Discover storage, components, and dependencies
|
|
1439
1439
|
progress.start('Discovering storage objects and components');
|
|
@@ -1483,19 +1483,19 @@ main().catch(async (error) => {
|
|
|
1483
1483
|
console.error(`\n${colors.red}${colors.bright}✗ Publish failed${colors.reset}`);
|
|
1484
1484
|
if (error instanceof Error) {
|
|
1485
1485
|
console.error(`${colors.red}${error.message}${colors.reset}`);
|
|
1486
|
-
if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
}
|
|
1486
|
+
// if (process.env.BEAMO_DEBUG === '1' || process.env.BEAMO_NODE_DEBUG === '1') {
|
|
1487
|
+
// console.error(`\n${colors.dim}Stack:${colors.reset} ${error.stack}`);
|
|
1488
|
+
// if (error.cause) {
|
|
1489
|
+
// console.error(`${colors.dim}Cause:${colors.reset} ${error.cause}`);
|
|
1490
|
+
// }
|
|
1491
|
+
// if (error.stdout) {
|
|
1492
|
+
// console.error(`${colors.dim}stdout:${colors.reset} ${error.stdout}`);
|
|
1493
|
+
// }
|
|
1494
|
+
// if (error.stderr) {
|
|
1495
|
+
// console.error(`${colors.dim}stderr:${colors.reset} ${error.stderr}`);
|
|
1496
|
+
// }
|
|
1497
|
+
// console.error(`\n${colors.dim}Full error:${colors.reset}`, JSON.stringify(error, Object.getOwnPropertyNames(error), 2));
|
|
1498
|
+
// }
|
|
1499
1499
|
} else {
|
|
1500
1500
|
console.error(`${colors.red}${error}${colors.reset}`);
|
|
1501
1501
|
}
|