open-index/open-npm huggingface dataset:
npm package: @slacking/adapter
Description: element-ui 组件包合集
Author: njzzz
Latest version: 1.0.24

### @slacking/adapter

element-ui 组件包合集

## 使用

```ts
import { elementUiRegister } from "@slacking/adapter";
elementUiRegister();
```

## 类型提示

项目中创建 `types/@slacking/form/index.d.ts` 文件, 写入如下内容, 用来拓展 `type`

```ts
import "@slacking/form";
import { AdapterElementUI } from "@slacking/adapter";
declare module "@slacking/form" {
  export interface CustomFormItemProperties {
    type: AdapterElementUI;
  }
}
```
npm package: @slackoff/tsc-err-dirs
Description: Show tsc errors by directories.
Author: ShenQingchuan
Latest version: 0.0.23

# tsc-err-dirs [![npm](https://img.shields.io/npm/v/@slackoff/tsc-err-dirs.svg)](https://npmjs.com/package/@slackoff/tsc-err-dirs)

[中文文档](./README-CN.md)

Display tsc errors count on file tree, can hot update when you change those files.

## Screeshot

<img width="612" alt="image" src="https://user-images.githubusercontent.com/46062972/190348158-a42b47d5-468f-4b9e-b555-36f6dc680fc4.png">

## Requirement
 
- node version: >=16
- tsc version: >=4.5.5
- Installed [Nerd Font](https://github.com/ryanoasis/nerd-fonts)

> **Warning**: We recommend you to use this CLI app in Mac OS or Linux, 
  since it's using a lot of shell features which may not have good support in Windows.

## Install

```bash
npm i -g @slackoff/tsc-err-dirs
```

## Usage

```bash
# the project root path MUST contains `tsconfig.json`
tsc-err-dirs <path-to-your-project-root>
```

## Options

- `--engine` (shorthand: `-e`)
  
  **Type:** `'tsc' | 'vue-tsc'`
  
  Select which tsc to be executed.

## Internal

Since `tsc` doesn't provide a way to get the errors count of each file, we have to use a trick to get it.

1. Use `tsc --noEmit --pretty false` to get all the errors of each file which are not prettified format.
2. Extract stdout and parse it to get the errors info of each file.
3. Use [inquirer-file-tree-selection-prompt](https://www.npmjs.com/package/inquirer-file-tree-selection-prompt) to display the errors count on file tree.


## License

[MIT](./LICENSE) License © 2022 [ShenQingchuan](https://github.com/ShenQingchuan)
npm package: @sladdky/asset-optimizer
Description: Asset optimizer.
Author: Michal Sladký
Latest version: 0.6.10

# ASSET-OPTIMIZER

Optimizing videos, photos, svgs from one folder to another.

**Supported extensions:**<br>
JPG, JPEG, PNG, TIFF, SVG, MP4, MOV *...(more to be added)*

<br>

## Why?
There are other options like webpack, gulp, vite, nuxt/next plugins, etc. to optimize assets. This library makes optimizing assets framework agnostic, doesn't slow down building your app and gives you callbacks to customize what to do with the files and you don't have to rely on pre-coded options.

**Drawbacks:**
- with current implementation doesn't scale well for infinite number of file => use for large projects is not suitable at the moment

<br>

## Table of contents
**CLI**
* [installation](#cli-installation)
* [usage](#cli-usage)

<br>

**Programmable**
* [installation](#programmable-installation)
* [usage](#programmable-usage)


<br><br><br>

# CLI
<a name="cli-installation"></a>
## Instalation
```sh
npm install --location=global @sladdky/asset-optimizer
```
<a name="cli-usage"></a>
## Usage
```sh
asset-optimizer
            [--inputcwd=<path>]   default: public-src
            [--outputcwd=<path>]  default: public
            [--ui=<true|false>]   default: false
```

<br>

# Programmable

<a name="programmable-installation"></a>
## Instalation
```sh
npm install --save-dev @sladdky/asset-optimizer
```
<a name="programmable-usage"></a>
## Usage

```sh
const { join } = require('path')
const { createAssetOptimizer } = require('@sladdky/asset-optimizer')

const ao = createAssetOptimizer({
    core: {
        inputCwd: join(__dirname, 'public-src'),
        outputCwd: join(__dirname, 'public'), //optimized|processed files
    }
})
ao.watch()
npm package: @slademan/musickit-js-types
Description: TypeScript definitions for musickit-js
Latest version: 1.2.2

# Installation
> `npm install --save @slademan/musickit-js-types`

# Summary
This package contains type definitions for musickit-js (https://developer.apple.com/documentation/musickitjs).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/musickit-js.
Some modifications were made to support additional attributes, and also to improve compatibility to MusicKit JS v3.

### Additional Details
 * Last updated: Thu, 24 Oct 2024 14:02:26 GMT
 * Dependencies: none

# Credits
The original definitions were written by [Devid Farinelli](https://github.com/misterdev).
npm package: @sladg/eslint-config-base
Description: Reusable set of rules for eslint (nodejs/nextjs/react-native) projects.
Author: Jan Soukup
Latest version: 2.4.2

# Eslint config

Opinionated configuration for eslint & prettier.

- [Usage](#usage)
  - [Next.js](#nextjs)
  - [Node.js](#nodejs)
  - [React Native / Expo](#react-native--expo)
  - [Prettier](#prettier)
  - [Optional: JSON Formatting (package.json, tsconfig.json)](#optional-json-formatting-packagejson-tsconfigjson)

## Usage

Install via npm:

```sh
npm install @sladg/eslint-config-base@latest --save-dev
```

### Next.js

Version 15/16.

```js
// eslint.config.js
import nextConfig from "@sladg/eslint-config-base/next"

export default defineConfig([
  nextConfig,
  {
    rules: {
      "no-console": "warn",
    },
  },
])
```

### Node.js

Version 22 and up.

```js
// eslint.config.js
import nodeConfig from "@sladg/eslint-config-base/node"

export default defineConfig([
  nodeConfig,
  {
    rules: {
      "no-console": "off",
    },
  },
])
```

### React Native / Expo

```js
// eslint.config.js
import nativeConfig from "@sladg/eslint-config-base/native"

export default defineConfig([nativeConfig])
```

### Prettier

Prettier is integrated into ESLint's configuration via `eslint-plugin-prettier`. You can customize Prettier options through the `prettier/prettier` rule:

```js
// eslint.config.js
import nodeConfig from "@sladg/eslint-config-base/node"

export default defineConfig([
  nodeConfig,
  {
    rules: {
      "prettier/prettier": [
        "error",
        {
          singleQuote: true,
          trailingComma: "all",
          arrowParens: "always",
          printWidth: 100,
        },
      ],
    },
  },
])
```

### Optional: JSON Formatting (package.json, tsconfig.json)

For formatting and sorting `package.json` and `tsconfig.json` files:

```js
// eslint.config.js
import nodeConfig from "@sladg/eslint-config-base/node"
import jsonConfig from "@sladg/eslint-config-base/optional/json"

export default defineConfig([nodeConfig, jsonConfig])
```
npm package: @sladg/imaginex-lambda
Description: Pre-compiled python lambda used for image processing
Author: Jan Soukup
Latest version: 0.18.2

# Imaginex

Pre-compiled Pythong lambda based on Pillow.
Shares API with NextJS and is mainly meant as replacement of shitty build-in NextJS image optimizer.

However, can be plugged into any other project with straight forward API.

Currently supported image formats are
PNG, JPEG, ICO, WEBP, GIF, TIFF, BMP and others based on the former formats supported by pillow package (e.g. -
JPEG2000, JFIF, MPO, ...)

## Usage

- Import/download zips from this package,
- Use them as lambda's code,
- Allow lambda to access S3 bucket with images and set S3_BUCKET_NAME env variable,
- Call lambda via API Gateway with query params:
    - url (relative to bucket or absolute to anywhere)
    - w (width for resizing) or h (height for resizing)
    - q (quality for optimizing)

Response is base64 encoded image.

Supports all formats supported by Pillow.
Faster and easily deployable than NextJS image optimizer.

## Notes

Only 3.8 python runtime is supported!

If you want to compile python modules for Lambda, make sure to set `--platform manylinux2014_x86_64`. It's important to
set this in order to have compatible binaries in Lambda's execution environment.

---

Child directory of: http://github.com/sladg/nextjs-lambda
npm package: @sladg/pdf-lambda
Description: Pre-compiled python lambda used for PDF processing
Author: Jan Soukup
Latest version: 1.1.0

# PdfLambda

PdfLambda is a simple AWS Lambda function that converts HTML to PDF using [wkhtmltopdf](https://wkhtmltopdf.org/).

Moreover, it's possible to use it for merging multiple PDFs into one.

## Usage

Very simple and straight forward `npx --package @sladg/pdf-lambda cli deploy`. Pass `--help` in the end for all options and configuration.

In case you want to clean it up, use `npx --package @sladg/pdf-lambda cli remove`.

Command will output "Rest API URL" that you can use to make requests.

## Endpoints

`GET /` - simple check to see options and configuration.

`POST /pdf/merge-multiple` - merge multiple PDFs into one

`POST /pdf/convert-from-html` - convert HTML to PDF

Make sure to set `Accept: application/pdf` in request headers.

## Notes

Does not support `var(--color)` CSS properties due to `wkhtmltopdf` limitations.

Generally the CSS and HTML should be as simple as possible, it's not as powerful as Chrome or Firefox, but it's way faster and smaller, resulting in small & efficient solution.
npm package: @sladg/release-utils
Description: Simple set of npx commands to automate git flow.
Author: Jan Soukup
Latest version: 1.4.0

# Release utils

This package exposes two CLI functions intended to deal with versioning your application and releasing.

Motivation behind is to get rid of huge dependencies and over-kill implementations such as @auto-it, release-it or semver. Those are bulky and unncessarily complex.

## TL;DR

`npx --package @sladg/release-utils utils help`

## Guess

Simple CLI command that takes commit message and current version and outputs (stdout) next version based on keywords inside commit message.

## Shipit

Similar to guess command, however, it automatically tags a commit on current branch and creates release branch for you so hooking up pipelines is as simple as it can be. Version is automatically bumped in common NPM and PHP files (package.json, package-lock.json and composer.json).

Simply call `npx --package @sladg/release-utils utils shipit` on any branch and be done.

## Changelog

Simple utility that compares two tags and outputs commits between those two tags. It's intended to be used in CI/CD pipelines to generate changelog for release notes. If you are using using `shipit` command, use `--changelog` flag instead.

## Commit

One-liner for `commitizen` that allows you to commit changes in a standardized way. It uses `cz-emoji-conventional` inside and no additional configuration files are necessary.
npm package: @sladg/s3-lambda
Description: Pre-compiled python lambda used for proxying ApiGateway requests to S3
Author: Jan Soukup
Latest version: 0.2.3

# S3Lambda

S3 is a simple AWS Lambda function that allows for integration between HttpApi (v2) and S3. This integration is currently not supported on HttpApi resulting in need to use HttpIntegration and having bucket on `public-read` which is not desired.

This function circumvents this limitation by standing between ApiGateway and S3 and proxying events.

## Usage

Very simple and straight forward `npx --package @sladg/s3-lambda cli deploy`. Pass `--help` in the end for all options and configuration.

In case you want to clean it up, use `npx --package @sladg/s3-lambda cli remove`.

Command will output "s3LambdaArn" that you can use to make requests.

## Note

We are using `pathParameters.proxy` as key for S3, so you should set your HttpApi with `/prefix/{proxy+}` route, where `prefix` won't be passed to S3. There is currently no setting for using multiple S3 buckets or setting prefix for S3 key.
npm package: @sladg/serverless-kv
Description: Simple DynamoDB wrapper, most up-to-date, extremely easy to plug-in and use like Redis.
Author: Jan Soukup
Latest version: 1.6.0

# ServerlessKV

Simple implementation of a key-value store using DynamoDB (more in future?).
Overcomes the need for creating complicated models and schemas.

Inspired by @vercel/kv

## Usage

### Standalone

```ts
import kvClient from "@sladg/serverless-kv"

const userKv = kvClient({
  model: "user",
  tableName: process.env.KV_TABLE_NAME!,
})

userKv.insert({ id: "user-id", other: "values", and: "fields" })
userKv.get("user-id")
userKv.delete("user-id")
```

And you can also use standalone commands:

```ts
import { kvCmd } from "@sladg/serverless-kv"

kvCmd.get("table-name", "user-id", "user-model")
```

### SST

This is primarily targeted to be used with SST, in order to do so, we recommend following:

`sst.config.ts`

```ts
import { SSTConfig } from "sst"
import { NextjsSite, Table } from "sst/constructs"

import { sst } from "@sladg/serverless-kv"

const config: SSTConfig = {
  config(_input) {
    return {
      name: "flamingo-dashboard",
      region: "eu-central-1",
    }
  },
  stacks(app) {
    app.stack(function Site({ stack }) {
      const table = new Table(stack, "table01", {
        ...sst.tableConfig,
      })

      const site = new NextjsSite(stack, "site", {
        bind: [table],
        environment: {
          KV_TABLE_NAME: table.tableName,
        },
      })

      stack.addOutputs({
        SiteUrl: site.url,
      })
    })
  },
}

export default config
```

and then

`your-controller.ts`

```ts
const myKv = kvClient({ model: "user", tableName: process.env.KV_TABLE_NAME })

myKv.get("my-id")
```

This way, you can use kv outside of pages (aka. in utils folder, or in controllers, etc.)