open-index/open-npm huggingface dataset:
npm package: @northernco/match
Description: A CSS reset by Northern Commerce.
Author: Northern Commerce
Latest version: 1.0.0-beta.3

# Northern Match

A CSS reset by [Northern Commerce](https://www.northern.co/).

## Getting Started

Match can be added to a project by running the following:

```bash
yarn add @northernco/match
```

If using Webpack, you can import and include the reset in your SASS by including the following in your stylesheet:

```scss
@import '~@northernco/match';

@include \match\apply-reset();
```

## Contributing

### Requirements

  * [Docker](https://docs.docker.com/install/linux/docker-ce/ubuntu/)
  * [Docker Compose](https://docs.docker.com/compose/install/)

### Setup

```bash
$ git clone https://github.com/northernco/match.git
$ cp docker-compose.dev.yml docker-compose.override.yml # Update override file as needed
$ docker-compose run node yarn install
```

View the demo page by opening `index.html`.

### Compiling

New assets can be compiled by running:

```bash
$ docker-compose run node yarn build
```

### Linting

Assets can be linted by running:

```bash
$ docker-compose run node yarn lint
```
npm package: @northerneyes/vite-plugin-importus
Description: The faster modularly import plugin for Vite.
Author: northerneyes
Latest version: 1.0.8

# vite-plugin-importus
⚡The faster modularly import plugin, has higher performance, making your coding life easier, smoother, and nicer :)

> refer to [babel-plugin-import](https://github.com/umijs/babel-plugin-import) but support [Vite](https://github.com/vitejs/vite).

> refer to [vite-plugin-import](https://github.com/meowtec/vite-plugin-import) and [vite-plugin-importer](https://github.com/ajuner/vite-plugin-importer) but is faster! `vite-plugin-importus` use [acron](https://github.com/acornjs/acorn) and [es-module-lexer](https://github.com/guybedford/es-module-lexer) to transform codes internally, transform speed can be increased by 90%.

## Install
```
npm i vite-plugin-importus -D
```

## Usage
`vite.config.ts`:

```js
import vitePluginImportus from 'vite-plugin-importus'

const config = {
  plugins: [
    vitePluginImportus([
      {
        libraryName: 'antd',
        libraryDirectory: 'es',
        style: 'css',
      }
    ]),
  ],
}
```

app code:
```javascript
import { Button } from 'antd';
ReactDOM.render(<Button>xxxx</Button>);

      ↓ ↓ ↓ ↓ ↓ ↓

import { Button } from 'antd/es/button/index'
import 'antd-mobile/es/button/style/css'

ReactDOM.render(<Button>xxxx</Button>)
```

## Options

See [babel-plugin-import](https://github.com/umijs/babel-plugin-import#options) for more detail.
npm package: @northernlight/react-page-editor
Description: This is ReactPage's main Component.
Author: Marco Wettstein
Latest version: 2.8.0

# React-Page Editor

This is ReactPage's main Component.

Read the full readme here https://github.com/react-page/react-page

Docs: https://react-page.github.io/docs

Demo: https://react-page.github.io/
npm package: @northernv/config
Description: Northernv Config
Latest version: 2.0.0

# Config

> A configuration manager utilizing [nconf](https://github.com/indexzero/nconf). The claim to fame: casts the incoming process.env strings to their corrisponding default types

## Install

```
yarn install @northernv/config
```

## Usage

```javascript
// config.js
const Config = require('@northernv/config')

const defaults = {
  WWW_URL: 'https://www.example.com',
  IS_AWESOME: true,
  SCORE: 100,
  COLORS: ['red', 'green', 'blue'],
  RATE: 3.5,
}

module.exports = Config(defaults)
```

```javascript
// index.js
const config = require('./config')

// Is cast to a boolean, because the default is a Boolean
config.get('IS_AWESOME') // => true

// Is cast to integer because the default is a integer
config.get('SCORE') // => 100

// Is cast to a float because the default is a float
config.get('RATE') // => 3.5
```

## Sugar

```javascript
// Values can be accessed directly

config.IS_AWESOME // => true

as opposed to the longer way of 

config.get('IS_AWESOME') // => true
```


## Types

* Strings
* Booleans
* Integers
* Floats
* CSV => Array

## NOTES

* Precedence
  1. Environment Variables trump all
  1. `.env` in the root directory takes second
  1. Passed in `defaults` object

* Casting

  All values should have a default in the type they expect to be. For example, if you use a variable string `WWW_URL = 'https://www.example.com'`. You should declare a default value so it knows how to handle incoming environment variables.

* Never store sensitive information in code.
  Instead just use
  ```
  const default = {
    DB_PASSWORD: 'REDACTED'
  }
  ```

* `.env` was deliberately added to git for testing
npm package: @northernv/dataloader
Description: A framework for dataloaders in models
Author: Northern Voyageur, Inc.
Latest version: 1.2.0

## @northernv/dataloader

[![npm](https://img.shields.io/npm/v/@northernv/dataloader.svg?maxAge=2592000)](https://www.npmjs.com/package/@northernv/dataloader)
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitlab.com/shanestillwell/dataloader/raw/master/LICENSE)

## Usage

```
npm install -S @northernv/dataloader;
```

```
yarn add @northernv/dataloader;
```

In your models, that are Javascript classes, include a static function called `loaders` that returns an object of dataloaders

```
class Property {
  static loaders (DataLoader, { db }) {
    const manyPropertyById = new DataLoader(propertyIds => {
      return db('property').whereIn('id', propertyIds)
        .then(rows => propertyIds.map(id => rows.filter(x => x.id === id)))
    })

    const manyPropertyByAssociationId = new DataLoader(associationIds => {
      return db('property').whereIn('property.assocation_id', associationIds)
        .then(rows => associationIds.map(id => rows.filter(x => x.assocationId === id)))
    })

    const onePropertyById = new DataLoader(propertyIds => {
      return db('property').whereIn('id', propertyIds)
        .then(rows => propertyIds.map(id => rows.find(x => x.id === id)))
    })
    return { manyPropertyById, manyPropertyByAssociationId, onePropertyById }
  }
}
```

Each loader should follow the patter `one<ClassName>By<PropertyName>` or `many<ClassName>By<PropertyName>`

In your bootstrapping file

```
const loader = dataloaders('models', { db })

const server = new ApolloServer({
  schema,
  // Create new Dataloaders for each request
  context: ({ req, res }) => new Context({ req, res, db, channel, loaders: loader() }),
  formatError: (error) => {
    Sentry.captureException(error)
    return { ...error, code: get(error, 'originalError.constructor.name', 'Unknown') }
  },
})

```

or you can delay adding the `db` option until runtime


```
// Notice here we do not pass in the run time option `db`
const loader = dataloaders('models')

const server = new ApolloServer({
  schema,
  // Create new Dataloaders for each request
  // Instead we pass in the runtime option `db` here on init
  context: ({ req, res }) => new Context({ req, res, db, channel, loaders: loader({ db }) }),
  formatError: (error) => {
    Sentry.captureException(error)
    return { ...error, code: get(error, 'originalError.constructor.name', 'Unknown') }
  },
})

```


See how we pass in the `model` directory that is relative to the project root and our options. The options will be passed to each of the `loaders` functions


## Notes

* It will throw an error if there are two loaders with the same name, so sticking to the naming convention is important.
* Many loaders use `filter`, while One loaders user `find`
* It assumes that items are loaded from a database
npm package: @northernv/graphql
Description: A framework for graphql processing
Author: Northern Voyageur, Inc.
Latest version: 1.0.1

## @northernv/graphql

[![npm](https://img.shields.io/npm/v/@northernv/dataloader.svg?maxAge=2592000)](https://www.npmjs.com/package/@northernv/dataloader)
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitlab.com/shanestillwell/dataloader/raw/master/LICENSE)

## Usage

```
npm install -S @northernv/graphql;
```

```
yarn add @northernv/graphql;
```
# Schema for ...

## Schema

* Queries and Mutations are in `queries.gql`
* Types are in `types.gql`

## Templates 

The client query/mutation/fragments are held in `/t`. These are used directly by the server when creating contract (integration) tests for the various GQL methods.

## Client GQL files

Run the `npm run build` file to generate the frontend GQL files.

### /static

Files ready to be consumed by React/Vue when using [Apollo GraphQL loader](https://www.apollographql.com/docs/react/recipes/webpack.html)

#### Usage

In Webpack
```
loaders: [
  {
    test: /\.(graphql|gql)$/,
    exclude: /node_modules/,
    loader: 'graphql-tag/loader'
  }
]
```

In the file
```
import Unit from '@northernv/vgql/static/unit.gql'

const { data, errors } = await this.$apollo.query({
  query: Unit,
  variables: {
    input: { ... },
  }
})

```

### /json 
Files ready to be consumed by Apollo, no need for graphql-tag

#### Usage

```
import Unit from '@northernv/vgql/json/unit'

const { data, errors } = await this.$apollo.query({
  query: Unit,
  variables: {
    input: { ... },
  }
})

```

### /gql

Files used with graphql-tag

#### Usage

```
import Unit from '@northernv/vgql/gql/unit'
import gql from 'graphql-tag'

const { data, errors } = await this.$apollo.query({
  query: gql`Unit`,
  variables: {
    input: { ... },
  }
})

```

## Directives

* `@timestamp`: Adds `createdAt`, `updatedAt`, `deletedAt` properties to types `timestamp-directive.js`
In your models, that are Javascript classes, include a static function called `loaders` that returns an object of dataloaders
npm package: @northernv/supermodel
Description: A Base model for Knex
Author: Northern Voyageur, Inc.
Latest version: 1.4.0

## @northernv/supermodel

[![npm](https://img.shields.io/npm/v/@northernv/supermodel.svg?maxAge=2592000)](https://www.npmjs.com/package/@northernv/supermodel)
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitlab.com/shanestillwell/supermodel/raw/master/LICENSE)

Completely inspired by [knex-supermodel](https://www.npmjs.com/package/knex-supermodel), just altered with some personal modifications to meet my needs

## Usage

```
npm install -S @northernv/supermodel;
```

```
yarn add @northernv/supermodel;
```

In your models, that are Javascript classes, just `extend` with the main class

```
const { default: Base } = require('@northernv/supermodel')

class User extends Base {
}
```

## Description

`@northernv/supermodel` is meant to be a very lite but not quite an ORM for knex. This is accomplished by providing a base model that is simply an ES6 class that you extend in your own models. You can override the provided methods or even add to them to make your own. Each method will always return your model back to you!

This package requires ES6 features only available in node 6+.

## Benefits

* Converts camelCase into snake_case for inserts / updates
* Converts snake_case to camelCase automatigically

## Static Examples

Each subclass will have automatic access to static methods to `create`, `fetch`, `collection`, `forge`, `update` and `destroy`, `count`, `getAll`.

```javascript
const { default: Base } = require('@northernv/supermodel')
const knex = require('knex')
const db = knex({ ...knexOptions })

class User extends Base {
  constructor(opts) {
    super(opts);
  }
}

// Note: It converts properties to snake_case
const user = User.create({ fooBar: 'hello', barBaz: 'baz' }, { db });

console.log(user.fooBar); // hello
console.log(user.foo_bar); // hello
console.log(user.barBaz); // baz

```

## Transacting

You may either provide a transacting knex to each method or chain it.

```javascript
let user;

knex.transaction((trx) => {
  User.fetch({ id: '123' }, { db: trx })
    .then((u) => {
      user = u;

      return user.update({ foo: 'baz' });
    });
});
```

## License

This software is licensed under [the MIT license](LICENSE.md).
npm package: @northflank/cli
Description: Provides a command-line interface to the Northflank platform.
Author: Marco Suter
Latest version: 0.11.5

## Northflank CLI
Provides a command-line interface (CLI) to the Northflank platform.

*Visit our website [www.northflank.com](https://www.northflank.com)*

*Full documentation on [https://northflank.com/docs/v1/api/use-the-cli](https://northflank.com/docs/v1/api/use-the-cli)*

*Also use the Northflank js-client: [https://www.npmjs.com/package/@northflank/js-client](https://www.npmjs.com/package/@northflank/js-client)*

Please don’t hesitate to get in touch with us if you have a query or want to
give some feedback on [https://northflank.com/contact](https://northflank.com/contact)
or email us at [contact@northflank.com](mailto:contact@northflank.com).

### Installation

Install with 
```npm i @northflank/cli -g``` or ```yarn global add @northflank/cli```.

This allows to use the CLI globally from the command line.

> To use without installation, run `npx @northflank/cli`

### Usage
The command `northflank help` provides useful information in navigating the various commands
of the CLI.

#### Login
Run the login command to connect the CLI to your northflank account: 
> `northflank login`<br />

You will be asked to provide an API token. The token can be created using the 
Northflank web interface: _Account Settings_ > _API_ > _Tokens_ > _Create API token_. 

This creates a context, which will be used as a default for further use of the CLI. 

Having logged in, the CLI is ready to be used.

#### Examples
- Listing services in a project: ```northflank list services```
- Getting detailed information about a service: ```northflank get service```
- Scaling a service: ```northflank scale service```
- Creating a combined service: ```northflank create service combined```

#### Contexts
Contexts can be used to cache auth info, default projects and services: <br>
- `northflank contexts use project`
- `northflank contexts use service`
- List all context and defaults: `northflank contexts list`
- Switch between contexts: `northflank context use`

#### Forwarding Northflank Services and Addons
Northflank services and addons can be exposed locally using the ```northflank forward``` command.
Examples:
- `sudo northflank forward all`
- `sudo northflank forward addon --addonId <addon-id>`
- `sudo northflank forward service --serviceId <service-id>`

__Please note that this command requires root/admin privilges__

#### Interactive Mode
The CLI will ask for the required information when executing a command if the information 
is not provided by command line arguments or input files. This is done in a beginner-friendly
question-answer style of interacting and allows for CLI exploration. 

After having provided all required information, the user can choose to run through 
the questions again or edit the final command payload for full flexibility. 
The request can also be saved to a file and be used in the future using the 
```--file <file-path>``` flag.