reskill 1.4.0 → 1.4.1
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.
|
@@ -27,6 +27,17 @@ export declare function buildPublishSkillName(name: string, registry: string, _u
|
|
|
27
27
|
* @internal Exported for testing
|
|
28
28
|
*/
|
|
29
29
|
export declare function isBlockedPublicRegistry(registryUrl: string): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Parse user's confirmation answer
|
|
32
|
+
*
|
|
33
|
+
* Default is Yes - returns true for empty input or any input except 'n'/'no'
|
|
34
|
+
*
|
|
35
|
+
* @param answer - User's input string
|
|
36
|
+
* @returns true if confirmed, false if declined
|
|
37
|
+
*
|
|
38
|
+
* @internal Exported for testing
|
|
39
|
+
*/
|
|
40
|
+
export declare function parseConfirmAnswer(answer: string): boolean;
|
|
30
41
|
export declare const publishCommand: Command;
|
|
31
42
|
export default publishCommand;
|
|
32
43
|
//# sourceMappingURL=publish.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/publish.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiDpC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,GACnB,MAAM,CAcR;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAYpE;
|
|
1
|
+
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/publish.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiDpC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,GACnB,MAAM,CAcR;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAYpE;AAoND;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAI1D;AAyND,eAAO,MAAM,cAAc,SAYH,CAAC;AAEzB,eAAe,cAAc,CAAC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -6885,6 +6885,20 @@ class SkillValidator {
|
|
|
6885
6885
|
}
|
|
6886
6886
|
}
|
|
6887
6887
|
}
|
|
6888
|
+
/**
|
|
6889
|
+
* Parse user's confirmation answer
|
|
6890
|
+
*
|
|
6891
|
+
* Default is Yes - returns true for empty input or any input except 'n'/'no'
|
|
6892
|
+
*
|
|
6893
|
+
* @param answer - User's input string
|
|
6894
|
+
* @returns true if confirmed, false if declined
|
|
6895
|
+
*
|
|
6896
|
+
* @internal Exported for testing
|
|
6897
|
+
*/ function parseConfirmAnswer(answer) {
|
|
6898
|
+
const trimmed = answer.trim().toLowerCase();
|
|
6899
|
+
// Default to true (Yes) if empty, only false if explicitly 'n' or 'no'
|
|
6900
|
+
return 'n' !== trimmed && 'no' !== trimmed;
|
|
6901
|
+
}
|
|
6888
6902
|
/**
|
|
6889
6903
|
* Confirm publish
|
|
6890
6904
|
*/ async function confirmPublish(name, version, registry) {
|
|
@@ -6893,9 +6907,10 @@ class SkillValidator {
|
|
|
6893
6907
|
output: process.stdout
|
|
6894
6908
|
});
|
|
6895
6909
|
return new Promise((resolve)=>{
|
|
6896
|
-
|
|
6910
|
+
// Default is Yes (capital Y), pressing Enter confirms
|
|
6911
|
+
rl.question(`\n? Publish ${name}@${version} to ${registry}? (Y/n) default: yes `, (answer)=>{
|
|
6897
6912
|
rl.close();
|
|
6898
|
-
resolve(
|
|
6913
|
+
resolve(parseConfirmAnswer(answer));
|
|
6899
6914
|
});
|
|
6900
6915
|
});
|
|
6901
6916
|
}
|
|
@@ -6912,7 +6927,8 @@ class SkillValidator {
|
|
|
6912
6927
|
// ============================================================================
|
|
6913
6928
|
async function publishAction(skillPath, options) {
|
|
6914
6929
|
const absolutePath = __WEBPACK_EXTERNAL_MODULE_node_path__.resolve(skillPath);
|
|
6915
|
-
|
|
6930
|
+
// Use cwd() as project root to find skills.json, not the skill path
|
|
6931
|
+
const registry = resolveRegistry(options.registry, process.cwd());
|
|
6916
6932
|
// Validate registry is not a blocked public registry
|
|
6917
6933
|
validateRegistry(registry);
|
|
6918
6934
|
// Check directory exists
|