open-index/open-npm huggingface dataset:
npm package: @mvcmlr/plugin-vue-jsx
Description: Provides Vue 3 JSX & TSX support with HMR.
Author: apades, Evan You
Latest version: 0.0.2

# @mvcmlr/plugin-vue-jsx [![npm](https://img.shields.io/npm/v/@mvcmlr/plugin-vue-jsx.svg)](https://npmjs.com/package/@mvcmlr/plugin-vue-jsx)

Provides Vue 3 JSX & TSX support with HMR.

```js
// vite.config.js
import vueJsx from '@mvcmlr/plugin-vue-jsx'

export default {
  plugins: [
    vueJsx({}),
  ],
}
```

## Options

### include

Type: `(string | RegExp)[] | string | RegExp | null`

Default: `/\.[jt]sx$/`

A [picomatch pattern](https://github.com/micromatch/picomatch), or array of patterns, which specifies the files the plugin should operate on.

### exclude

Type: `(string | RegExp)[] | string | RegExp | null`

Default: `undefined`

A [picomatch pattern](https://github.com/micromatch/picomatch), or array of patterns, which specifies the files to be ignored by the plugin.

> See [@vue/babel-plugin-jsx](https://github.com/vuejs/jsx-next) for other options.

### defineComponentName

Type: `string[]`

Default: `['defineComponent']`

The name of the function to be used for defining components. This is useful when you have a custom `defineComponent` function.

### tsTransform

Type: `'babel' | 'built-in'`

Default: `'babel'`

Defines how `typescript` transformation is handled for `.tsx` files.

`'babel'` - `typescript` transformation is handled by `@babel/plugin-transform-typescript` during `babel` invocation for JSX transformation.

`'built-in'` - `babel` is invoked only for JSX transformation and then `typescript` transformation is handled by the same toolchain used for `.ts` files (currently `esbuild`).

### babelPlugins

Type: `any[]`

Default: `undefined`

Provide additional plugins for `babel` invocation for JSX transformation.

### tsPluginOptions

Type: `any`

Default: `undefined`

Defines options for `@babel/plugin-transform-typescript` plugin.

## HMR Detection

This plugin supports HMR of Vue JSX components. The detection requirements are:

- The component must be exported.
- The component must be declared by calling `defineComponent` or the name specified in `defineComponentName` via a root-level statement, either variable declaration or export declaration.

### Supported patterns

```jsx
import { defineComponent } from 'vue'

// named exports w/ variable declaration: ok
export const Foo = defineComponent({})

// named exports referencing variable declaration: ok
const Bar = defineComponent({ render() { return <div>Test</div> }})
export { Bar }

// default export call: ok
export default defineComponent({ render() { return <div>Test</div> }})

// default export referencing variable declaration: ok
const Baz = defineComponent({ render() { return <div>Test</div> }})
export default Baz
```

### Non-supported patterns

```jsx
// not using `defineComponent` call
export const Bar = { ... }

// not exported
const Foo = defineComponent(...)
```
npm package: @mvcwcz/quick-api
Description: ---
Author: Wojciech Macewicz
Latest version: 1.0.1

# @mvcwcz/quick-api

---

**Works only with Next.js 13+, with experimental API routes enabled.**

Designed to be a quick and easy way to create a REST API for your Next.js project with zero setup.

This package is **not** a replacement for Next.js API routes, it's just a wrapper around them.

Highly inspired by **[tRPC](https://github.com/trpc/trpc)**, if you need more advanced features, check it out.

**WARNING: This package is still in development and it's API might change in the future.**

## Installation

```bash
npm install @mvcwcz/quick-api
# or
yarn add @mvcwcz/quick-api
# or
pnpm add @mvcwcz/quick-api
```

## Features

- [x] Zero setup
- [x] Schema based endpoint
- [x] Middlewares
- [x] Error handlers

## Documentation

- [Quick start](#quick-start)
- [Basic usage](#basic-usage)
- [Schema based endpoint](#schema-based-endpoint)
- [Middlewares](#middlewares)

### Quick start

```ts
import { QuickApi } from "@mvcwcz/quick-api";

export const qApi = QuickApi();
```

---

### Basic usage

Simple endpoint that will return "Hello world"

```ts
import { QuickApi } from "@mvcwcz/quick-api";

export const qApi = QuickApi();

export const GET = qApi.endpoint({
  callback: () => new Response("Hello world"),
});
```

---

## Schema based endpoint

Endpoint that will validate input and output

```ts
import { QuickApi } from "@mvcwcz/quick-api";

export const qApi = QuickApi();

export const GET = qApi.endpoint({
  input: z.object({
    query: z.object({
      id: z.string(),
    }),
  }),
  output: z.object({
    id: z.string(),
    email: z.string(),
  }),
  callback: ({ input }) => {
    return {
      id: input.id,
      name: "some name",
    };
  },
});
```

---

### Middlewares

Simple middleware that will add `prisma` to the context

```ts
import { QuickApi, middleware } from "@mvcwcz/quick-api";

export const qApi = QuickApi();

const sessionMiddleware = middleware((req) => {
  const session = null;
  return {
    session,
  };
});

export const GET = qApi.endpoint({
  middlewares: [sessionMiddleware],
  callback: async ({ input, ctx }) => {
    const session = ctx.session;

    if (!session) {
      throw new Error("Session not found");
    }

    return new Response("OK");
  },
});
```

---

### Error handlers

Although it's zero setup, you can still customize error handling

```ts
import { QuickApi, EndpointControllerConfig } from "@mvcwcz/quick-api";

const controllerConfig: EndpointControllerConfig = {
  onSchemaError: (error) => {
    return new Response(error.message, {
      status: 400,
    });
  },
  onCallbackError: (error) => {
    return new Response(error.message, {
      status: 500,
    });
  },
};

export const qApi = QuickApi(controllerConfig);
```

---

### Why

I wanted to create a simple way to create REST API endpoints for my Next.js projects without having to setup a whole
framework. I also wanted to have a way to validate input and output of the endpoints.
npm package: @mvd/playwright-msw
Description: Mock Service Worker binding for Playwright
Author: Artem Zakharchenko
Latest version: 0.4.4
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# `@mvd/playwright-msw`

[Mock Service Worker](https://mswjs.io) binding for [Playwright](https://playwright.dev/).

This version (`@mvd/playwright-msw`) is a fork with support for multiple pages, (e.g. popups).

## Usage

```ts
// playwright.setup.ts
import { test as testBase } from '@playwright/test'
import { createNetworkFixture, type NetworkFixture } from '@mvd/playwright-msw'
import { handlers } from '../mocks/handlers.js'

interface Fixtures {
  network: NetworkFixture
}

export const test = testBase.extend<Fixtures>({
  // Create a fixture that will control the network in your tests.
  network: createNetworkFixture({
    initialHandlers: handlers,
  }),
})
```

```ts
import { http, HttpResponse } from 'msw'
import { test } from './playwright.setup.js'

test('displays the user dashboard', async ({ network, page }) => {
  // Access the network fixture and use it as the `setupWorker()` API.
  // No more disrupted context between processes.
  network.use(
    http.get('/user', () => {
      return HttpResponse.json({
        id: 'abc-123',
        firstName: 'John',
        lastName: 'Maverick',
      })
    }),
  )

  await page.goto('/dashboard')
})
```
npm package: @mvd/sqlite-mcp
Description: Model Context Protocol (MCP) server for SQLite database operations
Author: Mees van Dongen
Latest version: 1.0.1

# SQLite MCP Server

A Model Context Protocol (MCP) server that provides tools and resources for interacting with SQLite databases. This server allows AI assistants to execute SQL queries and manage database schemas efficiently.

## Features

### Tools

- **get_schema**: Get complete schema information for all database tables
- **read_query**: Execute SELECT queries to read data from the database
- **write_query**: Execute INSERT, UPDATE, or DELETE queries to modify data
- **create_table**: Create new tables in the database
- **list_tables**: Show all existing tables
- **describe_table**: Show the schema for a specific table

All tools require a database path to be explicitly provided. This ensures:

- Support for multiple databases
- No configuration for each project.

## Installation

### VS Code

```json
{
  "servers": {
    "@mvd/sqlite-mcp": {
      "command": "bunx", // or "npx" if you prefer
      "args": ["@mvd/sqlite-mcp"]
    }
  }
}
```
npm package: @mvdlei/hooks
Description: A Collection of React Hooks
Latest version: 0.1.11

# @mvdlei/hooks

The `hooks` package provides a set of hooks for React applications.

## Installation

```bash
npm install @mvdlei/hooks
```

For the latest documentation, visit the website at [suite react-hooks](https://suite.mvdlei.nl/react/hooks/).
npm package: @mvdlei/web
Description: Web utilities like fetch, browser api's, etc.
Latest version: 0.0.6

# Web package

Web package with pre-configured fetch for HTTP API requests.

## Installation

```bash
npm install @mvdlei/web
```

## Usage

```javascript
import { api } from "@mvdlei/web";

api.get("https://api.example.com/data").then((response) => console.log(response));
```

### With body

```javascript
api("https://api.example.com/data", {
  method: "POST",
  body: { example: "example" },
}).then((data) => console.log(data));
```

### Can throw:

```javascript
try {
  const data = await api("https://api.example.com/data", {
    method: "POST",
    body: { example: "example" },
  });
} catch (error) {
  if (HttpError.is(error)) {
    // handle http error
    error.response;
  }
}
```

## License

MIT