@aikeytake/social-automation 2.0.3 → 2.0.5

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/package.json +2 -1
  2. package/src/index.js +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aikeytake/social-automation",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "Content research and aggregation tool for AI agents",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -24,6 +24,7 @@
24
24
  "author": "aikeytake",
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
+ "@aikeytake/social-automation": "2.0.4",
27
28
  "@supabase/supabase-js": "^2.47.0",
28
29
  "axios": "^1.7.9",
29
30
  "cheerio": "^1.0.0",
package/src/index.js CHANGED
@@ -7,6 +7,7 @@ import apiFetch from './fetchers/api.js';
7
7
  import fs from 'fs';
8
8
  import path from 'path';
9
9
  import { fileURLToPath } from 'url';
10
+ import defaultConfig from '../config/sources.json';
10
11
 
11
12
  dotenv.config();
12
13
 
@@ -122,10 +123,9 @@ async function scrape(options = {}) {
122
123
  return results;
123
124
  }
124
125
 
125
- function loadConfig() {
126
- const configPath = path.join(__dirname, '../config/sources.json');
127
- const content = fs.readFileSync(configPath, 'utf-8');
128
- return JSON.parse(content);
126
+ function loadConfig(optionsConfig) {
127
+ // Allow config override (for testing or custom sources), otherwise use bundled default
128
+ return optionsConfig || defaultConfig;
129
129
  }
130
130
 
131
131
  function getDateString() {