Run codemod for replacing BskyAgent with AtpAgent (#10862)

This commit is contained in:
DS Boyce
2026-06-11 08:46:01 -07:00
committed by GitHub
parent e3e7db2350
commit c8634105c1
37 changed files with 195 additions and 134 deletions
+4 -4
View File
@@ -1,7 +1,7 @@
import {
type AppBskyFeedDefs,
type AppBskyFeedGetFeed as GetCustomFeed,
BskyAgent,
AtpAgent,
jsonStringToLex,
} from '@atproto/api'
@@ -13,7 +13,7 @@ import {type FeedAPI, type FeedAPIResponse} from './types'
import {createBskyTopicsHeader, isBlueskyOwnedFeed} from './utils'
export class CustomFeedAPI implements FeedAPI {
agent: BskyAgent
agent: AtpAgent
params: GetCustomFeed.QueryParams
userInterests?: string
@@ -22,7 +22,7 @@ export class CustomFeedAPI implements FeedAPI {
feedParams,
userInterests,
}: {
agent: BskyAgent
agent: AtpAgent
feedParams: GetCustomFeed.QueryParams
userInterests?: string
}) {
@@ -113,7 +113,7 @@ async function loggedOutFetch({
* @see https://github.com/bluesky-social/atproto/blob/60df3fc652b00cdff71dd9235d98a7a4bb828f05/packages/api/src/agent.ts#L120
*/
const labelersHeader = {
'atproto-accept-labelers': BskyAgent.appLabelers
'atproto-accept-labelers': AtpAgent.appLabelers
.map(l => `${l};redact`)
.join(', '),
}