open-index/open-npm huggingface dataset:
npm package: @phaserquick/cli
Description: <h1>CLI</h1>
Latest version: 1.1.3

<h1>CLI</h1>

![Phaserquick CLI](https://i.imgur.com/LcVOU8i.png)

# Getting Started

The `phaserquick` starter project scaffolds a feature packed Phaser workspace by using the `@phaserquick/cli`. Read on to learn more about the features the starter project has to offer.

## Setup

### What you should already have

- [Node.js](https://nodejs.org/en/download/) version 18.0 or above
- Start by installing `@phaserquick/cli` npm package globally on your machine.

```bash
npm install -g @phaserquick/cli@latest
```

## Generate a new game

To generate a new game open up your terminal where you want to create the game and execute:

```bash
phaserquick new
```

The CLI will walk you through the creation of your game.

## Start your game

Once created navigate to your game:

```bash
cd my-game
```

Install your dependencies:

```bash
npm install
```

Start your game:

```bash
npm start
```
npm package: @phaserquick/recognizer
Description: Preload an image in your scene preload for the brush with a key of recognizer-brush.
Latest version: 1.0.12

# Recognizer

## Installation

Preload an image in your scene preload for the brush with a key of recognizer-brush.

Create instance in a scene and pass the scene instance along with the required properties.

```js
import { Recognizer } from '@phaserquick/recognizer';
import colorModel from '../data/color.model.json';
import dataModel from '../data/data.model.json';

export class MainScene extends Phaser.Scene {
  constructor() {
    super('MainScene');
  }

  preload() {
    this.load.image('recognizer-brush', 'assets/brush.png');
  }

  create() {
    const { width, height } = this.game.scale;

    const text = this.add.text(0, 0, 'Final Result', { fontSize: '500%' });

    const AllSymbols = [
      'h-line',
      'v-line',
      'zig-zag'
    ] as const;

    type Symbols = (typeof AllSymbols)[number];

    const recognizer = new Recognizer<Symbols>({
      scene: this,
      width,
      height,
      pointClouds: dataModel,
      colors: colorModel,
      brushSize: 20,
      multistroke: false,
      recognitionThreshold: {
        'h-line': 70,
        'v-line': 70,
        'zig-zag': 23
      },
      debug: true
    });

    recognizer.onDrawComplete((result) => {
      if (!result) {
        console.error(
          'Failed to recognize - enable debug and see console for more info.'
        );

        return;
      }

      const { name, score, time } = result;

      text.setText(
        `Final Result\n${name || 'no match'}\n${(score * 100).toFixed(
          0
        )}%\nTime:${time}ms`
      );
    });
  }
}
```
npm package: @phasma/handler-aws
Description: An implementation of @phasma handler designed for working with Amazon Web Services Lambda
Latest version: 1.0.1

# `@phasma/handler-aws`

An implementation of `@phasma/handler` designed for working with **Amazon Web Services** Lambda.

> Create simplistic and maintainable entrypoint-based applications.

For more information or raising issues please use the main [phasma](https://github.com/matt-usurp/phasma) repository on GitHub.

## Getting Started

The package is available on all registries and can be installed with your standard commands:

```
npm i @phasma/handler-aws
```

This package provides pre-defined implementations for the `lambda` technology.
Depending on the service you want to use the integration will look similar to this:

```ts
import { aws } from '@phasma/handler-aws';

export const handler = aws<'apigw:proxy:v2'>((application) => {
  return application
    .use(new WithRequestQueryValidator())
    .use(new WithRequestBodyValidator())
    .handle(new GetUserCollectionHandler())
});
```

> Where `handler` is the export that `lambda` will be pointed to to execute your function.

This will follow the following process:

1. When the `handler` is invoked by `lambda` the event is taken in and the composition is triggered.
2. The middleware `WithRequestQueryValidator` is invoked to provide any context from the provider event.
3. The middleware `WithRequestBodyValidator` is invoked to provide any context from the provider event.
4. The handler `GetUserCollectionHandler` is invoked with the context and performs some business logic, it returns a response.
5. The middleware `WithRequestBodyValidator` receives the response and does any transformation if required, if not it passes the response down the chain.
6. The middleware `WithRequestQueryValidator` receives the response and does any transformation if required, if not it passes the response down the chain.
7. The provider receives the response, does some final transformations (if required) and returns to `lambda`.

More details on how this works at its core can be found in the `@phasma/handler` package which this extends, documentation can be [found here](https://github.com/matt-usurp/phasma/tree/main/packages/@phasma/handler).

## Working with Events

> TODO

### Defining Events

> TODO

## Defining Handlers

> TODO

## Defining Middleware

> TODO

## Testing

> TODO