Skip to content
This repository was archived by the owner on Apr 27, 2021. It is now read-only.

Commit 1b8317a

Browse files
qbootjoelwurtz
authored andcommitted
Use remote SDK repo + Add WordPress / Symfony to Travis CI & Scrutinizer (#541)
* Use remote SDK repo + Add WP / Symfony to Travis CI & Scrutinizer * Scoping NodeJs Proxy package under redirectionio organization * Fix tests on Travis CI
1 parent e6645a3 commit 1b8317a

File tree

8 files changed

+48
-47
lines changed

8 files changed

+48
-47
lines changed

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# RedirectionIO Proxy for NodeJs
22

3+
[![Latest Version](https://img.shields.io/github/release/redirectionio/proxy-nodejs.svg)](https://github.com/redirectionio/proxy-nodejs)
34
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE)
45
[![Build Status](https://img.shields.io/travis/redirectionio/proxy-nodejs/master.svg)](https://travis-ci.org/redirectionio/proxy-nodejs)
56
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/redirectionio/proxy-nodejs.svg)](https://scrutinizer-ci.com/g/redirectionio/proxy-nodejs)
@@ -30,10 +31,10 @@ Drop us an email to `[email protected]` if you need help or have any questi
3031

3132
```console
3233
// with yarn
33-
$ yarn add redirectionio
34+
$ yarn add @redirectionio/proxy
3435

3536
// with npm
36-
$ npm install --save redirectionio
37+
$ npm install --save @redirectionio/proxy
3738
```
3839

3940
2. By default, redirection.io will try to reach an agent listening on `127.0.0.1:20301`.
@@ -73,7 +74,7 @@ await rio.handleHttpRequest(req, res, config)
7374

7475
```js
7576
const http = require('http')
76-
const rio = require('redirectionio') // require the module
77+
const rio = require('@redirectionio/proxy') // require the module
7778

7879
const port = YOUR_PORT
7980

@@ -95,7 +96,7 @@ server.listen(port)
9596

9697
```js
9798
const app = require('express')()
98-
const rio = require('redirectionio') // require the module
99+
const rio = require('@redirectionio/proxy') // require the module
99100

100101
const port = YOUR_PORT
101102

@@ -120,32 +121,32 @@ app.listen(port)
120121

121122
- Start http demo server on `localhost:8003`
122123
```console
123-
$ npm run http
124+
$ yarn http
124125
```
125126

126127
- Start express demo server on `localhost:8004`
127128
```console
128-
$ npm run express
129+
$ yarn express
129130
```
130131

131132
- Start both express and http demo servers
132133
```console
133-
$ npm run start
134+
$ yarn start
134135
```
135136

136137
- List server(s)
137138
```console
138-
$ npm run list
139+
$ yarn list
139140
```
140141

141142
- Restart server(s)
142143
```console
143-
$ npm run restart
144+
$ yarn restart
144145
```
145146

146147
- Stop server(s)
147148
```console
148-
$ npm run stop
149+
$ yarn stop
149150
```
150151

151152
## Contribution
@@ -167,11 +168,11 @@ $ npm test
167168
### Run linter
168169

169170
```console
170-
$ npm run lint
171+
$ yarn lint
171172
```
172173

173174
### Transpile babel code
174175

175176
```console
176-
$ npm run build
177+
$ yarn build
177178
```

examples/express/server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import express from 'express'
2-
import rio from 'redirectionio'
2+
import rio from '@redirectionio/proxy'
33

44
const app = express()
55
const port = 8001
@@ -19,7 +19,7 @@ const config = [
1919
{
2020
'name': 'demo_agent',
2121
'host': 'sdk_agent',
22-
'port': 8000,
22+
'port': 8000
2323
}
2424
]
2525

examples/http/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createServer } from 'http'
2-
import rio from 'redirectionio'
2+
import rio from '@redirectionio/proxy'
33
import url from 'url'
44

55
const port = 8002

flow-typed/redirectionio_v0.x.x/flow_v0.25.x-/redirectionio_v0.0.x.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { IncomingMessage } from 'http';
22
import type { Application } from 'express';
33

4-
declare module 'redirectionio' {
4+
declare module '@redirectionio/proxy' {
55
declare type Connection = {
66
name: string,
77
host: string,

flow-typed/redirectionio_v0.x.x/test_redirectionio_v0.x.x.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import express from 'express';
44
import http from 'http';
5-
import rio, { Connection } from 'redirectionio';
5+
import rio, { Connection } from '@redirectionio/proxy';
66

77
// Test `Connection` type
88
const connection: Connection = {name: 'default', host: 'localhost', port: 3100};

package-lock.json

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "redirectionio",
2+
"name": "@redirectionio/proxy",
33
"version": "0.0.1",
4-
"description": "RedirectionIO Proxy for NodeJs",
4+
"description": "RedirectionIO Proxy for NodeJs and Express",
55
"main": "index.js",
66
"scripts": {
77
"test": "jest",
@@ -42,6 +42,6 @@
4242
"express": "^4.16.2",
4343
"jest": "^22.0.4",
4444
"pm2": "^2.9.3",
45-
"redirectionio": "file:./"
45+
"@redirectionio/proxy": "file:./"
4646
}
4747
}

yarn.lock

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@
7171
lodash "^4.2.0"
7272
to-fast-properties "^2.0.0"
7373

74+
"@redirectionio/proxy@file:./.":
75+
version "0.0.1"
76+
dependencies:
77+
babel-runtime "^6.26.0"
78+
7479
abab@^1.0.4:
7580
version "1.0.4"
7681
resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e"
@@ -80,10 +85,10 @@ abbrev@1:
8085
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
8186

8287
accepts@~1.3.4:
83-
version "1.3.4"
84-
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.4.tgz#86246758c7dd6d21a6474ff084a4740ec05eb21f"
88+
version "1.3.5"
89+
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2"
8590
dependencies:
86-
mime-types "~2.1.16"
91+
mime-types "~2.1.18"
8792
negotiator "0.6.1"
8893

8994
acorn-globals@^4.1.0:
@@ -1291,8 +1296,8 @@ [email protected]:
12911296
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
12921297

12931298
concat-stream@^1.6.0:
1294-
version "1.6.0"
1295-
resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7"
1299+
version "1.6.1"
1300+
resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.1.tgz#261b8f518301f1d834e36342b9fea095d2620a26"
12961301
dependencies:
12971302
inherits "^2.0.3"
12981303
readable-stream "^2.2.2"
@@ -3196,7 +3201,7 @@ mime-db@~1.33.0:
31963201
version "1.33.0"
31973202
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db"
31983203

3199-
mime-types@^2.1.12, mime-types@~2.1.16, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.7:
3204+
mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.7:
32003205
version "2.1.18"
32013206
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8"
32023207
dependencies:
@@ -3840,11 +3845,6 @@ rechoir@^0.6.2:
38403845
dependencies:
38413846
resolve "^1.1.6"
38423847

3843-
"redirectionio@file:./.":
3844-
version "0.0.1"
3845-
dependencies:
3846-
babel-runtime "^6.26.0"
3847-
38483848
regenerate@^1.2.1:
38493849
version "1.3.3"
38503850
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f"

0 commit comments

Comments
 (0)