@aikeytake/social-automation 2.0.4 → 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.
- package/package.json +2 -1
- package/src/index.js +4 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aikeytake/social-automation",
|
|
3
|
-
"version": "2.0.
|
|
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,13 +7,10 @@ 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
|
|
10
|
+
import defaultConfig from '../config/sources.json';
|
|
11
11
|
|
|
12
12
|
dotenv.config();
|
|
13
13
|
|
|
14
|
-
// Use require.resolve to find package root (works correctly through pnpm symlinks)
|
|
15
|
-
const require = createRequire(import.meta.url);
|
|
16
|
-
const PKG_ROOT = path.dirname(require.resolve('@aikeytake/social-automation/package.json'));
|
|
17
14
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
18
15
|
const logger = createLogger('Main');
|
|
19
16
|
|
|
@@ -126,10 +123,9 @@ async function scrape(options = {}) {
|
|
|
126
123
|
return results;
|
|
127
124
|
}
|
|
128
125
|
|
|
129
|
-
function loadConfig() {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
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;
|
|
133
129
|
}
|
|
134
130
|
|
|
135
131
|
function getDateString() {
|