@toolr/seedr 0.1.45 → 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.
Files changed (2) hide show
  1. package/dist/cli.js +26 -0
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolr/seedr",
3
- "version": "0.1.45",
3
+ "version": "0.1.46",
4
4
  "description": "Seed your projects with AI configurations",
5
5
  "type": "module",
6
6
  "bin": {