# buildstamp

> Buildstamp JS/TS API

Latest version **3.5.0** (published 2024-10-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install buildstamp
pnpm add buildstamp
yarn add buildstamp
bun add buildstamp
```

Provides the command `buildstamp`.

## Health

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

Positive: esm support; no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads; no types.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 3.5.0 |
| Published | 2024-10-06 |
| First published | 2020-09-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=16 |
| Dependencies | 1 |
| Unpacked size | 32.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 3 |
| Author | Anton Golub |
| Maintainers | antongolub, qiwibot |
| Keywords | build-info, buildstamp |

## Links

- npm: https://www.npmjs.com/package/buildstamp
- Repository: https://github.com/qiwi/buildstamp
- Homepage: https://github.com/qiwi/buildstamp#readme
- Issues: https://github.com/qiwi/buildstamp/issues
- npm.io page: https://npm.io/package/buildstamp

## Dependencies (1)

- [minimist](https://npm.io/package/minimist.md) ^1.2.8

## Recent versions

- 3.5.0 (latest) — 2024-10-06
- 3.4.0 — 2024-07-04
- 3.3.2 — 2023-10-06
- 3.3.1 — 2023-09-11
- 3.3.0 — 2023-07-02
- 3.2.0 — 2023-07-01
- 3.1.0 — 2023-07-01
- 3.0.3 — 2023-06-30
- 3.0.2 — 2023-06-30
- 3.0.1 — 2023-06-30
- 3.0.0 — 2023-06-30
- 2.1.4 — 2023-06-27
- 2.1.2 — 2023-06-27
- 2.1.1 — 2023-01-03
- 2.1.0 — 2022-09-20
- … 15 more at https://npm.io/package/buildstamp/versions

## README

# buildstamp
> A small utility for gathering build details

# Install
```bash
yarn add buildstamp
# or
npm i buildstamp
```

## Usage
### JS/TS API
```ts
import {buildstamp} from '@qiwi/buildstamp'

await buildstamp({
  output: 'buildstamp.json',  // filepath or `console` or `false` to disable
  git: true,                  // to capture git digest
  ci: true,                   // to collect basic CICD info
  date: true,                 // to attach the current iso8601 date
  extra: {                    // Object.assign mixin
    foo: 'bar'
  }
})
// returns a plain object, so you're able to process it in any way
```

### CLI
```shell
npx buildstamp --output='buildstamp.json' --extra='{"foo": "bar"}'
```

| Flag             | Description                 | Default           | 
|------------------|-----------------------------|-------------------|
| `--output`, `-o` | Buildstamp file destination | `buildstamp.json` |
| `--cwd`          | Working directory           | `process.cwd()`   |
| `--git`          | Collect git info            | `true`            |
| `--ci`           | Capture CI digest           | `true`            |
| `--date`         | Attach ISO8601 date         | `true`            |
| `--safe`         | Suppress errors             | `false`           |
| `--extra`        | JSON mixin to inject        | `{}`              |
| `--help`         | Print help info             |                   |               

# License
[MIT](./LICENSE)

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