open-index/open-npm huggingface dataset:
npm package: @magitch/expo-magitch-dev-connect
Description: Metro plugin for Magitch dev environment — injects preview bridge (preview-protocol) for cross-origin communication between IDE and sandbox preview.
Author: Magitch
Latest version: 1.0.1

# @magitch/expo-magitch-dev-connect

Metro plugin for [Magitch](https://magitch.app) dev environment.

Injects the **preview-protocol** bridge script into HTML during Expo web development, enabling cross-origin communication between the IDE and the sandbox preview iframe.

## Features

- **Navigation** — back, forward, reload, navigate-to-url
- **Element Inspector** — select, highlight, get bounds
- **Readiness Detection** — PING/PONG handshake
- **Dev-only** — only active during `expo start --web`, does nothing during `expo export` or native builds
- **Zero native impact** — native (iOS/Android) is completely unaffected

## Install

```bash
npm install -D @magitch/expo-magitch-dev-connect
```

## Usage

```js
// metro.config.js
const { getDefaultConfig } = require('expo/metro-config');
const { withMagitchDevConnect } = require('@magitch/expo-magitch-dev-connect');

const config = getDefaultConfig(__dirname);

module.exports = withMagitchDevConnect(config);
```

## Options

```js
module.exports = withMagitchDevConnect(config, {
  // Override preview-protocol script URL
  previewProtocolUrl: 'https://custom-cdn.example.com/preview-protocol.min.js',
  // Trusted hosts for postMessage (default: ["preview.magitch.app", "sandbox.magitch.app", "localhost", "supgen.ai"])
  trustedHosts: ['magitch.app', 'localhost'],
  // Enable debug logging (default: true)
  debug: false,
});
```

## How It Works

Uses Metro's `server.enhanceMiddleware` to intercept HTML responses from the dev server and inject `<script>` tags before `</head>`:

1. `window.TRUSTED_PREVIEW_HOSTS` — config for postMessage origin validation
2. `window.PREVIEW_PROTOCOL_DEBUG` — debug logging toggle
3. `preview-protocol.min.js` — the cross-origin communication bridge

Only `text/html` responses are intercepted — JS bundles for native (iOS/Android) pass through untouched.

## License

MIT
npm package: @magitch/heroui-theme
Description: The default theme for HeroUI components
Author: HeroUI
Latest version: 2.4.26

# @heroui/theme

HeroUI theme primitives, here you can find the TailwindCSS `plugin`, `colors`, `layout`, `spacing`, `typography` and some other utilities.

Please refer to the [documentation](https://heroui.com/theme) for more information.

## Installation

```sh
yarn add @heroui/theme
# or
npm i @heroui/theme
```

## Contribution

Yes please! See the
[contributing guidelines](https://github.com/heroui-inc/heroui/blob/master/CONTRIBUTING.md)
for details.

## License

This project is licensed under the terms of the
[MIT license](https://github.com/heroui-inc/heroui/blob/master/LICENSE).
npm package: @magitch/vite-plugin-dev-connect
Description: Vite plugin for Magitch dev environment — injects preview bridge (preview-protocol) for cross-origin communication between IDE and sandbox preview.
Author: Magitch
Latest version: 1.0.2

# @magitch/vite-plugin-dev-connect

Vite plugin for [Magitch](https://magitch.app) dev environment.

Injects the **preview-protocol** bridge script into HTML during development, enabling cross-origin communication between the IDE and the sandbox preview iframe.

## Features

- **Navigation** — back, forward, reload, navigate-to-url
- **Element Inspector** — select, highlight, get bounds
- **Readiness Detection** — PING/PONG handshake
- **Dev-only** — does nothing during `vite build`

## Install

```bash
npm install -D @magitch/vite-plugin-dev-connect
```

## Usage

```ts
// vite.config.ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { magitchDevConnect } from '@magitch/vite-plugin-dev-connect'

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

## Options

```ts
magitchDevConnect({
  // Override preview-protocol script URL
  previewProtocolUrl: 'https://custom-cdn.example.com/preview-protocol.min.js',
  // Trusted hosts for postMessage (default: ["*"])
  trustedHosts: ['magitch.app', 'localhost'],
  // Enable debug logging (default: false)
  debug: true,
})
```

## License

MIT
npm package: @magitools/forem-wrapper
Description: A Forem V1 Api Wrapper
Author: Matteo Gassend
Latest version: 0.0.1

# @magitools/forem-wrapper

A Forem API(v1) wrapper.

## Current Features:

- articles (see list of endpoint [here](https://developers.forem.com/api/v1#tag/articles))

## Usage

To use this package, simply install it in your project by using npm, yarn or pnpm

```bash
npm install @magitools/forem-wrapper
```

You can then instatiate it like so:

```ts
import ForemClient from "@magitools/forem-wrapper";

const client = new ForemClient();
```

you can specify a different forem instance in the constructor if you don't want to send requests to dev.to

```ts
const client = new ForemClient("https://your-forem.com/api");
```

if you need to use endpoints requiring an api-key, you can add one like so:

```ts
const client = new ForemClient().setApiKey("your_api_key");
```

you can view a usage example in the **example** folder (also accessible as a demo [here]())
npm package: @magitools/magiutils
Description: an utility cli for magitools packages
Author: Matteo Gassend
Latest version: 0.0.2

# Magiutils

![NPM Version](https://img.shields.io/npm/v/%40magitools%2Fmagiutils)
![NPM Downloads](https://img.shields.io/npm/dm/%40magitools%2Fmagiutils)
![GitHub License](https://img.shields.io/github/license/magitools/magiutils)
[![pnpm](https://img.shields.io/badge/maintained%20with-pnpm-cc00ff.svg?style=for-the-badge&logo=pnpm)](https://pnpm.io/)

A utility cli for all things [magitools](https://github.com/magitools).

## Run it

Simply type `npx @magitools/magiutils`

### Supported Options

By default, running it with no arguments will launch an interactive prompt. To avoid that, you can also pass the following arguments:

- **-s**: generate a valid secret for magiedit (and others going forward)
- **-r**: start sequence to generate a release name
npm package: @magl88/nestjs-cloudflare-captcha
Description: A library for integrating and working with Cloudflare CAPTCHA in NestJS applications.
Author: TeaCoder
Latest version: 0.0.10

# @magl88/NestJS Cloudflare CAPTCHA

This module provides integration with Cloudflare CAPTCHA (also known as Turnstile) for NestJS-based applications.

## Installation

To install this module, use npm or yarn:

```bash
npm install @magl88/nestjs-cloudflare-captcha
# or
yarn add @magl88/nestjs-cloudflare-captcha
```

## Usage

### 1. Module Configuration

To use TurnstileModule, you need to import it into your main module and pass the configuration.

**Example using synchronous configuration:**

```typescript
import { Module } from '@nestjs/common';
import { TurnstileModule } from '@magl88/nestjs-cloudflare-captcha';

@Module({
  imports: [
    TurnstileModule.forRoot({
      secretKey: process.env.CAPTCHA_SECRET_KEY,
      token: (req) => req.body.captchaToken,
      skipIf: process.env.NODE_ENV === 'development',
    }),
  ],
})
export class AppModule {}
```

**Example using asynchronous configuration:**

```typescript
import { Module } from '@nestjs/common';
import { TurnstileModule } from '@magl88/nestjs-cloudflare-captcha';

@Module({
  imports: [
    TurnstileModule.forRootAsync({
      useFactory: async (configService: ConfigService) => ({
        secretKey: configService.get('CAPTCHA_SECRET_KEY'),
        token: (req) => req.headers['captcha-token'],
        skipIf: configService.get('NODE_ENV') === 'development',
      }),
    }),
  ],
})
export class AppModule {}
```

### 2. Protect Routes with CAPTCHA

To protect routes from bots, use Turnstile as a decorator.

**Example usage in a controller:**

```typescript
import { Controller, Post } from '@nestjs/common';
import { Turnstile } from '@magl88/nestjs-cloudflare-captcha';

@Controller('auth')
export class AuthController {
  @Post('login')
  @Turnstile()
  async login() {
    return 'This method is protected from bots with CAPTCHA';
  }
}
```

## Support

If you have any questions or issues, feel free to contact the author.

- Author: [TeaCoder](https://teacoder.ru)
- Contributors:
  - Vadim Nechaev (help@teacoder.ru)

## License

This project is licensed under the [MIT License](LICENSE).
npm package: @magloft/app-setup-tool
Description: Helper Tool for MagLoft App Update/Setup
Author: Christian Dimas @kenanchristian
Latest version: 1.2.0

@magloft/app-update-utility
===========================

Utility Helper for MagLoft App Update/Setup

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/@magloft/app-update-utility.svg)](https://npmjs.org/package/@magloft/app-update-utility)
[![Downloads/week](https://img.shields.io/npm/dw/@magloft/app-update-utility.svg)](https://npmjs.org/package/@magloft/app-update-utility)
[![License](https://img.shields.io/npm/l/@magloft/app-update-utility.svg)](https://github.com/kenanchristian/app-update-utility/blob/master/package.json)

<!-- toc -->
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->
# Usage
<!-- usage -->
```sh-session
$ npm install -g @magloft/app-setup-tool
$ mast COMMAND
running command...
$ mast (-v|--version|version)
@magloft/app-setup-tool/1.2.0 darwin-x64 node-v11.14.0
$ mast --help [COMMAND]
USAGE
  $ mast COMMAND
...
```
<!-- usagestop -->
# Commands
<!-- commands -->
* [`mast amazon-screenshot SRC`](#mast-amazon-screenshot-src)
* [`mast autocomplete [SHELL]`](#mast-autocomplete-shell)
* [`mast graphics APPID`](#mast-graphics-appid)
* [`mast help [COMMAND]`](#mast-help-command)
* [`mast update [CHANNEL]`](#mast-update-channel)

## `mast amazon-screenshot SRC`

Resize the image for Amazon Screenshot

```
USAGE
  $ mast amazon-screenshot SRC

ARGUMENTS
  SRC  Source Folder containing original screenshot files

OPTIONS
  -h, --help  show CLI help
```

## `mast autocomplete [SHELL]`

display autocomplete installation instructions

```
USAGE
  $ mast autocomplete [SHELL]

ARGUMENTS
  SHELL  shell type

OPTIONS
  -r, --refresh-cache  Refresh cache (ignores displaying instructions)

EXAMPLES
  $ mast autocomplete
  $ mast autocomplete bash
  $ mast autocomplete zsh
  $ mast autocomplete --refresh-cache
```

_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v0.1.0/src/commands/autocomplete/index.ts)_

## `mast graphics APPID`

Generate App Graphics for MagLoft App Submission

```
USAGE
  $ mast graphics APPID

ARGUMENTS
  APPID  Publication App ID

OPTIONS
  -h, --help  show CLI help
```

## `mast help [COMMAND]`

display help for mast

```
USAGE
  $ mast help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.1.6/src/commands/help.ts)_

## `mast update [CHANNEL]`

update the mast CLI

```
USAGE
  $ mast update [CHANNEL]
```

_See code: [@oclif/plugin-update](https://github.com/oclif/plugin-update/blob/v1.3.9/src/commands/update.ts)_
<!-- commandsstop -->
npm package: @magloft/kms
Description: Zero-Setup encrypted configuration library via Google Cloud KMS / Google Cloud Storage.
Latest version: 3.0.4

# @magloft/kms

Zero-Setup encrypted configuration library via Google Cloud KMS / Google Cloud Storage.

## Features

* Configure projects in a secure, central place.
* Manage different configurations and environments.
* Keep your codebase and repositories clean of any sensitive data.

## Requirements

1. Install `gcloud` sdk
2. Login via `gcloud auth login`
3. Set your google cloud project using `gcloud config set project PROJECT_ID`

## Installation

1. `npm -g install @magloft/kms` or `yarn global add @magloft/kms`
2. `kms init`

## CLI Usage

```bash
kms [command]

Commands:
  kms init         initialize kms
  kms edit [key]   edit key and publish to kms
  kms store [key]  store key to kms
  kms fetch [key]  fetch key from kms

Options:
  -e         Set environment  [string] (development, staging, production)
  --help     Show help        [boolean]
  --version  Show version     [boolean]
```

## Node Usage

```js
const { config } = require('@magloft/kms')

config('credentials/mysql').then((result) => {
  console.log(result)
  // { host: '127.0.0.1', port: '3306', username: 'root', password: 'root' }
})
```

## Environments

By default, the `development` environment will be used. Credentials are stored locally at `~/.kms/development/path/to/key.json`.

Any environment other than `development` will load and retrieve configuration from Google Cloud Storage and encrypt/decrypt via Google Cloud KMS.

To change the environment, you can:
1. Pass the environment via CLI argument `-e production`.
2. Set the `KMS_ENV=production` environment variable

## Configuration

The `KMS_PARAMS` environment variable allows you to specift the project, storage bucket and keyring settings:

`KMS_PARAMS=magloft-private:kms:kms`

The colon-seperated string contains `Bucket Name`, `Key Ring ID` and `Crypto Key ID`.
npm package: @magloft/tsed-graphql-ws
Description: GraphQL Subscription Support via graphql-ws
Author: Tobias Strebitzer
Latest version: 6.114.11

<p style="text-align: center" align="center">
 <a href="https://tsed.io" target="_blank"><img src="https://tsed.io/tsed-og.png" width="200" alt="Ts.ED logo"/></a>
</p>

<div align="center">
   <h1>GraphQL WS</h1>
</div>

`@magloft/tsed-graphql-ws` allows you to enable GraphQL Subscription support in your project.

This package uses [`graphql-ws`](https://github.com/enisdenjo/graphql-ws) to bridge a Websocket server with the existing TS.Ed http server. Once set up, you can start using [`type-graphql` Subscriptions](https://typegraphql.com/docs/subscriptions.html).

## Installation

First, make sure you install [@tsed/typegraphql](https://github.com/tsedio/tsed/blob/production/packages/graphql/typegraphql/readme.md#installation).

Next, install the GraphQL WS module:

```bash
npm install --save @magloft/tsed-graphql-ws
# or
yarn add @magloft/tsed-graphql-ws
```

Import `@magloft/tsed-graphql-ws` in your Server, and configure your instance:

```typescript
import { Configuration } from '@tsed/common'
import '@magloft/tsed-graphql-ws'

@Configuration({
  graphqlws: {
    instance: 'default'
  }
})
export class Server {}
```

> This instance needs to match your `graphql` instance ID

## Usage

Once installed, websocket server & subscription support will bootstrap automatically when you start your server. The following log message should indicate that you're good to go:

```prolog
[INFO ] [TSED] - [graphql-ws] GraphQL Subscriptions enabled for instance 'default'
```

## License

The MIT License (MIT)

Copyright (c) 2016 - 2018 Romain Lenzotti

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.