open-index/open-npm huggingface dataset:
npm package: @getstation/apollo-link-reactive-schema
Description: Apollo Link that provides a reactive-graphql execution environment to perform operations on a provided reactive schema.
Latest version: 2.0.0

# Difference with apollo-link-reactive-schema
Requires `@getstation/reactive-schema` instead of `reactive-schema`.

See differences with [`mesosphere/reactive-graphql](https://github.com/getstation/reactive-graphql#differences-with-mesospherereactive-graphql)

# apollo-link-reactive-schema
> Apollo Link that provides a [reactive-graphql execution environment](https://github.com/mesosphere/reactive-graphql) to perform operations on a provided reactive schema.

## Installation

`npm install apollo-link-reactive-schema --save`

## Usage

```js
import { ApolloClient } from 'apollo-client';
import { from } from 'rxjs';
import { InMemoryCache } from 'apollo-cache-inmemory';
import { ReactiveSchemaLink } from 'apollo-link-reactive-schema';
import { gql } from 'graphql-tag';

import schema from './path/to/your/schema';

const graphqlClient = new ApolloClient({
  cache: new InMemoryCache(),
  link: new ReactiveSchemaLink({ schema }),
});

const query = gql`
  # don't forget the @live directive, otherwise you'll experience
  # difficulties with subscription>unsubscription>subscription
  query @live {
    someReactiveField
  }
`;

const $res = graphqlClient.watchQuery({ query });
$res.subscribe(res => console.log(res));
```

### Options

The `ReactiveSchemaLink` constructor can be called with an object with the following properties:

* `schema`: an executable graphql schema
* `context`: an object passed to the resolvers, following the [graphql specification](http://graphql.org/learn/execution/#root-fields-resolvers) or a function that accepts the operation and returns the resolver context.
npm package: @getstation/authentication
Description: Station login page
Author: Joël Charles
Latest version: 0.1.0

# Station Authentication

auth.getstation.com website.

[![Netlify Status](https://api.netlify.com/api/v1/badges/73613984-df80-46ee-a8aa-b819f0c130d8/deploy-status)](https://app.netlify.com/sites/station-auth/deploys)

## Development

### Setup
- Clone this repository
- Run `yarn` to install dependencies
- Create a `.env` file with a unique `ENVKEY` generated through [EnvKey App](https://www.envkey.com/)
- Run `yarn start` to start the dev server

### Commands
`yarn start` will start the development server.

`yarn run storybook` will start the [Storybook server](https://storybook.js.org/).

## Deployment

`master` is deployed on `auth.getstation.com` with [Netlify](https://app.netlify.com/sites/station-auth/deploys).
npm package: @getstation/authentication-ui
Description: Station authentcation UI
Author: Joël Charles
Latest version: 1.0.2

# Station Authentication

[auth.getstation.com](https://auth.getstation.com) website and [`@getstation/authentication-ui` package](https://www.npmjs.com/package/@getstation/authentication-ui).

[![Netlify Status](https://api.netlify.com/api/v1/badges/73613984-df80-46ee-a8aa-b819f0c130d8/deploy-status)](https://app.netlify.com/sites/station-auth/deploys)

[![npm version](https://badge.fury.io/js/%40getstation%2Fauthentication-ui.svg)](https://badge.fury.io/js/%40getstation%2Fauthentication-ui)

## Package usage
```
$ yarn add @getstation/authentication-ui
```

```tsx
import { ProvidedAuthenticationBox } from '@getstation/authentication-ui';

<ProvidedAuthenticationBox
  apiGQLEndpoint={process.env.GRAPHQL_URI}
  firebaseConfig={{
    apiKey: process.env.FIREBASE_API_KEY,
    authDomain: process.env.FIREBASE_AUTH_DOMAIN,
  }}
  allowSignUp={false}
  onAuthenticated={this.props.onAuthenticated}
/>
```

## Development

### Setup
- Clone this repository
- Run `yarn` to install dependencies
- Create a `.env` file with a unique `ENVKEY` generated through [EnvKey App](https://www.envkey.com/)
- Run `yarn start` to start the dev server

### Commands
`yarn start` will start the development server.

`yarn run storybook` will start the [Storybook server](https://storybook.js.org/).

`yarn run build:package` will build the published package.

## Deployment

### Website

`master` is deployed on `auth.getstation.com` with [Netlify](https://app.netlify.com/sites/station-auth/deploys).

`master` is deployed on `auth-dev.getstation.com` with development environement (Firebase Dev) with [Netlify](https://app.netlify.com/sites/station-auth-dev/deploys). [![Netlify Status](https://api.netlify.com/api/v1/badges/2957e020-405a-4a63-8dcd-26356674f9f0/deploy-status)](https://app.netlify.com/sites/station-auth-dev/deploys)

### Package
The source code is transpiled thru babel and is published with `src/package/index` as entry point.
npm package: @getstation/electron-compilers
Description: Compiler implementations for electron-compile
Author: Paul Betts
Latest version: 5.10.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

## electron-compilers

<a href="http://electron.github.io/electron-compilers/docs">
![](http://electron.github.io/electron-compilers/docs/badge.svg)
</a>

electron-compilers are the actual implementations of classes that power
[electron-compile](https://github.com/electron/electron-compile)

For JavaScript:

* JavaScript ES6/ES7 (via Babel)
* TypeScript
* CoffeeScript
* GraphQL

For CSS:

* LESS
* Stylus (with optional nib)

For HTML:

* Jade

For JSON:

* CSON

### Why is this a separate repo?!

Shipping compilers for all of these languages will add a ton of weight to your
download size. Making this a separate top-level module allows you to mark it
as a `devDependency` and not include it in the final app.
npm package: @getstation/electron-google-oauth2
Description: A Google OAuth2 module for your Electron app.
Author: Joël Charles
Latest version: 14.0.0

# @getstation/electron-google-oauth2
> Library that manages Google OAuth2 authentication for your [Electron](http://electron.atom.io) app.

## Install
```
// npm
$ npm install --save @getstation/electron-google-oauth2
// yarn
$ yarn add @getstation/electron-google-oauth2
```

## Usage

### Access Token
```typescript
import ElectronGoogleOAuth2 from '@getstation/electron-google-oauth2';

app.on('ready', () => {
  const myApiOauth = new ElectronGoogleOAuth2(
    'CLIENT_ID',
    'CLIENT_SECRET',
    ['https://www.googleapis.com/auth/drive.metadata.readonly']
  );

  myApiOauth.openAuthWindowAndGetTokens()
    .then(token => {
      // use your token.access_token
    });
});
```

### Refresh Token
```typescript
import ElectronGoogleOAuth2 from '@getstation/electron-google-oauth2';

app.on('ready', () => {
  const myApiOauth = new ElectronGoogleOAuth2(
    'CLIENT_ID',
    'CLIENT_SECRET',
    ['https://www.googleapis.com/auth/drive.metadata.readonly']
  );
  
  const refreshToken = \\ Read the saved refresh token
  
  if(refreshToken) {
    myApiOauth.setTokens({ refresh_token: refreshToken });
  } else {
    myApiOauth.openAuthWindowAndGetTokens()
      .then(token => {
        // save the token.refresh_token secured to use it the next time the app loading
        // use your token.access_token
      });
  }
});
```

### Use custom successRedirectURL
```js
const myApiOauth = new ElectronGoogleOAuth2(
  'CLIENT_ID',
  'CLIENT_SECRET',
  ['https://www.googleapis.com/auth/drive.metadata.readonly']
  { successRedirectURL: 'https://google.com' },
);
```

### Requires with plain JavaScript

```js
const ElectronGoogleOAuth2 = require('@getstation/electron-google-oauth2').default;
new ElectronGoogleOAuth2(CLIENT_ID, CLIENT_SECRET, SCOPES_LIST);
```

## License
MIT
npm package: @getstation/electron-prebuilt-compile
Description: electron-prebuilt that automatically understands Babel + React + LESS
Author: Paul Betts
Latest version: 6.0.0

# electron-prebuilt-compile

electron-prebuilt-compile is a drop-in replacement for [electron-prebuilt](https://github.com/mafintosh/electron-prebuilt) that natively understands ES6 + React + LESS + some other languages, powered by [electron-compile](https://github.com/electronjs/electron-compile).

## Installation

Download and install the latest build of electron for your OS and add it to your projects `package.json` as a `devDependency`:

```
npm install electron-prebuilt-compile --save-dev
```

Now you can just run `electron` to run electron:

```
electron
```

Electron will now understand ES6/ES7 and React components out-of-the-box, even in inline HTML:

```html
<head>
  <link rel="stylesheet" type="text/less" href="main.less" />
</head>

<body id="host">
  <script type="application/javascript">
  import React from 'react';
  import ReactDOM from 'react-dom';
  import TodoApp from './components/TodoApp';
  
  ReactDOM.render(React.createComponent(TodoApp), document.getElementById('host'));
  </script>
</body>
</html>
```
npm package: @getstation/electron-process-reporter
Description: Utility to extract interesting process reports of an Electron application.
Latest version: 2.0.0

# electron-process-reporter
Utility to extract interesting process reports of an Electron application.

## Installation 
```bash
$ npm install --save electron-process-reporter
```

## Usage

### onExtendedProcessMetrics
Returns an Rx.Observable that emits reports of `ExtendedProcessMetric` every `options.samplingInterval` ms.
```js
import { app } from 'electron';
import { onExtendedProcessMetrics } from 'electron-process-reporter';

onExtendedProcessMetrics(app, { samplingInterval: 1000 }) // returns a rx.Observable
  .subscribe(report => console.log(report))
```

### onExcessiveCPUUsage
Will emit `ExtendedProcessMetric[]` when a process exceeds the `options.percentCPUUsageThreshold` on more than `options.samplesCount` samples.
```js
import { app } from 'electron';
import { onExcessiveCPUUsage } from 'electron-process-reporter';

onExcessiveCPUUsage(
  app,
  {
    samplesCount: 1,
    percentCPUUsageThreshold: 90,
  }) // returns a rx.Observable
  .subscribe(report => console.log(report))
```

### onProcessTreeMetricsForPid
Returns an Rx.Observable that emits `PidUsage[]` every `options.samplingInterval` ms.
```js
import { onProcessTreeMetricsForPid } from 'electron-process-reporter';

onProcessTreeMetricsForPid(process.pid, { samplingInterval: 1000 }) // returns a rx.Observable
  .subscribe(report => console.log(report))
```

### onExcessiveCPUUsageInProcessTree
Will emit `PidUsage[]` when a process of the tree exceeds the `options.percentCPUUsageThreshold` on more than `options.samplesCount` samples.
```js
import { onExcessiveCPUUsageInProcessTree } from 'electron-process-reporter';

onExcessiveCPUUsageInProcessTree(
  process.pid, // in the main process
  {
    samplesCount: 1,
    percentCPUUsageThreshold: 90,
  }) // returns a rx.Observable
  .subscribe(report => console.log(report))
```
npm package: @getstation/electron-spellchecker
Description: Implement spellchecking, correctly
Latest version: 4.1.0

# electron-spellchecker
⚠️ 3.x versions are only compatible with Electron >= 5

![](https://img.shields.io/npm/dm/electron-spellchecker.svg) <a href="https://electron-userland.github.io/electron-spellchecker/docs">![](https://electron-userland.github.io/electron-spellchecker/docs/badge.svg)</a>

electron-spellchecker is a library to help you implement spellchecking in your Electron applications, as well as handle default right-click Context Menus (since spell checking shows up in them).  This library intends to solve the problem of spellchecking in a production-ready, international-friendly way.

electron-spellchecker:

* Spell checks in all of the languages that Google Chrome supports by reusing its dictionaries.
* Automatically detects the language the user is typing in and silently switches on the fly.
* Handles locale correctly and automatically (i.e. users who are from Australia should not be corrected for 'colour', but US English speakers should)
* Automatically downloads and manages dictionaries in the background.
* Checks very quickly, doesn't introduce input lag which is extremely noticable
* Only loads one Dictionary at a time which saves a significant amount of memory

## Quick Start

```js
import {SpellCheckHandler, ContextMenuListener, ContextMenuBuilder} from 'electron-spellchecker';

window.spellCheckHandler = new SpellCheckHandler();
window.spellCheckHandler.attachToInput();

// Start off as US English, America #1 (lol)
window.spellCheckHandler.switchLanguage('en-US');

let contextMenuBuilder = new ContextMenuBuilder(window.spellCheckHandler);
let contextMenuListener = new ContextMenuListener((info) => {
  contextMenuBuilder.showPopupMenu(info);
});
```

## Language Auto-Detection

The spell checker will attempt to automatically check the language that the user is typing in and switch on-the fly. However, giving it an explicit hint by calling `switchLanguage`, or providing it a block of sample text via `provideHintText` will result in much better results.

Sample text should be text that is reasonably likely to be in the same language as the user typing - for example, in an Email reply box, the original Email text would be a great sample, or in the case of Slack, the existing channel messages are used as the sample text.

## About node-spellchecker

This module uses a fork of Atom's excellent `node-spellchecker` that takes a slightly different path on Windows by using Hunspell only. You can find the source [here](https://github.com/felixrieseberg/node-spellchecker).

## Learning more

* Run `npm start` to start [the example application](https://github.com/electron-userland/electron-spellchecker/tree/master/example) and play around.
* Read [the class documentation](https://electron-userland.github.io/electron-spellchecker/docs/) to learn more.
npm package: @getstation/express-to-koa
Description: Use express middlewares in Koa2, the one that really works.
Author: kaelzhang
Latest version: 1.0.6

[![Build Status](https://travis-ci.org/kaelzhang/express-to-koa.svg?branch=master)](https://travis-ci.org/kaelzhang/express-to-koa)
[![NPM version](https://img.shields.io/npm/v/express-to-koa.svg)](https://www.npmjs.com/package/express-to-koa)
<!-- optional appveyor tst
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/kaelzhang/express-to-koa?branch=master&svg=true)](https://ci.appveyor.com/project/kaelzhang/express-to-koa)
-->
<!-- optional npm downloads
[![npm module downloads per month](http://img.shields.io/npm/dm/express-to-koa.svg)](https://www.npmjs.org/package/express-to-koa)
-->
<!-- optional dependency status
[![Dependency Status](https://david-dm.org/kaelzhang/express-to-koa.svg)](https://david-dm.org/kaelzhang/express-to-koa)
-->

# express-to-koa

Use express middlewares in Koa2 (not support koa1 for now), the one that really works.

- Handle koa2 http status code, which fixes the common issue that we always get 404 with [koa-connect](https://www.npmjs.com/package/koa-connect)

## Usage

```js
const e2k = require('express-to-koa')

// Some express middleware
const devMiddleware = require('webpack-dev-middleware')(compiler, {
  publicPath,
  quiet: true
})

const app = new Koa()
app.use(e2k(devMiddleware))
```

## What Kind of Express Middlewares are Supported?

TL;NR

`express-to-koa` does not support all arbitrary express middlewares, but only for those who only uses **Express-Independent** APIs like `res.write` and `res.end`, i.e. the APIs that node [http.ServerResponse](https://nodejs.org/dist/latest-v7.x/docs/api/http.html#http_class_http_serverresponse) provides.

However, if a middleware uses APIs like `res.send` or something, `express-to-koa` will do far too much work to convert those logic to koa2, which is not easier than creating both express and koa2 from 0 to 1.

So, it is a good practice to write framework-agnostic middlewares or libraries.

## Supported Middlewares

- [webpack-dev-middleware](https://www.npmjs.com/package/webpack-dev-middleware)
- [webpack-hot-middleware](https://www.npmjs.com/package/webpack-hot-middleware)
- Other middlewares which are waiting for you to add to the README. Any contributions are welcome.

## License

MIT
npm package: @getstation/graphql-codegen-typescript-reactive-resolvers
Description: graphql-codegen-cli template for TypeScript typings of reactive resolvers
Latest version: 1.17.10

# TypeScript reactive resolvers for GraphQL code generator
> [GraphQL Code Generator](https://github.com/dotansimha/graphql-code-generator) plugin to generate TypeScript typing of [reactive-graphql](https://github.com/mesosphere/reactive-graphql/) resolvers.

## Installation

`npm install graphql-codegen-typescript-reactive-resolvers --save-dev`

⚠️ It overrides the `resolverTypeWrapperSignature` config

## Usage

Run `gql-gen` as usual with this config:

```
schema: schema.json
overwrite: true
generates:
  ./src/resolvers-types.ts:
    plugins:
      - typescript-common
      - typescript-reactive-resolvers
```

### How does it work

It's almost the same than [typescript-resolvers](https://graphql-code-generator.com/docs/plugins/typescript-resolvers) except that resolvers can return rxjs's Observable.
npm package: @getstation/hookstate-core
Description: The flexible, fast and extendable state management for React that is based on hooks and state usage tracking.
Author: Andrey Konstantinov
Latest version: 3.0.7

<h1 align="center">
  Hookstate
</h1>

<p align="center">
  The simple but very powerful and incredibly fast state management for React that is based on hooks.
</p>
<br/>

<p align="center">
  <a href="https://hookstate.js.org">Why?</a> •
  <a href="https://hookstate.js.org/docs/getting-started">Docs / Samples</a> •
  <a href="https://hookstate.js.org/demo-todolist">Demo application</a> •
  <a href="https://hookstate.js.org/docs/extensions-overview">Plugins</a> •
  <a href="https://hookstate.js.org/blog/tags/releases">Release notes</a>
</p>

<p align="center">
  <a href="./">
    <img src="https://badgen.net/badge/icon/typescript/green?icon=typescript&label">
  </a>
  <a href="https://www.npmjs.com/package/@hookstate/core">
      <img src="https://badgen.net/bundlephobia/minzip/@hookstate/core?label=size&color=green" />
  </a>
  <a href="https://www.npmjs.com/package/@hookstate/core">
    <img src="https://badgen.net/badge/dependencies/none/green" />
  </a>
  <a href="./LICENSE">
    <img src="https://badgen.net/github/license/avkonst/hookstate?color=green" />
  </a>
  <a href="https://travis-ci.org/avkonst/hookstate">
    <img src="https://travis-ci.org/avkonst/hookstate.svg?branch=master" />
  </a>
  <a href="https://codecov.io/gh/avkonst/hookstate">
    <img src="https://codecov.io/gh/avkonst/hookstate/branch/master/graph/badge.svg" />
  </a>
  <a href="https://www.npmjs.com/package/@hookstate/core">
    <img src="https://img.shields.io/npm/v/@hookstate/core.svg?maxAge=300&label=version&colorB=007ec6" />
  </a>
</p>

## Preface

Hookstate is a modern alternative to Redux, Mobx, Formik without boilerplate. It is simple to learn but very flexible to use. It has got impressive performance and predictable behavior.

**Any questions? Just ask by raising a github ticket.**

## Why Hookstate

[hookstate.js.org](https://hookstate.js.org)

## Migrating to version 3

[hookstate.js.org/docs/migrating-to-v3](https://hookstate.js.org/docs/migrating-to-v3)

## Documentation / Code samples

[hookstate.js.org/docs/getting-started](https://hookstate.js.org/docs/getting-started)

## Demo application

[hookstate.js.org/demo-todolist](https://hookstate.js.org/demo-todolist)

## Development tools

[hookstate.js.org/docs/devtools](https://hookstate.js.org/docs/devtools)

## Plugins / Extensions

[hookstate.js.org/docs/extensions-overview](https://hookstate.js.org/docs/extensions-overview)

## API reference

[hookstate.js.org/docs/typedoc-hookstate-core](https://hookstate.js.org/docs/typedoc-hookstate-core)
npm package: @getstation/redux-broadcast-actions
Description: A tiny middleware for redux to share actions through BroadcastChannel API
Author: Joël Charles
Latest version: 1.1.0

# redux-broadcast-actions

A tiny middleware to broadcast your redux actions using the [Broadcast Channel API](https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API).
It can sync actions between tabs, and even between all processes of a [Browser Extension](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions) (background, workers, content scripts, popup, custom pages).
Then you just need to plug all your pure reducers onto all your processes, and you have a state that is synced as simply as possible.

### How to install

Install with npm or yarn
```sh
npm install --save @getstation/redux-broadcast-actions
# or
yarn add @getstation/redux-broadcast-actions
```

### How to use
In all the processes where you need the actions to be dispatched and received, instanciate this middlware:

```ts
import { createStore, applyMiddleware } from 'redux';
import { createBroadcastActionsMiddleware } from '@getstation/redux-broadcast-actions';

const store = createStore(rootReducer, {}, applyMiddleware(
  // broadcast actions to other processes
  createBroadcastActionsMiddleware({
    // name given to BroadcastChannel. Can also be a BroadcastChannel instance
    channel: 'redux_broadcast_actions',
  })
));
```

Then whenever you execute `store.dispatch(...)` in any process, all others are receiving the exact same action.

#### Share initial state
If one of your process acts as a source of truth (server) and other processes (clients) need to ask for its current state to be initialized:

##### Server
```ts
import { createStore, applyMiddleware } from 'redux';
import {
  createBroadcastActionsMiddleware,
  createSendInitialStateMiddleware
} from '@getstation/redux-broadcast-actions';

const store = createStore(rootReducer, {}, applyMiddleware(
  // this middleware listens for clients asking for initial state
  createSendInitialStateMiddleware(),
  createBroadcastActionsMiddleware(),
));
```

##### Client
```ts
import { createStore, applyMiddleware, combineReducers } from 'redux';
import {
  createBroadcastActionsMiddleware,
  createGetInitialStateMiddleware,
  initialStateReducer
} from '@getstation/redux-broadcast-actions';

// add initialStateReducer to the list of reducers
const store = createStore(combineReducers(initialStateReducer, rootReducer), {}, applyMiddleware(
  // ask server for initial state
  // ⚠️ should be the first middleware
  createGetInitialStateMiddleware(),
  createBroadcastActionsMiddleware(),
));
```

#### I do not want to broadcast one or more actions
You can do that. First, by default some events of some libs are not broadcasted (redux-form, redux-persist, and some others, check `shouldForward` function for details).
If you do not want to broadcast one of your action, you can leverage the `meta` property of your action like this:

```ts
dispatch({
  type: 'myAction',
  meta: {
    // this tells the middleware to not broadcast this action
    local: true,
  }
})
```
npm package: @getstation/use-firebase-auth
Description: React hook for Firebase Authentication
Author: ulentini
Latest version: 2.0.5

# use-firebase-auth

> Firebase authentication hook

[![NPM](https://img.shields.io/npm/v/use-firebase-auth.svg)](https://www.npmjs.com/package/use-firebase-auth)

## Install

```bash
npm install --save use-firebase-auth
```

```bash
yarn add use-firebase-auth
```

## Usage

Configure firebase application and pass it to the `FirebaseAuthProvider`.
Wrap the parent component (your app component or any other parent component) with the provider, so that all the children component can share the auth information (user info, loading/error status, etc)

```jsx
import React from "react"
import ReactDOM from "react-dom"
import App from "./components/app"
import { FirebaseAuthProvider } from "use-firebase-auth"
import firebase from "firebase/app"
import "firebase/auth"

const firebaseConfig = {
  //Load your Firebase Project configuration here
}
// Initialize Firebase
firebase.initializeApp(firebaseConfig)

ReactDOM.render(
  <FirebaseAuthProvider firebase={firebase}>
    <App />
  </FirebaseAuthProvider>,
  document.getElementById("root"),
)
```

```jsx
import React, { Component } from "react"

import { useFirebaseAuth } from "use-firebase-auth"

const Example = () => {
  const { user, loading, error, signInWithProvider } = useFirebaseAuth()
  return <div>...</div>
}
```

## Demo

[Live demo](http://use-firebase-auth.netlify.com/)

## License

MIT © [ulentini](https://github.com/ulentini)

---

This hook is created using [create-react-hook](https://github.com/hermanya/create-react-hook).