Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Polywrap Origin (0.10.0)
Features
Toolchain
polywrap
CLI:primaryJob
to deploy manifest and outputURI.txt
when runningpolywrap deploy
primaryJob
option in the deploy manifest identifies the name of the job that is used for the primary deployment. The URI that is emitted from theprimaryJob
will be output to aURI.txt
file next to the deploy manifest.polywrap create template
Commandpolywrap create template
command to the CLI, enabling users to provide a url to a template project.--watch
polywrap codegen --watch
which will automatically watch files within your project directory and re-run codegen whenever changes are detected.plugin/python
projects.plugin/rust
projects.--wrapper-envs
option, added to thebuild
,codegen
,docgen
, andtest
commands.wasm/
&interface/
projects can now include aresources:
directory, specified in thepolywrap.yaml
manifest. This resources directory will be copied into thebuild/
folder upon runninpolywrap build
. For example:-l, --log-file [path]
option has been added to all commands. Its purpose is to configure aLog file to save console output to
, useful in situations when the console log overflows.@polywrap/cli-js
:polywrap/cli-js
package to wrap thepolywrap
CLI with a JavaScript/TypeScript interface.@polywrap/polywrap-manifest-schemas
:0.3.0
of thePolywrapManifest
, which includes the newresources: string
field.@polywrap/polywrap-manifest-types-js
:0.3.0
of thePolywrapManifest
, which includes the newresources: string
field.@polywrap/schema-bind
:plugin/python
projects.wasm/rust
Bindings Now UseModuleTrait
Traitwasm/rust
wraps now generates aModuleTrait
trait that must be implemented for the rootModule
struct.wasm/assemblyscript
Bindings Now UseModuleBase
Interfacewasm/assemblyscript
wraps now generates aModuleBase
interface that must be extended by a rootModule
class.plugin/rust
projects.plugin-ts
bindings, thePluginModule
type is now imported fron@polywrap/plugin-js
instead of@polywrap/core-js
.@polywrap/schema-compose
:#import { Object, Module } from "wrap://..."
JS Client
@polywrap/client-js
:wrap://
URIs.wrap://ens/uniswap.wraps.eth:v3
wrap/
WrapError
structure, helping debug common client error scenarios.validate(uri, options)
method to thePolywrapClient
class, allowing users to guarantee the client can communicate with the provided wrapper located at the provided URI.@polywrap/client-config-builder-js
:wrap://ens/wraps.eth:ens-text-record-uri-resolver-ext@1.0.0
wrap://ens/wraps.eth:http-uri-resolver-ext@1.0.0
wrap://ens/wraps.eth:file-system-uri-resolver-ext@1.0.0
wrap://ens/wraps.eth:ens-uri-resolver-ext@1.0.0
wrap://ens/wraps.eth:ens-ipfs-contenthash-uri-resolver-ext@1.0.0
BuildOptions
to build method inIClientConfigBuilder
ipfs-http-client
@wrap://ens/wraps.eth:ipfs-http-client@1.0.0
async-ipfs-uri-resolver-ext
@wrap://ens/wraps.eth:async-ipfs-uri-resolver-ext@1.0.1
build(...)
method now accepts a single argument of typeBuildOptions
.wrap://ens/wrappers.polywrap.eth:concurrent@1.0.0
interface, and adds theconcurrent-plugin-js
package @wrap://plugin/concurrent
as an implementation.wrap://ens/wrappers.polywrap.eth:logger@1.0.0
interface, and adds the@polywrap/logger-plugin-js
package @wrap://plugin/logger
as an implementation.ens-text-record-resolver
to Default Config Bundleens-text-record-resolver
wrapper @wrap://ipfs/QmfRCVA1MSAjUbrXXjya4xA9QHkbWeiKRsT7Um1cvrR7FY
has been added to the default client config bundle. This resolver enables ENS, text-record based, WRAP URI resolution. The text-record's key must be prepended with thewrap/...
identifier. For example, the URIwrap://ens/domain.eth:foo
maps todomain.eth
'swrap/foo
text record. Thewrap/foo
text-record's value must contain another valid WRAP URI. For examples, see dev.polywrap.eth.addRedirects
,addWrappers
,addPackages
methods to theClientConfigBuilder
, so users can add many items at once.buildDefault
to theClientConfigBuilder
which builds aClientConfig
using default resolvers.@polywrap/plugin-js
:env
ToPluginModule
Invocation Method ArgumentsPluginModule
invocation methods will now be given anenv
the method's arguments.PluginPackage.from
.manifest
and aPluginModule
, or an inlinePluginModule
.@polywrap/uri-resolvers-js
:ResolutionResultCacheResolver
.WrapperCacheResolver
, which caches wrappers (URI => Wrapper), this resolver caches the result of the resolution process: URI, wrapper, package or error (URI => URI, URI => wrapper, URI => package, URI => error).RequestSynchronizerResolver
can be used to reuse parallel requests for the same URI, this way, only the first one needs to do the work (e.g. a network request) while others will await that same promise.StaticResolver
andStaticResolver.from
to optimize building resolvers withIUriRedirect
,IUriWrapper
andIUriPackage
.@polywrap/uri-resolver-extensions-js
:ExtendableUriResolver
has been updated to get uri-resolver-ext implementations from the following interface URIs:wrap://ens/wraps.eth:uri-resolver-ext@1.1.0
wrap://ens/wraps.eth:uri-resolver-ext@1.0.0
@polywrap/core-js
:WrapError
structure that improves debugging ability for common client error scenarios.GetImplementationsOptions
now accepts an optional resolution context, to be used to handle infinite recursion when a resolver usesgetImplementations
GetImplementationsOptions
now accepts an optionalapplyResolution
. This can be used to apply URI resolution to interfaces.@polywrap/logging-js
:@polywrap/logging-js
Package@polywrap/logging-js
package from the logging lib previously in the CLI's codebase.JS Plugins
@polywrap/http-plugin-js
:formData: [FormDataEntry!]
property on theRequest
object.Breaking Changes
Toolchain
polywrap
CLI:keepBuilder
option which is default to false and removed the previousremoveBuilder
option from the build manifest.typescript-node
&typescript-react
app templates, and replace them with a singletypescript
.polywrap.meta.yaml
manifest.--client-config
option has a new function entrypoint signature. Instead of exporting agetCustomConfig
function, users should export the following:configure(builder: IClientConfigBuilder): IClientConfigBuilder
.run
totest
run
command totest
, which uses thetest
project extension, as defined in thepolywrap.test.yaml
manifest file.config
section from test manifestpolywrap.test.yaml
) has been upgraded to version0.2.0
with the following change:config
section insidestep
has been removed, and manifest migrations will warn the user regarding this change.@polywrap/schema-bind
wasm/rust
Bindings Now UseModuleTrait
Traitimpl ModuleTrait for Module
.wasm/assemblyscript
Bindings Now UseModuleBase
Interfaceclass Module
whichextends ModuleBase
.@polywrap/test-env-js
test-env-js
package has been deprecated, in favor of@polywrap/cli-js
JS Client
@polywrap/client-js
:PolywrapClient
PolywrapClient
now simply accepts aCoreClientConfig
, which is expected to come from the config builder.client.query(...)
&client.subscribe(...)
methods.PolywrapClient
config when usingnoDefaults: true
no longer acceptsredirects
(Since redirects have been removed fromCoreClientConfig
).noDefaults: false
no longer accepts aplugins
field, but it acceptswrappers
andpackages
.resolver
field has been replaced withresolvers
, since with default client the resolver used is theRecursiveResolver
with thePackageToWrapperCacheResolver
.noDefaults: true
, no longer accepts aplugins
field. It is expected that devs using this option will manually configure their own resolver.getPlugins
andgetPluginByUri
. Will addgetWrapper
,getWrapperByUri
,getPackage
,getPackageByUri
, in a follow up PR.createPolywrapClient
function has been deprecated.PolywrapClient
's constructor now accepts only an optionalCoreClientConfig
type as its configuration object.ClientConfigBuilder
found in@polywrap/client-config-builder-js
and exported by@polywrap/client-js
in order to set up their client configurations.@polywrap/client-config-builder-js
:BuilderConfig
ObjectClientConfigBuilder
now uses a specificBuilderConfig
that is easier for users to work with. It will then be turned into aCoreClientConfig
through the use of thebuild()
method.ClientConfigBuilder.build()
buildCoreConfig()
tobuild()
, which returns aCoreClientConfig
instance.wrap://ens/http.polywrap.eth
interface and wrapper have been removed from the default configuration bundle.wrap://ens/logger.core.polywrap.eth
interface and thewrap://ens/js-logger.polywrap.eth
plugin wrapper have both been removed from the default configuration bundle.wrap://ens/ethereum.polywrap.eth
URI + wrap has been removed from the default configuration bundle.wrap://ens/ipfs.polywrap.eth
&wrap://ens/ipfs-resolver.polywrap.eth
URIs + wraps have been removed from the default configuration bundle.buildCoreConfig
no longer returns aCoreClientConfig
with redirects since redirects are no longer a part ofCoreClientConfig
.removeUriRedirect(...)
toremoveRedirePR-15e
pluginsand a
resolver, but now has
wrappers,
packagesand
resolvers`CustomClientConfig
, which can be used with defaults from thePolywrapClient
, but can not be used ifnoDefaults: true
is passed to thePolywrapClient
constructor.addPlugin
from theClientConfigBuilder
, users can now useaddWrapper
oraddPackage
where appropriate.@polywrap/plugin-js
:env
Property FromPluginModule
PluginModule
instances no longer have anenv
property, and instead will be given anenv
within the invocation method's arguments.@polywrap/core-js
:CoreClientConfig
nowReadonlyUriMap
s for itsinterface
andenv
properties.redirects
are no longer a part ofCoreClientConfig
.getRedirects
are no longer a part ofCoreClient
.getUriResolver
onCoreClient
has been renamed togetResolver
.getImplementations
returns a promise now.GetImplementationsOptions
no longer acceptsapplyRedirects
. This has been replaces withapplyResolution
.applyRedirects
helper function has been replaced withapplyResolution
.UriRedirect
toIUriRedirect
to matchIUriWrapper
andIUriPackage
IUriRedirect
,IUriWrapper
andIUriPackage
are now generic and their generic param implementsUri | string
options
argument fromclient.getManifest
method since all wrappers have a deserialized manifest@polywrap/uri-resolvers-js
:PackageToWrapperCacheResolver
Into Two ResolversPackageToWrapperCacheResolver
has been split into thePackageToWrapperResolver
&WrapperCacheResolver
resolvers.LegacyRedirectsResolver
has been removed.buildUriResolver
withUriResolver.from
RecursiveResolver
andPackageToWrapperCacheResolver
now accept a concreteIUriResolver
while their staticfrom
methods accept aUriResolverLike
PluginsResolver
andPluginResolver
, users can now useWrapperResolver
orPackageResolver
@polywrap/uri-resolver-extensions-js
:ExtendableUriResolver
no longer supports the legacy interface URIwrap://ens/uri-resolver.core.polywrap.eth
.@polywrap/react
:plugins
on thePolywrapProvider
withwrappers
andpackages
JS Plugins
@polywrap/http-plugin-js
:@polywrap/fs-plugin-js
:@polywrap/ws-plugin-js
:@polywrap/ethereum-plugin-js
:@polywrap/ipfs-plugin-js
:Interface Wrappers
@polywrap/http-interface
:@polywrap/file-system-interface
:Bugs
Toolchain
polywrap
CLI:polywrap build
On Interface Projectstype: interface
projects, the CLI no longer requires docker to be running.polywrap test
Non-Zero Exit Codespolywrap test
now exits with an exit code of 1 if a test fails.polywrap.build.yaml
manifest'slinked_packages
property.test
command.wasm-interface-types
custom section, as a result of running wasm-bindgen. More information can be found here.asc
Usingnpx
asc
usingnpx
to help with program resolution.--client-config
option.@polywrap/schema-bind
:plugin/typescript
andapp/typescript
bindings now properly export all interfaces.wasm/rust
bindings now useString
instead ofstr
within imported interface module typings.JS Client
@polywrap/core-js
:WrapError
now correctly parses Rust unwrap errors.unwrap()
on a Rust result that contains an error, Rust will panic with an error message that contains the Err. For fidelity to the original Err, Rust inserts escape characters in the string. For example, "\n" becomes "\n". This behavior was not being handled correctly by WrapError's string parsing logic.@polywrap/uri-resolvers-extensions-js
:null
URI Resolver Extension Return ResultsMaybeUriOrManifest
&getFile
interfaces to properly reflect the URI resolver extension interface.Templates
@polywrap/templates
:https://ipfs.wrappers.io
gateway to the interface template'spolywrap.deploy.yaml
manifest.