open-index/open-npm huggingface dataset:
npm package: @micropress/plugin-sdk
Description: SDK for building MicroPress plugins
Author: Jan Thewes
Latest version: 0.1.8

# MicroPress Plugin SDK

SDK for building MicroPress plugins.

## Installation

```bash
npm install @micropress/plugin-sdk
```

## Usage

```typescript
import { PluginSDK, PluginManifest } from '@micropress/plugin-sdk';

// In your plugin's backend code
export async function handler(sdk: PluginSDK, event: any) {
  // Store data
  await sdk.putData('my-key', { value: 'hello' });
  
  // Retrieve data
  const data = await sdk.getData('my-key');
  
  // Log activity
  sdk.log('info', 'Plugin executed successfully');
  
  return { success: true, data };
}
```

## API Reference

See TypeScript definitions in `dist/index.d.ts`.

## Plugin Structure

A plugin consists of:
- `manifest.json` - Plugin metadata
- `editor.js` (optional) - Browser bundle for TipTap extension
- `backend.ts` (optional) - API endpoint handlers
- `renderer.ts` (optional) - Content transformation during publish

## License

MIT
npm package: @micropress/theme-sdk
Description: SDK for building MicroPress themes
Author: MicroPress Team
Latest version: 0.1.3

# @micropress/theme-sdk

The official SDK for building MicroPress themes.

## Installation

```bash
npm install @micropress/theme-sdk
```

## Quick Start

```typescript
import { defineTheme, html, css } from '@micropress/theme-sdk';
import type { HeaderDTO } from '@micropress/theme-sdk';

export default defineTheme({
  config: {
    id: 'my-theme',
    name: 'My Theme',
    version: '1.0.0',
  },
  renderers: {
    header: {
      render: (data: HeaderDTO) => html`
        <header>${data.siteName}</header>
      `.html,
    },
  },
});
```

## CLI

```bash
micropress-theme init my-theme    # Create new theme
micropress-theme build            # Build theme
micropress-theme validate         # Validate structure
micropress-theme package          # Create ZIP
```

## Documentation

See the [full documentation](https://github.com/micropress/theme-sdk#readme).

## License

MIT
npm package: @microprocess/wapi-store
Description: Minimal Baileys data storage for your favorite DBMS built with Prisma
Author: Royhan
Latest version: 1.1.8

# WAPI Store

Minimal wapi data storage for your favorite DBMS built with Prisma. This library is a simple handler for Baileys event emitter that will listen and update your data in the database

## Requirements

- **Prisma** version **4.7.x** or higher
- **Baileys** version **5.x.x** or higher

## Supported Databases

- MySQL and PostgreSQL database should support the default schema out of the box
- For CockroachDB, you need to do this small change in the schema file

```diff prisma
model Session {
  pkId      BigInt    @id @default(autoincrement())
  sessionId String
  id        String
-  data      String @db.Text
+  data      String

  @@unique([sessionId, id], map: "unique_id_per_session_id_session")
  @@index([sessionId])
}
```

- For MongoDB, you need to follow [this convention](https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference?query=getdmff&page=1#mongodb-10) and update the `pkId` field. Then follow the previous CockroachDB guide
- SQLite and SQL Server database are not supported since they didn't support Prisma's `JSON` scalar type

## Installation

```bash
# Using npm
npm i @microprocess/wapi-store

# Using yarn
yarn add @microprocess/wapi-store
```

## Setup

Before you can actually use this library, you have to setup your database first

1. Copy the `.env.example` file from this repository or from the `node_modules` directory (should be located at `node_modules/@microprocess/wapi-store/.env.example`). Rename it into `.env` and then update your [connection url](https://www.prisma.io/docs/reference/database-reference/connection-urls) in the `DATABASE_URL` field
1. Copy the `prisma` directory from this repository or from the `node_modules` directory (should be located at `node_modules/@microprocess/wapi-store/prisma/`). Additionaly, you may want to update your `provider` in the `schema.prisma` file if you're not using MySQL database
1. Run your [migration](https://www.prisma.io/docs/reference/api-reference/command-reference#prisma-migrate)

## Usage

```ts
import pino from 'pino';
import makeWASocket from '@adiwajshing/baileys';
import { PrismaClient } from '@prisma/client';
import { initStore, Store } from '@microprocess/wapi-store';

const logger = pino();
const socket = makeWASocket();
const prisma = new PrismaClient();

// You only need to run this once
initStore({
  prisma, // Prisma client instance
  logger, // Pino logger (Optional)
});

// Create a store and start listening to the events
const store = new Store('unique-session-id-here', socket.ev);

// That's it, you can now query from the prisma client without having to worry about handling the events
const messages = prisma.message.findMany();
```

## Contributing

PRs, issues, suggestions, etc are welcome. Please kindly open a new issue to discuss it
npm package: @microprofile/imagers
Description: a image process libs in the browser
Author: https://github.com/microprofile-inc
Latest version: 0.0.6

Rust image (https://github.com/image-rs/image) wrapper for JS/TS

# online example
https://microprofile-inc.github.io/imagers

# Supported Image Formats

- Png
- Jpeg
- WebP

# Functions

- crop
- blur
- fast_blur
- invert
- resize
- huerotate
- rotate90
- rotate180
- rotate270
- flip_horizontal
- flip_vertical
- brighten
- thumbnail
- image_convert_format
- grayscale
npm package: @microprogram/plugin-components
Description: Automatically parse components in `.*xml` and fill in json
Author: JserWang
Latest version: 1.0.0-beta.30

# @microprogram/plugin-wxapp-components

## Install

```bash
# yarn
yarn add @microprogram/plugin-components
```

## Usage

in gulpfile.js

```
const components = require('@microprogram/plugin-components');

return gulp.src(/path/to/miniprogramRoot + '**/*.wxml')
    .pipe(components({
      targetKey: "usingComponents",
      transformers: [
        {
          prefix: 'van-',
          getComponentPath: (componentName) => {
            return `@vant/weapp/${componentName}/index`
          }
        },
        {
          prefix: 'self-',
          getComponentPath: (componentName) => {
            return `../../components/${componentName}/index`
          }
        },
        {
          prefix: 'home-',
          getComponentPath: (componentName) => {
            return `./components/${componentName}/index`
          }
        }
      ]
    }))
    .pipe(gulp.dest(destPath))
```

### Example

The following is the original file content
`.wxml` file:

```html
<van-button>Button</van-button>
```

`.json` file:

```json
{
  "usingComponents": {}
}
```

When use this task, the json file will auto be changed to

```json
{
  "usingComponents": {
    "van-button": "@vant/weapp/button/index"
  }
}
```
npm package: @microprogram/router
Description: [docs](https://jserwang.github.io/microprogram-router/)
Author: JserWang
Latest version: 1.0.0-beta.10

# microprogram-router

[docs](https://jserwang.github.io/microprogram-router/)

## Usage

```bash
yarn add @microprogram/router
# npm
npm install @microprogram/router
```

Create `router` directory in the project, and create an `index.js` or `index.ts` file in the `router` directory

``` ts
import { 
  createRouter,
  createWechatHistory,
  RouteRecord
} from '@microprogram/router'

const routes: RouteRecord[] = [
  {
    path: '/',
    page: 'pages/index/index'
  },
  {
    path: '/log',
    page: 'pages/log/index'
  }
]

const router = createRouter({
  history: createWechatHistory(),
  routes
})

export default router
```

in `app.ts`

``` ts
import router from './router/index'

App({
  router
})
```

in anywhere to use

``` ts
import { useRoute, useRouter } from '@microprogram/router'

Page({
  onShow() {
    // 获取当前页面中的参数
    useRoute().params
  },
  handleClick() {
    useRouter().push('/log')
  }
})
```

## Development

``` bash
git clone https://github.com/JserWang/microprogram-router
cd microprogram-router
yarn
yarn build
```