Skip to content

Commit 01c2ecd

Browse files
committed
Merge remote-tracking branch 'origin/master' into v5.0.0
2 parents 8d86162 + 9828a1a commit 01c2ecd

File tree

15 files changed

+2108
-3312
lines changed

15 files changed

+2108
-3312
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"mocha": true
77
},
88
"parserOptions": {
9-
"ecmaVersion": 8
9+
"ecmaVersion": 2018
1010
},
1111
"rules": {
1212
"semi": ["warn", "never"],

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# These are supported funding model platforms
22

3+
github: daquinoaldo
34
custom: paypal.me/daquinoaldo
4-
# github: daquinoaldo
55

66
# github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
77
# patreon: # Replace with a single Patreon username
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches: [master, ]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [master]
9+
schedule:
10+
- cron: '0 7 * * 4'
11+
12+
jobs:
13+
analyse:
14+
name: Analyse
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
20+
with:
21+
# We must fetch at least the immediate parents so that if this is
22+
# a pull request then we can checkout the head.
23+
fetch-depth: 2
24+
25+
# If this run was triggered by a pull request event, then checkout
26+
# the head of the pull request instead of the merge commit.
27+
- run: git checkout HEAD^2
28+
if: ${{ github.event_name == 'pull_request' }}
29+
30+
# Initializes the CodeQL tools for scanning.
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@v1
33+
# Override language selection by uncommenting this and choosing your languages
34+
# with:
35+
# languages: go, javascript, csharp, python, cpp, java
36+
37+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
38+
# If this step fails, then you should remove it and run the build manually (see below)
39+
- name: Autobuild
40+
uses: github/codeql-action/autobuild@v1
41+
42+
# ℹ️ Command-line programs to run using the OS shell.
43+
# 📚 https://git.io/JvXDl
44+
45+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
46+
# and modify them (or add more) to build your code if your project
47+
# uses a compiled language
48+
49+
#- run: |
50+
# make bootstrap
51+
# make release
52+
53+
- name: Perform CodeQL Analysis
54+
uses: github/codeql-action/analyze@v1

.github/workflows/publish.yml

Lines changed: 0 additions & 74 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
upgrade:
7+
description: Type of version upgrade (patch, minor, major)
8+
required: true
9+
default: patch
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions/setup-node@v2-beta
17+
with:
18+
node-version: 12
19+
registry-url: https://registry.npmjs.org/
20+
21+
- name: Setup git
22+
run: |-
23+
git config --global user.name "github-actions[bot]"
24+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
25+
26+
- run: npm version ${{ github.event.inputs.upgrade }}
27+
28+
- run: git push
29+
- run: git push --tags
30+
31+
- run: npm publish
32+
env:
33+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
34+
35+
- name: Prepare build
36+
run: npm i -g pkg
37+
38+
- name: Build
39+
run: pkg --out-path build .
40+
41+
- name: Get version and package name
42+
id: get_info
43+
run: |-
44+
version=$(node -p "require('./package.json').version")
45+
echo $version
46+
echo "::set-output name=version::$version"
47+
name=$(node -p "require('./package.json').name")
48+
echo $name
49+
echo "::set-output name=name::$name"
50+
51+
- name: Create Release
52+
id: create_release
53+
uses: actions/create-release@v1
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
with:
57+
tag_name: v${{ steps.get_info.outputs.version }}
58+
release_name: Release v${{ steps.get_info.outputs.version }}
59+
draft: false
60+
prerelease: false
61+
62+
- name: Upload Linux Binary
63+
uses: actions/upload-release-asset@v1
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
with:
67+
upload_url: ${{ steps.create_release.outputs.upload_url }}
68+
asset_path: ./build/${{ steps.get_info.outputs.name }}-linux
69+
asset_name: ${{ steps.get_info.outputs.name }}-linux
70+
asset_content_type: application/x-executable
71+
72+
- name: Upload MacOS Binary
73+
uses: actions/upload-release-asset@v1
74+
env:
75+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76+
with:
77+
upload_url: ${{ steps.create_release.outputs.upload_url }}
78+
asset_path: ./build/${{ steps.get_info.outputs.name }}-macos
79+
asset_name: ${{ steps.get_info.outputs.name }}-macos
80+
asset_content_type: application/x-mach-binary
81+
82+
- name: Upload Windows Binary
83+
uses: actions/upload-release-asset@v1
84+
env:
85+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
86+
with:
87+
upload_url: ${{ steps.create_release.outputs.upload_url }}
88+
asset_path: ./build/${{ steps.get_info.outputs.name }}-win.exe
89+
asset_name: ${{ steps.get_info.outputs.name }}-win.exe
90+
asset_content_type: application/x-dosexec

.github/workflows/stale.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: "Stale"
2+
on:
3+
schedule:
4+
- cron: "0 0 * * *"
5+
6+
jobs:
7+
stale:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/stale@v3
11+
with:
12+
repo-token: ${{ secrets.GITHUB_TOKEN }}
13+
stale-issue-message: "Marked as stale for no activity in the past 60 days. In 7 days it will be closed unless new activity."
14+
stale-pr-message: "Marked as stale for no activity in the past 60 days. In 7 days it will be closed unless new activity."
15+
exempt-issue-labels: "no-stale"
16+
exempt-pr-labels: "no-stale"
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
1-
name: GitHub CI
1+
name: Test
22

33
on: [push, pull_request]
44

55
jobs:
66
test:
77
name: Test
8-
runs-on: ${{matrix.os}}
8+
runs-on: ${{ matrix.os }}
99

1010
strategy:
1111
matrix:
12-
os: [ubuntu-latest, macOS-latest, windows-latest]
13-
node: [8, 10, 11, 12]
14-
exclude:
15-
- os: ubuntu-latest
16-
node: 8
12+
os: [ubuntu-latest, macOS-latest]
13+
node: [10, 12, 14]
1714

1815
steps:
19-
- uses: actions/checkout@v1
16+
- uses: actions/checkout@v2
2017
- name: Use Node.js ${{matrix.node}}
2118
uses: actions/setup-node@v1
2219
with:
@@ -33,7 +30,7 @@ jobs:
3330
needs: test
3431
runs-on: ubuntu-latest
3532
steps:
36-
- uses: actions/checkout@v1
33+
- uses: actions/checkout@v2
3734
- uses: actions/setup-node@v1
3835
with:
3936
node-version: 12

.travis.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

Looking-for-contributor.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# I'm looking for contributors!
2+
I would like to totally rewrite this package in a brand new version 5 and I'm looking for help!
3+
With the right help I would also like to switch to an organization on GitHub for advanced features.
4+
5+
## What we want to do
6+
- [ ] Port https-localhost in TypeScript (from JS). I'm working on it and I would like to discuss the final structure of the module.
7+
- [ ] Improve the CLI with option and config files.
8+
- [ ] Evaluate if make sense to split into two separate packages: the CLI and the module. The new CLI may add new dependency and many users use it as module.
9+
- [ ] Switch to more lightweight dependencies (possibly replacing express) to reduce the module size. Evaluate the remotion of less user features that have dependencies (e.g. compression, minify).
10+
- [ ] Structured docs.
11+
- [ ] Publish on brew.
12+
- [ ] Improve the Actions: CI, Release, automatic dependencies upgrade and more.
13+
- [ ] Write a VSCode extension that integrates this project into the IDE.
14+
- [ ] Evaluate Deno compatibility support: lately, some tools for automatic rewriting of imports are coming out, reducing the burden.
15+
- [ ] Optionally, implement a minimal UI (an executable with drag & drop) for users who are not comfortable with the CLI.
16+
17+
18+
## Who I'm looking for
19+
- Stable **maintainers**, to discuss the project together and take design choices.
20+
- Casual **contributors**, who would like to work on a feature or on a task, improve docs, optimize code or fix bugs.
21+
- **Testers**, who can help us find bugs and verify the correct functioning of patches and new features.
22+
23+
### What you need
24+
- Ability to work in a team
25+
- Patience, courtesy, and respect
26+
- Desire to get involved and build something useful
27+
28+
#### Appreciated, but not required to contribute
29+
- TypeScript/javaScript knowledge (but at least desire to learn it, of course!)
30+
- Experience designing a module or a project implementation
31+
32+
### What to keep away
33+
- Presumption
34+
- Claims (of money, power, or other benefits): it's a free, open-source project
35+
36+
37+
## What I can offer
38+
- All my thankfulness and gratitude
39+
- A place in the Contributors section of the README.md (that will be created soon)

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
# HTTPS server running on localhost
2+
3+
| I'm looking for maintainers and contributors! [Learn more](Looking-for-contributor.md). |
4+
|-----------------------------------------------------------------------------------------|
5+
26
Run an express server on localhost with HTTP2 and SSL. Serve static files or import as module in your project.
37

48
https-localhost is a lightweight tool for serving static content on SSL thanks to locally-trusted development certificates.
59
It works with MacOS, Linux and Windows, on Chrome and Firefox, and requires you no configuration.
610

711
[![NPM](https://nodei.co/npm/https-localhost.png)](https://nodei.co/npm/https-localhost/)
812

9-
[![Build Status](https://travis-ci.com/daquinoaldo/https-localhost.svg?branch=master)](https://travis-ci.com/daquinoaldo/https-localhost)
13+
[![Test](https://github.com/daquinoaldo/https-localhost/workflows/Test/badge.svg)](https://github.com/daquinoaldo/https-localhost/actions?query=workflow:Test)
1014
[![Coverage Status](https://coveralls.io/repos/github/daquinoaldo/https-localhost/badge.svg?branch=master)](https://coveralls.io/github/daquinoaldo/https-localhost?branch=master)
1115
[![Dependency Status](https://img.shields.io/david/daquinoaldo/https-localhost.svg)](https://david-dm.org/daquinoaldo/https-localhost)
1216
[![Known Vulnerabilities](https://snyk.io/test/npm/https-localhost/badge.svg)](https://snyk.io/test/npm/https-localhost)
1317
[![GitHub issues](https://img.shields.io/github/issues/daquinoaldo/https-localhost.svg)](https://github.com/daquinoaldo/https-localhost/issues)
14-
[![GitHub Actions](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fdaquinoaldo%2Fhttps-localhost%2Fbadge)](https://actions-badge.atrox.dev/daquinoaldo/https-localhost/goto)
1518

1619

1720
## Dependencies
@@ -122,8 +125,8 @@ Checkout the updated list [here](https://github.com/FiloSottile/mkcert/blob/mast
122125

123126
## Troubleshooting
124127
### Node.js version
125-
https-localhost requires Node.js 8 or higher.
126-
<sub>If you need compatibility with previously Node.js versions let me know, we'll try to rearrange the code.</sub>
128+
https-localhost is compatible with the LTS and latest version of Node.js.
129+
<sub>If you need compatibility with other Node.js versions let me know, we'll try to rearrange the code.</sub>
127130

128131
### root required
129132
- **At first run** this tool generate a trusted certificate. The sudo password may be required. If you cannot provide the sudo password generate a `localhost.key` and `localhost.crt` and specify its path with `CERT_PATH=/diractory/containing/certificates/ serve ~/myproj`.

0 commit comments

Comments
 (0)