open-index/open-npm huggingface dataset:
npm package: @md03/nestjs-clickhouse
Description: ClickHouse Nest.js connector module
Author: Michał Dziuba
Latest version: 1.1.0

<p align="center">
  <img src="https://github.com/michaldziuba03/nestjs-modules/assets/43048524/3681cb86-1e28-465a-8379-c8ae8161998b" width="320" alt="Nest Cassandra Logo" />
</p>

## ClickHouse module for Nest.js
ClickHouse module based on official client `@clickhouse/client`.

### Installation
```shell
# pnpm:
pnpm add @md03/nestjs-clickhouse @clickhouse/client
# npm:
npm install @md03/nestjs-clickhouse @clickhouse/client
```

### Basic usage
By default module is registered as global (you can change this behavior with `isGlobal` parameter).
> app.module.ts
```ts
import { Module } from '@nestjs/common';
import { ClickHouseModule } from '@md03/nestjs-clickhouse';


@Module({
  imports: [
    ClickHouseModule.forRoot({
      host: 'http://localhost:8123',
      username: 'default',
      password: '',
    }),
    ClickHouseModule.forRootAsync({
      name: 'conn2'
      useFactory: () => ({
        host: 'http://localhost:8124',
        username: 'default',
        password: 'pass123',
      }),
    }),
  ],
})
export class AppModule {}
```

> example.service.ts
```ts
import { Injectable } from '@nestjs/common';
import { InjectClickHouse } from '@md03/nestjs-clickhouse';
import type { ClickHouseClient } from '@clickhouse/client';

@Injectable()
export class ExampleService {
  constructor(
    @InjectClickHouse()
    private readonly client: ClickHouseClient,
  ) {}

  async getStats() {
    const result = await this.client.query(...);
  }
}

```

### Common problems
#### ReferenceError: ClickHouseClient is not defined
1. Make sure you have `@clickhouse/client` installed along side `@md03/nestjs-clickhouse` (this module requires client as peer dependency)
2. Import as type instead class
```ts
import type { ClickHouseClient } from '@clickhouse/client';
```
npm package: @md03/passport-facebook
Description: Passport.js simple strategy for Facebook login
Author: Michał Dziuba
Latest version: 1.0.0

## Facebook strategy for Passport.js
Easy to use Facebook strategy. It's just OAuth2 for Facebook implementation.

### Installation
```bash
# pnpm:
pnpm add @md03/passport-facebook
# npm:
npm install @md03/passport-facebook
# yarn:
yarn add @md03/passport-facebook
```

### Options
- `appSecret` (optional) - if provided, strategy will send request with `appsecret_proof` parameter. Enable **Require App Secret** in **Advanced Settings** if you want to secure your Graph API calls (more info: https://developers.facebook.com/docs/graph-api/securing-requests%20/). </br>

![image](https://user-images.githubusercontent.com/43048524/170886074-c8001fe9-974c-4abf-9d51-83a5f5e5aea6.png)


- `apiVersion` (default: `v16.0`) - you can provide specific Graph API version. Strategy is tested by default on `v16.0`.

- `tokenFromRequest` (optional) - strategy will use provided function to extract access token from request.
```ts
// example:
function getAccessToken(req: Request) {
  return req.query.accessToken;
}
```
- `rawUser` (optional) - strategy will return raw result from Facebook's API instead of transformed user object.

### Important things
1. Use HTTPS
2. Secure Graph API calls with `appsecret_proof` (https://developers.facebook.com/docs/graph-api/securing-requests%20/)
3. Never include your secrets directly in your code base - use environment variables instead.

Read: https://developers.facebook.com/docs/facebook-login/security/#checklist
npm package: @md03/passport-github
Description: Passport.js simple strategy for GitHub login
Author: Michał Dziuba
Latest version: 1.0.0

## GitHub strategy for Passport.js
Easy to use GitHub strategy. It's just OAuth2 for GitHub implementation.

### Installation
```bash
# pnpm:
pnpm add @md03/passport-github
# npm:
npm install @md03/passport-github
# yarn:
yarn add @md03/passport-github
```

### Options
- `clientId` (required) - used to exchange the code for an access token.

- `clientSecret` (required) - used to exchange the code for an access token.

- `passReqToCallback` (optional) - strategy will pass **Request** object to callback.

- `codeFromRequest` (optional) - strategy will use provided function to extract code from request.
```ts
// example:
function getCode(req: Request) {
  return req.body.code;
}
```

- `rawUser` (optional) - strategy will return raw result from GitHub's API instead of transformed user object.

### Important things
1. Use HTTPS
2. Never include your secrets directly in your code base - use environment variables instead.

### Usage

```ts
import { getGithubEmails, Strategy, GithubProfile } from '@md03/passport-github';

const githubStrategy = new Strategy({
    clientId: process.env.GITHUB_CLIENT_ID,
    clientSecret: process.env.GITHUB_CLIENT_SECRET,
}, async (accessToken, user: GithubProfile, verified) => {
    const emails = await getGithubEmails(accessToken);
    // perform some operations on emails, create new user in database
    
    return verified(null, user);
});

app.use(passport.initialize());
passport.use(githubStrategy);

// callback path:
app.get('/github',
    passport.authenticate('github', { session: false }),
    (req, res) => {
        res.json(req.user);
    }
);
```

### License
Distributed under the MIT License.
npm package: @md03/passport-google
Description: Passport strategy for Google
Author: Michał Dziuba
Latest version: 1.0.0

## Google strategy for Passport.js
Easy to use Google strategy. It's just **Sign In With Google** implementation (https://developers.google.com/identity/gsi/web/guides/verify-google-id-token).

### Installation
```bash
# pnpm:
pnpm add @md03/passport-google
# npm:
npm install @md03/passport-google
# yarn:
yarn add @md03/passport-google
```


### Options
- `clientId` (required) - required for idToken verification.

- `csrfCheck` (optional) - strategy will validate `g_csrf_token`. **False** by default.

- `passReqToCallback` (optional) - strategy will pass **Request** object to callback.

- `tokenFromRequest` (optional) - strategy will use provided function to extract id token from request.
```ts
// example:
function getIdToken(req: Request) {
  return req.query.idToken;
}
```

### Important things
1. Use HTTPS
2. Never include your secrets directly in your code base - use environment variables instead.
npm package: @md2wp/cli
Description: CLI tool for publishing markdown to WordPress
Author: Nicholas Hart
Latest version: 1.0.1

# @md2wp/cli

> CLI tool for publishing markdown files to WordPress with Gutenberg blocks

[![npm version](https://img.shields.io/npm/v/@md2wp/cli.svg)](https://www.npmjs.com/package/@md2wp/cli)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Features

- 📝 Publish markdown files directly to WordPress
- 🎨 Converts markdown to **Gutenberg blocks** (not plain HTML!)
- 🖼️ Automatic image upload and URL replacement
- 🔄 Intelligent image caching (avoid duplicate uploads)
- ✅ Validate markdown and frontmatter before publishing
- 📋 View current configuration
- 🔐 Secure authentication using WordPress Application Passwords

## Installation

```bash
npm install -g @md2wp/cli
```

## Quick Start

```bash
# Initialize configuration
md2wp init

# Validate a markdown file
md2wp validate my-post.md

# Publish to WordPress
md2wp publish my-post.md

# View configuration
md2wp config
```

## Commands

### `md2wp init`

Create `.md2wprc.json` and `.env` configuration files.

### `md2wp validate <file>`

Validate markdown file before publishing.

Options:

- `--verbose` - Show detailed validation output

### `md2wp publish <file>`

Publish a markdown file to WordPress.

Options:

- `--draft` - Publish as draft (override frontmatter)
- `--dry-run` - Preview without making API calls

### `md2wp config`

Show current configuration.

Options:

- `--verbose` - Show full configuration JSON

## Configuration

Create a `.md2wprc.json` file:

```json
{
  "wordpress": {
    "siteUrl": "https://yoursite.com",
    "username": "your-username"
  },
  "posts": {
    "defaultStatus": "draft",
    "defaultAuthor": 1
  },
  "images": {
    "basePath": "./images",
    "uploadPath": "/wp-content/uploads/md2wp/"
  }
}
```

Create a `.env` file:

```bash
MD2WP_PASSWORD=your-application-password
```

## Frontmatter

Add frontmatter to your markdown files:

```markdown
---
title: 'My Post Title'
status: draft
slug: my-post-slug
tags:
  - tutorial
  - markdown
categories:
  - development
excerpt: 'A short description'
date: 2024-01-15
---

# Your Content Here

![Hero Image](./images/hero.png)
```

## Documentation

For full documentation, visit [https://github.com/TeamNickHart/md2wp](https://github.com/TeamNickHart/md2wp)

## License

MIT © Nicholas Hart
npm package: @md3-ui/app-bar
Description: ## Installation
Latest version: 0.2.1

# @md3-ui/app-bar

## Installation

```sh
// with yarn
yarn add @md3-ui/app-bar

// with npm
npm i @md3-ui/app-bar
```

## Import Components

```jsx
import { AppBar, Toolbar } from "@md3-ui/app-bar"
```
npm package: @md3-ui/button
Description: ## Installation
Latest version: 0.2.1

# @md3-ui/button

## Installation

```sh
// with yarn
yarn add @md3-ui/button

// with npm
npm i @md3-ui/button
```

## Import Components

```jsx
import {
  ButtonBase,
  ElevatedButton,
  FilledButton,
  IconButton,
  OutlinedButton,
  TextButton,
  TonalButton,
} from "@md3-ui/button"
```
npm package: @md3-ui/card
Description: ## Installation
Latest version: 0.2.1

# @md3-ui/card

## Installation

```sh
// with yarn
yarn add @md3-ui/card

// with npm
npm i @md3-ui/card
```

## Import Components

```jsx
import { Card, CardActions, CardContent, CardMedia } from "@md3-ui/card"
```
npm package: @md3-ui/layout
Description: ## Installation
Latest version: 0.2.1

# @md3-ui/layout

## Installation

```sh
// with yarn
yarn add @md3-ui/layout

// with npm
npm i @md3-ui/layout
```

## Import Components

```jsx
import { Badge, Box, Divider, Grid, Link, Stack, Text } from "@md3-ui/layout"
```
npm package: @md3-ui/navigation-bar
Description: ## Installation
Latest version: 0.2.1

# @md3-ui/navigation-bar

## Installation

```sh
// with yarn
yarn add @md3-ui/navigation-bar

// with npm
npm i @md3-ui/navigation-bar
```

## Import Components

```jsx
import { NavigationBar, NavigationBarItem } from "@md3-ui/navigation-bar"
```
npm package: @md3-ui/navigation-drawer
Description: ## Installation
Latest version: 0.2.1

# @md3-ui/navigation-drawer

## Installation

```sh
// with yarn
yarn add @md3-ui/navigation-drawer

// with npm
npm i @md3-ui/navigation-drawer
```

## Import Components

```jsx
import {
  NavigationDrawer,
  NavigationDrawerItem,
} from "@md3-ui/navigation-drawer"
```
npm package: @md3-ui/snackbar
Description: ## Installation
Latest version: 0.2.1

# @md3-ui/snackbar

## Installation

```sh
// with yarn
yarn add @md3-ui/snackbar

// with npm
npm i @md3-ui/snackbar
```

## Import Components

```jsx
import { Snackbar, SnackbarContent } from "@md3-ui/snackbar"
```
npm package: @md3-ui/text-field
Description: ## Installation
Latest version: 0.2.1

# @md3-ui/text-field

## Installation

```sh
// with yarn
yarn add @md3-ui/text-field

// with npm
npm i @md3-ui/text-field
```

## Import Components

```jsx
import {
  TextField,
  TextInput,
  TextInputIcon,
  TextInputLabel,
} from "@md3-ui/text-field"
```
npm package: @md3tail/react
Description: An open ui library for React based on Material Design 3 web components
Author: al-march
Latest version: 0.0.2

# Material Design 3 React

<img src="https://raw.githubusercontent.com/al-march/md3tail/main/packages/react/preview.jpg" alt="md3tail react">

md3tail is an open source plugin based on [tailwindcss](https://tailwindcss.com/). It's built with [Material Design 3](https://m3.material.io/) and has the MIT license so you can use it included in a commercial project.

The md3tail/react library is a wrapper around [Lit](https://lit.dev/) web components that implement Material Design UI elements.

## Demo

Link to demo: [https://md3tail.vercel.app](https://md3tail.vercel.app/)

## Installation

Install the package:

`npm i @md3tail/react`

## Usage

```
import {
  TextButton,
  Radio,
  Row,
} from "@md3tail/react";

export default function Page() {
  return (
    <Row className="w-full" items="center">
      <TextButton>
        <Icon slot="icon">favorite</Icon>
        <span>Icon</span>
      </TextButton>
    </Row>
  );
}
```

## Sources

[Figma](https://www.figma.com/community/file/1035203688168086460)
[Material Design 3](https://m3.material.io/)
[Material Web](https://github.com/material-components/material-web/tree/main)
npm package: @md3tail/theme
Description: An open source plugin based on tailwindcss built with Material Desing 3
Author: al-march
Latest version: 0.0.6

# Material Design 3 plugin tailwindcss

<img src="https://raw.githubusercontent.com/al-march/md3tail/main/packages/theme/preview.jpg" alt="md3tail theme">

md3tail theme is an open source plugin based on [tailwindcss](https://tailwindcss.com/). It's built with [Material Design 3](https://m3.material.io/) and has the MIT license so you can use it included in a commercial project.

The plugin generates schema tokens by primary color, creates CSS classes for colors, surfaces, states, elevations and others staff according Material Design 3

## Demo

Link to demo: [https://md3tail.vercel.app](https://md3tail.vercel.app/)

## Installation

Install the package:

`npm i @md3tail/theme`

## Usage

Add plugin to plugin's list

```
import type { Config } from 'tailwindcss';
import { md3Theme } from '@md3tail/theme';

const config: Config = {
  content: [],
  plugins: [md3Theme()],
};
export default config;
```

## Sources

[Figma](https://www.figma.com/community/file/1035203688168086460)
npm package: @md5crypt/dragonbones-pixi
Description: So dragon bones is dead. I took some time to take the code from https://github.com/DragonBones/DragonBonesJS and
Latest version: 5.8.1

# DragonBones Fork

So dragon bones is dead. I took some time to take the code from https://github.com/DragonBones/DragonBonesJS and

1. updated it to modern js
2. updated it to pixi 6
3. applied a few pull requests hanging on DragonBonesJS
4. removed shared ticker support as I don't want that ticker dependency
5. changed armature display to use `Container` instead of `Sprite`
6. wtf was even going on in `WorldClock`, refactored it
7. added `stopped` to `IAnimatable` that blocks `advanceTime` calls
8. changed `PixiFactory.buildArmatureDisplay` to allow for creating armatures not bound to a clock
9. made so child armatures are updated on `advanceTime` when clock is not set

now you can `import { PixiFactory } from "@md5crypt/dragonbones-pixi"` like a normal person
npm package: @md5crypt/listener
Description: Because everyone has to have their own event listener implementation for some reason.
Author: Marek Korzeniowski
Latest version: 1.1.2

# Event listener

Because everyone has to have their own event listener implementation for some reason.

## Usage

```typescript
import Listener from `@thunderbite/event-listener`

class FooBar {
    public readonly onFoo = new Listener()
    public readonly onBar = new Listener<(foo: string, bar: number) => void>()
    public foo() {
        this.onFoo.invoke()
    }
    public bar() {
        this.onBar.invoke("foo", 0xba6)
    }
}

const fooBar = new FooBar()

fooBar.onFoo.add(() => console.log("foo"))
fooBar.onFoo.add(() => {
    console.log("this will be executed only once")
    return Listener.REMOVE
})
fooBar.onBar.add((foo, bar) => console.log(foo + bar))

fooBar.foo()
fooBar.bar()
```

## Instance methods

| name | signature | description |
|:---|:---:|:---|
| add | `(listener: T) => T` | add a callback, returns the callback that was passed to it |
| remove | `(listener: T) => boolean` | remove a callback, returns true if the callback was found |
| clear | `() => void` | remove all callbacks |
| invoke | `(...args: Parameters<T>) => T` | invoke all callbacks |
npm package: @mdagostino/react-native-ad-manager
Description: A react-native component for Google Ad Manager banners, interstitials and native ads.
Author: Mariano D'Agostino
Latest version: 1.2.9

# react-native-ad-manager

A react-native module for Google Ad Manager Banners, Interstitials and Native ads.

The banner types are implemented as components while the interstitial and rewarded video have an imperative API.

Native ads are implemented as wrapper for a native view.

## Installation

You can use npm or Yarn to install the latest beta version:

## Getting started

**npm:**

    npm i --save react-native-ad-manager

**Yarn:**

    yarn add react-native-ad-manager

### Mostly automatic installation

`$ react-native link react-native-ad-manager`

Alternatively for iOS you can install the library with CocoaPods by adding a line to your `Podfile`;

    pod 'react-native-ad-manager', path: '../node_modules/react-native-ad-manager'

### iOS

For iOS you will have to add the [Google Mobile Ads SDK](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/quick-start#import_the_mobile_ads_sdk) to your Xcode project.

### Android

On Android the Ad Manager library code is part of Play Services, which is automatically added when this library is linked.

But you still have to manually update your `AndroidManifest.xml`, as described in the [Google Mobile Ads SDK documentation](https://developers.google.com/ad-manager/mobile-ads-sdk/android/quick-start#import_the_mobile_ads_sdk).

## Usage

```jsx
import {
  Banner,
  Interstitial,
  PublisherBanner,
  NativeAdsManager,
} from 'react-native-ad-manager'

// Display a DFP Publisher banner
<Banner
  adSize="fullBanner"
  adUnitID="your-ad-unit-id"
  testDevices={[PublisherBanner.simulatorId]}
  onAdFailedToLoad={error => console.error(error)}
  onAppEvent={event => console.log(event.name, event.info)}
/>

// Display an interstitial
Interstitial.setAdUnitID('your-ad-unit-id');
Interstitial.setTestDevices([Interstitial.simulatorId]);
Interstitial.requestAd().then(() => Interstitial.showAd());

// Native ad
import NativeAdView from './NativeAdView';
const adsManager = new NativeAdsManager('your-ad-unit-id', [
    Interstitial.simulatorId,
]);
<NativeAdView
    targeting={{
        customTargeting: {group: 'user_test'},
        categoryExclusions: ['media'],
        contentURL: 'test://',
        publisherProvidedID: 'provider_id',
    }}
    style={{width: '100%'}}
    adsManager={adsManager}
    validAdTypes={['native', 'template']}
    customTemplateIds={['your-template-id-1', 'your-template-id-2']}
    onAdLoaded={ad => {
        console.log(ad);
    }}
    onAdFailedToLoad={error => {
        console.log(error);
    }}
/>
```

See the NativeAdView component in the [example NativeAdView](example/NativeAdView.js).
For a full example reference to the [example project](example).
npm package: @mdapi-issues/listmetadata-recordtype-personaccount
Description: Minimal working example to demonstrate a bug in listMetadata that RecordTypes of PersonAccount are wrongly listed as RecordTypes of Account
Author: Matthias Rolke @amtrack
Latest version: 3.0.0

# listmetadata-recordtype-personaccount

> Minimal working example to demonstrate a bug in listMetadata that RecordTypes of PersonAccount are wrongly listed as RecordTypes of Account

[![Actions Status](https://github.com/mdapi-issues/listmetadata-recordtype-personaccount/workflows/Test%20and%20Release/badge.svg)](https://github.com/mdapi-issues/listmetadata-recordtype-personaccount/actions)

## Steps to reproduce the issue

Create a scratch org with PersonAccounts feature enabled

```console
sf org create scratch -f config/project-scratch-def.json --set-default
```

push some Metadata (here: `RecordType:PersonAccount.Freelancer`)

```console
sf project deploy start
```

list RecordTypes using `listMetadata`

```console
sf org list metadata -m RecordType
```

```diff
- actual
+ expected
```

```diff
[
  ...
  {
    "createdById": "0053D0000050OT3QAM",
    "createdByName": "User User",
    "createdDate": "2020-11-18T13:31:01.000Z",
-    "fileName": "objects/Account.object",
+    "fileName": "objects/PersonAccount.object",
-    "fullName": "Account.PersonAccount",
+    "fullName": "PersonAccount.PersonAccount",
    "id": "0123D000001leARQAY",
    "lastModifiedById": "0053D0000050OT3QAM",
    "lastModifiedByName": "User User",
    "lastModifiedDate": "2020-11-18T13:31:01.000Z",
    "manageableState": "unmanaged",
    "type": "RecordType"
  },
  {
    "createdById": "0053D0000050OT3QAM",
    "createdByName": "User User",
    "createdDate": "2020-11-19T08:27:12.000Z",
-    "fileName": "objects/Account.object",
+    "fileName": "objects/PersonAccount.object",
-    "fullName": "Account.Freelancer",
+    "fullName": "PersonAccount.Freelancer",
    "id": "0123D000001ljZmQAI",
    "lastModifiedById": "0053D0000050OT3QAM",
    "lastModifiedByName": "User User",
    "lastModifiedDate": "2020-11-19T08:27:12.000Z",
    "manageableState": "unmanaged",
    "type": "RecordType"
  }
]
```

## References

- [forcedotcom/cli#734: PersonAccount issues with listMetadata and deployment](https://github.com/forcedotcom/cli/issues/734)
npm package: @mdapi-issues/listmetadata-standardvalueset
Description: Minimal working example to demonstrate a bug in listMetadata where queries for StandardValueSet return no results
Author: Matthias Rolke @amtrack
Latest version: 3.1.0

# listmetadata-standardvalueset

> Minimal working example to demonstrate a bug in listMetadata where queries for StandardValueSet return no results

[![Actions Status](https://github.com/mdapi-issues/listmetadata-standardvalueset/workflows/Test%20and%20Release/badge.svg)](https://github.com/mdapi-issues/listmetadata-standardvalueset/actions)

## Steps to reproduce the issue

Create a scratch org

```console
sf org create scratch -f config/project-scratch-def.json --set-default
```

list StandardValueSets using `listMetadata`

```console
sf org list metadata --metadata-type StandardValueSet
```

```diff
- actual
+ expected
```

```diff
- undefined
+ [
+   {
+     createdById: '',
+     createdByName: '',
+     createdDate: '',
+     fileName: 'standardValueSets/LeadSource.standardValueSet',
+     fullName: 'LeadSource',
+     id: '',
+     lastModifiedById: '',
+     lastModifiedByName: '',
+     lastModifiedDate: '',
+     type: 'StandardValueSet'
+   },
+   ...
+ ]
```
npm package: @mdapi-issues/listmetadata-standardvaluesettranslation-type
Description: Minimal working example to demonstrate a bug in listMetadata where the FileProperties for StandardValueSetTranslation have a broken type property
Author: Matthias Rolke @amtrack
Latest version: 3.0.0

# listmetadata-standardvaluesettranslation-type

> Minimal working example to demonstrate a bug in listMetadata where the FileProperties for StandardValueSetTranslation have a broken type property

[![Actions Status](https://github.com/mdapi-issues/listmetadata-standardvaluesettranslation-type/workflows/Test%20and%20Release/badge.svg)](https://github.com/mdapi-issues/listmetadata-standardvaluesettranslation-type/actions)

## Steps to reproduce the issue

Create a scratch org with the Translation Workbench enabled

```console
sf org create scratch -f config/project-scratch-def.json --set-default
```

push some translation for a StandardValueSet (here: `StandardValueSetTranslation:LeadSource-de`)

```console
sf project deploy start
```

list StandardValueSetTranslations using `listMetadata`

```console
sf org list metadata -m StandardValueSetTranslation
```

```diff
- actual
+ expected
```

```diff
[
  {
    "createdById": "005P00000063pPzIAI",
    "createdByName": "User User",
    "createdDate": "1970-01-01T00:00:00.000Z",
    "fileName": "standardValueSetTranslations/LeadSource-de.standardValueSetTranslation",
    "fullName": "LeadSource-de",
    "id": "",
    "lastModifiedById": "005P00000063pPzIAI",
    "lastModifiedByName": "User User",
    "lastModifiedDate": "1970-01-01T00:00:00.000Z",
    "namespacePrefix": "",
-    "type": { "$": { "xsi:nil": "true" } }
+    "type": "StandardValueSetTranslation"
  }
]
```