open-index/open-npm huggingface dataset:
npm package: @rytass/quadrats-nestjs
Description: Quadrats CMS Nestjs Module
Author: Chia Yu Pai
Latest version: 0.1.15

# `@rytass/quadrats-nestjs`

## Usage

```typescript
// app.module.ts
import { Module } from '@nestjs/common';
import { QuadratsModule } from '@rytass/quadrats-nestjs';
import { ArticleModule } from './article.module';

@Module({
  imports: [
    QuadratsModule.forRoot({
      accessKey: 'QuadratsAccessKey',
      secret: 'QuadratsSecret',
    }),
    ArticleModule,
  ],
})
export class AppModule {}

// article.module.ts
import { Module } from '@nestjs/common';
import { QuadratsModule } from '@rytass/quadrats-nestjs';
import { ArticleController } from './article.controller';
import { ArticleService } from './article.service';

@Module({
  imports: [QuadratsModule],
  controllers: [ArticleController],
  providers: [ArticleService],
})
export class ArticleModule {}

// article.service.ts
import { Injectable } from '@nestjs/common';
import { QuadratsArticleService, type QuadratsArticle } from '@rytass/quadrats-nestjs';

@Injectable()
export class ArticleService {
  constructor(private readonly quadratsArticleService: QuadratsArticleService) {}

  get(id: string): Promise<QuadratsArticle | null> {
    return this.quadratsArticleService.get(id);
  }
}

// article.controller.ts
import { Controller, Get, Param } from '@nestjs/common';

@Controller('/articles')
export class ArticleController {
  constructor(private readonly articleService: ArticleService) {}

  @Get('/:articleId')
  getArticle(@Param('articleId') id: string): Promise<QuadratsArticle | null> {
    return this.articleService.get(id);
  }
}
```

### Multi-language Support

```typescript
// article.service.ts
import { Injectable } from '@nestjs/common';

@Injectable()
class ArticleService {
  constructor(private readonly quadratsArticleService: QuadratsArticleService) {}

  async addMultiLanguageArticle() {
    const article = await this.quadratsArticleService.create({
      title: 'Multiple Language',
      categoryIds: [],
      tags: ['Chinese', 'English'],
      languageContents: [
        {
          elements: [
            {
              type: 'p',
              children: [{ text: '中文內容' }],
            },
          ],
          language: 'zh-Hant',
        },
        {
          elements: [
            {
              type: 'p',
              children: [{ text: 'English Content' }],
            },
          ],
          language: 'en',
        },
      ],
    });
  }
}
```
npm package: @rytass/storages-adapter-local
Description: Rytass Utils Storages local adapter
Author: MarshallChiang
Latest version: 0.2.9

# Rytass Utils - File Storages (Local)

## About

File storage utility, covering basic I/O and metadata guessing, and with plugged-in extension, file buffer could be transformed accordingly.

## Features

- [x] Read File
- [x] Write File
- [x] Delete File

## Storages APIs

---

> ### **_constructor(options)_**

#### **Description**

--

#### **Arguments**

| Parameter  | Type            | Required | Description                                                       |
| ---------- | --------------- | -------- | ----------------------------------------------------------------- |
| directory  | string          | true     | directory will be used                                            |
| autoMkdir  | boolean         | false    | should create folder if directory is not exists                   |
| converters | FileConverter[] | false    | inject extensions for file conversion and respective manipulation |

#### **Snippet**

```typescript
import { LocalStorage } from '@rytass/storages-adapter-local';
import { resolve } from 'path';

const storage = new StorageLocalService({
  directory: resolve(__dirname, 'storage'),
});
```

---

> ### **_StorageLocalService.read(key: string, options: ReadBufferFileOptions | ReadStreamFileOptions):Promise\<Readable> | Promise\<Buffer>_**

#### **Description**

read file from disk

#### **Arguments**

| Parameter      | Type   | Required | Description        |
| -------------- | ------ | -------- | ------------------ |
| key            | string | true     | file name for read |
| options.format | string | false    | buffer/stream      |

#### **Snippet**

```typescript
const fileStream = await storage.read('targetFile.png');
const fileBuffer = await storage.read('targetFile.png', { format: 'buffer' });
```

---

> ### **_StorageLocalService.remove(key: string):Promise\<void>_**

#### **Description**

remove file

#### **Arguments**

--

```typescript
await storage.remove('willRemove.png');
```

---

> ### **_StorageLocalFile.write(file: InputFile): Promise\<StorageFile>_**

#### **Description**

write file to disk

#### **Arguments**

| Parameter | Type      | Required | Description               |
| --------- | --------- | -------- | ------------------------- |
| file      | InputFile | true     | Buffer or Readable stream |
npm package: @rytass/storages-adapter-vercel-blob
Description: Vercel Blob storage adapter
Author: Chia Yu Pai
Latest version: 0.0.2

# @rytass/storages-adapter-vercel-blob

Vercel Blob storage adapter for `@rytass/storages`.

## Installation

```bash
npm install @rytass/storages-adapter-vercel-blob
# or
yarn add @rytass/storages-adapter-vercel-blob
```

## Usage

```typescript
import { StorageVercelBlobService } from '@rytass/storages-adapter-vercel-blob';

const storage = new StorageVercelBlobService({
  token: 'your-blob-read-write-token', // or set BLOB_READ_WRITE_TOKEN env var
  pathPrefix: 'uploads', // optional, default: 'uploads'
});

// Write a file
const { key } = await storage.write(buffer);

// Write with custom filename
const { key } = await storage.write(buffer, { filename: 'my-file.png' });

// Read as buffer
const buffer = await storage.read(key, { format: 'buffer' });

// Read as stream
const stream = await storage.read(key);

// Get file URL
const url = await storage.url(key);

// Check existence
const exists = await storage.isExists(key);

// Remove file
await storage.remove(key);

// Batch write
const results = await storage.batchWrite([buffer1, buffer2]);
```

## Options

| Option       | Type       | Default                          | Description                     |
|--------------|------------|----------------------------------|---------------------------------|
| `token`      | `string`   | `process.env.BLOB_READ_WRITE_TOKEN` | Vercel Blob read-write token |
| `pathPrefix` | `string`   | `'uploads'`                      | Path prefix for stored files    |
| `access`     | `'public'` | `'public'`                       | Blob access level               |
npm package: @rytell/exchange-contracts
Description: Contracts for the Rytell Dex.
Author: Pedro Medina
Latest version: 1.0.1

# Rytell Smart Contracts

This repo contains all of the smart contracts used to run [Rytell](rytell.exchange).

## Deployed Contracts

Factory address: `0xefa94DE7a4656D787667C749f7E1223D71E9FD88`

Router address: `0xE54Ca86531e17Ef3616d22Ca28b0D458b6C89106`

Migrator address: `0x4b23Aa72A1214d0E4fd3f2c8Da7C6ba660F7483C`

## Running

These contracts are compiled and deployed using [Hardhat](https://hardhat.org/). They can also be run using the Remix IDE. A tutorial for using Remix is located [here](https://docs.avax.network/build/tutorials/platform/deploy-a-smart-contract-on-avalanche-using-remix-and-metamask).

To prepare the dev environment, run `yarn install`. To compile the contracts, run `yarn compile`. Yarn is available to install [here](https://classic.yarnpkg.com/en/docs/install/#debian-stable) if you need it.

## Accessing the ABI

If you need to use any of the contract ABIs, you can install this repo as an npm package with `npm install --dev @pangolindex/exchange-contracts`. Then import the ABI like so: `import { abi as IRytellPairABI } from '@pangolindex/exchange-contracts/artifacts/contracts/core/interfaces/IRytellPair.sol/IRytellPair.json'`.

## Attribution

These contracts were adapted from these Uniswap repos: [uniswap-v2-core](https://github.com/Uniswap/uniswap-v2-core), [uniswap-v2-periphery](https://github.com/Uniswap/uniswap-v2-core), and [uniswap-lib](https://github.com/Uniswap/uniswap-lib).
npm package: @rytell/liquidity-pools
Description: This project demonstrates an advanced Hardhat use case, integrating other tools commonly used alongside Hardhat in the ecosystem.
Author: Pedro Medina
Latest version: 1.0.0

# Advanced Sample Hardhat Project

This project demonstrates an advanced Hardhat use case, integrating other tools commonly used alongside Hardhat in the ecosystem.

The project comes with a sample contract, a test for that contract, a sample script that deploys that contract, and an example of a task implementation, which simply lists the available accounts. It also comes with a variety of other tools, preconfigured to work with the project code.

Try running some of the following tasks:

```shell
npx hardhat accounts
npx hardhat compile
npx hardhat clean
npx hardhat test
npx hardhat node
npx hardhat help
REPORT_GAS=true npx hardhat test
npx hardhat coverage
npx hardhat run scripts/deploy.ts
TS_NODE_FILES=true npx ts-node scripts/deploy.ts
npx eslint '**/*.{js,ts}'
npx eslint '**/*.{js,ts}' --fix
npx prettier '**/*.{json,sol,md}' --check
npx prettier '**/*.{json,sol,md}' --write
npx solhint 'contracts/**/*.sol'
npx solhint 'contracts/**/*.sol' --fix
```

# Etherscan verification

To try out Etherscan verification, you first need to deploy a contract to an Ethereum network that's supported by Etherscan, such as Ropsten.

In this project, copy the .env.example file to a file named .env, and then edit it to fill in the details. Enter your Etherscan API key, your Ropsten node URL (eg from Alchemy), and the private key of the account which will send the deployment transaction. With a valid .env file in place, first deploy your contract:

```shell
hardhat run --network ropsten scripts/sample-script.ts
```

Then, copy the deployment address and paste it in to replace `DEPLOYED_CONTRACT_ADDRESS` in this command:

```shell
npx hardhat verify --network ropsten DEPLOYED_CONTRACT_ADDRESS "Hello, Hardhat!"
```

# Performance optimizations

For faster runs of your tests and scripts, consider skipping ts-node's type checking by setting the environment variable `TS_NODE_TRANSPILE_ONLY` to `1` in hardhat's environment. For more details see [the documentation](https://hardhat.org/guides/typescript.html#performance-optimizations).
npm package: @rytell/radi-emitter
Description: This project demonstrates an advanced Hardhat use case, integrating other tools commonly used alongside Hardhat in the ecosystem.
Author: Pedro Medina
Latest version: 2.0.0

# Advanced Sample Hardhat Project

This project demonstrates an advanced Hardhat use case, integrating other tools commonly used alongside Hardhat in the ecosystem.

The project comes with a sample contract, a test for that contract, a sample script that deploys that contract, and an example of a task implementation, which simply lists the available accounts. It also comes with a variety of other tools, preconfigured to work with the project code.

Try running some of the following tasks:

```shell
npx hardhat accounts
npx hardhat compile
npx hardhat clean
npx hardhat test
npx hardhat node
npx hardhat help
REPORT_GAS=true npx hardhat test
npx hardhat coverage
npx hardhat run scripts/deploy.ts
TS_NODE_FILES=true npx ts-node scripts/deploy.ts
npx eslint '**/*.{js,ts}'
npx eslint '**/*.{js,ts}' --fix
npx prettier '**/*.{json,sol,md}' --check
npx prettier '**/*.{json,sol,md}' --write
npx solhint 'contracts/**/*.sol'
npx solhint 'contracts/**/*.sol' --fix
```

# Etherscan verification

To try out Etherscan verification, you first need to deploy a contract to an Ethereum network that's supported by Etherscan, such as Ropsten.

In this project, copy the .env.example file to a file named .env, and then edit it to fill in the details. Enter your Etherscan API key, your Ropsten node URL (eg from Alchemy), and the private key of the account which will send the deployment transaction. With a valid .env file in place, first deploy your contract:

```shell
hardhat run --network ropsten scripts/sample-script.ts
```

Then, copy the deployment address and paste it in to replace `DEPLOYED_CONTRACT_ADDRESS` in this command:

```shell
npx hardhat verify --network ropsten DEPLOYED_CONTRACT_ADDRESS "Hello, Hardhat!"
```

# Performance optimizations

For faster runs of your tests and scripts, consider skipping ts-node's type checking by setting the environment variable `TS_NODE_TRANSPILE_ONLY` to `1` in hardhat's environment. For more details see [the documentation](https://hardhat.org/guides/typescript.html#performance-optimizations).
npm package: @rytell/sdk
Description: 🛠 An SDK for building applications on top of Rytell.
Latest version: 1.0.4

# Rytell SDK
This repo contains tools for developing with [Rytell](rytell.exchange).

## Running
This project uses standard npm and yarn workflows.

Install dependencies

```sh
yarn
```

Compile
```sh
yarn build
```

Yarn is available to install [here](https://classic.yarnpkg.com/en/docs/install/#debian-stable) if you need it.

## Installation
This project is available as an npm package. Add to your project with `npm install @pangolindex/sdk`

## Attribution
This code was adapted from this Uniswap repo: [uniswap-sdk](https://github.com/Uniswap/sdk).
npm package: @ryth/conversation
Description: @ryth/conversation is an Angular 2 module which has Components and Services that helps to build games / game parts with an visual noval style conversation
Author: Ryth
Latest version: 0.1.8

# @ryth/conversation

@ryth/conversation is an Angular 2 module which has Components and Services that helps to build games / game parts with an visual noval style conversation

## Quick Start

#### 1. Install @ryth/conversation
```bash
  npm install @ryth/conversation --save
```

#### 2. Import the `ConversationModule`:

```ts
import {NgModule} from '@angular/core';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {BrowserModule} from '@angular/platform-browser';
import {ConversationModule} from '@ryth/conversation';
import {AppComponent} from './app';

@NgModule({
  imports: [
    BrowserModule,
    FormsModule,
    ReactiveFormsModule,
    ConversationModule.forRoot()
  ],
  declarations: [AppComponent],
  bootstrap: [AppComponent]
})
export class AppModule {
}
```

```angular2html
<ryth-conversation
  [conversation]="conversationObject"
  (conversationEnded)="onConversationEnded()"
  *ngIf="conversationObject">
</ryth-conversation>

```

Have a look at the demo for an example