open-index/open-npm huggingface dataset:
npm package: @halkeye/content-type-to-typescript
Description: Compile Contentful Models to TypeScript type definitions
Author: Sergii Bezliudnyi
Latest version: 1.1.1

# Content-type-to-typescript

This is a tool to convert Contentful Models (Content Types) to the TS Definitions.
Provides a way to automate TS Definitions generation. Could be used as a library or cli tool.

[Try-it-out](https://content-type-to-typescript.netlify.com/)

## Installation

```
$ npm install content-type-to-typescript --save
```

## Usage

1. As CLI 

```
$ ./node_modules/.bin/content-type-to-typescript --management-token <token> --space <space> --output <filepath>
```

This command will generate TS Definition file. Could also be used as a npm script.

package.json:
```json
"scripts": {
  "sync-contentful-types": "content-type-to-typescript --management-token <token> --space <space> --output <filepath>"
}
```
Usage:

```
npm run sync-contentful-types
```

2. As a library using JSON preview from Web App

Copy JSON Preview from [Contentful Web App](https://app.contentful.com/)

```js
import { compileFromContentTypes } from 'content-type-to-typescript';

const category = {
    name: 'Category',
    description: null,
    fields: [
      {
        id: 'title',
        name: 'Title',
        type: 'Text',
        required: true,
        omitted: false,
      },
    ],
  }

const typings = await compileFromContentTypes([category]);

console.log(typings);
```

```ts
compileFromContentTypes(
  contentTypes: Array<Partial<ContentType>>,
  options?: Partial<Options>
): Promise<string>
```

### ContentType

The structure of the Content Type is described here [Contentful data model](https://www.contentful.com/developers/docs/concepts/data-model/).

### Options

| Property      | Type   | Required? | Description                          |
| :------------ | :----- | :-------: | :----------------------------------- |
| bannerComment | String |           | A comment at the top of the response |



## Example

Input:

```json
{
  "name": "Category",
  "fields": [
    {
      "id": "title",
      "name": "Title",
      "type": "Text",
      "required": true,
      "omitted": false
    },
    {
      "id": "icon",
      "name": "Icon",
      "type": "Link",
      "required": false,
      "omitted": false,
      "linkType": "Asset"
    },
    {
      "id": "categoryDescription",
      "name": "Description",
      "type": "Text",
      "required": false,
      "omitted": false
    },
    {
      "id": "simpleTextField",
      "name": "Simple text field",
      "type": "Symbol",
      "required": false,
      "validations": [],
      "disabled": false,
      "omitted": false
    }
  ]
}
```

Output:

```ts
export interface Category {
  title: string;
  icon?: AssetLink;
  categoryDescription?: string;
  simpleTextField?: string;
}

export interface AssetLink {
  type: string;
  linkType: string;
  id: string;
}
```
## Built with

* [json-schema-to-typescript](https://github.com/bcherny/json-schema-to-typescript/)
* [typescript-library-starter](https://github.com/alexjoverm/typescript-library-starter)

## License

MIT License - fork, modify and use however you want.
npm package: @halkeye/hubot-devopsreactions
Description: A hubot plugin/scripts to get funny blog post from https://twitter.com/devopsreact
Author: Gavin Mogan
Latest version: 0.2.1

Devops Reactions Hubot Scripts
==============================

[Hubot](http://hubot.github.com/) script to interface with the funny post from devops reactions blog

## Installation

Update Hubot's package.json to install hubot-devopsreactions from npm, and update Hubot's external-scripts.json file to include the hubot-devopsreactions module.

### Update the files to include the hubot-devopsreactions module:

#### package.json
    ...
    "dependencies": {
      "hubot":        ">= 2.4.0 < 3.0.0",
      ...
      "hubot-devopsreactions": ">= 0.1.1"
    },
    ...

#### external-scripts.json
    ["hubot-awesome-module","other-cool-npm-script","hubot-devopsreactions"]

Run `npm install` to install hubot-devopsreactions and dependencies.

## Practical Use

Use `hubot help` or check the devopsreactions.coffee file to get the full list of options with short descriptions. 

    devops me

## TODO

* Retry on error
* Report when service is down
npm package: @halkeye/hubot-postgres-brain
Description: Hubot brain persisted to PostgresDB as JSONB
Author: Gavin Mogan
Latest version: 0.2.0

# hubot-postgres-brain
Hubot Brain persistence into Postgres

based on the original first pass script by Dan Thompson of Github(?) https://github.com/github/hubot-scripts/blob/master/src/scripts/pg-brain.coffee

## Setup

` CREATE TABLE hubot (
     id CHARACTER VARYING(1024) NOT NULL,
     storage JSON,
     CONSTRAINT hubot_pkey PRIMARY KEY (id)
   )
   INSERT INTO hubot VALUES(1, NULL)`

### Why Fork?
1. In the original script, TEXT datatype was used instead of JSON. This is potentially less space efficient, there is also no JSON validation (also offered by the JSON datatype along with JSONB). JSON, along with being space efficient and JSON validating, also indexes the JSON content, however, since we're plopping the entire hubot brain into 1 attribute of 1 row, the Index is meaningless. JSON and JSONB also take the work off of the dyno/web server from having to parse and stringify the javascript objects in the brain to from json.
2. Set a Save Interval. I've copied from the hubot-scripts/s3-brain. Basically saving the entire brain to a relational database could potentially be an intensive operation. The default save interval was every few seconds, and this is completely unnecessary/overkill. Override is in place with a default of 15 minutes.
3. The original script is not in the form of a node_module.

### Why Postgres? Why not Redis?
Redis seems like the official method of brain persistence. However, Postgres offers a few advantages:

1. Heroku offers Postgres as a free add-on. Although Redis is also free, it requires a credit card for "Validation". It seems, however, that the free dynos and Postgres Databases do not.
2. 1GB max size per TEXT/JSON field, even on the Heroku hobby-dev free tier. Whereas the Redis free-tier offers 25MB.
3. If you deploy it yourself, Redis actually takes extra steps during setup for its data store to survive a reboot (its key-value store is in memory just like hubot's robot brain)
npm package: @halkeye/hubot-pugme-reddit
Description: Pugme is the most important hubot script (reddit version)
Author: Gavin Mogan
Latest version: 0.0.1

# hubot-pugme-reddit

Pugme is the most important hubot script

See [`src/pugme.js`](src/pugme.js) for full documentation.

Forked from https://github.com/hubot-scripts/hubot-pugme which relies on a heroku app. This version pulls pugs from [reddit](https://www.reddit.com/r/pugs).

## Installation

In hubot project repo, run:

`npm install @halkeye/hubot-pugme-reddit --save`

Then add **@halkeye/hubot-pugme-reddit** to your `external-scripts.json`:

```json
[
  "@halkeye/hubot-pugme-reddit"
]
```

## Sample Interaction

```
user1>> hubot pug me
hubot>> http://imgur.com/PMlOozd
user1>> hubot pug bomb me
hubot>> http://imgur.com/6R752BY
hubot>> https://scontent-lhr3-1.xx.fbcdn.net/t31.0-8/13497991_789139941186193_5479447522257473316_o.jpg
hubot>> http://i.imgur.com/z7OfpjG.jpg
hubot>> http://imgur.com/PMlOozd
```
npm package: @halkeye/hubot-rss-reader
Description: Hubot RSS Reader
Author: Gavin Mogan
Latest version: 0.9.5

Hubot RSS Reader
================
RSS Reader for each Chat Channels, works with Hubot.

[![Circle CI](https://circleci.com/gh/shokai/hubot-rss-reader.svg?style=svg)](https://circleci.com/gh/shokai/hubot-rss-reader)

- https://github.com/shokai/hubot-rss-reader
- https://www.npmjs.org/package/hubot-rss-reader

![screen shot](http://gyazo.com/234dfb14d76bb3de9efd88bfe8dc6522.png)

Requirements
------------

- coffee-script 1.10+
- hubot-brain
  - recommend [hubot-mongodb-brain](http://npmjs.com/package/hubot-mongodb-brain).

Install
-------

    % npm install hubot-rss-reader -save
    % npm install coffee-script@">=1.10.0" -save

### edit `external-script.json`

```json
["hubot-rss-reader"]
```

### Configure (ENV vars)

    export DEBUG=hubot-rss-reader*      # debug print
    export HUBOT_RSS_INTERVAL=600       # 600 sec (default)
    export HUBOT_RSS_HEADER=:sushi:     # RSS Header Emoji (default is "sushi")
    export HUBOT_RSS_USERAGENT=hubot    # (default is "hubot-rss-reader/#{package_version}")
    export HUBOT_RSS_PRINTSUMMARY=true  # print summary (default is "true")
    export HUBOT_RSS_PRINTIMAGE=false   # print image in summary (default is "true")
    export HUBOT_RSS_PRINTERROR=false   # print error message (default is "true")
    export HUBOT_RSS_IRCCOLORS=true     # use IRC color message (default is "false")
    export HUBOT_RSS_LIMIT_ON_ADD=false # limit printing entries on add new feed. (default is 5)

Usage
-----

### add

    hubot rss add https://github.com/shokai.atom
    # or
    hubot rss register https://github.com/shokai.atom


### delete

    hubot rss delete https://github.com/shokai.atom
    hubot rss delete #room_name

### list

    hubot rss list
    hubot rss dump


Test
----

    % npm install

    % grunt
    # or
    % npm test