2067 Commits

Author SHA1 Message Date
Daniel Holmgren
ee68e6977b
Pds Did integration (#190)
* 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
2022-09-28 17:36:53 -05:00
Paul Frazee
6b47ad7622
Add better cursor pagination behavior to getFeed (#196) 2022-09-28 17:33:18 -05:00
Paul Frazee
a21417ba91
Improved XRPC error protocol (#194)
* Add lexicon doc

* Update error-handling spec

* Implement new error-behaviors in xrpc and xrpc-server packages

* Update lexicon and lex-cli packages to add xrpc error behaviors

* Generate new API and test an error behavior
2022-09-28 11:55:43 -05:00
Paul Frazee
31bd54e69c
More client integration updates (#192)
* Update dev-env to use new authorization system

* Add did and name to createSession response body

* Handle not found in getProfile api

* Stop putting a timestamp in the generated code, ffs

* Add todo.adx.getAccountsConfig

* Remove timestamps from schema codegen
2022-09-27 12:32:17 -05:00
Daniel Holmgren
257b906bdf
Did sdk revamp (#189)
* parsing dids to something we understand

* revamping did-sdk with did-resolver

* testing

* fixing some thigns & finishing tests

* fix type error & remove old test
2022-09-27 09:33:30 -05:00
Daniel Holmgren
100319f59e
Bump ucans to stable version (#191)
Bump UCANs to stable version
2022-09-26 18:55:54 -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
Daniel Holmgren
1d136eba17
JWT auth (#187)
* setting up auth

* sticking auth on all the routes

* fixed up tests

* add util.getAuthstore fn

* rm fixed TODO

* use nodes native scrypt
2022-09-23 11:11:16 -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
735e201028
Rename the generated-code folder in the server package (#185) 2022-09-21 11:56:43 -05:00
Daniel Holmgren
55e6e54fcf
Did PLC (#181)
* validate the signatures
add the id to the did doc
pid from sha256 of oragin doc
added the tick to diffs extractor
added the key authorisation
add lots of types
add routes for calling the aic
refactor to jest based repo structure

* WIP

* migrate the tests

* more test fixes

* test.

* replace snake case with camel case

* moved to use isolated server for aic

* remove the aic test from the PDS

* clean up some changes outside the aic folder

* fix CaS for saving ticks

* rearange the folder

* missed  one

* cleaned up aic package.json

* broken build

* test passing

* prettier

* pid tests refactor

* fix eslint/prettier setup, add eslint-config-prettier

* misc linting and style tweaks in aic

* minor touchups to aic sign/verify

* tidy error-handling in aic

* tidy-up crypto init in aic

* add aic route for getting a did doc, update /tick routes

* knex -> typeorm

* refactor crypto

* error handling & dependencies

* switching op model & some other cleanup

* change db to use operations

* add cid references to ops & ensure no branching in DB tx

* cleaning up

* rotues

* working on client & tests

* document & oepration tests

* server tests

* cleanup

* remove lobby page & static

* formatting did documents

* aic/pch -> plc

* fixing up some doc semantics

* tooling/test server

* added recovery window

* tx mutex

* test on document formatting

* take validate op out of write tx

* error handling

* readme

* couple bug fixes

* quick readme edit

Co-authored-by: Aaron Goldman <aaron@aarons-mbp.lan>
Co-authored-by: Aaron D Goldman <aaron@blueskyweb.xyz>
Co-authored-by: Devin Ivy <devin@bigroomstudios.com>
2022-09-20 21:28:00 -05:00
Paul Frazee
357072fe18
Update schemas to use lexicon (got missed in broken branch) (#184) 2022-09-20 18:19:38 -05:00
Paul Frazee
f67626e5f2
Unify schemas under lexicon package (#183)
Unify schemas under lexicon package; remove schemas package; rename xrpc-cli to lex-cli
2022-09-20 18:08:30 -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
Paul Frazee
c15f71b17c
XRPC CLI (code and doc generator) (#179)
* 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
2022-09-20 17:13:54 -05:00
Paul Frazee
6b72878319
Rename fedrpc to xrpc; implement xrpc and xrpc-server packages (#178)
* Rename fedrpc to xrpc; implement xrpc and xrpc-server packages

* Add json-schema validation to xrpc

* Add xrpc and xrpc-server to base tsconfig.json

* Fix type signature
2022-09-19 15:58:09 -05:00
Paul Frazee
f5b83b947b
Add NSID package (#177)
* Add NSID package

* Move NSID functions to static methods

* NSID - Expect authorities to be at least 2 segments long
2022-09-19 15:53:39 -05:00
Paul Frazee
d4f0185995
More docs improvements (#176)
* Rename http-routes to wire-protocol and (again) rewrite the swagger-to-md generator

* Add initial repo spec

* Add field paths to adx uri spec

* Add initial schemas spec

* Add specs/fedrpc.md

* Add specs/nsid.md

* Deprecate specs/wire-protocol.md and remove surrounding tooling

* Some doc cleanup

* Fix to nsid grammar

* Reorg docs

* Replace specs/wire-protocol.md with specs/adx/methods.md

* New proposed name resolution algorithm

* Update specs/adx/uri-scheme.md to use nsids

* Expand specs/adx/repo.md, merge schemas doc into repo, add some placeholder docs

* Add specs/README.md

* Doc tweaks

* More doc tweaks

* Document NSID authority model

* Small docs fixes
2022-09-15 14:21:40 -05:00
Paul Frazee
0681c958a2
Add docs generator and improve http-routes.md generation (#175) 2022-09-13 18:17:48 -05:00
Paul Frazee
d2969b49f8 Small doc tweaks 2022-09-13 17:11:57 -05:00
Daniel Holmgren
70c7b978aa
Merge pull request #173 from bluesky-social/lock-uint8arrays
Lock uint8arrays
2022-09-13 17:06:00 -05:00
Paul Frazee
c7949698ff
Additional documentation updates (#174)
* Re-arrange docs and cut old material from readme

* Add initial specs: ADX URI, HTTP Routes, and Name Resolution

* Requested doc updates
2022-09-13 16:14:39 -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
Daniel Holmgren
a54f204d8d
Merge pull request #171 from bluesky-social/common-tests
Fixed up common & repo tests
2022-09-13 11:21:24 -05:00
dholms
c9a6609b93 fixed up common & repo tests 2022-09-13 11:15:56 -05:00
Paul Frazee
d247f7c218
Fix: remove references to some removed files (#170) 2022-09-13 10:59:14 -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
cd431c58c8
Add some readmes (#169) 2022-09-13 10:54:56 -05:00
Daniel Holmgren
00d691d70f
Merge pull request #167 from bluesky-social/repo-package
Split out repo package
2022-09-13 08:54:01 -05:00
Daniel Holmgren
a47f1c85b4
Merge pull request #162 from bluesky-social/pds-api
PDS revamp
2022-09-13 08:53:40 -05:00
dholms
2eead19f87 set parent for postThread & removed hardcode 2022-09-13 08:50:17 -05:00
dholms
b629e00154 one more in dev-env 2022-09-12 21:19:34 -05:00
dholms
935481c566 missed a couple of type updates 2022-09-12 21:18:08 -05:00
dholms
d5fe1880ff fix up api package as well 2022-09-12 21:14:14 -05:00
dholms
ed0bddfb2d update server with new repo package 2022-09-12 21:12:37 -05:00
dholms
22f069f5d3 cleaning up dependencies 2022-09-12 21:07:06 -05:00
dholms
94babb38b7 split common and repo out into separate packages 2022-09-12 21:01:56 -05:00
dholms
978fcaeeb9 bit more cleanup 2022-09-12 16:11:54 -05:00
dholms
159e123fe3 remove setParent 2022-09-12 16:01:39 -05:00
dholms
550136f05c cleanup 2022-09-12 15:58:25 -05:00
dholms
1cb552a46b bit of cleanup 2022-09-12 13:44:05 -05:00
dholms
1815bbe07d port schemas over 2022-09-12 12:46:07 -05:00
dholms
efe3f622b7 run test server from within test suite 2022-09-12 12:35:24 -05:00
dholms
d79c637223 tests badges 2022-09-09 17:00:11 -05:00
dholms
0d26b59d56 tests for likedBy & repostedBy views 2022-09-09 16:03:28 -05:00
dholms
dad56e802f crud tests 2022-09-09 15:25:36 -05:00
dholms
3ef39fe34a adding post entities 2022-09-09 10:50:49 -05:00
dholms
9b4c958d50 one more schema update 2022-09-08 19:31:59 -05:00
dholms
77bc793345 better tests 2022-09-08 19:20:26 -05:00