reskill 1.17.1 → 1.18.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/find.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/find.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAcpC,UAAU,WAAW;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA0ED;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAwCnF;AAMD,eAAO,MAAM,WAAW,SAWH,CAAC;AAEtB,eAAe,WAAW,CAAC"}
|
|
@@ -27,6 +27,16 @@ 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
|
+
* Check authentication
|
|
32
|
+
*
|
|
33
|
+
* Token resolution: --token CLI flag > RESKILL_TOKEN env > ~/.reskillrc
|
|
34
|
+
*
|
|
35
|
+
* @internal Exported for testing
|
|
36
|
+
*/
|
|
37
|
+
export declare function checkAuth(registry: string, dryRun: boolean, cliToken?: string): {
|
|
38
|
+
token: string;
|
|
39
|
+
} | null;
|
|
30
40
|
/**
|
|
31
41
|
* Parse user's confirmation answer
|
|
32
42
|
*
|
|
@@ -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;
|
|
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;AAuDpC;;;;;;;;;;;;;;;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;AAqBD;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,OAAO,EACf,QAAQ,CAAC,EAAE,MAAM,GAChB;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAsB1B;AAkLD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAI1D;AAoBD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,CAyBnE;AA0TD,eAAO,MAAM,cAAc,SAcH,CAAC;AAEzB,eAAe,cAAc,CAAC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -6579,8 +6579,15 @@ class AuthManager {
|
|
|
6579
6579
|
return;
|
|
6580
6580
|
}
|
|
6581
6581
|
const registry = resolveRegistryForSearch(options.registry);
|
|
6582
|
+
// Resolve auth token: --token flag > RESKILL_TOKEN env > ~/.reskillrc
|
|
6583
|
+
let token = options.token;
|
|
6584
|
+
if (!token) {
|
|
6585
|
+
const authManager = new AuthManager();
|
|
6586
|
+
token = authManager.getToken(registry) ?? void 0;
|
|
6587
|
+
}
|
|
6582
6588
|
const client = new RegistryClient({
|
|
6583
|
-
registry
|
|
6589
|
+
registry,
|
|
6590
|
+
token
|
|
6584
6591
|
});
|
|
6585
6592
|
try {
|
|
6586
6593
|
const { items, total } = await client.search(query, {
|
|
@@ -6600,7 +6607,7 @@ class AuthManager {
|
|
|
6600
6607
|
// ============================================================================
|
|
6601
6608
|
// Command Definition
|
|
6602
6609
|
// ============================================================================
|
|
6603
|
-
const findCommand = new __WEBPACK_EXTERNAL_MODULE_commander__.Command('find').alias('search').description('Search for skills in the registry').argument('<query>', 'Search query').option('-r, --registry <url>', 'Registry URL (or set RESKILL_REGISTRY env var, or defaults.publishRegistry in skills.json)').option('-l, --limit <n>', 'Maximum number of results', '10').option('-j, --json', 'Output as JSON').action(findAction);
|
|
6610
|
+
const findCommand = new __WEBPACK_EXTERNAL_MODULE_commander__.Command('find').alias('search').description('Search for skills in the registry').argument('<query>', 'Search query').option('-r, --registry <url>', 'Registry URL (or set RESKILL_REGISTRY env var, or defaults.publishRegistry in skills.json)').option('-l, --limit <n>', 'Maximum number of results', '10').option('-j, --json', 'Output as JSON').option('-t, --token <token>', 'Auth token for registry API requests (for CI/CD)').action(findAction);
|
|
6604
6611
|
/**
|
|
6605
6612
|
* Group path utilities — normalization, slug generation, and validation.
|
|
6606
6613
|
*
|
|
@@ -9106,7 +9113,15 @@ class SkillValidator {
|
|
|
9106
9113
|
}
|
|
9107
9114
|
/**
|
|
9108
9115
|
* Check authentication
|
|
9109
|
-
|
|
9116
|
+
*
|
|
9117
|
+
* Token resolution: --token CLI flag > RESKILL_TOKEN env > ~/.reskillrc
|
|
9118
|
+
*
|
|
9119
|
+
* @internal Exported for testing
|
|
9120
|
+
*/ function checkAuth(registry, dryRun, cliToken) {
|
|
9121
|
+
// --token flag takes highest priority
|
|
9122
|
+
if (cliToken) return {
|
|
9123
|
+
token: cliToken
|
|
9124
|
+
};
|
|
9110
9125
|
const authManager = new AuthManager();
|
|
9111
9126
|
const token = authManager.getToken(registry);
|
|
9112
9127
|
if (!token) {
|
|
@@ -9117,7 +9132,7 @@ class SkillValidator {
|
|
|
9117
9132
|
logger_logger.error('Authentication required');
|
|
9118
9133
|
logger_logger.newline();
|
|
9119
9134
|
logger_logger.log('You must be logged in to publish skills.');
|
|
9120
|
-
logger_logger.log("Run 'reskill login' to authenticate
|
|
9135
|
+
logger_logger.log("Run 'reskill login' to authenticate, or pass --token <token>.");
|
|
9121
9136
|
process.exit(1);
|
|
9122
9137
|
}
|
|
9123
9138
|
return {
|
|
@@ -9376,7 +9391,7 @@ async function publishAction(skillPath, options) {
|
|
|
9376
9391
|
try {
|
|
9377
9392
|
// 1. Check authentication (skip for dry-run)
|
|
9378
9393
|
// Note: checkAuth exits the process if not authenticated (unless dry-run)
|
|
9379
|
-
checkAuth(registry, options.dryRun || false);
|
|
9394
|
+
const authResult = checkAuth(registry, options.dryRun || false, options.token);
|
|
9380
9395
|
// 2. Load skill
|
|
9381
9396
|
const skill = validator.loadSkill(absolutePath);
|
|
9382
9397
|
// 2.5. Check version - prompt if missing and not in --yes/--dry-run mode
|
|
@@ -9476,16 +9491,8 @@ async function publishAction(skillPath, options) {
|
|
|
9476
9491
|
return;
|
|
9477
9492
|
}
|
|
9478
9493
|
}
|
|
9479
|
-
// 10. Get auth token
|
|
9480
|
-
const
|
|
9481
|
-
const token = authManager.getToken(registry);
|
|
9482
|
-
if (!token) {
|
|
9483
|
-
logger_logger.error('Authentication required');
|
|
9484
|
-
logger_logger.newline();
|
|
9485
|
-
logger_logger.log('You must be logged in to publish skills.');
|
|
9486
|
-
logger_logger.log("Run 'reskill login' to authenticate.");
|
|
9487
|
-
process.exit(1);
|
|
9488
|
-
}
|
|
9494
|
+
// 10. Get auth token (already resolved by checkAuth in step 1)
|
|
9495
|
+
const token = authResult?.token;
|
|
9489
9496
|
// 11. Actually publish
|
|
9490
9497
|
logger_logger.newline();
|
|
9491
9498
|
logger_logger.log(`Publishing to ${registry}...`);
|
|
@@ -9541,7 +9548,7 @@ async function publishAction(skillPath, options) {
|
|
|
9541
9548
|
// ============================================================================
|
|
9542
9549
|
// Command Definition
|
|
9543
9550
|
// ============================================================================
|
|
9544
|
-
const publishCommand = new __WEBPACK_EXTERNAL_MODULE_commander__.Command('publish').alias('pub').description('Publish a skill to the registry').argument('[path]', 'Path to skill directory', '.').option('-r, --registry <url>', 'Registry URL (or set RESKILL_REGISTRY env var, or defaults.publishRegistry in skills.json)').option('-t, --tag <tag>', 'Git tag to publish').option('--access <level>', 'Access level: public or restricted', 'public').option('-n, --dry-run', 'Validate without publishing').option('-y, --yes', 'Skip confirmation prompts').option('-g, --group <path>', 'Publish skill into a group (e.g., "kanyun/frontend")').action(publishAction);
|
|
9551
|
+
const publishCommand = new __WEBPACK_EXTERNAL_MODULE_commander__.Command('publish').alias('pub').description('Publish a skill to the registry').argument('[path]', 'Path to skill directory', '.').option('-r, --registry <url>', 'Registry URL (or set RESKILL_REGISTRY env var, or defaults.publishRegistry in skills.json)').option('-t, --tag <tag>', 'Git tag to publish').option('--access <level>', 'Access level: public or restricted', 'public').option('-n, --dry-run', 'Validate without publishing').option('-y, --yes', 'Skip confirmation prompts').option('-g, --group <path>', 'Publish skill into a group (e.g., "kanyun/frontend")').option('--token <token>', 'Auth token for registry API requests (for CI/CD)').action(publishAction);
|
|
9545
9552
|
/**
|
|
9546
9553
|
* uninstall command - Uninstall one or more skills
|
|
9547
9554
|
*/ const uninstallCommand = new __WEBPACK_EXTERNAL_MODULE_commander__.Command('uninstall').alias('un').alias('remove').alias('rm').description('Uninstall one or more skills').argument('<skills...>', 'Skill names to uninstall').option('-g, --global', 'Uninstall from global installation (~/.claude/skills)').option('-y, --yes', 'Skip confirmation prompts').action(async (skillNames, options)=>{
|