open-index/open-npm huggingface dataset:
npm package: @schamane/component-container
Description: create your container with components
Author: Nazar Kulyk
Latest version: 1.0.6

# Container and component typescript library

create your container with components

## How to use

```
npm install @schamane/component-container
```

Start using package in your code like that

```ts
import { Container } from '@schamane/component-container';

const cont =  new Container();
console.log(cont.getAllComponents());
```

## Documentation

Use Component as base class to extend it for own needs. As example create container for holding string.

```ts
import { Component } from '@schamane/component-container';

export class StringComponent<T extends string> extends Component {
  protected prop: T;

  public constructor(item?: T) {
    super(StringComponent);
    this.prop = item || undefined;
  }

  public get(): T {
    return this.prop;
  }

  public set(value: T): void {
    this.prop = value;
  }
}
```

Now create Container

```ts
import { Container } from '@schamane/component-container';
import { StringComponent } from './stringComponent';

const cont =  new Container();
cont.addComponent(new StringComponent('testItem1'));
cont.addComponent(new StringComponent('testItem2'));

console.log(cont.getAllComponents());
```

Now you can create one more complex container. Add it to your container. Than you can use getComponent and getComponents.

```ts
console.log(cont.getComponent(StringComponent));
```

This will returns you first found component from container by Type.
npm package: @schamane/graphql-auth
Description: Some middleware and methods used to make grapqhl authentications
Latest version: 1.0.0

# Graphql Auth support

Some middleware and methods used to make grapqhl authentications

## TODO

Add support for WS and grapqhl-subscription authentications

## Basic Usage

Install package

```bash
npm i @schamane/graphql-auth
```
npm package: @schamane/graphql-defs
Description: ## Use schema definitions
Latest version: 1.0.3

# Graphql Defs

## Use schema definitions

Add package to your project dependancies

```bash
npm i @schamane/graphql-defs
```

Add exports to your shema index.ts

```typescript
export { SorterScalarSchema, FilterScalarSchema, FilterValueScalarSchema } from '@schamane/graphql-defs';
```

## Example

Use Filters and Sorters with Query

```grapqhl
extend type Query {
    testFilters(filters: [Filter], sort: Sorter): [FilterEntity]!
}
```

Use it in your resolver implementation

```typescript
import { defaultSorter, Filter, Sorter } from '@schamane/graphql-defs';

list(filters: Filter[], sort: Sorter): FilterEntity[] {
    console.log(filters, sort);
    if (sort) {
      console.log('do sort', defaultSorter(this.data, sort));
      return defaultSorter(this.data, sort);
    }
    return this.data;
  }
```
npm package: @schamane/graphql-middleware
Description: @schamane/graphql-middleware
Latest version: 3.3.3

# Graphql Middleware

@schamane/graphql-middleware

middleware for [Apollo grapqhl server](https://www.apollographql.com/docs/apollo-server/) => 3.3.0 with websocket support for subscriptions based on express/polka

## Todo

- Authentication get working for context with WS and Graphql (typings)

## Add dependancy to project

```bash
npm i @schamane/@schamane/graphql-middleware
```

## Define app middleware

```ts
import { ApolloServer } from 'apollo-server-express';
import { TestBL } from '../bl/test';
import * as schemasDefs from '../schemas';
import { makeSchema, createGraphQlServer, initSubscriptionWSWihtCompatibility, DataSources, GrapqhContext } from '@schamane/graphql-middleware';
import type { Server } from 'http';


const schema = makeSchema(schemasDefs as any) as any;

const createDataSources = (): DataSources<GrapqhContext> => ({
  testApi: new TestBL()
});

export const initGraphQl = async (app: any): Promise<ApolloServer> => {
  const dataSources = createDataSources;

  const graphqlServer = createGraphQlServer(app, {
    schema,
    dataSources,
  }, {path: `/graphql`,});

  return graphqlServer;
};

export const initSubscriptions = (server: Server) => {
  const schema = makeSchema(schemasDefs as any) as any;
  return initSubscriptionWSWihtCompatibility(server, schema);
}
```

## Use middleware with express

```ts
import express, { Application } from 'express';

const PORT: string = process.env.PORT || '8081';

const app: Application = express();

const serverInitialize = async () => {
    app.get('/', (_, res) => {
    res.send({ msg: 'set api version for request' });
  });

  await initGraphQl(app);
  const server = app.listen(PORT, async () => {
    initSubscriptions(server);
    console.info(`Listening to port ${PORT}`);
  });
  return server;
};

export const server = serverInitialize();

```

## Use middleware with polka

```ts
import polka from 'polka';
import type { Polka } from 'polka';

const PORT: string = process.env.PORT || '8081';

const app: Polka = polka();

const serverInitialize = async () => {
    app.get('/', (_, res) => {
    res.send({ msg: 'set api version for request' });
  });

  await initGraphQl(app as any);
  const server = app.listen(PORT, async () => {
    initSubscriptions(server);
    console.info(`Listening to port ${PORT}`);
  }).server;
  return server;
};

export const server = serverInitialize();
```
npm package: @schamane/serial-exec
Description: Serial execution of asynchronouse functions for javascript
Author: Nazar Kulyk
Latest version: 2.0.2

# serialExec

[![CI][ci-image]][ci-url]
[![npm version][npm-image]][npm-url]
[![install size][install-size-image]][install-size-url]
[![downloads][download-badge]][npm-url]

> Serial execution of asynchronouse functions for javascript with zero dependancies.

Use this if serial execution of anychronouse code should be implemented.

Let say you will execute HTTP request with different values not in parallel, but waiting on request is done, and also be abble to break execution.

Package can be used als commonjs or esm module

## Breaking API changes for v2

> Note

We made api changes to package since v1.0, please use "single" tag on npm to use older version

```bash
npm install @schamane/serial-exec:single
```

## Usage

There are two methods that can be used to serial execution of promises

- all
- overParams

```typescript
  async all(list: wrapedFunction[]): Promise<T[]>;
```

```typescript
  async overParams(params: any[], fn: Function): Promise<T[]>;
```

### Usage example for all

```javascript
import { all, useSerialExec } from '@schamane/serial-exec';

const delay = async (ms) => new Promise((resolve) => setTimeout(resolve, ms));

const asyncFn = useSerialExec(async (breakFn, ms) => {
  if (ms > 300) {
    return breakFn();
  }
  console.log(`fn ${ms} start`);
  await delay(ms);
  console.log(`fn ${ms} done`);
  return ms + 1;
});

await all([asyncFn(100), asyncFn(200), asyncFn(400), asyncFn(1000)]);
```

### Usage example for overParams

```javascript
import { overParams } from '@schamane/serial-exec';

const delay = async (ms) => new Promise((resolve) => setTimeout(resolve, ms));

const asyncFn = async (ms, breakFn) => {
  if (ms > 300) {
    return breakFn();
  }
  console.log(`fn ${ms} start`);
  await delay(ms);
  console.log(`fn ${ms} done`);
  return ms + 1;
};

await overParams([100, 200, 400, 1000], asyncFn);
```

## License

[MIT](LICENSE.md)

[npm-url]: https://npmjs.org/package/@schamane/serial-exec
[npm-image]: https://img.shields.io/npm/v/@schamane/serial-exec.svg
[download-badge]: http://img.shields.io/npm/dm/@schamane/serial-exec.svg
[install-size-image]: https://packagephobia.com/badge?p=%40schamane%2Fserial-exec
[install-size-url]: https://packagephobia.now.sh/result?p=%40schamane%2Fserial-exec
[ci-image]: https://github.com/schamane/serialExec/actions/workflows/checkcode.yml/badge.svg?branch=main
[ci-url]: https://github.com/schamane/serialExec/actions
npm package: @schamane/small-graphql-mongoose-middleware
Description: ![Check Code](https://github.com/schamane/small-graphql-mongoose-middleware/workflows/Check%20Code/badge.svg)
Author: Nazar Kulyk
Latest version: 1.1.0

# small-graphql-mongoose-middleware

![Check Code](https://github.com/schamane/small-graphql-mongoose-middleware/workflows/Check%20Code/badge.svg)

Custom Middleware, helpers for some basic grapqhl stuff...
npm package: @schascha/eslint-config
Description: Just a custom eslint config
Author: Sascha Künstler
Latest version: 0.3.0

# eslint-config

[![Build](https://github.com/Schascha/eslint-config/workflows/Build/badge.svg)](https://github.com/Schascha/eslint-config/actions)
[![npm](https://img.shields.io/npm/v/@schascha/eslint-config)](https://www.npmjs.com/package/@schascha/eslint-config)
[![install size](https://packagephobia.com/badge?p=@schascha/eslint-config)](https://packagephobia.com/result?p=@schascha/eslint-config)

> Just a custom eslint config

## Installation

[npm](https://www.npmjs.com/package/@schascha/eslint-config)

```
npm install @schascha/eslint-config --save-dev
```

### Usage

Set your `eslint` config to:

```
{
  "extends": "@schascha/eslint-config"
}
```

## Bugs? 🐛

Please let me know: https://github.com/Schascha/eslint-config/issues

## Buy me a Coffee ☕

Support this project and [others](https://github.com/Schascha?tab=repositories) via [PayPal](https://www.paypal.me/LosZahlos). Thanks

## License

[MIT](./LICENSE)

Copyright (c) 2021 Sascha Künstler
npm package: @schascha/stylelint-config
Description: Just a custom stylelint config
Author: Sascha Künstler
Latest version: 1.0.0

# stylelint-config

[![Build](https://github.com/Schascha/stylelint-config/workflows/Build/badge.svg)](https://github.com/Schascha/stylelint-config/actions)
[![npm](https://img.shields.io/npm/v/@schascha/stylelint-config)](https://www.npmjs.com/package/@schascha/stylelint-config)

> Just a custom stylelint config

## Installation

[npm](https://www.npmjs.com/package/@schascha/stylelint-config)

```
npm install --save-dev @schascha/stylelint-config stylelint
```

### Usage

Set your `stylelint` config to:

```
{
  "extends": "@schascha/stylelint-config"
}
```

#### TailwindCSS

```
{
  "extends": "@schascha/stylelint-config/tailwindcss"
}
```

## Bugs? :bug:

Please let me know: https://github.com/Schascha/stylelint-config/issues

## Buy me a Coffee :coffee:

Support this project and [others](https://github.com/Schascha?tab=repositories) via [PayPal](https://www.paypal.me/LosZahlos). Thanks

## License

[MIT](./LICENSE)

Copyright (c) 2020 Sascha Künstler
npm package: @schatx/tsconfig
Description: A base TSConfig for working with schatx
Author: ruimve
Latest version: 1.0.3

# `@schatx/tsconfig`

TSConfig for schatx to extend.

Require `Typescript >= 5.0`. `Node -> NodeNext`. `ECMAScript -> ESNext`

## Installation

```sh
npm install --save-dev @scharx/tsconfig
```

## Usage
Add one of avaiable conifgurations to your `tsconfig.json`:

### The Base Configuration

```json
"extends": "@schatx/tsconfig/tsconfig.json"
```

### Configuration for Browser Environment

```json
"extends": "@schatx/tsconfig/tsconfig.dom.json"
```

### Configuration for Node Environments

First install the types for the Node.js version you are targeting, for example:

```shell
npm install @types/node --save-dev
```

and you need to extend the TSConfig:

```json
"extends": "@schatx/tsconfig/tsconfig.node.json"
```

## Emitting Declaration Files

If you are building a library or a component library, you can enable declaration file emitting by also extending `@schatx/tsconfig/tsconfig.lib.json` in your `tsconfig.json`:

```json
"extends": [
  "@schatx/tsconfig/tsconfig.dom.json",
  "@schatx/tsconfig/tsconfig.lib.json"
]
```
npm package: @schau-recycling/email-template
Description: A simple React component to render an e-mail, sent by
Author: Dustin Schau
Latest version: 1.0.0

# email-template

[![Travis][build-badge]][build]
[![npm package][npm-badge]][npm]

A simple React component to render an e-mail, sent by [schau-recycling-email-handler][schau-recycling-email-handler]

![Example email](assets/example.png)

[build-badge]: https://img.shields.io/travis/DSchau/email-template/master.png?style=flat-square
[build]: https://travis-ci.org/DSchau/email-template

[npm-badge]: https://img.shields.io/npm/v/@dschau/email-template.png?style=flat-square
[npm]: https://www.npmjs.org/package/@dschau/email-template

[schau-recycling-email-handler]: https://github.com/dschau/schau-recycling-email-handler
npm package: @schauer/sp-sync
Description: Sync app output directory to SharePoint Site Assets
Author: Matt Schauer
Latest version: 1.0.20

# sp-sync

This is a nodejs app that will sync your output directory from your project on your local computer to SharePoint Site Assets library. Used for speeding up writing javascript apps and pushing it to a SharePoint Library

## Configurations

Example for development environment:

- Create an .env.development file in the root of the project directory.
- If VUE APP: prefix = VUE
- If REACT APP: prefix = REACT

## Edit .env.development file

- add {prefix}\_APP_SITE_ASSETS_RELATIVE_URL=/sites/xxx/siteassets
- add {prefix}\_APP_VERSION=0
- add {prefix}\_APP_WEB_URL=https://yyy.sharepoint.com/sites/xxx
- add {prefix}\_APP_WEB_RELATIVE_URL=/sites/xxx
- add {prefix}\_APP_OUTDIR=./dist
- add {prefix}\_APP_Mode=development

## Edit package.json

- sp-sync --mode development --action stepversion

  - this increments the version # in the .env file

- sp-sync --mode development --action sync

  - this will take the files in the outdir and upload the {prefix}\_APP_SITE_ASSETS_RELATIVE_URL location in the .env file

under scripts for a vue app - example
"build:development": "sp-sync --mode development --action stepversion && vue-cli-service build --mode development && sp-sync --mode development --action sync"

## Installation

    npm install --save-dev @schauer/sp-sync

### Disclaimer

**THIS CODE IS PROVIDED _AS IS_ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**