@toolr/seedr 0.1.44 → 0.1.46
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/cli.js +27 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -87,8 +87,8 @@ async function selectTools(compatible) {
|
|
|
87
87
|
}
|
|
88
88
|
async function selectScope(includeLocal = false) {
|
|
89
89
|
const options = [
|
|
90
|
-
{ label: "User", value: "user", hint: "home directory" },
|
|
91
90
|
{ label: "Project", value: "project", hint: includeLocal ? "current directory, settings.json" : "current directory" },
|
|
91
|
+
{ label: "User", value: "user", hint: "home directory" },
|
|
92
92
|
...includeLocal ? [{ label: "Local", value: "local", hint: "current directory, settings.local.json" }] : []
|
|
93
93
|
];
|
|
94
94
|
const result = await p.select({ message: "Installation scope", options });
|
|
@@ -151,6 +151,31 @@ function handleCommandError(error2) {
|
|
|
151
151
|
process.exit(1);
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
+
// src/utils/analytics.ts
|
|
155
|
+
import { createRequire } from "module";
|
|
156
|
+
var require2 = createRequire(import.meta.url);
|
|
157
|
+
var { version: CLI_VERSION } = require2("../../package.json");
|
|
158
|
+
var ANALYTICS_URL = "https://seedr.toolr.dev/api/installs";
|
|
159
|
+
function trackInstalls(slug, type, results, scope) {
|
|
160
|
+
if (process.env.SEEDR_NO_TELEMETRY) return;
|
|
161
|
+
for (const result of results) {
|
|
162
|
+
if (!result.success) continue;
|
|
163
|
+
fetch(ANALYTICS_URL, {
|
|
164
|
+
method: "POST",
|
|
165
|
+
headers: { "Content-Type": "application/json" },
|
|
166
|
+
body: JSON.stringify({
|
|
167
|
+
slug,
|
|
168
|
+
type,
|
|
169
|
+
tool: result.tool,
|
|
170
|
+
scope,
|
|
171
|
+
version: CLI_VERSION
|
|
172
|
+
}),
|
|
173
|
+
signal: AbortSignal.timeout(4e3)
|
|
174
|
+
}).catch(() => {
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
154
179
|
// src/config/compatibility.ts
|
|
155
180
|
var TOOL_COMPATIBILITY = {
|
|
156
181
|
skill: ["claude", "copilot", "gemini", "codex", "opencode"],
|
|
@@ -913,6 +938,7 @@ var addCommand = new Command("add").description("Install a skill, agent, hook, o
|
|
|
913
938
|
}
|
|
914
939
|
console.log();
|
|
915
940
|
const results = await handler.install(item, tools, scope, method, process.cwd());
|
|
941
|
+
trackInstalls(item.slug, item.type, results, scope);
|
|
916
942
|
printInstallSummary(results);
|
|
917
943
|
outro2("Installation complete");
|
|
918
944
|
} catch (error2) {
|