open-index/open-npm huggingface dataset:
npm package: @starcart.com/optional-deps-validate
Description: A CLI tool to detect missing optional dependencies in package-lock.json
Author: Lauri Piispanen
Latest version: 1.0.0

# optional-deps-validate

*(note: this package is almost entirely written by AI)*

> **Validate that all optional dependencies declared by installed packages are present in `package-lock.json`.**

This is a workaround for [this npm issue](https://github.com/npm/cli/issues/4828).

When using Node.js and npm, certain packages declare OS- or architecture-specific sub-dependencies in their `optionalDependencies`. However, sometimes `npm` can generate a partial `package-lock.json` that excludes some or all of those optional deps. This can lead to problems on other machines or CI when `npm` fails to install required platform packages.

**`optional-deps-validate`** is a CLI tool that scans your local `node_modules` and compares each installed package's `optionalDependencies` against your `package-lock.json`. If any are missing, it warns you and exits with a non-zero status code.

## Installation

```bash
npm install -D @starcart.com/optional-deps-validate
# or
yarn add -D @starcart.com/optional-deps-validate
# or
pnpm add -D @starcart.com/optional-deps-validate
```

You can also install it globally:

```bash
npm install -g @starcart.com/optional-deps-validate
# or
yarn global add @starcart.com/optional-deps-validate
# or
pnpm add -g @starcart.com/optional-deps-validate
```

Then run it using:

```bash
npx @starcart.com/optional-deps-validate
```

## Usage

Run the command in any project directory that has both a package-lock.json and a node_modules directory:

```bash
cd /path/to/your/project
npx @starcart.com/optional-deps-validate
```

If everything is correct, you’ll see:

```
✅  All optional dependencies declared by installed packages appear in package-lock.json.
```

Otherwise, it will list warnings for each missing optional dependency and exit with status code 1.

### Example Warning

```
⚠️  [Warning] Package "@swc/core" declares optional dependency "@swc/core-darwin-arm64" but it is NOT listed in package-lock.json

One or more optional dependencies are missing from package-lock.json!
```

### How it works

1. **Scans node_modules:** Locates every installed package (including scoped packages) and reads its package.json.
2. **Collects Optional Deps:** For each package’s optionalDependencies, the tool records each optional dep name.
3. **Parses package-lock.json:** Gathers all package names listed in the lock file.
4. **Compares:** Any optional dep name that doesn’t appear in the lock file is flagged as missing.

### When to Use

* **Prevent Partial Lockfiles:** Whenever you suspect `npm install` might have generated an incomplete `package-lock.json` (for instance, if you re-installed without removing `node_modules`).
* **CI Enforcement:** Add `npx optional-deps-validate` as part of your build or test pipeline to ensure the lockfile is fully consistent before merging changes.

## License

MIT
npm package: @starcharles/notarealdb
Description: A "fake" database for Node.js that stores data in local JSON files, for testing and sample applications.
Latest version: 0.0.1

# Not a Real DB

A "fake" database for Node.js that stores data in local JSON files, for testing and sample applications.

## Usage

Create a `DataStore` instance specifying in which folder to store the data, then create a collections for each object type you want to store:

```js
const { DataStore } = require('notarealdb');

const store = new DataStore('./data');
const apples = store.collection('apples');
const oranges = store.collection('oranges');
```

This will save apples in `./data/apples.json` and oranges in `./data/oranges.json`.

You can then manipulate each collection using the following CRUD operations:

```js
// create a new item; returns a generated id
const id = apples.create({variety: 'Gala', weight: 133}); // => 'BJ4E9mQOG'

// list all items in a collection
apples.list(); // => [{id: 'BJ4E9mQOG', variety: 'Gala', weight: 133}]

// get a single item
apples.get('BJ4E9mQOG'); // => {id: 'BJ4E9mQOG', variety: 'Gala', weight: 133}

// update an item
apples.update({id: 'BJ4E9mQOG', variety: 'Braeburn', weight: 133});

// delete an item
apples.delete('BJ4E9mQOG');
```

That's it. All operations are synchronous.

Files are read at startup and written after each modification. You can manually edit a JSON file and provide some initial data, as long as you do that before you start the application.

## Usage with TypeScript

If you use this module from TypeScript you can specify an interface representing the type of objects stored in each collection. E.g.

```ts
import { DataStore } from 'notarealdb';

interface Apple {
  id: string;
  variety: string;
  weight: number;
}

const store = new DataStore('./data');
const apples = store.collection<Apple>('apples'); // apples: Collection<Apple>
const all = apples.list(); // all: Apple[]
const one = apples.get('BJ4E9mQOG'); // one: Apple
```
npm package: @starchart-labs/flightdeck
Description: Lightweight and powerful Javascript hooks for common UI elements
Author: Starchart Labs
Latest version: 0.2.8

# flightdeck.js
[![Build Status](https://travis-ci.org/StarChart-Labs/flightdeck.svg?branch=master)](https://travis-ci.org/StarChart-Labs/flightdeck)

Flightdeck is a collection of lightweight and powerful Javascript modules for common web UI elements. The goal is to bring object-oriented sensibilities to the script-side of the UI. For example, a button in HTML is tied to an instance of the Button class in Flightdeck.

Starchart Labs' web-applications use Flightdeck to power their frontends, and you can too!

## Button
```javascript
import { Button } from '@starchart-labs/flightdeck';

let myButton = new Button('demo-button');
myButton.onClick(() => console.log('hello'));
```
### Constructor
Creates an instance of Button.
#### Arguments
* `elementId` {string} - The ID of a DOM element on the page to tie to this instance of Button
* `loaderHtml` {string} (optional) - An HTML string to display when the button is in the loading state (see onClickAsync)

### onClick
Sets up a click event for the Button.
#### Arguments
* `func` {function} - A function to be called whenever the button is clicked

### onClickAsync
Sets up an asynchronous click event for the Button. While the event is being performed, the button will have the class `disabled` added to it, and the text of the button will be temporarily replaced by whatever `loaderHtml` was specified in the constructor (by default this is `<div class="loader"></div>`).
#### Arguments
* `func` {function returns Promise} - A function to be called whenever the button is clicked. This function must return the type `Promise` for the loading state to work correctly

## Modal
```javascript
import { Modal } from '@starchart-labs/flightdeck';

let myModal = new Modal('demo-modal');
myModal.open();
```
### Constructor
Creates an instance of Modal. Any DOM children of this Modal with the class `modal-close` will be automatically set up with an event listener to close this Modal when clicked. Additionally, the background area around the Modal will also close the Modal when clicked, unless `sticky` is set to true.
#### Arguments
* `elementId` {string} - The ID of a DOM element on the page to tie to this instance of Modal
* `sticky` {boolean} (optional) - If sticky is true, clicking the background around the modal will _not_ close it. This is false by default, so the modal can be easily closed.
* `closeFunction` {function} (optional) - A function to be run whenever the modal is closed. For example, to clear out the fields of a form in the modal.

### open
Shows the Modal by adding the class `open` to the DOM element.

### close
Closes the Modal by removing the class `open` from the DOM element. Will call `closeFunction` if one was provided in the constructor.
npm package: @starchive-uppy/dropbox
Description: Import files from Dropbox, into Uppy.
Latest version: 1.14.19

# @uppy/dropbox

<img src="https://uppy.io/images/logos/uppy-dog-head-arrow.svg" width="120" alt="Uppy logo: a superman puppy in a pink suit" align="right">

<a href="https://www.npmjs.com/package/@uppy/dropbox"><img src="https://img.shields.io/npm/v/@uppy/dropbox.svg?style=flat-square"></a>
<a href="https://travis-ci.org/transloadit/uppy"><img src="https://img.shields.io/travis/transloadit/uppy/master.svg?style=flat-square" alt="Build Status"></a>

The Dropbox plugin for Uppy lets users import files from their Dropbox account.

A Companion instance is required for the Dropbox plugin to work. Companion handles authentication with Dropbox, downloads files from Dropbox and uploads them to the destination. This saves the user bandwidth, especially helpful if they are on a mobile connection.

Uppy is being developed by the folks at [Transloadit](https://transloadit.com), a versatile file encoding service.

## Example

```js
const Uppy = require('@uppy/core')
const Dropbox = require('@uppy/dropbox')

const uppy = new Uppy()
uppy.use(Dropbox, {
  // Options
})
```

## Installation

```bash
$ npm install @uppy/dropbox
```

We recommend installing from npm and then using a module bundler such as [Webpack](https://webpack.js.org/), [Browserify](http://browserify.org/) or [Rollup.js](http://rollupjs.org/).

Alternatively, you can also use this plugin in a pre-built bundle from Transloadit's CDN: Edgly. In that case `Uppy` will attach itself to the global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions.

## Documentation

Documentation for this plugin can be found on the [Uppy website](https://uppy.io/docs/dropbox).

## License

[The MIT License](./LICENSE).
npm package: @starchive-uppy/google-drive
Description: The Google Drive plugin for Uppy lets users import files from their Google Drive account
Latest version: 1.5.18

# @uppy/google-drive

<img src="https://uppy.io/images/logos/uppy-dog-head-arrow.svg" width="120" alt="Uppy logo: a superman puppy in a pink suit" align="right">

<a href="https://www.npmjs.com/package/@uppy/google-drive"><img src="https://img.shields.io/npm/v/@uppy/google-drive.svg?style=flat-square"></a>
<a href="https://travis-ci.org/transloadit/uppy"><img src="https://img.shields.io/travis/transloadit/uppy/master.svg?style=flat-square" alt="Build Status"></a>

The Google Drive plugin for Uppy lets users import files from their Google Drive account.

A Companion instance is required for the GoogleDrive plugin to work. Companion handles authentication with Google, downloads files from the Drive and uploads them to the destination. This saves the user bandwidth, especially helpful if they are on a mobile connection.


Uppy is being developed by the folks at [Transloadit](https://transloadit.com), a versatile file encoding service.

## Example

```js
const Uppy = require('@uppy/core')
const GoogleDrive = require('@uppy/google-drive')

const uppy = new Uppy()
uppy.use(GoogleDrive, {
  // Options
})
```

## Installation

```bash
$ npm install @uppy/google-drive
```

We recommend installing from npm and then using a module bundler such as [Webpack](https://webpack.js.org/), [Browserify](http://browserify.org/) or [Rollup.js](http://rollupjs.org/).

Alternatively, you can also use this plugin in a pre-built bundle from Transloadit's CDN: Edgly. In that case `Uppy` will attach itself to the global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions.

## Documentation

Documentation for this plugin can be found on the [Uppy website](https://uppy.io/docs/google-drive).

## License

[The MIT License](./LICENSE).
npm package: @starchive-uppy/onedrive
Description: Import files from OneDrive, into Uppy.
Latest version: 1.1.17

# @uppy/facebook

<img src="https://uppy.io/images/logos/uppy-dog-head-arrow.svg" width="120" alt="Uppy logo: a superman puppy in a pink suit" align="right">

<a href="https://www.npmjs.com/package/@uppy/facebook"><img src="https://img.shields.io/npm/v/@uppy/facebook.svg?style=flat-square"></a>
<a href="https://travis-ci.org/transloadit/uppy"><img src="https://img.shields.io/travis/transloadit/uppy/master.svg?style=flat-square" alt="Build Status"></a>

The OneDrive plugin for Uppy lets users import files from their OneDrive account.

A Companion instance is required for the OneDrive plugin to work. Companion handles authentication with Microsoft OneDrive, downloads files from OneDrive and uploads them to the destination. This saves the user bandwidth, especially helpful if they are on a mobile connection.

Uppy is being developed by the folks at [Transloadit](https://transloadit.com), a versatile file encoding service.

## Example

```js
const Uppy = require('@uppy/core')
const Facebook = require('@uppy/facebook')

const uppy = new Uppy()
uppy.use(Facebook, {
  // Options
})
```

## Installation

```bash
$ npm install @uppy/facebook
```

We recommend installing from npm and then using a module bundler such as [Webpack](https://webpack.js.org/), [Browserify](http://browserify.org/) or [Rollup.js](http://rollupjs.org/).

Alternatively, you can also use this plugin in a pre-built bundle from Transloadit's CDN: Edgly. In that case `Uppy` will attach itself to the global `window.Uppy` object. See the [main Uppy documentation](https://uppy.io/docs/#Installation) for instructions.

## Documentation

Documentation for this plugin can be found on the [Uppy website](https://uppy.io/docs/facebook).

## License

[The MIT License](./LICENSE).
npm package: @starchive-uppy/provider-views
Description: View library for Uppy remote provider plugins.
Latest version: 1.8.5

# @uppy/provider-views

<img src="https://uppy.io/images/logos/uppy-dog-head-arrow.svg" width="120" alt="Uppy logo: a superman puppy in a pink suit" align="right">

<a href="https://www.npmjs.com/package/@uppy/provider-views"><img src="https://img.shields.io/npm/v/@uppy/provider-views.svg?style=flat-square"></a>
<a href="https://travis-ci.org/transloadit/uppy"><img src="https://img.shields.io/travis/transloadit/uppy/master.svg?style=flat-square" alt="Build Status"></a>

View library for Uppy remote provider plugins.

Uppy is being developed by the folks at [Transloadit](https://transloadit.com), a versatile file encoding service.

## Example

```js
const Plugin = require('@uppy/core/lib/plugin')
const { ProviderViews } = require('@uppy/provider-views')

class GoogleDrive extends Plugin {
  constructor () { /* snip */ }
  install () {
    this.view = new ProviderViews(this)
    // snip
  }

  onFirstRender () {
    return this.view.getFolder('root', '/')
  }

  render (state) {
    return this.view.render(state)
  }
}
```

## Installation

> Unless you are creating a custom provider plugin, you do not need to install this.

```bash
$ npm install @uppy/provider-views
```

<!-- Undocumented currently
## Documentation

Documentation for this plugin can be found on the [Uppy website](https://uppy.io/docs/DOC_PAGE_HERE).
-->

## License

[The MIT License](./LICENSE).
npm package: @starci/socket-io-cluster-adapter
Description: The Socket.IO cluster adapter, allowing to broadcast events between several Socket.IO servers
Latest version: 0.2.7

# Socket.IO cluster adapter

The `@socket.io/cluster-adapter` package allows broadcasting packets between multiple Socket.IO servers.

![Adapter diagram](./assets/adapter.png)

It can be used in conjunction with [`@socket.io/sticky`](https://github.com/socketio/socket.io-sticky) to broadcast packets between the workers of the same Node.js [cluster](https://nodejs.org/api/cluster.html).

Supported features:

- [broadcasting](https://socket.io/docs/v4/broadcasting-events/)
- [utility methods](https://socket.io/docs/v4/server-instance/#Utility-methods)
  - [`socketsJoin`](https://socket.io/docs/v4/server-instance/#socketsJoin)
  - [`socketsLeave`](https://socket.io/docs/v4/server-instance/#socketsLeave)
  - [`disconnectSockets`](https://socket.io/docs/v4/server-instance/#disconnectSockets)
  - [`fetchSockets`](https://socket.io/docs/v4/server-instance/#fetchSockets)
  - [`serverSideEmit`](https://socket.io/docs/v4/server-instance/#serverSideEmit)

Related packages:

- Postgres adapter: https://github.com/socketio/socket.io-postgres-adapter/
- Redis adapter: https://github.com/socketio/socket.io-redis-adapter/
- MongoDB adapter: https://github.com/socketio/socket.io-mongo-adapter/

**Table of contents**

- [Installation](#installation)
- [Usage](#usage)
- [License](#license)

## Installation

```
npm install @socket.io/cluster-adapter
```

## Usage

```js
const cluster = require("cluster");
const http = require("http");
const { Server } = require("socket.io");
const numCPUs = require("os").cpus().length;
const { setupMaster, setupWorker } = require("@socket.io/sticky");
const { createAdapter, setupPrimary } = require("@socket.io/cluster-adapter");

if (cluster.isMaster) {
  console.log(`Master ${process.pid} is running`);

  const httpServer = http.createServer();

  // setup sticky sessions
  setupMaster(httpServer, {
    loadBalancingMethod: "least-connection",
  });

  // setup connections between the workers
  setupPrimary();

  // needed for packets containing buffers (you can ignore it if you only send plaintext objects)
  // Node.js < 16.0.0
  cluster.setupMaster({
    serialization: "advanced",
  });
  // Node.js > 16.0.0
  // cluster.setupPrimary({
  //   serialization: "advanced",
  // });

  httpServer.listen(3000);

  for (let i = 0; i < numCPUs; i++) {
    cluster.fork();
  }

  cluster.on("exit", (worker) => {
    console.log(`Worker ${worker.process.pid} died`);
    cluster.fork();
  });
} else {
  console.log(`Worker ${process.pid} started`);

  const httpServer = http.createServer();
  const io = new Server(httpServer);

  // use the cluster adapter
  io.adapter(createAdapter());

  // setup connection with the primary process
  setupWorker(io);

  io.on("connection", (socket) => {
    /* ... */
  });
}
```

## License

[MIT](LICENSE)
npm package: @starcoin-org/stc-block-tracker
Description: A block tracker for the Starcoin blockchain. Keeps track of the latest block.
Latest version: 0.1.0

# stc-block-tracker

This module walks the Starcoin blockchain, keeping track of the latest block.
It uses a web3 provider as a data source and will continuously poll for the next block.


## Install
```
yarn
```

## Build
```
yarn build
```

### Publish npm package
```
npm publish --access public --tag latest --dry-run
npm publish --access public --tag latest 
```
npm package: @starcoin-org/stc-inpage-provider
Description: A JavaScript Starcoin provider that connects to the wallet over a stream.
Latest version: 0.3.2

# StarMask Providers

The Starcoin provider object injected by StarMask into various environments.
Contains a lot of implementation details specific to StarMask, and is probably
not suitable for out-of-the-box use with other wallets.
npm package: @starcoin/starswap-sdk-core
Description: ⚒️ An SDK for building applications on top of Starswap V2
Latest version: 0.4.1

# Starswap SDK Core

[![npm version](https://img.shields.io/npm/v/@starcoin/starswap-sdk-core/latest.svg)](https://www.npmjs.com/package/@starcoin/starswap-sdk-core)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@starcoin/starswap-sdk-core/latest.svg)](https://bundlephobia.com/result?p=@starcoin/starswap-sdk-core@latest)

This code is shared across Starswap TypeScript SDKs.
npm package: @starcoin/starswap-v2-sdk
Description: 🛠 An SDK for building applications on top of Starswap V2
Latest version: 0.5.6

# Starswap V2 SDK

[![Unit Tests](https://github.com/Uniswap/uniswap-v2-sdk/workflows/Unit%20Tests/badge.svg)](https://github.com/Uniswap/uniswap-v2-sdk/actions?query=workflow%3A%22Unit+Tests%22)
[![Lint](https://github.com/Uniswap/uniswap-v2-sdk/workflows/Lint/badge.svg)](https://github.com/Uniswap/uniswap-v2-sdk/actions?query=workflow%3ALint)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![npm version](https://img.shields.io/npm/v/@uniswap/v2-sdk/latest.svg)](https://www.npmjs.com/package/@uniswap/v2-sdk/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@uniswap/v2-sdk/latest.svg)](https://bundlephobia.com/result?p=@uniswap/v2-sdk@latest)

In-depth documentation on this SDK is available at [uniswap.org](https://uniswap.org/docs/v2/SDK/getting-started/).
npm package: @starcoin/starswap-v3-sdk
Description: ⚒️ An SDK for building applications on top of Starswap V3
Latest version: 0.1.0

# Alpha software

The latest version of the SDK is used in production in the Uniswap Interface,
but it is considered Alpha software and may contain bugs or change significantly between patch versions.
If you have questions about how to use the SDK, please reach out in the `#dev-chat` channel of the Discord.
Pull requests welcome!

# Uniswap V3 SDK

[![Unit Tests](https://github.com/Uniswap/uniswap-v3-sdk/workflows/Unit%20Tests/badge.svg)](https://github.com/Uniswap/uniswap-v3-sdk/actions?query=workflow%3A%22Unit+Tests%22)
[![Lint](https://github.com/Uniswap/uniswap-v3-sdk/workflows/Lint/badge.svg)](https://github.com/Uniswap/uniswap-v3-sdk/actions?query=workflow%3ALint)
[![npm version](https://img.shields.io/npm/v/@uniswap/v3-sdk/latest.svg)](https://www.npmjs.com/package/@uniswap/v3-sdk/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@uniswap/v3-sdk/latest.svg)](https://bundlephobia.com/result?p=@uniswap/v3-sdk@latest)

In-depth documentation on this SDK is available at [uniswap.org](https://docs.uniswap.org/).
npm package: @starcoin/stc-block-tracker
Description: A block tracker for the Starcoin blockchain. Keeps track of the latest block.
Latest version: 0.1.0

# stc-block-tracker

This module walks the Starcoin blockchain, keeping track of the latest block.
It uses a web3 provider as a data source and will continuously poll for the next block.


## Install
```
yarn
```

## Build
```
yarn build
```

### Publish npm package
```
npm publish --access public --tag latest --dry-run
npm publish --access public --tag latest 
```
npm package: @starcoin/stc-ed25519
Description: Fastest JS implementation of ed25519 & ristretto255. Auditable, high-security, 0-dependency pubkey, scalarmult & EDDSA
Latest version: 0.1.0

# stc-ed25519

This repo is forked from [noble-ed25519](https://github.com/paulmillr/noble-ed25519), and fixed 2 issues we met in starcoin-explorer:
- [#21](https://github.com/paulmillr/noble-ed25519/pull/21)
- [#22](https://github.com/paulmillr/noble-ed25519/pull/22)

## Contributing

1. Clone the repository.
2. `yarn` to install build dependencies like TypeScript
3. `yarn build` to compile TypeScript code
4. `yarn test` to run jest on `test/index.ts`
npm package: @starcoin/stc-inpage-provider
Description: A JavaScript Starcoin provider that connects to the wallet over a stream.
Latest version: 0.4.0

# StarMask Providers

The Starcoin provider object injected by StarMask into various environments.
Contains a lot of implementation details specific to StarMask, and is probably
not suitable for out-of-the-box use with other wallets.
npm package: @starcoin/stc-inpage-providers
Description: A JavaScript Starcoin provider that connects to the wallet over a stream.
Latest version: 0.2.0

# StarMask Providers

The Starcoin provider object injected by StarMask into various environments.
Contains a lot of implementation details specific to StarMask, and is probably
not suitable for out-of-the-box use with other wallets.