Skip to content

Commit ca90712

Browse files
Merge pull request #10 from DanielHabenicht/update-packages
fix: update packages
2 parents febedd6 + 34de54f commit ca90712

23 files changed

Lines changed: 844 additions & 7605 deletions

.github/workflows/pr-title-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
id: fc
2929
with:
3030
issue-number: ${{ github.event.pull_request.number }}
31-
comment-author: "github-actions[bot]"
31+
comment-author: 'github-actions[bot]'
3232
body-includes: Please make sure that your Pull Request title and body does conform to this format
3333

3434
- name: Create comment
@@ -60,4 +60,4 @@ jobs:
6060
owner: context.repo.owner,
6161
repo: context.repo.repo,
6262
comment_id: ${{ steps.fc.outputs.comment-id }},
63-
})
63+
})

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
- master
66
jobs:
77
test:
8-
runs-on: ubuntu-18.04
8+
runs-on: ubuntu-20.04
99
steps:
1010
- name: Checkout
1111
uses: actions/checkout@v2
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/cache@v2
1717
id: npm-cache
1818
with:
19-
path: "**/node_modules"
19+
path: '**/node_modules'
2020
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
2121
- name: Install dependencies
2222
if: steps.npm-cache.outputs.cache-hit != 'true'
@@ -40,7 +40,7 @@ jobs:
4040
- uses: actions/cache@v2
4141
id: npm-cache
4242
with:
43-
path: "**/node_modules"
43+
path: '**/node_modules'
4444
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
4545
- name: Install dependencies
4646
if: steps.npm-cache.outputs.cache-hit != 'true'

.github/workflows/test.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ on:
44

55
jobs:
66
test:
7-
runs-on: ubuntu-18.04
7+
runs-on: ubuntu-20.04
8+
timeout-minutes: 5
89
steps:
910
- name: Checkout
1011
uses: actions/checkout@v2
@@ -17,10 +18,14 @@ jobs:
1718
- uses: actions/cache@v2
1819
id: npm-cache
1920
with:
20-
path: "**/node_modules"
21-
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
21+
path: 'node_modules'
22+
key: ${{ runner.os }}-modules-${{ hashFiles('package-lock.json') }}
2223
- name: Install dependencies
2324
if: steps.npm-cache.outputs.cache-hit != 'true'
2425
run: npm ci
26+
- name: Install packages
27+
run: sudo apt-get update && sudo apt-get install -y expect
28+
- name: Test
29+
run: npm link && ./test/setup.exp
2530
- name: Test
2631
run: npm run test-ci

.gitpod.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# List the start up tasks. Learn more https://www.gitpod.io/docs/config-start-tasks/
22
tasks:
33
- init: |
4-
sudo add-apt-repository -y ppa:duggan/bats
54
sudo apt-get update
6-
sudo apt-get install -y bats
5+
sudo apt-get install -y expect
76
npm install
87
command: node --inspect-brk dockerproxy.js setup
98
# Test

.prettierrc

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

.restyled.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
enabled: true
2+
restylers:
3+
- clang-format:
4+
enabled: false
5+
- prettier-markdown:
6+
enabled: false
7+
- "*"

.vscode/launch.json

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5-
"version": "0.2.0",
6-
"configurations": [
7-
{
8-
"address": "127.0.0.1",
9-
"localRoot": "${workspaceFolder}",
10-
"name": "Attach to Remote",
11-
"port": 9229,
12-
"remoteRoot": "./",
13-
"request": "attach",
14-
"skipFiles": [
15-
"<node_internals>/**"
16-
],
17-
"type": "pwa-node"
18-
}
19-
]
20-
}
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"address": "127.0.0.1",
9+
"localRoot": "${workspaceFolder}",
10+
"name": "Attach to Remote",
11+
"port": 9229,
12+
"remoteRoot": "./",
13+
"request": "attach",
14+
"skipFiles": ["<node_internals>/**"],
15+
"type": "pwa-node"
16+
}
17+
]
18+
}

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ Examples:
3535
$ dockerproxy up # start the Docker Proxy
3636
$ dockerproxy down # stop the Docker Proxy
3737
```
38+
3839
### Up
40+
3941
```
4042
Usage: dockerproxy up [options]
4143
@@ -49,6 +51,7 @@ Options:
4951
```
5052

5153
### Down
54+
5255
```
5356
Usage: dockerproxy down [options]
5457
@@ -58,6 +61,7 @@ Options:
5861
```
5962

6063
### Setup
64+
6165
```
6266
Usage: dockerproxy setup [options]
6367
@@ -68,6 +72,7 @@ Options:
6872
```
6973

7074
### Config
75+
7176
```
7277
Usage: dockerproxy config [options]
7378
@@ -77,7 +82,6 @@ Options:
7782
-h, --help output usage information
7883
```
7984

80-
8185
## Example
8286

8387
There are two ways of using this command line tool:
@@ -93,7 +97,11 @@ There are two ways of using this command line tool:
9397
9498
## Development and Debugging
9599

100+
1. Clone the repository and including the submodules (`git submodule update --init --recursive`)
96101
1. Launch command with `node --inspect-brk dockerproxy.js setup`.
97102
1. Follow this [guide](https://stackoverflow.com/a/47558970/9277073).
98103
2. Launch `Attach to Remote` Debug Task in VSCode.
99104

105+
## Testing
106+
107+
Install bats (`npm i -g bats`) and expect (`sudo apt-get install expect`). Simply run `npm run test` afterwards.

common.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
const chalk = require('chalk');
22

33
const common = {
4-
error(str) {
5-
console.error(chalk.red(str));
6-
},
4+
error(str) {
5+
console.error(chalk.red(str));
6+
},
77

8-
success(str) {
9-
console.log(chalk.green(str));
10-
}
8+
success(str) {
9+
console.log(chalk.green(str));
10+
},
11+
};
1112

12-
}
13-
14-
module.exports = common;
13+
module.exports = common;

configFile.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
var fs = require('fs');
2+
var path = require('path');
23
var commander = require('commander');
3-
const settingsPath = require('os').homedir() + '\\docker-container-proxy-settings.json';
4+
const settingsPath = path.join(require('os').homedir(), 'docker-container-proxy-settings.json');
45

56
const configFile = {
67
isConfigured: function () {
@@ -17,7 +18,7 @@ const configFile = {
1718
},
1819
getSettingsPath() {
1920
return settingsPath;
20-
}
21+
},
2122
};
2223

2324
module.exports = configFile;

0 commit comments

Comments
 (0)