open-index/open-npm huggingface dataset:
npm package: @jackchim/draft-order
Description: A starter for Medusa plugins.
Author: Medusa
Latest version: 2.11.0

<p align="center">
  <a href="https://www.medusajs.com">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/59018053/229103275-b5e482bb-4601-46e6-8142-244f531cebdb.svg">
    <source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg">
    <img alt="Medusa logo" src="https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg">
    </picture>
  </a>
</p>
<h1 align="center">
  Draft Order Plugin
</h1>

<h4 align="center">
  <a href="https://docs.medusajs.com">Documentation</a> |
  <a href="https://www.medusajs.com">Website</a>
</h4>

<p align="center">
  Create and manage draft orders on behalf of customers in Medusa
</p>
<p align="center">
  <a href="https://github.com/medusajs/medusa/blob/master/CONTRIBUTING.md">
    <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat" alt="PRs welcome!" />
  </a>
    <a href="https://www.producthunt.com/posts/medusa"><img src="https://img.shields.io/badge/Product%20Hunt-%231%20Product%20of%20the%20Day-%23DA552E" alt="Product Hunt"></a>
  <a href="https://discord.gg/xpCwq3Kfn8">
    <img src="https://img.shields.io/badge/chat-on%20discord-7289DA.svg" alt="Discord Chat" />
  </a>
  <a href="https://twitter.com/intent/follow?screen_name=medusajs">
    <img src="https://img.shields.io/twitter/follow/medusajs.svg?label=Follow%20@jackchim" alt="Follow @jackchim" />
  </a>
</p>

## Overview

The Draft Order Plugin enables admin users to create and manage orders on behalf of customers. This is particularly useful for customer support scenarios or when customers place orders offline.

## Features

- **Create draft orders** from the Medusa Admin dashboard
- **Manage items** in draft orders (add, update, remove)
- **Add shipping methods** to draft orders
- **Associate customers** with draft orders
- **Convert draft orders** to regular orders for purchase completion


## Installation

1. Install the Draft Order plugin
```
yarn add @jackchim/draft-order
```
2. Configure the plugin in your medusa-config.ts
```
module.exports = defineConfig({
  projectConfig: {
    ...
  },
  plugins: [
    {
      resolve: "@jackchim/draft-order",
      options: {},
    },
  ],
})
```
3. Start your server
   
## Requirements
- Medusa application version >= 2.4.0

## Support

## Community & Contributions

The community and core team are available in [GitHub Discussions](https://github.com/medusajs/medusa/discussions), where you can ask for support, discuss roadmap, and share ideas.

Join our [Discord server](https://discord.com/invite/medusajs) to meet other community members.

## Other channels

- [GitHub Issues](https://github.com/medusajs/medusa/issues)
- [Twitter](https://twitter.com/medusajs)
- [LinkedIn](https://www.linkedin.com/company/medusajs)
- [Medusa Blog](https://medusajs.com/blog/)
npm package: @jackchim/event-bus-local
Description: Local Event Bus Module for Medusa
Author: Medusa
Latest version: 2.11.0

<p align="center">
  <a href="https://www.medusajs.com">
    <img alt="Medusa" src="https://user-images.githubusercontent.com/7554214/153162406-bf8fd16f-aa98-4604-b87b-e13ab4baf604.png" width="100" />
  </a>
</p>
<h1 align="center">
  @jackchim/event-bus-local
</h1>

<h4 align="center">
  <a href="https://docs.medusajs.com">Documentation</a> |
  <a href="https://www.medusajs.com">Website</a>
</h4>

<p align="center">
An open source composable commerce engine built for developers.
</p>
<p align="center">
  <a href="https://github.com/medusajs/medusa/blob/master/LICENSE">
    <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Medusa is released under the MIT license." />
  </a>
  <a href="https://circleci.com/gh/medusajs/medusa">
    <img src="https://circleci.com/gh/medusajs/medusa.svg?style=shield" alt="Current CircleCI build status." />
  </a>
  <a href="https://github.com/medusajs/medusa/blob/master/CONTRIBUTING.md">
    <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat" alt="PRs welcome!" />
  </a>
    <a href="https://www.producthunt.com/posts/medusa"><img src="https://img.shields.io/badge/Product%20Hunt-%231%20Product%20of%20the%20Day-%23DA552E" alt="Product Hunt"></a>
  <a href="https://discord.gg/xpCwq3Kfn8">
    <img src="https://img.shields.io/badge/chat-on%20discord-7289DA.svg" alt="Discord Chat" />
  </a>
  <a href="https://twitter.com/intent/follow?screen_name=medusajs">
    <img src="https://img.shields.io/twitter/follow/medusajs.svg?label=Follow%20@jackchim" alt="Follow @jackchim" />
  </a>
</p>

## Overview

Local Event Bus module for Medusa. When installed, the events system of Medusa is powered by the Node EventEmitter. This module installed by default in new (> v1.8.0) Medusa projects.

The Node EventEmitter is limited to a single process environment. We generally recommend using the `@jackchim/event-bus-redis` module in a production environment.

## Getting started

Install the module:

```bash
yarn add @jackchim/event-bus-local
```

You don't need to add the module to your project configuration as it is the default one. Medusa will try to use it, if no other event buses are installed.

```js
module.exports = {
  // ...
  modules: [ ... ],
  // ...
}
```

## Configuration

The module comes with no configuration options.
npm package: @jackchim/icons
Description: Medusa UI React icon library
Author: Kasper Kristensen
Latest version: 2.11.0

<p align="center">
  <a href="https://www.medusajs.com">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/59018053/229103275-b5e482bb-4601-46e6-8142-244f531cebdb.svg">
    <source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg">
    <img alt="Medusa logo" src="https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg">
    </picture>
  </a>
</p>
<h1 align="center">
  Medusa Icons
</h1>

<h4 align="center">
  <a href="https://docs.medusajs.com/ui">Documentation</a> |
  <a href="https://www.medusajs.com">Website</a>
</h4>

<p align="center">
  Icons used in Medusa's design system.
</p>
<p align="center">
  <a href="https://github.com/medusajs/medusa/blob/develop/LICENSE">
    <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Medusa is released under the MIT license." />
  </a>
  <a href="https://discord.gg/xpCwq3Kfn8">
    <img src="https://img.shields.io/badge/chat-on%20discord-7289DA.svg" alt="Discord Chat" />
  </a>
  <a href="https://twitter.com/intent/follow?screen_name=medusajs">
    <img src="https://img.shields.io/twitter/follow/medusajs.svg?label=Follow%20@jackchim" alt="Follow @jackchim" />
  </a>
</p>

## Note

This package is auto-generated, and requires a Figma token associated with the Medusa Figma organization. If you are a not a Medusa team member, you will not be able to make changes to this package. If you discover any issues please open an issue instead of a PR.

## Installation

```sh
yarn add @jackchim/icons
```

## Usage

```jsx
import { Star } from "@jackchim/icons"
```
npm package: @jackchim/payment
Description: Medusa Payment module
Author: Medusa
Latest version: 2.11.0

# Payment Module

A Payment is the result of a series of financial transactions performed as part of collecting a payment of a purchase. The Payment holds information about the payment provider as well as the state of it. You can associate a Payment with a Cart, an Order, an OrderEdit, or any other resource you’d like to have your customers pay for.
npm package: @jackchim/settings
Description: Medusa Settings module
Author: Medusa
Latest version: 2.11.0

# Settings Module

The settings module provides functionality for managing user preferences and configurations in Medusa.

## Features

- **View Configurations**: Save and manage table view configurations (column visibility, order, widths)
- **User Preferences**: Store arbitrary user preferences in a key-value format
- **System Defaults**: Admin users can set default configurations for all users

## Module Options

```js
const settingsModuleOptions = {
  // Module options can be added here if needed
}
```
npm package: @jackchim/ui
Description: <p align="center">   <a href="https://www.medusajs.com">   <picture>     <source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/59018053/229103275-b5e482bb-4601-46e6-8142-244f531cebdb.svg">     <source media="(prefe
Author: Kasper Kristensen
Latest version: 4.0.24

<p align="center">
  <a href="https://www.medusajs.com">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/59018053/229103275-b5e482bb-4601-46e6-8142-244f531cebdb.svg">
    <source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg">
    <img alt="Medusa logo" src="https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg">
    </picture>
  </a>
</p>
<h1 align="center">
  Medusa UI
</h1>

<h4 align="center">
  <a href="https://docs.medusajs.com/ui">Documentation</a> |
  <a href="https://www.medusajs.com">Website</a>
</h4>

<p align="center">
  Medusa's admin component library.
</p>
<p align="center">
  <a href="https://github.com/medusajs/medusa/blob/develop/LICENSE">
    <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Medusa is released under the MIT license." />
  </a>
  <a href="https://discord.gg/xpCwq3Kfn8">
    <img src="https://img.shields.io/badge/chat-on%20discord-7289DA.svg" alt="Discord Chat" />
  </a>
  <a href="https://twitter.com/intent/follow?screen_name=medusajs">
    <img src="https://img.shields.io/twitter/follow/medusajs.svg?label=Follow%20@jackchim" alt="Follow @jackchim" />
  </a>
</p>

## Getting Started

### Installation

```sh
yarn add @jackchim/ui
```

### Usage

```jsx
import { Button } from "@jackchim/ui"

const App = () => <Button variant="primary">Hello World</Button>
```

## Documentation

You can find the documentation for Medusa UI [on the documentation site](https://docs.medusajs.com/ui).
npm package: @jackchim/ui-preset
Description: Medusa UI preset
Author: Kasper Kristensen
Latest version: 2.11.0

<p align="center">
  <a href="https://www.medusajs.com">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/59018053/229103275-b5e482bb-4601-46e6-8142-244f531cebdb.svg">
    <source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg">
    <img alt="Medusa logo" src="https://user-images.githubusercontent.com/59018053/229103726-e5b529a3-9b3f-4970-8a1f-c6af37f087bf.svg">
    </picture>
  </a>
</p>
<h1 align="center">
  Medusa UI
</h1>

<h4 align="center">
  <a href="https://docs.medusajs.com/ui">Documentation</a> |
  <a href="https://www.medusajs.com">Website</a>
</h4>

<p align="center">
  Medusa's design system tokens.
</p>
<p align="center">
  <a href="https://github.com/medusajs/medusa/blob/develop/LICENSE">
    <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Medusa is released under the MIT license." />
  </a>
  <a href="https://discord.gg/xpCwq3Kfn8">
    <img src="https://img.shields.io/badge/chat-on%20discord-7289DA.svg" alt="Discord Chat" />
  </a>
  <a href="https://twitter.com/intent/follow?screen_name=medusajs">
    <img src="https://img.shields.io/twitter/follow/medusajs.svg?label=Follow%20@jackchim" alt="Follow @jackchim" />
  </a>
</p>

## Note

This package is auto-generated, and requires a Figma token associated with the Medusa Figma organization. If you are a not a Medusa team member, you will not be able to make changes to this package. If you discover any issues please open an issue instead of a PR.
npm package: @jackclaw/cli
Description: JackClaw CLI management tool
Latest version: 0.3.0

# @jackclaw/cli

JackClaw CLI management tool — manage encrypted org-node identities, Hub connections, and scheduled reports.

## Install

```bash
npm install -g @jackclaw/cli
# or from monorepo root:
npm run build --workspace=packages/cli
```

## Commands

### `jackclaw init`
Initialize this machine as an JackClaw node. Generates an Ed25519 key pair and creates `~/.jackclaw/config.json`.

```bash
jackclaw init
jackclaw init --name "my-server" --role hub
```

### `jackclaw invite <hub-url>`
Register this node with a Hub. Sends public key, receives auth token.

```bash
jackclaw invite https://hub.example.com
```

### `jackclaw status`
Display node identity, Hub connection status, last/next report times.

```bash
jackclaw status
```

### `jackclaw report [--now] [--dry-run]`
Send a report to the Hub immediately.

```bash
jackclaw report --now
jackclaw report --now --dry-run   # preview without sending
```

### `jackclaw nodes`
List all registered nodes (Hub role only). Calls `GET /api/nodes`.

```bash
jackclaw nodes
jackclaw nodes --json
```

### `jackclaw config [key] [value]`
View or modify configuration.

```bash
jackclaw config                          # show all
jackclaw config reportSchedule           # read one
jackclaw config reportSchedule "0 9 * * *"   # set one
jackclaw config visibility full
```

**Editable keys:** `name`, `role`, `hubUrl`, `reportSchedule`, `visibility`

## Config file

`~/.jackclaw/config.json`

```json
{
  "nodeId": "node-a1b2c3d4e5f6g7h8",
  "name": "my-macbook",
  "role": "node",
  "hubUrl": "https://hub.example.com",
  "reportSchedule": "0 8 * * *",
  "visibility": "summary_only"
}
```

## Tech Stack

TypeScript · commander · chalk · axios · inquirer
npm package: @jackclaw/hub
Description: JackClaw Hub - CEO central node for receiving agent reports
Latest version: 0.3.0

# @jackclaw/hub

JackClaw Hub — CEO's central node. Receives encrypted reports from all registered agent nodes.

## Architecture

```
Node A ──┐
Node B ──┼──► POST /api/report ──► Hub ──► ~/.jackclaw/hub/reports/
Node C ──┘
                                   Hub ──► GET /api/summary  (CEO)
                                   Hub ──► GET /api/nodes    (CEO)
```

## API

### Public (no auth)

**POST /api/register**
```json
// Request
{ "nodeId": "node-alpha", "name": "Alpha", "role": "dev", "publicKey": "-----BEGIN PUBLIC KEY-----..." }

// Response
{ "success": true, "hubPublicKey": "...", "token": "<JWT>", "node": { ... } }
```

### Authenticated (Bearer JWT)

**POST /api/report**
```json
// JackClawMessage format (payload is base64(JSON(EncryptedPayload)))
{
  "from": "node-alpha",
  "to": "hub",
  "type": "report",
  "payload": "<base64-encrypted>",
  "timestamp": 1712100000000,
  "signature": "<base64-RSA-SHA256>"
}
```

**GET /api/nodes** *(CEO role only)*
```json
{ "success": true, "total": 3, "nodes": [ { "nodeId": "...", "lastReportAt": 1712100000000, ... } ] }
```

**GET /api/summary?date=2024-04-03** *(all roles)*
```json
{
  "date": "2024-04-03",
  "byRole": {
    "dev": { "role": "dev", "nodes": [ { "nodeId": "...", "summary": "..." } ] }
  },
  "totalNodes": 5,
  "reportingNodes": 3
}
```

## Security

- **JWT** — nodes authenticate with tokens issued at registration (30-day expiry)
- **Signature verification** — every report is RSA-SHA256 verified against the registered node public key
- **E2E encryption** — payloads are AES-256-GCM encrypted, key wrapped with hub's RSA-4096 public key
- **Rate limiting** — 60 requests/min per IP
- **CEO-only routes** — `/api/nodes` requires `role: "ceo"` in JWT

## Data Storage

```
~/.jackclaw/hub/
├── keys.json          # Hub RSA key pair (chmod 600)
├── jwt-secret         # JWT signing secret (chmod 600)
├── nodes.json         # Registered node registry
└── reports/
    └── [nodeId]/
        └── [YYYY-MM-DD].json
```

## Usage

```bash
# Install deps
npm install

# Build
npm run build

# Run (default port 3100)
npm start

# Dev mode
npm run dev

# Custom port
HUB_PORT=4000 npm start
```
npm package: @jackclaw/node
Description: JackClaw node agent — registers to Hub, reports daily, receives tasks
Latest version: 0.3.0

# @jackclaw/node

JackClaw node agent — registers to Hub, reports daily memory, receives tasks.

## Start

```bash
npm run build && npm start
```

First run auto-creates:
- `~/.jackclaw/identity.json` — RSA key pair + node ID
- `~/.jackclaw/config.json` — editable config

## HTTP API

| Method | Path | Description |
|--------|------|-------------|
| GET | `/health` | Health + node ID |
| POST | `/api/task` | Receive task from Hub |
| POST | `/api/ping` | Ping |

## Config (`~/.jackclaw/config.json`)

| Field | Default | Description |
|-------|---------|-------------|
| `hubUrl` | `http://localhost:18999` | Hub server URL |
| `port` | `19000` | Local HTTP port |
| `reportCron` | `0 8 * * *` | Report schedule (cron) |
| `workspaceDir` | `~/.openclaw/workspace` | OpenClaw memory dir |
| `hubPublicKey` | _(unset)_ | Hub RSA public key PEM |
| `visibility.shareMemory` | `true` | Include memory in reports |
| `visibility.shareTasks` | `true` | Accept tasks from Hub |
| `visibility.redactPatterns` | `[]` | Regex patterns to redact |

## Security

- Node identity is persisted with `chmod 600`
- Reports are encrypted with Hub's public key (if configured)
- Messages are signed with node's private key
- Redact patterns strip sensitive content before sending
npm package: @jackclaw/protocol
Description: JackClaw end-to-end encrypted messaging protocol
Latest version: 0.3.0

# @jackclaw/protocol

End-to-end encrypted messaging protocol for JackClaw nodes.

## Features

- **RSA-2048** key pair generation (PKCS1 PEM)
- **Hybrid encryption**: AES-256-GCM data + RSA-OAEP key wrapping
- **RSA-SHA256** message signing & verification
- Pure Node.js built-in `crypto` — no external deps

## API

```typescript
import {
  generateKeyPair,
  encrypt, decrypt,
  sign, verify,
  createMessage, openMessage,
} from '@jackclaw/protocol'

// Generate key pairs
const alice = generateKeyPair()   // { publicKey, privateKey }
const bob = generateKeyPair()

// Send encrypted + signed message
const msg = createMessage(
  'node-alice', 'node-bob',
  'report',
  { summary: 'all good', period: 'daily', visibility: 'full', data: {} },
  bob.publicKey,    // encrypt FOR bob
  alice.privateKey, // sign AS alice
)

// Receive & decrypt
const payload = openMessage(msg, alice.publicKey, bob.privateKey)
```

## Types

```typescript
interface JackClawMessage {
  from: string
  to: string
  type: 'report' | 'task' | 'ack' | 'ping'
  payload: string    // JSON-serialised EncryptedPayload
  timestamp: number
  signature: string  // base64
}

interface ReportPayload {
  summary: string
  period: string     // 'daily' | 'weekly'
  visibility: 'full' | 'summary_only' | 'private'
  data: Record<string, any>
}
```

## Test

```bash
npm run test:src
```
npm package: @jackclaw/sdk
Description: JackClaw Plugin Development SDK
Latest version: 0.3.0

# @jackclaw/sdk

JackClaw Plugin Development SDK — build AI agent plugins in minutes.

[English](#english) | [中文](#中文)

---

<a id="english"></a>
## English

### Install

```bash
npm install @jackclaw/sdk
```

### Create a Plugin

```ts
import { definePlugin } from '@jackclaw/sdk'

export default definePlugin({
  name: 'my-plugin',
  version: '1.0.0',
  description: 'What this plugin does',

  // Slash commands: /hello world
  commands: {
    hello: async (ctx) => {
      const name = ctx.args[0] ?? 'world'
      return { text: `Hello, ${name}! I am ${ctx.node.name}.` }
    },
  },

  // Scheduled tasks
  schedule: {
    daily: async (ctx) => {
      await ctx.report({ summary: 'Daily check complete' })
    },
  },

  // Lifecycle hooks
  hooks: {
    onLoad: async (ctx) => ctx.log.info('Plugin loaded'),
  },
})
```

### Built-in Examples

| Plugin | Description |
|--------|-------------|
| `examples/weather-plugin` | Query weather via wttr.in (no key needed) |
| `examples/translator-plugin` | Translate text via LLM Gateway |
| `examples/daily-reporter-plugin` | Log work items + daily auto-report |

### Test Your Plugin

```ts
import { createMockCommandContext } from '@jackclaw/sdk'
import myPlugin from './my-plugin'

const ctx = createMockCommandContext({ args: ['Alice'] })
const result = await myPlugin.commands!.hello!(ctx)
console.assert(result?.text === 'Hello, Alice!')
```

---

<a id="中文"></a>
## 中文

### 安装

```bash
npm install @jackclaw/sdk
```

### 快速写一个 Plugin

```ts
import { definePlugin } from '@jackclaw/sdk'

export default definePlugin({
  name: '我的插件',
  version: '1.0.0',

  commands: {
    // /hello 张三 → 回复问候
    hello: async (ctx) => {
      const name = ctx.args[0] ?? '朋友'
      return { text: `你好，${name}！我是 ${ctx.node.name}。` }
    },
  },

  schedule: {
    daily: async (ctx) => {
      // 每天自动发送日报
      await ctx.report({ summary: '今日检查完成' })
    },
  },
})
```

### Plugin 能做什么

- **commands** — 响应 `/命令` 消息
- **schedule** — 定时任务（每日/每小时/自定义 cron）
- **hooks** — 生命周期钩子（onLoad/onShutdown）
- **store** — 持久化键值存储
- **log** — 结构化日志

### 内置示例

```ts
// 天气查询（无需 API key）
import weatherPlugin from '@jackclaw/sdk/examples/weather-plugin'

// 多语言翻译
import translatorPlugin from '@jackclaw/sdk/examples/translator-plugin'

// 自动日报
import dailyReporter from '@jackclaw/sdk/examples/daily-reporter-plugin'
```

### 测试

```ts
import { createMockCommandContext } from '@jackclaw/sdk'

const ctx = createMockCommandContext({ args: ['世界'] })
const result = await weatherPlugin.commands!.weather!(ctx)
console.log(result?.text) // 🌤 北京: ☀️ +22°C
```
npm package: @jackcmeyer/eslint-config-typescript-base
Description: My shareable ESLint configuration for TypeScript
Author: Jack Meyer
Latest version: 0.1.2-alpha.0

# `@jackcmeyer/eslint-config-typescript`

> TODO: description

## Usage

```
const eslintConfigTypescript = require('@jackcmeyer/eslint-config-typescript');

// TODO: DEMONSTRATE API
```
npm package: @jackcooperdev/portablemc_npm
Description: This module aims to convert the excellent work by [mindstorm38](https://github.com/mindstorm38) into an NPM module to be used in many Node.js based projects.
Latest version: 1.26.0

# PortableMC_NPM

This module aims
to convert the excellent work by [mindstorm38](https://github.com/mindstorm38) into an NPM module
to be used in many Node.js based projects. 

## Compatability
The package is compatible with Windows and Linux Clients

## Installation
Install the package using npm
```
npm install portablemc
```
This package also requires that [portablemc](https://github.com/mindstorm38/portablemc) is installed on the system. The package will search in its default installation locations.

## Getting Started

### .config(options)
This function tells the package some key pieces of information:

**EXE_LOCATION** : Path to the PortableMC Application<br>
**LOG_LOCATION** : Path to logs location<br>
**MAIN_DIR** : Path where minecraft will be installed<br>

All values have defaults; however, the package will error if portablemc is not found.
In this case, manual declaration may be needed.

``` js
portablemc.config({
    EXE_LOCATION: PATH_TO_EXE
    LOG_LOCATION: PATH_TO_LOG,
    MAIN_DIR:PATH_TO_MC_INSTALLATION
});
```
### .authenticate(email)
This function determines which user is used to boot into the minecraft instance. It can be used both standalone and asynchronously which will return a result
``` js
portablemc.authenticate(EMAIL);
```
or
```js
const authenticatedUser = await portablemc.authenticate(EMAIL);
```
```json
{
  "username": "USERNAME",
  "uuid": "UUID",
  "email": "EMAIL (Obfuscated)"
}
```
Once this function is run, it stores the user and will use it to launch later sessions.

### .launchGame(options,installOnly)
This functions boots an instance of minecraft with the following conditions:

``` json
{
    "version":"MC VERSION",
    "loader": "LOADER"
}
```
**Version** : accepts any version. Also accepts release and snapshot

**Loader** : accepts the following
- Standard (Vanilla)
- Forge
- Fabric
- NeoForge
- Quilt
- LegacyFabric

> Currently, there is no check to ensure that the version selected supports the loader. This will be addressed in a future version.

## installOnly
Setting this to true will stop the launch of the game and only install it.

This function can be called normally and asynchronously
``` js
portablemc.launchGame(options,false);
```
or
```js
const launchGameVersion = await portablemc.launchGame(options,false);
```


## Other Functions

### .getAuthedUsers()

```js
const authenticatedUsers = portablemc.getAuthedUsers()
```

Returns an array of authenticated users


### .logout(email)

```js
const logoutUser = await portablemc.logout(email)
```

Log the user out
npm package: @jackdbd/checks
Description: Functions to check inputs (i.e. predicates)
Author: Giacomo Debidda
Latest version: 2.0.0

# @jackdbd/checks

[![npm version](https://badge.fury.io/js/@jackdbd%2Fchecks.svg)](https://badge.fury.io/js/@jackdbd%2Fchecks)
![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/@jackdbd%2Fchecks)

Functions to check inputs (i.e. predicates).

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
<details><summary>Table of Contents</summary>

- [Installation](#installation)
- [API](#api)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
</details>

## Installation

```sh
npm install @jackdbd/checks
```

## API

[API docs generated with TypeDoc](https://jackdbd.github.io/calderone/checks/)
npm package: @jackdbd/cloud-scheduler-utils
Description: Utility functions to work with Cloud Sheduler
Author: Giacomo Debidda
Latest version: 1.2.0

# @jackdbd/cloud-scheduler-utils

[![npm version](https://badge.fury.io/js/@jackdbd%2Fcloud-scheduler-utils.svg)](https://badge.fury.io/js/@jackdbd%2Fcloud-scheduler-utils)
![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/@jackdbd%2Fcloud-scheduler-utils)

Utility functions to work with [Cloud Sheduler](https://cloud.google.com/scheduler).

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
<details><summary>Table of Contents</summary>

- [Installation](#installation)
- [Why?](#why)
- [API](#api)
- [Usage](#usage)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
</details>

## Installation

```sh
npm install @jackdbd/cloud-scheduler-utils
```

> ⚠️ **Warning:**
> 
> This library declares [@google-cloud/scheduler](https://www.npmjs.com/package/@google-cloud/scheduler) and [debug](https://www.npmjs.com/package/debug) as peer dependencies.


## Why?

I find the Cloud Scheduler client a bit awkward to work with, so I decided to make a tiny set of utilities for my needs.

## API

[API docs generated with TypeDoc](https://jackdbd.github.io/calderone/cloud-scheduler-utils/)

## Usage

```js
import { CloudSchedulerClient } from '@google-cloud/scheduler'
import { createHttpJob, deleteJob, randomSchedule } from '@jackdbd/cloud-scheduler-utils'

// Instantiate your Cloud Scheduler client as you prefer:
// - Application Default Credentials (ADC)
// - environment variable GOOGLE_APPLICATION_CREDENTIALS
// - JSON key of a service account
const cloud_scheduler = new CloudSchedulerClient()

// Spaces are not possible, apostrophes are not possible (e.g. `new year's eve` is not a valid job name)
const name = 'call-google-on-a-schedule'

const location_id = 'europe-west3'

// Set a fixed schedule...
const schedule = '59 23 31 12 *' // Tip: use https://crontab.guru/
// ...or a random one:
// const schedule = randomSchedule()

const config = {
  cloud_scheduler, // Note that you have to pass your Cloud Scheduler client as configuration for the job.
  description: 'this is a test HTTP job',
  location_id,
  name,
  project_id: '<YOUR GOOGLE CLOUD PLATFORM PROJECT ID>',
  schedule,
  service_account_email: '<YOUR SERVICE ACCOUNT EMAIL>',
  timezone: 'Europe/Rome',
  url_to_call: 'https://www.google.com/'
}

const job = await createHttpJob(config)

await deleteJob({ cloud_scheduler, location_id, name })

await deleteAllJobs({ cloud_scheduler, location_id, name })
```
npm package: @jackdbd/cloud-tasks-utils
Description: [![npm version](https://badge.fury.io/js/@jackdbd%2Fcloud-tasks-utils.svg)](https://badge.fury.io/js/@jackdbd%2Fcloud-tasks-utils) ![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/@jackdbd%2Fcloud-tasks-utils)
Author: Giacomo Debidda
Latest version: 1.1.0

# @jackdbd/cloud-tasks-utils

[![npm version](https://badge.fury.io/js/@jackdbd%2Fcloud-tasks-utils.svg)](https://badge.fury.io/js/@jackdbd%2Fcloud-tasks-utils)
![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/@jackdbd%2Fcloud-tasks-utils)

Utility functions to work with [Cloud Tasks](https://cloud.google.com/tasks/docs).

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
<details><summary>Table of Contents</summary>

- [Installation](#installation)
- [API](#api)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
</details>

## Installation

```sh
npm install @jackdbd/cloud-tasks-utils
```

## API

[API docs generated with TypeDoc](https://jackdbd.github.io/calderone/cloud-tasks-utils/)
npm package: @jackdbd/cloudflare-pages-plugin-cal-com
Description: Cloudflare Pages Functions plugin for cal.com
Author: Giacomo Debidda
Latest version: 0.1.0

# @jackdbd/cloudflare-pages-plugin-cal-com

[![npm (scoped)](https://img.shields.io/npm/v/@jackdbd/cloudflare-pages-plugin-cal-com)](https://www.npmjs.com/package/@jackdbd/cloudflare-pages-plugin-cal-com)

## Installation

```sh
npm install @jackdbd/cloudflare-pages-plugin-cal-com
```

## Configuration

TODO
npm package: @jackdbd/eleventy-plugin-ensure-env-vars
Description: Eleventy plugin that checks environment variables before Eleventy builds your site.
Author: Giacomo Debidda
Latest version: 1.2.0

# @jackdbd/eleventy-plugin-ensure-env-vars

[![npm version](https://badge.fury.io/js/@jackdbd%2Feleventy-plugin-ensure-env-vars.svg)](https://badge.fury.io/js/@jackdbd%2Feleventy-plugin-ensure-env-vars)
[![install size](https://packagephobia.com/badge?p=@jackdbd/eleventy-plugin-ensure-env-vars)](https://packagephobia.com/result?p=@jackdbd/eleventy-plugin-ensure-env-vars)
[![CodeCov badge](https://codecov.io/gh/jackdbd/undici/graph/badge.svg?token=BpFF8tmBYS)](https://app.codecov.io/gh/jackdbd/undici?flags%5B0%5D=eleventy-plugin-ensure-env-vars)
[![Socket Badge](https://socket.dev/api/badge/npm/package/@jackdbd/eleventy-plugin-ensure-env-vars)](https://socket.dev/npm/package/@jackdbd/eleventy-plugin-ensure-env-vars)

Eleventy plugin that checks environment variables before Eleventy builds your site.

- [Installation](#installation)
- [Usage](#usage)
- [Configuration](#configuration)
  - [Plugin options](#plugin-options)
- [Troubleshooting](#troubleshooting)
- [Dependencies](#dependencies)
- [License](#license)

## Installation

```sh
npm install @jackdbd/eleventy-plugin-ensure-env-vars
```

**Note**: this library was tested on Node.js >=18. It might work on other Node.js versions though.

## Usage

In your Eleventy config file:

```js
import { ensureEnvVarsPlugin } from '@jackdbd/eleventy-plugin-ensure-env-vars'

export default function (eleventyConfig) {
  // some eleventy configuration...

  eleventyConfig.addPlugin(ensureEnvVarsPlugin, {
    envVars: ['DEBUG', 'NODE_ENV']
  })

  // some more eleventy configuration...
}
```

## Configuration

### Plugin options

| Key | Default | Description |
|---|---|---|
| `envVars` | `undefined` | Environment variables you want to be set when building your Eleventy site |

## Troubleshooting

This plugin uses the [debug](https://github.com/debug-js/debug) library for logging.
You can control what's logged using the `DEBUG` environment variable.

For example, if you set your environment variables in a `.envrc` file, you can do:

```sh
# print all logging statements
export DEBUG=11ty-plugin:*
```

## Dependencies

| Package | Version |
|---|---|
| [zod](https://www.npmjs.com/package/zod) | `^3.23.0` |
| [zod-validation-error](https://www.npmjs.com/package/zod-validation-error) | `^3.1.0` |

> ⚠️ **Peer Dependencies**
>
> This package defines 2 peer dependencies.

| Peer | Version range |
|---|---|
| `@11ty/eleventy` | `>=2.0.0 or 3.0.0-alpha.6` |
| `debug` | `>=4.0.0` |

## License

&copy; 2022 - 2024 [Giacomo Debidda](https://www.giacomodebidda.com/) // [MIT License](https://spdx.org/licenses/MIT.html)
npm package: @jackdbd/fastify-hooks
Description: Miscellaneous hooks for Fastify servers.
Author: Giacomo Debidda
Latest version: 0.2.0-canary.16

# @jackdbd/fastify-hooks

[![npm version](https://badge.fury.io/js/@jackdbd%2Ffastify-hooks.svg)](https://badge.fury.io/js/@jackdbd%2Ffastify-hooks)
[![install size](https://packagephobia.com/badge?p=@jackdbd/fastify-hooks)](https://packagephobia.com/result?p=@jackdbd/fastify-hooks)
[![CodeCov badge](https://codecov.io/gh/jackdbd/rapido/graph/badge.svg?token=BpFF8tmBYS)](https://app.codecov.io/gh/jackdbd/rapido?flags%5B0%5D=fastify-hooks)
[![Socket Badge](https://socket.dev/api/badge/npm/package/@jackdbd/fastify-hooks)](https://socket.dev/npm/package/@jackdbd/fastify-hooks)

Miscellaneous hooks for Fastify servers.

- [Installation](#installation)
- [Docs](#docs)
- [Dependencies](#dependencies)
- [License](#license)

## Installation

```sh
npm install @jackdbd/fastify-hooks
```

## Docs

[Docs generated by TypeDoc](https://jackdbd.github.io/rapido/fastify-hooks/0.2.0-canary.16)

## Dependencies

| Package | Version |
|---|---|
| [@jackdbd/fastify-utils](https://www.npmjs.com/package/@jackdbd/fastify-utils) | `0.2.0-canary.10` |
| [@jackdbd/indieauth](https://www.npmjs.com/package/@jackdbd/indieauth) | `0.2.0-canary.14` |
| [@jackdbd/oauth2-error-responses](https://www.npmjs.com/package/@jackdbd/oauth2-error-responses) | `0.2.0-canary.9` |
| [@sinclair/typebox](https://www.npmjs.com/package/@sinclair/typebox) | `^0.34.14` |

> [!WARNING]
> This package defines 2 peer dependencies.

| Peer | Version range |
|---|---|
| `@fastify/request-context` | `>=6.0.0` |
| `fastify` | `>=5.0.0` |

## License

&copy; 2024 - 2025 [Giacomo Debidda](https://www.giacomodebidda.com/) // [MIT License](https://spdx.org/licenses/MIT.html)
npm package: @jackdbd/fastify-utils
Description: Miscellaneous utilities for Fastify servers.
Author: Giacomo Debidda
Latest version: 0.2.0-canary.10

# @jackdbd/fastify-utils

[![npm version](https://badge.fury.io/js/@jackdbd%2Ffastify-utils.svg)](https://badge.fury.io/js/@jackdbd%2Ffastify-utils)
[![install size](https://packagephobia.com/badge?p=@jackdbd/fastify-utils)](https://packagephobia.com/result?p=@jackdbd/fastify-utils)
[![CodeCov badge](https://codecov.io/gh/jackdbd/rapido/graph/badge.svg?token=BpFF8tmBYS)](https://app.codecov.io/gh/jackdbd/rapido?flags%5B0%5D=fastify-utils)
[![Socket Badge](https://socket.dev/api/badge/npm/package/@jackdbd/fastify-utils)](https://socket.dev/npm/package/@jackdbd/fastify-utils)

Miscellaneous utilities for Fastify servers.

- [Installation](#installation)
- [Docs](#docs)
- [Dependencies](#dependencies)
- [License](#license)

## Installation

```sh
npm install @jackdbd/fastify-utils
```

## Docs

[Docs generated by TypeDoc](https://jackdbd.github.io/rapido/fastify-utils/)

## Dependencies

This package has no dependencies.

> ⚠️ **Peer Dependencies**
>
> This package defines 1 peer dependency.

| Peer | Version range |
|---|---|
| `fastify` | `>=5.0.0` |

## License

&copy; 2024 - 2025 [Giacomo Debidda](https://www.giacomodebidda.com/) // [MIT License](https://spdx.org/licenses/MIT.html)
npm package: @jackdbd/fattureincloud-client
Description: Unofficial API client for FattureInCloud
Author: Giacomo Debidda
Latest version: 1.1.0

# @jackdbd/fattureincloud-client

Unofficial API client for [FattureInCloud](https://www.fattureincloud.it/) with auto-pagination and optional rate-limits.

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
<details><summary>Table of Contents</summary>

- [Installation](#installation)
- [API](#api)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
</details>

## Installation

```sh
npm install @jackdbd/fattureincloud-client
```

## API

[API docs generated with TypeDoc](https://jackdbd.github.io/calderone/fattureincloud-client/)
npm package: @jackdbd/firestore-utils
Description: Utility functions to work with Firestore
Author: Giacomo Debidda
Latest version: 1.5.0

# @jackdbd/firestore-utils

[![npm version](https://badge.fury.io/js/@jackdbd%2Ffirestore-utils.svg)](https://badge.fury.io/js/@jackdbd%2Ffirestore-utils)
![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/@jackdbd%2Ffirestore-utils)

Utility functions to work with [Firestore](https://cloud.google.com/firestore).

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
<details><summary>Table of Contents</summary>

- [Installation](#installation)
- [Usage](#usage)
- [API](#api)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
</details>

## Installation

```sh
npm install @jackdbd/firestore-utils
```

> ⚠️ **Warning:**
> 
> This library declares [@google-cloud/firestore](https://www.npmjs.com/package/@google-cloud/firestore) as peer dependency.

## Usage

You can import the top-level module:

```ts
import { Firestore } from '@google-cloud/firestore'
import {
  bulkCopy,
  bulkDelete,
  bulkMove,
  moveData,
  shuffleWithFisherYates,
  docResultsWithData
} from '@jackdbd/firestore-utils'

const firestore = new Firestore()
const collection_ref = firestore.collection('some-collection')

const result_copy = await bulkCopy({
  copied_by: 'someone',
  dest_collection: 'some-other-collection',
  query: collection_ref.where('some-field', '>=', 42)
})

const result_move = await bulkMove({
  moved_by: 'someone',
  dest_collection: 'some-other-collection',
  query: collection_ref.where('some-field', '>=', 42)
})

await shuffleWithFisherYates(collection_ref)

const result_delete = await bulkDelete({ query: collection_ref })
```

or a specific ES module:

```ts
import { bulkCopy } from '@jackdbd/firestore-utils/copy'

import { bulkDelete } from '@jackdbd/firestore-utils/delete'

import {
  bulkMove,
  moveData,
  shuffleWithFisherYates
} from '@jackdbd/firestore-utils/move'

import { docResultsWithData } from '@jackdbd/firestore-utils/retrieve'
```

## API

[API docs generated with TypeDoc](https://jackdbd.github.io/calderone/firestore-utils/)
npm package: @jackdbd/github-content-store
Description: Store Micropub posts in a GitHub repository.
Author: Giacomo Debidda
Latest version: 0.2.0-canary.15

# @jackdbd/github-content-store

[![npm version](https://badge.fury.io/js/@jackdbd%2Fgithub-content-store.svg)](https://badge.fury.io/js/@jackdbd%2Fgithub-content-store)
[![install size](https://packagephobia.com/badge?p=@jackdbd/github-content-store)](https://packagephobia.com/result?p=@jackdbd/github-content-store)
[![CodeCov badge](https://codecov.io/gh/jackdbd/rapido/graph/badge.svg?token=BpFF8tmBYS)](https://app.codecov.io/gh/jackdbd/rapido?flags%5B0%5D=github-content-store)
[![Socket Badge](https://socket.dev/api/badge/npm/package/@jackdbd/github-content-store)](https://socket.dev/npm/package/@jackdbd/github-content-store)

Store Micropub posts in a GitHub repository.

- [Installation](#installation)
- [Docs](#docs)
- [Dependencies](#dependencies)
- [License](#license)

## Installation

```sh
npm install @jackdbd/github-content-store
```

## Docs

[Docs generated by TypeDoc](https://jackdbd.github.io/rapido/github-content-store/0.2.0-canary.15)

## Dependencies

| Package | Version |
|---|---|
| [@jackdbd/github-contents-api](https://www.npmjs.com/package/@jackdbd/github-contents-api) | `0.2.0-canary.12` |
| [@jackdbd/micropub](https://www.npmjs.com/package/@jackdbd/micropub) | `0.2.0-canary.13` |
| [@paulrobertlloyd/mf2tojf2](https://www.npmjs.com/package/@paulrobertlloyd/mf2tojf2) | `^2.4.0` |
| [dayjs](https://www.npmjs.com/package/dayjs) | `^1.11.13` |
| [dayjs-plugin-utc](https://www.npmjs.com/package/dayjs-plugin-utc) | `^0.1.2` |
| [gray-matter](https://www.npmjs.com/package/gray-matter) | `^4.0.3` |
| [html-to-text](https://www.npmjs.com/package/html-to-text) | `^9.0.5` |
| [markdown-it](https://www.npmjs.com/package/markdown-it) | `^14.1.0` |

## License

&copy; 2024 - 2025 [Giacomo Debidda](https://www.giacomodebidda.com/) // [MIT License](https://spdx.org/licenses/MIT.html)
npm package: @jackdbd/hapi-healthcheck-plugin
Description: Hapi plugin for a healthcheck
Author: Giacomo Debidda
Latest version: 1.0.0

# @jackdbd/hapi-healthcheck-plugin

[![npm version](https://badge.fury.io/js/@jackdbd%2Fhapi-healthcheck-plugin.svg)](https://badge.fury.io/js/@jackdbd%2Fhapi-healthcheck-plugin)
![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/@jackdbd%2Fhapi-healthcheck-plugin)

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
</details>

Hapi plugin for a healthcheck.
## Installation

```sh
npm install @jackdbd/hapi-healthcheck-plugin
```

## API

[API docs generated with TypeDoc](https://jackdbd.github.io/matsuri/hapi-healthcheck-plugin/)
npm package: @jackdbd/hapi-ip-whitelist-plugin
Description: Hapi plugin to allow an IP whitelist
Author: Giacomo Debidda
Latest version: 1.0.5

# @jackdbd/hapi-ip-whitelist-plugin

[![npm version](https://badge.fury.io/js/@jackdbd%2Fhapi-ip-whitelist-plugin.svg)](https://badge.fury.io/js/@jackdbd%2Fhapi-ip-whitelist-plugin)
![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/@jackdbd%2Fhapi-ip-whitelist-plugin)

Hapi plugin to allow an IP whitelist.

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
</details>

## Installation

```sh
npm install @jackdbd/hapi-ip-whitelist-plugin
```

## API

[API docs generated with TypeDoc](https://jackdbd.github.io/calderone/hapi-ip-whitelist-plugin/)
npm package: @jackdbd/hapi-request-event-predicates
Description: Predicates that check if Hapi requests are errors, warnings, have certain tags, etc.
Author: Giacomo Debidda
Latest version: 1.1.0

# @jackdbd/hapi-request-event-predicates

[![npm version](https://badge.fury.io/js/@jackdbd%2Fhapi-request-event-predicates.svg)](https://badge.fury.io/js/@jackdbd%2Fhapi-request-event-predicates)
![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/@jackdbd%2Fhapi-request-event-predicates)

Predicates that check if Hapi requests are errors, warnings, have certain tags, etc.

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
</details>

## Installation

```sh
npm install @jackdbd/hapi-request-event-predicates
```
npm package: @jackdbd/hosting-utils
Description: Utilities for working with the configuration files of various hosting providers.
Author: Giacomo Debidda
Latest version: 1.0.0

# @jackdbd/hosting-utils

<!-- [![npm version](https://badge.fury.io/js/@jackdbd%2Fhosting-utils.svg)](https://badge.fury.io/js/@jackdbd%2Fhosting-utils)
[![install size](https://packagephobia.com/badge?p=@jackdbd/hosting-utils)](https://packagephobia.com/result?p=@jackdbd/hosting-utils)
[![CodeCov badge](https://codecov.io/gh/jackdbd/undici/graph/badge.svg?token=BpFF8tmBYS)](https://app.codecov.io/gh/jackdbd/undici?flags%5B0%5D=hosting-utils)
[![Socket Badge](https://socket.dev/api/badge/npm/package/@jackdbd/hosting-utils)](https://socket.dev/npm/package/@jackdbd/hosting-utils) -->

Utilities for working with the configuration files of various hosting providers.

- [Installation](#installation)
- [Usage](#usage)
- [Configuration](#configuration)
- [Troubleshooting](#troubleshooting)
- [Dependencies](#dependencies)
- [License](#license)

## Installation

```sh
npm install @jackdbd/hosting-utils
```

**Note**: this library was tested on Node.js >=18. It might work on other Node.js versions though.

## Usage

Let's say that you are hosting your Eleventy site on Vercel and that you want to programmatically add a `Content-Security-Policy` header to a bunch of routes. You could do something like this:

```ts
import { updateVercelJSON } from '@jackdbd/hosting-utils'

await updateVercelJSON({
  headerKey: 'Content-Security-Policy',
  headerValue: "default-src 'self'; img-src 'self' cdn.example.com;",
  filepath: '_site/vercel.json',
  sources: ['/(404|index).html', '/posts/**/*.html']
})
```

## Configuration

Read these resources to understand how to configure `_headers`, `serve.json`, `vercel.json`.

- [Attach headers to Cloudflare Pages responses](https://developers.cloudflare.com/pages/configuration/headers/)
- [serve](https://github.com/vercel/serve)
- [serve-handler options](https://github.com/vercel/serve-handler#options)
- [Configure headers in `vercel.json`](https://vercel.com/docs/projects/project-configuration#headers)

## Troubleshooting

This plugin uses the [debug](https://github.com/debug-js/debug) library for logging.
You can control what's logged using the `DEBUG` environment variable.

For example, if you set your environment variables in a `.envrc` file, you can do:

```sh
# print all logging statements
export DEBUG=hosting-utils:*
```

## Dependencies

| Package | Version |
|---|---|
| [netlify-headers-parser](https://www.npmjs.com/package/netlify-headers-parser) | `^7.1.4` |
| [proper-lockfile](https://www.npmjs.com/package/proper-lockfile) | `^4.1.2` |

> ⚠️ **Peer Dependencies**
>
> This package defines 1 peer dependency.

| Peer | Version range |
|---|---|
| `debug` | `>=4.0.0` |

## License

&copy; 2022 - 2024 [Giacomo Debidda](https://www.giacomodebidda.com/) // [MIT License](https://spdx.org/licenses/MIT.html)
npm package: @jackdbd/notifications
Description: Functions used to send notifications to various channels (Telegram, email, etc)
Author: Giacomo Debidda
Latest version: 1.0.3

# @jackdbd/notifications

[![npm version](https://badge.fury.io/js/@jackdbd%2Fnotifications.svg)](https://badge.fury.io/js/@jackdbd%2Fnotifications)
![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/@jackdbd%2Fnotifications)

Send Telegram messages and emails.

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
<details><summary>Table of Contents</summary>

- [Installation](#installation)
- [API](#api)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
</details>

## Installation

```sh
npm install @jackdbd/notifications
```

## API

[API docs generated with TypeDoc](https://jackdbd.github.io/calderone/notifications/)