Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.

Conversation

@ristomcgehee
Copy link
Contributor

@ristomcgehee ristomcgehee commented Jan 15, 2024

Since in allowing custom strategies there are now more ways to misconfigure the SDK, I figured it would be good to create a dedicated function to initialize the SDK. This also improves the code by not having properties that don't get initialized in the constructor.

Setting "target": "es2017" to support top-level awaits.

Since I had issues when I made other PRs non-backwards compatible, I made this change backwards compatible. If you want to see how the code would look when we remove the public constructor, see 84a65e8. When I update server/ to use init() instead of the constructor, I will also remove the changes in 23f664a.

@ristomcgehee ristomcgehee marked this pull request as ready for review January 15, 2024 02:04
Copy link
Member

@cherbel cherbel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@cherbel cherbel merged commit f4e020f into protectai:main Jan 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants