@helix3/helix-cli 0.1.13-helix3.97 → 0.1.13-helix3.99
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 +5 -2
- package/dist/index.js.map +1 -1
- package/dist/itemDef/inspect.d.ts +1 -0
- package/dist/itemDef/inspect.js +3 -2
- package/dist/itemDef/inspect.js.map +1 -1
- package/dist/itemDef/publish.d.ts +6 -1
- package/dist/itemDef/publish.js +39 -0
- package/dist/itemDef/publish.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2722,6 +2722,7 @@ itemDef
|
|
|
2722
2722
|
.argument('<file>', 'the .helix-interactive.json descriptor')
|
|
2723
2723
|
.option('--slug <slug>', 'product slug, unique platform-wide (default: weapon-<id>; reruns need a fresh one)')
|
|
2724
2724
|
.option('--keep-personal', 'keep the product off the marketplace and out of the publish fee; the link still grants you an instance')
|
|
2725
|
+
.option('--version-of <assetId>', 'publish as a NEW immutable version of this existing definition (compare-and-set against its served version); the product link is untouched and worlds keep their pins until each re-pins')
|
|
2725
2726
|
.action(async (file, opts) => {
|
|
2726
2727
|
const creds = requireAuth();
|
|
2727
2728
|
const mismatch = (0, config_1.credsEnvMismatchWarning)(creds.apiUrl);
|
|
@@ -2729,16 +2730,18 @@ itemDef
|
|
|
2729
2730
|
console.log(mismatch);
|
|
2730
2731
|
try {
|
|
2731
2732
|
const { publishItemDef } = await Promise.resolve().then(() => __importStar(require('./itemDef/publish')));
|
|
2732
|
-
if (opts.keepPersonal !== true) {
|
|
2733
|
+
if (opts.keepPersonal !== true && opts.versionOf === undefined) {
|
|
2733
2734
|
console.log('note: a marketplace product link can charge a publish fee — pass --keep-personal for a fee-free personal publish.');
|
|
2734
2735
|
}
|
|
2735
2736
|
const report = await publishItemDef(lib_1.HelixApi.forCredentials(creds), {
|
|
2736
2737
|
file,
|
|
2737
2738
|
...(opts.slug !== undefined && { slug: opts.slug }),
|
|
2738
2739
|
keepPersonal: opts.keepPersonal === true,
|
|
2740
|
+
...(opts.versionOf !== undefined && { versionOf: opts.versionOf }),
|
|
2739
2741
|
});
|
|
2740
2742
|
console.log(`✔ ${report.title} — definition ${report.definition.assetId}@${report.definition.version}`);
|
|
2741
|
-
|
|
2743
|
+
const propLine = ` prop ${report.prop.assetId}@${report.prop.version} · ${report.audio.length} audio upload(s)`;
|
|
2744
|
+
console.log(report.product ? `${propLine} · product slug ${report.product.slug}` : `${propLine} · existing product untouched`);
|
|
2742
2745
|
if (report.warnings.length > 0)
|
|
2743
2746
|
console.log(`warnings:\n ${report.warnings.join('\n ')}`);
|
|
2744
2747
|
}
|