@aiderdesk/extensions 0.12.0 → 0.12.2

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 CHANGED
@@ -138,7 +138,7 @@ function getExtensionsPath(repoUrl) {
138
138
  try {
139
139
  const url = new URL(repoUrl);
140
140
  const pathParts = url.pathname.split("/").filter(Boolean);
141
- if (pathParts.length > 4 && pathParts[2] === "tree") {
141
+ if (pathParts.length > 4 && (pathParts[2] === "tree" || pathParts[2] === "blob")) {
142
142
  const extensionPath = pathParts.slice(4).join("/");
143
143
  return extensionPath;
144
144
  }
@@ -273,26 +273,39 @@ async function installFromUrl(url, targetDir) {
273
273
  if (!cloneUrl) {
274
274
  throw new Error("Invalid GitHub URL - could not extract repository URL");
275
275
  }
276
- if (!extensionsPath) {
277
- throw new Error("Invalid GitHub URL - could not extract extension path from URL");
278
- }
279
276
  const extName = urlPath.split("/").pop() || "extension";
280
277
  const tempDir = join(process.cwd(), `.temp-ext-${Date.now()}`);
281
278
  try {
282
- spinner.text = "Cloning repository with sparse checkout...";
283
- await runCommand("git", ["clone", "--depth", "1", "--sparse", cloneUrl, tempDir]);
284
- spinner.text = "Configuring sparse checkout path...";
285
- await runCommand("git", ["-C", tempDir, "sparse-checkout", "set", extensionsPath]);
286
- const sourceDir = join(tempDir, extensionsPath);
287
- const targetPath = join(targetDir, extName);
288
- if (!existsSync(sourceDir)) {
289
- throw new Error(`Extension folder not found in repository: ${extensionsPath}`);
290
- }
291
- spinner.text = "Copying extension files...";
292
- cpSync(sourceDir, targetPath, { recursive: true });
293
- spinner.succeed(chalk.green(`\u2713 Installed ${extName} to ${targetDir}`));
294
- if (existsSync(join(targetPath, "package.json"))) {
295
- await installDependencies(targetPath);
279
+ if (extensionsPath) {
280
+ spinner.text = "Cloning repository with sparse checkout...";
281
+ await runCommand("git", ["clone", "--depth", "1", "--sparse", cloneUrl, tempDir]);
282
+ spinner.text = "Configuring sparse checkout path...";
283
+ await runCommand("git", ["-C", tempDir, "sparse-checkout", "set", extensionsPath]);
284
+ const sourceDir = join(tempDir, extensionsPath);
285
+ const targetPath = join(targetDir, extName);
286
+ if (!existsSync(sourceDir)) {
287
+ throw new Error(`Extension folder not found in repository: ${extensionsPath}`);
288
+ }
289
+ spinner.text = "Copying extension files...";
290
+ cpSync(sourceDir, targetPath, { recursive: true });
291
+ spinner.succeed(chalk.green(`\u2713 Installed ${extName} to ${targetDir}`));
292
+ if (existsSync(join(targetPath, "package.json"))) {
293
+ await installDependencies(targetPath);
294
+ }
295
+ } else {
296
+ spinner.text = "Cloning repository...";
297
+ await runCommand("git", ["clone", "--depth", "1", cloneUrl, tempDir]);
298
+ const targetPath = join(targetDir, extName);
299
+ spinner.text = `Installing ${extName}...`;
300
+ cpSync(tempDir, targetPath, { recursive: true });
301
+ const gitDir = join(targetPath, ".git");
302
+ if (existsSync(gitDir)) {
303
+ rmSync(gitDir, { recursive: true, force: true });
304
+ }
305
+ if (existsSync(join(targetPath, "package.json"))) {
306
+ await installDependencies(targetPath);
307
+ }
308
+ spinner.succeed(chalk.green(`\u2713 Installed ${extName} to ${targetPath}`));
296
309
  }
297
310
  } finally {
298
311
  if (existsSync(tempDir)) {
package/extensions.json CHANGED
@@ -205,6 +205,15 @@
205
205
  "hasDependencies": true,
206
206
  "capabilities": ["ui"]
207
207
  },
208
+ {
209
+ "id": "fff",
210
+ "name": "FFF",
211
+ "description": "Fast file content search using FFF (Freakin Fast File Finder) — replaces the internal grep tool",
212
+ "folder": "fff",
213
+ "type": "folder",
214
+ "hasDependencies": true,
215
+ "capabilities": ["tools", "search"]
216
+ },
208
217
  {
209
218
  "id": "seek",
210
219
  "name": "Seek",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiderdesk/extensions",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "description": "Type definitions and examples for AiderDesk extensions",
5
5
  "author": "Hotovo",
6
6
  "homepage": "https://aiderdesk.hotovo.com",