open-index/open-npm huggingface dataset:
npm package: @mikespub/tuql
Description: _Pronounced: Too cool_
Author: Brad Daily
Latest version: 2.6.3

# tuql

_Pronounced: Too cool_

**tuql** is a simple tool that turns a sanely formatted sqlite database into a graphql endpoint. It tries to infer relationships between objects, currently supporting `belongsTo`, `hasMany` and `belongsToMany`. It also forms the basic mutations necessary to create, update, and delete objects, as well as assoicate many-to-many relationships.

## About this fork

Based on https://github.com/acdibble/tuql with:
- updated dependencies and yarn
- BLOB mapped to String for SQLite

## Installing

`npm install -g @mikespub/tuql`

## Using

Note: if tuql doesn't work (for local build/install)
`yarn exec tuql ...`

`tuql --db path/to/database.sqlite`

You can also optionally set the port and enable graphiql:

`tuql --db path/to/database.sqlite --port 8888 --graphiql`

Or, you can use a sql file with statements to build up an in-memory database:

`tuql --infile path/to/db_dump.sql --graphiql`

If you'd like to print out the schema itself, use:

`tuql --db path/to/database.sqlite --schema`

Or send it to a file:

`tuql --db path/to/database.sqlite --schema > schema.graphql`

## How it works

Imagine your sqlite schema looked something like this:

| posts | users | categories | category_post |
| :-: | :-: | :-: | :-: |
| id      | id | id | category_id |
| user_id | username | title | post_id |
| title   | | |
| body    | | |

**tuql** will automatically define models and associations, so that graphql queries like this will work right out of the box:

```graphql
{
  posts {
    title
    body
    user {
      username
    }
    categories {
      title
    }
  }
}
```

**tuql** works one of two ways. It prefers to map your schema based on the foreign key information in your tables. If foreign keys are not present, **tuql** assumes the following about your schema in order to map relationships:

1. The primary key column is named `id` or `thing_id` or `thingId`, where `thing` is the singular form of the table name. Example: For a table named **posts**, the primary key column should be named `id`, `post_id` or `postId`.
2. Similarly, foreign key columns should be `thing_id` or `thingId`, where `thing` is the singular form of the associated table.
3. For many-to-many associations, the table name should be in the form of `foo_bar` or `bar_foo` (ordering is not important). The columns should follow the same pattern as #2 above.
npm package: @mikestaub/gql2flow
Description: Convert a GraphQL Schema to a Flowtype definition
Author: Joar Wilk
Latest version: 1.0.0

# GraphQL To Flow Types

```shell
npm i -g gql2flow
```


```
Usage: gql2flow [options] <schema.json>

Options:

  -h, --help                         output usage information
  -V, --version                      output the version number
  -o --output-file [outputFile]      name for output file, defaults to graphql-export.flow.js
  -m --module-name [moduleName]      name for the export module. Types are not wrapped in a module if this is not set
  -i --ignored-types <ignoredTypes>  names of types to ignore (comma delimited)
  -w --whitelist <whitelist>         names of types to whitelist (comma delimited)
  --null-keys                        adds a '?' to all keys
  --null-values                      adds a '?' to all values
```

## Examples

#### Fetching from a server
```shell
gql2flow https://api.github.com/graphql
```

#### From a json schema
```shell
gql2flow schema.json
```
npm package: @mikestaub/serverless-papertrail-logging
Description: Serverless plugin for log delivery from CloudWatch Logs to Papertrail using a lambda function with log groups subscription
Author: Jakub Matejka
Latest version: 1.2.0

## serverless-papertrail-logging

[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com)
[![Build Status](https://travis-ci.org/keboola/serverless-papertrail-logging.svg?branch=master)](https://travis-ci.org/keboola/serverless-papertrail-logging)
[![Maintainability](https://api.codeclimate.com/v1/badges/af9d714e852ca05d842b/maintainability)](https://codeclimate.com/github/keboola/serverless-papertrail-logging/maintainability)

Serverless plugin for log delivery from CloudWatch Logs to Papertrail using a lambda function with log groups subscription.

The plugin ignores implicit Lambda logs (starting with `START`, `END` and `REPORT`) and adds Lambda request id to each event. Notice that it expects the logs to be in json format (and converts them to json if they are not).

### Installation

1. Install npm package: `yarn add @keboola/serverless-papertrail-logging --dev`
2. Add plugin to your `serverless.yml`:
```yaml
custom:
  papertrail:
    port: 1234
    host: logs.papertrailapp.com
    hostname: serviceName
    program: stage

plugins:
- '@keboola/serverless-papertrail-logging'
```
 It must be put before **serverless-webpack** and other similar plugins to work correctly.

- `port` - required, port number assigned for you by Papertrail
- `host` - optional, default is `logs.papertrailapp.com`
- `hostname` - optional, default is service name
- `program` - optional, default is service stage
npm package: @mikestaub/simple-secrets
Description: Utilities for managing encrypted secrets.
Author: Michael Staub
Latest version: 2.0.1

# simple-secrets

## Overview

This is a small, opinionated library for managing app secrets. The developer now must only manage a single, master key to access all sensitive data for the project.

For small to medium sized projects and teams, this approach should be sufficient. For a more robust / complex solution, something like HashiCorp Vault or AWS Secrets Manager should be used.

## Usage

### Storing secrets

1.  create a file called 'secrets.js' and have it export an object containing sensitive data in the following format:
```
module.exports = {
  API_KEY: {
    staging: "123",
    production: "345"
  }
}
```
2.  add the 'secrets.js' file to the project's .gitignore as to not accidentally commit it
3.  add the following script to the package.json:

```
"scripts": {
  "encrypt": "simple-secrets encrypt",
  "decrypt": "simple-secrets decrypt",
}
```

4.  run

```
export ENCRYPTION_KEY=some-secret-string
npm run encrypt
```

### Using secrets

1.  There must exist a file called 'secrets.js.encrypted' in the current working directory
2.  run

```
export ENCRYPTION_KEY=some-secret-string
npm run decrypt
```

It is assumed there exists a 'secrets.js.encrypted' file in the current working directory that can be or decrypted with the key specified by the 'ENCRYPTION_KEY' environment variable.

### Other commands

To print the secrets to stdout, use:
```
simple-secrets print
```
To inject the secrets into process.env use:
```
simple-secrets export
```


### Note

This approach assumes that the master encyption key is kept secret and safe. If it is ever made public, assume all credentials in secrets.js are compromised.
npm package: @mikestreety/data-collector
Description: Own your own data
Author: Mike Street @mikestreety
Latest version: 0.2.0

# Data Collector

Built with https://oclif.io/

- [Data Collector](#data-collector)
	- [Installation](#installation)
		- [Global](#global)
	- [Services](#services)
		- [Webmentions](#webmentions)
		- [RSS](#rss)
		- [Letterboxd](#letterboxd)
	- [Roadmap](#roadmap)
	- [Releasing](#releasing)

## Installation

```
npm i @mikestreety/data-collector
```

You can then access it with the following:

```
./node_modules/.bin/datacollector
```

In your `package.json`, you can add specific commands or a shortcut to the main command

```json
"scripts": {
  "datacollector": "datacollector"
},
```

With this set, you can pass in your commands to a slightly shorter (and more memorable) command:

```bash
npm run datacollector -- letterboxd letterboxd.json -u mikestreety
```

### Global

You can install it globally if you wish

```
npm i -g @mikestreety/data-collector
```

Which would allow you to run `datacollector` in your terminal

## Services

### Webmentions


- `-d`, `--domain` - the domain to get the webmentions from
- `-t`, `--token` - your webmentions token from https://webmention.io/settings

```
datacollector webmentions webmentions.json --domain www.mikestreety.co.uk --token 123456
```

Code adapted from [Max Böck](https://mxb.dev/)'s [11ty Webmentions repo](https://github.com/maxboeck/eleventy-webmentions)

### RSS

Any RSS feed provided (or searches for RSS) of a given domain

- `-f`, `--feed` - the RSS feed
- `-d`, `--domain` - the domain to search for the RSS feeds

```
datacollector letterboxd rss.json -f https://www.mikestreety.co.uk/rss-notes.xml
```

or

```
datacollector letterboxd rss.json -d www.mikestreety.co.uk
```

### Letterboxd

Get the films for a user from letterboxd

- `-u`, `--username` - the Letterboxd username

```
datacollector letterboxd letterboxd.json -u mikestreety
```

## Roadmap

- Allow `.env` files
- Create oAuth workflow
- Add Strava

## Releasing

Once ready to release, run the following

- `npm version (major|minor|patch)`
- `npm publish`