a collection of lightweight TypeScript packages for AT Protocol, the protocol powering Bluesky
atproto bluesky typescript npm
101
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(lex-cli): use file protocol for config import

closes https://github.com/mary-ext/atcute/pull/37

authored by

marsh and committed by
Mary
43e5d06c 0cc2e8d8

+9 -2
+5
.changeset/gentle-things-grow.md
··· 1 + --- 2 + '@atcute/lex-cli': patch 3 + --- 4 + 5 + use file protocol when importing config files
+4 -2
packages/lexicons/lex-cli/src/cli.ts
··· 1 1 import * as fs from 'node:fs/promises'; 2 2 import * as path from 'node:path'; 3 + import * as url from 'node:url'; 3 4 4 5 import { Builtins, Command, Option, Program } from '@externdefs/collider'; 5 6 import pc from 'picocolors'; ··· 32 33 33 34 let config: LexiconConfig; 34 35 try { 35 - const mod = (await import(path.resolve(configFilename))) as { default: LexiconConfig }; 36 - config = mod.default; 36 + const configURL = url.pathToFileURL(configFilename); 37 + const configMod = (await import(configURL.href)) as { default: LexiconConfig }; 38 + config = configMod.default; 37 39 } catch (err) { 38 40 console.error(pc.bold(pc.red(`failed to import config:`))); 39 41 console.error(err);