@aikeytake/social-automation 2.0.0 → 2.0.1

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 +1 -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.0",
3
+ "version": "2.0.1",
4
4
  "description": "Content research and aggregation tool for AI agents",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -3,10 +3,7 @@ import createLogger from './utils/logger.js';
3
3
  import rssFetch from './fetchers/rss.js';
4
4
  import redditFetch from './fetchers/reddit.js';
5
5
  import hnFetch from './fetchers/hackernews.js';
6
- import linkedinFetch from './fetchers/linkedin.js';
7
6
  import apiFetch from './fetchers/api.js';
8
- import twitterFetch from './fetchers/twitter.js';
9
- import linkedinBrowserFetch from './fetchers/linkedin_browser.js';
10
7
  import fs from 'fs';
11
8
  import path from 'path';
12
9
  import { fileURLToPath } from 'url';
@@ -113,6 +110,7 @@ async function scrape(options = {}) {
113
110
  if (config.linkedin_browser?.enabled && !toSupabase) {
114
111
  logger.info('💼 Fetching from LinkedIn (browser)...');
115
112
  try {
113
+ const { default: linkedinBrowserFetch } = await import('./fetchers/linkedin_browser.js');
116
114
  const items = await linkedinBrowserFetch(config);
117
115
  results.sources.linkedin_browser = items.length;
118
116
  results.items.push(...items);
@@ -128,6 +126,7 @@ async function scrape(options = {}) {
128
126
  if (config.trendingSources?.twitter?.enabled && !toSupabase) {
129
127
  logger.info('🐦 Fetching from Twitter/X...');
130
128
  try {
129
+ const { default: twitterFetch } = await import('./fetchers/twitter.js');
131
130
  const twitterItems = await twitterFetch(config);
132
131
  results.sources.twitter = twitterItems.length;
133
132
  results.items.push(...twitterItems);
@@ -139,10 +138,11 @@ async function scrape(options = {}) {
139
138
  }
140
139
  }
141
140
 
142
- // LinkedIn (skip when toSupabase - requires auth)
141
+ // LinkedIn (skip when toSupabase - requires BrightData API)
143
142
  if (config.linkedin?.enabled && !toSupabase) {
144
143
  logger.info('💼 Fetching from LinkedIn...');
145
144
  try {
145
+ const { default: linkedinFetch } = await import('./fetchers/linkedin.js');
146
146
  const linkedinItems = await linkedinFetch(config);
147
147
  results.sources.linkedin = linkedinItems.length;
148
148
  results.items.push(...linkedinItems);