open-index/open-npm huggingface dataset:
npm package: @gamecp/cli
Description: CLI tool for developing GameCP extensions
Author: GameCP
Latest version: 0.3.0

# @gamecp/cli

Command-line interface for developing GameCP extensions.

## Installation

```bash
npm install -g @gamecp/cli
```

Or use with npx:

```bash
npx @gamecp/cli init my-extension
```

## Commands

### `gamecp init [name]`

Initialize a new GameCP extension with interactive prompts.

```bash
gamecp init my-discord-bot
```

Options:
- `-d, --dir <directory>` - Target directory (default: current directory)
- `-t, --template <template>` - Template to use (default: basic)

### `gamecp build`

Build the extension for production.

```bash
gamecp build
```

Options:
- `-w, --watch` - Watch mode for development
- `-o, --outdir <directory>` - Output directory (default: dist)

### `gamecp validate`

Validate extension manifest and code.

```bash
gamecp validate
```

Options:
- `-m, --manifest <file>` - Manifest file path (default: gamecp.json)

### `gamecp dev`

Start development mode with watch and validation.

```bash
gamecp dev
```

This command:
1. Validates your manifest
2. Starts TypeScript compilation in watch mode
3. Rebuilds automatically on file changes

## Workflow

```bash
# Create new extension
gamecp init my-extension
cd my-extension

# Install dependencies
npm install

# Start development
npm run dev

# Build for production
npm run build
```

## Generated Project Structure

```
my-extension/
├── src/
│   └── index.ts          # Main extension code
├── dist/                 # Compiled output
├── gamecp.json          # Extension manifest
├── package.json
├── tsconfig.json
└── README.md
```

## License

MIT
npm package: @gamecp/manifest
Description: Manifest validation and utilities for GameCP extensions
Author: GameCP
Latest version: 0.3.0

# @gamecp/manifest

Manifest validation and utilities for GameCP extensions.

## Installation

```bash
npm install @gamecp/manifest
```

## Usage

### Validate a Manifest

```typescript
import { validateManifest } from '@gamecp/manifest';

const manifest = {
  id: 'my-extension',
  name: 'My Extension',
  version: '1.0.0',
  description: 'Does something cool',
  author: { name: 'Your Name' },
  main: 'dist/index.js',
  permissions: ['server:read']
};

const result = validateManifest(manifest);

if (result.valid) {
  console.log('Manifest is valid!');
} else {
  console.error('Validation errors:', result.errors);
}

if (result.warnings) {
  console.warn('Warnings:', result.warnings);
}
```

### Type Guard

```typescript
import { isValidManifest } from '@gamecp/manifest';
import type { ExtensionManifest } from '@gamecp/types';

const data = JSON.parse(manifestJson);

if (isValidManifest(data)) {
  // TypeScript now knows data is ExtensionManifest
  console.log(data.name);
}
```

## Validation Rules

### Required Fields

- `id` - Lowercase alphanumeric with hyphens
- `name` - Display name
- `version` - Semantic version (e.g., 1.0.0)
- `description` - Brief description
- `author.name` - Author name
- `main` - Entry point file path

### Optional Fields

- `permissions` - Array of valid permission strings
- `cron` - Array of cron schedules with valid expressions
- `ui` - Array of UI injection points
- `settings` - Array of setting definitions
- `icon` - Icon URL or path
- `homepage` - Homepage URL
- `repository` - Repository URL
- `license` - License identifier

## Valid Permissions

- `server:read` - Read server information
- `server:write` - Write server data
- `server:control` - Control server (start/stop/restart)
- `server:files` - Access server files
- `server:console` - Access server console
- `tenant:read` - Read tenant information
- `tenant:write` - Write tenant data
- `user:read` - Read user information
- `network:request` - Make network requests

## License

MIT
npm package: @gamecp/types
Description: TypeScript type definitions for GameCP extensions
Author: GameCP
Latest version: 0.4.1

# @gamecp/types

TypeScript type definitions for GameCP extensions.

## Installation

```bash
npm install @gamecp/types
```

## Usage

```typescript
import type { Extension, ExtensionContext, CronEvent } from '@gamecp/types';

const extension: Extension = {
  async onLoad(context: ExtensionContext) {
    context.logger.info('Extension loaded!');
  },

  async onCron(event: CronEvent, context: ExtensionContext) {
    const servers = await context.server?.getInfo();
    context.logger.info('Cron tick', { servers });
  }
};

export default extension;
```

## Type Definitions

### Core Types

- **`Extension`** - Main extension interface with lifecycle hooks
- **`ExtensionContext`** - Runtime context available to extensions
- **`ExtensionManifest`** - Schema for `gamecp.json` manifest file

### Events

- **`CronEvent`** - Cron schedule execution
- **`ServerEvent`** - Server lifecycle events
- **`PlayerEvent`** - Player join/leave events
- **`ConsoleOutputEvent`** - Server console output

### APIs

- **`ServerAPI`** - Server control methods (restart, sendCommand, etc.)
- **`Storage`** - Persistent key-value storage
- **`Logger`** - Structured logging

## Manifest Schema

```typescript
import type { ExtensionManifest } from '@gamecp/types';

const manifest: ExtensionManifest = {
  id: 'my-extension',
  name: 'My Extension',
  version: '1.0.0',
  description: 'Does something cool',
  author: {
    name: 'Your Name'
  },
  main: 'dist/index.js',
  permissions: ['server:read', 'server:control'],
  cron: [
    {
      expression: '*/5 * * * *',
      description: 'Run every 5 minutes'
    }
  ]
};
```

## License

MIT
npm package: @gamedev-js/rollup-plugin-node-resolve
Description: Bundle third-party dependencies in node_modules
Author: Rich Harris
Latest version: 3.0.0

# rollup-plugin-node-resolve

*This plugin used to be called rollup-plugin-npm*

Locate modules using the [Node resolution algorithm](https://nodejs.org/api/modules.html#modules_all_together), for using third party modules in `node_modules`

## Installation

```bash
npm install --save-dev rollup-plugin-node-resolve
```

## Usage

```js
// rollup.config.js
import resolve from 'rollup-plugin-node-resolve';

export default {
  input: 'main.js',
  output: {
    file: 'bundle.js',
    format: 'iife'
  },
  name: 'MyModule',
  plugins: [
    resolve({
      // use "module" field for ES6 module if possible
      module: true, // Default: true

      // use "jsnext:main" if possible
      // – see https://github.com/rollup/rollup/wiki/jsnext:main
      jsnext: true,  // Default: false

      // use "main" field or index.js, even if it's not an ES6 module
      // (needs to be converted from CommonJS to ES6
      // – see https://github.com/rollup/rollup-plugin-commonjs
      main: true,  // Default: true

      // some package.json files have a `browser` field which
      // specifies alternative files to load for people bundling
      // for the browser. If that's you, use this option, otherwise
      // pkg.browser will be ignored
      browser: true,  // Default: false

      // not all files you want to resolve are .js files
      extensions: [ '.js', '.json' ],  // Default: ['.js']

      // whether to prefer built-in modules (e.g. `fs`, `path`) or
      // local ones with the same names
      preferBuiltins: false,  // Default: true

      // Lock the module search in this path (like a chroot). Module defined
      // outside this path will be mark has external
      jail: '/my/jail/path', // Default: '/'

      // If true, inspect resolved files to check that they are
      // ES2015 modules
      modulesOnly: true, // Default: false

      // Any additional options that should be passed through
      // to node-resolve
      customResolveOptions: {
        moduleDirectory: 'js_modules'
      }
    })
  ]
};
```

## Using with rollup-plugin-commonjs

Since most packages in your node_modules folder are probably legacy CommonJS rather than JavaScript modules, you may need to use [rollup-plugin-commonjs](https://github.com/rollup/rollup-plugin-commonjs):

```js
// rollup.config.js
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';

export default {
  input: 'main.js',
  output: {
    file: 'bundle.js',
    format: 'iife'
  },
  name: 'MyModule',
  plugins: [
    resolve(),
    commonjs()
  ]
};
```


## License

MIT
npm package: @gamedev-sensei/jotai-atomizer
Description: This packages provides a simple way to access parts of your state via `Atomized` - wrapper around jotai atom.
Latest version: 3.2.1

# Jotai atomizer

This packages provides a simple way to access parts of your state via `Atomized` - wrapper around jotai atom.

## How it works?

Pass the primitive atom to the `atomize` function to wrap it with `Atomized`:

```ts
const someAtom = atom({ a: 4, b: 7 })
const atomizedAtom = atomize(someAtom)
```

Now, you can access atoms referring to the parts of source atom:

```ts
const aSubatom = atomizedAtom.a.atom
```

If your atom contains array property, additional `split` property will be accessible, so that you don't have to obtain the atom and split it manually:

```ts
const someAtom = atom({ test: [6, 7] })
const atomizedAtom = atomize(someAtom)
const splitAtom = atomizedAtom.test.split
```

## Other utilities

* `optionalAtom<T>(sourceAtom: PrimitiveAtom<T | undefined>): Atom<PrimitiveAtom<T> | undefined>` - helps to handle optional content
* `mappedAtom<T, R>(sourceAtom: PrimitiveAtom<T>, mapRead: (v: T) => R, mapWrite: (v: R) => T): PrimitiveAtom<R>` - creates proxy atom
npm package: @gamedev-sensei/react-extras
Description: Provides some useful ReactJs hooks:
Latest version: 2.1.0

# @gamedev-sensei/react-extras

Provides some useful ReactJs hooks:

* `useDerived` - works the same as the `useMemo` hook, but guarantees that the value will not be recomputed unless the dependencies change.
  You can specify a custom comparison function as the third parameter.
* `useMount` - works as the same as the `useEffect` hook, but you cannot specify the dependencies and the callback is run on component mount.

## Installation

Yarn:
```bash
yarn add @gamedev-sensei/react-extras
```

Npm:
```bash
npm i @gamedev-sensei/react-extras
```
npm package: @gamedev-sensei/ts-config
Description: Shared typescript config files that you can extend to provide type safety to your packages.
Latest version: 2.1.0

# @gamedev-sensei/ts-config

Shared typescript config files that you can extend to provide type safety to your packages.

We recommend extending:
* `@gamedev-sensei/ts-config/tsconfig.json` for plain typescript packages
* `@gamedev-sensei/ts-config/react.tsconfig.json` for react 18+ packages

## Installation

Yarn:
```bash
yarn add @gamedev-sensei/ts-config
```

Npm:
```bash
npm i @gamedev-sensei/ts-config
```
npm package: @gamedev-sensei/tsdown-config
Description: Provides simple tsdown configuration function `definePackageConfig` that instructs tsdown to:
Latest version: 2.1.0

# @gamedev-sensei/tsdown-config

Provides simple tsdown configuration function `definePackageConfig` that instructs tsdown to:

* build for `cjs` and `esm`
* put build files in the `dist` directory
* start compilation from `src/index.ts` file
* type definitions
* source maps
* prevent node_modules from being bundled

Additionally, you can pass tsdown config to `definePackageConfig` to override parts of config.

## Installation

Yarn:
```bash
yarn add @gamedev-sensei/tsdown-config
```

Npm:
```bash
npm i @gamedev-sensei/tsdown-config
```
npm package: @gamedev-sensei/tsup-config
Description: Provides simple tsup configuration function `definePackageConfig` that instructs tsup to:
Latest version: 1.1.2

# @gamedev-sensei/tsup-config

Provides simple tsup configuration function `definePackageConfig` that instructs tsup to:

* build for `cjs` and `esm`
* put build files in the `dist` directory
* start compilation from `src/index.ts` file
* resolve alias `@` to `src` internally to support `@/something` imports
* type definitions
* source maps

Additionally, you can pass tsup config to `definePackageConfig` to override parts of config.

## Installation

Yarn:
```bash
yarn add @gamedev-sensei/tsup-config
```

Npm:
```bash
npm i @gamedev-sensei/tsup-config
```
npm package: @gamedev.upc/vilahack-sdk
Description: The official TypeScript SDK for Vilahack
Author: Joel Esteller Planesas
Latest version: 0.1.1

# Vilahack SDK

The official, strongly-typed TypeScript SDK for the Vilahack API. 

Built with zero external dependencies, this SDK provides a seamless developer experience with comprehensive type safety, intelligent error handling (Result pattern), and built-in dynamic authentication routing.

## Installation

Install the package via npm, yarn, or pnpm:

```bash
npm install @gamedev.upc/vilahack-sdk
npm package: @gamedevjared89/progressbar-react
Description: A progress bar that fills as the user scrolls. For React apps. Customizable height and fill color.
Author: Hooker Hill Studios
Latest version: 1.1.8

<h1>@gamedevjared89/progressbar-react</h1>

<a href="https://www.npmjs.com/package/@gamedevjared89/progressbar-react?activeTab=readme">View on npmjs.com</a>

<p>A reusable React component. The progress bar fills and empties as the user scrolls up and down the page. Custom fill color and height props.</p>

<h2>Installation:</h2>
<img width="50%" height="50%" src="/images/image2.png" alt="npm i @gamedevjared89/progressbar-react">

<h2>Peer Deps:</h2>
react, react-dom

<h2>Usage:</h2>
<img width="50%" height="50%" src="/images/image.png" alt="imports and usage">

<h3>Sample:</h3>
<img width="50%" height="50%" src="/images/Screenshot_20230822-004526-476.png" alt="demo">
npm package: @gamedock/cordova-sdk
Description: Cordova Wrapper for Gamedock SDK
Author: Gamedock
Latest version: 5.3.6
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Gamedock SDK Cordova Plugin v5.3.6

## Documentation
Documentation can be found [here](https://azerion.github.io/gamedock-sdk/#/)

## Change Log
The change log can be found [here](https://github.com/azerion/gamedock-sdk/blob/master/CHANGELOG.md)
npm package: @gamefast/ching-sdk
Description: ```js import Client from '@gamefast/ching-sdk';
Latest version: 1.0.1

## Client Usage Examle
```js
import Client from '@gamefast/ching-sdk';

const client = new Client({
    host: '127.0.0.1',
    port: 3001,
    secure: false
});

/** Player */
/**
 * @param data Object
 * {
 *   status: Boolean,
 *   room: {
 *     players: [
 *          { id: id1, name: String, avatar: String, ....? },
 *     ],
 *     bet: Number,
 *     type: String,
 *     id: String,
 *     timer: Number
 *   }
 *
 * }
 * */


client.onPlayerSubscribe(data => {
    console.log('======SUBSCRIBE========')
    console.log(data);
    console.log('=======================');
    client.ready(true);
});

/**
 *
 * @param timer Number
 *
 * */


/** Room */
client.onGameStart((data) => {
    console.log("===========Game Start============");
    console.log(data)
});

/**
 *
 * @param winnerId? String
 * @param draw? Boolean
 * /..YOUR_API_RESPONSE_DATA../
 * */

client.onGameFinish(data => {
    console.log("===========Game Finish============");
    console.log(data)
});

/**
 *
 * @param player
 * {
 *  id: String
 * }
 *
 * */

client.onPlayerLeave(player => {
    console.log('===========ROOM PLAYER LEAVE========');
    console.log(player);
});

/**
 *
 * @param player
 * {
 *  id: String,
 *  status: Boolean
 * }
 *
 * */
client.onPlayerReady(console.log);

/**
 * @param status Boolean
 */

client.onPlayerJoinRoom(({ status }) => {
    console.log('============PLAYER JOIN ROOM==========');
    console.log(status);
});

/**
 * @description If both players skipped their turns, e.g. timer expired
 */

client.onMatchFinish(() => {
    console.log('============ROOM MATCH FINISH==========');
});

//** Socket Events
client.onConnect(() => console.log('SocketCluster onConnect'));
client.onDisconnect(() => console.log('SocketCluster onDisconnect'));
```
npm package: @gamefi-org/id-react
Description: The frontend SDK for GameFi.org ID built for React.
Latest version: 0.15.1

# @gamefi-org/id-react

The frontend SDK for GameFi.org ID built for React.

## Installation

```sh
npm i @gamefi-org/id-react
```

## Usage

@gamefi-org/id-react comes with a state-manager powered by [zustand](https://github.com/pmndrs/zustand). In order to get started, we first need to bootstrap the SDK with configuration.

```js
import { init } from '@gamefi-org/id-react';
init({
  recaptcha: 'Recaptcha client key',
  gsi: 'Google Sign-In client key',
  baseURL: 'GameFi.org ID API endpoint',
  rpcs: {
    // endpoints for web3 connectors
  },
});
```

From here, we can use the SDK with its components, hooks and utilities.

```js
import { Toaster, useID } from '@gamefi-org/id-react';
import SignIn from '@gamefi-org/id-react/dist/SignIn';
import Profile from '@gamefi-org/id-react/dist/Profile';

// singleton service for toasting messages.
<Toaster
  toastOptions={{
    style: {
      minWidth: '350px',
      maxWidth: '70%',
    },
  }}
/>;

// rendering the Profile and SignIn modal.
const { user } = useID();
if (user) {
  return <Profile />;
}

return <SignIn />;
```

That's it.  
For better understanding, we would recommend checking [the Storybook](https://github.com/polkafoundry/gamefi-id/tree/main/apps/workshop) and [the Next.js example](https://github.com/polkafoundry/gamefi-id/tree/main/apps/next).