open-index/open-npm huggingface dataset:
npm package: @jokeyrhyme/typescript-config
Description: my shared TypeScript and TSLint settings
Author: Ron Waldon
Latest version: 1.0.0

# typescript-config [![npm](https://img.shields.io/npm/v/jokeyrhyme/typescript-config.svg?maxAge=2592000)](https://www.npmjs.com/package/jokeyrhyme/typescript-config)

my shared TypeScript and TSLint settings

## What's here?

TSLint settings, inspired by "tslint:recommended", etc,
but stripped of any JavaScript and code-style rules:

- tslint-all-no-style.json
- tslint-latest-no-style.json
- tslint-recommended-no-style.json

## Usage

tslint.json:

```json
{
  "extends": ["@jokeyrhyme/typescript-config/tslint-recommended-no-style"]
}
```

## Why?

The intention here is to include most of their recommendations,
but rely on prettier for automatic code style enforcement.
We don't want TSLint and prettier to contradict each other.

## Development

```
$ npm run build # re-reads from TSLint and regenerates our JSON files
```
npm package: @jokio/apollo-link-state
Description: An easy way to manage local state with Apollo Link
Author: James Baxley
Latest version: 0.0.4

Apollo State Link
---

## What is this?
An Apollo Link to easily manage local state!

**The API of this libray is still in flux, for usage patterns check out the test suite, most importantly the `client` and `advanced` test suite**

## But why?
State management is a problem that nearly every application runs into at some point or another. Application state tends to be a cross of UI interactions and remote data states, this is typically solved by using libraries like [redux]() and [MobX](), but what if you could keep using GraphQL like you do for your remote data. What if you could merge the two together easily?

Now you can! Apollo State Link allows you to declare resolvers for Queries, Mutations, and types (Subscriptions coming) to augment your server schema or create an entirely local one!

## Installation

`npm install apollo-link-state --save`


## Usage
Apollo Link State is an easy way to manage local application state with GraphQL and Apollo. Setting up local state can be done like so:

```js
import { withClientState } from 'apollo-link-state';

const local = withClientState({
  Query: {
    // provide an initial state
    todos: () => [],
  },
  Mutation: {
    // update values in the store on mutations
    addTodo: (_, { message, title }, { cache }) => {
      const current = cache.readQuery({ query, variables });
      const data = {
        todos: current.todos.concat([
          { message, title, __typename: 'Todo' }
        ])
      };
      cache.writeQuery({ query, variables, data });
      return null;
    };
  },
});


// use the local link to create an Apollo Client instance

// usage with query
const query = gql`
  query todos {
    todos @client {
      message
      title
    }
  }
`
const initial = await client.query({ query });
// { data: { todos: [] } }

const mutation = gql`
  mutation addTodo($message: String, $title: String){
    addTodo(message: $message, title: $title) @client
  }
`

// add a todo
client.mutate({
  mutation,
  variables: {
    title: 'hello world',
    message: 'oh what a world this is'
  }
});

const initial = await client.query({ query });
/*
{
  data: {
    todos: [
      { title: 'hello world', message: 'oh what a world this is' }
    ]
  }
}
*/
```

###
npm package: @jokio/datastore
Description: Helper library for Google Cloud Datastore
Author: Jok Entertainers
Latest version: 0.5.4

# Datastore Toolkit

[![Build Status](https://travis-ci.org/jokio/datastore.svg?branch=master)](https://travis-ci.org/jokio/datastore)

[![npm version](https://badge.fury.io/js/%40jokio%2Fdatastore.svg)](https://badge.fury.io/js/%40jokio%2Fdatastore)


## How to use
Simple:
```ts
import { DbSet, configureTransaction, Entity, Datastore } from '@jokio/datastore';

const datastore = new Datastore({});

const db = {
	transaction: configureTransaction(datastore),
	users: new DbSet<UserEntity>('users', datastore),
	accounts: new DbSet<AccountEntity>('accounts', datastore),
};


interface UserEntity extends Entity {
	firstName: string
	lastName: string
}

interface AccountEntity extends Entity {
	currency: string
	amount: number
}
```

OOP Style:
```ts
import { Entity, DbSet, DbContext, Datastore } from '@jokio/datastore';


export default class extends DbContext {
	Users: DbSet<UserEntity>
	Accounts: DbSet<AccountEntity>

	constructor(datastore: Datastore) {
		super(datastore);

		this.Users = new DbSet<UserEntity>('Users', datastore)
		this.Accounts = new DbSet<AccountEntity>('Accounts', datastore)
	}
}


interface UserEntity extends Entity {
	firstName: string
	lastName: string
}

interface AccountEntity extends Entity {
	currency: string
	amount: number
}

...

const db = new DbContext(datastore);
```


DDD Style:
```ts
import { Entity, Aggregate, AggregateResolver, Datastore } from "@jokio/datastore";


// 1. Declare Types
interface UserState extends Entity {
	firstName: string
	lastName: string
	password: string
}

interface RegisterProps {
	firstName: string
	lastName: string
	password: string
}


// 2. Declare Aggregate
class UserAggregate extends Aggregate<UserState>  {
	constructor(datastore) {
		super('users', datastore);
	}

	// commands
	register(props: RegisterProps) {

		this.state = {
			...this.state,
			...props,
			id: Date.now(),
		};

		return this.save();
	}

	resetPassword() {
		this.state.password = null;

		return this.save();
	}
}


// 3. Use Aggregate
async function run() {
	const datastore = new Datastore({});
	const root = new AggregateResolver(datastore);
	const userAggr = root.get(UserAggregate);

	const isSuccess = await userAggr.register({
		firstName: 'Ezeki',
		lastName: 'Zibzibadze',
		password: '123'
	});

	console.log(isSuccess);
}


run();
```

Gangnam Style:
```ts
console.log('commong soon... :D');
```
npm package: @jokio/graphql
Description: High level, pre-configured, GraphQL Server
Author: Jok Entertainers
Latest version: 0.2.2

# GraphQL Server, pre-configured out of the box
[![Build Status](https://travis-ci.org/jokio/graphql.svg?branch=master)](https://travis-ci.org/jokio/graphql)

[![npm version](https://badge.fury.io/js/%40jokio%2Fgraphql.svg)](https://badge.fury.io/js/%40jokio%2Fgraphql)

This is high level package built on top of [graphql-yoga](https://github.com/graphcool/graphql-yoga), to create graphql server with websocket support easily.

## Features:
* All [graphql-yoga](https://github.com/graphcool/graphql-yoga) features
* Authentication support
* Apollo Engine support
* Pre-defined scalar types: Date, Time, DateTime, JSON
* Pre-defined Graph for getting server stats
* Remote Schema stitching
* Local Schema stitching
* Rest apis integration
* Dotenv support (for development environment)
* Web sockets improved support

## Examples:
* [Simple](https://github.com/jokio/graphql/blob/master/examples/simple/index.ts)
* [API Gateway](https://github.com/jokio/graphql/blob/master/examples/api-gateway/index.ts)
* [Complex](https://github.com/jokio/graph)
npm package: @jokio/graphql-import
Description: [![CircleCI](https://circleci.com/gh/prismagraphql/graphql-import.svg?style=shield)](https://circleci.com/gh/prismagraphql/graphql-import) [![npm version](https://badge.fury.io/js/graphql-import.svg)](https://badge.fury.io/js/graphql-import)
Latest version: 0.0.4

# graphql-import

[![CircleCI](https://circleci.com/gh/prismagraphql/graphql-import.svg?style=shield)](https://circleci.com/gh/prismagraphql/graphql-import) [![npm version](https://badge.fury.io/js/graphql-import.svg)](https://badge.fury.io/js/graphql-import)

Import &amp; export definitions in GraphQL SDL (also refered to as GraphQL modules)

> There is also a [`graphql-import-loader`](https://github.com/graphcool/graphql-import-loader) for Webpack available.

## Install

```sh
yarn add graphql-import
```

## Usage

```ts
import { importSchema } from 'graphql-import'
import { makeExecutableSchema } from 'graphql-tools'

const typeDefs = importSchema('schema.graphql')
const resolvers = {}

const schema = makeExecutableSchema({ typeDefs, resolvers })
```

## Examples

### Importing specific fields

Assume the following directory structure:

```
.
├── a.graphql
├── b.graphql
└── c.graphql
```

`a.graphql`

```graphql
# import B from "b.graphql"

type A {
  # test 1
  first: String
  second: Float
  b: B
}
```

`b.graphql`

```graphql
# import C from 'c.graphql'

type B {
  c: C
  hello: String!
}
```

`c.graphql`

```graphql
type C {
  id: ID!
}
```

Running `console.log(importSchema('a.graphql'))` produces the following output:

```graphql
type A {
  first: String
  second: Float
  b: B
}

type B {
  c: C
  hello: String!
}

type C {
  id: ID!
}
```

### Extending root fields

It is possible to import from a root field like `Query`;

`queries.graphql`

```graphql
type Query {
  feed: [Post!]!
  drafts: [Post!]!
}
```

`mutations.graphql`

```graphql
type Mutation {
  publish(id: ID!): Post!
  deletePost(id: ID!): Post!
}
```

`schema.graphql`

```graphql
# import Query.* from "queries.graphql"
# import Mutation.publish from "mutations.graphql"
```

Running `console.log(importSchema('schema.graphql'))` produces the following output:

```graphql
type Query {
  feed: [Post!]!
  drafts: [Post!]!
}

type Mutation {
  publish(id: ID!): Post!
}
```

Please refer to [`src/index.test.ts`](https://github.com/graphcool/graphql-import/blob/master/src/index.test.ts) for more examples.

## Development

The [implementation documentation](https://graphql-import.now.sh/) documents how things are implemented under the hood. You can also use the VSCode test setup to debug your code/tests.

## Related topics & next steps

- Static import step as build time
- Namespaces
- Support importing from HTTP endpoints (or [Links](https://github.com/apollographql/apollo-link))
- Create RFC to add import syntax to GraphQL spec

<p align="center"><a href="https://oss.prisma.io"><img src="https://imgur.com/IMU2ERq.png" alt="Prisma" height="170px"></a></p>
npm package: @jokio/monzo
Description: [![platform: jokio](https://img.shields.io/badge/platform-%F0%9F%83%8F%20jok-44cc11.svg)](https://github.com/jokio/jok-cli)
Latest version: 1.1.1

# @jokio/monzo
[![platform: jokio](https://img.shields.io/badge/platform-%F0%9F%83%8F%20jok-44cc11.svg)](https://github.com/jokio/jok-cli)

Library will help to work with mongodb

<br/>

## Features
✅ Stores `_id: ObjectId` field, but wraps it to the `id: string` 

✅ Documents have `version: number` out of the box, and its increased by `1` every time you call update

✅ Every document has `createdAt` and `updatedAt` props

✅ Soft Delete & Hard Delete ability for documents

<br/>
<br/>

## How to use
1.  Declare data structure

```ts
import { DocumentBase } from '@jokio/monzo'

export interface User extends DocumentBase {
	email: string
	passwordHash: string
	fullname?: string
}
```

2. Create repository object for declared type
```ts
import { getRepository } from '@jokio/monzo'

const connectionString = `mongodb://mongo:mongo@localhost:27017/test?authSource=admin`
const client = new MongoClient(connectionString, { useNewUrlParser: true })

await client.connect()

const db = client.db()

const users = getRepository<User>(db, 'users')
```


3. Use repository object
```ts
const user = await users.create({
	email: 'test@jok.io',
	passwordHash: 'strong-hash',
})


const { id, version } = user

const updatedUser = await users.update(
	{ id, version },
	{
		email: 'tester@jok.io',
	},
)
```

## Performance Cost

Library calls `_id.toHexString()` for all retrieved items to have `id: string` and make developers life easier, so logical quetion is: How expensive operation is it.

| Number of Operations 	| Duration 			|
|---------------------: |----------------	|
| 1                     | ~83 μs          |
| 1 000                 |                	|
| 1 000 000             | ~250 ms        	|