1Password / onepassword-sdk-js

The official JavaScript SDK for 1Password
https://developer.1password.com/docs/sdks/
MIT License
41 stars 2 forks source link

Refactor SDK Client and Examples #5

Closed AndyTitu closed 7 months ago

AndyTitu commented 7 months ago

This PR refactors the code and refines a few configurations:

How to test

jodyheavener commented 7 months ago

With this project being split up into multiple packages (client, examples) I would probably expect that we should set up workspaces. This is common for repos containing multiple packages, so projects can effectively cross-link dependencies, and so that someone working in the repo can perform actions (like installing dependencies, building, testing, etc) from the top-level directory. Check our workspaces for npm.

AndyTitu commented 7 months ago

With this project being split up into multiple packages (client, examples) I would probably expect that we should set up workspaces. This is common for repos containing multiple packages, so projects can effectively cross-link dependencies, and so that someone working in the repo can perform actions (like installing dependencies, building, testing, etc) from the top-level directory. Check our workspaces for npm.

Added the workspaces! Modified the "how to test" section to more easily run the project

Marton6 commented 7 months ago

Did a user test and it works well. It does not call into the actual sdk-core or error just yet, but it seems to be calling the correct functions.

Marton6 commented 7 months ago

Manually tested the finalizer and it seems to be called correctly.

Marton6 commented 7 months ago

Manually tested again, still works. But now I get an IDE error on the finalization registry:

Cannot find name 'FinalizationRegistry'.

AndyTitu commented 7 months ago

Manually tested again, still works. But now I get an IDE error on the finalization registry:

Cannot find name 'FinalizationRegistry'.

This is odd. Have you tried restarting the typescript service, or just recompiling? That fixed it for me last time I encountered that.