@hasnatools/skills 0.1.3 → 0.1.4

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -20702,8 +20702,8 @@ async function getMarketplaceSkills(options) {
20702
20702
  const params = new URLSearchParams;
20703
20703
  if (options?.limit)
20704
20704
  params.set("limit", options.limit.toString());
20705
- if (options?.offset)
20706
- params.set("offset", options.offset.toString());
20705
+ if (options?.page)
20706
+ params.set("page", options.page.toString());
20707
20707
  if (options?.category)
20708
20708
  params.set("category", options.category);
20709
20709
  const query = params.toString();
@@ -21903,10 +21903,9 @@ async function marketplaceCommand(options = {}) {
21903
21903
  const spinner = ora("Fetching skills from marketplace...").start();
21904
21904
  const limit = options.limit || 20;
21905
21905
  const page = options.page || 1;
21906
- const offset = (page - 1) * limit;
21907
21906
  const result = await getMarketplaceSkills({
21908
21907
  limit,
21909
- offset,
21908
+ page,
21910
21909
  category: options.category
21911
21910
  });
21912
21911
  if (result.error || !result.data) {
@@ -21915,8 +21914,7 @@ async function marketplaceCommand(options = {}) {
21915
21914
  return;
21916
21915
  }
21917
21916
  const skills = result.data.skills;
21918
- const total = result.data.total;
21919
- const totalPages = Math.ceil(total / limit);
21917
+ const { total, totalPages } = result.data.pagination;
21920
21918
  spinner.stop();
21921
21919
  if (skills.length === 0) {
21922
21920
  console.log(source_default.dim("No skills found in marketplace"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasnatools/skills",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "CLI for skills.md - AI Agent Skills Marketplace",
5
5
  "type": "module",
6
6
  "bin": {