@helix3/helix-cli 0.1.13-helix3.124 → 0.1.13-helix3.125
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/dist/index.js +72 -0
- package/dist/index.js.map +1 -1
- package/dist/interactable.d.ts +59 -0
- package/dist/interactable.js +738 -0
- package/dist/interactable.js.map +1 -0
- package/dist/lib.d.ts +32 -2
- package/dist/lib.js +45 -11
- package/dist/lib.js.map +1 -1
- package/dist/package.js +64 -7
- package/dist/package.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -492,6 +492,78 @@ program
|
|
|
492
492
|
: `✖ ${err instanceof Error ? err.message : String(err)}`);
|
|
493
493
|
}
|
|
494
494
|
});
|
|
495
|
+
program
|
|
496
|
+
.command('publish-interactable')
|
|
497
|
+
.description('Publish a validator-gated interactable bundle and link its official free Marketplace item')
|
|
498
|
+
.argument('[directory]', 'interactable bundle directory (the built dist/)', '.')
|
|
499
|
+
.action(async (directory) => {
|
|
500
|
+
const creds = requireAuth();
|
|
501
|
+
try {
|
|
502
|
+
const result = await (0, lib_1.publishInteractable)((0, node_path_1.resolve)(directory), creds, (message) => console.log(message));
|
|
503
|
+
console.log(`✔ Published interactable ${result.slug}@${result.version} (revision ${result.revision})`);
|
|
504
|
+
console.log(` checksum: ${result.checksumSha256}`);
|
|
505
|
+
console.log(` item: ${result.item.id}`);
|
|
506
|
+
console.log(` distribution:${result.distribution.id}`);
|
|
507
|
+
}
|
|
508
|
+
catch (err) {
|
|
509
|
+
fail(err instanceof lib_1.ApiError
|
|
510
|
+
? err.render()
|
|
511
|
+
: `✖ ${err instanceof Error ? err.message : String(err)}`);
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
program
|
|
515
|
+
.command('add-interactable')
|
|
516
|
+
.description('Resolve a Marketplace interactable, verify and vendor its bundle, then generate client/server glue')
|
|
517
|
+
.argument('<slug-or-item-id>', 'Marketplace item slug or UUID')
|
|
518
|
+
.option('-C, --world <dir>', 'world project directory', '.')
|
|
519
|
+
.option('--position <x,y,z>', 'placement origin in metres', '0,0,0')
|
|
520
|
+
.option('--yaw <degrees>', 'placement yaw in degrees', '0')
|
|
521
|
+
.option('--scale <n>', 'uniform placement scale', '1')
|
|
522
|
+
.action(async (ref, opts) => {
|
|
523
|
+
try {
|
|
524
|
+
const yawDeg = Number(opts.yaw);
|
|
525
|
+
const scale = Number(opts.scale);
|
|
526
|
+
if (!Number.isFinite(yawDeg))
|
|
527
|
+
fail(`✖ --yaw must be a number, got '${opts.yaw}'`);
|
|
528
|
+
if (!Number.isFinite(scale) || scale <= 0) {
|
|
529
|
+
fail(`✖ --scale must be a number > 0, got '${opts.scale}'`);
|
|
530
|
+
}
|
|
531
|
+
const credentials = (0, config_1.loadCredentials)() ?? undefined;
|
|
532
|
+
const result = await (0, lib_1.addInteractable)((0, node_path_1.resolve)(opts.world), ref, {
|
|
533
|
+
credentials,
|
|
534
|
+
placement: {
|
|
535
|
+
position: (0, lib_1.parseInteractablePosition)(opts.position),
|
|
536
|
+
yawDeg,
|
|
537
|
+
scale,
|
|
538
|
+
},
|
|
539
|
+
onProgress: (message) => console.log(message),
|
|
540
|
+
});
|
|
541
|
+
console.log(`${result.noOp ? '✔ Already installed' : '✔ Added'} ${result.id}@${result.version} as ${result.namespace}`);
|
|
542
|
+
console.log(` bundle: ${result.destination}`);
|
|
543
|
+
console.log(` client: ${result.clientGluePath}`);
|
|
544
|
+
console.log(` server: ${result.manifestPath}`);
|
|
545
|
+
console.log(' composition caps:');
|
|
546
|
+
for (const name of [
|
|
547
|
+
'rules',
|
|
548
|
+
'roomVars',
|
|
549
|
+
'playerVars',
|
|
550
|
+
'timers',
|
|
551
|
+
'phases',
|
|
552
|
+
'zones',
|
|
553
|
+
'events',
|
|
554
|
+
'actions',
|
|
555
|
+
]) {
|
|
556
|
+
console.log(` ${name}: ${result.caps[name]}/${result.caps.limits[name]} (${result.caps.percentages[name]}%)`);
|
|
557
|
+
}
|
|
558
|
+
for (const warning of result.warnings)
|
|
559
|
+
console.warn(` ! ${warning}`);
|
|
560
|
+
}
|
|
561
|
+
catch (err) {
|
|
562
|
+
fail(err instanceof lib_1.ApiError
|
|
563
|
+
? err.render()
|
|
564
|
+
: `✖ ${err instanceof Error ? err.message : String(err)}`);
|
|
565
|
+
}
|
|
566
|
+
});
|
|
495
567
|
// --- helix item ------------------------------------------------------------
|
|
496
568
|
// Universal items (wearables, avatars, home items) uploaded straight from a DCC
|
|
497
569
|
// export — the surface Helix Studio drives. Publishing an item is not
|