open-index/open-npm huggingface dataset:
npm package: @snomiao/bun-init
Description: To install dependencies:
Author: snomiao
Latest version: 0.0.5

# main

To install dependencies:

```bash
bun install
```

To run:

```bash
bun run index.ts
```

This project was created using `bun init` in bun v1.1.20. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
npm package: @snomiao/caddy-baron
Description: Downloads the Caddy binary for use in npx scripts
Author: Ian Baron
Latest version: 3.0.4

# caddy-baron

```
npm i -D caddy-baron
```

Downloads the latest Caddy binary for use in npm/npx scripts

- Downloads the latest version of Caddy
- Use with concurrent or npm-run-all to run Caddy in parallel with your application, eg:

````
"scripts": {
    "caddy": "caddy run --config Caddyfile",
    "local-https": "node server.js",
    "dev": "run-p caddy local-https",
}
````

# example Caddyfile
```
dev.localhost {
    handle /api/* {
        reverse_proxy localhost:3000
    }
    handle {
        reverse_proxy localhost:4000
    }
}
```
npm package: @snomiao/die
Description: || DIE('reason') Throws an error like PHP 's `OR DIE('REASON')`, Simple error throwing in a functional dev style.
Author: snomiao
Latest version: 1.7.0

# PHPDIE aka @snomiao/die

`|| DIE('reason')` Throws an error like PHP's `or DIE('REASON')`, Simple error throwing in a functional dev.

## Usage

```js
import DIE from 'phpdie'
const token = process.env.TOKEN ?? DIE("Missing Token")

console.log(token) // typeof token === "string"


```

## DIES Function

The `DIES` function allows you to call an alert function (like `alert`, `console.error`, `toast.error`, etc.) and then throw an error. This is useful for showing error messages to users before terminating execution.

```js
import { DIES } from '@snomiao/die'

const ooops = false

// With alert
ooops || DIES(alert, "Something went wrong!");

// With console.error
ooops || DIES(console.error, "Error:", 404, "Not Found");

// With toast notifications
ooops || DIES(toast.error, "Failed to save data");

// With custom alert function
const showError = (msg) => { /* show error in UI */ };
ooops || DIES(showError, "Custom error message");

ooops || DIES(()=> 'anyway die');

```

The `DIES` function:
- Calls the provided alert function with the given arguments
- Throws an Error with message "DIES" and the arguments stored in the `cause` property
- Never returns (return type is `never`)

## Reference

### spec

```js
import DIE from ".";

it("lives", () => {
  const token = "123" ?? DIE("Missing Token");
  console.log(token);
  expect(token).toEqual("123");
});

it("dies", () => {
  let err: any;
  try {
    const token = process.env.TOKEN ?? DIE("Missing Token");
    console.log(token);
  } catch (e) {
    err = e;
  }
  expect(err).toEqual("Missing Token");
});

it("dies with error", () => {
  let err: any;
  try {
    const token = process.env.TOKEN ?? DIE(new Error("Missing Token"));
    console.log(token);
  } catch (e) {
    err = e;
  }
  expect(err.message).toEqual("Missing Token");
});


```

### Impl

```ts
export function DIE(reason?: string | Error): never {
    if (typeof reason === "string") {
        const err = new Error(reason);
        throw err.stack;
    }
    throw reason;
}
```
npm package: @snomiao/setup-semantic-release
Description: setup semantic-release for your project
Author: snomiao
Latest version: 1.2.0

# @snomiao/setup-semantic-release

A tool to automatically set up semantic-release for your JavaScript/TypeScript projects.

[![npm version](https://badge.fury.io/js/@snomiao%2Fsetup-semantic-release.svg)](https://www.npmjs.com/package/@snomiao/setup-semantic-release)
[![license](https://img.shields.io/npm/l/@snomiao/setup-semantic-release)](https://github.com/snomiao/sno-setup-semantic-release/blob/main/LICENSE)

## Features

- ✅ Sets up [semantic-release](https://github.com/semantic-release/semantic-release)
- ✅ Configures [Husky](https://typicode.github.io/husky/) git hooks
- ✅ Adds GitHub Actions workflow for automated releases
- ✅ Easy one-command setup process

## Installation

```bash
# Using bun
bun add @snomiao/setup-semantic-release -D

# Using npm
npm install @snomiao/setup-semantic-release --save-dev
```

## Usage

Run the following command in the root directory of your git repository:

```bash
# Using bun
bunx @snomiao/setup-semantic-release

# Using npx
npx @snomiao/setup-semantic-release
```

## What It Does

When you run the setup command, it will:

1. Check that you're in the root of a git repository
2. Check that your git working tree is clean
3. Install and configure Husky
4. Install semantic-release dependencies
5. Set up a GitHub Actions workflow for automated releases
6. Commit the changes with "chore: setup semantic release"

## Configuration

If you have an `NPM_TOKEN` environment variable set, it will automatically configure it as a GitHub secret for your repository. Otherwise, it will provide instructions on how to set it up manually.

## Requirements

- [Git](https://git-scm.com/)
- [Node.js](https://nodejs.org/) or [Bun](https://bun.sh/)
- A clean git repository

## License

MIT © [snomiao](https://github.com/snomiao)