@genapi/shared

v4.1.0

Published

<!-- automd:badges -->

Readme

@genapi/shared

npm version npm downloads

Shared types and utilities for GenAPI: config types, AST statement types, inject/provide context, etc.

Installation

pnpm add @genapi/shared

API

Inject

inject(scope)

Gets the current pipeline context for the given scope (default: 'default'). Used inside pipeline steps to read config/graphs.

Example:

const { configRead, interfaces } = inject()
const config = inject('get/user/1')

ApiPipeline

  • Type: undefined
  • Default: undefined

context

  • Type: any
  • Default: {}

provide()

License

MIT


🤖 auto updated with automd