open-index/open-npm huggingface dataset:
npm package: @landingai-js/core
Description: > TODO: description
Author: Lan Tian
Latest version: 1.0.9
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# `@landingai-js/core`

Core functions for getting predictions from Landing AI cloud deployment endpoints and rendering predictions.

```bash
npm install @landingai-js/core
# OR
yarn add @landingai-js/core
```

## Usage

### Getting prediction results

```javascript
// 1. setup endpoint and credentials
const apiInfo = {
  endpoint: "https://predict.app.landing.ai/inference/v1/predict?endpoint_id=<endpoint_id>",
  key: "<api_key>",
  secret: "<api_secret>",
}
// 2. get an image and convert to blob
const blob = await fetch("url-to-image").then((response) => response.blob());
// 3. get predictions from the blob
const { backbonepredictions } = await getInferenceResult(apiInfo, blob);
// 4. convert to annotations for rendering
const annotations = predictionsToAnnotations(backbonepredictions);
// render annotations
```

**References**

* [How to get an endpoint](https://support.landing.ai/docs/cloud-deployment)
* [How to get api key and secret](https://support.landing.ai/docs/api-key-and-api-secret)
npm package: @landingai-js/react
Description: > TODO: description
Author: Lan Tian
Latest version: 1.0.9
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# `@landingai-js/react`

React components to fetch and render predictions from an image.

## Usage

```jsx
import React from 'react';
import { useState } from "react";
import { InferenceContext, InferenceResult, PhotoCollector } from "@landingai-js/react";

const apiInfo = {
  endpoint: `https://predict.app.landing.ai/inference/v1/predict?endpoint_id=<endpoint_id>`,
  key: "<api_key>",
  secret: "<api_secret>",
};

export default function App() {
  const [image, setImage] = useState<Blob>();

  return (
    <InferenceContext.Provider value={apiInfo}>
      <PhotoCollector setImage={setImage} />
      <InferenceResult image={image} />
    </InferenceContext.Provider>
  );
}
```

**References**

* [How to get an endpoint](https://support.landing.ai/docs/cloud-deployment)
* [How to get api key and secret](https://support.landing.ai/docs/api-key-and-api-secret)


## Examples
- [Codesandbox React example](https://codesandbox.io/s/eloquent-tesla-yzsbsk?file=/src/App.js)
npm package: @landingai/react
Description: > TODO: description
Author: Lan Tian
Latest version: 1.0.18

# `@landingai/react`

React components to fetch and render predictions from an image.

## Usage

```jsx
import React from 'react';
import { useState } from "react";
import { InferenceContext, InferenceResult, PhotoCollector } from "@landingai/react";

const apiInfo = {
  endpoint: `https://predict.app.landing.ai/inference/v1/predict?endpoint_id=<endpoint_id>`,
  key: "<api_key>",
  secret: "<api_secret>",
};

export default function App() {
  const [image, setImage] = useState<Blob>();

  return (
    <InferenceContext.Provider value={apiInfo}>
      <PhotoCollector setImage={setImage} />
      <InferenceResult image={image} />
    </InferenceContext.Provider>
  );
}
```

**References**

* [How to get an endpoint](https://support.landing.ai/docs/cloud-deployment)
* [How to get api key and secret](https://support.landing.ai/docs/api-key-and-api-secret)


## Examples
- [Codesandbox React example](https://codesandbox.io/s/eloquent-tesla-yzsbsk?file=/src/App.js)
npm package: @landingexp/apollo-reporting-protobuf
Description: Protobuf format for Apollo usage reporting
Author: Apollo
Latest version: 1.0.3

# `apollo-reporting-protobuf`

> **Note:** The Apollo usage reporting API is subject to change.  We strongly
> encourage developers to contact Apollo support at `support@apollographql.com`
> to discuss their use case prior to building their own reporting agent using
> this module.

This module provides JavaScript/TypeScript
[Protocol buffer](https://developers.google.com/protocol-buffers/) definitions
for the Apollo usage reporting API.  These definitions are generated for
consumption from the `reports.proto` file which is defined internally within
Apollo.

## Development

> **Note:** Due to a dependency on Unix tools (e.g. `bash`, `grep`, etc.), the
> development of this module requires a Unix system.  There is no reason why
> this can't be avoided, the time just hasn't been taken to make those changes.
> We'd happily accept a PR which makes the appropriate changes!

Currently, this package generates a majority of its code with
[`protobufjs`](https://www.npmjs.com/package/protobufjs) based on the
`reports.proto` file. The output is generated with the `prepare` npm script.

The root of the repository provides the `devDependencies` necessary to build
these definitions (e.g. `pbjs`, `pbts`, `protobuf`, etc.) and the `prepare`
npm script is invoked programmatically via the monorepo tooling (e.g. Lerna)
thanks to _this_ module's `postinstall` script.   Therefore, when making
changes to this module, `npx lerna run prepare` should be run from the **root**
of this monorepo in order to update the definitions in _this_ module.
npm package: @landingexp/apollo-server-cache-memcached
Description: [![npm version](https://badge.fury.io/js/apollo-server-cache-memcached.svg)](https://badge.fury.io/js/apollo-server-cache-memcached) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apo
Author: Apollo
Latest version: 1.0.3

## MemcachedCache

[![npm version](https://badge.fury.io/js/apollo-server-cache-memcached.svg)](https://badge.fury.io/js/apollo-server-cache-memcached)
[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)

This package exports an implementation of `KeyValueCache` that allows using Memcached as a backing store for resource caching in [Data Sources](https://www.apollographql.com/docs/apollo-server/v2/features/data-sources.html).

## Usage

```js
const { MemcachedCache } = require('apollo-server-cache-memcached');

const server = new ApolloServer({
  typeDefs,
  resolvers,
  cache: new MemcachedCache(
    ['memcached-server-1', 'memcached-server-2', 'memcached-server-3'],
    { retries: 10, retry: 10000 }, // Options
  ),
  dataSources: () => ({
    moviesAPI: new MoviesAPI(),
  }),
});
```

For documentation of the options you can pass to the underlying memcached client, look [here](https://github.com/3rd-Eden/memcached).
npm package: @landingexp/apollo-server-cache-redis
Description: [![npm version](https://badge.fury.io/js/apollo-server-cache-redis.svg)](https://badge.fury.io/js/apollo-server-cache-redis) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollograph
Author: Apollo
Latest version: 2.0.3

## RedisCache

[![npm version](https://badge.fury.io/js/apollo-server-cache-redis.svg)](https://badge.fury.io/js/apollo-server-cache-redis)
[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)

This package exports an implementation of `KeyValueCache` that allows using Redis as a backing store for resource caching in [Data Sources](https://www.apollographql.com/docs/apollo-server/data/data-sources).

It currently supports a single instance of Redis, [Cluster](http://redis.io/topics/cluster-tutorial) and [Sentinel](http://redis.io/topics/sentinel).

## Usage

### Single instance

```js
const { RedisCache } = require('apollo-server-cache-redis');

const server = new ApolloServer({
  typeDefs,
  resolvers,
  cache: new RedisCache({
    host: 'redis-server',
    // Options are passed through to the Redis client
  }),
  dataSources: () => ({
    moviesAPI: new MoviesAPI(),
  }),
});
```

### Sentinels

```js
const { RedisCache } = require('apollo-server-cache-redis');

const server = new ApolloServer({
  typeDefs,
  resolvers,
  cache: new RedisCache({
    sentinels: [{
      host: 'sentinel-host-01',
      port: 26379
    }],
    password: 'my_password',
    name: 'service_name',
    // Options are passed through to the Redis client
  }),
  dataSources: () => ({
    moviesAPI: new MoviesAPI(),
  }),
});
```

### Cluster

```js
const { RedisClusterCache } = require('apollo-server-cache-redis');

const server = new ApolloServer({
  typeDefs,
  resolvers,
  cache: new RedisClusterCache(
    [{
      host: 'redis-node-01-host',
      // Options are passed through to the Redis cluster client
    }],
    {
      // Cluster options are passed through to the Redis cluster client
    }
  ),
  dataSources: () => ({
    moviesAPI: new MoviesAPI(),
  }),
});
```

For documentation of the options you can pass to the underlying redis client, look [here](https://github.com/luin/ioredis).
npm package: @landingexp/apollo-server-caching
Description: [![npm version](https://badge.fury.io/js/apollo-server-caching.svg)](https://badge.fury.io/js/apollo-server-caching) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apoll
Author: Apollo
Latest version: 1.0.3

# apollo-server-caching

[![npm version](https://badge.fury.io/js/apollo-server-caching.svg)](https://badge.fury.io/js/apollo-server-caching)
[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)

## Implementing your own Cache

Internally, Apollo Server uses the `KeyValueCache` interface to provide a caching store for the Data Sources. An in-memory LRU cache is used by default, and we provide connectors for [Memcached](../apollo-server-cache-memcached)/[Redis](../apollo-server-cache-redis) backends.

Built with extensibility in mind, you can also implement your own cache to use with Apollo Server, in a way that best suits your application needs. It needs to implement the following interface that can be exported from `apollo-server-caching`:

```typescript
export interface KeyValueCache {
  get(key: string): Promise<string | undefined>;
  set(key: string, value: string, options?: { ttl?: number }): Promise<void>;
}
```

> The `ttl` value for the `set` method's `options` is specified in __seconds__.

## Testing cache implementations

### Test helpers

You can export and run a jest test suite from `apollo-server-caching` to test your implementation:

```typescript
// ../__tests__/YourKeyValueCache.test.ts

import YourKeyValueCache from '../src/YourKeyValueCache';
import { testKeyValueCache } from 'apollo-server-caching';
testKeyValueCache(new MemcachedCache('localhost'));
```

The default `testKeyValueCache` helper will run all key-value store tests on the specified store, including basic `get` and `set` functionality, along with time-based expunging rules.

Some key-value cache implementations may not be able to support the full suite of tests (for example, some tests might not be able to expire based on time).  For those cases, there are more granular implementations which can be used:

* `testKeyValueCache_Basic`
* `testKeyValueCache_Expiration`

For more details, consult the [source for `apollo-server-caching`](./src/__tests__/testsuite.ts).

### Running tests

Run tests with `jest --verbose`
npm package: @landingexp/apollo-server-core
Description: Core engine for Apollo GraphQL server
Author: Apollo
Latest version: 2.19.3

# apollo-server-core

[![npm version](https://badge.fury.io/js/apollo-server-core.svg)](https://badge.fury.io/js/apollo-server-core)
[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)

This is the core module of the Apollo community GraphQL Server. [Read the docs.](https://www.apollographql.com/docs/apollo-server/)
[Read the CHANGELOG.](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md)
npm package: @landingexp/apollo-server-env
Description: This package is used internally by Apollo Server and not meant to be consumed directly.
Author: Apollo
Latest version: 3.0.3

# `apollo-server-env`

This package is used internally by Apollo Server and not meant to be consumed
directly.

Its primary function is to provide polyfills (e.g. via
[`core-js`](https://npm.im/core-js)) for newer language features which might
not be available in the underlying JavaScript Engine (i.e. more bare-bones V8
environments, older versions of Node.js, etc.).
npm package: @landingexp/apollo-server-fastify
Description: Production-ready Node.js GraphQL server for Fastify
Author: Apollo
Latest version: 3.0.4

[![npm version](https://badge.fury.io/js/apollo-server-fastify.svg)](https://badge.fury.io/js/apollo-server-fastify) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)
[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)


This is the Fastify integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/). [Read the CHANGELOG.](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md)

```shell
npm install apollo-server-fastify
```

## Fastify

```js
const { ApolloServer, gql } = require('apollo-server-fastify');
const { typeDefs, resolvers } = require('./module');

const server = new ApolloServer({
  typeDefs,
  resolvers,
});

const app = require('fastify')();

(async function () {
  app.register(server.createHandler());
  await app.listen(3000);
})();
```

## Principles

GraphQL Server is built with the following principles in mind:

* **By the community, for the community**: GraphQL Server's development is driven by the needs of developers
* **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure
* **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed

Anyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!
npm package: @landingexp/apollo-server-hapi
Description: Production-ready Node.js GraphQL server for Hapi
Author: Apollo
Latest version: 3.0.4

[![npm version](https://badge.fury.io/js/apollo-server-hapi.svg)](https://badge.fury.io/js/apollo-server-hapi) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)
[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)


This is the Hapi integration of Apollo Server. Apollo Server is a community-maintained open-source Apollo Server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/). [Read the CHANGELOG.](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md)

```shell
npm install apollo-server-hapi
```

## Usage

The code below requires Hapi 17 or higher.

```js
const { ApolloServer, gql } = require('apollo-server-hapi');
const Hapi = require('hapi');

async function StartServer() {
  const server = new ApolloServer({ typeDefs, resolvers });

  const app = new Hapi.server({
    port: 4000
  });

  await server.applyMiddleware({
    app,
  });

  await server.installSubscriptionHandlers(app.listener);

  await app.start();
}

StartServer().catch(error => console.log(error));
```

### Context

The context is created for each request. The following code snippet shows the creation of a context. The arguments are the `request`, the request, and `h`, the response toolkit.

```js
new ApolloServer({
  typeDefs,
  resolvers,
  context: async ({ request, h }) => {
    return { ... };
  },
})
```

## Principles

Apollo Server is built with the following principles in mind:

* **By the community, for the community**: Apollo Server's development is driven by the needs of developers
* **Simplicity**: by keeping things simple, Apollo Server is easier to use, easier to contribute to, and more secure
* **Performance**: Apollo Server is well-tested and production-ready - no modifications needed

Anyone is welcome to contribute to Apollo Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!
npm package: @landingexp/apollo-server-koa
Description: Production-ready Node.js GraphQL server for Koa
Author: Apollo
Latest version: 3.0.4

[![npm version](https://badge.fury.io/js/apollo-server-koa.svg)](https://badge.fury.io/js/apollo-server-koa) [![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/apollo)
[![Read CHANGELOG](https://img.shields.io/badge/read-changelog-blue)](https://github.com/apollographql/apollo-server/blob/HEAD/CHANGELOG.md)


This is the Koa integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/). [Read the CHANGELOG.](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md)

```shell
npm install apollo-server-koa graphql
```

## Koa

```js
const Koa = require('koa');
const { ApolloServer, gql } = require('apollo-server-koa');

// Construct a schema, using GraphQL schema language
const typeDefs = gql`
  type Query {
    hello: String
  }
`;

// Provide resolver functions for your schema fields
const resolvers = {
  Query: {
    hello: () => 'Hello world!',
  },
};

const server = new ApolloServer({ typeDefs, resolvers });

const app = new Koa();
server.applyMiddleware({ app });
// alternatively you can get a composed middleware from the apollo server
// app.use(server.getMiddleware());

app.listen({ port: 4000 }, () =>
  console.log(`🚀 Server ready at http://localhost:4000${server.graphqlPath}`),
);
```

## Principles

GraphQL Server is built with the following principles in mind:

- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers
- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure
- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed

Anyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/main/ROADMAP.md) and make your first PR!
npm package: @landingexp/apollo-server-plugin-operation-registry
Description: Apollo Server operation registry
Author: Apollo
Latest version: 1.0.3

# Operation Registry Plugin

The operation registry plugin is the interface into the Apollo Platform's **operation registry** and enables operation **safelisting**, which allows selective execution based on the operation. Safelisting eliminates the risk of unexpected operations that could cause downtime from being run against a graph.

In order to enable safelisting, follow the [step by step guide in the Apollo docs](https://www.apollographql.com/docs/studio/operation-registry/). These steps describe how to extract and upload operations defined within client applications to [Apollo Studio](https://studio.apollographql.com) using the Apollo CLI. Once operations have been registered, this plugin for Apollo Server fetches the manifest of these operations from [Apollo Studio](https://studio.apollographql.com) and forbids the execution of any operations that are not in that manifest.

### Usage

The following example shows basic usage of the plugin with Apollo Server. First, add the plugin to your project's `package.json`:

```bash
npm install apollo-server-plugin-operation-registry
```

Then, ensure Apollo Server has access to an [API key](https://www.apollographql.com/docs/studio/operation-registry/#6-start-apollo-server-with-apollo-studio-enabled), for example as the `APOLLO_KEY` environment variable:

```bash
APOLLO_KEY=<API_KEY> npm start
```

Next, enable the plugin by adding it to the `plugins` parameter to the Apollo Server options:

```js
const server = new ApolloServer({
  typeDefs,
  resolvers,
  subscriptions: false,
  plugins: [
    require("apollo-server-plugin-operation-registry")({
      forbidUnregisteredOperations: true
    })
  ]
});
```

<details><summary>With federation, the setup follows the same `plugins` configuration:</summary>

```js
const { ApolloServer } = require("apollo-server");
const { ApolloGateway } = require("@apollo/gateway");

const gateway = new ApolloGateway({
  serviceList: [ /* services */ ],
});

const server = new ApolloServer({
  gateway,
  subscriptions: false,
  plugins: [
    require("apollo-server-plugin-operation-registry")({
      forbidUnregisteredOperations: true
    })
  ]
});

server.listen().then(({ url }) => {
  console.log(`🚀 Server ready at ${url}`);
});
```
</details>

#### Variant

Clients can register their operations to a specific variant, so the plugin contains the `graphVariant` field to specify which variant to pull operation manifests from.

```js
const server = new ApolloServer({
  plugins: [
    require("apollo-server-plugin-operation-registry")({
      graphVariant: "production"
    })
  ]
});
```


### Metrics

The plugin will transmit metrics regarding unregistered operations which can be viewed within [Apollo Studio](https://studio.apollographql.com). The following example shows the unregistered operations sent by a particular client:

<p align="center">
  <img
    src="https://cl.ly/2a5b9c82287d/download/clients-page.png"
    alt="The clients page showing unregistered operations"
  />
</p>
npm package: @landingexp/apollo-server-plugin-response-cache
Description: Apollo Server full query response cache
Author: Apollo
Latest version: 1.0.3

# Response Cache plugin

This Apollo server plugin implements a full GraphQL query response cache.

- Add the plugin to your ApolloServer's plugins list
- Set `@cacheControl` hints on your schema or call `info.cacheControl.setCacheHint` in your resolvers
- If the entire GraphQL response is covered by cache hints with non-zero maxAge,
  the whole response will be cached.

This cache is a full query cache: cached responses are only used for identical requests.
npm package: @landingexp/apollo-server-testing
Description: Test utils for @landingexp/apollo-server
Author: Apollo
Latest version: 3.0.4

# apollo-server-testing

[![npm version](https://badge.fury.io/js/apollo-server-testing.svg)](https://badge.fury.io/js/apollo-server-testing)
[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)

This is the testing module of the Apollo community GraphQL Server. [Read the docs.](https://www.apollographql.com/docs/apollo-server/)
[Read the CHANGELOG.](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md)
npm package: @landingexp/apollo-tracing
Description: Collect and expose trace data for GraphQL requests
Author: Apollo
Latest version: 1.0.3

# Apollo Tracing (for Node.js)

This package is used to collect and expose trace data in the [Apollo Tracing](https://github.com/apollographql/apollo-tracing) format.

It relies on instrumenting a GraphQL schema to collect resolver timings, and exposes trace data for an individual request under `extensions` as part of the GraphQL response.

This data can be consumed by [Apollo Studio](https://www.apollographql.com/docs/studio/) (previously, Apollo Engine and Apollo Graph Manager) or any other tool to provide visualization and history of field-by-field execution performance.

## Usage

### Apollo Server

Apollo Server includes built-in support for tracing from version 1.1.0 onwards.

The only code change required is to add `tracing: true` to the options passed to the `ApolloServer` constructor options for your integration of choice. For example, for [`apollo-server-express`](https://npm.im/apollo-server-express):

```javascript
const { ApolloServer } = require('apollo-server-express');

const server = new ApolloServer({
  schema,
  tracing: true,
});
```
npm package: @landingexp/graphql-extensions
Description: Add extensions to GraphQL servers
Author: Apollo
Latest version: 1.0.3

# graphql-extensions

[![npm version](https://badge.fury.io/js/graphql-extensions.svg)](https://badge.fury.io/js/graphql-extensions)
[![Build Status](https://circleci.com/gh/apollographql/apollo-server/tree/main.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server)
npm package: @landisdesign/use-updatable-state
Description: A React Hook that updates when it receives a new external value
Author: Michael Landis
Latest version: 1.1.1

# `useUpdatableState` — A Custom Hook to Keep Track of Changes to State

If you have state you want to change in a component, that you also want
updated when incoming properties change, `useUpdatableState` lets you change
your state internally until new properties come into the component. At that
point, state is updated by the external value, and you can choose to be notified
when that happens.

## Installation

```
npm i use-updatable-state
```
or
```
yarn add use-updatable-state
```

## Usage
By default, you would use it just like `useState()`, passing a value to it and
receiving a tuple:

```jsx
import React from 'react';
import useUpdatableState from 'use-updatable-state';

function Component({ value, onChange }) {
  const [internalValue, setInternalValue, valueChanged] = useUpdatableState(value);

  const internalOnChange = e => {
    setInternalValue(e.currentTarget.value);
  };

  return (
    <>
      <div>
        Value: From {value} to <input type="text" value={internalValue} onChange={internalOnChange} />
      <div>
      <div>
        <button onClick={onChange(internalValue)}>Update</button>
        {valueChanged && <span style={{ color: 'red' }}>Value updated</span>}
      </div>
    </>
  )
}
```

### Using predicates to control what is considered equivalent
By default, `useUpdatableState()` will do a strict equality comparison (`===`) to
determine if the value changed or not. If you need finer grain control, you can
pass a predicate as a second argument:

```js
const predicate = (a, b) => a.name === b.name;
const [complexValue, setComplexValue, valueChanged] = useUpdatableState(value, predicate);
```

The above snippet would only overwrite `complexValue` if `value.name` changed.
Note this means that, even if other properties in `value` changed, as long as
`value.name` didn't change, `complexValue` won't be updated to reflect those
changes. Use this feature cautiously.

### Being notified of state changes
The third array element, `valueChanged`, is a boolean property that indicates
when the state has been updated to reflect the new value. It will be true when
the new state is provided, as well as when
npm package: @lando/acquia
Description: A Lando plugin that provides a tight integration with Acquia.
Author: Mike Pirog @pirog
Latest version: 1.8.1

# Acquia Lando Plugin

This is the _official_ [Lando](https://lando.dev) plugin for [Acquia](https://acquia.io). When installed it...

* Closely mimics Acquia's stack, versions and environment locally
* Allows you to easily `pull` your Acquia site down locally
* Allows you to easily `push` your changes back to Acquia
* Installs `drush`, `acli` and other power tools.

Of course, once a user is running their Acquia project with Lando they can take advantage of [all the other awesome development features](https://docs.lando.dev) Lando provides.


## Basic Usage

Clone a project down from Acquia.

```bash
# Make and go into an empty directory
mkdir myproject && cd myproject

# Go through interactive prompts to get your code from acquia
lando init --source acquia

# OR if you already have your acquia code locally
cd /path/to/repo
lando init \
  --source cwd \
  --recipe acquia

# Start it up
lando start

# Import your database and files
lando pull

# List information about this app.
lando info
```

Once your project is running you can access [relevant tooling commands](https://docs.lando.dev/acquia/tooling.html).

For more info you should check out the [docs](https://docs.lando.dev/acquia):

* [Getting Started](https://docs.lando.dev/acquia/getting-started.html)
* [Configuration](https://docs.lando.dev/acquia/config.html)
* [Tooling](https://docs.lando.dev/acquia/tooling.html)
* [Syncing](https://docs.lando.dev/acquia/sync.html)
* [Guides](https://docs.lando.dev/acquia/guides.html)
* [Examples](https://github.com/lando/acquia/tree/main/examples)
* [Development](https://docs.lando.dev/acquia/development.html)

## Issues, Questions and Support

If you have a question or would like some community support we recommend you [join us on Slack](https://launchpass.com/devwithlando).

If you'd like to report a bug or submit a feature request then please [use the issue queue](https://github.com/lando/acquia/issues/new/choose) in this repo.

## Changelog

We try to log all changes big and small in both [THE CHANGELOG](https://github.com/lando/acquia/blob/main/CHANGELOG.md) and the [release notes](https://github.com/lando/acquia/releases).

## Development

If you're interested in working on this plugin then we recommend you check out the [development guide](https://github.com/lando/acquia/blob/main/docs/development.md).


## Maintainers

* [@pirog](https://github.com/pirog)
* [@reynoldsalec](https://github.com/reynoldsalec)
* [@AaronFeledy](https://github.com/AaronFeledy)

## Contributors

<a href="https://github.com/lando/acquia/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=lando/acquia" />
</a>

Made with [contributors-img](https://contrib.rocks).

## Other Selected Resources

* [LICENSE](/LICENSE)
* [TERMS OF USE](https://docs.lando.dev/terms)
* [PRIVACY POLICY](https://docs.lando.dev/privacy)
* [CODE OF CONDUCT](https://docs.lando.dev/coc)
npm package: @lando/apache
Description: A Lando plugin that provides a tight integration with Apache.
Author: Mike Pirog @pirog
Latest version: 1.3.0

# Apache Lando Plugin

This is the _official_ [Lando](https://lando.dev) plugin for [Apache](https://www.apache.org/). When installed it...

* Allows users to run various `apache` versions

Of course, once a user is running their Apache project with Lando they can take advantage of [all the other awesome development features](https://docs.lando.dev) Lando provides.

## Basic Usage

Add a `apache` service to your Landofile

```yaml
services:
  myservice:
    type: apache:2.4
```

For more info you should check out the [docs](https://docs.lando.dev/apache):

* [Getting Started](https://docs.lando.dev/apache/)
* [Configuration](https://docs.lando.dev/apache/config.html)
* [Examples](https://github.com/lando/apache/tree/main/examples)
* [Development](https://docs.lando.dev/apache/development.html)

## Issues, Questions and Support

If you have a question or would like some community support we recommend you [join us on Slack](https://launchpass.com/devwithlando).

If you'd like to report a bug or submit a feature request then please [use the issue queue](https://github.com/lando/apache/issues/new/choose) in this repo.

## Changelog

We try to log all changes big and small in both [THE CHANGELOG](https://github.com/lando/apache/blob/main/CHANGELOG.md) and the [release notes](https://github.com/lando/apache/releases).


## Maintainers

* [@pirog](https://github.com/pirog)
* [@reynoldsalec](https://github.com/reynoldsalec)
* [@aaronfeledy](https://github.com/AaronFeledy)

## Contributors

<a href="https://github.com/lando/apache/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=lando/apache" />
</a>

Made with [contributors-img](https://contrib.rocks).

## Other Selected Resources

* [LICENSE](/LICENSE)
* [TERMS OF USE](https://docs.lando.dev/terms)
* [PRIVACY POLICY](https://docs.lando.dev/privacy)
* [CODE OF CONDUCT](https://docs.lando.dev/coc)
npm package: @lando/backdrop
Description: A Lando plugin that provides a tight integration with Backdrop.
Author: Mike Pirog @pirog
Latest version: 1.9.2

# Backdrop Lando Plugin

This is the _official_ [Lando](https://lando.dev) plugin for [Backdrop](https://backdropcms.org/). When installed it...

* Allows users to run `backdrop` cms
* Allows users to configure `php` version from `5.3` all the way to `8.5+`
* Allows users to configure `webroot`
* Allows users to configure web server to (`apache` or `nginx`)
* Allows users to configure database backend to (`mariadb` or `mysql`)
* Allows users to configure `composer`
* Allows users to configure [`bee`](https://github.com/backdrop-contrib/bee)
* Allows users to configure `xdebug`

Of course, once a user is running their Backdrop project with Lando they can take advantage of [all the other awesome development features](https://docs.lando.dev) Lando provides.

## Basic Usage

Add a `backdrop` recipe to your Landofile

```yaml
name: backdrop-app
recipe: backdrop
```

For more info you should check out the [docs](https://docs.lando.dev/backdrop):

* [Getting Started](https://docs.lando.dev/backdrop/)
* [Configuration](https://docs.lando.dev/backdrop/config.html)
* [Tooling](https://docs.lando.dev/backdrop/tooling.html)
* [Examples](https://github.com/lando/backdrop/tree/main/examples)
* [Development](https://docs.lando.dev/backdrop/development.html)

## Issues, Questions and Support

If you have a question or would like some community support we recommend you [join us on Slack](https://launchpass.com/devwithlando).

If you'd like to report a bug or submit a feature request then please [use the issue queue](https://github.com/lando/backdrop/issues/new/choose) in this repo.

## Changelog

We try to log all changes big and small in both [THE CHANGELOG](https://github.com/lando/backdrop/blob/main/CHANGELOG.md) and the [release notes](https://github.com/lando/backdrop/releases).


## Maintainers
* [@pirog](https://github.com/pirog)
* [@reynoldsalec](https://github.com/reynoldsalec)
* [@AaronFeledy](https://github.com/AaronFeledy)

## Contributors

<a href="https://github.com/lando/backdrop/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=lando/backdrop" />
</a>

Made with [contributors-img](https://contrib.rocks).

## Other Selected Resources

* [LICENSE](/LICENSE)
* [TERMS OF USE](https://docs.lando.dev/terms)
* [PRIVACY POLICY](https://docs.lando.dev/privacy)
* [CODE OF CONDUCT](https://docs.lando.dev/coc)
npm package: @lando/core
Description: The libraries that power all of Lando.
Author: Mike Pirog @pirog
Latest version: 3.26.2

# Lando Core

These are the core libraries that power Lando. They are implemented in [`@lando/cli`] and things like [Pantheon LocalDev](https://pantheon.io/product/localdev) and [WordPress VIP CLI](https://github.com/Automattic/vip-cli/blob/develop/package.json).

On a high level they serve as:

**An abstraction layer** Lando vastly reduces the complexity of spinning up containers by exposing only the most relevant config for a given "service" and setting "sane defaults". Lando also provides "recipes" which are common combinations of services and their tooling that satisfy a given development use case - e.g. Drupal, Python, Laravel, Dotnet, etc.

**A superset** Lando provides ways for developers to run complex commands, build steps and automation on their services without the hassle of custom Dockerfiles or long "docker exec" commands. Think `lando yarn add express`. Think clear my applications cache after I import a database. Think install this core-extension before my appserver starts and then `composer install` after it does.

**A utility** Lando handles some of the more arduous configuration required for a good Docker Compose setup - e.g. proxying, nice urls, cross-application networking (think Vue.js frontend talking to a separate Laravel backend), host-container file permission handling, file sharing, per-container SSL certificate handling, ssh-key handling, etc.

## Basic Usage

```js
const Lando = require('@lando/core');
const lando = new Lando(config);

// bootstrap and go
return lando.bootstrap(bsLevel).then(lando => {
  lando.getApp().init().then(() => cli.run(getTasks(config, cli.argv()), config));
});
const
```

For more info you should check out the [docs](https://docs.lando.dev/core/v3):

## Issues, Questions and Support

If you have a question or would like some community support we recommend you [join us on Slack](https://launchpass.com/devwithlando).

If you'd like to report a bug or submit a feature request then please [use the issue queue](https://github.com/lando/core/issues/new/choose) in this repo.

## Changelog

We try to log all changes big and small in both [THE CHANGELOG](https://github.com/lando/core/blob/main/CHANGELOG.md) and the [release notes](https://github.com/lando/core/releases).

## Contributors

<a href="https://github.com/lando/core/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=lando/cli" />
</a>

Made with [contributors-img](https://contrib.rocks).`

## Other Selected Resources

* [LICENSE](/LICENSE)
* [TERMS OF USE](https://docs.lando.dev/terms)
* [PRIVACY POLICY](https://docs.lando.dev/privacy)
* [CODE OF CONDUCT](https://docs.lando.dev/coc)
npm package: @lando/dotnet
Description: The official Lando plugin for dotnet.
Author: Mike Pirog @pirog
Latest version: 1.2.15

# Dotnet Lando Plugin

This is the _official_ [Lando](https://lando.dev) plugin for [Dotnet](https://dotnet.microsoft.com/). When installed it...

* Allows users to run various `dotnet` versions
* Runs in `cli` mode

Of course, once a user is running their dotnet project with Lando they can take advantage of [all the other awesome development features](https://docs.lando.dev) Lando provides.

## Basic Usage

Add a `dotnet` service to your Landofile

```yaml
services:
  myservice:
    type: dotnet
    command: dotnet run
```

For more info you should check out the [docs](https://docs.lando.dev/dotnet):

* [Getting Started](https://docs.lando.dev/dotnet/)
* [Configuration](https://docs.lando.dev/dotnet/config.html)
* [Examples](https://github.com/lando/dotnet/tree/main/examples)
* [Development](https://docs.lando.dev/dotnet/development.html)

## Issues, Questions and Support

If you have a question or would like some community support we recommend you [join us on Slack](https://launchpass.com/devwithlando).

If you'd like to report a bug or submit a feature request then please [use the issue queue](https://github.com/lando/dotnet/issues/new/choose) in this repo.

## Changelog

We try to log all changes big and small in both [THE CHANGELOG](https://github.com/lando/dotnet/blob/main/CHANGELOG.md) and the [release notes](https://github.com/lando/dotnet/releases).

## Maintainers

* [@pirog](https://github.com/pirog)
* [@reynoldsalec](https://github.com/reynoldsalec)

## Contributors

<a href="https://github.com/lando/dotnet/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=lando/dotnet" />
</a>

Made with [contributors-img](https://contrib.rocks).

## Other Selected Resources

* [LICENSE](/LICENSE)
* [TERMS OF USE](https://docs.lando.dev/terms)
* [PRIVACY POLICY](https://docs.lando.dev/privacy)
* [CODE OF CONDUCT](https://docs.lando.dev/coc)
npm package: @lando/drupal
Description: A Lando plugin that provides a tight integration with Drupal.
Author: Mike Pirog @pirog
Latest version: 1.15.0

# Drupal Lando Plugin

This is the _official_ [Lando](https://lando.dev) plugin for [Drupal](https://www.drupal.org/). When installed it...

* Allows users to run `drupal` cms
* Allows users to configure `php` version from `5.3` all the way to `8.5+`
* Allows users to configure `webroot`
* Allows users to configure web server to (`apache` or `nginx`)
* Allows users to configure database backend to (`mariadb`, `mysql`, or `postgres`)
* Allows users to configure `composer`
* Allows users to run `drush` commands
* Allows users to configure `xdebug`

Of course, once a user is running their Drupal project with Lando they can take advantage of [all the other awesome development features](https://docs.lando.dev) Lando provides.

## Basic Usage

Add a `drupal11` recipe to your Landofile

```yaml
name: my-cms
recipe: drupal11
config:
  php: 8.3
  via: apache:2.4
  database: mysql:8.0
```

For more info you should check out the [docs](https://docs.lando.dev/drupal):

* [Getting Started](https://docs.lando.dev/drupal/getting-started.html)
* [Configuration](https://docs.lando.dev/drupal/config.html)
* [Tooling](https://docs.lando.dev/drupal/tooling.html)
* [Examples](https://github.com/lando/drupal/tree/main/examples)
* [Development](https://docs.lando.dev/drupal/development.html)

## Installation

```bash
# With npm
npm install @lando/drupal
```

## Issues, Questions and Support

If you have a question or would like some community support we recommend you [join us on Slack](https://launchpass.com/devwithlando).

If you'd like to report a bug or submit a feature request then please [use the issue queue](https://github.com/lando/drupal/issues/new/choose) in this repo.

## Changelog

We try to log all changes big and small in both [THE CHANGELOG](https://github.com/lando/drupal/blob/main/CHANGELOG.md) and the [release notes](https://github.com/lando/drupal/releases).


## Development

* Requires [Node 20+](https://nodejs.org/dist/latest-v20.x/)

```bash
git clone https://github.com/lando/drupal.git && cd drupal
npm install
```

## Testing

```bash
# Lint the code
npm run lint

# Run unit tests
npm test
```

## Releasing

```bash
npm release
```


## Maintainers

* [@pirog](https://github.com/pirog)
* [@reynoldsalec](https://github.com/reynoldsalec)
* [@aaronfeledy](https://github.com/AaronFeledy)

## Contributors

<a href="https://github.com/lando/drupal/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=lando/drupal" />
</a>

Made with [contributors-img](https://contrib.rocks).

## Other Resources

* [LICENSE](/LICENSE)
* [TERMS OF USE](https://docs.lando.dev/terms)
* [PRIVACY POLICY](https://docs.lando.dev/privacy)
* [CODE OF CONDUCT](https://docs.lando.dev/coc)
npm package: @lando/elasticsearch
Description: A Lando plugin that provides a tight integration with Elasticsearch.
Author: Mike Pirog @pirog
Latest version: 1.5.0

# Elasticsearch Lando Plugin

This is the _official_ [Lando](https://lando.dev) plugin for [Elasticsearch](https://www.elastic.co/elasticsearch/). When installed it...

* Allows users to run various `elasticsearch` versions

Of course, once a user is running their Elasticsearch project with Lando they can take advantage of [all the other awesome development features](https://docs.lando.dev) Lando provides.

## Basic Usage

Add a `elasticsearch` service to your Landofile

```yaml
services:
  myservice:
    type: elasticsearch:9
```

For more info you should check out the [docs](https://docs.lando.dev/elasticsearch):

* [Getting Started](https://docs.lando.dev/elasticsearch/)
* [Configuration](https://docs.lando.dev/elasticsearch/config.html)
* [Examples](https://github.com/lando/elasticsearch/tree/main/examples)
* [Development](https://docs.lando.dev/elasticsearch/development.html)

## Issues, Questions and Support

If you have a question or would like some community support we recommend you [join us on Slack](https://launchpass.com/devwithlando).

If you'd like to report a bug or submit a feature request then please [use the issue queue](https://github.com/lando/elasticsearch/issues/new/choose) in this repo.

## Changelog

We try to log all changes big and small in both [THE CHANGELOG](https://github.com/lando/elasticsearch/blob/main/CHANGELOG.md) and the [release notes](https://github.com/lando/elasticsearch/releases).


## Maintainers

* [@pirog](https://github.com/pirog)
* [@reynoldsalec](https://github.com/reynoldsalec)

## Contributors

<a href="https://github.com/lando/elasticsearch/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=lando/elasticsearch" />
</a>

Made with [contributors-img](https://contrib.rocks).

## Other Selected Resources

* [LICENSE](/LICENSE)
* [TERMS OF USE](https://docs.lando.dev/terms)
* [PRIVACY POLICY](https://docs.lando.dev/privacy)
* [CODE OF CONDUCT](https://docs.lando.dev/coc)
npm package: @lando/go
Description: A Lando plugin that provides a tight integration with go.
Author: Mike Pirog @pirog
Latest version: 1.4.0

# Go Lando Plugin

This is the _official_ [Lando](https://lando.dev) plugin for [Go](https://go.dev/). When installed it...

* Allows users to run various `go` versions

Of course, once a user is running their go project with Lando they can take advantage of [all the other awesome development features](https://docs.lando.dev) Lando provides.

## Basic Usage

Add a `go` service to your Landofile

```yaml
services:
  myservice:
    type: go:1.26
```

For more info you should check out the [docs](https://docs.lando.dev/go):

* [Getting Started](https://docs.lando.dev/go/getting-started.html)
* [Configuration](https://docs.lando.dev/go/config.html)
* [Examples](https://github.com/lando/go/tree/main/examples)
* [Development](https://docs.lando.dev/go/development.html)

## Issues, Questions and Support

If you have a question or would like some community support we recommend you [join us on Slack](https://launchpass.com/devwithlando).

If you'd like to report a bug or submit a feature request then please [use the issue queue](https://github.com/lando/go/issues/new/choose) in this repo.

## Changelog

We try to log all changes big and small in both [THE CHANGELOG](https://github.com/lando/go/blob/main/CHANGELOG.md) and the [release notes](https://github.com/lando/go/releases).


## Maintainers

* [@pirog](https://github.com/pirog)
* [@reynoldsalec](https://github.com/reynoldsalec)
* [@AaronFeledy](https://github.com/AaronFeledy)

## Contributors

<a href="https://github.com/lando/go/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=lando/go" />
</a>

Made with [contributors-img](https://contrib.rocks).

## Other Selected Resources

* [LICENSE](/LICENSE)
* [TERMS OF USE](https://docs.lando.dev/terms)
* [PRIVACY POLICY](https://docs.lando.dev/privacy)
* [CODE OF CONDUCT](https://docs.lando.dev/coc)