open-index/open-npm huggingface dataset:
npm package: @starzel/volto-subnavigation
Description: volto-subnavigation: Volto add-on
Latest version: 0.1.1

# volto-subnavigation

## Introduction

## Development

You can develop an add-on in isolation using the boilerplate already provided by the add-on generator.
The project is configured to have the current add-on installed and ready to work with.
This is useful to bootstrap an isolated environment that can be used to quickly develop the add-on or for demo purposes.
It's also useful when testing an add-on in a CI environment.

```{note}
It's quite similar when you develop a Plone backend add-on in the Python side, and embed a ready to use Plone build (using buildout or pip) in order to develop and test the package.
```

The dockerized approach performs all these actions in a custom built docker environment:

1. Generates a vanilla project using the official Volto Yo Generator (@plone/generator-volto)
2. Configures it to use the add-on with the name stated in the `package.json`
3. Links the root of the add-on inside the created project

After that you can use the inner dockerized project, and run any standard Volto command for linting, acceptance test or unit tests using Makefile commands provided for your convenience.

### Setup the environment

Run once

```shell
make dev
```

which will build and launch the backend and frontend containers.
There's no need to build them again after doing it the first time unless something has changed from the container setup.

In order to make the local IDE play well with this setup, is it required to run once `yarn` to install locally the required packages (ESlint, Prettier, Stylelint).

Run

```shell
yarn
```

### Build the containers manually

Run

```shell
make build-backend
make build-addon
```

### Run the containers

Run

```shell
make start-dev
```

This will start both the frontend and backend containers.

### Stop Backend (Docker)

After developing, in order to stop the running backend, don't forget to run:

Run

```shell
make stop-backend
```

### Linting

Run

```shell
make lint
```

### Formatting

Run

```shell
make format
```

### i18n

Run

```shell
make i18n
```

### Unit tests

Run

```shell
make test
```

### Acceptance tests

Run once

```shell
make install-acceptance
```

For starting the servers

Run

```shell
make start-test-acceptance-server
```

The frontend is run in dev mode, so development while writing tests is possible.

Run

```shell
make test-acceptance
```

To run Cypress tests afterwards.

When finished, don't forget to shutdown the backend server.

```shell
make stop-test-acceptance-server
```

### Release

Run

```shell
make release
```

For releasing a RC version

Run

```shell
make release-rc
```
npm package: @starzio/vue-particles.js
Description: ```bash yarn add @starzio/vue-particles.js --save --dev ``` Or ```bash npm install @starzio/vue-particles.js --save-dev ```
Latest version: 0.1.2
Deprecated: This package have been moved to @dxcat/vue-particles.js

# vue-particles.js
### Vue.js component for [particles.js](https://vincentgarreau.com/particles.js/)

### Nuxt.js compatible (client only)

## Add to your project
```bash
yarn add @starzio/vue-particles.js --save --dev
```
Or
```bash
npm install @starzio/vue-particles.js --save-dev
```

## Configure with vue
```javascript
import Vue from 'vue'
import VueParticlesJS from 'vue-particles.js'

Vue.use(VueParticlesJS)
```

## Include in your page
```vue
<template>
  <div id="app">
    <vue-particles></vue-particles>
  </div>
</template>
```


## Customization
you can modify the particlesData prop to use your own particles.js config object.
```vue
<template>
  <div id="app">
    <vue-particles :particlesData="particlesData"></vue-particles>
  </div>
</template>

<script>
import particlesJSConfig from './particlesjs-config.json'

export default {
  data: function () {
    return {
      particlesData: particlesJSConfig
    }
  }
}
</script>
```
You can generate your particlesjs-config.json file from [particles.js](https://vincentgarreau.com/particles.js/) website.

#### That's it! If you have any questions or issues, feel free to open a pull request.
npm package: @starzkg/vuepress-plugin-archive
Description: Add This plugin for vuepress
Author: Starzkg
Latest version: 1.0.0-beta.25

<!-- markdownlint-disable -->
<p align="center">
  <img width="240" src="https://vuepress-star.shentuzhigang.cn/images/hero.png" style="text-align: center;"/>
</p>
<h1 align="center">vuepress-plugin-archive</h1>
<h4 align="center">VuePress Archive plugin 💌 / VuePress Archive 插件 💌</h4>

[![Author: Starzkg](https://img.shields.io/badge/Author-Starzkg-blue.svg?style=for-the-badge)](https://shentuzhigang.cn)

<!-- markdownlint-restore -->

[![Version](https://img.shields.io/npm/v/@starzkg/vuepress-plugin-archive.svg?style=flat-square&logo=npm) ![Downloads](https://img.shields.io/npm/dm/@starzkg/vuepress-plugin-archive.svg?style=flat-square&logo=npm) ![Size](https://img.shields.io/bundlephobia/min/@starzkg/vuepress-plugin-archive?style=flat-square&logo=npm)](https://www.npmjs.com/package/@starzkg/vuepress-plugin-archive)

VuePress Archive plugin 💌 / VuePress Archive 插件 💌

## [Official Docs](https://vuepress-theme-star.github.io/add-this/) / [官方文档](https://vuepress-theme-star.github.io/add-this/zh/)

## Install

```bash
npm i -D v@starzkg/uepress-plugin-archive
```

Or

```bash
yarn add -D @starzkg/vuepress-plugin-archive
```

---

## 安装

```bash
npm i -D @starzkg/vuepress-plugin-archive
```

或

```bash
yarn add -D @starzkg/vuepress-plugin-archive
```
npm package: @stas-kh/ngx-datatable
Description: @stas-kh/ngx-datatable is an Angular table grid component for presenting large and complex data.
Author: Stanislav Khorunzhyi
Latest version: 8.2.0

# @stas-kh/ngx-datatable
It is a forked version of [@swimlane/ngx-datatable](https://github.com/swimlane/ngx-datatable) with fixes for Internet Explorer 11.

## Changes in this version
- Fixed problem with drag'n'dropping header cells in IE 11
- Recovered resizing for header cells in IE 11
- Added moving for header cells instead of reordering
- Moved scrollbar between header and table content

## Installation
To use ngx-datatable-with-ie-fix in your project install it via [npm](https://www.npmjs.com/package/@swimlane/ngx-datatable):
```
npm i @stas-kh/ngx-datatable --save
```
npm package: @stas_fr/git-digest
Description: An intelligent CLI tool that uses AI to analyze git commits and generate a clear, human-readable report.
Author: Farkash Stanislav
Latest version: 0.8.0
Deprecated: This package has been renamed to git-friday. Please update your dependencies.

# Git Digest

An intelligent CLI tool that uses AI to analyze git commits and generate a clear, human-readable report. It helps team leads and managers quickly understand the progress made by developers without digging through technical commit logs.

## Installation

You can install Git Digest globally using your preferred package manager:

### npm
```bash
npm install -g @stas_fr/git-digest
```

### pnpm
```bash
pnpm add -g @stas_fr/git-digest
```

### yarn
```bash
yarn global add @stas_fr/git-digest
```

## Usage

To use the utility, you must be inside a Git repository.

### Prerequisites

Before running, you need to create a `.env` file in the root of your repository. This file must contain the following two variables:

*   `OPEN_ROUTER_API_KEY`: Your API key for the OpenRouter service.
*   `AI_COMPLETION_MODEL`: The identifier of the AI model you want to use (e.g., `mistralai/mistral-7b-instruct`).
*   `JSONDB_PATH`: The path to the directory where the JSON database file (`db.json`) will be stored.

The tool will not work without these variables defined.

### Generating a Report

The main command is `generate`. It accepts the following parameters:

*   `-a, --authors <authors...>`: (Required) A space-separated list of Git authors whose commits you want to analyze.
*   `-b, --branches <branches...>`: (Required) A space-separated list of branches to include in the analysis.

### Example

Here is an example of how to run the command:

```bash
gtc generate -a s.farkash stas_fr -b dev main
```

This command will search for all commits made today by the authors `s.farkash` and `stas_fr` within the `dev` and `main` branches, and then generate a consolidated report based on them.

## Workflow

- [Release Workflow (EN)](./docs/release-workflow.en.md)
- [Release Workflow (RU)](./docs/release-workflow.ru.md)
npm package: @stash-it/core
Description: Core package for @stash-it ecosystem, containing interfaces and types for main class, adapters and plugins (and some other things).
Latest version: 0.5.0

# `@stash-it/core`

![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)

Set of interfaces and types for `@stash-it`, for main class, adapters and plugins (and some other things).

The main ones you'll be interested in are:

- `StashItAdapter` - base class used to create your own adapters
- `StashItPlugin` type to create your own plugins

See [usage](#usage) for examples.

## Installation

npm

```bash
npx jsr add @stash-it/core
```

deno

```bash
deno add @stash-it/core
```

yarn

```bash
yarn dlx jsr add @stash-it/core
```

pnpm

```bash
pnpm dlx jsr add @stash-it/core
```

bun

```bash
bunx jsr add @stash-it/core
```

## Usage

### `StashItAdapter`

```typescript
import { StashItAdapter } from "@stash-it/core";

// Your adapter class should extend from the base abstract class.
class MyAdapter extends StashItAdapter {
  // Your implementation here.
}
```

The base class contains two methods, that you should implement if your adapter requires establishing a connection and/or disconnecting from a storage.

For instance:

```typescript
import { StashItAdapter } from "@stash-it/core";

// Your adapter class should extend from the base abstract class.
class MyAdapter extends StashItAdapter {
  override async connect(): Promise<void> {
    // Depending on the storage, it can look different.
    // For example:
    this.#database.connect();
  }

  override async disconnect(): Promise<void> {
    this.#database.connect();
  }
}
```

### `StashItPlugin`

```typescript
import { type StashItPlugin } from "@stash-it/core";

// Your plugin can be a function that returns StashItPlugin:
const myPlugin = (someArgsIfNeedBe): StashItPlugin => {
  // Your implementation here.
};

// It can also be an object, depends on what your plugin needs:
const myPlugin2: StashItPlugin = {
  // Your implementation here.
};
```

## License

MIT

## Contribution

Feel free to open an issue or a pull request.
npm package: @stash-it/dev-tools
Description: ![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)
Latest version: 0.0.6

# `@stash-it/dev-tools`

![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)

Set of tools for development purposes.

If you want to create an adapter or a plugin for stash-it, you can use this package to help you with that.

## Installation

npm

```bash
npm install @stash-it/dev-tools
```

deno

```bash
deno add @stash-it/dev-tools
```

yarn

```bash
yarn dlx jsr add @stash-it/dev-tools
```

pnpm

```bash
pnpm dlx jsr add @stash-it/dev-tools
```

bun

```bash
bunx jsr add @stash-it/dev-tools
```

## Usage

### `runAdapterTests`

If you want to create an adapter, it should pass all of those tests. Here's how you can use them.
Oh, and you should use `vitest` for testing, the function uses it under the hood.
If you're not using `vitest` yet, you should start using it. It's awesome.

Perhaps in the future, I'll add support for other testing libraries or be more abstract, but for now it is what it is.

```typescript
// Vitest stuff
import { describe } from "vitest";

import { runAdapterTests } from "@stash-it/dev-tools";

// Your adapter.
import { YourAdapter } from "./your-adapter";

describe("YourAdapter", () => {
  const adapter = new YourAdapter();

  // Add whatever validation or other stuff you need.

  // Run the tests.
  runAdapterTests(adapter);
});
```

This helper function accepts an adapter instance and runs tests on it. It will throw an error if any of the tests fail.
It is also capable of cleaning up after self. Meaning, if you're operating on a persistent storage, it will delete all the
items created during the tests.

### `getHandler`

If you want to creat a plugin, you can use this helper function to get a handler for a specific hook.
Here's how you can use it:

```typescript
// Vitest stuff
import { describe, it, expect } from "vitest";

import { getHandler } from "@stash-it/dev-tools";

// Your plugin.
import { createPlugin } from "./your-plugin";

describe("YourPlugin", () => {
  it("does something on buildKey", async () => {
    const plugin = createPlugin();
    const key = "key";
    const handler = getHandler("buildKey", plugin);

    // Here is where you can test the handler that you created.
    const result = await handler(key);

    // expect ... etc.
  });
});
```

Why not simply do this?

```typescript
const handler = plugin.hookHandlers.buildKey;
```

Well ... current types set around plugins are not that great.
This helper function will throw an error if the handler is not a function. Also, thanks to the argument passed (hook name),
it will know what arguments the handler should accept etc. And you don't need to reach to plugin internals. You simply
request a handler for a specific hook and that's it.

## License

MIT

## Contribution

Feel free to open an issue or a pull request.
npm package: @stash-it/logger-plugin
Description: ![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)
Latest version: 0.1.0

# `@stash-it/logger-plugin`

![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)

`@stash-it/logger-plugin` is a plugin for `@stash-it/stash-it` that allows you to log data that is passed to all hook methods.

### When to use it?

When you want to track the flow of the data, before and after it goes to the adapter.

## Installation

npm

```bash
npm install @stash-it/logger-plugin
```

deno

```bash
deno add @stash-it/logger-plugin
```

yarn

```bash
yarn dlx jsr add @stash-it/logger-plugin
```

pnpm

```bash
pnpm dlx jsr add @stash-it/logger-plugin
```

bun

```bash
bunx jsr add @stash-it/logger-plugin
```

## Usage

```ts
// Import stash-it main class.
import { StashIt } from "@stash-it/stash-it";

// Import the plugin.
import { createLoggerPlugin } from "@stash-it/logger-plugin";

// For it to work you will also need an adapter.
// You can use any of the @stash-it adapters or create your own.
import { MemoryAdapter } from "@stash-it/memory-adapter";

// Create an instance of the adapter.
const adapter = new MemoryAdapter();

// Create an instance of stash-it.
const stash = new StashIt(adapter);

// Create an instance of the plugin and pass whatever function you will log with.
const plugin = createLoggerPlugin(console.log);

// Register the plugin to the stash-it instance.
stash.registerPlugins([plugin]);

// Use it.
await stash.set("key", "value");
```

Log function gets called twice, with:

1. `"beforeSetItem", { adapter: "MemoryAdapter", key: "key", value: "value", extra: {} }`
2. `"afterSetItem", { adapter: "MemoryAdapter", key: "key", value: "value", extra: {}, item: { key: "key", value: "value", extra: {} } }`

That's because:

1. First log is called before data is used by the adapter (so you know what will be sent to it), meaning when the "beforeSetItem" hook handler gets executed.
2. Second is what is passed to the "afterSetItem" hook handler.

The `adapter: "MemoryAdapter"` is basically the name of the adapter's class. If you'll be using a different one, its class' name will be logged.
npm package: @stash-it/memory-adapter
Description: ![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)
Latest version: 0.4.0

# `@stash-it/memory-adapter`

![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)

`@stash-it/memory-adapter` is a simple in-memory adapter that can be used with `@stash-it/stash-it`.

## Installation

npm

```bash
npm install @stash-it/memory-adapter
```

deno

```bash
deno add @stash-it/memory-adapter
```

yarn

```bash
yarn dlx jsr add @stash-it/memory-adapter
```

pnpm

```bash
pnpm dlx jsr add @stash-it/memory-adapter
```

bun

```bash
bunx jsr add @stash-it/memory-adapter
```

## Usage

```ts
// Import stash-it main class.
import { StashIt } from "@stash-it/stash-it";
import { MemoryAdapter } from "@stash-it/memory-adapter";

// Create an instance of the adapter.
const adapter = new MemoryAdapter();

// And use it with stash-it.
const stash = new StashIt(adapter);
```

## License

MIT

## Contribution

Feel free to open an issue or a pull request.
npm package: @stash-it/mysql-adapter
Description: ![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)
Latest version: 0.3.0

# `@stash-it/mysql-adapter`

![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)

`@stash-it/mysql-adapter` is a simple redis adapter that can be used with `@stash-it/stash-it`.
It uses `mysql2` package under the hood.

## Installation

npm

```bash
npm install @stash-it/mysql-adapter
```

deno

```bash
deno add @stash-it/mysql-adapter
```

yarn

```bash
yarn dlx jsr add @stash-it/mysql-adapter
```

pnpm

```bash
pnpm dlx jsr add @stash-it/mysql-adapter
```

bun

```bash
bunx jsr add @stash-it/mysql-adapter
```

## Usage

```ts
// Import stash-it main class.
import { StashIt } from "@stash-it/stash-it";
import { MySqlAdapter } from "@stash-it/mysql-adapter";

// Create an instance of the adapter. Use whatever configuration your MySQL instance runs on.
const adapter = new MySqlAdapter({
  connection: {
    host: "localhost",
    user: "root",
    password: "password",
    database: "database-name",
    port: 3306, // optional property, if not set, this value is used
  },
  // The whole "table" configuration is optional
  // So are the properties of this object.
  // If not provided, those values are used and expected.
  table: {
    tableName: "items",
    keyColumnName: "key",
    valueColumnName: "value",
    extraColumnName: "extra",
  },
});

// And use it with stash-it.
const stash = new StashIt(adapter);
```

## Table schema

If you don't have a table ready, you can use this query to create one. This is the expected schema.

```sql
CREATE TABLE `items` (
  `key` VARCHAR(255) PRIMARY KEY,
  `value` JSON NOT NULL,
  `extra` JSON NOT NULL
)
```

## Development/testing

### Running tests locally

Make sure to have `.env` file with those variables (and your values):

```sh
MYSQL_CONTAINER_NAME=mysql_container
MYSQL_DATABASE=database_name
MYSQL_USER=root
MYSQL_ROOT_PASSWORD=rootpassword
MYSQL_PORT=3306
```

And then execute `pnpm test`.

The tests you will run do all sorts of checks to verify if the adapter is capable of conducting CRUD operations.

If you want, you can target different DBs in different environments and run the tests against them.
The test suite will clean up after self (or at least attempt), as it is designed to add numerous data,
check if it is readable, and eventually it's removed.

## License

MIT

## Contribution

Feel free to open an issue or a pull request.
npm package: @stash-it/postgresql-adapter
Description: ![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)
Latest version: 0.1.0

# `@stash-it/postgresql-adapter`

![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)

`@stash-it/postgresql-adapter` is a simple redis adapter that can be used with `@stash-it/stash-it`.
It uses `pg` package under the hood.

## Installation

npm

```bash
npm install @stash-it/postgresql-adapter
```

deno

```bash
deno add @stash-it/postgresql-adapter
```

yarn

```bash
yarn dlx jsr add @stash-it/postgresql-adapter
```

pnpm

```bash
pnpm dlx jsr add @stash-it/postgresql-adapter
```

bun

```bash
bunx jsr add @stash-it/postgresql-adapter
```

## Usage

```ts
// Import stash-it main class.
import { StashIt } from "@stash-it/stash-it";
import { PostgreSqlAdapter } from "@stash-it/postgresql-adapter";

// Create an instance of the adapter. Use whatever configuration your PostgreSQL instance runs on.
const adapter = new PostgreSqlAdapter({
  connection: {
    host: "localhost",
    user: "user",
    password: "password",
    database: "dbname",
    port: 5432, // optional property, if not set, this value is used
  },
  // The whole "table" configuration is optional
  // So are the properties of this object.
  // If not provided, those values are used and expected.
  table: {
    tableName: "items",
    keyColumnName: "key",
    valueColumnName: "value",
    extraColumnName: "extra",
  },
});

// And use it with stash-it.
const stash = new StashIt(adapter);
```

## Table schema

If you don't have a table ready, you can use this query to create one. This is the expected schema.

```sql
CREATE TABLE "items" (
  "key" TEXT PRIMARY KEY,
  "value" JSONB NOT NULL,
  "extra" JSONB NOT NULL
)
```

## Development/testing

### Running tests locally

Make sure to have `.env` file with those variables (and your values):

```sh
POSTGRES_CONTAINER_NAME='postgresql_container'
POSTGRES_DATABASE="dbname"
POSTGRES_PASSWORD="password"
POSTGRES_USER="user"
POSTGRES_PORT="5432"
```

And then execute `pnpm test`.

The tests you will run do all sorts of checks to verify if the adapter is capable of conducting CRUD operations.

If you want, you can target different DBs in different environments and run the tests against them.
The test suite will clean up after self (or at least attempt), as it is designed to add numerous data,
check if it is readable, and eventually it's removed.

## License

MIT

## Contribution

Feel free to open an issue or a pull request.
npm package: @stash-it/prefix-suffix-plugin
Description: ![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)
Latest version: 0.1.0

# `@stash-it/prefix-suffix-plugin`

![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)

`@stash-it/prefix-suffix-plugin` is a plugin for `@stash-it/stash-it` that allows you to add a prefix and/or suffix to the key before persisting the value.

### When to use it?

Let's say you're using a storage that doesn't support namespaces, but you want to separate the keys for different parts of your application. You can use this plugin to add a prefix and/or suffix to the key. Now your team can save an item for key `user1` and so can the other team(s).

## Installation

npm

```bash
npm install @stash-it/prefix-suffix-plugin
```

deno

```bash
deno add @stash-it/prefix-suffix-plugin
```

yarn

```bash
yarn dlx jsr add @stash-it/prefix-suffix-plugin
```

pnpm

```bash
pnpm dlx jsr add @stash-it/prefix-suffix-plugin
```

bun

```bash
bunx jsr add @stash-it/prefix-suffix-plugin
```

## Usage

```ts
// Import stash-it main class.
import { StashIt } from "@stash-it/stash-it";

// Import the plugin.
import { createPrefixSuffixPlugin } from "@stash-it/prefix-suffix-plugin";

// For it to work you will also need an adapter.
// You can use any of the @stash-it adapters or create your own.
import { MemoryAdapter } from "@stash-it/memory-adapter";

// Create an instance of the adapter.
const adapter = new MemoryAdapter();

// Create an instance of stash-it.
const stash = new StashIt(adapter);

// Create an instance of the plugin.
const plugin = createPrefixSuffixPlugin({
  prefix: "prefix-",
  suffix: "-suffix",
});

// Register the plugin to the stash-it instance.
stash.registerPlugins([plugin]);

// Use it.
await stash.set("key", "value");
const item = await stash.get("key");

console.log(item.key); // 'key', same key! but the data is persisted with prefix and suffix
```
npm package: @stash-it/read-only-plugin
Description: ![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)
Latest version: 0.1.0

# `@stash-it/read-only-plugin`

![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)

`@stash-it/read-only-plugin` is a plugin for `@stash-it/stash-it` that allows you disabl chaning items, or adding new ones.

### When to use it?

Let's say you have a role, for logged in users (or not logged in), that gives them limited access to things.
And that would also mean not doing any changes in the storage related to the items stored there.

## Installation

npm

```bash
npm install @stash-it/read-only-plugin
```

deno

```bash
deno add @stash-it/read-only-plugin
```

yarn

```bash
yarn dlx jsr add @stash-it/read-only-plugin
```

pnpm

```bash
pnpm dlx jsr add @stash-it/read-only-plugin
```

bun

```bash
bunx jsr add @stash-it/read-only-plugin
```

## Usage

```ts
// Import stash-it main class.
import { StashIt } from "@stash-it/stash-it";

// Import the plugin.
import { createReadOnlyPlugin } from "@stash-it/read-only-plugin";
import { MemoryAdapter } from "@stash-it/memory-adapter";

// Create an instance of the adapter.
const adapter = new MemoryAdapter();

// Create an instance of stash-it.
const stash = new StashIt(adapter);

// Create an instance of the plugin.
const plugin = createReadOnlyPlugin();

// Register the plugin to the stash-it instance.
stash.registerPlugins([plugin]);

// Use it.
await stash.get("key"); // Returns an item if it exists

await stash.set("key", "value"); // Throws an error
```

You can also configure your own error messages:

```ts
createReadOnlyPlugin({
  setItemErrorMessage: "Custom setItem error message.",
});
```
npm package: @stash-it/redis-adapter
Description: ![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)
Latest version: 0.5.0

# `@stash-it/redis-adapter`

![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)

`@stash-it/redis-adapter` is a simple redis adapter that can be used with `@stash-it/stash-it`.
It uses `redis` package under the hood.

## Installation

npm

```bash
npm install @stash-it/redis-adapter
```

deno

```bash
deno add @stash-it/redis-adapter
```

yarn

```bash
yarn dlx jsr add @stash-it/redis-adapter
```

pnpm

```bash
pnpm dlx jsr add @stash-it/redis-adapter
```

bun

```bash
bunx jsr add @stash-it/redis-adapter
```

## Usage

```ts
// Import stash-it main class.
import { StashIt } from "@stash-it/stash-it";
import { RedisAdapter } from "@stash-it/redis-adapter";

// Create an instance of the adapter. Use whatever URL your redis instance runs on.
const adapter = new RedisAdapter({ url: "redis://localhost:6379" });

// And use it with stash-it.
const stash = new StashIt(adapter);
```

## License

MIT

## Contribution

Feel free to open an issue or a pull request.
npm package: @stash-it/sqlite-adapter
Description: ![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)
Latest version: 0.5.0

# `@stash-it/sqlite-adapter`

![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)

`@stash-it/sqlite-adapter` is a Sqlite3 adapter that can be used with `@stash-it/stash-it`.

## Installation

npm

```bash
npm install @stash-it/sqlite-adapter
```

deno

```bash
deno add @stash-it/sqlite-adapter
```

yarn

```bash
yarn dlx jsr add @stash-it/sqlite-adapter
```

pnpm

```bash
pnpm dlx jsr add @stash-it/sqlite-adapter
```

bun

```bash
bunx jsr add @stash-it/sqlite-adapter
```

## Usage

```ts
// Import stash-it main class.
import { StashIt } from "@stash-it/stash-it";
import { SqliteAdapter, type SqliteAdapterConfiguration } from "@stash-it/sqlite-adapter";

// Create an instance of the adapter.
const adapter = new SqliteAdapter({
  connection: {
    dbPath: "path/to/your/db.sqlite",
  },
  // The whole "table" configuration is optional
  // So are the properties of this object.
  // If not provided, those values are used and expected.
  table: {
    tableName: "items",
    keyColumnName: "key",
    valueColumnName: "value",
    extraColumnName: "extra",
  },
});

// And use it with stash-it.
const stash = new StashIt(adapter);
```

## Table schema

If you don't have a table ready, you can use this query to create one. This is the expected schema.

```sql
CREATE TABLE "items" (
  "key" TEXT PRIMARY KEY,
  "value" TEXT,
  "extra" TEXT
)
```

## License

MIT

## Contribution

Feel free to open an issue or a pull request.
npm package: @stash-it/ttl-plugin
Description: ![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)
Latest version: 0.1.0

# `@stash-it/ttl-plugin`

![logo-stash-it-color-dark 2x](https://user-images.githubusercontent.com/1819138/30385483-99fd209c-98a7-11e7-85e2-595791d8d894.png)

`@stash-it/ttl-plugin` is a plugin for `@stash-it/stash-it` that allows you to add a TTL.
Time to live (TTL) refers to the amount of time or “hops” that an item is set to exist inside a storage before being discarded by stash-it.

### When to use it?

If you need to set a time limit for how long an item should be stored in the storage, this plugin is for you.
For instance, some data is only relevant for a certain amount of time, and after that time, it should be removed from the storage.

## Installation

npm

```bash
npm install @stash-it/ttl-plugin
```

deno

```bash
deno add @stash-it/ttl-plugin
```

yarn

```bash
yarn dlx jsr add @stash-it/ttl-plugin
```

pnpm

```bash
pnpm dlx jsr add @stash-it/ttl-plugin
```

bun

```bash
bunx jsr add @stash-it/ttl-plugin
```

## Usage

```ts
// Import stash-it main class.
import { StashIt } from "@stash-it/stash-it";

// Import the plugin.
import { createTtlPlugin } from "@stash-it/ttl-plugin";

// For it to work you will also need an adapter.
// You can use any of the @stash-it adapters or create your own.
import { MemoryAdapter } from "@stash-it/memory-adapter";

// Create an instance of the adapter.
const adapter = new MemoryAdapter();

// Create an instance of stash-it.
const stash = new StashIt(adapter);

// Create an instance of the plugin.
const plugin = createPrefixSuffixPlugin({
  ttl: 3_600, // 1 hour
});

// Register plugin
stash.registerPlugins([plugin]);

// Use it.
await stash.set("key", "value");
const item = await stash.get("key");
const exists = await stash.has("key");

console.log(exists); // true
console.log(item?.value); // 'value'
console.log(item?.extra); // { ttl: 3_600, createdAt: '2024-08-26T20:26:41.832Z' }

// Wait for 1 hour (and a bit more)
const item2 = await stash.get("key");

console.log(item2); // undefined
```
npm package: @stash-nft/rental-contracts
Description: - [Contract docs](./generated/docs)
Latest version: 0.0.10

# Stash Contracts

- [Contract docs](./generated/docs)

## Development

### Setup

```
git submodule update --init --recursive --remote
yarn
curl -L https://foundry.paradigm.xyz | bash
foundryup
```

- Copy [.env-example](./.env-example) to .env, filling in the placeholders

### Commands

- `yarn build`: Compile contracts & generate typechain artifacts
- `yarn test`: Run tests
- `yarn gas`: Check gas costs
  - Hardhat tests may save results with `gasStory` which are saved to [./generated/gas-stories.txt](./generated/gas-stories.txt) for PR diffs (auto-pushed via CI)
- `yarn coverage`: Run coverage tests
  - Summary in the console and a full report in ./generated/coverage/index.html (not checked in)
- `yarn lint`: Lint & prettier

Other commands and some sub-variants, such as `test:hardhat`, are also available -- see [package.json](package.json) for the full list.

### Testing

#### Fork Testing

All Hardhat tests run as a fork against mainnet, allowing tests to use real examples where relevant. e.g. `contracts.forked.dai` to interact with the real DAI ERC20 contract.

#### Coverage

Hardhat tests which should be used to measure test coverage must be named `<name>.test.ts`, all others will be treated as supplemental tests which do not improve test coverage. This allows test files to be used for POC or happy case paths without implying that all the correct assertions have been confirmed.

#### Gas

Hardhat Gas Reporter:

`yarn gas:hardhat` will use [Hardhat Gas Reporter](https://github.com/cgewecke/hardhat-gas-reporter) to display the range of costs seen throughout tests for each function call.

Hardhat Gas "User Stories":

The Gas Reporter results can be misleading since tests often use very contrived examples. To supplement this, we use "Gas Stories" which allow us to capture very specific scenarios aimed to represent the core use case or critical calls -- these should be limited to common paths to ease comparing gas costs for important scenarios.

### Slither

Slither will run in CI and commit issues to [slither.md](./generated/slither.md).

- To suppress a warning which need not be addressed, use `// slither-disable-next-line <detector name>`.
- Global exclusions can be added to [slither.config.json](./slither.config.json).
  - solc-version: Excluded because we prefer the latest version.
  - timestamp: Excluded because we prefer time over block numbers for ease of use.

### Deployments

CI should be used for all deployments. This provides an easy way to track changes and ensures the build is current (e.g. including the correct NPM package versions).

#### Contracts

Create a git tag off the `main` branch named `deploy-<network>-<version>`, e.g. `deploy-goerli-v0.0.1`. If a new upgradeable proxy or other top-level contract is deployed, add that address to [the addresses file](./src/addresses.ts) (this should be done before pushing the NPM package).

#### NPM package

Create a git tag off the `main` branch named `v<version>`, e.g. `v0.0.1`.
npm package: @stash-ui/duotone-icons
Description: React Duotone Icons Set
Latest version: 1.0.57

<div align="center"><strong>@stash-ui/duotone-icons</strong></div>
<div align="center">Duotone icons variation.</div>
<br />
<div align="center">
<a href="https://icons.stash-ui.com">Website</a> 
<span> · </span>
<a href="https://github.com/stash-ui/icons">GitHub</a> 
<span> · </span>
<a href="https://www.figma.com/file/X5DiJzGRQXCyEfBqocT235/%5BPb%5D-Icons-1.0-%E2%9C%85?node-id=0%3A1">Figma</a>
<span> · </span>
<a href="https://stash-ui.com/discord">Discord</a>
</div>

## Install

Install the set of duotone icons from your command line.

#### With yarn

```sh
yarn add @stash-ui/duotone-icons
```

#### With npm

```sh
npm install @stash-ui/duotone-icons
```

## Getting started

Add the SVG icon to your application. Include color where needed.

```jsx
import { AngleDownIcon, AngleUpIcon } from '@stash-ui/duotone-icons';

const App = () => {
  return (
    <AngleDownIcon />
    <AngleUpIcon color="#000"  />
  );
};
```

## Authors

- Rachel Andrade ([@rchldesigner](https://twitter.com/rchldesigner)) - [Pingback](https://pingback.com)
- Pedro Ladeira ([@pedrooladeira](https://twitter.com/pedrooladeira)) - [Pingback](https://pingback.com)
- Tiago Gerken ([@tgerken](https://twitter.com/tgerken))

## License

Licensed under the MIT License, Copyright © 2022-present Pingback LLC.

See [LICENSE](./LICENSE) for more information.
npm package: @stash-ui/editor-icons
Description: React Editor Icons Set
Latest version: 1.0.33

<div align="center"><strong>@stash-ui/editor-icons</strong></div>
<div align="center">Editor icons variation.</div>
<br />
<div align="center">
<a href="https://icons.stash-ui.com">Website</a> 
<span> · </span>
<a href="https://github.com/stash-ui/icons">GitHub</a> 
<span> · </span>
<a href="https://www.figma.com/file/X5DiJzGRQXCyEfBqocT235/%5BPb%5D-Icons-1.0-%E2%9C%85?node-id=0%3A1">Figma</a>
<span> · </span>
<a href="https://stash-ui.com/discord">Discord</a>
</div>

## Install

Install the set of editor icons from your command line.

#### With yarn

```sh
yarn add @stash-ui/editor-icons
```

#### With npm

```sh
npm install @stash-ui/editor-icons
```

## Getting started

Add the SVG icon to your application. Include color where needed.

```jsx
import { BoldIcon, ItalicIcon } from '@stash-ui/editor-icons';

const App = () => {
  return (
    <BoldIcon />
    <ItalicIcon color="#000"  />
  );
};
```

## Authors

- Tiago Gerken ([@tgerken](https://twitter.com/tgerken)) - [Pingback](https://pingback.com)
- Pedro Ladeira ([@pedrooladeira](https://twitter.com/pedrooladeira)) - [Pingback](https://pingback.com)

## License

Licensed under the MIT License, Copyright © 2022-present Pingback LLC.

See [LICENSE](./LICENSE) for more information.
npm package: @stash-ui/light-icons
Description: React Light Icons Set
Latest version: 1.0.62

<div align="center"><strong>@stash-ui/light-icons</strong></div>
<div align="center">Light icons variation.</div>
<br />
<div align="center">
<a href="https://icons.stash-ui.com">Website</a> 
<span> · </span>
<a href="https://github.com/stash-ui/icons">GitHub</a> 
<span> · </span>
<a href="https://www.figma.com/file/X5DiJzGRQXCyEfBqocT235/%5BPb%5D-Icons-1.0-%E2%9C%85?node-id=0%3A1">Figma</a>
<span> · </span>
<a href="https://stash-ui.com/discord">Discord</a>
</div>

## Install

Install the set of light icons from your command line.

#### With yarn

```sh
yarn add @stash-ui/light-icons
```

#### With npm

```sh
npm install @stash-ui/light-icons
```

## Getting started

Add the SVG icon to your application. Include color where needed.

```jsx
import { AngleDownIcon, AngleUpIcon } from '@stash-ui/light-icons';

const App = () => {
  return (
    <AngleDownIcon />
    <AngleUpIcon color="#000"  />
  );
};
```

## Authors

- Rachel Andrade ([@rchldesigner](https://twitter.com/rchldesigner)) - [Pingback](https://pingback.com)
- Pedro Ladeira ([@pedrooladeira](https://twitter.com/pedrooladeira)) - [Pingback](https://pingback.com)
- Tiago Gerken ([@tgerken](https://twitter.com/tgerken))

## License

Licensed under the MIT License, Copyright © 2022-present Pingback LLC.

See [LICENSE](./LICENSE) for more information.
npm package: @stash-ui/react-native-icons
Description: React Native Icons Set
Latest version: 0.0.9

<div align="center"><strong>@stash-ui/react-native-icons</strong></div>
<div align="center">React Navite Icons.</div>
<br />
<div align="center">
<a href="https://icons.stash-ui.com">Website</a> 
<span> · </span>
<a href="https://github.com/stash-ui/icons">GitHub</a> 
<span> · </span>
<a href="https://www.figma.com/file/X5DiJzGRQXCyEfBqocT235/%5BPb%5D-Icons-1.0-%E2%9C%85?node-id=0%3A1">Figma</a>
<span> · </span>
<a href="https://stash-ui.com/discord">Discord</a>
</div>

## Install

Install the set of react native icons from your command line.

#### With yarn

```sh
yarn add @stash-ui/react-native-icons
```

#### With npm

```sh
npm install @stash-ui/react-native-icons
```

## Getting started

Add the SVG icon to your application. Include color where needed.

```jsx
import Icon from '@stash-ui/react-native-icons';

const App = () => {
  return (
    <Icon name="angle-down" style="solid" />
    <Icon name="angle-up" style="light" color="#000" />
  );
};
```

## Authors

- Tiago Gerken ([@tgerken](https://twitter.com/tgerken)) - [Pingback](https://pingback.com)
- Pedro Ladeira ([@pedrooladeira](https://twitter.com/pedrooladeira)) - [Pingback](https://pingback.com)

## License

Licensed under the MIT License, Copyright © 2022-present Pingback LLC.

See [LICENSE](./LICENSE) for more information.
npm package: @stash-ui/react-native-regular-icons
Description: React Native Regular Icons Set
Latest version: 0.0.15

<div align="center"><strong>@stash-ui/react-native-regular-icons</strong></div>
<div align="center">Regular icons variation.</div>
<br />
<div align="center">
<a href="https://icons.stash-ui.com">Website</a> 
<span> · </span>
<a href="https://github.com/stash-ui/icons">GitHub</a> 
<span> · </span>
<a href="https://www.figma.com/file/X5DiJzGRQXCyEfBqocT235/%5BPb%5D-Icons-1.0-%E2%9C%85?node-id=0%3A1">Figma</a>
<span> · </span>
<a href="https://stash-ui.com/discord">Discord</a>
</div>

## Install

Install the set of regular react native icons from your command line.

#### With yarn

```sh
yarn add @stash-ui/react-native-regular-icons
```

#### With npm

```sh
npm install @stash-ui/react-native-regular-icons
```

## Getting started

Add the SVG icon to your application. Include color where needed.

```jsx
import { AngleDownIcon, AngleUpIcon } from '@stash-ui/react-native-regular-icons';

const App = () => {
  return (
    <AngleDownIcon />
    <AngleUpIcon color="#000"  />
  );
};
```

## Authors

- Tiago Gerken ([@tgerken](https://twitter.com/tgerken)) - [Pingback](https://pingback.com)
- Pedro Ladeira ([@pedrooladeira](https://twitter.com/pedrooladeira)) - [Pingback](https://pingback.com)

## License

Licensed under the MIT License, Copyright © 2022-present Pingback LLC.

See [LICENSE](./LICENSE) for more information.
npm package: @stash-ui/regular-icons
Description: React Regular Icons Set
Latest version: 1.0.65

<div align="center"><strong>@stash-ui/regular-icons</strong></div>
<div align="center">Regular icons variation.</div>
<br />
<div align="center">
<a href="https://icons.stash-ui.com">Website</a> 
<span> · </span>
<a href="https://github.com/stash-ui/icons">GitHub</a> 
<span> · </span>
<a href="https://www.figma.com/file/X5DiJzGRQXCyEfBqocT235/%5BPb%5D-Icons-1.0-%E2%9C%85?node-id=0%3A1">Figma</a>
<span> · </span>
<a href="https://stash-ui.com/discord">Discord</a>
</div>

## Install

Install the set of regular icons from your command line.

#### With yarn

```sh
yarn add @stash-ui/regular-icons
```

#### With npm

```sh
npm install @stash-ui/regular-icons
```

## Getting started

Add the SVG icon to your application. Include color where needed.

```jsx
import { AngleDownIcon, AngleUpIcon } from '@stash-ui/regular-icons';

const App = () => {
  return (
    <AngleDownIcon />
    <AngleUpIcon color="#000"  />
  );
};
```

## Authors

- Rachel Andrade ([@rchldesigner](https://twitter.com/rchldesigner)) - [Pingback](https://pingback.com)
- Pedro Ladeira ([@pedrooladeira](https://twitter.com/pedrooladeira)) - [Pingback](https://pingback.com)
- Tiago Gerken ([@tgerken](https://twitter.com/tgerken))

## License

Licensed under the MIT License, Copyright © 2022-present Pingback LLC.

See [LICENSE](./LICENSE) for more information.
npm package: @stash-ui/solid-icons
Description: React Solid Icons Set
Latest version: 1.0.58

<div align="center"><strong>@stash-ui/solid-icons</strong></div>
<div align="center">Solid icons variation.</div>
<br />
<div align="center">
<a href="https://icons.stash-ui.com">Website</a> 
<span> · </span>
<a href="https://github.com/stash-ui/icons">GitHub</a> 
<span> · </span>
<a href="https://www.figma.com/file/X5DiJzGRQXCyEfBqocT235/%5BPb%5D-Icons-1.0-%E2%9C%85?node-id=0%3A1">Figma</a>
</div>

## Install

Install the set of solid icons from your command line.

#### With yarn

```sh
yarn add @stash-ui/solid-icons
```

#### With npm

```sh
npm install @stash-ui/solid-icons
```

## Getting started

Add the SVG icon to your application. Include color where needed.

```jsx
import { AngleDownIcon, AngleUpIcon } from '@stash-ui/solid-icons';

const App = () => {
  return (
    <AngleDownIcon />
    <AngleUpIcon color="#000"  />
  );
};
```

## Authors

- Rachel Andrade ([@rchldesigner](https://twitter.com/rchldesigner)) - [Pingback](https://pingback.com)
- Pedro Ladeira ([@pedrooladeira](https://twitter.com/pedrooladeira)) - [Pingback](https://pingback.com)
- Tiago Gerken ([@tgerken](https://twitter.com/tgerken))

## License

Licensed under the MIT License, Copyright © 2022-present Pingback LLC.

See [LICENSE](./LICENSE) for more information.
npm package: @stashcore/stashcore-p2p
Description: Interface to the stash P2P network for Stashcore
Author: Stash Core Group, Inc.
Latest version: 1.2.0

Stashcore P2P
=======

[![NPM Package](https://img.shields.io/npm/v/@stashcore/stashcore-p2p.svg?style=flat-square)](https://www.npmjs.org/package/@stashcore/stashcore-p2p)
[![Build Status](https://img.shields.io/travis/com/stashpayio/stashcore-p2p.svg?branch=master&style=flat-square)](https://travis-ci.com/stashpayio/stashcore-p2p)

`stashcore-p2p` adds Stash protocol support for Stashcore.

See [the main stashcore-lib repo](https://github.com/stashpayio/stashcore-lib) for more information.

## Getting Started

```sh
npm install @stashcore/stashcore-p2p
```
In order to connect to the Stash network, you'll need to know the IP address of at least one node of the network, or use [Pool](/docs/pool.md) to discover peers using a DNS seed.

```javascript
var Peer = require('@stashcore/stashcore-p2p').Peer;

var peer = new Peer({host: '127.0.0.1'});

peer.on('ready', function() {
  // peer info
  console.log(peer.version, peer.subversion, peer.bestHeight);
});
peer.on('disconnect', function() {
  console.log('connection closed');
});
peer.connect();
```

Then, you can get information from other peers by using:

```javascript
// handle events
peer.on('inv', function(message) {
  // message.inventory[]
});
peer.on('tx', function(message) {
  // message.transaction
});
```

Take a look at the [bitcore guide](http://bitcore.io/guide/peer.html) on the usage of the `Peer` class.

## Contributing

Please send pull requests for bug fixes, code optimization, and ideas for improvement. For more information on how to contribute, please refer to our [CONTRIBUTING](https://github.com/stashpayio/stashcore-p2p/blob/master/CONTRIBUTING.md) file.

## License

Code released under [the MIT license](https://github.com/stashpayio/stashcore/blob/master/LICENSE).

Copyright 2013-2017 BitPay, Inc. Bitcore is a trademark maintained by BitPay, Inc.  
Copyright 2016-2017 The Stash Foundation, Inc.  
Copyright 2017-2018 Stash Core Group, Inc.
npm package: @stashgg/stash-pay
Description: React component for Stash pay checkout
Latest version: 1.0.7

# @stashgg/stash-pay

React component for Stash payment checkout integration.

## Installation

```bash
npm install @stashgg/stash-pay
```

## Usage

The component includes its own CSS styles. Depending on your bundler setup, you may need to import the styles separately:

### With CSS Import (Recommended)

```tsx
import { StashPay } from '@stashgg/stash-pay';
import '@stashgg/stash-pay/styles';

function App() {
  const [isOpen, setIsOpen] = useState(false);
  const [checkoutUrl, setCheckoutUrl] = useState<string | null>(null);

  return (
    <StashPay
      isOpen={isOpen}
      checkoutUrl={checkoutUrl}
      onClose={() => setIsOpen(false)}
      onPurchaseSuccess={(data) => console.log('Success:', data)}
      onPurchaseFailed={(data) => console.log('Failed:', data)}
    />
  );
}
```

### Without Separate Import

If your bundler handles CSS imports automatically (e.g., Next.js, Vite with CSS plugin), you can use the component directly:

```tsx
import { StashPay } from '@stashgg/stash-pay';

function App() {
  // ... same as above
}
```

**Note**: The component includes CSS classes that are required for proper styling. If styles don't appear, make sure to import `@stashgg/stash-pay/styles` in your application.

## Props

- `isOpen: boolean` - Controls the visibility of the payment modal
- `checkoutUrl: string | null` - The checkout URL to display in the iframe
- `onClose: () => void` - Callback when the modal is closed
- `onPurchaseSuccess?: (data?: Record<string, unknown>) => void` - Callback when payment succeeds
- `onPurchaseFailed?: (data?: Record<string, unknown>) => void` - Callback when payment fails
- `width?: string | number` - Optional width for the payment card (e.g., `500`, `'500px'`, `'100%'`, `'50vw'`)

## Types

- `StashWindowEvent` - Enum of available window events
- `StashEventMessage` - Type for event messages