open-index/open-npm huggingface dataset:
npm package: @jmaguirrei/belt
Description: Minimal Lodash like utilities
Author: José Manuel Aguirre
Latest version: 0.0.20

# Belt

Minimal Lodash-like utilities.

Purpose: To avoid installing Lodash in favor of "babel" ESNext features (like `map`, `filter`, `reduce`) but at the same time making available some missing features.

### List of methods:
- compact (`array`) => (`array`)
- get (`obj`, `key`, `defaultValue`) => (`any`)
- has (`obj`, `key`) => (`boolean`)
- last (`array`) => (`any`)
- omit (`object`, `[keys]`) => (`object`)
- pick (`object`, `[keys]`) => (`object`)
- random (low `number`, high `number`) => (`number`)
- range (low `number`, high `number`) => (`array`)
- sample (`array`) => (`any`)
- uid (strLength `number`) => (`string`)
- uniq (`array`) => (`array`)

### Usage
```javascript
import _ from '@jmaguirrei/belt';
const array = [ 1, 2, 3, 4 ];
console.log(_.last(array)) // 4
```
npm package: @jmainhard/fastify-supabase
Description: A Fastify plugin to use authenticated Supabase clients in your API.
Author: Philipp Steinrötter
Latest version: 0.0.4

# Supabase Plugin for Fastify

A Fastify plugin to use authenticated Supabase clients in your API.

<a href="https://github.com/psteinroe/fastify-supabase/actions/workflows/ci.yml"><img src="https://github.com/psteinroe/fastify-supabase/actions/workflows/ci.yml/badge.svg?branch=main" alt="Latest build" target="\_parent"></a>
<a href="https://github.com/psteinroe/fastify-supabase"><img src="https://img.shields.io/github/stars/psteinroe/fastify-supabase.svg?style=social&amp;label=Star" alt="GitHub Stars" target="\_parent"></a>

## Installation

Install with your favorite package manager.

```bash
pnpm add @psteinroe/fastify-supabase
```

If your package manager does not install peer dependencies automatically, you need to install them too

```bash
pnpm add @fastify/jwt @supabase/supabase-js
```

## Quick Start

First, register `@fastify/jwt` with your Supabase JWT secret. You can obtain it from Supabase Studio.

```ts
import fastifyJWT from "@fastify/jwt";

fastify.register(fastifyJWT, {
  secret: SUPABASE_JWT_SECRET,
});
```

Then, register the Supabase plugin.

```ts
import fastifySupabase from "@psteinroe/fastify-supabase";

fastify.register(fastifySupabase, {
  url: SUPABASE_URL,
  anonKey: SUPABASE_ANON_KEY,
  serviceKey: SUPABASE_SERVICE_KEY,
  // you can pass any `SupabaseClientOptions`
  options: {},
});
```

You can now access a `SupabaseClient` authenticated as the service role directly on the Fastify instance with `fastify.supabaseClient`.

To protect a route and use a user-authenticated `SupabaseClient`, create a `onRequest` route handler to verify the JWT. Note that this is a `@fastify/jwt` feature.

```ts
import { onRequestHookHandler } from "fastify";

export const verifyApiKey: onRequestHookHandler = async (request) => {
  await request.jwtVerify();
};
```

Now pass the hook to the route handler. You can now access either a client authenticated with the service role via the Fastify instance, or a user-authenticated client via the request. Thanks to `@fastify/jwt`, you can also access the Supabase `User` object on the request.

```ts
import { FastifyInstance } from "fastify";

import { verifyApiKey } from "../helpers/verify";

export default async function routes(fastify: FastifyInstance) {
  fastify.get("/health", {
    onRequest: [verifyApiKey],
    handler: async (request, reply) => {
      // authenticated as the user that is making the request
      const { data } = request.supabaseClient.from("article").select("*");

      // authenticated with service role
      const { data } = fastify.supabaseClient.from("article").select("*");

      // access the `User` object on the request
      const tenantId = request.user.app_metadata.tenantId;

      return reply.send("OK");
    },
  });
}
```

Thats it!

---

Fastify Supabase is created by [psteinroe](https://github.com/psteinroe).
Follow [@psteinroe](https://twitter.com/psteinroe) on Twitter for future project updates.
npm package: @jmake2024/vite-plugin-uni-pages
Description: File system based routing for uni-app applications using Vite
Author: KeJun
Latest version: 0.2.68

# @uni-helper/vite-plugin-uni-pages

File system-based routing for uni-app applications using Vite.

English | [简体中文](./README.Zh-CN.md)

## Installation

```bash
pnpm i -D @uni-helper/vite-plugin-uni-pages
```

## Usage

```ts
// vite.config.ts
import { defineConfig } from 'vite'
import Uni from '@dcloudio/vite-plugin-uni'
import UniPages from '@uni-helper/vite-plugin-uni-pages'

// It is recommended to put it in front of Uni
export default defineConfig({
  plugins: [UniPages(), Uni()],
})
```

Define global properties in `pages.config.(ts|mts|cts|js|cjs|mjs|json)`, You can use like `#ifdef H5` in the file.

```ts
// pages.config.ts
import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages'

export default defineUniPages({
  // You can also define pages fields, which have the highest priority.priority.
  pages: [],
  globalStyle: {
    navigationBarTextStyle: 'black',
    navigationBarTitleText: '@uni-helper',
  },
})
```

Now all pages will be found automatically!

### SFC custom block for Route Data

Add route meta to the route by adding a `<route>` block to the SFC. This will be
directly added to the route after it is generated, and will override it.

You can specify a parser to use using `<route lang="yaml">`, or set a default
parser using `routeBlockLang` option.

- **Supported parser:** JSON, JSON5, YAML
- **Default:** JSON5

```html
<!-- index.vue -->
<!-- use type to set index -->
<route type="home">
{
  "style": { "navigationBarTitleText": "@uni-helper" }
}
</route>

<!-- other.vue -->
<route lang="yaml">
style:
  navigationBarTitleText: "@uni-helper"
</route>
```

Import the virtual module to access the metadata of all pages

```ts
/// <reference types="@uni-helper/vite-plugin-uni-pages/client" />
import { pages } from 'virtual:uni-pages'

console.log(pages)
```

## Configuration

```ts
export interface Options {
  /**
   * Whether to scan and merge pages in pages.json
   * @default true
   */
  mergePages: boolean

  /**
   * Paths to the directory to search for page components.
   * @default 'src/pages'
   */
  dir: string

  /**
   * pages.json dir
   * @default "src"
   */
  outDir: string

  /**
   * exclude page
   * @default []
   */
  exclude: string[]

  /**
   * Set the default route block parser, or use `<route lang="xxx">` in SFC route block
   * @default 'json5'
   */
  routeBlockLang: 'json5' | 'jsonc' | 'json' | 'yaml' | 'yml'

  onBeforeLoadUserConfig: (ctx: PageContext) => void
  onAfterLoadUserConfig: (ctx: PageContext) => void
  onBeforeScanPages: (ctx: PageContext) => void
  onAfterScanPages: (ctx: PageContext) => void
  onBeforeMergePageMetaData: (ctx: PageContext) => void
  onAfterMergePageMetaData: (ctx: PageContext) => void
  onBeforeWriteFile: (ctx: PageContext) => void
  onAfterWriteFile: (ctx: PageContext) => void
}
```

## Acknowledgement

- [vite-plugin-pages](https://github.com/hannoeru/vite-plugin-pages.git)
npm package: @jman.dev/tsm
Description: TypeScript Module Loader
Author: Luke Edwards
Latest version: 2.4.1

<div align="center">
  <img src="logo.png" alt="tsm" width="200" />
</div>

<div align="center">
  <a href="https://npmjs.org/package/tsm">
    <img src="https://badgen.net/npm/v/tsm" alt="version" />
  </a>
  <a href="https://github.com/lukeed/tsm/actions">
    <img src="https://github.com/lukeed/tsm/workflows/CI/badge.svg" alt="CI" />
  </a>
  <a href="https://npmjs.org/package/tsm">
    <img src="https://badgen.net/npm/dm/tsm" alt="downloads" />
  </a>
  <a href="https://packagephobia.now.sh/result?p=tsm">
    <img src="https://badgen.net/packagephobia/publish/tsm" alt="publish size" />
  </a>
</div>

<div align="center">TypeScript Module Loader</div>

## Features

* Supports `node <file>` usage
* Supports [ESM `--loader`](https://nodejs.org/api/esm.html#esm_loaders) usage<sup>†</sup>
* Supports [`--require` hook](https://nodejs.org/api/cli.html#cli_r_require_module) usage
* Optional [configuration](/docs/configuration.md) file for per-extension customization

> <sup>†</sup> The ESM Loader API is still **experimental** and will change in the future.

## Install

```sh
# install as project dependency
$ npm install --save-dev tsm

# or install globally
$ npm install --global tsm
```

## Usage

> **Note:** Refer to [`/docs/usage.md`](/docs/usage.md) for more information.

```sh
# use as `node` replacement
$ tsm server.ts

# forwards any `node` ENV or flags
$ NO_COLOR=1 tsm server.ts --trace-warnings

# use as `--require` hook
$ node --require tsm server.tsx
$ node -r tsm server.tsx

# use as `--loader` hook
$ node --loader tsm main.jsx
```

## License

MIT © [Luke Edwards](https://lukeed.com)