Sys Config Bundle
A collection of system-level configurations.
Bundle
import { loggerPlugin } from "@polywrap/logger-plugin-js";
import { dateTimePlugin } from "@polywrap/datetime-plugin-js";
import { concurrentPromisePlugin } from "@polywrap/concurrent-plugin-js";
import { httpPlugin } from "@polywrap/http-plugin-js";
import * as httpResolver from "./embeds/http-resolver/wrap";
export const bundle: Bundle = {
logger: {
uri: "plugin/logger@1.0.0",
package: loggerPlugin({}) as IWrapPackage,
implements: ["ens/wraps.eth:logger@1.0.0"],
redirectFrom: ["ens/wraps.eth:logger@1.0.0"],
},
datetime: {
uri: "plugin/datetime@1.0.0",
package: dateTimePlugin({}) as IWrapPackage,
implements: ["ens/wraps.eth:datetime@1.0.0"],
redirectFrom: ["ens/wraps.eth:datetime@1.0.0"],
},
concurrent: {
uri: "plugin/concurrent@1.0.0",
package: concurrentPromisePlugin({}) as IWrapPackage,
implements: ["ens/wraps.eth:concurrent@1.0.0"],
redirectFrom: ["ens/wraps.eth:concurrent@1.0.0"],
},
http: {
uri: "plugin/http@1.1.0",
package: httpPlugin({}) as IWrapPackage,
implements: ["ens/wraps.eth:http@1.1.0", "ens/wraps.eth:http@1.0.0"],
redirectFrom: ["ens/wraps.eth:http@1.1.0", "ens/wraps.eth:http@1.0.0"],
},
httpResolver: {
uri: "embed/http-uri-resolver-ext@1.0.1",
package: httpResolver.wasmPackage,
implements: [
"ens/wraps.eth:http-uri-resolver-ext@1.0.1",
ExtendableUriResolver.defaultExtInterfaceUris[0].uri,
],
redirectFrom: ["ens/wraps.eth:http-uri-resolver-ext@1.0.1"],
},
};
Node.JS
If you're using this package within Node.JS, you'll also have the following configurations:
import { fileSystemPlugin } from "@polywrap/file-system-plugin-js";
import * as fileSystemResolver from "./embeds/file-system-resolver/wrap";
export const bundle: Bundle = {
...Common.bundle,
fileSystem: {
uri: "plugin/file-system@1.0.0",
package: fileSystemPlugin({}) as IWrapPackage,
implements: ["ens/wraps.eth:file-system@1.0.0"],
redirectFrom: ["ens/wraps.eth:file-system@1.0.0"],
},
fileSystemResolver: {
uri: "embed/file-system-uri-resolver-ext@1.0.1",
package: fileSystemResolver.wasmPackage,
implements: [
"ens/wraps.eth:file-system-uri-resolver-ext@1.0.1",
ExtendableUriResolver.defaultExtInterfaceUris[0].uri,
],
redirectFrom: ["ens/wraps.eth:file-system-uri-resolver-ext@1.0.1"],
},
};
Polywrap Origin (0.11.0)
Features
@polywrap/core-js
:
- PR-6 Improved URI Inference
- Non-wrap URI schemes can now be used (ex:
https://domain.com/path
). The non-wrap scheme will be used as the authority, and all other contents will be shifted into the path. - Examples:
https://domain.com/path
into wrap://https/domain.com/path
ipfs://QmHASH
into wrap://ipfs/QmHASH
@polywrap/client-config-builder-js
:
- PR-45 Modular Config Bundles
- The
DefaultBundle
has been broken apart into two separate bundles: sys
and web3
. addBundle(...)
has been added to the ClientConfigBuilder
interface.addDefaults()
now calls addBundle("sys")
and addBundle("web3")
internally.
@polywrap/sys-config-bundle-js
:
- PR-45 Bundled System-Level Plugins & Resolvers
- The sys bundle includes:
logger
, datetime
, concurrent
, http
, httpResolver
- This package is compiled to run in both node.js and browsers.
- In node.js, the bundle also includes:
fileSystem
, fileSystemResolver
.
@polywrap/web3-config-bundle-js
:
- PR-45 Bundled Web3 Plugins & Resolvers
- The web3 bundle includes:
ethereumProviderV1
, ethereumProviderV2
, ipfsHttpClient
, ipfsResolver
, ensTextRecordResolver
, ensResolver
, ensIpfsContenthashResolver
.
@polywrap/config-bundle-types-js
:
- PR-45 Base Typings For Config Bundle Packages
- Valid config bundle packages are expected to export a
bundle
value, which is of type Bundle
.
Breaking Changes
@polywrap/client-config-builder-js
:
- PR-47 Renaming For Improved Accuracy
- Renamed
ClientConfigBuilder
to PolywrapClientConfigBuilder
- Renamed
IClientConfigBuilder
to ClientConfigBuilder
- Renamed
addWrapper(s)
to setWrapper(s)
- Renamed
addPackage(s)
to setPackage(s)
- Renamed
addRedirect(s)
to setRedirect(s)
@polywrap/core-js
:
- PR-32 Rename
getEnvFromUriHistory
to getEnvFromResolutionPath
Bugs
@polywrap/client-js
- PR-32 Improved Browser Compatability
- Building the JS client into browser-based applications no longer requires custom polyfills to remove Node.JS dependencies.
@polywrap/client-cofig-builder-js
- PR-37 Add
@polywrap/plugin-js
as a Dependency
- This resolves some package resolution warnings that are emitted from npm when installing the client-config-builder.
@polywrap/wasm-js
:
- PR-30 Properly Serialize Empty Wrap Environment
- The wrap environment was being improperly encoded as an empty object, which had a size > 0 bytes, causing deserialization to fail. This has been fixed and it is now an empty byte array with size of 0.