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

Record.store(), Record.import(), and roles API support #385

Merged
merged 35 commits into from
Feb 2, 2024

Conversation

csuwildcat
Copy link
Member

First pass at PR

Copy link

codesandbox bot commented Jan 22, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@csuwildcat csuwildcat changed the title Store import roles Record.store(), Record.import(), and roles API support Jan 22, 2024
Copy link
Contributor

github-actions bot commented Jan 22, 2024

TBDocs Report

✅ No errors or warnings

@web5/api

  • Project entry file: packages/api/src/index.ts

TBDocs Report Updated at 2024-02-02T17:28:28Z f51f896

@frankhinek
Copy link
Contributor

@csuwildcat Node and one of the browser tests are failing. Can you look into why?

Copy link

codecov bot commented Jan 29, 2024

Codecov Report

Merging #385 (f51f896) into main (422ba93) will increase coverage by 1.35%.
Report is 1 commits behind head on main.
The diff coverage is 99.53%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #385      +/-   ##
==========================================
+ Coverage   91.90%   93.25%   +1.35%     
==========================================
  Files          67       77      +10     
  Lines       18241    23450    +5209     
  Branches     1550     1869     +319     
==========================================
+ Hits        16764    21869    +5105     
- Misses       1454     1542      +88     
- Partials       23       39      +16     
Components Coverage Δ
agent 88.72% <94.44%> (+0.01%) ⬆️
api 97.30% <100.00%> (+0.35%) ⬆️
common 98.67% <ø> (+0.10%) ⬆️
credentials 94.60% <ø> (∅)
crypto 93.76% <ø> (-0.85%) ⬇️
dids 97.35% <ø> (+5.10%) ⬆️
identity-agent 56.81% <ø> (ø)
crypto-aws-kms 100.00% <ø> (ø)
proxy-agent 58.43% <ø> (ø)
user-agent 55.22% <ø> (ø)

@LiranCohen LiranCohen requested a review from frankhinek February 1, 2024 01:22
@LiranCohen
Copy link
Member

@frankhinek Would love another run through and blessing from you.

There is more clean up to do, specifically I'd love to get rid of toJSON() completely in favor of the rawMessage getter.
I'd like to simplify the messageOptions as well for record creation and re-think some of this flow now that we have more context.

But I think this is in a good place to un-block some bugs. And do further cleanup in subsequent PRs.

Would also love feedback from the community and users if the import() and store() methods make sense from a dev-ex perspective.

@frankhinek frankhinek requested a review from LiranCohen February 2, 2024 17:21
@frankhinek
Copy link
Contributor

Would also love feedback from the community and users if the import() and store() methods make sense from a dev-ex perspective.

This is the biggest open question I still have. Something about import() still seems confusing but better to ship and get feedback than endless deliberate. We can always change it.

@LiranCohen LiranCohen merged commit c00b50c into main Feb 2, 2024
32 checks passed
@LiranCohen LiranCohen deleted the store-import-roles branch February 2, 2024 17:38
finn-block pushed a commit that referenced this pull request Mar 19, 2024
- Add `store()` method to the `api` `Record` class.
- Add `import()` method to the `api` `Record` class.

These now allow to import and store initial writes as well as the current state write in local and remote DWNs.
finn-block pushed a commit that referenced this pull request Mar 19, 2024
- Add `store()` method to the `api` `Record` class.
- Add `import()` method to the `api` `Record` class.

These now allow to import and store initial writes as well as the current state write in local and remote DWNs.
finn-block pushed a commit that referenced this pull request Mar 19, 2024
- Add `store()` method to the `api` `Record` class.
- Add `import()` method to the `api` `Record` class.

These now allow to import and store initial writes as well as the current state write in local and remote DWNs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants