refactor(linkedin-studio): M0-5 — queue-manager.mjs via getDataRoot('drafts')
This commit is contained in:
parent
9e059f8a7f
commit
7f386943c6
2 changed files with 59 additions and 4 deletions
|
|
@ -5,11 +5,9 @@
|
|||
|
||||
import { readFileSync, writeFileSync, existsSync, mkdirSync } from 'node:fs';
|
||||
import { join, dirname } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { getDataRoot } from './data-root.mjs';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const PLUGIN_ROOT = process.env.PLUGIN_ROOT || join(__dirname, '..', '..');
|
||||
const QUEUE_FILE = join(PLUGIN_ROOT, 'assets', 'drafts', 'queue.json');
|
||||
const QUEUE_FILE = join(getDataRoot('drafts'), 'queue.json');
|
||||
|
||||
function ensureQueue() {
|
||||
if (!existsSync(QUEUE_FILE)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue