open-index/open-npm huggingface dataset:
npm package: @sugoi/cli
Description: CLI utils for Handle and manage SugoiJS project
Author: Orel Balilti
Latest version: 4.1.0

# @Sugoi/cli

![Sugoi logo](https://sugoijs.com/assets/logo_inverse.png)


## Introduction
SugoiJS is a minimal modular framework.

SugoiJS gives you the ability to use only what you need and do it fast.

This package provides you the needed util for sugoi development.

## Installation

> $ npm i -g @sugoi/cli


## Bootstrapping

To bootstrap use the 'init' command:

> $ sgi init

This will display a wizard for project creation.

## Generate

SugoiJS provides easy generation tool by the g or generate argument

    $ sgi g <type> <name>

Available types

    module (m) - Generate a module with one service and one controller which contains the module name

After generating new module you will have to inject it to bootstrap module.

    controller (c) - Generate a controller under 'controllers' directory.

After generating new controller you will have to inject it to the related module.

    service (s) - Generate a service under 'services' directory.

After generating new service you will have to inject it to the related module.

    model - Generate a model class.
    mongo-model - Generate a mongo model class.

## Commands example
    $ sgi g m myModule
    // Will create a module under the current path
    // with controller and a service

    $ sgi g model myModel
    // Will create a model under the current path

    $ sgi g mongo-model myMongoModel
    // Will create a mongo-model under the current path

    $ sgi g c newController
    // Will create a controller under the current path
    // will create controllers directory
    // if no such directory found under the path

    $ sgi g s newService
    // Will create a service under the current path
    // will create service directory
    // if no such directory found under the path


## Documentation

You can find further information on [Sugoi official website](http://www.sugoijs.com)
npm package: @sugoi/socket
Description: sugoi framework socket handler, based on socket.io
Author: Orel Balilti
Latest version: 4.3.1

# @Sugoi\socket

![Sugoi logo](https://sugoijs.com/assets/logo_inverse.png)

[![npm version](https://badge.fury.io/js/%40sugoi%2Fsocket.svg)](https://badge.fury.io/js/%40sugoi%2Fsocket)
[![Build Status](https://travis-ci.org/sugoiJS/socket.svg?branch=master)](https://travis-ci.org/sugoiJS/socket)
[![codecov](https://codecov.io/gh/sugoiJS/socket/branch/master/graph/badge.svg)](https://codecov.io/gh/sugoiJS/socket)


## Introduction
SugoiJS is a minimal modular framework.

SugoiJS gives you the ability to use only what you need and do it fast.

this is a standalone module that can be functional on its own (as all of the SugoiJS modules).

The SugoiJS socket module uses the [socket.io](https://www.npmjs.com/package/socket.io).

## Installation

> npm install --save @sugoi/socket

### Bootstrapping
Bootstrapping done by:

    import {SocketHandler} from "@sugoi/socket";

    // serverInstance is express\koa instance
    // in case you are using @socket\server, the instance returns from the 'listen' method
    SocketHandler.init(serverInstance);


#### Socket Options

 Init socket server with:

 > namespace -  assign different endpoint to the socket server, more info on [socket.io documentation](https://socket.io/docs/rooms-and-namespaces/)

 > socketOptions - the socket server configurations

    SocketHandler.init(serverInstance, socketConfig: SocketIOStatic.ServerOptions, namespace: string): SocketIOStatic.Server


> The socketOptions variable interface is the same as on [socket.io documentation](https://socket.io/docs/server-api/)

     socketOptions:{
          path: string,
          serveClient: boolean,
          adapter:Adapter,
          origins:string,
          parser:Parser
     }

### Listen to events

SugoiJS socket module provides you the @SocketOn(event:string, namespace:string) decorator.

This decorator registers the callback for an event.

Example:

    // SocketOn(event: string, namespace: string = "/", ...middlewares:Array<ISocketMiddleware>) {
    @SocketOn('message',"/",(socket,data)=>{
        console.log("log message data: %s from socket id: %s",data,socket.id);
    })
    function(data,socket){
        socket.to(data.room).emit('message',data.message)
    }

You can use as many decorators as you want.

### Get instance

For getting the socketIO server instance, use the getServer() method of the SocketHandler instance method.

    const io:SocketIOStatic.Server = SocketHandler.getHandler().getServer();

## Documentation

You can find further information on [Sugoi official website](https://sugoijs.com)
npm package: @sugoidogo/selflare
Description: Compile Cloudflare Workers to Cap'n Proto and deliver them as Docker images.
Latest version: 1.1.4

# Selflare

Compile Cloudflare Workers to Cap'n Proto and deliver them as minimalist Docker images.

## Features

-   [x] Cloudflare Worker
-   [x] Cloudflare KV
-   [x] Cloudflare D1
-   [x] Cloudflare R2
-   [x] Cloudflare DO
-   [x] Cache API
-   [ ] Cloudflare Vectorize
-   [x] Environment Variables

## Usage

Install with `npm i @sugoidogo/selflare --save-dev` and run the following commands in the directory of your worker:

```bash
npx selflare compile   # Compile the worker to Cap'n Proto
npx selflare docker    # Generate Dockerfile and docker-compose.yml
docker compose up      # Run the worker
```

## Environment Variables

All the environment variables defined in `[vars]` section of the `wrangler.toml` file will be replaced by the corresponding environment variables in the Docker container.

You can simply set the environment variables in the `docker-compose.yml` file like this:

```yaml
version: "3.8"

services:
    worker:
        build: .
        image: worker
        volumes:
            - ./.storage/cache:/worker/cache
            - ./.storage/kv:/worker/kv
            - ./.storage/d1:/worker/d1
            - ./.storage/r2:/worker/r2
        ports:
            - "8080:8080"
        environment:
            - SOME_TOKEN=I_AM_A_TOKEN
```

The image is based on [`jacoblincool/workerd`](https://github.com/JacobLinCool/workerd-docker) which has a size of 35MB (compressed) and supports both `amd64` and `arm64` architectures.
npm package: @suhailakhtar/elevate-bin
Description: This tool allows you to start a program with elevated privileges from the command line.
Author: Suhail Akhtar
Latest version: 1.0.3

# elevate

Precompiled binaries.

This tool allows you to start a program with elevated privileges from the command line. See [1],[2] for details.

[1] http://jpassing.com/2007/12/08/launch-elevated-processes-from-the-command-line/
[2] https://github.com/jpassing/elevate

# Installation

```shell
npm i --save @suhailakhtar/elevate-bin
```

# Get path to binaries

```javascript
const { pathElevate, pathElevate64 } = require("@suhailakhtar/elevate-bin");

console.log({ pathElevate, pathElevate64 });
```
npm package: @suhailphotos/rillio
Description: Pluggable, feature-aware database façade (name reservation)
Latest version: 0.0.2

# @suhailphotos/rillio (placeholder)

Name reservation for a future JS/TS wrapper around **rillio** — a pluggable, feature-aware database façade (Rust core, CLI, Python).

```js
import { hello } from "@suhailphotos/rillio";
console.log(hello()); // "rillio: hello world (name reservation)"
```