Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@eng-automation/js

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eng-automation/js

Parity EngAutomation common code

  • 2.2.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
74
increased by15.63%
Maintainers
2
Weekly downloads
 
Created
Source

Introduction

This repository hosts shared functionality for OpsTooling projects.

GitHub Issue Sync

Docs

Docs deployed

Find the docs in paritytech.github.io/opstooling-js. They are deployed automatically.

Installation

Yarn: yarn add @eng-automation/js

NPM: npm install --save @eng-automation/js

Release

Trigger the Release workflow which will create a tag with the version passed as input.

CLI

This package adds opstooling-scripts executable, which is "umbrella" for arbitrary subcommands that we might want to share across projects.

See opstooling-scripts -h to get a list of available commands, also check out src/cli directory for sources

Adding new CLI command

  • define new command in src/cli/commands, use existing ones as example
  • add it to src/cli/main.ts
  • optionally, update this README.md file

opstooling-scripts generate-types

We utilize joi-to-typescript to define types together with validation schemas.

To add this functionality to a project:
  • define Joi schemas in src/schemas (see src/schemas in this repo as an example)
  • add src/types/generated folder for the generated types
  • call opstooling-scripts generate-types --schemas src/schemas --out src/types/generated to generate types (makes sense to add it to scripts in package.json)
  • add export * from "./types/generated" to src/types.ts if needed
  • commit generated types to repository
How to use generated types with validation
import { validate } from "opstooling-js"

import { YourType } from "#src/types"
import { YourTypeSchema } from "#src/schemas/YourTypeSchema"

const input: unknown = getSomeData()

const item = validate<YourType>(input, YourTypeSchema)

FAQs

Package last updated on 18 Jun 2024

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