-
Notifications
You must be signed in to change notification settings - Fork 1
Rewrite to TypeScript, add IPv6 support and CI #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 16 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
80e7cb3
Rewrite to TypeScript, add MessageV2/IPv6 support, CI and CLI
antondalgren 3accce6
Remove redundant build step from release workflow
antondalgren 772d30e
Handle embedded IPv4 tail in IPv6 addresses
antondalgren 1cb498c
Rename snake_case variables to camelCase in sparoid.ts
antondalgren 1c63c91
Validate hex key inputs with descriptive error messages
antondalgren e6e3b7c
Allow injecting public IPs into auth() to skip network discovery
antondalgren 5166dc6
Await UDP sends concurrently and fix publicIp filter
antondalgren 846c09d
Validate port argument in CLI
antondalgren 075a7a5
Add missing Node builtins to rollup externals
antondalgren d6ee891
Add package-lock.json
antondalgren cb1aff3
Stop ignoring package-lock.json
antondalgren 9df1e7b
Use named dns import and fix resolvHost typo
antondalgren 77fa6b7
Send only V2 messages, IPv4 first
antondalgren 92b964a
Simplify to single Message (v1), remove range, add IPv6 via UDP
antondalgren f228853
Remove CLI
antondalgren 22d9d52
Address PR review: timeout, HTTPS, dead code, indentation
antondalgren 8ce4b2e
Check HTTP status, fix parseInt radix, prevent socket leaks
antondalgren f22a09a
Validate global unicast on IPv6 HTTP fallback path
antondalgren File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: CI | ||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: lts/* | ||
| cache: npm | ||
| - run: npm install | ||
| - run: npm run lint | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: lts/* | ||
| cache: npm | ||
| - run: npm install | ||
| - run: npm test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
|
|
||
| permissions: | ||
| contents: write | ||
| id-token: write | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: lts/* | ||
| cache: npm | ||
|
|
||
| - name: Install dependencies | ||
| run: npm install | ||
|
|
||
| - name: Lint | ||
| run: npm run lint | ||
|
|
||
| - name: Run tests | ||
| run: npm test | ||
|
|
||
| - name: Create GitHub Release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| tag_name: ${{ github.ref_name }} | ||
| name: Release ${{ github.ref_name }} | ||
| draft: false | ||
| prerelease: false | ||
| generate_release_notes: true | ||
|
|
||
| - name: Update NPM | ||
| run: npm install -g npm@latest | ||
|
|
||
| - name: Publish to NPM | ||
| run: npm publish --provenance --access public | ||
|
antondalgren marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| dist/ | ||
| examples/ | ||
| node_modules/ | ||
| package-lock.json | ||
| premaster.txt |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import js from '@eslint/js' | ||
| import tseslint from 'typescript-eslint' | ||
|
|
||
| export default tseslint.config( | ||
| js.configs.recommended, | ||
| ...tseslint.configs.recommended, | ||
| { | ||
| rules: { | ||
| "no-console": "off", | ||
| }, | ||
| }, | ||
| { | ||
| ignores: ["dist/"], | ||
| }, | ||
| ) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.