@polywrap/http-plugin-js
Advanced tools
Changelog
Polywrap Origin (0.10.0)
polywrap
CLI:
primaryJob
to deploy manifest and output URI.txt
when running polywrap 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 the primaryJob
will be output to a URI.txt
file next to the deploy manifest.polywrap create template
Command
polywrap 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 the build
, codegen
, docgen
, and test
commands.wasm/
& interface/
projects can now include a resources:
directory, specified in the polywrap.yaml
manifest. This resources directory will be copied into the build/
folder upon runnin polywrap build
. For example:
format: 0.3.0
project:
type: interface | wasm/...
...
source:
...
resources: ./resources
-l, --log-file [path]
option has been added to all commands. Its purpose is to configure a Log file to save console output to
, useful in situations when the console log overflows.@polywrap/cli-js
:
polywrap/cli-js
package to wrap the polywrap
CLI with a JavaScript/TypeScript interface.@polywrap/polywrap-manifest-schemas
:
0.3.0
of the PolywrapManifest
, which includes the new resources: string
field.@polywrap/polywrap-manifest-types-js
:
0.3.0
of the PolywrapManifest
, which includes the new resources: string
field.@polywrap/schema-bind
:
plugin/python
projects.wasm/rust
Bindings Now Use ModuleTrait
Trait
wasm/rust
wraps now generates a ModuleTrait
trait that must be implemented for the root Module
struct.wasm/assemblyscript
Bindings Now Use ModuleBase
Interface
wasm/assemblyscript
wraps now generates a ModuleBase
interface that must be extended by a root Module
class.plugin/rust
projects.plugin-ts
bindings, the PluginModule
type is now imported fron @polywrap/plugin-js
instead of @polywrap/core-js
.@polywrap/schema-compose
:
#import { Object, Module } from "wrap://..."
@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 the PolywrapClient
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 in IClientConfigBuilder
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 type BuildOptions
.wrap://ens/wrappers.polywrap.eth:concurrent@1.0.0
interface, and adds the concurrent-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 Bundle
ens-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 the wrap/...
identifier. For example, the URI wrap://ens/domain.eth:foo
maps to domain.eth
's wrap/foo
text record. The wrap/foo
text-record's value must contain another valid WRAP URI. For examples, see dev.polywrap.eth.addRedirects
, addWrappers
, addPackages
methods to the ClientConfigBuilder
, so users can add many items at once.buildDefault
to the ClientConfigBuilder
which builds a ClientConfig
using default resolvers.@polywrap/plugin-js
:
env
To PluginModule
Invocation Method Arguments
PluginModule
invocation methods will now be given an env
the method's arguments.PluginPackage.from
.
manifest
and a PluginModule
, or an inline PluginModule
.@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
and StaticResolver.from
to optimize building resolvers with IUriRedirect
, IUriWrapper
and IUriPackage
.@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 uses getImplementations
GetImplementationsOptions
now accepts an optional applyResolution
. 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.@polywrap/http-plugin-js
:
formData: [FormDataEntry!]
property on the Request
object.polywrap
CLI:
keepBuilder
option which is default to false and removed the previous removeBuilder
option from the build manifest.typescript-node
& typescript-react
app templates, and replace them with a single typescript
.polywrap.meta.yaml
manifest.--client-config
option has a new function entrypoint signature. Instead of exporting a getCustomConfig
function, users should export the following: configure(builder: IClientConfigBuilder): IClientConfigBuilder
.run
to test
run
command to test
, which uses the test
project extension, as defined in the polywrap.test.yaml
manifest file.config
section from test manifest
polywrap.test.yaml
) has been upgraded to version 0.2.0
with the following change:
config
section inside step
has been removed, and manifest migrations will warn the user regarding this change.@polywrap/schema-bind
wasm/rust
Bindings Now Use ModuleTrait
Trait
impl ModuleTrait for Module
.wasm/assemblyscript
Bindings Now Use ModuleBase
Interface
class Module
which extends ModuleBase
.@polywrap/test-env-js
test-env-js
package has been deprecated, in favor of @polywrap/cli-js
@polywrap/client-js
:
PolywrapClient
PolywrapClient
now simply accepts a CoreClientConfig
, which is expected to come from the config builder.client.query(...)
& client.subscribe(...)
methods.PolywrapClient
config when using noDefaults: true
no longer accepts redirects
(Since redirects have been removed from CoreClientConfig
).noDefaults: false
no longer accepts a plugins
field, but it accepts wrappers
and packages
.
resolver
field has been replaced with resolvers
, since with default client the resolver used is the RecursiveResolver
with the PackageToWrapperCacheResolver
.noDefaults: true
, no longer accepts a plugins
field. It is expected that devs using this option will manually configure their own resolver.getPlugins
and getPluginByUri
. Will add getWrapper
, getWrapperByUri
, getPackage
, getPackageByUri
, in a follow up PR.createPolywrapClient
function has been deprecated.PolywrapClient
's constructor now accepts only an optional CoreClientConfig
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
Object
ClientConfigBuilder
now uses a specific BuilderConfig
that is easier for users to work with. It will then be turned into a CoreClientConfig
through the use of the build()
method.ClientConfigBuilder.build()
buildCoreConfig()
to build()
, which returns a CoreClientConfig
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 the wrap://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 a CoreClientConfig
with redirects since redirects are no longer a part of CoreClientConfig
.removeUriRedirect(...)
to removeRedirePR-15e
pluginsand a
resolver, but now has
wrappers,
packagesand
resolvers`CustomClientConfig
, which can be used with defaults from the PolywrapClient
, but can not be used if noDefaults: true
is passed to the PolywrapClient
constructor.addPlugin
from the ClientConfigBuilder
, users can now use addWrapper
or addPackage
where appropriate.@polywrap/plugin-js
:
env
Property From PluginModule
PluginModule
instances no longer have an env
property, and instead will be given an env
within the invocation method's arguments.@polywrap/core-js
:
CoreClientConfig
now ReadonlyUriMap
s for its interface
and env
properties.redirects
are no longer a part of CoreClientConfig
.getRedirects
are no longer a part of CoreClient
.getUriResolver
on CoreClient
has been renamed to getResolver
.getImplementations
returns a promise now.GetImplementationsOptions
no longer accepts applyRedirects
. This has been replaces with applyResolution
.applyRedirects
helper function has been replaced with applyResolution
.UriRedirect
to IUriRedirect
to match IUriWrapper
and IUriPackage
IUriRedirect
, IUriWrapper
and IUriPackage
are now generic and their generic param implements Uri | string
options
argument from client.getManifest
method since all wrappers have a deserialized manifest@polywrap/uri-resolvers-js
:
PackageToWrapperCacheResolver
Into Two Resolvers
PackageToWrapperCacheResolver
has been split into the PackageToWrapperResolver
& WrapperCacheResolver
resolvers.LegacyRedirectsResolver
has been removed.buildUriResolver
with UriResolver.from
RecursiveResolver
and PackageToWrapperCacheResolver
now accept a concrete IUriResolver
while their static from
methods accept a UriResolverLike
PluginsResolver
and PluginResolver
, users can now use WrapperResolver
or PackageResolver
@polywrap/uri-resolver-extensions-js
:
ExtendableUriResolver
no longer supports the legacy interface URI wrap://ens/uri-resolver.core.polywrap.eth
.@polywrap/react
:
plugins
on the PolywrapProvider
with wrappers
and packages
@polywrap/http-plugin-js
:
@polywrap/fs-plugin-js
:
@polywrap/ws-plugin-js
:
@polywrap/ethereum-plugin-js
:
@polywrap/ipfs-plugin-js
:
@polywrap/http-interface
:
@polywrap/file-system-interface
:
polywrap
CLI:
polywrap build
On Interface Projects
type: interface
projects, the CLI no longer requires docker to be running.polywrap test
Non-Zero Exit Codes
polywrap test
now exits with an exit code of 1 if a test fails.polywrap.build.yaml
manifest's linked_packages
property.test
command.wasm-interface-types
custom section, as a result of running wasm-bindgen. More information can be found here.asc
Using npx
asc
using npx
to help with program resolution.--client-config
option.@polywrap/schema-bind
:
plugin/typescript
and app/typescript
bindings now properly export all interfaces.wasm/rust
bindings now use String
instead of str
within imported interface module typings.@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 Results
MaybeUriOrManifest
& getFile
interfaces to properly reflect the URI resolver extension interface.@polywrap/templates
:
https://ipfs.wrappers.io
gateway to the interface template's polywrap.deploy.yaml
manifest.