open-index/open-npm huggingface dataset:
npm package: @sicarchitect/randomid-generator
Description: Generator-id it shows random characters depends how many you will input as a argument. This site was built using [GitHub Pages](https://github.com/sicArchitect/npm-generatorID).
Latest version: 1.0.4

# generator-id

Generator-id it shows random characters depends how many you will input as a argument.
This site was built using [GitHub Pages](https://github.com/sicArchitect/npm-generatorID).

## Installation

```bash
yarn add @sicarchitect/randomid-generator
```

## Usage

```javascript
const randomID = require('@sicarchitect/randomid-generator');

console.log(randomID(10));
```

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.
npm package: @sicare/auth-provider
Description: A provider for Auth that uses OpenID Connect.
Latest version: 0.0.26

# @sicare/auth-provider

A customizable and extensible authentication provider for NextAuth.js, using OpenID Connect (OIDC) and Keycloak. This package enables seamless integration with Keycloak's token exchange and refresh mechanisms, while supporting both JWT and Database session strategies.

## ✨ Features

- 🔐 Secure token exchange via Keycloak

- 🔄 Automatic refresh token handling

- 🧠 Custom session and JWT callbacks

- ⚙️ Session strategy support: jwt or database

- 🍪 Cookie strategy configuration

- 🧩 Extensible storage using unstorage

- 📦 Designed for integration with Nuxt or Next.js (via next-auth)

## 📦 Installation

```bash
npm install @sicare/auth-provider
```
or
```bash
yarn add @sicare/auth-provider
```

## 🛠️ Usage

### Basic Setup

```typescript
import { createAuthProvidersOptions } from '@sicare/auth-provider';

const authOptions = createAuthProvidersOptions({
  sessionStrategy: 'jwt', // or 'database'
});
```

### Example with NextAuth

```typescript
// pages/api/auth/[...nextauth].ts
import NextAuth from 'next-auth';
import { createAuthProvidersOptions } from '@sicare/auth-provider';

const options = createAuthProvidersOptions({
  authSecret: process.env.NEXTAUTH_SECRET,
  sessionStrategy: 'jwt', // or 'database'
  debug: true,
});

export default NextAuth(options);
```

### Example with Nuxt

```typescript
import { NuxtAuthHandler } from '#auth';
import { createAuthProvidersOptions } from '@sicare/auth-provider';

const options = createAuthProvidersOptions({
  authSecret: process.env.NUXT_AUTH_SECRET,
  sessionStrategy: 'jwt', // or 'database'
  debug: true,
});

export default NuxtAuthHandler(options);
```

## ⚙️ Environment Variables

Make sure to define the following environment variables in your .env:

```env
KEYCLOAK_ID=your-client-id
KEYCLOAK_SECRET=your-client-secret
KEYCLOAK_ISSUER=https://your-keycloak-domain/realms/your-realm
SESSION_IDLE_TIMEOUT=1800
```


## 🧩 Utilities

This package also exposes utility functions:

- keycloakTokenExchangeHandler - For exchanging tokens via Keycloak.

- refreshAccessToken - For refreshing expired tokens.

- keycloakIssuerDiscover - For OIDC issuer discovery.

- authenticationScope - Default scope: openid email profile.
npm package: @sichangi/migrate
Description: A database migration library for mongodb via mongoose
Author: Mecolela Sichangi
Latest version: 0.0.1

# [Migrate](https://www.npmjs.com/package/@sichangi/migrate)
[![pipeline status](https://gitlab.com/mecolela/migrate/badges/master/pipeline.svg)](https://gitlab.com/mecolela/migrate/commits/master)
> A database migration library for mongodb via mongoose

_A personalized fork of ``migrate-mongoose`` by ``Balmasi et al``_

### Getting Started

Install from npm / yarn
```
 yarn add @sichangi/migrate
```

### Usage
```
migrate -h
```

##### Commands:
```bash
migrate list [options]

migrate create <migration_name> [options]

migrate up <migration_name> [options]

migrate down <migration_name> [options]

migrate prune [options]
```

#####  Config  File

The config file source path defaults to ``./migrate.[json|js]``

```json
{
  "autoSync": false,
  "migrationsDir": "./migrations",
  "collectionName": "migrations",
  "dbConnectionUri": "mongodb+srv://username:password@mongodb.example.com/database",
}
```

### Migration Files

Here's an example of a migration created using `migrate create some-migration-name` . 

###### migrations/1562460744403-some-migration-name.js
```javascript
/**
 * Make any changes you need to make to the database here
 */
async function up () {
  // Write migration here
}

/**
 * Make any changes that UNDO the up function;s operations here
 */
async function down () {
  // Write migration here
}

module.exports = { up, down };
```

#### Sample setup

Below is an example of a typical setup in a mongoose project

##### models/user.model.js
```javascript
const {Schema} = require('mongoose');

const UserSchema = new Schema({
    firstName: String,
    lastName: String,
  });

module.exports = mongoose.model('user', UserSchema);
```


##### models/index.js
```javascript
const mongoose = require('mongoose');
const User = require('./user.model');

mongoose.connect('mongodb://localhost:27017/mydb', { useNewUrlParser: true })

module.exports = { User };
```

##### migrations/1459287720919-my-migration.js
```javascript
import { User } from '../models'

async function up() {
  // Then you can use it in the migration like so  
  await User.create({ firstName: 'Ada', lastName: 'Lovelace' });
}
```
npm package: @sichangi/virtual-scroll
Description: Smooth fake scroll using CSS transform
Author: =
Latest version: 1.4.4

virtual-scroll
=====
[![pipeline status](https://gitlab.com/mecolela/virtual-scroll/badges/master/pipeline.svg)](https://gitlab.com/mecolela/virtual-scroll/commits/master)

Custom scroll event with inertia/momentum, touch and keyboard compatible.
> See this [article](http://www.everyday3d.com/blog/index.php/2014/08/18/smooth-scrolling-with-virtualscroll/) for the original authors description.

### Goals of the fork
- Support browser and commonjs environments
- Add SSR environment support
- Provide an [example](./example.html) usage

### Installation
```
yarn add @sichangi/virtual-scroll
```

### Usage & API

Return a new instance of VirtualScroll. See the options below.
```js
const instance = new VirtualScroll(options)
```

Listen to the scroll event using the specified function (fn) and optional context.
```js
instance.on(fn, context)
```

Remove the listener.
```js
instance.off(fn, context)
```

Will remove all events and unbind the DOM listeners.
```js
instance.destroy()
```

Events note:
Each instance will listen only once to any DOM listener.These listener are enabled/disabled automatically. However, it's a good practice to always call `destroy()` on your VirtualScroll instance, especially if you are working with a SPA.

### Options
| name   |   default     |  description |
|:----------|:-------------|:------|
| el |  window | the target element for mobile touch events |
| mouseMultiplier |  1  |  General multiplier for all mousewheel (including Firefox) |
| touchMultiplier   | 2 |  Mutiply the touch action by this modifier to make scroll faster than finger movement. |
| firefoxMultiplier | 15 |  Firefox on Windows needs a boost, since scrolling is very slow. |
| keyStep | 120 | How many pixels to move with each key press. |
| preventTouch | false | If true, automatically call `e.preventDefault` on touchMove. |
| unpreventTouchClass | vs-touchmove-allowed |  Elements with this class won't `preventDefault` on touchMove. For instance, useful for a scrolling text inside a VirtualScroll-controled element. |
| limitInertia | false | if true, will leverage [Lethargy](https://github.com/d4nyll/lethargy) to avoid everlasting scroll events (mostly on Apple Mouse, Trackpad, and free-wheel mouse). |
| passive | undefined | if used, will use [passive events declaration](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Improving_scrolling_performance_with_passive_listeners) for the wheel and touch listeners. Can be true or false. |
| disableUserInput | false | if true, does not listen for scroll events  |

### License
MIT.