open-index/open-npm huggingface dataset:
npm package: @snappymob/eslint-config-web
Description: Snappymob Eslint Rules
Author: Snappymob
Latest version: 1.0.1

# eslint-config-web

## Usage

### JavaScript

Install dependencies

```sh
$ yarn add -D eslint@8.3.0 \
              @babel/eslint-parser@7.16.3 \
              @snappymob/eslint-config-web

```

Create an `.eslintrc.js` in the root directory of your project, then copy the following content into it:

```bash
module.exports = {
  extends: [
    '@snappymob/web',
  ],
  rules: {
    // Customize your rules
  },
};
```

### TypeScript

Install dependencies

```sh
$ yarn add -D eslint@8.3.0 \
              typescript@4.5.2 \
              @typescript-eslint/parser@5.5.0 \
              @typescript-eslint/eslint-plugin@5.5.0 \
              @snappymob/eslint-config-web
```

Create an `.eslintrc.js` in the root directory of your project, then copy the following content into it:

```bash
module.exports = {
  extends: [
    '@snappymob/web',
    '@snappymob/web/typescript'
  ],
  rules: {
    // Customize your rules
  },
};
```

### Vue

Install dependencies

```sh
# `vue-eslint-parser` does not have Eslint 8.0 support yet
# https://github.com/vuejs/vue-cli/issues/6759
$ yarn add -D eslint@7.32.0 \
              @babel/eslint-parser@7.16.3 \
              vue-eslint-parser@8.0.1 \
              eslint-plugin-vue@8.1.1 \
              @snappymob/eslint-config-web

```

Create an `.eslintrc.js` in the root directory of your project, then copy the following content into it:

```bash
module.exports = {
  extends: [
    '@snappymob/web',
    '@snappymob/web/vue'
  ],
  rules: {
    // Customize your rules
  },
};
```

## Setup Pre-commit Hook

_You should set this up in the root directory (if you're running a monorepo)_

```sh
$ yarn add -D husky@7.0.4 lint-staged@12.1.2
```

### Setup Husky

```sh
$ yarn exec husky install
$ yarn exec husky add .husky/pre-commit "lint-staged --no-stash"
```

### Setup lint-staged in `package.json`

#### `package.json` example

```json
{
  "lint-staged": {
    "*.{vue,ts}": ["prettier --write", "eslint --fix"],
    // Monorepo
    "backend/**/*.{js,ts}": ".scripts/pre-commit.sh backend",
    "landing/**/*.{js,jsx,ts,tsx,vue}": ".scripts/pre-commit.sh landing",
    "admin-web/**/*.{js,jsx,ts,tsx,vue}": ".scripts/pre-commit.sh admin-web",
    "user-web/**/*.{js,jsx,ts,tsx,vue}": ".scripts/pre-commit.sh user-web"
  }
}
```

#### Monorepo `pre-commit.sh` example

```bash
#!/usr/bin/env bash
SUB_DIR=$1
shift 1
STAGED_FILES=$@

cd $SUB_DIR

case "$SUB_DIR" in
  backend | landing)
    yarn format $STAGED_FILES && yarn lint $STAGED_FILES
    ;;
  user-web | admin-web)
    yarn lint $STAGED_FILES
    ;;
esac
```

## Local Development

```bash
yarn install
yarn link
# yarn unlink to unregister the repository
```

### On your application

```bash
yarn link eslint-config-web
# PATH to eslint-config-web local repository
# Install dependencies
yarn add file:../eslint-config-web
```
npm package: @snapsheet/piexifjs
Description: Read and write exif.
Author: hMatoba
Latest version: 1.0.6

Piexifjs
========

.. image:: https://travis-ci.org/hMatoba/piexifjs.svg?branch=master
    :target: https://travis-ci.org/hMatoba/piexifjs
.. image:: https://badge.fury.io/js/piexifjs.svg
    :target: http://badge.fury.io/js/piexifjs

Read and modify exif. Library to modify exif in JS(both client-side and Node.js).
http://piexifjs.readthedocs.org/en/latest/index.html

How to Use
----------

- *var exifObj = piexif.load(jpegData)* - Get exif data as *object*. *jpegData* must be a *string* that starts with "\data:image/jpeg;base64,"(DataURL), "\\xff\\xd8", or "Exif".
- *var exifStr = piexif.dump(exifObj)* - Get exif as *string* to insert into JPEG.
- *piexif.insert(exifStr, jpegData)* - Insert exif into JPEG. If *jpegData* is DataURL, returns JPEG as DataURL. Else if *jpegData* is binary as *string*, returns JPEG as binary as *string*.
- *piexif.remove(jpegData)* - Remove exif from JPEG. If *jpegData* is DataURL, returns JPEG as DataURL. Else if *jpegData* is binary as *string*, returns JPEG as binary as *string*.

Use with File API or Canvas API.

Example
-------

::

    <input type="file" id="files" />
    <script source="/js/piexif.js" />
    <script>
    function handleFileSelect(evt) {
        var file = evt.target.files[0];
        
        var zeroth = {};
        var exif = {};
        var gps = {};
        zeroth[piexif.ImageIFD.Make] = "Make";
        zeroth[piexif.ImageIFD.XResolution] = [777, 1];
        zeroth[piexif.ImageIFD.YResolution] = [777, 1];
        zeroth[piexif.ImageIFD.Software] = "Piexifjs";
        exif[piexif.ExifIFD.DateTimeOriginal] = "2010:10:10 10:10:10";
        exif[piexif.ExifIFD.LensMake] = "LensMake";
        exif[piexif.ExifIFD.Sharpness] = 777;
        exif[piexif.ExifIFD.LensSpecification] = [[1, 1], [1, 1], [1, 1], [1, 1]];
        gps[piexif.GPSIFD.GPSVersionID] = [7, 7, 7, 7];
        gps[piexif.GPSIFD.GPSDateStamp] = "1999:99:99 99:99:99";
        var exifObj = {"0th":zeroth, "Exif":exif, "GPS":gps};
        var exifStr = piexif.dump(exifObj);

        var reader = new FileReader();
        reader.onload = function(e) {
            var inserted = piexif.insert(exifStr, e.target.result);

            var image = new Image();
            image.src = inserted;
            image.width = 200;
            var el = $("<div></div>").append(image);
            $("#resized").prepend(el);

        };
        reader.readAsDataURL(file);
    }
    
    document.getElementById('files').addEventListener('change', handleFileSelect, false);
    </script>

Dependency
----------

No dependency. Piexifjs just needs standard JavaScript environment.

Environment
-----------

Both client-side and server-side. Standard browsers(Tested on IE11, Opera28, and PhantomJS) and Node.js.

Issues
------

Give me details. Environment, code, input, output. I can do nothing with abstract.

License
-------

This software is released under the MIT License, see LICENSE.txt.
npm package: @snapsheet/reprogressbars
Description: React progress bars
Author: Nick Stanish
Latest version: 2.0.1

# Reprogressbars

[![npm version](https://badge.fury.io/js/reprogressbars.svg)](http://badge.fury.io/js/reprogressbars)
[![npm downloads](https://img.shields.io/npm/dm/reprogressbars.svg?style=flat-square)](https://www.npmjs.com/package/reprogressbars)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/nickstanish/reprogressbars/raw/master/LICENSE)
[![Build Status](https://travis-ci.org/nickstanish/reprogressbars.svg?branch=master)](https://travis-ci.org/nickstanish/reprogressbars)
[![minzipped size](https://badgen.net/bundlephobia/minzip/reprogressbars)](https://bundlephobia.com/result?p=reprogressbars)



## Intro

Reprogressbars is a progress bar library built on React.

The main purpose of this library is to simplify displaying progress from ajax requests so that you can just specify when you are and are not loading, and Reprogressbars can animate automatically in between.

## Examples

```jsx
import { ProgressBar } from 'reprogressbars';

<ProgressBar isLoading={this.state.isLoading} />
```


For a progress bar fixed to the top of your page:

```jsx
<ProgressBar isLoading={this.state.isLoading} className="fixed-progress-bar" />
```

```css
.fixed-progress-bar {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
}
```

The `isLoading` prop makes for simple integration with [Redux](https://github.com/nickstanish/reprogressbars/wiki/Redux-Usage).

You can also change the height or color:

```jsx
<ProgressBar isLoading={this.state.isLoading} height="4px" color="#B71C1C" />
```

## API

See [docs](https://github.com/nickstanish/reprogressbars/tree/master/docs)


## Contribution

Please create an issue for issues or bugs. Pull requests welcome.

## License

[MIT](http://opensource.org/licenses/MIT)

Copyright (c) 2017-2021 Nick Stanish
npm package: @snapshot-labs/eslint-config-vue
Description: ``` yarn add @snapshot-labs/eslint-config-vue ```
Latest version: 0.1.0

## `@snapshot-labs/eslint-config-vue`

### Installation

```
yarn add @snapshot-labs/eslint-config-vue
```

### Usage

```
{
  "extends": "@snapshot-labs/vue"
}
```
npm package: @snapshot-labs/keycard
Description: ## Install
Latest version: 0.5.1

# Keycard.js

## Install

To install Keycard.js on Node.js, open your terminal and run:

```bash
npm install @snapshot-labs/keycard
```

## Tests and coverage

To run the unit tests, open your terminal and run:

```bash
npm run test
```

To run the unit tests with coverage, open your terminal and run:

```bash
npm run coverage
```

### Test with local keycard API

To run the tests with a local keycard API, feel free to update src/keycard.ts file and open your terminal and run:

```bash
npm run test:local
```
npm package: @snapshot-labs/lock
Description: A lightweight JavaScript library for log in to Ethereum.
Latest version: 0.2.11

# Lock.js

A lightweight JavaScript library for log in to Ethereum.

### Install
To install Lock.js, open your terminal and run:
```
npm install github:snapshot-labs/lock
```

#### Browser
You can create an index.html file and include Lock.js with:
```html
<script src="https://cdn.jsdelivr.net/npm/@snapshot-labs/lock"></script>
```

### Usage
```js
import { Lock } from '@snapshot-labs/lock';
import injected from '@snapshot-labs/lock/connectors/injected';
import walletconnect from '@snapshot-labs/lock/connectors/walletconnect';

// Init Lock
const lock = new Lock();

// Add injected connector
lock.addConnector({
  key: 'injected',
  connector: injected
});

// Add WalletConnect connector
lock.addConnector({
  key: 'walletconnect',
  connector: walletconnect,
  options: {
    infuraId: 'c00cb721...'
  }
});

// Log in with injected web3
const connector = lock.getConnector('injected');
const provider = await connector.connect('injected');

// Log out from WalletConnect
const connector = lock.getConnector('walletconnect');
await connector.logout();

// Is logged in?
const isLoggedIn = await connector.isLoggedIn();
```

## License

[MIT](LICENSE).
npm package: @snapshot-labs/pineapple
Description: Blazing fast IPFS JSON pinning with replication on multiple pinning services.
Latest version: 1.2.1

[![npm](https://img.shields.io/npm/v/@snapshot-labs/pineapple.svg)](https://www.npmjs.com/package/@snapshot-labs/pineapple) 

# Pineapple.js

Blazing fast IPFS JSON pinning with replication on multiple pinning services. 

### Install
Pineapple.js was designed to work both in the browser and in Node.js.

#### Node.js
To install Pineapple.js on Node.js, open your terminal and run:
```
npm install @snapshot-labs/pineapple
```

#### Browser
You can create an index.html file and include Pineapple.js with:
```html
<script src="https://cdn.jsdelivr.net/npm/@snapshot-labs/pineapple"></script>
```

### Usage
```js
import { pin } from '@snapshot-labs/pineapple';

// Pin JSON
const obj = { foo: 'bar' };
const receipt = await pin(obj);
console.log(receipt);
```

On success, it returns a receipt object:

```js 
{
  provider: 'infura',
  cid: 'xxxxx'
}
```

On error, it will return an error object like this:

```js
{
  error: {
    code: 400,
    message: 'File too big',
    data: {}
  }
}
```

### Notes

- On NodeJS, you can set the env variable `FETCH_KEEP_ALIVE` to `true` to enable keep-alive connections.
- Functions have a timeout of 10s.

### License
[MIT](LICENSE).
npm package: @snapshot-labs/snapshot-sentry
Description: `snapshot-sentry` is an npm package that contains the Sentry setup files and configurations for Snapshot backend projects. It simplifies the process of setting up Sentry for error tracking in any Snapshot service.
Latest version: 1.5.5

# Snapshot-sentry

`snapshot-sentry` is an npm package that contains the Sentry setup files and configurations for Snapshot backend projects. 
It simplifies the process of setting up Sentry for error tracking in any Snapshot service.

## Install

```bash
yarn add @snapshot-labs/snapshot-sentry
```

## Configure

Set the following env variables:

- `SENTRY_DSN` (required)
- `SENTRY_TRACE_SAMPLE_RATE` (Optional, default to `0.01`)

## Usage

### Instantiate

#### For express

Import the library in your root file 

```js 
import { initLogger, fallbackLogger } from '@snapshot-labs/snapshot-sentry'
```

Init sentry just after creating your express instance, before any middleware

```
const app = express();
initLogger(app);
```

Set the fallthrough error handler after all controllers, but before any other error middleware

```
fallbackLogger(app);
```

**Note**: If you have a catch-all route, set `fallbackLogger()` before it.

All uncaught errors, with code >= 500, will be handled automatically by Sentry. See [Capture exception](#capture-exception) for how to handle caught exceptions.

#### For vanilla js

Import the library in your root file 

```js 
import { initLogger } from '@snapshot-labs/snapshot-sentry'
```

Init sentry, as soon as possible to catch all errors.

```js 
initLogger()
```

See [Capture exception](#capture-exception) for how to handle exceptions.

### Capture exception

To capture an exception, use the `capture` function:

```js
import { capture } from '@snapshot-labs/snapshot-sentry'

try { 
  throw new Error('Ooops, someting went wrong');
} catch (e: any) {
  // Send the error to sentry
  capture(e)
}
```

You can also pass additional context data to the capture function:

```js
import { capture } from '@snapshot-labs/snapshot-sentry'

let url = '';
try { 
  url = getUrlFromSomewhere('argOne')
  throw new Error('Ooops, someting went wrong');
} catch (e: any) {
  // Send the error to sentry
  capture(e, { contexts: { input: { url: url } } })
}
```

When sentry is disabled, the `capture` function will fallback to a simple `console.log`, so no code change will be required when toggling this library on/off.

## More info

- [Sentry main doc](https://docs.sentry.io/)
- [Sentry doc for express](https://docs.sentry.io/platforms/node/guides/express/)
- [Sentry doc for NodeJS](https://docs.sentry.io/platforms/node/)

## License

Snapshot-sentry is open-sourced software licensed under the © [MIT license](LICENSE).
npm package: @snapshot-labs/snapshot.js
Description: [![npm](https://img.shields.io/npm/v/@snapshot-labs/snapshot.js?label=npm)](https://www.npmjs.com/package/@snapshot-labs/snapshot.js)
Latest version: 0.14.20

# Snapshot.js

[![npm](https://img.shields.io/npm/v/@snapshot-labs/snapshot.js?label=npm)](https://www.npmjs.com/package/@snapshot-labs/snapshot.js)

## Install

Snapshot.js was designed to work both in the browser and in Node.js.

### In Node Applications

To install Snapshot.js on Node.js, open your terminal and run:

```bash
npm i @snapshot-labs/snapshot.js
```

#### Browser

You can create an index.html file and include Snapshot.js with:

```html
<script src="https://cdn.jsdelivr.net/npm/@snapshot-labs/snapshot.js"></script>
```

### Development

#### Install dependencies

```bash
yarn
```

#### Build package

```bash
yarn build
```

#### Test cases

```bash
yarn test
# or
yarn test:once
```

#### Other useful scripts

```bash
# Format ABI
yarn ts-node scripts/abi.ts
# Generate hash for types
yarn ts-node scripts/generateHashWithTypes.ts
```

### License

[MIT](LICENSE).
npm package: @snapshot-labs/sx
Description: Tests are run using [`anvil`](https://book.getfoundry.sh/reference/anvil/) and [`starknet-devnet`](https://0xspaceshard.github.io/starknet-devnet/) local nodes and you need to have them available before running.
Latest version: 0.1.10

# sx.js

### Running integration tests

Tests are run using [`anvil`](https://book.getfoundry.sh/reference/anvil/) and [`starknet-devnet`](https://0xspaceshard.github.io/starknet-devnet/) local nodes and you need to have them available before running.

## Running sx-evm tests

You need to have `anvil` running to run `sx-evm` tests.
Start it using `yarn node:evm`.

```
yarn test:integration:evm
```

## Running sx-starknet tests

You need to have both `anvil` and `starknet-devnet` running to run `sx-evm` tests.
Start them using `yarn node:evm` and `yarn node:starknet`.

```
yarn test:integration:starknet
```
npm package: @snapshot-labs/tune
Description: Web3 governance components for Vue 3
Author: samuv.eth
Latest version: 0.1.36

# Tune Component Library

Tune is a Vue 3 component library and form generator.

## Previews

Histoire: https://tune-histoire.vercel.app/

## Installation & Usage

```bash
yarn add @snapshot-labs/tune
```

Import CSS
```js
// main.ts
import "@snapshot-labs/tune/dist/style.css";
```

Import components
```js
import { TuneInput } from "@snapshot-labs/tune";
```

Or use [unplugin-vue-components](https://github.com/antfu/unplugin-vue-components) for auto import and add
```js
componentName => {
  if (componentName.startsWith('Tune'))
    return { name: componentName, from: '@snapshot-labs/tune' };
  }
      
```

## Development

### Histoire Component Stories

Tune uses Histoire for developing and previewing component stories in isolation. To run Histoire for component stories, execute the following:

```bash
yarn story:dev
```

This command will start the Histoire development server, enabling you to work on your component stories in an isolated environment.
npm package: @snapshot-site/cli
Description: Official CLI for the Snapshot Site API
Author: Snapshot Site
Latest version: 0.1.0

# Snapshot Site CLI

[![npm](https://img.shields.io/npm/v/%40snapshot-site%2Fcli.svg)](https://www.npmjs.com/package/@snapshot-site/cli)
[![Node](https://img.shields.io/badge/node-%3E%3D20.9.0-339933.svg)](https://nodejs.org/)
[![License](https://img.shields.io/github/license/snapshot-site/snapshot-site-cli.svg?cacheSeconds=300)](https://github.com/snapshot-site/snapshot-site-cli/blob/main/LICENSE)
[![CI](https://github.com/snapshot-site/snapshot-site-cli/actions/workflows/tests.yml/badge.svg)](https://github.com/snapshot-site/snapshot-site-cli/actions/workflows/tests.yml)

Official CLI for the Snapshot Site API.

## Install

```bash
pnpm add -g @snapshot-site/cli
```

Create your API token in Snapshot Site Console:

- https://console.snapshot-site.com

## Usage

```bash
export SNAPSHOT_SITE_API_KEY=your_key

snapshot-site screenshot --url https://snapshot-site.com --full-size
snapshot-site analyze --url https://snapshot-site.com --enable-summary --enable-quality
snapshot-site compare --before-url https://snapshot-site.com --after-url https://staging.snapshot-site.com --full-size
```

## Login and local config

The CLI can persist your API key in a local config file:

```bash
snapshot-site login --api-key ss_live_xxx
snapshot-site whoami-config
snapshot-site logout
```

Config path:

```bash
~/.config/snapshot-site/config.json
```

Environment variables still work and override the saved config:

```bash
export SNAPSHOT_SITE_API_KEY=ss_live_xxx
export SNAPSHOT_SITE_BASE_URL=https://api.prod.ss.snapshot-site.com
```

## Complete examples

### Take a screenshot and save the PNG

```bash
snapshot-site screenshot \
  --url https://snapshot-site.com/pricing \
  --width 1440 \
  --full-size \
  --hide-cookie \
  --output ./pricing.json \
  --save-image ./pricing.png
```

### Analyze a page with summary and quality checks

```bash
snapshot-site analyze \
  --url https://snapshot-site.com \
  --width 1440 \
  --full-size \
  --enable-summary \
  --enable-quality \
  --output ./analysis.json \
  --save-image ./analysis.png
```

### Compare staging vs production and save before/after/diff

```bash
snapshot-site compare \
  --before-url https://snapshot-site.com/pricing \
  --after-url https://staging.snapshot-site.com/pricing \
  --width 1440 \
  --full-size \
  --hide-cookie \
  --threshold 0.1 \
  --output ./compare.json \
  --save-image ./compare-assets
```

### Compare from a JSON payload

```bash
snapshot-site compare \
  --input ./compare-payload.json \
  --output ./compare.json \
  --save-image ./compare-assets
```

## Save assets locally

```bash
snapshot-site screenshot --url https://snapshot-site.com --save-image
snapshot-site analyze --url https://snapshot-site.com --enable-quality --save-image ./analysis.png
snapshot-site compare --before-url https://snapshot-site.com --after-url https://staging.snapshot-site.com --save-image ./compare-output
```

## Publish

```bash
pnpm run prepublishOnly
npm publish --access public
```
npm package: @snapshot-site/mcp
Description: MCP server for the Snapshot Site API
Author: Snapshot Site
Latest version: 0.1.1

# Snapshot Site MCP

[![npm](https://img.shields.io/npm/v/%40snapshot-site%2Fmcp.svg)](https://www.npmjs.com/package/@snapshot-site/mcp)
[![Node](https://img.shields.io/badge/node-%3E%3D20.9.0-339933.svg)](https://nodejs.org/)
[![License](https://img.shields.io/github/license/snapshot-site/snapshot-site-mcp.svg?cacheSeconds=300)](https://github.com/snapshot-site/snapshot-site-mcp/blob/main/LICENSE)
[![CI](https://github.com/snapshot-site/snapshot-site-mcp/actions/workflows/tests.yml/badge.svg)](https://github.com/snapshot-site/snapshot-site-mcp/actions/workflows/tests.yml)

Official MCP server for the Snapshot Site API

Create your API token in Snapshot Site Console:

- https://console.snapshot-site.com

## Tools

- `screenshot`
- `analyze`
- `compare`

These tools are annotated for MCP clients as:

- read-only
- idempotent
- open-world

They also include richer titles, category metadata, and example intents to improve tool selection in Claude Desktop and Cursor.

## Environment

```bash
export SNAPSHOT_SITE_API_KEY=ss_live_xxx
export SNAPSHOT_SITE_BASE_URL=https://api.prod.ss.snapshot-site.com
```

## Build

```bash
pnpm install
pnpm run build
```

## Claude Desktop configuration

```json
{
  "mcpServers": {
    "snapshot-site": {
      "command": "node",
      "args": ["/absolute/path/to/snapshot-site-mcp/build/server.js"],
      "env": {
        "SNAPSHOT_SITE_API_KEY": "ss_live_xxx",
        "SNAPSHOT_SITE_BASE_URL": "https://api.prod.ss.snapshot-site.com"
      }
    }
  }
}
```

## Cursor configuration

```json
{
  "mcpServers": {
    "snapshot-site": {
      "command": "node",
      "args": ["/absolute/path/to/snapshot-site-mcp/build/server.js"],
      "env": {
        "SNAPSHOT_SITE_API_KEY": "ss_live_xxx"
      }
    }
  }
}
```
npm package: @snapshot-site/sdk
Description: Official TypeScript SDK for the Snapshot Site API
Author: Snapshot Site
Latest version: 0.1.0

# Snapshot Site TypeScript SDK

[![npm](https://img.shields.io/npm/v/%40snapshot-site%2Fsdk.svg)](https://www.npmjs.com/package/@snapshot-site/sdk)
[![npm downloads](https://img.shields.io/npm/dm/%40snapshot-site%2Fsdk.svg)](https://www.npmjs.com/package/@snapshot-site/sdk)
[![Node](https://img.shields.io/badge/node-%3E%3D20.9.0-339933.svg)](https://nodejs.org/)
[![License](https://img.shields.io/npm/l/%40snapshot-site%2Fsdk.svg)](https://www.npmjs.com/package/@snapshot-site/sdk)
[![CI](https://github.com/snapshot-site/snapshot-site-typescript-sdk/actions/workflows/tests.yml/badge.svg)](https://github.com/snapshot-site/snapshot-site-typescript-sdk/actions/workflows/tests.yml)

Official TypeScript SDK for the Snapshot Site API.

## Install

```bash
pnpm add @snapshot-site/sdk
```

## Usage

```ts
import { SnapshotSiteClient } from "@snapshot-site/sdk";

const client = new SnapshotSiteClient({
  apiKey: process.env.SNAPSHOT_SITE_API_KEY!,
});

const shot = await client.screenshot({
  url: "https://snapshot-site.com",
  format: "png",
  fullSize: true,
});
```

## Complete examples

### Screenshot

```ts
import { SnapshotSiteClient } from "@snapshot-site/sdk";

const client = new SnapshotSiteClient({
  apiKey: process.env.SNAPSHOT_SITE_API_KEY!,
});

const result = await client.screenshot({
  url: "https://snapshot-site.com/pricing",
  format: "png",
  width: 1440,
  fullSize: true,
  hideCookie: true,
});

console.log(result.link);
```

### Analyze

```ts
import { SnapshotSiteClient } from "@snapshot-site/sdk";

const client = new SnapshotSiteClient({
  apiKey: process.env.SNAPSHOT_SITE_API_KEY!,
});

const analysis = await client.analyze({
  url: "https://snapshot-site.com",
  width: 1440,
  fullSize: true,
  enableSummary: true,
  enableQuality: true,
});

console.log(analysis.summary);
console.log(analysis.quality);
```

### Compare

```ts
import { SnapshotSiteClient } from "@snapshot-site/sdk";

const client = new SnapshotSiteClient({
  apiKey: process.env.SNAPSHOT_SITE_API_KEY!,
});

const diff = await client.compare({
  before: {
    url: "https://snapshot-site.com/pricing",
    width: 1440,
    fullSize: true,
    hideCookie: true,
  },
  after: {
    url: "https://staging.snapshot-site.com/pricing",
    width: 1440,
    fullSize: true,
    hideCookie: true,
  },
  threshold: 0.1,
});

console.log(diff.diff?.link);
console.log(diff.summary?.mismatchPercentage);
```

## Methods

- `client.screenshot(payload)`
- `client.analyze(payload)`
- `client.compare(payload)`
npm package: @snapstack/config
Description: Environment variable validation
Author: SnapStack
Latest version: 0.1.4

# @snapstack/config

[![npm version](https://badge.fury.io/js/@snapstack%2Fconfig.svg)](https://badge.fury.io/js/@snapstack%2Fconfig)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A progressive, type-safe, lightweight configuration management library for TypeScript applications based on Zod.

## Installation

```bash
npm install @snapstack/config
```

## Quick Start

```typescript
import { parse, z } from '@snapstack/config';

// 1. BASIC USAGE - Define schema, get typed config
const config = parse({
  schema: z.object({
    PORT: z.number().default(3000),
    DATABASE_URL: z.string(),
    POOL_SIZE: z.number().default(10),
    REDIS_URL: z.string(),
    REDIS_TTL: z.number().default(3600)
  })
});

// Load config from env vars and .env file
const settings = await config.load();

// Fully typed!
console.log(`Server on port ${settings.port}`);


```

## Basic setup

```typescript
const config = parse({
  schema: z.object({
    PORT: z.number().default(3000),
    API_URL: z.string().url(),
    DEBUG: z.boolean().default(false),
    NODE_ENV: z.enum(["development", "production"]).default("development")
  })
});

// with .env file
// PORT=3000
// API_URL="https://api.snapcaster.ca
// DEBUG=0

// Access like so
console.log(config.PORT);
console.log(config.DATABASE_URL)

// Watch for changes in development
if (config.NODE_ENV === 'development') {
  config.watch((newConfig, changes) => {
    console.log('Config changed:', changes);
  });
}

// 3. ERROR HANDLING - Beautiful, actionable errors

try {
  await config.load();
} catch (error) {
  console.error(error.message);
  // Configuration Error:
  //
  //   ❌ DATABASE_URL: Missing required value
  //   ❌ PORT: Expected number, got string
  process.exit(1);
}
```
npm package: @snapstack/monitoring
Description: Monitoring utilities for Snapcaster microservices
Author: Snapcaster
Latest version: 0.1.2

# @snapstack/monitoring

Monitoring and observability utilities for Snapcaster microservices based on LGTM stack (Loki, Grafana, Tempo, Mimir).

## Features

-   **Structured Logging** - Winston-based logging with Loki integration
-   **Distributed Tracing** - OpenTelemetry-based tracing with Tempo
-   **Metrics Collection** - Prometheus-compatible metrics with Mimir
-   **Express Middleware** - Request/response logging, correlation IDs, and error handling

## Installation

```bash
pnpm add @snapstack/monitoring
```

## Usage

### Basic Setup

```typescript
import { initObservability } from '@snapstack/monitoring';

const { logger, tracer, metrics } = initObservability({
	serviceName: 'your-service-name',
	environment: process.env.NODE_ENV,
});

logger.info('Service initialized successfully');
```

### Express Integration

```typescript
import express from 'express';
import {
	initObservability,
	correlationIdMiddleware,
	requestLoggingMiddleware,
	errorHandlingMiddleware,
} from '@snapstack/monitoring';

const app = express();
const { logger } = initObservability({ serviceName: 'api-service' });

// Add middleware - order matters!
app.use(express.json());
app.use(correlationIdMiddleware());
app.use(requestLoggingMiddleware(logger));

// Your routes here
app.get('/health', (req, res) => {
	res.json({ status: 'ok' });
});

// Add error handling middleware last
app.use(errorHandlingMiddleware(logger));

app.listen(3000, () => {
	logger.info('Server started on port 3000');
});
```

## Configuration Options

### Observability Options

```typescript
interface ObservabilityOptions {
	serviceName: string; // Required: Name of your service
	environment?: string; // Optional: Environment (default: process.env.NODE_ENV || 'development')
	lokiUrl?: string; // Optional: Loki URL (default: 'http://loki:3100')
	tempoUrl?: string; // Optional: Tempo URL (default: 'http://tempo:4318/v1/traces')
	metricsPort?: number; // Optional: Metrics port (default: 9464)
}
```

## Local Development

To use this package with the LGTM stack locally:

1. Start the monitoring stack using docker-compose:

```bash
docker-compose -f docker-compose-monitoring.yml up -d
```

2. Configure your service to use local URLs:

```typescript
const { logger, tracer, metrics } = initObservability({
	serviceName: 'your-service',
	lokiUrl: 'http://localhost:3100',
	tempoUrl: 'http://localhost:4318/v1/traces',
});
```

3. Access Grafana at [http://localhost:3000](http://localhost:3000)

## Advanced Usage

### Individual Components

If you only need specific components:

```typescript
import { createLogger, initTracing, initMetrics } from '@snapstack/monitoring';

// Just logging
const logger = createLogger({
	serviceName: 'logger-only-service',
});

// Just tracing
const tracer = initTracing({
	serviceName: 'tracer-only-service',
});

// Just metrics
const metrics = initMetrics({
	serviceName: 'metrics-only-service',
	port: 9090,
});
```

## License

MIT
npm package: @snapstack/rabbitmq
Description: A simple TypeScript RabbitMQ wrapper for microservices.
Author: Bryce Eppler
Latest version: 1.0.2

# Consumer Library RabbitMQ

A lightweight TypeScript wrapper for the amqplib package that simplifies working with RabbitMQ. This library provides a clean API for common RabbitMQ operations with built-in connection management, automatic reconnection, and error handling.

## Features

- Simple promise-based API for RabbitMQ operations
- Automatic reconnection with exponential backoff and jitter
- Connection health checks
- Typed message handling
- Easy queue, exchange, and binding management
- JSON serialization and deserialization

## Installation

```bash
pnpm add @snapstack/rabbitmq
```

## Usage

### Basic Setup

```typescript
import { RabbitMQ } from '@snapstack/rabbitmq';

// Create a new RabbitMQ instance
const rabbit = new RabbitMQ({
  url: 'amqp://localhost',
  reconnectTimeoutMs: 5000,
  prefetch: 10,
});

// Connect to RabbitMQ
await rabbit.connect();
```

### Publishing Messages

```typescript
// Publish a message to an exchange
await rabbit.assertExchange('notifications', 'fanout');
await rabbit.publish('notifications', '', { 
  userId: '123', 
  message: 'Hello World' 
});

// Using direct exchange with routing keys
await rabbit.assertExchange('tasks', 'direct');
await rabbit.publish('tasks', 'high-priority', { 
  taskId: '456', 
  data: { action: 'process' } 
});
```

### Consuming Messages

```typescript
// Define a typed message handler
interface TaskMessage {
  taskId: string;
  data: {
    action: string;
    [key: string]: any;
  };
}

// Assert queue and exchange
await rabbit.assertQueue('task-processor');
await rabbit.assertExchange('tasks', 'direct');
await rabbit.bindQueue('task-processor', 'tasks', 'high-priority');

// Consume messages
await rabbit.consume<TaskMessage>('task-processor', async (message, raw) => {
  console.log(`Processing task ${message.taskId}`);
  // Process the message
  // No need to manually acknowledge - handled automatically
});
```

### Health Checks

```typescript
// Check if the connection is healthy
if (rabbit.isHealthy()) {
  console.log('RabbitMQ connection is healthy');
} else {
  console.log('RabbitMQ connection is not healthy');
}
```

### Cleanup

```typescript
// Close the connection when done
await rabbit.close();
```

## Configuration Options

| Option | Type | Description | Default |
|--------|------|-------------|---------|
| url | string | The RabbitMQ connection URL | Required |
| prefetch | number | Maximum number of unacknowledged messages | undefined |
| reconnectTimeoutMs | number | Base timeout for reconnection attempts | 5000 |
| logger | function | Custom logging function | console.log |

## Error Handling

The library automatically handles connection errors and attempts to reconnect with exponential backoff and jitter. Message processing errors are logged and the message is rejected (not requeued).

## License

MIT
npm package: @snapstrat/pino-datadog
Description: A transport for pino that sends messages to DataDog
Author: Osmond van Hemert
Latest version: 2.0.3

# pino-datadog

[![CI](https://github.com/ovhemert/pino-datadog/workflows/CI/badge.svg)](https://github.com/ovhemert/pino-datadog/actions)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/fbe6390adeba49a5a62349410a8439cc)](https://www.codacy.com/app/ovhemert/pino-datadog?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=ovhemert/pino-datadog&amp;utm_campaign=Badge_Grade)
[![Known Vulnerabilities](https://snyk.io/test/npm/pino-datadog/badge.svg)](https://snyk.io/test/npm/pino-datadog)
[![Coverage Status](https://coveralls.io/repos/github/ovhemert/pino-datadog/badge.svg?branch=master)](https://coveralls.io/github/ovhemert/pino-datadog?branch=master)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)

This module provides a "transport" for [pino][pino] that forwards messages to a [DataDog][datadog].

## Installation

To use globally from command line:

```bash
npm install -g pino-datadog
```

To include as a library in your project:

```bash
npm install pino-datadog
```

## CLI

Want to use `pino-datadog` from the CLI?
See the [CLI](./docs/CLI.md) documentation for details.

## API

Want to use `pino-datadog` as a library in your project?
See the [API](./docs/API.md) documentation for details.

## Maintainers

Osmond van Hemert
[![Github](https://img.shields.io/badge/-website.svg?style=social&logoColor=333&logo=github)](https://github.com/ovhemert)
[![Web](https://img.shields.io/badge/-website.svg?style=social&logoColor=333&logo=nextdoor)](https://ovhemert.dev)

## Contributing

If you would like to help out with some code, check the [details](./.github/CONTRIBUTING.md).

Not a coder, but still want to support? Have a look at the options available to [donate](https://ovhemert.dev/donate).

## License

Licensed under [MIT](./LICENSE).

[pino]: https://www.npmjs.com/package/pino
[datadog]: https://www.datadoghq.com
npm package: @snapview/sunrise
Description: The reactive library for the spreadsheet driven development
Author: Denis Krivosheev
Latest version: 0.0.10

# Publish to npm

Normal commits will only be tested by CI - nothing more. To trigger publishing
to npm, you need to push [a tagged
commit](https://git-scm.com/book/en/v2/Git-Basics-Tagging).

Here is how you do this:

-   increment version
    -   patch
    ```console
    $ npm version patch
    v0.0.10
    ```
    -   minor
    ```console
    $ npm version minor
    v0.1.0
    ```
    -   major
    ```console
    $ npm version major
    v1.0.0
    ```
-   npm has increased version number in `package.json` and `package-lock.json`
    and created a tagged commit with this new version number

-   now push commit and tag

    ```console
    $ git push --follow-tags
    ...
    To github.com:snapview/sunrise.git
       90c4052..e0bc73d  master -> master
     * [new tag]         v0.0.9 -> v0.0.9

    ```
npm package: @snarechops/testit
Description: Extremely basic and minimal unit testing. Finds and runs unit tests as exported functions from files. Includes a simple assert library for simple testing.
Author: SnareChops
Latest version: 0.0.3

## Testit
Extremely basic and minimal unit testing.
Finds and runs unit tests as exported functions from files.
Includes a simple assert library for simple testing.

```
npm install @snarechops/testit
```

By default, specify your tests in files ending with `.test.js` or `.test.ts`. Tests are simply exported
functions that have a name that starts with `test`. Tests can be async. A test fails if an error is thrown, 
otherwise it passes

```javascript
// some.test.js
import assert from '@snarechops/testit'

function add(a, b){
  return a + b
}

export testAddition() {
  assert.equal(3, add(1,2))
}

export function testSimpleFail() {
  assert.false(true)
}
```

Run your tests with the following command, or equivalent. Set this to your `npm test` script for easier execution.
```
node_modules/.bin/testit
```

### Features

- Tests are simple functions
- Tests fail on thrown error. Use the included assert library, throw errors manually, or use any other preferred assertion library that throws errors
- Tests can be in separate files, folders, or even included in your main source code.
  - Do not put tests in a file that has auto-executing code triggered by importing the file. May result in unexpected behaviour.
- Minimally configurable through package.json
- Will support typescript natively if running with a node environment that loads typescript directly.

Currently NOT supported in the browser. Does not include line numbers in error messages. Does not provide test coverage.

### Configuration
Configuration is read from your package.json file but is not required.

```json
  "testit": {
    "pattern": ".*\\.test\\.(?:ts|js)$",
    "exclude": ["node_modules"],
    "prefix": "^test.*"
  }
```

| Property | Default                  | Description                                                           |
|----------|--------------------------|-----------------------------------------------------------------------|
| pattern  | ".*\\.test\\.(?:ts|js)$" | A regular expression to find your test files                          |
| exclude  |  ["node_modules"]        | An array of regular expressions to be excluded when looking for tests | 
| prefix   | "^test.*"                | The prefix for function names that are considered tests               |
npm package: @snarloff/eslint-config
Description: Este pacote é uma configuração pré-definida do ESLint e Prettier para projetos Node.js e Next.js, com base no pacote desenvolvido pela Rocketseat. Ele foi criado para facilitar a configuração do linter em seus projetos e garantir a consistência do código 
Latest version: 1.0.6

# @snarloff/eslint-config

Este pacote é uma configuração pré-definida do ESLint e Prettier para projetos Node.js e Next.js, com base no pacote desenvolvido pela Rocketseat. Ele foi criado para facilitar a configuração do linter em seus projetos e garantir a consistência do código em toda a equipe.

## Instalação

Para começar a usar esta configuração, siga os seguintes passos:

1. Certifique-se de que você tenha o Node.js instalado em sua máquina. Caso contrário, você pode baixá-lo [aqui](https://nodejs.org/).

2. Crie um novo projeto Node.js ou acesse um projeto existente.

3. Abra o terminal na raiz do seu projeto e execute o seguinte comando:

```bash
npm install --save-dev eslint @snarloff/eslint-config
```

4. Crie um arquivo `.eslintrc.js` na raiz do seu projeto com o seguinte conteúdo:

```javascript
module.exports = {
  extends: '@snarloff/eslint-config/[node ou next]',
};
```

5. Você também pode adicionar scripts ao seu `package.json` para executar o ESLint e o Prettier facilmente. Por exemplo:

```json
{
  "scripts": {
    "lint": "eslint . --ext .js,.jsx,.ts,.tsx",
    "lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
    "format": "prettier --write ."
  }
}
```

Agora, você pode executar `npm run lint` para verificar seu código em busca de problemas e `npm run lint:fix` para corrigi-los automaticamente. Você também pode executar `npm run format` para formatar seu código usando o Prettier.

## Configurações Adicionais

Este pacote é uma configuração básica do ESLint e Prettier. Se você deseja adicionar ou substituir regras, basta estender a configuração no seu arquivo `.eslintrc.js`. Você pode fazer isso adicionando um objeto de configuração personalizada, por exemplo:

```javascript
module.exports = {
  extends: '@snarloff/eslint-config/node',
  rules: {
    // Suas regras personalizadas aqui
  },
};
```

Certifique-se de verificar a documentação do [ESLint](https://eslint.org/docs/rules/) para ver todas as regras disponíveis e como configurá-las.

## Licença

Este projeto é licenciado sob a Licença MIT - consulte o arquivo [LICENSE](LICENSE) para obter detalhes.

## Contribuição

Se você encontrar problemas ou tiver sugestões de melhoria, sinta-se à vontade para abrir uma [issue](https://github.com/Snarloff/eslint-config-snarloff/issues) ou enviar um [pull request](https://github.com/Snarloff/eslint-config-snarloff/pulls) no GitHub. Suas contribuições são bem-vindas!