pmpt-cli 1.14.10 → 1.14.11
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/commands/edit.js +15 -0
- package/package.json +1 -1
package/dist/commands/edit.js
CHANGED
|
@@ -56,6 +56,7 @@ export async function cmdEdit() {
|
|
|
56
56
|
`Category: ${categoryLabel}`,
|
|
57
57
|
project.productUrl ? `Product: ${project.productUrl}` : 'Product: (none)',
|
|
58
58
|
`Visibility: ${project.unlisted ? 'Unlisted' : 'Listed'}`,
|
|
59
|
+
`Related: ${project.related?.length ? project.related.join(', ') : '(none)'}`,
|
|
59
60
|
].join('\n'), 'Current Settings');
|
|
60
61
|
// Pick fields to edit
|
|
61
62
|
const fields = await p.multiselect({
|
|
@@ -66,6 +67,7 @@ export async function cmdEdit() {
|
|
|
66
67
|
{ value: 'category', label: 'Category' },
|
|
67
68
|
{ value: 'productUrl', label: 'Product Link' },
|
|
68
69
|
{ value: 'unlisted', label: 'Visibility (listed/unlisted)' },
|
|
70
|
+
{ value: 'related', label: 'Related Projects' },
|
|
69
71
|
],
|
|
70
72
|
});
|
|
71
73
|
if (p.isCancel(fields)) {
|
|
@@ -174,6 +176,19 @@ export async function cmdEdit() {
|
|
|
174
176
|
}
|
|
175
177
|
updates.unlisted = !!v;
|
|
176
178
|
}
|
|
179
|
+
if (selected.has('related')) {
|
|
180
|
+
const v = await p.text({
|
|
181
|
+
message: 'Related project slugs (comma-separated):',
|
|
182
|
+
defaultValue: project.related?.join(', ') || '',
|
|
183
|
+
placeholder: 'e.g., my-api, my-cli, my-docs',
|
|
184
|
+
});
|
|
185
|
+
if (p.isCancel(v)) {
|
|
186
|
+
p.cancel('Cancelled');
|
|
187
|
+
process.exit(0);
|
|
188
|
+
}
|
|
189
|
+
const slugs = v.split(',').map((s) => s.trim()).filter(Boolean);
|
|
190
|
+
updates.related = slugs;
|
|
191
|
+
}
|
|
177
192
|
const s2 = p.spinner();
|
|
178
193
|
s2.start('Updating...');
|
|
179
194
|
try {
|