Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finalize PDS in-process AppView removal #1198

Merged
merged 113 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from 94 commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
e71a5e3
rm tables
dholms Jun 12, 2023
a141d44
rm event-stream & proxied
dholms Jun 12, 2023
3b32f2b
Remove appview services, move label service to pds
devinivy Jun 12, 2023
44e4715
only proxy appview stuff
dholms Jun 12, 2023
e600fab
delete more tables
dholms Jun 12, 2023
dc240c2
Start removing message dispatched from pds
devinivy Jun 12, 2023
ac35923
more syncing-up removal of message dispatcher in pds
devinivy Jun 12, 2023
b241fba
merged
dholms Jun 12, 2023
1b10634
remove feedgens from pds, remove getPopular
devinivy Jun 12, 2023
d318f3e
remove unused image helper from pds
devinivy Jun 12, 2023
49010ed
fixing compiler errors
dholms Jun 12, 2023
b458780
clean up sharp
dholms Jun 12, 2023
c9c561d
rm label service
dholms Jun 12, 2023
2774c17
first pass on cleaning up tests
dholms Jun 12, 2023
69f3727
fix up a bunch of tests
dholms Jun 13, 2023
9c4667d
moderation view tests
dholms Jun 13, 2023
6940a76
last admin tests
dholms Jun 13, 2023
810273e
got a lil overzealous in deletes
dholms Jun 13, 2023
b228090
clean up unused cfg
dholms Jun 13, 2023
5ad2e09
clean up label table
dholms Jun 13, 2023
1ad57ba
simplify admin repo search query/logic
devinivy Jun 13, 2023
12cfdfd
tidy pds entrypoint
devinivy Jun 13, 2023
5172554
in-progress pds config changes
devinivy Jun 13, 2023
b7b3d60
cfg fiddling
dholms Jun 13, 2023
dcdeeaa
finish cleaning up cfg/ctx
dholms Jun 13, 2023
68a2daf
comments
dholms Jun 13, 2023
bde6307
building
dholms Jun 13, 2023
def6dc4
pds prefix on env
dholms Jun 13, 2023
03b4b88
test env
dholms Jun 13, 2023
8efa874
collapse pds migrations down into a single migration
devinivy Jun 13, 2023
27ab9e6
fix up dev-env
dholms Jun 13, 2023
906513d
tidy
dholms Jun 13, 2023
197d1a2
cleanup
dholms Jun 13, 2023
0c38164
fix pds admin tests
devinivy Jun 13, 2023
caf670d
fix handle test
dholms Jun 13, 2023
6632166
fix pds proxy tests
devinivy Jun 13, 2023
88e7de4
fix subscribe repos test
dholms Jun 13, 2023
8eb6cf6
fix sqlite config in pds tests
devinivy Jun 13, 2023
453c0d2
add sqlite clause in sequencer-leader
dholms Jun 13, 2023
b8d1f0f
fix actor search w/ sqlite on pds
devinivy Jun 13, 2023
9644851
Merge branch 'simplify-pds' of github.com:bluesky-social/atproto into…
devinivy Jun 13, 2023
853dc05
fixes
dholms Jun 13, 2023
4a5a7a4
fix dev env build
dholms Jun 13, 2023
61b77bc
update pds service entrypoint
devinivy Jun 13, 2023
a569bac
simple env example
dholms Jun 13, 2023
e555345
make takedown ids opaque identifiers in the pds
devinivy Jun 13, 2023
397b10b
use pds routes for api tests
dholms Jun 13, 2023
6863417
update pds dockerfile with volume and correct port env var
devinivy Jun 14, 2023
09095c8
add a couple env vars to example
dholms Jun 14, 2023
1077d87
add comments to env example
dholms Jun 14, 2023
8646d8d
@atproto/pds 0.2.0-beta.0
devinivy Jun 14, 2023
9c81f68
@atproto/aws 0.0.1-beta.0
devinivy Jun 14, 2023
e4da951
appview did
dholms Jun 14, 2023
89c412a
@atproto/aws 0.0.1
devinivy Jun 14, 2023
2d4fa3a
enable logs by default
dholms Jun 14, 2023
2c604c2
update env example
dholms Jun 14, 2023
a109e14
bugfixing sandbox issues
dholms Jun 15, 2023
78effb3
consistency in pds env var name for appview url
devinivy Jun 14, 2023
94a4fec
log on pds start and stop, configure version at runtime
devinivy Jun 14, 2023
ba609d8
@atproto/pds 0.2.0-beta.1
devinivy Jun 14, 2023
dc584ef
fix semver matching for pds beta version
devinivy Jun 14, 2023
5099be5
v0.2.0-beta.2
dholms Jun 15, 2023
719dfd6
default invites to being not required
dholms Jun 15, 2023
999e45a
fix flaky test
dholms Jun 15, 2023
9df4f35
Merge remote-tracking branch 'origin/main' into simplify-pds
devinivy Jun 16, 2023
3e0582a
limit db connections in tests
devinivy Jun 16, 2023
2ffca7b
publish 0.2.0-beta.d3
dholms Jun 20, 2023
2d04df1
Merge branch 'main' into simplify-pds
dholms Jun 20, 2023
a8bd59a
fix invite required parsing
dholms Jun 20, 2023
3752284
@atproto/pds 0.2.0-beta.5
devinivy Jun 20, 2023
e6db8e9
merge main
dholms Jun 29, 2023
c8f1d2e
Proxy getPopularFeedGenerators on simplified pds (#1222)
devinivy Jun 29, 2023
a17a589
big nasty merge
dholms Sep 14, 2023
2ecfe87
tidy migrations
dholms Sep 14, 2023
cd78e8a
fix service entry
dholms Sep 14, 2023
85fb95f
bump version
dholms Sep 14, 2023
c1cafd7
change auth order
dholms Sep 14, 2023
3a9d3aa
bump version
dholms Sep 14, 2023
d948ca6
bump version
dholms Sep 14, 2023
7f99cbf
add upgradeRepoVersion & fallback url for cdn
dholms Sep 15, 2023
4927150
bump version
dholms Sep 15, 2023
dc53474
merging
dholms Sep 26, 2023
8972adc
merge pds
dholms Sep 26, 2023
1351560
building dev-env
dholms Sep 26, 2023
08fde87
merging tests
dholms Sep 27, 2023
e6ec83b
merge service entry
dholms Sep 27, 2023
33db3db
test fixing
dholms Sep 27, 2023
a903798
merge
dholms Sep 27, 2023
701fba8
tidy
dholms Sep 27, 2023
660ad21
fix admin search
dholms Sep 27, 2023
0e4821c
tidy
dholms Sep 27, 2023
58d527b
tidy
dholms Sep 27, 2023
c3f4860
add snap for getListFeed
dholms Sep 27, 2023
1c30e8c
add backup nameserver cfg
dholms Sep 27, 2023
b2864ca
tidy + pr feedback
dholms Sep 28, 2023
75f3653
tidy
dholms Sep 28, 2023
5603a19
tidy env
dholms Sep 28, 2023
6dd27aa
bit more
dholms Sep 28, 2023
497d100
re-add dotenv to root package.json
dholms Sep 28, 2023
046f82c
merge
dholms Sep 28, 2023
fb75e28
fix dep
dholms Sep 28, 2023
20b97c2
build branch
dholms Sep 28, 2023
1134fd8
fix tests
dholms Sep 28, 2023
5b2f4d1
Refactor tests to make better use of dev-env (#1690)
dholms Sep 29, 2023
c7285a8
build pds correctly
dholms Sep 29, 2023
7506d5d
fix entry point
dholms Sep 29, 2023
3efaa1d
default logging to false (for now)
dholms Sep 29, 2023
d3e194f
format service entry
dholms Sep 29, 2023
f2d06c4
Switch takedown ids back to ints on pds distribution (#1694)
devinivy Sep 30, 2023
7e5920f
export moderation action reversal
dholms Oct 1, 2023
dc0360f
Merge branch 'main' into simplify-pds
dholms Oct 1, 2023
4fef68b
takedown tests
dholms Oct 1, 2023
fc193ac
dont build branch
dholms Oct 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build-and-push-bsky-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
- simplify-pds
env:
REGISTRY: ${{ secrets.AWS_ECR_REGISTRY_USEAST2_PACKAGES_REGISTRY }}
USERNAME: ${{ secrets.AWS_ECR_REGISTRY_USEAST2_PACKAGES_USERNAME }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-and-push-bsky-ghcr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
- simplify-pds
env:
REGISTRY: ghcr.io
USERNAME: ${{ github.actor }}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"eslint": "^8.24.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"get-port": "^6.1.2",
"jest": "^28.1.2",
"node-gyp": "^9.3.1",
"pino-pretty": "^9.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/bsky/tests/auto-moderator/takedowns.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe('takedowner', () => {
.where('uri', '=', post.ref.uriStr)
.select('takedownId')
.executeTakeFirst()
expect(recordPds?.takedownId).toEqual(modAction.id)
expect(recordPds?.takedownId).toEqual(modAction.id.toString())

expect(testInvalidator.invalidated.length).toBe(1)
expect(testInvalidator.invalidated[0].subject).toBe(
Expand Down Expand Up @@ -141,7 +141,7 @@ describe('takedowner', () => {
.where('uri', '=', res.data.uri)
.select('takedownId')
.executeTakeFirst()
expect(recordPds?.takedownId).toEqual(modAction.id)
expect(recordPds?.takedownId).toEqual(modAction.id.toString())

expect(testInvalidator.invalidated.length).toBe(2)
expect(testInvalidator.invalidated[1].subject).toBe(
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const enabledSystems = (process.env.LOG_SYSTEMS || '')

const enabledEnv = process.env.LOG_ENABLED
const enabled =
enabledEnv === 'true' || enabledEnv === 't' || enabledEnv === '1'
enabledEnv !== 'false' && enabledEnv !== 'f' && enabledEnv !== '0'

const level = process.env.LOG_LEVEL || 'info'

Expand Down
2 changes: 1 addition & 1 deletion packages/dev-env/src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const run = async () => {
const network = await TestNetwork.create({
pds: {
port: 2583,
publicUrl: 'http://localhost:2583',
hostname: 'localhost',
dbPostgresSchema: 'pds',
},
bsky: {
Expand Down
6 changes: 5 additions & 1 deletion packages/dev-env/src/network-no-appview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@ export class TestNetworkNoAppView {
const dbPostgresUrl = params.dbPostgresUrl || process.env.DB_POSTGRES_URL
const dbPostgresSchema =
params.dbPostgresSchema || process.env.DB_POSTGRES_SCHEMA
const dbSqliteLocation =
dbPostgresUrl === undefined ? ':memory:' : undefined

const plc = await TestPlc.create(params.plc ?? {})
const pds = await TestPds.create({
dbPostgresUrl,
dbPostgresSchema,
plcUrl: plc.url,
dbPostgresPoolSize: 5,
dholms marked this conversation as resolved.
Show resolved Hide resolved
dbSqliteLocation,
didPlcUrl: plc.url,
...params.pds,
})

Expand Down
5 changes: 3 additions & 2 deletions packages/dev-env/src/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ export class TestNetwork extends TestNetworkNoAppView {
port: pdsPort,
dbPostgresUrl,
dbPostgresSchema,
plcUrl: plc.url,
bskyAppViewEndpoint: bsky.url,
dbPostgresPoolSize: 5,
didPlcUrl: plc.url,
bskyAppViewUrl: bsky.url,
bskyAppViewDid: bsky.ctx.cfg.serverDid,
bskyAppViewModeration: true,
...params.pds,
Expand Down
116 changes: 49 additions & 67 deletions packages/dev-env/src/pds.ts
Original file line number Diff line number Diff line change
@@ -1,88 +1,70 @@
import path from 'node:path'
import os from 'node:os'
import getPort from 'get-port'
import * as ui8 from 'uint8arrays'
import * as pds from '@atproto/pds'
import { Secp256k1Keypair, randomStr } from '@atproto/crypto'
import { AtpAgent } from '@atproto/api'
import { Client as PlcClient } from '@did-plc/lib'
import { DAY, HOUR } from '@atproto/common-web'
import { PdsConfig } from './types'
import { uniqueLockId } from './util'

const ADMIN_PASSWORD = 'admin-pass'
const MOD_PASSWORD = 'mod-pass'
const TRIAGE_PASSWORD = 'triage-pass'

export class TestPds {
constructor(
public url: string,
public port: number,
public server: pds.PDS,
) {}

static async create(cfg: PdsConfig): Promise<TestPds> {
const repoSigningKey = await Secp256k1Keypair.create()
const plcRotationKey = await Secp256k1Keypair.create()
const recoveryKey = await Secp256k1Keypair.create()
static async create(config: PdsConfig): Promise<TestPds> {
const repoSigningKey = await Secp256k1Keypair.create({ exportable: true })
const repoSigningPriv = ui8.toString(await repoSigningKey.export(), 'hex')
const plcRotationKey = await Secp256k1Keypair.create({ exportable: true })
const plcRotationPriv = ui8.toString(await plcRotationKey.export(), 'hex')
const recoveryKey = (await Secp256k1Keypair.create()).did()

const port = cfg.port || (await getPort())
const port = config.port || (await getPort())
const url = `http://localhost:${port}`
const plcClient = new PlcClient(cfg.plcUrl)

const serverDid = await plcClient.createDid({
signingKey: repoSigningKey.did(),
rotationKeys: [recoveryKey.did(), plcRotationKey.did()],
handle: 'pds.test',
pds: `http://localhost:${port}`,
signer: plcRotationKey,
})

const config = new pds.ServerConfig({
debugMode: true,
version: '0.0.0',
scheme: 'http',

const blobstoreLoc = path.join(os.tmpdir(), randomStr(8, 'base32'))

const env: pds.ServerEnvironment = {
port,
hostname: 'localhost',
serverDid,
recoveryKey: recoveryKey.did(),
adminPassword: 'admin-pass',
moderatorPassword: 'moderator-pass',
triagePassword: 'triage-pass',
inviteRequired: false,
userInviteInterval: null,
userInviteEpoch: 0,
didPlcUrl: cfg.plcUrl,
didCacheMaxTTL: DAY,
didCacheStaleTTL: HOUR,
blobstoreDiskLocation: blobstoreLoc,
recoveryDidKey: recoveryKey,
adminPassword: ADMIN_PASSWORD,
moderatorPassword: MOD_PASSWORD,
triagePassword: TRIAGE_PASSWORD,
jwtSecret: 'jwt-secret',
availableUserDomains: ['.test'],
rateLimitsEnabled: false,
appUrlPasswordReset: 'app://forgot-password',
emailNoReplyAddress: '[email protected]',
publicUrl: 'https://pds.public.url',
dbPostgresUrl: cfg.dbPostgresUrl,
maxSubscriptionBuffer: 200,
repoBackfillLimitMs: 1000 * 60 * 60, // 1hr
serviceHandleDomains: ['.test'],
sequencerLeaderLockId: uniqueLockId(),
dbTxLockNonce: await randomStr(32, 'base32'),
bskyAppViewEndpoint: cfg.bskyAppViewEndpoint ?? 'http://fake_address',
bskyAppViewDid: cfg.bskyAppViewDid ?? 'did:example:fake',
bskyAppViewCdnUrlPattern: 'http://cdn.appview.com/%s/%s/%s',
...cfg,
})

const blobstore = new pds.MemoryBlobStore()
const db = config.dbPostgresUrl
? pds.Database.postgres({
url: config.dbPostgresUrl,
schema: config.dbPostgresSchema,
txLockNonce: config.dbTxLockNonce,
})
: pds.Database.memory()
await db.migrateToLatestOrThrow()

const server = pds.PDS.create({
db,
blobstore,
repoSigningKey,
plcRotationKey,
config,
})
repoSigningKeyK256PrivateKeyHex: repoSigningPriv,
plcRotationKeyK256PrivateKeyHex: plcRotationPriv,
inviteRequired: false,
...config,
}
const cfg = pds.envToCfg(env)
const secrets = pds.envToSecrets(env)

const server = await pds.PDS.create(cfg, secrets)

// Separate migration db on postgres in case migration changes some
// connection state that we need in the tests, e.g. "alter database ... set ..."
const migrationDb =
cfg.db.dialect === 'pg'
? pds.Database.postgres({
url: cfg.db.url,
schema: cfg.db.schema,
})
: server.ctx.db
await migrationDb.migrateToLatestOrThrow()
if (migrationDb !== server.ctx.db) {
await migrationDb.close()
}

await server.start()

Expand All @@ -100,10 +82,10 @@ export class TestPds {
adminAuth(role: 'admin' | 'moderator' | 'triage' = 'admin'): string {
const password =
role === 'triage'
? this.ctx.cfg.triagePassword
? TRIAGE_PASSWORD
: role === 'moderator'
? this.ctx.cfg.moderatorPassword
: this.ctx.cfg.adminPassword
? MOD_PASSWORD
: ADMIN_PASSWORD
return (
'Basic ' +
ui8.toString(ui8.fromString(`admin:${password}`, 'utf8'), 'base64pad')
Expand Down
6 changes: 3 additions & 3 deletions packages/dev-env/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export type PlcConfig = {
version?: string
}

export type PdsConfig = Partial<pds.ServerConfig> & {
plcUrl: string
export type PdsConfig = Partial<pds.ServerEnvironment> & {
didPlcUrl: string
migration?: string
}

Expand All @@ -29,6 +29,6 @@ export type TestServerParams = {
dbPostgresUrl: string
dbPostgresSchema: string
pds: Partial<PdsConfig>
plc: Partial<pds.ServerConfig>
plc: Partial<PlcConfig>
bsky: Partial<BskyConfig>
}
6 changes: 3 additions & 3 deletions packages/dev-env/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ export const mockResolvers = (idResolver: IdResolver, pds: TestPds) => {
const service = result?.service?.find((svc) => svc.id === '#atproto_pds')
if (typeof service?.serviceEndpoint === 'string') {
service.serviceEndpoint = service.serviceEndpoint.replace(
pds.ctx.cfg.publicUrl,
pds.ctx.cfg.service.publicUrl,
`http://localhost:${pds.port}`,
)
}
return result
}

idResolver.handle.resolve = async (handle: string) => {
const isPdsHandle = pds.ctx.cfg.availableUserDomains.some((domain) =>
handle.endsWith(domain),
const isPdsHandle = pds.ctx.cfg.identity.serviceHandleDomains.some(
(domain) => handle.endsWith(domain),
)
if (!isPdsHandle) return undefined

Expand Down
24 changes: 24 additions & 0 deletions packages/pds/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# See more env options in src/config/env.ts
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we merge this file with the existing packages/pds/example.dev.env? which gets auto-copied for use with make run-dev-pds. I'd otherwise be worried this .env.example will be hard to find (default hidden dotfile) and get stale.

If we did that, would need to ensure that the config actually works for local dev, instead of sandbox. I think just commenting out partial strings would work.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup yup that makes sense 👍

i actually forgot we already had an .env.example

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alright I actually removed the make run-dev-pds & make run-dev-bsky commands as well as their env files

Right now, the best way to run these services in dev is in the dev-env the packages themselves aren't set up very well with service entry files. So I also moved over the dotenv code to dev-env so that it's env can be adjusted

I don't think we were using those Make commands at all during development, but lmk if this affects your ability to develop.

In the future, it might be worth taking another pass at refactoring running each of theses services in dev mode

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do use those make commands fairly often, for the PDS and appview, distinct from dev-env. my workflow is basically to run make run-dev-* in a bunch of different terminals and a bunch of repos, while editing 1-2 code bases.

but I can try to get all that working in a follow-up PR, don't need to block this one on that side feature

# Hostname - the public domain that you intend to deploy your service at
PDS_HOSTNAME="example.com"

# Database config - use one or the other
PDS_DB_SQLITE_LOCATION="db.test"
# PDS_DB_POSTGRES_URL="postgresql://pg:password@localhost:5433/postgres"

# Blobstore - filesystem location to store uploaded blobs
PDS_BLOBSTORE_DISK_LOCATION="blobs"

# Private keys - these are each expected to be 64 char hex strings (256 bit)
PDS_REPO_SIGNING_KEY_K256_PRIVATE_KEY_HEX="3ee68..."
PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX="e049f..."

# Secrets - update to secure high-entropy strings
PDS_JWT_SECRET="jwt-secret"
PDS_ADMIN_PASSWORD="admin-pass"

# Environment - example is for sandbox
PDS_DID_PLC_URL="https://plc.bsky-sandbox.dev"
PDS_BSKY_APP_VIEW_ENDPOINT="https://api.bsky-sandbox.dev"
PDS_BSKY_APP_VIEW_DID="did:web:api.bsky-sandbox.dev"
PDS_CRAWLERS="https://bgs.bsky-sandbox.dev"
2 changes: 1 addition & 1 deletion packages/pds/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const buildShallow =

require('esbuild').build({
logLevel: 'info',
entryPoints: ['src/index.ts', 'src/bin.ts', 'src/db/index.ts'],
entryPoints: ['src/index.ts', 'src/db/index.ts'],
bundle: true,
sourcemap: true,
outdir: 'dist',
Expand Down
5 changes: 2 additions & 3 deletions packages/pds/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@atproto/pds",
"version": "0.1.19",
"version": "0.3.0-beta.3",
"license": "MIT",
"description": "Reference implementation of atproto Personal Data Server (PDS)",
"keywords": [
Expand All @@ -23,8 +23,6 @@
"codegen": "lex gen-server ./src/lexicon ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/*",
"build": "node ./build.js",
"postbuild": "tsc --build tsconfig.build.json",
"update-main-to-dist": "node ../../update-main-to-dist.js packages/pds",
"start": "node dist/bin.js",
"test": "../dev-infra/with-test-redis-and-db.sh jest",
"bench": "../dev-infra/with-test-redis-and-db.sh jest --config jest.bench.config.js",
"test:sqlite": "jest --testPathIgnorePatterns /tests/proxied/*",
Expand All @@ -34,6 +32,7 @@
},
"dependencies": {
"@atproto/api": "workspace:^",
"@atproto/aws": "workspace:^",
"@atproto/common": "workspace:^",
"@atproto/crypto": "workspace:^",
"@atproto/identity": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion packages/pds/src/api/app/bsky/actor/getProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function (server: Server, ctx: AppContext) {
handler: async ({ req, auth, params }) => {
const requester =
auth.credentials.type === 'access' ? auth.credentials.did : null
const res = await ctx.appviewAgent.api.app.bsky.actor.getProfile(
const res = await ctx.appViewAgent.api.app.bsky.actor.getProfile(
params,
requester ? await ctx.serviceAuthHeaders(requester) : authPassthru(req),
)
Expand Down
2 changes: 1 addition & 1 deletion packages/pds/src/api/app/bsky/actor/getProfiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function (server: Server, ctx: AppContext) {
auth: ctx.accessVerifier,
handler: async ({ auth, params }) => {
const requester = auth.credentials.did
const res = await ctx.appviewAgent.api.app.bsky.actor.getProfiles(
const res = await ctx.appViewAgent.api.app.bsky.actor.getProfiles(
params,
await ctx.serviceAuthHeaders(requester),
)
Expand Down
4 changes: 2 additions & 2 deletions packages/pds/src/api/app/bsky/actor/getSuggestions.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import AppContext from '../../../../context'
import { Server } from '../../../../lexicon'
import AppContext from '../../../../context'

export default function (server: Server, ctx: AppContext) {
server.app.bsky.actor.getSuggestions({
auth: ctx.accessVerifier,
handler: async ({ params, auth }) => {
const requester = auth.credentials.did
const res = await ctx.appviewAgent.api.app.bsky.actor.getSuggestions(
const res = await ctx.appViewAgent.api.app.bsky.actor.getSuggestions(
params,
await ctx.serviceAuthHeaders(requester),
)
Expand Down
1 change: 1 addition & 0 deletions packages/pds/src/api/app/bsky/actor/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Server } from '../../../../lexicon'
import AppContext from '../../../../context'

import getPreferences from './getPreferences'
import getProfile from './getProfile'
import getProfiles from './getProfiles'
Expand Down
6 changes: 3 additions & 3 deletions packages/pds/src/api/app/bsky/actor/searchActors.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import AppContext from '../../../../context'
import { Server } from '../../../../lexicon'
import AppContext from '../../../../context'

export default function (server: Server, ctx: AppContext) {
server.app.bsky.actor.searchActors({
auth: ctx.accessVerifier,
handler: async ({ auth, params }) => {
handler: async ({ params, auth }) => {
const requester = auth.credentials.did
const res = await ctx.appviewAgent.api.app.bsky.actor.searchActors(
const res = await ctx.appViewAgent.api.app.bsky.actor.searchActors(
params,
await ctx.serviceAuthHeaders(requester),
)
Expand Down
Loading