Skip to content

Commit ced2780

Browse files
authored
Merge pull request #4 from browserstack/review-branch
CDP Proxy Initial Setup
2 parents 7b8b812 + 334478b commit ced2780

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+6050
-1
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
10+
[*.md]
11+
trim_trailing_whitespace = false
12+

.eslintrc.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
env: {
3+
node: true,
4+
commonjs: true,
5+
es2021: true,
6+
},
7+
extends: 'eslint:recommended',
8+
parserOptions: {
9+
ecmaVersion: 12,
10+
},
11+
rules: {
12+
indent: ['error', 2],
13+
'linebreak-style': ['error', 'unix'],
14+
quotes: ['error', 'single'],
15+
semi: ['error', 'always'],
16+
},
17+
};

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## Description
2+
3+
<!--- Describe your changes in detail -->
4+
5+
## Motivation and Context
6+
7+
<!--- Why is this change required? What problem does it solve? -->
8+
<!--- If it fixes an open issue, please link to the issue here. -->
9+
10+
## How Has This Been Tested?
11+
12+
<!--- Please describe in detail how you tested your changes. -->
13+
<!--- Include details of your testing environment, and the tests you ran to -->
14+
<!--- see how your change affects other areas of the code, etc. -->
15+
16+
## Screenshots (if appropriate):
17+
18+
## Types of changes
19+
20+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
21+
22+
- [ ] Bug fix (non-breaking change which fixes an issue)
23+
- [ ] New feature (non-breaking change which adds functionality)
24+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
25+
26+
## Checklist:
27+
28+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
29+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
30+
31+
- [ ] My code follows the code style of this project.
32+
- [ ] I have added tests to cover my changes.
33+
- [ ] All new and existing tests passed.

.github/workflows/actions.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
name: Lint and Test
14+
steps:
15+
- uses: actions/checkout@v2
16+
name: Check out repository
17+
- uses: actions/setup-node@v2
18+
name: Setup Node.js
19+
with:
20+
node-version: '14.17.5'
21+
- run: |
22+
cp lib/config/config.json.sample lib/config/config.json
23+
name: Setting up configuration
24+
- run: |
25+
npm ci
26+
name: Installing Dependencies
27+
- run: |
28+
npm run eslint
29+
name: Running ESLint checks on source
30+
- run: |
31+
npm run eslint:test
32+
name: Running ESLint checks on tests
33+
- run: |
34+
npm run test
35+
name: Running tests

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
tmp/
3+
config.json
4+
.nyc_output
5+
logs/

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v14.17.5

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
logs/
2+
.github/
3+
.nyc_output/
4+
.vscode/

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"singleQuote": true,
3+
"tabWidth": 2,
4+
"endOfLine": "lf",
5+
"semi": true,
6+
"trailingComma": "es5",
7+
"useTabs": false
8+
}

.rotate.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
filter(data) {
3+
return data.req;
4+
},
5+
output: {
6+
path: './proxy.log',
7+
options: {
8+
path: './logs',
9+
interval: '1d',
10+
},
11+
},
12+
};

.vscode/launch.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "pwa-node",
6+
"request": "launch",
7+
"name": "ws-reconnect-proxy",
8+
"skipFiles": ["<node_internals>/**"],
9+
"program": "${workspaceFolder}/cluster.js",
10+
"outputCapture": "std",
11+
"console": "internalConsole",
12+
"env": {
13+
"NODE_ENV": "dev"
14+
}
15+
}
16+
]
17+
}

0 commit comments

Comments
 (0)