* 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>
Packages
Applications
- PDS: The Personal Data Server (PDS). This is atproto's main server-side implementation.
- Dev Env: A command-line application for developers to construct and manage development environments.
- Lexicon CLI: A command-line application for generating code and documentation from Lexicon schemas.
Libraries
- API: A library for communicating with atproto servers.
- Common: A library containing code which is shared between atproto packages.
- Crypto: Atproto's common cryptographic operations.
- Syntax: A library for identifier syntax: NSID, AT URI, handles, etc.
- Lexicon: A library for validating data using atproto's schema system.
- Repo: The "atproto repository" core implementation (a Merkle Search Tree).
- XRPC: An XRPC client implementation.
- XRPC Server: An XRPC server implementation.
Benchmarking and profiling
Only applicable to packages which contain benchmarks(jest.bench.config.js
).
You can run benchmarks with pnpm bench
.
Attaching a profiler
Running pnpm bench:profile
will launch bench
with --inspect-brk
flag.
Execution will be paused until a debugger is attached, you can read more
about node debuggers here
An easy way to profile is:
- open
about://inspect
in chrome - select which process to connect to(there will probably only be one)
- go to performance tab
- press record, this will unpause execution
- wait for the benches to run
- finish recording