open-index/open-npm huggingface dataset:
npm package: @sirodiaz/metascraper-universal-shopping
Description: Get product information from HTML markup on merchant websites
Latest version: 1.5.0

# metascraper-shopping

[![npm](https://img.shields.io/npm/v/@sirodiaz/metascraper-universal-shopping.svg?style=flat-square)](https://www.npmjs.com/package/@sirodiaz/metascraper-universal-shopping)
[![Dependency Status](https://david-dm.org/samirrayani/metascraper-shopping.svg?style=flat-square)](https://david-dm.org/samirrayani/metascraper-shopping)

> A custom rule bundle for [@microlinkhq/metascraper](https://github.com/microlinkhq/metascraper) to get product information from HTML markup on merchant websites

## Install

```bash
$ npm install @sirodiaz/metascraper-universal-shopping --save
```

## Usage

```javascript
'use strict'

const metascraper = require('metascraper')([
  require('@sirodiaz/metascraper-universal-shopping')(),
  require('metascraper-title')(),
  require('metascraper-image')(),
  require('metascraper-url')()
]);
const got = require('got');

const goShopping = async () => {
  const targetUrl = '<an URL from any e-commerce website>';
  const { body: html, url } = await got(targetUrl);
  const metadata = await metascraper({ html, url });
  console.log(metadata);
};

goShopping();

/*
metadata: {
  title:        [String]
  image:        [String]
  url:          [String]
  price:        [Float]
  currency:     [String]
  condition:    [String]
  sku:          [String]
  mpn:          [String]
  availability: [String]
  asin:         [String]
}
*/
```

## License

**@SiroDiaz/metascraper-universal-shopping** © 2022 Siro Díaz, Released under the [MIT](https://github.com/SiroDiaz/metascraper-universal-shopping/blob/main/LICENSE.md) License.
**@sami/metascraper-shopping** © 2019 Samir Rayani, Released under the [MIT](https://github.com/samirrayani/metascraper-shopping/blob/master/LICENSE.md) License.
npm package: @siroi/easyfront
Description: 一站式代码工程规范工具
Author: siroi
Latest version: 1.0.1

## what can you do

1. you can use eslint to check your code
2. you can use prettier to format your code
3. you can use styelint to check your style


## how to use

1.  npm i @wm_springboot -D
    pnpm add -D @wm_springboot
    yarn add -D @wm_springboot
2.  npx wmstyle eslint
    npx wmstyle prettier
    npx wmstyle stylelint
npm package: @siroi/secondary-confirmation-antd
Description: secondary-confirmation with antd pop v4
Author: siroi
Latest version: 1.1.1

# @siroi/secondary-confirmation-antd

基于 antd v4 的二次确认框组件，对需要二次弹窗的 `onClick` 进行包装，无需增加过多的代码。

## 简单使用

```jsx
import SecConAntd from "@siroi/secondary-confirmation-antd";
import {Button} from "antd"

export default () => {
  return (<SecConAntd>
	<Button onClick={() => console.log('🎉🎉')))}}>点击</Button>
       </SecConAntd>)
}
```

```ts
type TwoDeleteButtonProps = {
    children: ReactElement<{
        onClick?: () => void;
        disabled?: boolean;
    }>;
    key?: number;
    title?: string;
    type: 'popconfirm' | 'modal';
    modalProps?: ModalFuncProps;
};
```

支持两种二次确认方式：`popconfirm` 和 `modal`, 对于 modal 场景，支持传入 antd 的 `ModalFuncProps`
npm package: @siroi/ts-zuc128
Description: 国密算法
Author: siroi
Latest version: 1.1.0

# @siroi/ts-zuc128

国密算法 ZUC128 的 TypeScript 实现

## 简介

`@siroi/ts-zuc128` 是一个基于 TypeScript 开发的国密算法 ZUC128 实现库，提供了符合国密标准的祖冲之序列密码算法（ZUC128）功能，可用于数据加密、解密等安全相关场景。

## 安装

使用 npm:

bash

```bash
npm install @siroi/ts-zuc128
```

使用 yarn:

bash

```bash
yarn add @siroi/ts-zuc128
```

使用 pnpm:

bash

```bash
pnpm add @siroi/ts-zuc128
```

## 用法示例

typescript

```typescript
const key = new Uint8Array(16).map((_, i) => i + 1);
const iv = new Uint8Array(16).map((_, i) => 16 - i);

const zuc = new ZUC128(key, iv);
const msg = new TextEncoder().encode('Hello 祖冲之 ZUC-128!');
const cipher = zuc.crypt(msg);
const back = new ZUC128(key, iv).crypt(cipher);

console.log('原文:', new TextDecoder().decode(msg));
console.log(
    '密文:',
    Array.from(cipher, (b) => ('0' + b.toString(16)).slice(-2)).join(' '),
);
console.log('解密:', new TextDecoder().decode(back));
```

### 构建

bash

```bash
pnpm build
```

![]()

### 发布

bash

```bash
pnpm release
```

![]()

## 许可证

本项目基于 MIT 许可证开源，详情参见 [LICENSE](https://www.doubao.com/chat/LICENSE) 文件。

## 仓库地址

[https://github.com/Gao-pw/ts-zuc128/](https://github.com/Gao-pw/ts-zuc128/)
npm package: @siroi/tsconfig
Description: A collection of TypeScript configurations for different project types
Author: siroi
Latest version: 1.0.1

### @siroi/tsconfig

这是一套针对不同项目类型的 TypeScript 配置集合。

## 安装

bash

```bash
pnpm add -D @siroi/tsconfig typescript
```

![]()

## 使用方法

### 浏览器端包

对于浏览器端的包，请扩展 `tsconfig.browser-package.json`：

json

```json
{
  "extends": "@siroi/tsconfig/tsconfig.browser-package.json",
  "compilerOptions": {
    "outDir": "./dist",
    "rootDir": "./src"
  }
}
```

![]()

### 浏览器应用

对于浏览器应用，请扩展 `tsconfig.browser-app.json`：

json

```json
{
  "extends": "@siroi/tsconfig/tsconfig.browser-app.json",
  "compilerOptions": {
    "outDir": "./dist",
    "rootDir": "./src"
  }
}
```

![]()

### 服务端包

对于服务端的包，请扩展 `tsconfig.server-package.json`：

json

```json
{
  "extends": "@siroi/tsconfig/tsconfig.server-package.json",
  "compilerOptions": {
    "outDir": "./dist",
    "rootDir": "./src"
  }
}
```

### 服务端应用

对于服务端应用，请扩展 `tsconfig.server-app.json`：

json

```json
{
  "extends": "@siroi/tsconfig/tsconfig.server-app.json",
  "compilerOptions": {
    "outDir": "./dist",
    "rootDir": "./src"
  }
}
```

## 许可证

MIT
npm package: @siroko/math
Description: This is a toolkit for my common used math functions.
Author: siroko
Latest version: 0.0.4

# maths.js

[![Build Status](https://travis-ci.org/Siroko/math.svg?branch=master)](https://travis-ci.org/Siroko/math) [![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)

Creating a home made Math library with the most common functions Im using on my daily creative coding sessions. 

```js
import * as math from "@siroko/math";
```

Alternatively you can import only the functions you need

```js
import {lerp, map} from "@siroko/math";
```

## Usage
[![NPM](https://nodei.co/npm/@siroko/math.png)](https://nodei.co/npm/@siroko/math/)

```js
import * as math from "@siroko/math";

// Linear interpolation between 2 values
const interpolated = math.lerp(0, 5, 0.5);
console.log(interpolated); // Will output 2.5

// Linear interpolation between 2 hexadecimal colors
const outColor = math.lerpHex("#000000", "#FFFFFF", 1);
console.log(outColor); // Will output "#FFFFFF"

// Map a value based on 2 numeric domains
const mapped = math.map(0, 1, -10, 10, 0.5);
console.log(mapped); // Will output 0
```

## License

MIT, see [LICENSE.md](http://github.com/Siroko/math/blob/master/LICENSE.md) for details.
npm package: @sirou/cli
Description: Official CLI for Sirou — scaffold, validate, export, and generate route documentation
Author: Sirou Contributors
Latest version: 1.1.3

# @sirou/cli

The official command-line tool for the Sirou ecosystem. Scaffold projects, validate schemas, export route definitions for cross-platform use, and generate interactive documentation portals.

## Installation

```bash
# Install globally
npm install -g @sirou/cli

# Or use with npx
npx @sirou/cli <command>
```

---

## Commands

### `sirou init`

Scaffolds a new `routes.ts` file with a starter configuration in the current directory.

```bash
sirou init
```

**Output:** Creates `routes.ts` with a home, profile, and settings route template.

---

### `sirou validate`

Validates your route schema file for common errors.

```bash
sirou validate
sirou validate --file src/routes.ts
```

**Options:**

| Flag                | Default     | Description              |
| ------------------- | ----------- | ------------------------ |
| `-f, --file <path>` | `routes.ts` | Path to your routes file |

**Checks performed:**

- Duplicate path definitions
- Param name mismatches
- Invalid guard references

---

### `sirou export`

Exports your route schema to a JSON file. Used by the Flutter bridge and other native integrations.

```bash
sirou export
sirou export --output assets/routes.json
sirou export --file src/routes.ts --output dist/routes.json
```

**Options:**

| Flag                  | Default       | Description              |
| --------------------- | ------------- | ------------------------ |
| `-f, --file <path>`   | `routes.ts`   | Path to your routes file |
| `-o, --output <file>` | `routes.json` | Output JSON file path    |

**Tip:** Run `sirou export` first, then `sirou docs` to generate a portal from real data.

---

### `sirou docs`

Generates a beautiful, standalone HTML documentation portal for your route architecture. Open the output file in any browser — no server required.

```bash
sirou docs
sirou docs --output my-route-docs.html
```

**Options:**

| Flag                  | Default           | Description              |
| --------------------- | ----------------- | ------------------------ |
| `-f, --file <path>`   | `routes.ts`       | Path to your routes file |
| `-o, --output <file>` | `sirou-docs.html` | Output HTML file path    |

**What the portal shows:**

- All route names (flat and nested with dotted keys)
- Route paths with param highlighting
- Guard badges
- Param badges
- Route metadata (JSON)

**Workflow:**

```bash
# 1. Export your schema
sirou export --output routes.json

# 2. Generate the portal
sirou docs --output docs/routes.html

# 3. Open in browser
open docs/routes.html
```

---

## License

MIT
npm package: @sirou/next
Description: Next.js adapter for Sirou — App Router, Pages Router, middleware, and server utilities
Author: Sirou Contributors
Latest version: 1.1.3

# @sirou/next

The Next.js adapter for Sirou. Supports both the **App Router** (Next.js 13+) and the **Pages Router**, providing type-safe navigation, middleware utilities, and server-side route helpers.

## Installation

```bash
npm install @sirou/next @sirou/core
```

---

## Setup

### App Router (Next.js 13+)

Create a client component to provide the router context:

```tsx
// app/providers.tsx
"use client";
import { SirouNextProvider } from "@sirou/next";
import { routes } from "@/routes";

export function Providers({ children }: { children: React.ReactNode }) {
  return <SirouNextProvider config={routes}>{children}</SirouNextProvider>;
}
```

```tsx
// app/layout.tsx
import { Providers } from "./providers";

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        <Providers>{children}</Providers>
      </body>
    </html>
  );
}
```

---

## API Reference

### `SirouNextProvider`

Context provider for App Router. Wraps `next/navigation` internally.

---

### `useSirouNextRouter()`

Returns the Sirou router instance backed by `next/navigation`.

```tsx
"use client";
import { useSirouNextRouter } from "@sirou/next";

const router = useSirouNextRouter<typeof routes>();
router.go("dashboard");
```

---

### `buildUrl(routeName, params?)`

Server-safe URL builder. Can be used in Server Components, `generateMetadata`, and API routes.

```typescript
import { buildUrl } from "@sirou/next";

// In generateMetadata
export async function generateMetadata({ params }) {
  return {
    alternates: {
      canonical: buildUrl("products.details", { productId: params.id }),
    },
  };
}
```

---

### `createSirouMiddleware(config)`

Creates a Next.js middleware function that runs Sirou guards on the edge.

```typescript
// middleware.ts
import { createSirouMiddleware } from "@sirou/next";
import { routes } from "./routes";

export const middleware = createSirouMiddleware(routes, {
  guards: {
    auth: async ({ request }) => {
      const token = request.cookies.get("token");
      if (!token) return { allowed: false, redirect: "/login" };
      return { allowed: true };
    },
  },
});

export const config = {
  matcher: ["/dashboard/:path*"],
};
```

---

### `SirouLink` (Next.js)

Type-safe link component using `next/link` under the hood.

```tsx
import { SirouLink } from "@sirou/next";

<SirouLink to="user" params={{ id: "abc" }} prefetch>
  View Profile
</SirouLink>;
```

---

## License

MIT
npm package: @sirou/react-native
Description: React Native adapter for Sirou — type-safe navigation with React Navigation v6+
Author: Sirou Contributors
Latest version: 1.1.3

# @sirou/react-native

The React Native adapter for Sirou. Integrates with **React Navigation v6+** to provide type-safe navigation, deep linking, and a consistent routing API across web and mobile.

## Installation

```bash
npm install @sirou/react-native @sirou/core @react-navigation/native @react-navigation/stack
```

---

## Setup

```typescript
// src/router.ts
import { createSirouNativeRouter } from "@sirou/react-native";
import { routes } from "./routes";

export const router = createSirouNativeRouter(routes);
```

```tsx
// App.tsx
import { NavigationContainer } from "@react-navigation/native";
import { SirouNativeProvider } from "@sirou/react-native";
import { router } from "./router";

export default function App() {
  return (
    <NavigationContainer>
      <SirouNativeProvider router={router}>
        <RootNavigator />
      </SirouNativeProvider>
    </NavigationContainer>
  );
}
```

---

## API Reference

### `createSirouNativeRouter(config)`

Creates an Sirou router instance backed by React Navigation.

```typescript
const router = createSirouNativeRouter(routes);
```

---

### `useSirouNativeRouter()`

Returns the router instance in any component.

```tsx
import { useSirouNativeRouter } from "@sirou/react-native";

const router = useSirouNativeRouter<typeof routes>();
router.go("profile", { id: "user123" });
```

---

### `useSirouParams(routeName)`

Returns typed params for the current screen.

```tsx
import { useSirouParams } from "@sirou/react-native";

function ProfileScreen() {
  const { id } = useSirouParams("profile");
  return <Text>User: {id}</Text>;
}
```

---

### `generateDeepLinkConfig(config)`

Automatically generates a React Navigation `linking` configuration from your route schema. This enables deep linking without manual configuration.

```typescript
import { generateDeepLinkConfig } from '@sirou/react-native';
import { routes } from './routes';

const linking = {
  prefixes: ['myapp://', 'https://myapp.com'],
  config: generateDeepLinkConfig(routes),
};

// Pass to NavigationContainer
<NavigationContainer linking={linking}>
```

---

## License

MIT
npm package: @sirou/svelte
Description: SvelteKit adapter for Sirou — type-safe routing with SvelteKit's goto and page store
Author: Sirou Contributors
Latest version: 1.1.3

# @sirou/svelte

The SvelteKit adapter for Sirou. Integrates with SvelteKit's `goto` and `page` store to provide type-safe routing in Svelte applications.

## Installation

```bash
npm install @sirou/svelte @sirou/core
```

---

## Setup

```typescript
// src/lib/router.ts
import { createSirouSvelteRouter } from "@sirou/svelte";
import { routes } from "./routes";

export const router = createSirouSvelteRouter(routes);
```

```svelte
<!-- src/routes/+layout.svelte -->
<script>
  import { setupSirouGuards } from '@sirou/svelte';
  import { router } from '$lib/router';

  setupSirouGuards(router, {
    auth: async ({ meta }) => {
      const session = await getSession();
      if (!session && meta?.requiresAuth) {
        return { allowed: false, redirect: '/login' };
      }
      return { allowed: true };
    },
  });
</script>

<slot />
```

---

## API Reference

### `createSirouSvelteRouter(config)`

Creates an Sirou router instance backed by SvelteKit's `goto` and `page` store.

```typescript
import { createSirouSvelteRouter } from "@sirou/svelte";
const router = createSirouSvelteRouter(routes);
```

---

### `setupSirouGuards(router, guards)`

Registers named guards on the router.

```typescript
setupSirouGuards(router, {
  auth: async (context) => {
    // ...
    return { allowed: true };
  },
});
```

---

### Using the Router in Components

```svelte
<script>
  import { router } from '$lib/router';

  function goHome() {
    router.go('home');
  }
</script>

<button on:click={goHome}>Go Home</button>
```

---

### `useSirouSvelteRoute()`

A Svelte store that reactively tracks the current route.

```svelte
<script>
  import { useSirouSvelteRoute } from '@sirou/svelte';
  const currentRoute = useSirouSvelteRoute();
</script>

<p>Current: {$currentRoute?.name}</p>
```

---

## License

MIT
npm package: @sirpho/components
Description: sirpho components
Author: sirpho
Latest version: 1.1.3

## sirpho components

#### 常用组件库

| 工具类     | 导入文件                 |
|---------|----------------------|
| 多列下拉组件  | ComboBox             |
| vxe筛选插件 | FilterExtend         |
| 页面容器    | PageContainer        |
| 查询容器    | QueryFilterContainer |
| 日志弹框    | StatusPop            |
| vxe容器   | VxeContainer         |
| 文本超出提示器 | OverflowTooltip      |

- [npm包地址](https://www.npmjs.com/package/@sirpho/components)


- [github地址](https://github.com/sirpho/components)

打包命令

```git
pnpm i
pnpm build
```

在项目中使用

```cmd
npm i @sirpho/components
```
npm package: @sirpho/utils
Description: sirpho utils
Author: sirpho
Latest version: 2.0.0

## sirpho utils

#### 集合了常用的工具类

| 工具类 | 导入文件 |
|-----|------|
| 加解密工具类   | @sirpho/utils/crypto    |
| 延时器   | @sirpho/utils/delayAsync    |
| 事件工具类   | @sirpho/utils/event    |
| 数字转换与计算   | @sirpho/utils/math    |
| 校验方法   | @sirpho/utils/validate    |
| 其他常用的方法   | @sirpho/utils/util    |

- [npm包地址](https://www.npmjs.com/package/@sirpho/utils)


- [github地址](https://github.com/sirpho/utils)

打包命令
```git
pnpm i
pnpm build
```

在项目中使用
```cmd
npm i @sirpho/utils
```
npm package: @sirse-dev/esbuild-plugin-import-glob
Description: ESBuild plugin to support import.meta.glob imports
Author: sirse
Latest version: 0.0.1

# esbuild-plugin-import-glob

## Installation

In your esbuild start script:

```js
import { build } from 'esbuild';
import importGlobPlugin from '@sirse-dev/esbuild-plugin-import-glob';

build({
    plugins: [importGlobPlugin()],
})
```

To install TypeScript types, add to your tsconfig.json file:

```jsonc
{
    "compilerOptions": {
        /* ... */
    },
    "include": [/* ... */, "@sirse-dev/esbuild-plugin-import-glob/client.d.ts"]
}
```
npm package: @sirse-dev/safe-context
Description: Safe React context
Author: Artiom Tretjakovas
Latest version: 0.3.0

# @sirse-dev/safe-context

> Safe React context

[![npm version](https://img.shields.io/npm/v/@sirse-dev/safe-context)](https://www.npmjs.com/package/@sirse-dev/safe-context)
[![npm downloads](https://img.shields.io/npm/dw/@sirse-dev/safe-context)](https://www.npmjs.com/package/@sirse-dev/safe-context)
[![vulnerabilities](https://img.shields.io/snyk/vulnerabilities/npm/@sirse-dev/safe-context)](https://www.npmjs.com/package/@sirse-dev/safe-context)

## Why?

React requires default value for the context. However, in some cases, default value doesn't have any meaning, because consumers cannot exist outside Provider. SafeContext lets you to have context, that could be used only inside provider. Trying to use `Consumer` or `useSafeContext` outside `Provider` will result in runtime error.

## Install

```bash
npm install @sirse-dev/safe-context
```

Or

```bash
yarn add @sirse-dev/safe-context
```

## Usage

```tsx
import { createSafeContext, useSafeContext } from '@sirse-dev/safe-context';

//     This should be non-nullable type ↓      ↓ - no default value.
const SampleContext = createSafeContext<number>();

// Use it as standard context.
const App = () => {
    return (
        <SampleContext.Provider value={10}>
            {/* Some app code... */}

            <SampleContext.Consumer>{(value) => <p>{value}</p>}</SampleContext.Consumer>
            <InnerComponent />
        </SampleContext.Provider>
    );
};

// Or from hook api
const InnerComponent = () => {
    const value = useSafeContext(SampleContext);

    return <div>{value}</div>;
};
```

## License

MIT © [sirse](https://github.com/ArtiomTr)

[Created with aqu 🌊](https://github.com/ArtiomTr/aqu#readme)