166 Commits

Author SHA1 Message Date
Daniel Holmgren
d6fd69d3a3
Rename pds (#266)
* clean up old todos

* some more cleanup

* rename server -> pds
2022-10-25 15:52:46 -05:00
Paul Frazee
feca3622c1
Rename ADX -> ATP (#244)
* Rename ADX to ATP

* Remove old docs (now in atproto website repo)

* Update readme

* Update README.md

Co-authored-by: devin ivy <devinivy@gmail.com>

* A couple of @ -> AT

Co-authored-by: devin ivy <devinivy@gmail.com>
2022-10-18 12:21:59 -05:00
Daniel Holmgren
60a537a6e4
MIT license (#241)
mit license errything
2022-10-17 13:20:06 -05:00
Daniel Holmgren
7a9d773e7e
Postbuild typecheck (#235)
* typecheck postbuild

* rm space

Co-authored-by: devin ivy <devinivy@gmail.com>

Co-authored-by: devin ivy <devinivy@gmail.com>
2022-10-12 20:03:43 -05:00
Daniel Holmgren
7f2dfb8d50
Switch TypeORM to Kysely (#229)
* kysely interfaces

* migrated record plugins

* db types + notifications

* index record emthods on db

* Convert author feed to kysely

* rest of db index

* Convert home feed to kysely

* Remove references to sqlite3 package

* Convert liked by view to kysely

* create tables

* Convert notif count view to kysely

* move scrypt to own file

* Fix typo

* Convert notifs view to kysely

* Convert post thread to kysely

* Convert profile view to kysely

* accounts tests passing!

* Convert reposted by view to kysely

* Convert followers view to kysely

* Convert follows view to kysely

* Convert notifs last seen to kysely

* Tidy

* Re-enable social methods

* Minor tidy of author and home feed queries

* Tidying and minor fixes for pds view queries

* fix up crud, disabled PUTs for now

* Fix profile view, use nulls in table interfaces

* Fix pds follow/follower views, remove special db date logic

* Fix pds notification count view

* Fix pds feed views, reposted by join

* Remove typeorm from server

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2022-10-11 13:39:11 -05:00
devin ivy
5a9c0e9058
Fix dev-env build, account for server's hbs templates (#218)
* Fix dev-env build, account for server's hbs templates

* Remove out-of-date comments
2022-10-06 16:02:17 -04:00
Daniel Holmgren
7233ce070f
Cleanup (#210)
* messing around w pino

* rework locals & add pino-http

* subsystem logging off env vars

* remove auth tokens from logs

* lots of logging

* re-enable tests

* update enabled check

* fix subsystem logging

* some quick cleanup
2022-10-05 17:55:08 -05:00
Daniel Holmgren
670c419c18
Plc auth lib integration (#195)
* parsing dids to something we understand

* revamping did-sdk with did-resolver

* testing

* fixing some thigns & finishing tests

* fix type error & remove old test

* wip

* create did on server & add email

* check username available & store email

* better test utils

* remove did:test

* allow authstore to sign for controlled dids

* plc ucan integration wip

* wip

* finished auth lib refactor

* integrating to repo & server

* couple fix ups

* couple more fixups

* disable dev-env test

* comments
2022-09-28 17:52:18 -05:00
Paul Frazee
dcba744dab
Various fixes related to integration with client software (#188)
* Refactor xrpc to use native fetch and be able to replace it (for react native)

* Factor out uri package

* Fixes to getPostThread

* Manually construct indexedAt and receivedAt timestamps to ensure theyre properly encoded
2022-09-23 11:33:26 -05:00
Paul Frazee
3a4e4c0759
Dev env tooling, server package restructuring, add did:test and *.test rules (#186)
* Add ServerConfig class

* Update todo.adx.resolveName spec to make name param optional

* Add .test username and did:test behaviors

* Document name/did resolution and the .test/did:test behaviors

* Move did:test registry into server config to share across servers in the dev env

* Rework the server package structure to make it easier to include as a library

* Fix dev-env build issues

* Give better error when repo API is called on an invalid DID

* Add mock data environment to dev-env
2022-09-22 13:34:46 -05:00
Paul Frazee
1425b0cd4f
New XRPC-based Server and API implementations (#180)
* Add xrpc-cli package; implement 'new' and 'gen-md' commands

* Add gen-ts-obj to xrpc-cli

* Add gen-api command to xrpc-cli

* Add gen-server to xrpc-cli

* Update codegen from xrpc-cli to run prettier and include a banner comment

* Use 'void' instead of 'undefined' for return type

* Skip invalid schemas when generating code

* Rewrite schemas package to use new simplified schema

* Output type definitions in nested folders

* Add record schema code-generation

* Change xrcp client call() signature to be easier to use

* Update client codegen to match new xrpc call signature

* Fixes and improvements to generated record APIs

* Update generated api to use per-service instances

* Add xrpc-cli readme

* (WIP) Rewrite server to use xrpc

* Add missing references to server/tsconfig.json

* Replace api implementation with xrpc generated client

* Add /schemas folder with todo.adx

* Add /schemas/todo.social

* Update api package to include todo.social xrpc and adx schemas

* Update server package to include todo.social xrpc and adx schemas

* Fix some schema definitions

* (WIP) Work toward xrpc update of server

* Update auth package to use nsids for collections

* Update repo package to use nsids for collections

* Update AdxUri to use nsid collection IDs

* Bring server CRUD tests to passing state

* Move API to simpler xrpc call signature

* Apply fixes and improvements to record apis

* Update to new generated api with per-service instances

* Rename the todo.social.* view methods

* Rewrite the views system to use xrpc

* Remove paths accidentally added to tsconfig

* Remove microblog package

* Add simple API readme

* todo about deduping ucan prfs

* increase postThread default depth to fix failing test. & fix USE_TEST_SERVER config

Co-authored-by: dholms <dtholmgren@gmail.com>
2022-09-20 17:39:05 -05:00
dholms
275c3df202 lock uint8arrays at 3.0.0 2022-09-13 15:16:57 -05:00
Paul Frazee
6283330c3c
Deprecate did:ion, replace did:key implementation, bring dev-env to a working state (#172)
* Remove 'key manager' service from dev-env

* Remove did:web service from dev-env

* Update dev-env to use new server api

* Replace node-fetch with axios

* Remove did:ion from did-sdk

* Disable did:key implementation in did-sdk and remove difficult upstream deps

* Fix dev-env build

* Fixes to dev-env and add user() env function

* Switch to a purely js-function REPL in the dev-env to simplify
2022-09-13 15:01:09 -05:00
Paul Frazee
8344867113
Remove deprecated packages: Auth-Lobby, Awake, Example-App, WS-Relay (#168)
* Remove deprecated packages: Auth-Lobby, Awake, Example-App, WS-Relay

* couple missed references & removed awake & application redirect code from @adxp/auth

Co-authored-by: dholms <dtholmgren@gmail.com>
2022-09-13 10:56:53 -05:00
Paul Frazee
fd08591933
API package (#148)
* WIP API branch squash

 * Cleanup

 * Add missing pieces of API package's api

 * Add locale support to schemas package

 * Add test for view schemas

 * Add validation to the view api

 * Add createViewValidator() to schemas

 * Add client-side schema validation to record CRUD ops

 * Add writes to API client

 * WIP make progress on the PDS API (server and client)

 * Add .collection and .recordKey to AdxUri

 * Move name-resolution code to common

 * Remove leftover imports

 * WIP progress on API client code-structure

 * More progress on API module

 * WIP: Refactor server routes

 * Update schemas to use the canonical name & id for keying

 * Fix a bug in the schemas readme

 * Schemas readme improvements

 * Add @adxp/schemas

 * Fix typo in AdxUri regex that allowed invalid characters in names

 * Remove accidental commit

 * WIP: Add @adxp/api package

 * WIP: add .mkuser to dev-env repl

 * Allow colons in the adx uri name section

 * Update did:web devenv server to allow overwriting dids

 * Add AdxUri utility class

* Move api and schemas packages to the packages folder

* Update schemas package to use new repo structure

* Update API package to use new build system

* Fix some merge conflicts that werent caught earlier

* Switch from .incompatible to .compatible

* Dont send authStore over the wire

* Quick patch - refactor followup (#153)

* patching ws-relay build

* added @babel/core

* fixed package exports (#154)

* Quick auth lobby fix (#155)

* readme update

* fixed up api build

* cleaned up uri tests

* api types

* fix old esm imports & temporarily remove server tests

Co-authored-by: Daniel Holmgren <dtholmgren@gmail.com>
2022-07-14 18:36:23 -05:00
Daniel Holmgren
a11c1754a2
Tooling refactor + @ucans/core integration (#152)
* revamp crypto lib

* reworkign ucan capabilities

* fixing up auth lib

* migrating to monorepo

* got jest working with esm

* tests & fixed CID parsing

* common tests up to date

* ported did-sdk

* cli + did:web hanging fix

* ported server

* poted example app

* working on server build

* server build working

* integrating dev-env

* patched up frontend scripts

* patching up cli & dev env build script

* docs & readme

* fixing up package.jsons

* wiped out unneeded dev deps
2022-07-08 11:41:55 -05:00