@npeercy/skills 0.1.9 → 0.1.10
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/lib/skills.js +16 -0
- package/package.json +1 -1
package/lib/skills.js
CHANGED
|
@@ -833,6 +833,16 @@ export async function cmdPublish(args) {
|
|
|
833
833
|
const name = skillName || meta.name;
|
|
834
834
|
if (!org || !user || !name) throw new Error('Cannot infer org/user/name. Provide --path or install the skill first.');
|
|
835
835
|
|
|
836
|
+
const id = `${org}/${user}/${name}`;
|
|
837
|
+
console.log(`\nWill publish: ${id}`);
|
|
838
|
+
console.log(` Files: ${Object.keys(collectFiles(dir)).join(', ')}`);
|
|
839
|
+
|
|
840
|
+
const ok = await promptYesNo('Publish to server?', true);
|
|
841
|
+
if (!ok) {
|
|
842
|
+
console.log('Cancelled.');
|
|
843
|
+
return;
|
|
844
|
+
}
|
|
845
|
+
|
|
836
846
|
const files = collectFiles(dir);
|
|
837
847
|
const result = await api.publish(org, user, name, args.message || '', files);
|
|
838
848
|
console.log(`Published ${result.id}@${result.version}`);
|
|
@@ -882,6 +892,12 @@ export async function cmdImport(args) {
|
|
|
882
892
|
const skillName = meta?.name || name;
|
|
883
893
|
const id = `${cfg.org}/${me.user}/${skillName}`;
|
|
884
894
|
|
|
895
|
+
const ok = await promptYesNo(`Publish "${skillName}" to server as ${id}?`, true);
|
|
896
|
+
if (!ok) {
|
|
897
|
+
console.log(` Skipped ${skillName}.`);
|
|
898
|
+
continue;
|
|
899
|
+
}
|
|
900
|
+
|
|
885
901
|
try {
|
|
886
902
|
// Publish to server
|
|
887
903
|
const files = collectFiles(dir);
|