Skip to content

Commit

Permalink
Version Packages (#118)
Browse files Browse the repository at this point in the history
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## [email protected]

### Patch Changes

-   badb5ac: fix authentication on linux
  • Loading branch information
cuppachino authored Nov 14, 2023
2 parents 4df8213 + b4c1ee9 commit b5d164e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
5 changes: 0 additions & 5 deletions .changeset/five-carrots-end.md

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# hexgate

## 0.14.7

### Patch Changes

* badb5ac: fix authentication on linux

## 0.14.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexgate",
"version": "0.14.6",
"version": "0.14.7",
"private": false,
"publishConfig": {
"access": "public",
Expand Down
15 changes: 12 additions & 3 deletions src/modules/auth/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ async function execTokens() {
const PS1 = `Get-CimInstance -className Win32_Process | Where-Object Name -Like "LeagueClientUx*" | Select-Object CommandLine | Format-List`
const DARWIN = `ps -A | grep LeagueClientUx`
const BASH = `ps -Af | grep LeagueClient.ex`
const args: Parameters<typeof execPromise> = process.platform === 'win32' ? [PS1, { shell: 'powershell' }] : process.platform === 'darwin' ? [DARWIN] : [BASH]
const args: Parameters<typeof execPromise> =
process.platform === 'win32'
? [PS1, { shell: 'powershell' }]
: process.platform === 'darwin'
? [DARWIN]
: [BASH]

try {
return (await execPromise(...args)).stdout
Expand All @@ -53,7 +58,11 @@ function parseTokens(
): Combine<Partial<Omit<Credentials, 'certificate'>>>[] {
return stripWhitespace(String(processArgs))
.split(
process.platform === 'win32' ? 'CommandLine' : process.platform === 'darwin' ? '??' : '?'
process.platform === 'win32'
? 'CommandLine'
: process.platform === 'darwin'
? '??'
: '?'
)
.filter(Boolean)
.map((args) => ({
Expand All @@ -74,7 +83,7 @@ export async function getTokens() {
try {
assertTokens(tokens)
acc.push(tokens)
} catch { }
} catch {}
return acc
}, [] as AuthTokens[])
assertTokens(authTokens[0])
Expand Down

0 comments on commit b5d164e

Please sign in to comment.