Skip to content

Remove plugin types from client and core #1259

Closed

Description

@nerfZael

Plugin types and all mention of plugins should be removed from client-js and core-js packages.
After they URI resolution refactor and the addition of PackageResolver they can now be treated as WrapPackages which can be registered in a resolver array.

Instead of this:

const client = new PolywrapClient({
 plugins: [
        {  
            uri: "ens/ethereum.polywrap.eth",
            plugin: ethereumPlugin({ connections })
        },
      ]
});

We should be able to do this:

const client = new PolywrapClient({
 resolver: UriResolver.from([
        {  
            uri: "ens/ethereum.polywrap.eth",
            package: ethereumPlugin({ connections })
        },
      ]
  )
});

NOTE: UriResolver.from is not implemented, currently it is implemented in the form of the buildUriResolver func, but UriResolver.from is more readable.

Overriding plugins can be moved to the config builder in the form of "packages"

Activity

  1. added this to the origin-qa milestone on Sep 20, 2022
  2. self-assigned this
    on Oct 4, 2022
  3. linked a pull request that will close this issuePlugin refactor #1236on Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions