-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathcheck_bluesky_env.js
More file actions
33 lines (28 loc) · 1.2 KB
/
Copy pathcheck_bluesky_env.js
File metadata and controls
33 lines (28 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// This script tries to trigger the bskyPost function if it exists in the system
// Since we can't easily access the running system object from a separate process,
// we will check if the environment variables are correctly set for the main process.
import fs from 'fs';
import path from 'path';
function checkEnv() {
console.log('--- Environment Check ---');
console.log('CWD:', process.cwd());
const envPath = path.join(process.cwd(), 'config', 'api-keys.env');
if (fs.existsSync(envPath)) {
console.log('config/api-keys.env exists.');
const content = fs.readFileSync(envPath, 'utf8');
const hasId = content.includes('BLUESKY_IDENTIFIER');
const hasPw = content.includes('BLUESKY_PASSWORD');
console.log('Has Identifier:', hasId);
console.log('Has Password:', hasPw);
} else {
console.log('config/api-keys.env MISSING!');
}
// Check if the worker can be spawned
const workerPath = path.join(process.cwd(), 'server', 'social', 'bluesky_worker.mjs');
if (fs.existsSync(workerPath)) {
console.log('Worker exists at:', workerPath);
} else {
console.log('Worker MISSING at:', workerPath);
}
}
checkEnv();