@toolr/seedr 0.1.66 → 0.1.68
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/{chunk-UJNW6POZ.js → chunk-DI5Z3O3G.js} +13 -2
- package/dist/cli.js +4 -3
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -74,6 +74,12 @@ async function searchItems(query) {
|
|
|
74
74
|
(item) => item.slug.toLowerCase().includes(lowerQuery) || item.name.toLowerCase().includes(lowerQuery) || item.description.toLowerCase().includes(lowerQuery)
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
|
+
async function getItemFull(item) {
|
|
78
|
+
const typeDir = item.type + "s";
|
|
79
|
+
const itemJsonPath = `${typeDir}/${item.slug}/item.json`;
|
|
80
|
+
const content = await loadFile(itemJsonPath);
|
|
81
|
+
return JSON.parse(content);
|
|
82
|
+
}
|
|
77
83
|
function getItemBaseUrl(item) {
|
|
78
84
|
if (item.externalUrl) {
|
|
79
85
|
const rawUrl = item.externalUrl.replace("github.com", "raw.githubusercontent.com").replace("/tree/", "/");
|
|
@@ -105,9 +111,14 @@ function getItemSourcePath(item) {
|
|
|
105
111
|
}
|
|
106
112
|
async function fetchItemToDestination(item, destPath) {
|
|
107
113
|
const { remote } = getItemBaseUrl(item);
|
|
108
|
-
|
|
114
|
+
let files = item.contents?.files;
|
|
115
|
+
if (!files && item.type === "plugin") {
|
|
116
|
+
const full = await getItemFull(item);
|
|
117
|
+
files = full.contents?.files;
|
|
118
|
+
}
|
|
119
|
+
if (files) {
|
|
109
120
|
await mkdir(destPath, { recursive: true });
|
|
110
|
-
await fetchFileTree(
|
|
121
|
+
await fetchFileTree(files, remote, destPath);
|
|
111
122
|
return;
|
|
112
123
|
}
|
|
113
124
|
const filesToFetch = item.type === "skill" ? ["SKILL.md"] : item.type === "plugin" ? [".claude-plugin/plugin.json"] : [`${item.type}.md`];
|
package/dist/cli.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
searchItems,
|
|
23
23
|
skillHandler,
|
|
24
24
|
writeTextFile
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-DI5Z3O3G.js";
|
|
26
26
|
|
|
27
27
|
// src/cli.ts
|
|
28
28
|
import { Command as Command5 } from "commander";
|
|
@@ -164,7 +164,7 @@ function trackInstalls(slug, type, results, scope) {
|
|
|
164
164
|
type,
|
|
165
165
|
tool: result.tool,
|
|
166
166
|
scope,
|
|
167
|
-
version: "0.1.
|
|
167
|
+
version: "0.1.68"
|
|
168
168
|
}),
|
|
169
169
|
signal: AbortSignal.timeout(4e3)
|
|
170
170
|
}).catch(() => {
|
|
@@ -832,7 +832,8 @@ async function getInstalledPlugins(tool, scope, cwd = process.cwd()) {
|
|
|
832
832
|
for (const [pluginId, entries] of Object.entries(registry.plugins)) {
|
|
833
833
|
for (const entry of entries) {
|
|
834
834
|
if (entry.scope === scope && (scope === "user" || entry.projectPath === cwd)) {
|
|
835
|
-
|
|
835
|
+
const slug = pluginId.split("@")[0] || pluginId;
|
|
836
|
+
installed.push(slug);
|
|
836
837
|
break;
|
|
837
838
|
}
|
|
838
839
|
}
|
package/dist/index.js
CHANGED