open-index/open-npm huggingface dataset:
npm package: @hhnest/crypto
Description: Crypto module for Nest - modern, fast, powerful node.js web framework (@hhnest)
Author: Francois Achache
Latest version: 1.0.10

<p align="center">
  <a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo_text.svg" width="320" alt="Nest Logo" /></a>
</p>

# @hhnest/crypto 

![Build](https://github.com/hhnest/crypto/workflows/Build/badge.svg)
[![codecov](https://codecov.io/gh/hhnest/crypto/branch/master/graph/badge.svg)](https://codecov.io/gh/hhnest/crypto)

## Description

A crypto module for [Nest](https://github.com/nestjs/nest).

Wrap standard nodejs crypto api with [Rxjs](https://github.com/ReactiveX/RxJS)

DEFAULT ALGORITHM : 'aes-192-cbc'

## Installation

```bash
$ npm install @hhnest/crypto --save
```

## Import module in your the app

```typescript
import {CryptoModule} from '@hhnest/crypto';
...
@Module({
  imports: [
    HttpModule,
    CryptoModule.forRoot(environment.secret),
// Or
    CryptoModule.forRoot(environment.secret, {algorithm: 'aes-192-cbc'}),
    ...
 ],
  controllers: [...],
  providers: [...],
})
export class AppModule {
  ...
}
```

## Use

```typescript
import {CryptoService} from '@hhnest/crypto';

@Injectable()
export class MyService {
  private readonly logger = new Logger(MyService.name);

  constructor(
    private readonly cryptoService: CryptoService
  ) {
  }
  encryptPassword(password: string): Observable<string> {
    return cryptoService.encryptString(password);
  }
  ...
}
```

## API

### cryptoService.encryptString

```typescript
  cryptoService.encryptString(decrypted: string): Observable<string>;
```
Encrypt string and return it.  
The encrypted string will be prefixed by ENCRYPTED_   

---

### cryptoService.encryptStream

```typescript
  cryptoService.encryptStream(input: NodeJS.ReadableStream, output: NodeJS.WritableStream): Observable<void>;
```
Encrypt input stream and write encrypted result in output stream  
The result will not be prefixed

---

### cryptoService.decryptString

```typescript
  cryptoService.decryptString(encrypted: string): Observable<string>;
```
Decrypt string and return it.  
The encrypted string should be prefixed by ENCRYPTED_   

---

### cryptoService.decryptStream

```typescript
  cryptoService.decryptStream(input: NodeJS.ReadableStream, output: NodeJS.WritableStream): Observable<void>;
```
Decrypt input stream and write decrypted result in output stream  

---

### cryptoService.getCurrentAlgorithm

```typescript
  cryptoService.getCurrentAlgorithm(): string;
```
Return the current algorithm as defined in module declaration
Default value is 'aes-192-cbc'

---

### cryptoService.getSupportedAlgorithms

```typescript
  cryptoService.getSupportedAlgorithms(): string[];
```
Return supported algorithms

---

### cryptoService.isSupportedAlgorithm

```typescript
  cryptoService.isSupportedAlgorithm(algorithm: string): boolean;
```
Return if an algorithm is supported

---

## License

  @hhnest/crypto is [MIT licensed](LICENSE).
npm package: @hhnest/logger
Description: Logger module for Nest - modern, fast, powerful node.js web framework (@hhnest)
Author: Francois Achache
Latest version: 1.1.3

<p align="center">
  <a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo_text.svg" width="320" alt="Nest Logo" /></a>
</p>

# @hhnest/logger 

![Build](https://github.com/hhnest/logger/workflows/Build/badge.svg)
[![codecov](https://codecov.io/gh/hhnest/logger/branch/master/graph/badge.svg)](https://codecov.io/gh/hhnest/logger)

## Description

A logger module for [Nest](https://github.com/nestjs/nest).

Wrap standard nestjs logger and add API for set level to runtime globally or for each logger

## Installation

```bash
$ npm install @hhnest/logger --save
```

## Import module in your the app

```typescript
import {LoggerModule} from '@hhnest/logger';
import { LogLevel } from '@nestjs/common';

const initialLevels: LogLevel[] = ['error', 'warn', 'log', 'debug'];
...
@Module({
  imports: [
    HttpModule,
    LoggerModule.forRoot(initialLevels),
    // or 
    LoggerModule.forRoot(), // ['error', 'warn', 'log']
    ...
 ],
  controllers: [...],
  providers: [...],
})
export class AppModule {
  ...
}
```

## Use

```typescript
import { Log } from '@hhnest/logger';

@Injectable()
export class MyService {

  constructor(
    @Log(MyService.name) private readonly logger
  ) {
  }
  method() {
    this.logger.error(`message`)
  }
  ...
}
```

## API

### Return global logger levels

```xpath
/logger
```


---

### Change levels of logger globally 

```xpath
/logger/level/(error|warn|log|debug|verbose|reset)
```

If specific logger has been set to another level, level of it doesn't change.

---

### Return specific logger levels 

```xpath
/logger/context/SpecificLogger
```

---

### Change level of specific logger 

```xpath
/logger/context/SpecificLogger/level/(error|warn|log|debug|verbose|reset)
```

If reset, remove specific and use global levels for it.  

---

## License

  @hhnest/logger is [MIT licensed](LICENSE).
npm package: @hhogg/snake
Description: Snake Heuristics a game of pathfinding
Author: Harry Hogg
Latest version: 0.0.4

<p align="center">
  <img src="./site/assets/snake.svg" />
</p>

<h2 align="center" style="margin: 0">Snake</h2>
<h5 align="center"  style="margin: 0"><a href="https://snake.hogg.io">https://snake.hogg.io</a></h5>

Snake Heuristics is a game for developers to code the behaviour of the snake in the classic point finding game.

The goal is to write a heuristic function that returns a single number. The function is run on every cell on the board (but only the cells around the head of the snake are important). The snake will move to the cell with the lowest number, and will continue to do this while collecting points, until it either crashes or there are no cell left to move to.

The solution is scored in 3 areas: accuracy, speed and efficiency. Basically, the fewer moves the snake takes to reach the point the better. The score grows exponentially with the more points collected and the efficiency has a greater weight at the beginning of the game.

### Technology

- [Typescript](https://www.typescriptlang.org/)
- [Parcel](https://parceljs.org/) (bundler and dev servers)
- [React](https://reactjs.org/)
- [PostCSS](https://postcss.org/) (with postcss-preset-env for a little power)
- [Firebase](https://firebase.google.com/) (hosting)

### Setup

##### Prerequisites

• [Node](https://nodejs.org/en/) - Either use [nvm use](https://github.com/nvm-sh/nvm) or checkout the tested version inside the [.nvmrc](./nmvrc) file.

##### Setup

Clone the repository

```
git clone git@github.com:HHogg/circles.git
```

Install the dependencies with your favourite package manager

```
yarn install
```

##### Running

Spin up the Parcel development server

```
yarn start
```

##### Building

Build the static files using Parcel

```
yarn build
```

##### Deploying

Deploy to Firebase hosting (... after authenticating)

```
yarn deploy
```
npm package: @hhopkins/project-tracker
Description: A dual-interface project tracking system - web app for humans, plugin for AI agents
Author: Hunter Hopkins
Latest version: 0.1.4

# @hhopkins/project-tracker

A dual-interface project tracking system - web app for humans, plugin for AI agents.

## Features

- **Initiatives** - Major project milestones or features with sessions and decisions
- **Todos** - Actionable tasks with priority levels
- **Ideas** - Captured thoughts for future consideration
- **Sessions** - Track work sessions with context and decisions

## Installation

```bash
npm install -g @hhopkins/project-tracker
```

## Usage

### CLI

```bash
# Start with default workspace (./workspace)
project-tracker

# Start with custom workspace path
project-tracker ./my-project

# Start with auto-open browser
project-tracker --open

# Development mode with hot reloading
project-tracker --dev

# Specify port
project-tracker --port 3000
```

### Options

| Option | Description |
|--------|-------------|
| `--dev` | Run in development mode with hot reloading |
| `--port, -p` | Specify port number (default: auto-find starting at 4600) |
| `--open` | Automatically open browser after starting |
| `--help, -h` | Show help message |

## Workspace Structure

```
workspace/
├── initiatives/
│   ├── active/      # Currently active initiatives
│   ├── backlog/     # Planned initiatives
│   └── completed/   # Finished initiatives
├── todos/           # Task files
└── ideas/           # Idea files
```

## Requirements

- Node.js >= 18.0.0

## License

MIT
npm package: @hhorg/hh-cli
Description: 项目基础架构脚手架
Latest version: 1.3.0

# @hhorg/hh-cli
#### 项目基础架构脚手架。环境要求：node(任意版本)

## 一、全局安装脚手架，命令行执行：
~~~
npm install @hhorg/hh-cli -g
~~~

## 二、初始化项目模板
~~~
hh init
~~~
#### 选择一个项目模板，自动初始化项目，及自动安装依赖

## 三、配置脚手架内置config.json文件，操作命令，如下：
#### 执行指令后，会自动打开config.json配置文件，自行去配置配置项，命令行执行：
~~~
hh sync_config
~~~

## 四、config.json配置文件中各字段含义：
| 字段     | 类型 | <div style="width:100px">含义</div> | 备注     |
| -------- | -------- | -------- | -------- |
| blackList | Array | 文件同步黑名单 | 默认：["git", "node_modules", "dist", "yarn.lock", "package-lock"] |
| sourcePath | String | 本地源仓库文件夹路径 | pwd获取绝对路径（如:/Users/fanghui/projects_plugins/node-copy-repo/xiaohui） |
| targetPath | String | 本地目标仓库文件夹路径 |  |
| targetBranch | String | 想要提交到目标仓库的分支 | pushGit为true时生效 |
| pushGit | Boolern | 是否直接push到目标仓库远端 | true：是；false：否 |
| pushGitCommitName | String | 提交远端的commit名称 | 提交的真正commit会在本名称后默认加上时间戳（如：同步-1712796640434）。pushGit为true时生效 |

## 五、配置完成后，执行同步代码操作，（基于脚手架内置config.json文件），命令行执行：
~~~
hh sync
~~~

## 六、脚手架工具版本，如下：
~~~
hh -v // 查看当前脚手架工具版本
~~~
npm package: @hhp-tools/eslint-config
Latest version: 1.0.2

# @hhp-tools/eslint-config

## 简介

统一 `eslint` 配置，支持 `vue`，`js`，`ts` 文件的检查

> 注意：会读取 `prettier` 的设置，建议配合 `prettier` 一起食用

## 使用

安装依赖

```shell
npm i -D @hhp-tools/eslint-config
```

在 `package.json` 中配置

```json
{
    "eslintConfig": {
        "extends": ["@hhp-tools/eslint-config"]
    }
}
```

或者在 `.eslintrc.*` 中配置

```json
{
    "extends": "@hhp-tools/eslint-config"
}
```
npm package: @hhp-tools/prettier-config
Latest version: 1.0.5

# @hhp-tools/prettier-config

## 简介

统一 `prettier` 配置

## 使用

安装依赖

```shell
npm i -D @hhp-tools/prettier-config
```

在 `package.json` 中配置

```json
{
    "prettier": "@hhp-tools/prettier-config"
}
```
npm package: @hhp1614/log-web
Description: 浏览器日志类
Author: hhp1614
Latest version: 1.1.3

[![GitHub license](https://img.shields.io/badge/license-MIT-aa0000.svg)](https://github.com/hhp1614/log-web/blob/master/LICENSE)
![](https://img.shields.io/badge/language-typescript-007bcd.svg)
[![npm version](https://img.shields.io/npm/v/@hhp1614/log-web.svg)](https://www.npmjs.com/package/@hhp1614/log-web)

# @hhp1614/log-web

使用 TypeScript 开发的一个浏览器日志打印工具

## 安装

```shell
npm i @hhp1614/log-web
```

## 使用

```js
import LogWeb from '@hhp1614/log-web';

const lw = new LogWeb();

lw.info('我是 info 方法');
lw.error('我是 error 方法');
```

### 不同打印等级

一共 5 种输出的方法：`info`、`error`、`success`、`fail`、`debug`

这 5 中输出方法执行时，默认会把当前设置的 `method`、`prefix`、`tag` 清空

如果要保持当前设置的 `method`、`prefix`、`tag` 不被清空，请在设置时将第二个参数设置为 `true`

```js
const lw = new LogWeb();

lw.info('我是 info 方法');
lw.error('我是 error 方法');
lw.success('我是 success 方法');
lw.fail('我是 fail 方法');
lw.debug('我是 debug 方法');
```

### 链式调用

遇到这 5 种输出方法（`info`、`error`、`success`、`fail`、`debug`）之后，链式调用将终止

简单来说，就是必须以上面的 5 种输出方法结尾，前面不限制调用的**数量**和**顺序**

```js
const lw = new LogWeb();

lw.method('warn').prefix('前缀').tag('标签').info('我是 info 方法');
lw.info('我是 info 方法');
```

### 保存指定使用 console 方法

会覆盖底层使用的默认 console 方法

| 输出方法    | 底层使用的方法    |
| ----------- | ----------------- |
| `info()`    | `console.info()`  |
| `error()`   | `console.error()` |
| `success()` | `console.info()`  |
| `fail()`    | `console.error()` |
| `debug()`   | `console.debug()` |

`.method()` 允许设置的方法：`"log"` | `"info"` | `"warn"` | `"error"` | `"debug"`

分别对应 `console` 下的这 5 个方法

```js
const lw = new LogWeb();

const instance = lw.method('warn', true);

instance.prefix('前缀').tag('标签').info('我是 info 方法');
instance.tag('标签').info('我是 info 方法');
instance.info('我是 info 方法');
instance.error('我是 error 方法');
instance.success('我是 success 方法');
instance.fail('我是 fail 方法');
instance.debug('我是 debug 方法');
```

### 保存指定前缀

```js
const lw = new LogWeb();

const instance = lw.prefix('hhp', true);

instance.method('warn').tag('标签1').info('我是 info 方法');
instance.tag('标签2').info('我是 info 方法');
instance.info('我是 info 方法');
instance.error('我是 error 方法');
instance.success('我是 success 方法');
instance.fail('我是 fail 方法');
instance.debug('我是 debug 方法');
```

### 保存指定标签

```js
const lw = new LogWeb();

const instance = lw.tag('hhp', true);

instance.method('warn').prefix('前缀').info('我是 info 方法');
instance.prefix('前缀').info('我是 info 方法');
instance.info('我是 info 方法');
instance.error('我是 error 方法');
instance.success('我是 success 方法');
instance.fail('我是 fail 方法');
instance.debug('我是 debug 方法');
```

### 隐藏打印

初始化时，可以设置隐藏这个实例的所有打印，表现为浏览器控制台没有输出

```js
const lw1 = new LogWeb({ hide: true });
lw1.info('我是隐藏的 info 方法');

const lw2 = new LogWeb({ hide: false });
lw2.info('我是显示的 info 方法');
```
npm package: @hhp1614/utils
Description: 使用 typescript 开发的一个函数工具库
Author: hhp1614
Latest version: 2.0.11

[![GitHub license](https://img.shields.io/badge/license-MIT-aa0000.svg)](https://github.com/hhp1614/utils/blob/master/LICENSE)
![](https://img.shields.io/badge/language-typescript-007bcd.svg)
[![npm version](https://img.shields.io/npm/v/@hhp1614/utils.svg)](https://www.npmjs.com/package/@hhp1614/utils)

# @hhp1614/utils

使用 TypeScript 开发的一个基础方法库

[GitHub 文档](https://hhp1614.github.io/utils)

[Gitee 文档](https://hhp1614.gitee.io/utils)
npm package: @hhpf/fastgithub-typescript
Description: FastGithub极速开源版 - TypeScript实现
Author: HHPF
Latest version: 1.0.0

# FastGithub极速开源版 - TypeScript实现

FastGithub是一个用于加速GitHub访问的工具，通过智能DNS解析、IP测速和HTTP/HTTPS代理技术，帮助用户快速访问GitHub。

## 功能特性

- ✅ 智能DNS解析，支持备用DNS服务器
- ✅ IP速度测试，自动选择最快的GitHub IP
- ✅ HTTP/HTTPS代理支持
- ✅ TLS配置管理（SNI支持）
- ✅ CDN资源替换
- ✅ 自动设置和恢复系统代理
- ✅ 单一EXE文件，无需安装，可直接运行
- ✅ 动态GitHub连接状态显示
- ✅ Windows平台支持

## 安装和使用

### 下载

从GitHub Releases页面下载最新版本的`fastgithub.exe`文件。

### 运行

1. 双击`fastgithub.exe`文件运行
2. 程序会自动设置系统代理
3. 在命令行中可以看到动态的GitHub连接状态
4. 访问GitHub，享受加速体验
5. 按`Ctrl+C`停止服务，系统代理会自动恢复

### 命令行参数

```bash
# 直接运行
fastgithub.exe

# 使用自定义配置文件
fastgithub.exe --config appsettings.json
```

## 技术架构

- **语言**: TypeScript
- **运行时**: Node.js
- **打包工具**: pkg
- **主要模块**:
  - DNS解析模块
  - IP速度测试模块
  - HTTP/HTTPS代理模块
  - TLS配置管理模块
  - CDN替换模块
  - 系统代理管理模块

## 构建说明

### 环境要求

- Node.js 18+
- npm 或 yarn
- TypeScript

### 构建步骤

1. 克隆仓库
   ```bash
   git clone https://github.com/HHPF/FastGithub.git
   cd FastGithub
   ```

2. 安装依赖
   ```bash
   npm install
   ```

3. 构建TypeScript代码
   ```bash
   npm run build
   ```

4. 打包为EXE文件
   ```bash
   npm run pkg
   ```

   或使用指定图标打包
   ```bash
   pkg dist/index.js --targets node18-win-x64 --output fastgithub.exe --icon hhpf.ico
   ```

## 配置说明

程序使用JSON配置文件，默认配置如下：

```json
{
  "httpProxyPort": 38457,
  "fallbackDns": ["8.8.8.8:53", "1.1.1.1:53"],
  "cdnReplaceRules": [
    {
      "match": "github.com",
      "replace": "github.global.ssl.fastly.net"
    }
  ],
  "tlsConfig": {
    "sendSni": true,
    "ignoreNameMismatch": false
  }
}
```

## 贡献

欢迎提交Issue和Pull Request！

## 许可证

MIT License

## 致谢

感谢所有为FastGithub项目做出贡献的开发者！

## 联系方式

- GitHub: [https://github.com/HHPF/FastGithub](https://github.com/HHPF/FastGithub)
- 作者: HHPF

---

**FastGithub极速开源版** - 让GitHub访问更快更稳定！