1996 Commits

Author SHA1 Message Date
Daniel Holmgren
1ef6da191b
Pass along hitsTotal and cursor from searchPostsSkeleton (#1857)
pass along hitsTotal and cursor from searchPostsSkeleton
2023-11-15 15:31:14 -06:00
Daniel Holmgren
599cb449b5
Bugfix: don't pass the viewer as a param to searchPosts skeleton (#1855)
dont pass the viewer as a param to searchPosts skeleton
2023-11-14 22:18:47 -06:00
Daniel Holmgren
a434d586dd
Add searchPosts api to appview (#1845)
* proxy search posts to search service

* add search posts proxy

* tidy

* add type annotations
2023-11-14 18:14:22 -06:00
Daniel Holmgren
74b7fdf754
Randomize suggestions (#1844)
* randomize suggestions

* fix snap

* cursor fix

* pr feedback
2023-11-14 18:14:08 -06:00
Foysal Ahamed
697f5d3627
Expose emailConfirmedAt field from admin getRepo (#1757)
*  Expose emailConfirmedAt field from admin getRepo

* ♻️ Fix typing for repo result

* 🧹 Cleanup unnecessary import

*  Adapt to the new pds based get account info method

* 🧹 Cleanup unused pds util
2023-11-08 00:26:31 +01:00
devin ivy
bebc4bac8c
Simplify moderation fanout to configured url (#1804)
* simplify moderation fanout to configured url

* fix bsky mod fanout tests
2023-11-05 00:33:14 -04:00
Daniel Holmgren
a3d81dd911
Prevent thread loops (#1813)
* prevent thread loops

* include original uri

* tidy

* tweak

* last tweak

* last tweak i swear

* wording
2023-11-03 16:55:50 -05:00
Eric Bailey
bba9388ea9
Add a test for links that end in .php (#1810) 2023-11-02 17:29:27 -05:00
github-actions[bot]
b90f2c4ef8
Version packages (#1808)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-02 16:30:44 -04:00
devin ivy
772736a010
Add did doc output to getSession for session resumption (#1806)
* add optional did doc output to getSession lexicon

* add did doc output to getSession on pds, update client to use it

* api test fixes

* api changeset

* tidy
2023-11-02 16:16:26 -04:00
github-actions[bot]
3598898c03
Version packages (#1802)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-02 19:58:57 +00:00
dan
b5a77babdb
Adjust types to use LexiconDoc (#1807) 2023-11-02 19:51:40 +00:00
bnewbold
84e2d4d2b6
Update atproto source license to MIT/Apache2 (#1788)
* update LICENSE files to MIT/Apache2

* README: update top-level license

* update package-level READMEs with license

* changeset: license update
2023-11-02 00:45:13 -07:00
Daniel Holmgren
cf848e87ab
Tweak schemas for entryway createAccount (#1797)
* tweak scheams

* require email & password
2023-11-01 14:56:57 -05:00
devin ivy
a161f815de
Make plc op unknown object rather than bytes (#1792)
make plc op unknown object rather than bytes
2023-11-01 11:54:00 -04:00
dan
cae59094c7
Don't validate known lexicons at runtime (#1790)
* Make lexicon validation DEV-only

* Apply code review suggestions
2023-11-01 15:42:37 +00:00
devin ivy
8637c367fe
Respect updated service auth keys (#1765)
* bust key cache when verifying service auth

* unit tests for xrpc auth

* fix

* support option for verifying non-low-s signatures

* fix verifyJwt tests
2023-10-31 18:09:02 -04:00
devin ivy
2df6f2b836
Support S3-compatible credentials for pds blobstore (#1787)
* support s3 credentials for pds blobstore

* tidy
2023-10-31 00:00:00 -04:00
YOCKOW
b28fdb2ca4
PDS: Allow configuring non-AWS S3 blob storage. (#1729)
* PDS: Allow configuring non-AWS S3 blob storage.

See https://github.com/bluesky-social/atproto/issues/1583

* tidy

---------

Co-authored-by: devin ivy <devinivy@gmail.com>
2023-10-30 19:27:36 -04:00
Daniel Holmgren
fcb19c9c51
Simplify PDS moderation (#1723)
* spec out new simple pds mod routes

* introduce new admin state endpoints

* wire up routes

* clean up pds

* revoke refresh tokens

* getUserAccountInfo

* pr tidy

* fixing some tests

* fixing up more tests

* fanout takedowns to pds

* fanout admin reqs to pds

* tidy

* more tidy & add more pds moderation tests

* getUserAccountInfo -> getAccountInfo

* dont hydrate pds info on searchRepos

* fix build

* port admin tests to bsky package

* clean up old snaps

* tests on fanout

* tweak naming

* missed a rename

* tidy renames

* fix lex name

* tidy & move snap

* fix build

* cleanup repeat process all

* skip actor search test

* fix bday paradox

* tidy up pds service auth

* rm skipped test

* retry http

* tidy

* improve fanout error handling

* fix test

* return signing key in did-web

* more tests

* tidy serivce auth checks

* change takedownId col to takedownRef

* build branch

* fix bsky test

* add service key to indexer

* move signing key to api entry

* dont build
2023-10-30 16:56:17 -05:00
bnewbold
ec0dfdc8f5
lexicon: maximum report "reason" length of 1000 chars (graphemes) (#1171)
* lexicon: maximum report length of 500 chars (graphemes)

* lexicon: bump maximum report size to 1000 chars

* lexicon: bump max report size again to 2k graphemes

* make codegen
2023-10-30 09:28:42 -07:00
github-actions[bot]
ea04096b02
Version packages (#1774)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-27 14:51:50 -04:00
Paul Frazee
9c98a5baaf
Modlist updates: add "blockingByList" information and some utility functions to the sdk (#1779)
* Add blockingByList to app.bsky.actor.defs#viewerState

* Add blocking-by-list behaviors to moderation sdk

* Add modlist helper functions to bsky-agent

* codegen

* hydrate blockingByList in profile viewer state

* ignore self-mutes and self-blocks in read path

* format

* changeset

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2023-10-27 14:35:36 -04:00
devin ivy
46b108cb86
Facilitate authing w/ PDS based on DID doc (#1727)
* lexicon for did doc w/ auth credentials

* include did doc w/ session when configured. configure on dev-env.

* Add dynamic PDS URL adoption to the client

* remove usage of did doc field from getsession in client

* dry-up did doc type and validation

* remove explicit dep on zod by identity package

* move more did doc parsing to common-web

* go back to strings

* rollback breaking changes to identity package

* add changeset

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Co-authored-by: dholms <dtholmgren@gmail.com>
2023-10-26 18:29:51 -04:00
devin ivy
696df1e488
Lexicons to support bring-your-own-did w/ per-repo signing keys (#1739)
* lexicons for per-repo signing keys

* fix

* rename lexicon

* fix filename

* rename getSigningKey to reserveSigningKey
2023-10-26 17:15:12 -04:00
Daniel Holmgren
bb039d8e4c
Dedupe did cache refreshes (#1773)
* dedupe refreshes to did cache

* handle expired cache entries as well

* apply in pds as well

* changeset
2023-10-25 15:53:08 -05:00
devin ivy
ce28725e17
Insert to did cache using excluded column (#1772)
insert to did cache using exclude
2023-10-25 15:00:17 -04:00
bnewbold
ed33f64821
pds: add GROUP BY on cid for listBlobs endpoint (#1761)
Co-authored-by: Devin Ivy <devinivy@gmail.com>
2023-10-24 18:56:34 -04:00
devin ivy
825b2a003e
Miscellaneous query optimizations on appview (#1766)
* split-up record fetching for notifs

* simplify query for author posts with media

* avoid hitting actor_handle_tgrm_idx when fetching actor by handle
2023-10-24 13:07:44 -04:00
Daniel Holmgren
41221091dc
Prevent clashing redis namespaces in tests (#1764)
prevent bday paradox in tests
2023-10-24 09:46:37 -05:00
Daniel Holmgren
f710d45458
Dont dump stacktrace in http logger middleware (#1753)
* dont dump stacktrace in http logger middleware

* build branch

* dont build

* do in appview as well

* build branch again

* dont build
2023-10-23 13:55:05 -05:00
Daniel Holmgren
995b42e753
Fix CI Issues (#1763)
* use axios

* normalize docker output
2023-10-23 13:49:28 -05:00
Daniel Holmgren
2af3f6c783
Fix read after write on threads when posting a media embed (#1749)
fix read after write on threads when posting a media embed
2023-10-19 16:11:03 -05:00
Daniel Holmgren
44ea5e80fa
Split apart auth grant & verification (#1743)
* transition to auth verifier

* tidy

* quick test fix
2023-10-13 11:43:44 -05:00
Daniel Holmgren
d425061179
Fix test seed & snap (#1733)
fix test seed & snap
2023-10-11 10:26:00 -05:00
Paul Frazee
2e10a1854c
Fix typo in bsky test: purpose is #modlist not #blocklist (#1726)
Fix typo: purpose is #modlist not #blocklist
2023-10-10 19:42:11 -04:00
bnewbold
982633225c
make lint (#1703)
* make lint

* Update packages/api/tests/rich-text-detection.test.ts

Co-authored-by: Eric Bailey <git@esb.lol>

---------

Co-authored-by: Eric Bailey <git@esb.lol>
2023-10-09 22:24:53 -07:00
Daniel Holmgren
4bf61c5f95
Enable updateEmail with no token & no app password (#1715)
* dont allow updateEmail with an app password

* re-enable email updates
2023-10-09 13:46:32 -05:00
bnewbold
94ce5c10e9
syntax: disallow .example and .alt TLDs (#1714) 2023-10-05 18:08:22 -07:00
Feroz Salam
326d849691
Trim whitespace when processing dids (#1299)
* Trim whitespace when processing dids

I had some issues when enabling a custom domain using the .well-known file method
because of the EOL character – as the code currently stands, any `did` followed
by an EOL character is passed for verification as:

```
"responseBody": {
  "did": "<did>\n"
}
```

The presence of the trailing newline character leads to the user receiving the
error "The server gave an invalid response and may be out of date". I solved
the issue by removing the EOL character from my `did` file, but it would be
neater if this was done for the user.

Signed-off-by: Feroz Salam <feroz.salam@isovalent.com>

* Update did handling based on PR feedback

- Read the file in text, strip out non-ASCII chars
- Read in the first line of the file and strip any remaining newline characters

* identity: don't remove non-ASCII characters

simplifies what we are normalizing: just take the first line and strip whitespace, don't try to remove any non-ASCII characters as well.

---------

Signed-off-by: Feroz Salam <feroz.salam@isovalent.com>
Co-authored-by: bnewbold <bnewbold@robocracy.org>
2023-10-05 11:37:24 -07:00
devin ivy
88a23d4b70
Add support for a bunny CDN img invalidator (#1689)
* add support for a bunny.net img invalidator

* tidy

* support multiple image invalidators

* tidy
2023-10-05 12:20:36 -04:00
Daniel Holmgren
8853bc174a
Add rev to sync.listRepos (#1709)
add rev to listRepos
2023-10-04 18:46:57 -05:00
Daniel Holmgren
27a8dee2af
Sequencer backfill cursor fix (#1708)
* fix

* tidy

* make tests
2023-10-04 14:17:21 -05:00
Foysal Ahamed
26538a733e
Send HTML content in email (#1589)
*  Send HTML content in email

*  Use html-to-text plugin for moderation mailer transport

* type fix

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2023-10-03 11:17:48 -04:00
Foysal Ahamed
647ca6a910
Let admins see post thread even when the author blocks them (#1678)
*  Let admins see post thread even when the author blocks them

* ♻️ Refactor requester check
2023-10-03 11:01:43 -04:00
dholms
7d1e3b25e6 update time on email tokens 2023-10-02 15:32:39 -05:00
Daniel Holmgren
d664b51c64
Finalize PDS in-process AppView removal (#1198)
* rm tables

* rm event-stream & proxied

* Remove appview services, move label service to pds

* only proxy appview stuff

* delete more tables

* Start removing message dispatched from pds

* more syncing-up removal of message dispatcher in pds

* merged

* remove feedgens from pds, remove getPopular

* remove unused image helper from pds

* fixing compiler errors

* clean up sharp

* rm label service

* first pass on cleaning up tests

* fix up a bunch of tests

* moderation view tests

* last admin tests

* got a lil overzealous in deletes

* clean up unused cfg

* clean up label table

* simplify admin repo search query/logic

* tidy pds entrypoint

* in-progress pds config changes

* cfg fiddling

* finish cleaning up cfg/ctx

* comments

* building

* pds prefix on env

* test env

* collapse pds migrations down into a single migration

* fix up dev-env

* tidy

* cleanup

* fix pds admin tests

* fix handle test

* fix pds proxy tests

* fix subscribe repos test

* fix sqlite config in pds tests

* add sqlite clause in sequencer-leader

* fix actor search w/ sqlite on pds

* fixes

* fix dev env build

* update pds service entrypoint

* simple env example

* make takedown ids opaque identifiers in the pds

* use pds routes for api tests

* update pds dockerfile with volume and correct port env var

* add a couple env vars to example

* add comments to env example

* @atproto/pds 0.2.0-beta.0

* @atproto/aws 0.0.1-beta.0

* appview did

* @atproto/aws 0.0.1

* enable logs by default

* update env example

* bugfixing sandbox issues

* consistency in pds env var name for appview url

* log on pds start and stop, configure version at runtime

* @atproto/pds 0.2.0-beta.1

* fix semver matching for pds beta version

* v0.2.0-beta.2

* default invites to being not required

* fix flaky test

* limit db connections in tests

* publish 0.2.0-beta.d3

* fix invite required parsing

* @atproto/pds 0.2.0-beta.5

* Proxy getPopularFeedGenerators on simplified pds (#1222)

proxy getPopularFeedGenerators on pds

Co-authored-by: dholms <dtholmgren@gmail.com>

* tidy migrations

* fix service entry

* bump version

* change auth order

* bump version

* bump version

* add upgradeRepoVersion & fallback url for cdn

* bump version

* merging

* merge pds

* building dev-env

* merging tests

* merge service entry

* test fixing

* tidy

* fix admin search

* tidy

* tidy

* add snap for getListFeed

* add backup nameserver cfg

* tidy + pr feedback

* tidy

* tidy env

* bit more

* re-add dotenv to root package.json

* fix dep

* build branch

* fix tests

* Refactor tests to make better use of dev-env (#1690)

* refactor pds tests to use dev env

* refactor bsky tests

* fix pds test

* tidy bsky tests

* build pds correctly

* fix entry point

* default logging to false (for now)

* format service entry

* Switch takedown ids back to ints on pds distribution (#1694)

* switch takedown ids back to ints, consistent with live pds

* tidy/fix migration

* update migration for sqlite

* export moderation action reversal

* takedown tests

* dont build branch

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2023-10-02 13:27:45 -05:00
devin ivy
3b65224c80
Fix writing duplicate blocks in sync.getRepo (#1699)
fix writing duplicate blocks in sync.getRepo
2023-10-01 14:09:34 -05:00
Daniel Holmgren
cef38e3db3
Add missing record cursor indices (#1693)
add missing record cursor inddices
2023-09-29 14:53:07 -05:00
devin ivy
feb994a178
Fix cursor on with-friends to hit index (#1692)
* fix cursor on with-friends to hit index

* build

* remove build
2023-09-29 14:02:48 -04:00