open-index/open-npm huggingface dataset:
npm package: @netlify/functions
Description: TypeScript utilities for interacting with Netlify Functions
Author: Netlify Inc.
Latest version: 5.2.0

# ![functions](functions.png)

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

JavaScript and TypeScript utilities for [Netlify Functions](https://docs.netlify.com/functions/overview/).

## Installation

```
npm install @netlify/functions
```

## Usage

### On-demand Builders

To use On-demand Builders, wrap your function handler with the `builder` function.

- With JavaScript:

  ```js
  const { builder } = require('@netlify/functions')

  const handler = async (event, context) => {
    return {
      statusCode: 200,
      body: JSON.stringify({ message: 'Hello World' }),
    }
  }

  exports.handler = builder(handler)
  ```

- With TypeScript:

  ```ts
  import { builder, Handler } from '@netlify/functions'

  const myHandler: Handler = async (event, context) => {
    return {
      statusCode: 200,
      body: JSON.stringify({ message: 'Hello World' }),
    }
  }

  const handler = builder(myHandler)

  export { handler }
  ```

### Scheduled Functions (currently in beta)

To use Scheduled Functions, wrap your function handler with the `schedule` function.

- With JavaScript:

  ```js
  const { schedule } = require('@netlify/functions')

  exports.handler = schedule('5 4 * * *', async () => {
    console.log("It's 04:05 AM!")
  })
  ```

- With TypeScript:

  ```ts
  import { schedule } from '@netlify/functions'

  export const handler = schedule('5 4 * * *', async () => {
    console.log("It's 04:05 AM!")
  })
  ```

### TypeScript typings

This module exports typings for authoring Netlify Functions in TypeScript.

```ts
import { Handler } from '@netlify/functions'

const handler: Handler = async (event, context) => {
  return {
    statusCode: 200,
    body: JSON.stringify({ message: 'Hello World' }),
  }
}

export { handler }
```

The following types are exported:

- `Handler`
- `HandlerCallback`
- `HandlerContext`
- `HandlerEvent`
- `HandlerResponse`

## Contributors

Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for instructions on how to set up and work on this repository. Thanks
for contributing!
npm package: @netlify/functions-runtime-api
Description: The runtime API for Netlify Functions
Author: Netlify Inc.
Latest version: 1.1.1

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

# Netlify Functions runtime API

The runtime API for Netlify Functions, compatible with the AWS Lambda runtime API.

## The API

The API surface is quite minimal: functions are comprised of handlers that receive a [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) and return a [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response), using the default export.

```js
export default async (req) => new Response(`Responding to ${req.url}`)
```

Functions also receive a context object with a series of convenience properties and methods for easy access to common operations and Netlify features.

```js
export default async (req, context) => {
  if (req.url === '/move-me') {
    return context.redirect('/other-page')
  }

  return context.json({ hello: 'world' })
}
```

## Development

These are two main artifacts produced by this project:

1. **npm module**: The API and the Lambda interoperability layer are published as an npm module. To generate the module, run `npm run compile`.
2. **Lambda Layer**: The runtime API is injected into user code using Lambda Layers. To generate the layer ZIP archive, run `npm run build`.
npm package: @netlify/integrations
Description: [![Build](https://github.com/netlify/integrations/workflows/Build/badge.svg)](https://github.com/netlify/integrations/actions) [![Node](https://img.shields.io/node/v/@netlify/integrations.svg?logo=node.js)](https://www.npmjs.com/package/@netlify/integrati
Author: Netlify Inc.
Latest version: 0.5.4

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

# integrations

Update me!

## Contributors

Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for instructions on how to set up and work on this repository. Thanks
for contributing!
npm package: @netlify/ipx
Description: on-demand image optimization for Netlify
Latest version: 1.4.6

# Netlify Optimized Images

> On Demand image optimization for Netlify using [ipx](https://github.com/unjs/ipx).

😺 Online demo: https://netlify-ipx.netlify.app

## Usage

Add `@netlify/ipx` as `devDependency`:

```sh
# npm
npm i -D @netlify/ipx

# yarn
yarn add --dev @netlify/ipx
```

Create `netlify/functions/ipx.ts`:

```ts
import { createIPXHandler } from "@netlify/ipx";

export const handler = createIPXHandler({
  domains: ["images.unsplash.com"],
});
```

Now you can use IPX to optimize both local and remote assets ✨

Resize `/test.jpg` (in `dist`):

```html
<img src="/.netlify/functions/ipx/w_200/static/test.jpg" />
```

Resize and change format for a remote url:

```html
<img
  src="/.netlify/functions/ipx/f_webp,w_450/https://images.unsplash.com/photo-1514888286974-6c03e2ca1dba"
/>
```

## Remote Patterns

Instead of setting an allowlist on `domains`, you may wish to use the option `remotePatterns`. This method allows wildcards in `hostname` and `pathname` segments.

`remotePatterns` is an array that contains RemotePattern objects:

```ts
remotePatterns: [
  {
    protocol: 'https' // or 'http' - not required
    hostname: 'example.com' // required
    port: '3000' // not required
    pathname: '/blog/**' // not required
  }
]
```

To use remote patterns, create `netlify/functions/ipx.ts`:

```ts
import { createIPXHandler } from "@netlify/ipx";

export const handler = createIPXHandler({
  remotePatterns: [
    {
      protocol: "https",
      hostname: "images.unsplash.com",
    },
  ],
});
```

`hostname` and `pathname` may contain wildcards:

```ts
remotePatterns: [
  {
    hostname: '*.example.com' // * = match a single path segment or subdomain
    pathname: '/blog/**' // ** = match any number of path segments or subdomains
  }
]
```

## Local development

- Clone repository
- Install dependencies with `yarn install`
- Build the project with `yarn build`
- Run netlify development server with `yarn dev`. 
- Open http://localhost:8888

## License

MIT
npm package: @netlify/local-functions-proxy-freebsd-arm64
Description: The FreeBSD ARM 64-bit binary for the Netlify Functions local proxy server
Latest version: 1.1.1

# Netlify Functions local proxy server

This is the FreeBSD ARM 64-bit binary for the Netlify Functions local proxy server. You shouldn't use this package
directly — use `@netlify/local-functions-proxy`.
npm package: @netlify/local-functions-proxy-freebsd-x64
Description: The FreeBSD 64-bit binary for the Netlify Functions local proxy server
Latest version: 1.1.1

# Netlify Functions local proxy server

This is the FreeBSD 64-bit binary for the Netlify Functions local proxy server. You shouldn't use this package directly
— use `@netlify/local-functions-proxy`.
npm package: @netlify/local-functions-proxy-linux-ppc64
Description: The Linux PowerPC 64-bit Little Endian binary for the Netlify Functions local proxy server
Latest version: 1.1.1

# Netlify Functions local proxy server

This is the Linux PowerPC 64-bit Little Endian binary for the Netlify Functions local proxy server. You shouldn't use
this package directly — use `@netlify/local-functions-proxy`.
npm package: @netlify/local-functions-proxy-linux-ppc64le
Description: The Linux PowerPC 64-bit Little Endian binary for the Netlify Functions local proxy server
Latest version: 0.1.0

# Netlify Functions local proxy server

This is the Linux PowerPC 64-bit Little Endian binary for the Netlify Functions local proxy server. You shouldn't use this package directly — use `@netlify/local-functions-proxy`.
npm package: @netlify/local-functions-proxy-openbsd-x64
Description: The OpenBSD 64-bit binary for the Netlify Functions local proxy server
Latest version: 1.1.1

# Netlify Functions local proxy server

This is the OpenBSD 64-bit binary for the Netlify Functions local proxy server. You shouldn't use this package directly
— use `@netlify/local-functions-proxy`.
npm package: @netlify/netlify-cms-widget-parent
Description: A Netlify CMS widget to select directory parent for an entry
Author: netlify-labs
Latest version: 1.0.12

# Netlify CMS Widget Parent

A Netlify CMS widget to select directory parent for an entry

## Usage

Example for using in an HTML file

```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Content Manager</title>
  </head>
  <body>
    <script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
    <script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
    <script src="https://unpkg.com/@netlify/netlify-cms-widget-parent@^1.0.0/dist/netlify-cms-widget-parent.js"></script>
    <script>
      const parentWidget = window.NetlifyCmsWidgetParent;
      CMS.registerWidget('parent', parentWidget.control, parentWidget.preview);
    </script>
  </body>
</html>
```
npm package: @netlify/netlitest-helper
Description: This is a test helper library built around the jest test runner and written in Typescript. The library provides helper methods to make writing tests as simple as possible, and to automatically inject variables for the various components necessary to make 
Author: Netlify
Latest version: 0.2.5

# Netlitest-Helper

This is a test helper library built around the jest test runner and written in Typescript. The library provides helper methods to make writing tests as simple as possible, and to automatically inject variables for the various components necessary to make requests.

## Available Methods

### testBuilder

This is a generic method that accepts a javascript object with the following shape:

```
interface testOptions {
  component: string;
  method?: string;
  path: string;
  payload?: object;
  status?: number;
  snapshotResponsePayload?: boolean;
  snapshotResponseHeaders?: boolean;
  maxResponseTimeMS?: number;
  expectedHeadersValues?: object;
  name?: string;
}
```

## Local Development

Below is a list of commands you will probably find useful.

### `npm start` or `yarn start`

Runs the project in development/watch mode. netlitest-helper will be rebuilt upon changes. TSDX has a special logger for you convenience. Error messages are pretty printed and formatted for compatibility VS Code's Problems tab.

### `npm run build` or `yarn build`

Bundles the package to the `dist` folder.
The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).

### `npm test` or `yarn test`

Runs the test watcher (Jest) in an interactive mode.
By default, runs tests related to files changed since the last commit.
npm package: @netlify/next
Description: Enhanced Next.js features on Netlify
Latest version: 1.4.9

![Next.js Runtime](https://github.com/netlify/next-runtime/raw/main/next-on-netlify.png)

<p align="center">
  <a aria-label="npm version" href="https://www.npmjs.com/package/@netlify/next">
    <img alt="" src="https://img.shields.io/npm/v/@netlify/next">
  </a>
  <a aria-label="MIT License" href="https://img.shields.io/npm/l/@netlify/next">
    <img alt="" src="https://img.shields.io/npm/l/@netlify/next">
  </a>
</p>

# `@netlify/next`

The `@netlify/next` package makes Next.js even better.

## Next.js Advanced Middleware

Regular Next.js Middleware doesn’t provide access to the actual response, or allow you to modify the request. The
`@netlify/next` library brings the power of Netlify Edge Functions to Next.js Middleware. It gives full access to the
request and response objects, allowing you to modify requests before they are sent to your Next.js app, and modify
responses before they are sent to the browser. This allows you to personalize pages on the fly, even if they are
statically-generated. It includes baked-in support for:

- HTML rewrites
- Page data transforms
- Modifying request headers
- Access to response body

For full details,
[see the docs](https://docs.netlify.com/integrations/frameworks/next-js/middleware/#next-js-advanced-middleware-with-the-netlify-next-library).
npm package: @netlify/node-cookies
Description: A Node.js implementation of Deno's cookies interface
Author: Netlify Inc.
Latest version: 0.1.0

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

# Cookies 🍪

A Node.js port of https://deno.land/std@0.184.0/http/cookie.ts.

## Contributors

Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for instructions on how to set up and work on this repository. Thanks
for contributing!
npm package: @netlify/nuxt
Description: Nuxt module providing local emulation of the Netlify environment
Author: Netlify Inc.
Latest version: 0.2.37

# Netlify 🤝 Nuxt

[![npm version][npm-version-src]][npm-version-href] [![License][license-src]][license-href]
[![Nuxt][nuxt-src]][nuxt-href]

`@netlify/nuxt` provides local emulation of the Netlify platform directly in `nuxt dev`

## Features

This repackages all the same features as `@netlify/vite-plugin`.
[Check out its docs for details](/packages/vite-plugin/README.md).

## Quick Setup

Install the module to your Nuxt application with one command:

```bash
npx nuxi module add @netlify/nuxt
```

That's it! You now have local emulation of the full Netlify platform automatically in your nuxt dev server:

```bash
npx nuxt dev
```

## Contribution

<details>
  <summary>Local development</summary>

```bash
# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Develop with the playground
npm run dev

# Build the playground
npm run dev:build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch
```

</details>

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/@netlify/nuxt/latest.svg?style=flat&colorA=020420&colorB=00DC82
[npm-version-href]: https://npmjs.com/package/@netlify/nuxt
[npm-downloads-src]: https://img.shields.io/npm/dm/@netlify/nuxt.svg?style=flat&colorA=020420&colorB=00DC82
[npm-downloads-href]: https://npm.chart.dev/@netlify/nuxt
[license-src]: https://img.shields.io/npm/l/@netlify/nuxt.svg?style=flat&colorA=020420&colorB=00DC82
[license-href]: https://npmjs.com/package/@netlify/nuxt
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
[nuxt-href]: https://nuxt.com
npm package: @netlify/otel
Description: [![Build](https://github.com/netlify/primitives/workflows/Build/badge.svg)](https://github.com/netlify/primitives/actions) [![Node](https://img.shields.io/node/v/@netlify/otel.svg?logo=node.js)](https://www.npmjs.com/package/@netlify/otel)
Author: Netlify Inc.
Latest version: 5.1.5

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

# @netlify/otel

TypeScript utilities to interact with Netlify's OpenTelemetry

## Installation

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

```shell
npm install @netlify/otel
```
npm package: @netlify/parse-npm-script
Description: Parse npm package script to see how they resolve
Author: David Wells
Latest version: 0.1.2

# Parse NPM Script

Parse a given `npm` script command from `package.json` & return information.

- What the `script` lifecycle looks like
- How the command **really** resolves
- & What the final command run is

Useful for parsing dependencies actually used and figuring out wtf is happening in a complex `package.json`.
It supports extracting values from npm-run-all.

## Usage

```js
const path = require("path");
const util = require("util");
const parse = require("@netlify/parse-npm-script");
const { readFileSync } = require("fs-extra");

/* your package.json file */
const packageJSON = readFileSync(
  path.join(__dirname, "tests/fixtures/one.json")
);

async function runParser() {
  const parsed = await parse(packageJSON, "npm run build");
  console.log(
    util.inspect(parsed, {
      showHidden: false,
      depth: null,
    })
  );
}

runParser();

/* Parsed contents
{
  command: 'npm run build',
  steps: [{
      name: 'prebuild',
      raw: 'echo a && npm run foo',
      parsed: ['echo a', 'echo foo']
    },
    {
      name: 'build',
      raw: 'echo b && npm run cleanup',
      parsed: ['echo b', 'echo cleanup']
    },
    {
      name: 'postbuild',
      raw: 'echo c',
      parsed: 'echo c'
    }
  ],
  raw: ['echo a', 'echo foo', 'echo b', 'echo cleanup', 'echo c'],
  combined: 'echo a && echo foo && echo b && echo cleanup && echo c'
}
*/
```

## Example:

Parsing a `package.json`

```json
{
  "name": "parse-npm-script",
  "scripts": {
    "foo": "echo foo",
    "cleanup": "echo cleanup",
    "prebuild": "echo a && npm run foo",
    "build": "echo b && npm run cleanup",
    "postbuild": "echo c"
  },
  "author": "David Wells",
  "license": "MIT"
}
```

Will result in this output:

```js
{
  command: 'npm run build',
  steps: [{
      name: 'prebuild',
      raw: 'echo a && npm run foo',
      parsed: ['echo a', 'echo foo']
    },
    {
      name: 'build',
      raw: 'echo b && npm run cleanup',
      parsed: ['echo b', 'echo cleanup']
    },
    {
      name: 'postbuild',
      raw: 'echo c',
      parsed: 'echo c'
    }
  ],
  raw: ['echo a', 'echo foo', 'echo b', 'echo cleanup', 'echo c'],
  combined: 'echo a && echo foo && echo b && echo cleanup && echo c'
}
```
npm package: @netlify/plugin-changelog-redirects
Description: Generate Netlify redirects from a changelog file
Author: Netlify Inc.
Latest version: 1.0.1

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

# netlify-changelog-redirects

Generate Netlify redirects from a Release Please changelog file.

## Contributors

Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for instructions on how to set up and work on this repository. Thanks
for contributing!
npm package: @netlify/plugin-edge-handlers
Description: Netlify Build plugin to bundle Edge functions
Author: Netlify Inc.
Latest version: 3.0.8

# DEPRECATION NOTICE

This code is no longer in use since it has been factored out of all Netlify workflows. Please refer to [the docs](https://docs.netlify.com/netlify-labs/experimental-features/edge-functions/) for information about the ongoing Edge Functions public beta.

---

# Netlify Plugin Edge Handlers

This plugin is used to bundle Edge Handlers for deployment. It is included in the list of core plugins in Netlify's
build, meaning that any handler under the `netlify/edge-handlers` directory will be bundled by Netlify's buildbot.

## Usage

This plugin is already integrated into Netlify's build process and will not need to be included in your project for Edge
Handlers to work.

To run this plugin locally in an existing project that has Edge Handlers, you'll need to install the netlify build
codebase locally and symlink this plugin to that repo. To do so:

1. Clone the build repo and install dependencies:

    ```sh
    git clone git@github.com:netlify/build.git
    npm i
    ```

2. Create a symlink from `netlify-build/packages/build/node_modules/@netlify/plugin-edge-handlers` towards the Edge
   handlers plugin's root directory:

   ```sh
   # manual way
   ln -s
   # or
   npm link
   ```

3. Verify that the previous step worked:

    ```sh
    cd /path/to/netlify-build/packages/build
    node -p 'require("@netlify/plugin-edge-handlers")' # prints the `onPostBuild` exported function
    ```

4. Run the plugin locally in your project by typing in your project directory:

    ```sh
    node /path/to/netlify-build/packages/build/src/core/bin.js
    ```
npm package: @netlify/plugin-next
Description: Next.js plugin for Netlify builds
Author: David Wells
Latest version: 0.0.4
Deprecated: This package has been deprecated in favor of @netlify/plugin-nextjs

# Netlify Next.js Build Plugin

Enable Next.js dynamic routes on Netlify.

## Installation and Usage

1. Install the dependency from `npm`

    ```bash
    npm install @netlify/plugin-next
    ```

2. Then add the following lines to your `netlify.toml` file:

    ```toml
    [[plugins]]
      package = "@netlify/plugin-next"
    ```

3. Ensure that your `next.config.js` has the `target` set to `serverless`

    ```js
    // next.config.js
    module.exports = {
      // Target must be serverless
      target: 'serverless'
    };
    ```

4. Ensure the following values in `netlify.toml`.

    build `command` is `next build`, or running it under the hood.

    `function` dir is set to `out_functions`

    `publish` dir is set to `out_publish`

    ```toml
    [build]
      command = "next build"
      functions = "out_functions"
      publish   = "out_publish"
    ```

---

Config should ultimately look something like:

```toml
[build]
  command = "npm run build"
  functions = "out_functions"
  publish   = "out_publish"

[[plugins]]
  package = "@netlify/plugin-next"
```
npm package: @netlify/plugin-nextjs
Description: Run Next.js seamlessly on Netlify
Latest version: 5.15.9

![Next.js Runtime](next-js-runtime.png)

# Next.js Runtime

<p align="center">
  <a aria-label="npm version" href="https://www.npmjs.com/package/@netlify/plugin-nextjs">
    <img alt="" src="https://img.shields.io/npm/v/@netlify/plugin-nextjs">
  </a>
  <a aria-label="MIT License" href="https://img.shields.io/npm/l/@netlify/plugin-nextjs">
    <img alt="" src="https://img.shields.io/npm/l/@netlify/plugin-nextjs">
  </a>
</p>

This package handles the build process and creates the runtime environment for Next.js sites on
Netlify. You should not normally need to install it yourself, as it is used automatically during
builds of Next.js sites. See
[the docs for using Next.js on Netlify](https://docs.netlify.com/frameworks/next-js/overview/) for
more details.

Next.js is supported natively on Netlify, and in most cases you will not need to install or
configure anything. This repo includes the packages used to support Next.js on Netlify.

## Prerequisites

- Next.js 13.5 or later
- Node.js 18 or later
- The latest version of the [Netlify CLI](https://docs.netlify.com/cli/get-started/)

## Deploying

If you build on Netlify, the Next.js Runtime will work with no additional configuration.

## Manually installing the Next.js Runtime

The Next.js Runtime installs automatically for new Next.js sites on Netlify. You can also install it
manually in the following ways:

### From the UI (Recommended)

You can go to the [UI](https://app.netlify.com/plugins/@netlify/plugin-nextjs/install) and choose
the site to install the Next.js Runtime on. This method is recommended because you will benefit from
auto-upgrades to important fixes and feature updates.

### From `npm`

```shell
npm install -D @netlify/plugin-nextjs
```

...then add the following to your `netlify.toml` file:

```toml
[[plugins]]
  package = "@netlify/plugin-nextjs"
```

This method is recommended if you wish to pin the Next.js Runtime to a specific version.

## v4

If you are using Next.js 10-13.4 or Node.js < 18, you must use v4 of the Next.js Runtime.

If you are still using v4, you can find
[its README here](https://github.com/netlify/next-runtime/blob/v4/README.md) and the
[v4 Runtime docs here](https://docs.netlify.com/frameworks/next-js/runtime-v4/overview/).

### Upgrading from v4 to v5

To upgrade from v4 to v5, please visit
[the v5 documentation](https://docs.netlify.com/frameworks/next-js/overview/).

## Feedback

If you think you have found a bug in Next.js on Netlify,
[please open an issue](https://github.com/opennextjs/opennextjs-netlify/issues). If you have
comments or feature requests,
[see the discussion board](https://github.com/opennextjs/opennextjs-netlify/discussions)

Please note that v4 will only receive security fixes and critical bug fixes.
npm package: @netlify/plugin-nextjs-experimental
Description: Run Next.js seamlessly on Netlify
Author: lindsaylevine
Latest version: 0.0.6
Deprecated: Please install @netlify/plugin-nextjs@beta instead

# Essential Next.js (Experimental)

_Experimental plugin for Next.js applications on Netlify_

:warning: This plugin is an alpha for testing purposes only. It is not yet stable and should not be used for production sites.

## Installing the alpha

- Remove the existing Essential Next.js plugin (`@netlify/plugin-nextjs`). See the instructions to [uninstall the plugin](https://ntl.fyi/remove-plugin)
- Install the module:
```shell
npm install -D @netlify/plugin-nextjs-experimental
```
- Change the `publish` directory to `.next`  and add the plugin to `netlify.toml`:
```toml
[build]
publish = ".next"

[[plugins]]
package = "@netlify/plugin-nextjs-experimental"
```
npm package: @netlify/plugin-storybook
Description: Plugin to provide better Component Publishing Protocol (CPP) support for Storybooks deployed to Netlify
Author: Netlify
Latest version: 1.4.3

# Netlify Storybook Plugin [![NPM version](https://img.shields.io/npm/v/@netlify/plugin-storybook.svg)](https://npmjs.com/@netlify/plugin-storybook)

Plugin to provide better [Component Publishing Protocol (CPP)](https://storybook.js.org/docs/react/sharing/publish-storybook#cpp-level-1) support for Storybooks deployed to Netlify

## Installation options

You can install the plugin for your site using your `netlify.toml` file or the Netlify UI.

### Install plugin through the Netlify UI

For UI-based installation, you can install this plugin from the [Plugins directory](https://app.netlify.com/plugins), or through this [direct installation link](https://app.netlify.com/plugins/@netlify/plugin-storybook/install).

### Install plugin with a `netlify.toml` file

To install the plugin manually:

From your project's base directory, use npm, yarn, or any other Node.js package manager to add the plugin to `devDependencies` in `package.json`.

```bash
npm install -D @netlify/plugin-storybook
```

Then add the plugin to your `netlify.toml` configuration file:

```toml
[[plugins]]
  package = "@netlify/plugin-storybook"
```
npm package: @netlify/plugin-visual-editor
Description: Netlify build plugin for visual editor
Author: Netlify Inc.
Latest version: 1.4.3

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

# Netlify Visual Editor Plugin

The visual editor plugin allows running Netlify Create locally via `netlify dev` and inside the dev server.

## Contributors

Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for instructions on how to set up and work on this repository. Thanks for contributing!

### Creating a prerelease

1. Create a branch named `releases/<tag>/<version>` with the version you'd like to release.
2. Push the branch to the repo.

For example, a branch named `releases/rc/4.0.0` will create the version `v4.0.0-rc` and publish it under the `rc` tag.
npm package: @netlify/plugins-list
Description: List of Netlify plugins
Latest version: 6.81.3

# Netlify Build Plugins

[Build Plugins](https://docs.netlify.com/configure-builds/build-plugins) are a new way to extend the functionality of your build on Netlify. The [`plugins.json` file](./site/plugins.json) in this repository is used to generate the [Netlify plugins directory](https://app.netlify.com/plugins). Plugins in this directory can be installed directly through the Netlify UI.

## Code of Conduct

This project and everyone participating in it is governed by a [code of conduct](./docs/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to conduct@netlify.com.
npm package: @netlify/remix-adapter
Description: Remix Adapter for Netlify Functions
Latest version: 3.0.0

# Remix Adapter for Netlify

The Remix Adapter for Netlify allows you to deploy your [Remix](https://remix.run) app to
[Netlify Functions](https://docs.netlify.com/functions/overview/).

It is strongly advised to use [the Netlify Remix template](https://github.com/netlify/remix-template) to create a Remix
site for deployment to Netlify. See [Remix on Netlify](https://docs.netlify.com/frameworks/remix/) for more details and
other options.

Please note that this adapter **does not support Hydrogen**. Hydrogen is only supported via Edge Functions. See
<https://github.com/netlify/hydrogen-template>.
npm package: @netlify/remix-edge-adapter
Description: Remix Adapter for Netlify Edge Functions
Latest version: 4.0.0

# Remix Edge Adapter for Netlify

The Remix Edge Adapter for Netlify allows you to deploy your [Remix](https://remix.run) app to
[Netlify Edge Functions](https://docs.netlify.com/edge-functions/overview/).

## Usage

It is strongly advised to use [the Netlify Remix template](https://github.com/netlify/remix-template) to create a Remix
site for deployment to Netlify. See [Remix on Netlify](https://docs.netlify.com/frameworks/remix/) for more details and
other options.

However, if you are using **Remix Vite**, you can instead deploy your existing site to Netlify by following these steps:

1. Add dependencies on `@netlify/remix-edge-adapter` and `@netlify/remix-runtime`
2. Use the Netlify Remix edge Vite plugin in your Vite config:

```js
// vite.config.js
import { vitePlugin as remix } from '@remix-run/dev'
import { netlifyPlugin } from '@netlify/remix-edge-adapter/plugin'

export default defineConfig({
  plugins: [remix(), netlifyPlugin()],
})
```

If you have your own Netlify Functions (typically in `netlify/functions`) for which you've configured a `path`, you must
exclude those paths to avoid conflicts with the generated Remix SSR handler, which would otherwise run on all dynamic
paths:

```js
// vite.config.js
import { vitePlugin as remix } from '@remix-run/dev'
import { netlifyPlugin } from '@netlify/remix-edge-adapter/plugin'

export default defineConfig({
  plugins: [
    remix(),
    netlifyPlugin({
      excludedPaths: ['/ping', '/api/*', '/webhooks/*'],
    }),
  ],
})
```

3. Add an `app/entry.jsx` (.tsx if using TypeScript) with these contents:

```js
// app.entry.jsx or .tsx
export { default } from 'virtual:netlify-server-entry'
```

### Hydrogen

Hydrogen Vite sites are supported and automatically detected. However, additional setup is required. See
<https://github.com/netlify/hydrogen-template> for details.
npm package: @netlify/remix-runtime
Description: Remix Runtime for Netlify Edge Functions
Latest version: 3.0.0

# Remix Server Runtime for Netlify

The Remix Server Runtime for Netlify is a
[serverless edge runtime](https://github.com/remix-run/remix/tree/main/packages/remix-server-runtime#readme) for
[Remix](https://remix.run) apps. It's built on top of
[Netlify Edge Functions](https://docs.netlify.com/edge-functions/overview/).

You shouldn't generally need to import or depend on this package. It is an internal implementation detail of
[`@netlify/remix-edge-adapter`](https://github.com/netlify/remix-compute/tree/main/packages/remix-edge-adapter).
npm package: @netlify/serverless-functions-api
Description: The runtime API for Netlify Functions
Author: Netlify Inc.
Latest version: 2.14.0

[![npm version](https://img.shields.io/npm/v/@netlify/serverless-functions-api.svg)](https://npmjs.org/package/@netlify/serverless-functions-api)
[![Build](https://github.com/netlify/serverless-functions-api/workflows/Build/badge.svg)](https://github.com/netlify/serverless-functions-api/actions)
[![Node](https://img.shields.io/node/v/@netlify/serverless-functions-api.svg?logo=node.js)](https://www.npmjs.com/package/@netlify/serverless-functions-api)

# Serverless Functions API

A Node.js module that implements the runtime API for serverless functions. It translates between the API defined by Netlify and the API expected by the underlying provider, AWS Lambda.

## The API

The API surface is quite minimal: functions are comprised of handlers that receive a [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) and return a [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response), using the default export.

```js
export default async (req) => new Response(`Responding to ${req.url}`)
```

## The module

The module exports a `getLambdaHandler` function that returns a Lambda-compatible handler. This handler receives a Lambda event, converts it to a Netlify API input (i.e. an instance of the standard `Request` and a `context` object), executes the function, and converts the result back into a response compatible with the Lambda API.

The source is bundled into a single file, so that it can be injected into a Lambda without any additional imports or dependencies.

The `getPath` export returns the absolute path to the module. This lets consumers like `zip-it-and-ship-it` easily include the file in a ZIP.
npm package: @netlify/tailwind-config
Description: Netlify's Tailwind CSS configuration
Author: Netlify
Latest version: 2.1.0

# @netlify/tailwind-config

This package provides a shared Tailwind CSS configuration for Netlify products.

## Installation

To install the package, navigate to your project directory and run:

```sh
yarn add @netlify/tailwind-config
```

## Usage

In your `tailwind.config.cjs` file, import and use the configuration like this:

```js
// tailwind.config.cjs
module.exports = {
  presets: [require('@netlify/tailwind-config')],
  // ...
};
```

This will load the Netlify Tailwind configuration into your project's Tailwind configuration. You can then add your own custom configurations as needed.

## Referencing theme values in JavaScript

Generally, stick to styling elements using Tailwind CSS classes, `@apply`, or the `theme()` CSS helper.

That said, there are cases where you might need Tailwind theme values in your own client-side JavaScript — for example to pass tokens to theme a 3rd party library.

To make this easy, this package provides a `theme()` JavaScript helper you can use to access theme values with a similar syntax to Tailwind’s `theme()` CSS helper.

```js
import { theme } from '@netlify/tailwind-config/theme'
theme('spacing.4')
// => '1rem'

theme('borderWidth.DEFAULT')
// => '0.0625rem'

theme('screens.md')
// => '45.0625rem'
```

[List of all available tokens](https://unpkg.com/browse/@netlify/tailwind-config@0.0.1/theme.js)

**Note: to reference color tokens or box shadows in JavaScript, use the [`@netlify/netlify-design-tokens`](https://www.npmjs.com/package/@netlify/netlify-design-tokens) library:**

```js
import { colorFacetsTeal500 } from '@netlify/netlify-design-tokens';

const teal = colorFacetsTeal500;
```

### Updating the `theme()` JavaScript helper to the latest Tailwind config

Run this command to update `theme.ts`:

```sh
yarn nx run tailwind-config:buildTheme
```

Do not edit the theme file manually.

## Contributing

To contribute to this package, please follow the contribution guidelines provided in the main project's README.

## License

This package is licensed under the MIT license.
npm package: @netlify/tailwindcss-first-line
Description: Tailwind plugin for the :first-line CSS pseudo-element
Author: Netlify
Latest version: 1.0.1

# Tailwindcss plugin for :first-line

This Tailwind plugin implements the [CSS :first-line pseudo-element](https://developer.mozilla.org/en-US/docs/Web/CSS/::first-line)

## Installation

```bash
npm install --save-dev @netlify/tailwindcss-first-line
```

or

```bash
yarn add -D @netlify/tailwindcss-first-line
```

## Usage

```javascript
// tailwind.config.js

module.exports = {
    ...
    plugins: [
        require('@netlify/tailwindcss-first-line'),
        ...
    ]
}
```

Then, add the `first-line` variant to each property you'd like to use it with.

```javascript
    textColor: [
      'responsive',
      'hover',
      'focus',
      'first-line',
    ],
```

You can then use it by preprending `first-line:` to your classes, like `first-line:your-class`.

For example, to change the color of the first line of a paragraph to white, you would write `first-line:text-white`.

If you have a prefix set in your config (e.g. `tw`), you would use the following syntax: `first-line:tw-text-white`.

**`:first-line` only applies to [block-level elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements#elements).**
npm package: @netlify/ts-cli
Description: Create TanStack Start applications for Netlify
Author: Jack Herrington
Latest version: 1.0.4

# Netlify CTA

Create TanStack Start applications for Netlify.

## Installation

Install dependencies using pnpm:

```bash
pnpm install
```

## Build

Build the project by compiling TypeScript:

```bash
pnpm build
```

Or using npm:

```bash
npm run build
```

This will compile the TypeScript source files from `src/` to `dist/`.

## Running

After building, you can run the CLI tool using:

```bash
node dist/index.js
```

Or if running from a different directory context:

```bash
node ../netlify-cta/dist/index.js
```

If you need to specify the package manager user agent:

```bash
npm_config_user_agent=pnpm node ../netlify-cta/dist/index.js
```
npm package: @netlify/types
Description: TypeScript definitions for the Netlify platform
Author: Netlify Inc.
Latest version: 2.6.0

# @netlify/types

[![npm version](https://img.shields.io/npm/v/@netlify/types.svg)](https://www.npmjs.com/package/@netlify/types)

TypeScript types for Netlify platform primitives.

## Installation

```shell
npm install @netlify/types
```

### Requirements

- Node.js 16.0.0 and above

## Usage

This package provides TypeScript type definitions for various Netlify platform primitives. Import the types you need in
your TypeScript code:

```typescript
import type { Context } from '@netlify/types'
import type { NetlifyGlobal } from '@netlify/types'
```

## Types

The package includes TypeScript definitions for:

- `Context`: Type definitions for Netlify's context object
- `NetlifyGlobal`: Type definitions for Netlify's global variables

## Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or
submit a pull request.
npm package: @netlify/vite-plugin
Description: Vite plugin with a local emulation of the Netlify environment
Author: Netlify Inc.
Latest version: 2.11.3

# @netlify/vite-plugin

Vite plugin that emulates Netlify's platform features within your Vite dev server.

## Feature Support

| Feature                | Supported |
| ---------------------- | --------- |
| Functions              | ✅ Yes    |
| Edge Functions         | ✅ Yes    |
| Blobs                  | ✅ Yes    |
| Cache API              | ✅ Yes    |
| Redirects and Rewrites | ✅ Yes    |
| Headers                | ✅ Yes    |
| Environment Variables  | ✅ Yes    |
| Image CDN              | ✅ Yes    |

> This module is **not** intended to be a full replacement for the Netlify CLI.

## Installation

```bash
npm install @netlify/vite-plugin
```

## Configuration options

The plugin accepts the following options:

- `middleware` (boolean, default: `true`): Attach a Vite middleware that intercepts requests and handles them in the
  same way as the Netlify production environment
- `blobs`: Configure blob storage functionality
- `edgeFunctions`: Configure edge functions
- `functions`: Configure serverless functions
- `headers`: Configure response headers
- `images`: Configure Image CDN functionality
- `redirects`: Configure URL redirects
- `staticFiles`: Configure static file serving

## Usage

Add the plugin to your `vite.config.js` or `vite.config.ts`:

```js
import { defineConfig } from 'vite'
import netlify from '@netlify/vite-plugin'

export default defineConfig({
  plugins: [netlify()],
})
```
npm package: @netlify/vite-plugin-tanstack-start
Description: Vite plugin for TanStack Start on Netlify
Author: Netlify Inc.
Latest version: 1.3.3

# @netlify/vite-plugin-tanstack-start

This Vite plugin configures your TanStack Start app for **deployment** to Netlify and provides full local emulation of
the Netlify platform directly in `vite dev`.

## Features

- Configures `vite build` to prepare your app's production build for deployment to Netlify
  - See
    [full TanStack Start deployment docs for more](https://docs.netlify.com/build/frameworks/framework-setup-guides/tanstack-start/#deploy-to-netlify)
- Configures `vite dev` to behave just like the production Netlify platform, but locally on your machine
  - This has all the same features as `@netlify/vite-plugin`.
    [Check out its docs for details](/packages/vite-plugin/README.md).

## Installation

```bash
npm install -D @netlify/vite-plugin-tanstack-start
```

## Configuration options

The plugin accepts the following options:

```typescript
{
  dev: {
    edgeFunctions: {
      enabled: false,
    },
    // ... All dev options are supported here.
    // See https://www.npmjs.com/package/@netlify/vite-plugin.
  },
}
```

## Usage

Add the plugin to your `vite.config.js` or `vite.config.ts`:

```js
import { defineConfig } from 'vite'
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
import react from '@vitejs/plugin-react'
import netlify from '@netlify/vite-plugin-tanstack-start'

export default defineConfig({
  plugins: [tanstackStart(), react(), netlify()],
})
```
npm package: @netlisian/softconfig
Description: The core library for building and managing **Soft Components** within the Netlisian ecosystem. It provides type-safe field definitions, recursive mapping logic, and state management for the Puck editor.
Latest version: 0.1.6

# @netlisian/soft-config

The core library for building and managing **Soft Components** within the Netlisian ecosystem. It provides type-safe field definitions, recursive mapping logic, and state management for the Puck editor.

## Installation

```bash
npm install @netlisian/soft-config
```

## Features

- **Soft Component Builder**: Easy-to-use interface for creating versioned components.
- **Dynamic Field Options**: Automatically generates dot-notated mapping paths for nested objects and arrays.
- **Custom Field Support**: Extend the editor with custom UI while maintaining return type safety.
- **Puck Overrides**: Pre-built component overrides (ActionBar, Header, ComponentList) to seamlessly integrate Soft Components into the Puck editor.

## Key Concepts

### Soft Component Definitions

A Soft Component consists of fields, default props, and typed components.

```typescript
import { SoftFieldDefinition } from "@netlisian/soft-config";

const galleryField: SoftFieldDefinition = {
  name: "gallery",
  type: "array",
  subFields: [
    { name: "src", type: "text" },
    { name: "alt", type: "text" }
  ]
};
```

### Custom Field Extensibility

Define custom field types with specified return types (`string`, `number`, `boolean`, `object`, `array`).

```typescript
import { CustomFields } from "@netlisian/soft-config";

export const myCustomFields: CustomFields = {
  "my-color": {
    field: { type: "custom", render: () => <div>Color Picker</div> },
    returnType: "string"
  }
};
```

### Field Mapping

The library handles the logic for mapping configuration data to component props, including recursive array iteration using `[]` syntax (e.g., `features[].title`).

## Documentation

For detailed guides and API references, check the [Netlisian Docs](https://docs.netlisian.com).

## License

MIT
npm package: @netliva/symfony-form
Description: Netliva Symfony Form Bundle için JS Kütüphanesi
Author: Netliva
Latest version: 0.1.31

# Netliva Symfony Form Plugin
This package is the JS dependency required for the [netliva/symfony-form](https://github.com/netliva/symfony-form) php library. 
It cannot be used alone.
You have many new form types with netliva/symfony-form.
For details; https://github.com/netliva/symfony-form
npm package: @netlogix/jsonapi
Description: JSON API implementation for Angular apps
Author: Stephan Schuler
Latest version: 4.3.0

# @netlogix/jsonapi

[![npm version](https://badge.fury.io/js/%40netlogix%2Fjsonapi.svg)](https://badge.fury.io/js/%40netlogix%2Fjsonapi)

[JSON API](http://jsonapi.org/) implementation for Angular

### Installation

The latest release of netlogix jsonapi can be installed from npm

`npm install --save @netlogix/jsonapi`
npm package: @netlogix/stencil-hydrate-server
Description: output target for stencil to generate server for hydrating components
Latest version: 1.5.0

# @netlogix/stencil-hydrate-server

A Stencil output target to generate server for hydrating components.

## Usage

To use this output target, add it to your `stencil.config.ts`:

```typescript
import { Config } from '@stencil/core';
import { hydrateServerOutputTarget } from '@netlogix/stencil-hydrate-server';

export const config: Config = {
  // ...  
  outputTargets: [
    // ... other output targets
    {
      type: 'dist-hydrate-script',
      dir: 'dist/hydrate',
    },  
    hydrateServerOutputTarget({
      dir: 'dist/hydrate-server',
    }),
  ],
  // ...  
};
```

This will generate server code for hydrating your Stencil components. You can then use the generated code to render your components on the server and send the HTML to the client for faster page load times.

For more information on how to use Stencil output targets, please refer to the [Stencil documentation](https://stenciljs.com/docs/output-targets).

## License
This package is licensed under the MIT license.
npm package: @netlogix/stencil-styleguide-output-target
Description: A stencil output target which also builds Pattern Lab and processes scss
Latest version: 1.0.0

# @netlogix/stencil-styleguide-output-target

A stencil output target which also builds Pattern Lab and processes scss

## Usage

To use this output target, add it to your `stencil.config.ts`:

```typescript  
import { Config } from '@stencil/core';
import { sass } from '@stencil/sass';
import { patternLabOutputTarget } from "@netlogix/stencil-styleguide-output-target";
import postcss from "rollup-plugin-postcss";

export const config: Config = {
    namespace: 'stencil',
    srcDir: 'source/script',
    watchIgnoredRegex: /dependencyGraph.json/, // important for watching for changes in patternlab
    outputTargets: [
         // ... other output targets
         patternLabOutputTarget({
             rollupOptions:
                 {
                     input: 'source/css/style.scss',
                     plugins: [
                         postcss({
                             modules: true,
                             extract: true,
                         }),
                     ],
                 },
         }),
         // ...
    ],
    devServer: {
        openBrowser: false,
        reloadStrategy: "pageReload", // important for hot reload to work with patternlab
        root: 'public',
    },
    plugins: [
        sass(),
    ],
    // ...
};
```
## Configuration
The PatternlabOutput function takes an optional configuration object with the following properties:

`rollupOptions`:

An object with rollup options to be merged with the default options.

Default:
```
rollupOptions: {
      input: 'source/scss/style.scss',
      plugins: [
        postcss({
          modules: true,
          extract: true
        })
      ]
    },
```
#
`rollupOutputOptions`:

An object with rollup output options to be merged with the default options.

Default:
```
rollupOutputOptions: {
      name: 'style',
      dir: './public/css',
      format: 'es'
},
```
#
`sourceDir`: the directory which will be watched. Default: `source/**/*`


## License
This package is licensed under the MIT license.