open-index/open-npm huggingface dataset:
npm package: @netlify/cache
Description: TypeScript utilities for interacting with the Netlify cache
Author: Netlify Inc.
Latest version: 3.4.4

[![Build](https://github.com/netlify/cache/workflows/Build/badge.svg)](https://github.com/netlify/cache/actions)
[![Node](https://img.shields.io/node/v/@netlify/cache.svg?logo=node.js)](https://www.npmjs.com/package/@netlify/cache)

# @netlify/cache

TypeScript utilities for interacting with the Netlify cache.

## Installation

You can install `@netlify/cache` via npm:

```shell
npm install @netlify/cache
```
npm package: @netlify/classnames-template-literals
Description: Small utility to format long classnames with template literals
Author: Netlify
Latest version: 1.0.3

# classnames-template-literals

Utility originally created to deal with long Tailwind classnames.

To make our code more readable, we extract our Tailwind classes into variables, for example:

```javascript
const twClasses = `
  tw-sr-only 
  focus:tw-not-sr-only 
  tw-bg-teal-darker 
  tw-text-white 
  tw-block
  tw-text-sm
  tw-l-0
`;
```

The issue with writing classes this way is that they are rendered as-is in the DOM.

Example:

```javascript
<p
  class="
  tw-sr-only
  focus:tw-not-sr-only
  tw-bg-teal-darker
  tw-text-white
  tw-block
  tw-text-sm
  tw-l-0"
>
  Hello world
</p>
```

Using the `ctl` util formats classnames so they are rendered in a more standard way in the DOM.

Example:

```javascript
<p class="tw-sr-only focus:tw-not-sr-only tw-bg-teal-darker tw-text-white tw-block tw-text-sm tw-l-0">
  Hello world
</p>
```

## Installation

```javascript
npm install @netlify/classnames-template-literals
```

## Usage

Wrap your classnames inside `ctl`.

```javascript
import ctl from "@netlify/classnames-template-literals";

const buttonClasses = ctl(`
    bg-black
    text-white
    p-1
    rounded-sm
`);
```

You can also use conditional classes:

```javascript
import ctl from "@netlify/classnames-template-literals";

const buttonClasses = ctl(`
    bg-black
    text-white
    p-1
    rounded-sm
    ${someState && "bg-pink"}
`);
```
npm package: @netlify/cli-utils
Description: Netlify CLI utilities for configuration and API access
Author: Netlify Inc.
Latest version: 1.1.0

# @netlify/cli-utils

[netlify-cli](https://github.com/netlify/cli)'s [@oclif/command](@oclif/command) baseclass.

Provides a unified way to load and persist global and site level cli config and authenticated api.
Also allows commands to program against a consistent base-class api to enable changes down the road.

## Usage

```js
const Command = require('@netlify/cli-utils')

class OpenCommand extends Command {
  async run() {
    await this.authenticate()

    const api = this.netlify.api

    // authenticated api
  }
}

OpenCommand.description = `A description`

OpenCommand.examples = [
  'netlify open:admin',
  'netlify open:site'
]

OpenCommand.hidden = true

module.exports = OpenCommand

```

## API

Import the the base class and extend it, the same way you do with `@oclif/command`.

Commands that extend this base class get access to the [same api](https://oclif.io/docs/commands.html) as `@oclif/command` plus a few extra properties:


### `this.netlify.globalConfig`

Provides access to configuration stored in the users home folder under `~/.netlify`.
See [global-config](src/global-config/README.md).

### `this.netlify.state`

Provides access to site-level state relative to the `process.cwd`. (e.g. `project/.netlify/config.json`)
See [site-config](src/state/README.md)

### `this.netlify.api`

An instance of the [`netlify`](https://github.com/netlify/js-client) api client.  If access tokens are found in global config, then this client will automatically be authenticated.

### `this.netlify.site`

get current site context including root, configPath, and id (with getter and setter).

#### `this.netlify.config`

Get the configuration from `netlify.[toml/yml]`.

#### `this.authenticate()`

A method that will log the user in if they are not already logged in.  If the user is already logged in, this is a noop.


## Dependancy graph

<img src='./dependency-graph.svg' />
npm package: @netlify/dev
Description: Emulation of the Netlify environment for local development
Author: Netlify Inc.
Latest version: 4.16.5

# @netlify/dev

`@netlify/dev` is a local emulator for the Netlify production environment. While it can be used directly by advanced
users, it is primarily designed as a foundational library for higher-level tools like the
[Netlify CLI](https://docs.netlify.com/cli/get-started/) and the
[Netlify Vite Plugin](https://docs.netlify.com/integrations/vite/overview/).

It provides a local request pipeline that mimics the Netlify platform’s request handling, including support for
Functions, Blobs, Static files, Redirects, and Image CDN.

## 📦 Installation

```bash
npm install @netlify/dev
```

or

```bash
yarn add @netlify/dev
```

## 🚀 Usage

You can use `@netlify/dev` to emulate the Netlify runtime in your own development tooling or custom integrations:

```ts
import { NetlifyDev } from '@netlify/dev'

const devServer = new NetlifyDev({
  blobs: { enabled: true },
  edgeFunctions: { enabled: true },
  environmentVariables: { enabled: true },
  functions: { enabled: true },
  redirects: { enabled: true },
  staticFiles: {
    enabled: true,
    // OPTIONAL: additional directories containing static files to serve
    // Your `projectRoot` (see below) and your site's `publish` dir are served by default
    directories: ['public'],
  },

  // OPTIONAL: base dir (https://docs.netlify.com/configure-builds/overview/#definitions)
  // Defaults to current working directory
  projectRoot: 'site',
  // OPTIONAL: if your local dev setup has its own HTTP server (e.g. Vite), set its address here
  serverAddress: 'http://localhost:1234',
})

await devServer.start()

const response = await devServer.handle(new Request('http://localhost:8888/path'), {
  // An optional callback that will be called with every header (key and value) coming from header rules.
  // See https://docs.netlify.com/routing/headers/
  headersCollector: (key: string, value: string) => console.log(key, value),
})

console.log(await response.text())

await devServer.stop()
```

## 🧪 Contributing and feedback

This module is **experimental**, and we welcome feedback and contributions. Feel free to open issues or pull requests if
you encounter bugs or have suggestions.
npm package: @netlify/edge-handler-types
Description: TypeScript typings for writing Netlify Edge Handlers
Author: Netlify
Latest version: 0.34.1

# @netlify/edge-handler-types`

This package contains TypeScript typings for writing Netlify Edge Handlers.

## Installation

```sh
npm install --save-dev @netlify/edge-handler-types
```

or if you prefer yarn

```sh
yarn add -D @netlify/edge-handler-types
```

### Configuring tsconfig.json

For the typings to work it is vitally important TypeScript does not try to include its own definitions of global types (e. g. those found normally in a Browser environment).

Thus, it's important you configure the `lib` and `typeRoots` properties in your `tsconfig.json`:

```json
{
  "compilerOptions": {
    "lib": ["ES2020"],
    "typeRoots": [
      "node_modules/@types", // If you use type definitions of other packages
      "node_modules/@netlify" // Include this line for Edge Handler types
    ]
  }
}
```

## Writing Edge Handlers with this package

The types are injected into the global scope. No additional imports are necessary.

```ts
export const onRequest: EdgeHandler = (ev: RequestEvent) => {
  const headers = {
    "content-type": "text/plain",
    "x-cool": "yes",
  };

  ev.replaceResponse(
    new Response("Sent from an Edge Handler written in TypeScript!", { headers }),
  );
};
```
npm package: @netlify/esbuild-linux-mips64le
Description: The Linux MIPS 64-bit Little Endian binary for esbuild, a JavaScript bundler.
Latest version: 0.14.39-1

# esbuild

This is the Linux MIPS 64-bit Little Endian binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.
npm package: @netlify/esbuild-linux-ppc64le
Description: The Linux PowerPC 64-bit Little Endian binary for esbuild, a JavaScript bundler.
Latest version: 0.14.39-1

# esbuild

This is the Linux PowerPC 64-bit Little Endian binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.
npm package: @netlify/esbuild-linux-riscv64
Description: The Linux RISC-V 64-bit binary for esbuild, a JavaScript bundler.
Latest version: 0.14.39-1

# esbuild

This is the Linux RISC-V 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.
npm package: @netlify/esbuild-linux-s390x
Description: The Linux IBM Z 64-bit Big Endian binary for esbuild, a JavaScript bundler.
Latest version: 0.14.39-1

# esbuild

This is the Linux IBM Z 64-bit Big Endian binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.
npm package: @netlify/esbuild-netbsd-64
Description: The NetBSD AMD64 binary for esbuild, a JavaScript bundler.
Latest version: 0.14.39-1

# esbuild

This is the NetBSD AMD64 binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.

⚠️ Note: NetBSD is not one of [Node's supported platforms](https://nodejs.org/api/process.html#process_process_platform), so installing esbuild may or may not work on NetBSD depending on how Node has been patched. This is not a problem with esbuild. ⚠️
npm package: @netlify/esbuild-wasm
Description: The cross-platform WebAssembly binary for esbuild, a JavaScript bundler.
Latest version: 0.14.39-1

# esbuild

This is the cross-platform WebAssembly binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild and the [JavaScript API documentation](https://esbuild.github.io/api/) for details.