Skip to content

Commit

Permalink
Support relative path for unix socket
Browse files Browse the repository at this point in the history
  • Loading branch information
pvarentsov committed Jul 22, 2022
1 parent 3421cdd commit f960ef9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"scripts": {
"build": "rimraf dist && tsc -p tsconfig.build.json && tsc-alias",
"build:release": "rimraf dist && tsc -p tsconfig.release.json && tsc-alias -p tsconfig.release.json",
"bin": "npm run build:release && ./bin.sh",
"bin": "rimraf bin && npm run build:release && ./bin.sh",
"release": "npm run build:release && npm publish",
"lib:check": "ncu",
"lib:upgrade": "ncu -u && npm install",
Expand Down
5 changes: 5 additions & 0 deletions src/core/socket/contract/socket.factory.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { resolve } from 'path'

import { ISocketClient, SocketOptions, SocketType } from '@iola/core/socket'
import { NetSocketClient } from '@iola/core/socket/client/net-socket.client'
import { NetSocketSyncClient } from '@iola/core/socket/client/net-socket.sync.client'
Expand All @@ -19,6 +21,9 @@ export class SocketFactory {
}

private static createNetSocket(options: SocketOptions): ISocketClient {
if (options.type === SocketType.Unix) {
options.address = resolve(process.cwd(), options.address)
}
if (options.netSync) {
return new NetSocketSyncClient(options, new EventStore())
}
Expand Down

0 comments on commit f960ef9

Please sign in to comment.