New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@polywrap/client-config-builder-js

Package Overview
Dependencies
Maintainers
2
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polywrap/client-config-builder-js

Polywrap Javascript Client configuration

  • 0.9.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
103
increased by58.46%
Maintainers
2
Weekly downloads
 
Created
Source

PolywrapClient Config Builder

A DSL for building the PolywrapClient config object.

Supports building configs using method chaining or imperatively.

import { ClientConfigBuilder } from "@polywrap/client-config-builder-js";
import { PolywrapClient } from "@polywrap/client-js";

const config = new ClientConfigBuilder()
  .add({
    envs: [/*...*/],
    interfaces: [/*...*/],
    plugins: [/*...*/],
    redirects: [/*...*/],
    uriResolvers: [/*...*/],
  })
  .add({/*...*/})
  .build();

// ...

const builder = new ClientConfigBuilder();

builder.addDefaults();

builder.add({
  plugins: [/*...*/]
});

builder.add({
  envs: [/*...*/]
});

const config = builder.build();


// ...

let client = new PolywrapClient(config);

Methods

The config builder currently supports 3 methods:

add(config: Partial<ClientConfig>)

Appends each property of the supplied config object to the corresponding array of the builder's config.

addDefaults()

Adds the defaultClientConfig object.

build()

Returns a sanitized config object from the builder's config.

FAQs

Package last updated on 13 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc