Skip to content

Commit

Permalink
Merge pull request #11 from firstandthird/update-deps
Browse files Browse the repository at this point in the history
Update deps
  • Loading branch information
dawnerd authored Nov 21, 2020
2 parents cd20218 + cacfde6 commit f9483a3
Show file tree
Hide file tree
Showing 13 changed files with 2,639 additions and 42 deletions.
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "firstandthird"
}
29 changes: 29 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Lint

on:
push:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 14
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: yarn lint
53 changes: 53 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Create Release

on:
push:
tags:
- '*'

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 14
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Changelog
uses: scottbrenner/generate-changelog-action@master
id: Changelog
env:
REPO: ${{ github.repository }}
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
${{ steps.Changelog.outputs.changelog }}
draft: false
prerelease: false
29 changes: 29 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test

on:
push:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 14
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: yarn test
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
node_modules
.DS_Store
package-lock.json
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v14.5.0
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

33 changes: 31 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,39 @@
# hapi-referrer [![Build Status](https://travis-ci.org/firstandthird/hapi-referrer.svg?branch=master)](https://travis-ci.org/firstandthird/hapi-referrer) [![Coverage Status](https://coveralls.io/repos/github/firstandthird/hapi-referrer/badge.svg?branch=master)](https://coveralls.io/github/firstandthird/hapi-referrer?branch=master)
<h1 align="center">hapi-referrer</h1>

<p align="center">
<a href="https://github.com/firstandthird/hapi-referrer/actions">
<img src="https://img.shields.io/github/workflow/status/firstandthird/hapi-referrer/Test/main?label=Tests&style=for-the-badge" alt="Test Status"/>
</a>
<a href="https://github.com/firstandthird/hapi-referrer/actions">
<img src="https://img.shields.io/github/workflow/status/firstandthird/hapi-referrer/Lint/main?label=Lint&style=for-the-badge" alt="Lint Status"/>
</a>
<img src="https://img.shields.io/npm/v/hapi-referrer.svg?label=npm&style=for-the-badge" alt="NPM" />
</p>

Hapi plugin to log referrers from search/ads/social/etc

### Options:
## Installation

```sh
npm install hapi-referrer
```

_or_

```sh
yarn add hapi-referrer
```

## Options:
- `cookieName` - Name of the cookie to be set
- `ttl` - cookie expiration, defaults to 30 days
- `domains` - array of domains. Domains in the list will not have their referrer set
- `ignoredPaths` - array of paths. Paths set here wont have cookies set. Note, applies to all paths matching the text. Example: `/public` would also block `/public/css/common.css`
- `verbose` - Enable debug logging when cookie set


---

<a href="https://firstandthird.com"><img src="https://firstandthird.com/_static/ui/images/safari-pinned-tab-62813db097.svg" height="32" width="32" align="right"></a>

_A [First + Third](https://firstandthird.com) Project_
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const RefParser = require('@mediocre/referer-parser');
const RefParser = require('@cgamesplay/referer-parser');
const useragent = require('useragent');

const defaults = {
Expand Down
Loading

0 comments on commit f9483a3

Please sign in to comment.