open-index/open-npm huggingface dataset:
npm package: @magicmock/core
Description: Core functionality for Magic Mock - HTTP request recording and replay
Author: Charley
Latest version: 0.8.0

# @magicmock/core

> Core functionality for Magic Mock - HTTP request recording and replay

This package contains the client-side logic for recording and replaying HTTP requests. It's typically used by the unplugin, but can be used standalone if needed.

## Installation

```bash
pnpm add @magicmock/core
```

## What's Inside

- **Client Script** - Browser-side code for intercepting requests
- **Types** - TypeScript definitions
- **Utilities** - Helper functions for URL encoding/decoding

## Usage

This package is usually consumed by `@magicmock/unplugin`. For standalone usage, see the [main documentation](https://github.com/charley3d/magic-mock#readme).

## License

MIT © [Charley](https://github.com/charley3d)
npm package: @magicmock/unplugin
Description: Universal plugin for Magic Mock - works with Vite, Webpack, Rollup, and esbuild
Author: Charley
Latest version: 0.7.0

# @magicmock/unplugin

> Universal bundler plugin for Magic Mock

Works with Vite, Webpack, Rollup, and esbuild.

## Installation

```bash
pnpm add -D @magicmock/unplugin
```

## Usage

### Vite

```typescript
// vite.config.ts
import { defineConfig } from 'vite'
import MagicMock from '@magicmock/unplugin/vite'

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

### Webpack

```javascript
// webpack.config.js
const MagicMock = require('@magicmock/unplugin/webpack')

module.exports = {
  plugins: [MagicMock()],
}
```

### Rollup

```javascript
// rollup.config.js
import MagicMock from '@magicmock/unplugin/rollup'

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

### esbuild

```javascript
// esbuild.config.js
import MagicMock from '@magicmock/unplugin/esbuild'

require('esbuild').build({
  plugins: [MagicMock()],
})
```

## Options

```typescript
interface MagicMockOptions {
  /**
   * Cache directory path
   * @default '.request-cache'
   */
  cacheDir?: string

  /**
   * Enable/disable the plugin
   * @default true
   */
  enabled?: boolean
}
```

## How It Works

1. Injects client script into your HTML
2. Sets up dev server endpoints for caching (`/api/__record`, `/api/__get-cache`)
3. Intercepts fetch and XMLHttpRequest calls for recording and mocking
4. Provides UI controls for toggling record/mock modes
5. Supports GET, POST, PUT, DELETE methods with request body recording

## License

MIT © [Charley](https://github.com/charley3d)
npm package: @magicnewton/newton-wallet
Description: Passwordless authentication for the web.
Author: Magic Labs
Latest version: 0.0.1

# Welcome to Magic Passport

Passport is the first chain-abstracted smart wallet, free for developers, that provide users with a single identity across onchain applications and supported blockchains. To join the private beta [apply here](https://form.typeform.com/to/Nxvr21lZ).
npm package: @magicnewton/wallet
Description: Passwordless authentication for the web.
Author: Magic Labs
Latest version: 0.0.15

# Welcome to Newton Wallet

Newton Wallet is the first chain-abstracted smart wallet, free for developers, that provide users with a single identity across onchain applications and supported blockchains. To join the private beta [apply here](https://form.typeform.com/to/Nxvr21lZ).