social-agent-cli 3.1.1 → 3.2.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "social-agent-cli",
3
- "version": "3.1.1",
3
+ "version": "3.2.0",
4
4
  "description": "AI-powered social media agent - free APIs + browser automation with self-healing selectors",
5
5
  "type": "module",
6
6
  "bin": {
@@ -176,9 +176,16 @@ export class BrowserDriver {
176
176
  case "upload": {
177
177
  const filePath = val || imagePath || "";
178
178
  if (!filePath || filePath.includes("{{")) break;
179
+ // Her zaman input[type=file] ile yükle - en güvenilir yol
180
+ try {
181
+ this.cmd(`upload "input[type='file']" "${filePath}"`, 10000);
182
+ if (step.waitMs) this.cmd(`wait ${step.waitMs}`);
183
+ return;
184
+ } catch {}
185
+ // Fallback: selector'larla dene
179
186
  const sels = [step.selector, ...(step.fallbackSelectors || [])].filter(Boolean);
180
187
  for (const sel of sels) {
181
- try { this.cmd(`upload "${sel}" "${filePath}"`); if (step.waitMs) this.cmd(`wait ${step.waitMs}`); return; } catch {}
188
+ try { this.cmd(`upload "${sel}" "${filePath}"`, 10000); if (step.waitMs) this.cmd(`wait ${step.waitMs}`); return; } catch {}
182
189
  }
183
190
  throw new Error(`Upload: ${filePath}`);
184
191
  }