We need to create a new package (suggested name: @soothe/vault-schemas) where we are going to place the validation schemas and enums (like SupportedProtocols) used by Soothe Vault.
Why is this needed?
In the vault package we have schemas that we need to reuse in the extension (Soothe Vault) but we can't import it directly from the vault because we use them in the content scripts.
If we import them from the vault we will make the content scripts a lot bigger (size) and inject unnecessary code to the websites.
Another solution: Instead of doing the validation of the payloads of the requests from the websites in the Proxy make then in the Background (specifically in the External controller).
We need to create a new package (suggested name:
@soothe/vault-schemas) where we are going to place the validation schemas and enums (like SupportedProtocols) used by Soothe Vault.Why is this needed?
In the vault package we have schemas that we need to reuse in the extension (Soothe Vault) but we can't import it directly from the vault because we use them in the content scripts.
If we import them from the vault we will make the content scripts a lot bigger (size) and inject unnecessary code to the websites.
Another solution: Instead of doing the validation of the payloads of the requests from the websites in the
Proxymake then in theBackground(specifically in theExternalcontroller).