# @turbot/guardrails-fn

> Guardrails Fn.

Latest version **5.1.0** (published 2025-12-18) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @turbot/guardrails-fn
pnpm add @turbot/guardrails-fn
yarn add @turbot/guardrails-fn
bun add @turbot/guardrails-fn
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 5.1.0 |
| Published | 2025-12-18 |
| First published | 2024-12-11 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 18 |
| Unpacked size | 47.4 KB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Turbot HQ, Inc |
| Maintainers | e-gineer, vhadianto, priguha93, abhina07 |

## Links

- npm: https://www.npmjs.com/package/@turbot/guardrails-fn
- Repository: https://github.com/turbot/guardrails-fn
- Homepage: https://github.com/turbot/guardrails-fn#readme
- Issues: https://github.com/turbot/guardrails-fn/issues
- npm.io page: https://npm.io/package/@turbot/guardrails-fn

## Dependencies (18)

- [got](https://npm.io/package/got.md) 11.8.6
- [tmp](https://npm.io/package/tmp.md) 0.2.5
- [url](https://npm.io/package/url.md) 0.11.1
- [async](https://npm.io/package/async.md) ^3.2.3
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [rimraf](https://npm.io/package/rimraf.md) 3.0.2
- [archiver](https://npm.io/package/archiver.md) 5.3.0
- [fs-extra](https://npm.io/package/fs-extra.md) 10.0.0
- [@turbot/log](https://npm.io/package/@turbot/log.md) 5.5.0
- [@turbot/sdk](https://npm.io/package/@turbot/sdk.md) 5.16.0
- [extract-zip](https://npm.io/package/extract-zip.md) 2.0.1
- [@turbot/utils](https://npm.io/package/@turbot/utils.md) 5.6.0
- [@turbot/errors](https://npm.io/package/@turbot/errors.md) 5.3.0
- [stream-buffers](https://npm.io/package/stream-buffers.md) 3.0.2
- [@aws-sdk/client-kms](https://npm.io/package/@aws-sdk/client-kms.md) 3.649.0
- [@aws-sdk/client-sns](https://npm.io/package/@aws-sdk/client-sns.md) 3.649.0
- [@turbot/sns-validator](https://npm.io/package/@turbot/sns-validator.md) 5.0.3
- [@turbot/guardrails-aws-sdk-v3](https://npm.io/package/@turbot/guardrails-aws-sdk-v3.md) 5.0.1

## Recent versions

- 5.1.0 (latest) — 2025-12-18
- 5.0.5 — 2025-09-25
- 5.0.4 — 2025-04-14
- 5.0.3 — 2025-04-09
- 5.0.2 — 2025-02-24
- 5.0.1 — 2024-12-11

## README

# @turbot/guardrails-fn

Turbot wrapper for control functions.

## Install

    npm install --save @turbot/guardrails-fn

## Usage

This package returns a function with the signature expected by AWS Lambda for node. It should
be assigned to the handler entry point for the control.

    const tfn = require("@turbot/guardrails-fn");
    exports.control = tfn((turbot, $, callback) => {
      // your code here
    });

## Test mode

If `TURBOT_TEST` is truthy then the function will be run in test mode:

- Input should be passed directly (no SNS message wrapper)
- The callback results will be `{ turbot: {/*data*/}, result: {/*data*/} }`.
- Commands will not be published to SNS.

---
_Source: https://npm.io/package/@turbot/guardrails-fn · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
