open-index/open-npm huggingface dataset:
npm package: @groww-tech/monitoring
Description: A monitoring CLI to spin up prometheus server
Author: Groww Core Team
Latest version: 0.0.1

# web-monitoring 
 [![npm version](https://img.shields.io/npm/v/@groww-tech/web-monitoring?color=51C838)](https://www.npmjs.com/package/@groww-tech/web-monitoring) 
 [![minzipped size](https://img.shields.io/bundlephobia/minzip/@groww-tech/web-monitoring)](https://bundlephobia.com/package/@groww-tech/web-monitoring)
 ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/Groww/webster/monitoring.yml?color=51C838)

<br/>

Monitoring service is a CLI which starts the prometheus server for monitoring.


### Installation

```
npm i @groww-tech/monitoring
```

### CLI Usage
`web-monitor` will be the command to start prometheus server, optional command line arguments like port and route can be passed to it.
```
PORT=8001 ROUTE=/metrics web-monitor
```

📚[Complete API Documentation](https://groww.github.io/webster/)

## License

Monitoring service is licensed under a [MIT License](./LICENSE).

<br/>

*This package is customized for use in Groww projects. Use at your own risk.*

<br/>

---
npm package: @groww-tech/tsconfig
Description: Shared TypeScript config for Groww projects
Author: Rishabh Tripathi
Latest version: 1.0.2

# tsconfig

Shared TypeScript config for Groww projects.

For information on setting up `tsconfig.json` in your project see the [TypeScript docs](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html).

## Install

```
npm install --save-dev @groww-tech/tsconfig
```

## Usage
Add `"extends": "@groww-tech/tsconfig"` to your `tsconfig.json` file.

<br>

*This configuration is for use in Groww projects. Use at your own risk.*
npm package: @growy/strapi-plugin-auth-cookie
Description: Strapi v5 plugin to mirror JWT auth tokens into cookies
Author: Zahir El Isaac by growy AI
Latest version: 1.1.2

# Auth Cookie (Strapi v5)

Plugin that mirrors the JWT issued by Users & Permissions into cookies and reuses it in subsequent requests. Includes settings in the Strapi dashboard and signature verification to detect tampered tokens.

## What it does

- Sends the JWT in the `access_token` cookie upon login, registration, reset, or OAuth.
- Generates the signed `access_token.sig` cookie via HMAC using Strapi's secret.
- Injects `Authorization: Bearer <token>` into every incoming request if the signature is valid.
- Clears both cookies when the plugin is disabled or an invalid signature is detected.

## Installation

```bash
npm install @growy/strapi-plugin-auth-cookie
# either
yarn add @growy/strapi-plugin-auth-cookie
```

## Basic configuration

`config/plugins.js` file:

```javascript
module.exports = () => ({
  'auth-cookie': {
    enabled: true,
    config: {
      enabled: true,
      cookieName: 'access_token',
      signatureCookieName: 'access_token.sig',
      signatureEnabled: true,
      signatureHttpOnly: true,
      path: '/',
      domain: null,
      secure: false,
      httpOnly: true,
      sameSite: 'lax',
      maxAge: null,
    },
  },
});
```

After modifying the configuration, run `npm run build` and restart Strapi. Settings can also be managed from Admin → Settings → Auth Cookie.

## Available Options

- `enabled`: Enables cookie mirroring.
- `cookieName`: Name of the JWT in the cookie.
- `signatureEnabled`: Enables the signature cookie; disable it only if you cannot access the JWT secret.
- `signatureCookieName`: Name of the signature cookie.
- `signatureHttpOnly`: Controls whether the signature is accessible from JavaScript (it is recommended to leave it set to `true`).
- `path`, `domain`: Cookie scope.
- `secure`, `httpOnly`, `sameSite`: Security attributes.
- `maxAge`: Duration in milliseconds (`null` = session cookie).

## Production Checklist

1. Configure CORS in `config/middlewares.js` to allow your frontend and enable `credentials: true`:

```javascript
module.exports = [
  {
    name: 'strapi::cors',
    config: {
      origin: ['https://app.example.com'],
      credentials: true,
    },
  },
];
```

2. Set `url` and `proxy: true` in `config/server.js` if you're using a CDN or a proxy (Nginx, Cloudflare).
3. Use `SameSite: 'none'` and `secure: true` when the frontend and API are on different domains.
4. Set the `domain` to `.your-domain.com` if you're sharing cookies across subdomains.

## Frontend Example

```javascript
await fetch(`${import.meta.env.VITE_STRAPI_URL}/api/auth/local`, {
  method: "POST",
  credentials: "include",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ identifier, password }),
});
```

The plugin will add the `Authorization` header to subsequent requests as long as `access_token` and `access_token.sig` are still valid.

## License

MIT
npm package: @grozav/utils
Description: Collection of common JavaScript / TypeScript utils by [@alexgrozav](http://github.com/alexgrozav).
Latest version: 1.3.2

# @grozav/utils

Collection of common JavaScript / TypeScript utils by [@alexgrozav](http://github.com/alexgrozav). 

✅ Fully typed

✅ 100% Tested

✅ CommonJS and ESM

## Installation
~~~bash
npm i -S @grozav/utils
~~~

## License
ISC
npm package: @grpc-base-client/apm
Description: This project is just a template for creation of new projects
Author: Thiago O Santos
Latest version: 0.0.0

[![Actions Status](https://github.com/Codibre/grpc-base-client-apm/workflows/build/badge.svg)](https://github.com/Codibre/grpc-base-client-apm/actions)
[![Actions Status](https://github.com/Codibre/grpc-base-client-apm/workflows/test/badge.svg)](https://github.com/Codibre/grpc-base-client-apm/actions)
[![Actions Status](https://github.com/Codibre/grpc-base-client-apm/workflows/lint/badge.svg)](https://github.com/Codibre/grpc-base-client-apm/actions)
[![Test Coverage](https://api.codeclimate.com/v1/badges/65e41e3018643f28168e/test_coverage)](https://codeclimate.com/github/Codibre/grpc-base-client-apm/test_coverage)
[![Maintainability](https://api.codeclimate.com/v1/badges/65e41e3018643f28168e/maintainability)](https://codeclimate.com/github/Codibre/grpc-base-client-apm/maintainability)
[![Packages](https://david-dm.org/Codibre/grpc-base-client-apm.svg)](https://david-dm.org/Codibre/grpc-base-client-apm)
[![npm version](https://badge.fury.io/js/%40grpc-base-client%2Fapm.svg)](https://badge.fury.io/js/%40grpc-base-client%2Fapm)

Never forget to write your readme! Also, don't forget to add codeclimate key to your github environment variables (as **CC_TEST_REPORTER_ID**) and to update the url here with the one provided by them!

## How to Install

```
npm i @grpc-base-client/apm
```

## License

Licensed under [MIT](https://en.wikipedia.org/wiki/MIT_License).
npm package: @grpc-web/middleware
Description: gRPC Web middleware for Express and Connect.
Latest version: 0.1.0

# [@grpc-web/middleware](https://github.com/marella/node-grpc-web/tree/main/packages/middleware) [![npm](https://img.shields.io/npm/v/@grpc-web/middleware)](https://www.npmjs.com/package/@grpc-web/middleware) [![tests](https://github.com/marella/node-grpc-web/actions/workflows/tests.yml/badge.svg)](https://github.com/marella/node-grpc-web/actions/workflows/tests.yml) [![coverage](https://coveralls.io/repos/github/marella/node-grpc-web/badge.svg)](https://coveralls.io/github/marella/node-grpc-web)

gRPC Web middleware for Express and Connect.

> For standalone proxy, see [`@grpc-web/proxy`](https://www.npmjs.com/package/@grpc-web/proxy)

## Installation

```sh
npm install @grpc-web/middleware
```

## Usage

This middleware proxies gRPC Web requests to the given gRPC server and can be used with existing Express and Connect applications. Here is a full working example of a proxy server created using `express` and `cors` packages:

```js
const express = require('express');
const cors = require('cors');
const grpcWeb = require('@grpc-web/middleware');

const app = express();
app.use(cors({ exposedHeaders: ['grpc-status', 'grpc-message'] }));
app.use(grpcWeb('http://localhost:9090'));
app.listen(8080);
```

In above example, `express` can be replaced with `connect`. The address `http://localhost:9090` refers to the gRPC server address to which gRPC Web requests are forwarded to and `8080` refers to the port on which the proxy server is running.

gRPC Web middleware only handles gRPC Web requests and ignores normal HTTP requests, so it can be used together with normal web applications:

```js
app.use(grpcWeb('http://localhost:9090'));

app.get('/', (req, res) => {
  res.send('Hello World');
});
```

It can be run in the same process as the gRPC server:

```js
// Express or Connect server
app.use(grpcWeb('http://localhost:9090'));
app.listen(8080);

// gRPC server
const server = new grpc.Server();
server.addProtoService(service, implementation);
server.bind('0.0.0.0:9090', credentials);
server.start();
```

It also accepts a custom function which can used for configuring the HTTP/2 connection to the gRPC server:

```js
const http2 = require('node:http2');

app.use(
  grpcWeb(() => {
    return http2.connect('http://localhost:9090');
  })
);
```

## License

[MIT](https://github.com/marella/node-grpc-web/blob/main/packages/middleware/LICENSE)
npm package: @grpc-web/proxy
Description: gRPC Web proxy for Node.js
Latest version: 0.1.0

# [@grpc-web/proxy](https://github.com/marella/node-grpc-web/tree/main/packages/proxy) [![npm](https://img.shields.io/npm/v/@grpc-web/proxy)](https://www.npmjs.com/package/@grpc-web/proxy) [![tests](https://github.com/marella/node-grpc-web/actions/workflows/tests.yml/badge.svg)](https://github.com/marella/node-grpc-web/actions/workflows/tests.yml) [![coverage](https://coveralls.io/repos/github/marella/node-grpc-web/badge.svg)](https://coveralls.io/github/marella/node-grpc-web)

gRPC Web proxy for Node.js

> For Express and Connect middleware, see [`@grpc-web/middleware`](https://www.npmjs.com/package/@grpc-web/middleware)

## Installation

```sh
npm install @grpc-web/proxy
```

## Usage

This is a standalone proxy server created using [`@grpc-web/middleware`](https://www.npmjs.com/package/@grpc-web/middleware), `connect` and `cors` packages. It can be run directly from the command line:

```sh
npx @grpc-web/proxy --target http://localhost:9090 --listen 8080
```

or used as a library:

```js
const proxy = require('@grpc-web/proxy');

proxy({ target: 'http://localhost:9090' }).listen(8080);
```

The address `http://localhost:9090` refers to the gRPC server address to which gRPC Web requests are forwarded to and `8080` refers to the port on which the proxy server is running.

It can be run in the same process as the gRPC server:

```js
// Proxy server
proxy({ target: 'http://localhost:9090' }).listen(8080);

// gRPC server
const server = new grpc.Server();
server.addProtoService(service, implementation);
server.bind('0.0.0.0:9090', credentials);
server.start();
```

It also accepts a custom function which can used for configuring the HTTP/2 connection to the gRPC server:

```js
const http2 = require('node:http2');

proxy({
  target: () => {
    return http2.connect('http://localhost:9090');
  },
}).listen(8080);
```

### Options

- `target`: gRPC server address or a custom function that returns a HTTP/2 connection to the gRPC server. See [`@grpc-web/middleware`](https://www.npmjs.com/package/@grpc-web/middleware).
- `origin`: Configures the **Access-Control-Allow-Origin** CORS header. See `origin` option in [`cors`](https://www.npmjs.com/package/cors#configuration-options).
- `headers`: Configures the **Access-Control-Expose-Headers** CORS header. See `exposedHeaders` option in [`cors`](https://www.npmjs.com/package/cors#configuration-options).

## License

[MIT](https://github.com/marella/node-grpc-web/blob/main/packages/proxy/LICENSE)
npm package: @grpc.ts/cli
Description: CLI package for @grpc.ts to generate typing for TypeScript
Author: Alpha
Latest version: 1.2.4

A CLI to generate TypeScript typings from protobuf for gRPC.

This package is for supporting `@grpc.ts` packages.

# Install

```sh
npm install --save-dev @grpc.ts/cli @grpc.ts/core

# or

yarn add -D @grpc.ts/cli @grpc.ts/core

# or

pnpm add -D @grpc.ts/cli @grpc.ts/core
```

# Usage

- Create config file `grpc-cli.ts`

```ts
import type { IConfigProps } from '@grpc.ts/cli';

const config: IConfigProps = {
  paths: ['../proto/*.proto'],
  external: ['google.protobuf'],
};

export default config;
```

- Run script

```sh
pnpm gen-grpc-typing
```

Default output will be `protobufTypings`. Change `output` option to specify the folder you want to store the typing files.

# TODO

[ x ] Support generate typing as monorepo project

[ ] Support `rollup` engine for monorepo config

[ ] Read prettier config from project
npm package: @grpc.ts/fastify-client
Description: Fastify package for client
Author: Alpha
Latest version: 1.1.2

Fastify's Plugin for gRPC Client.

# Install

```sh
npm install --save @grpc.ts/fastify-client

# or

yarn add @grpc.ts/fastify-client

# or

pnpm add @grpc.ts/fastify-client
```

# Usage

```proto
// example.proto

syntax = "proto3";

import "google/protobuf/timestamp.proto";

package example.v1;

message Message {
  string message = 1;
  google.protobuf.Timestamp created_at = 2;
}

message SendMessageRequest {
  string message = 1;
  google.protobuf.Timestamp created_at = 2;
}

message GetMessageResponse { Message message = 1; }

service ExampleService {
  rpc SendMessage(SendMessageRequest) returns (GetMessageResponse);
}
```

In fastify

```ts
import Fastify from 'fastify';
import detect from 'detect-port';
import FastifyGrpcClient, { createMetadata } from '@grpc.ts/fastify-client';

const fastify = Fastify({
  logger: process.env.NODE_ENV === 'production' ? false : true,
});

async function bootstrap(): Promise<typeof fastify> {
  fastify.register(FastifyGrpcClient, {
    url: 'localhost:3010',
    package: [
      {
        packageName: 'example.v1',
        protoPath: '../proto/example.proto',
      },
      {
        packageName: 'example2.v1',
        protoPath: '../proto/example2.proto',
      },
      {
        protoPath: '../proto/example3.proto',
      },
    ],
    packageDefinitionOptions: {
      oneofs: true,
      longs: String,
      enums: String,
      defaults: true,
    },
    options: {
      keepaliveTimeMs: 5_000,
    },
  });

  const port = await detect(3_000);
  await fastify.listen({
    port,
  });

  const result = await fastify.grpcClient
    .getService('ExampleService')
    .sendMessage(
      { message: 'hello', createdAt: dateToGrpcTimestamp(new Date()) },
      createMetadata({
        meta: 'test',
      }),
    );

  console.log(result);

  return fastify;
}

bootstrap();
```

# TODO

- [ ] Support Client Streaming Call
- [ ] Support Bidi Streaming Call
npm package: @grpc.ts/fastify-server
Description: Fastify package for server
Author: Alpha
Latest version: 1.1.5

Fastify's Plugin for Server.

# Install

```sh
npm install --save @grpc.ts/fastify-server

# or

yarn add @grpc.ts/fastify-server

# or

pnpm add @grpc.ts/fastify-server
```

# Usage

```proto
// example.proto

syntax = "proto3";

import "google/protobuf/timestamp.proto";

package example.v1;

message Message {
  string message = 1;
  google.protobuf.Timestamp created_at = 2;
}

message SendMessageRequest {
  string message = 1;
  google.protobuf.Timestamp created_at = 2;
}

message GetMessageResponse { Message message = 1; }

service ExampleService {
  rpc SendMessage(SendMessageRequest) returns (GetMessageResponse);
}
```

In fastify

```ts
import Fastify from 'fastify';
import detect from 'detect-port';
import FastifyGrpcServer, {
  dateToGrpcTimestamp,
} from '@grpc.ts/fastify-server';

const fastify = Fastify({
  logger: process.env.NODE_ENV === 'production' ? false : true,
});

async function bootstrap(): Promise<typeof fastify> {
  fastify.register(FastifyGrpcServer, {
    url: 'localhost:3010',
    package: [
      {
        packageName: 'example.v1',
        protoPath: '../proto/example.proto',
      },
      {
        packageName: 'example2.v1',
        protoPath: '../proto/example2.proto',
      },
      {
        protoPath: '../proto/example3.proto',
      },
    ],
    packageDefinitionOptions: {
      oneofs: true,
      longs: String,
      enums: String,
      defaults: true,
    },
    options: {
      keepaliveTimeMs: 5_000,
    },
  });

  const port = await detect(3_000);
  await fastify.listen({
    port,
  });

  fastify.grpcServer
    .getServer()
    .addUnaryHandler('ExampleService', 'sendMessage', (request, metadata) => {
      console.log(request);
      console.log(metadata);
      return {
        message: {
          message: 'hola',
          createdAt: dateToGrpcTimestamp(new Date()),
        },
      };
    });

  return fastify;
}

bootstrap();
```

# TODO

- [ ] Support Server Streaming Call
- [ ] Support Bidi Streaming Call
npm package: @grpc.ts/nestjs-client
Description: NestJS package for client
Author: Alpha
Latest version: 1.0.6

NestJS's Dynamic Module for Client.

# Install

```sh
npm install --save @grpc.ts/nestjs-client

# or

yarn add @grpc.ts/nestjs-client

# or

pnpm add @grpc.ts/nestjs-client
```

# Usage

```proto
// example.proto

syntax = "proto3";

import "google/protobuf/timestamp.proto";

package example.v1;

message Message {
  string message = 1;
  google.protobuf.Timestamp created_at = 2;
}

message SendMessageRequest {
  string message = 1;
  google.protobuf.Timestamp created_at = 2;
}

message GetMessageResponse { Message message = 1; }

service ExampleService {
  rpc SendMessage(SendMessageRequest) returns (GetMessageResponse);
}
```

In NestJS

```ts
// client.module.ts
import { Module } from '@nestjs/common';
import { GrpcClient } from '@grpc.ts/nestjs-client';

import { ClientController } from './client.controller';

@Module({
  imports: [
    GrpcClient.register([
      {
        url: 'localhost:3010',
        package: [
          {
            packageName: 'example.v1',
            protoPath: '../proto/example.proto',
          },
          {
            packageName: 'example2.v1',
            protoPath: '../proto/example2.proto',
          },
          {
            protoPath: '../proto/example3.proto',
          },
        ],
        packageDefinitionOptions: {
          oneofs: true,
          longs: String,
          enums: String,
          defaults: true,
        },
        options: {
          keepaliveTimeMs: 5_000,
        },
      },
    ]),
  ],
  controllers: [ClientController],
})
export class ClientModule {}
```

```ts
// client.controller.ts
import { Controller, Get } from '@nestjs/common';
import {
  GrpcService,
  createMetadata,
  dateToGrpcTimestamp,
} from '@grpc.ts/nestjs-client';

@Controller('/client')
export class ClientController {
  constructor(
    @GrpcService({
      serviceName: 'ExampleService',
    })
    private readonly exampleService: any,
  ) {}

  @Get()
  public async sendMessage(): Promise<string> {
    this.exampleService
      .sendMessage(
        { message: 'hello', createdAt: dateToGrpcTimestamp(new Date()) },
        createMetadata({
          meta: 'test',
        }),
      )
      .then((data) => {
        console.log(data);
      })
      .catch((err) => {
        console.log(err);
      });

    return 'Ok!';
  }
}
```
npm package: @grpc.ts/nestjs-server
Description: NestJS package for server
Author: Alpha
Latest version: 1.0.7

NestJS's Dynamic Module for Server.

# Install

```sh
npm install --save @grpc.ts/nestjs-server

# or

yarn add @grpc.ts/nestjs-server

# or

pnpm add @grpc.ts/nestjs-server
```

# Usage

```proto
// example.proto

syntax = "proto3";

import "google/protobuf/timestamp.proto";

package example.v1;

message Message {
  string message = 1;
  google.protobuf.Timestamp created_at = 2;
}

message SendMessageRequest {
  string message = 1;
  google.protobuf.Timestamp created_at = 2;
}

message GetMessageResponse { Message message = 1; }

service ExampleService {
  rpc SendMessage(SendMessageRequest) returns (GetMessageResponse);
}
```

In NestJS

```ts
// main.ts
import detect from 'detect-port';
import { NestFactory } from '@nestjs/core';
import { GrpcServer } from '@grpc.ts/nestjs-server';

import { AppModule } from './app.module';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);

  app.connectMicroservice(
    GrpcServer.createService([
      {
        url: 'localhost:3010',
        package: [
          {
            packageName: 'example.v1',
            protoPath: '../proto/example.proto',
          },
          {
            packageName: 'example2.v1',
            protoPath: '../proto/example2.proto',
          },
          {
            protoPath: '../proto/example3.proto',
          },
        ],
        packageDefinitionOptions: {
          oneofs: true,
          longs: String,
          enums: String,
          defaults: true,
        },
        options: {
          keepaliveTimeMs: 5_000,
        },
      },
    ]),
  );

  const port = await detect(3_000);
  await app.startAllMicroservices();
  await app.listen(port);

  console.log(`Run on ${port}`);
}

bootstrap();
```

```ts
// server.ts
import { Controller } from '@nestjs/common';
import {
  GrpcUnaryMethod,
  dateToGrpcTimestamp,
  type Metadata,
  type Timestamp,
  type ServerUnaryCall,
} from '@grpc.ts/nestjs-server';

@Controller()
export class ServerController {
  @GrpcUnaryMethod({
    serviceName: 'ExampleService',
  })
  public async sendMessage(
    request: unknown,
    metadata: Metadata,
    call: ServerUnaryCall<unknown, unknown>,
  ): Promise<{
    message: {
      message: string;
      createdAt: Timestamp.AsObject;
    };
  }> {
    console.log('request', request);
    console.log('metadata', metadata);
    console.log('call', call);

    return {
      message: {
        message: 'hola',
        createdAt: dateToGrpcTimestamp(new Date()),
      },
    };
  }
}
```