CLI tool to sync your Markdown to Leaflet
leafletpub atproto cli markdown
30
fork

Configure Feed

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

doesn't work with non-Bluesky PDSes #9

open opened by mackuba.eu

In sync-cmd.js, the app should look up user's assigned PDS to pass to CredentialManager from the DID document, instead of assuming it's bsky.social ๐Ÿ˜…

% bun leaflet-md sync            

 ERROR  AuthenticationRequired > Invalid identifier or password                                                                                                                                   

    at ok (node_modules/@atcute/client/dist/client.js:175:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async CredentialManager.login (node_modules/@atcute/client/dist/credential-manager.js:150:25)
    at async Object.run (node_modules/@sharpmars/leaflet-md/dist/cli.js:381:3)
    at async runCommand (node_modules/citty/dist/index.mjs:316:16)
    at async runCommand (node_modules/citty/dist/index.mjs:307:11)
    at async runMain (node_modules/citty/dist/index.mjs:445:7) 

Also, handler.session.pdsUri will be undefined for non-Bluesky PDSes, because in the response from createSession, the didDoc field is null, so that value should not be used as is to create a URL (the const carReq = line), but only taken if it's set, otherwise just use the previously used PDS hostname.

 % bun leaflet-md sync

 ERROR  Failed to parse URL from undefined/xrpc/com.atproto.sync.getRepo?did=did:plc:oio4hkxaop4ao4wz2pp3f4cr                                                                                     

    at node:internal/deps/undici/undici:15845:13
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Object.run (node_modules/@sharpmars/leaflet-md/dist/cli.js:387:18)
    at async runCommand (node_modules/citty/dist/index.mjs:316:16)
    at async runCommand (node_modules/citty/dist/index.mjs:307:11)
    at async runMain (node_modules/citty/dist/index.mjs:445:7)

  [cause]: Invalid URL

      at new URL (node:internal/url:828:25)
      at new Request (node:internal/deps/undici/undici:10413:25)
      at fetch (node:internal/deps/undici/undici:11325:25)
      at fetch (node:internal/deps/undici/undici:15843:10)
      at fetch (node:internal/bootstrap/web/exposed-window-or-worker:83:12)
      at Object.run (node_modules/@sharpmars/leaflet-md/dist/cli.js:387:24)
      at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
      at async runCommand (node_modules/citty/dist/index.mjs:316:16)
      at async runCommand (node_modules/citty/dist/index.mjs:307:11)
      at async runMain (node_modules/citty/dist/index.mjs:445:7) 
[deleted by author]
[deleted by author]
[deleted by author]
sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:oio4hkxaop4ao4wz2pp3f4cr/sh.tangled.repo.issue/3m5p5h7yfrq22