Skip to content

Commit

Permalink
pretty
Browse files Browse the repository at this point in the history
  • Loading branch information
milesstoetzner committed Sep 4, 2023
1 parent 950c5b0 commit d2bb73e
Show file tree
Hide file tree
Showing 18 changed files with 23 additions and 21 deletions.
10 changes: 6 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ import {Command, Option} from 'commander'

export const program = new Command()

const can2x = program.name('can2x').description('can2x is a simple utility for connecting a can bus unidirectional with another can bus over the network using common web protocols, such as HTTP, MQTT, Socket.IO, and WebSockets.')
const can2x = program
.name('can2x')
.description(
'can2x is a simple utility for connecting a can bus unidirectional with another can bus over the network using common web protocols, such as HTTP, MQTT, Socket.IO, and WebSockets.'
)

const bridge = can2x.command('bridge').description('manages a can2x bridge')

bridge
.command('start')
.description('starts a can2x bridge')
.addOption(
new Option('--source [string]', '')
.default('can')
.choices(['can', 'console', 'http', 'mqtt', 'socketio', 'ws'])
new Option('--source [string]', '').default('can').choices(['can', 'console', 'http', 'mqtt', 'socketio', 'ws'])
)
.option('--source-port [number]', '', '3000')
.option('--source-host [string]', '', 'localhost')
Expand Down
2 changes: 1 addition & 1 deletion src/source/console.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Message} from '#core/message'
import {Processor, Source} from '#/source/source'
import {Message} from '#core/message'
import std from '#std'

export type ConsoleSourceOptions = Message
Expand Down
2 changes: 1 addition & 1 deletion src/source/http.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Message} from '#core/message'
import {Source} from '#/source/source'
import {Message} from '#core/message'
import std from '#std'
import * as check from '#utils/check'
import hae from '#utils/hae'
Expand Down
2 changes: 1 addition & 1 deletion src/source/mqtt.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Message} from '#core/message'
import {Source} from '#/source/source'
import {Message} from '#core/message'
import std from '#std'
import * as check from '#utils/check'
import Aedes from 'aedes'
Expand Down
2 changes: 1 addition & 1 deletion src/source/socketio.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Message} from '#core/message'
import {Source} from '#/source/source'
import {Message} from '#core/message'
import std from '#std'
import * as check from '#utils/check'
import http from 'http'
Expand Down
2 changes: 1 addition & 1 deletion src/source/ws.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Message} from '#core/message'
import {Source} from '#/source/source'
import {Message} from '#core/message'
import std from '#std'
import * as check from '#utils/check'
import http from 'http'
Expand Down
2 changes: 1 addition & 1 deletion src/target/can.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Message} from '#core/message'
import {Target} from '#/target/target'
import * as assert from '#assert'
import * as check from '#check'
import {Message} from '#core/message'
import std from '#std'
import {RawChannel} from '*can.node'
import * as can from 'socketcan'
Expand Down
2 changes: 1 addition & 1 deletion src/target/console.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Message} from '#core/message'
import {Target} from '#/target/target'
import {Message} from '#core/message'
import std from '#std'

export class ConsoleTarget extends Target {
Expand Down
2 changes: 1 addition & 1 deletion src/target/file.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Message} from '#core/message'
import {Target} from '#/target/target'
import {Message} from '#core/message'
import * as files from '#files'
import std from '#std'

Expand Down
2 changes: 1 addition & 1 deletion src/target/http.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Message} from '#core/message'
import {Target} from '#/target/target'
import {Message} from '#core/message'
import std from '#std'
import fetch from 'cross-fetch'

Expand Down
2 changes: 1 addition & 1 deletion src/target/mqtt.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Message} from '#core/message'
import {Target} from '#/target/target'
import * as assert from '#assert'
import * as check from '#check'
import {Message} from '#core/message'
import std from '#std'
import * as mqtt from 'mqtt'

Expand Down
2 changes: 1 addition & 1 deletion src/target/ws.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Message} from '#core/message'
import {Target} from '#/target/target'
import * as assert from '#assert'
import * as check from '#check'
import {Message} from '#core/message'
import std from '#std'
import WebSocket from 'ws'

Expand Down
2 changes: 1 addition & 1 deletion tests/can/can.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Message} from '#core/message'
import * as actions from '#core/actions'
import {Message} from '#core/message'
import * as files from '#files'
import std from '#std'
import * as utils from '#utils'
Expand Down
2 changes: 1 addition & 1 deletion tests/complex/complex.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Message} from '#core/message'
import * as actions from '#core/actions'
import {Message} from '#core/message'
import * as files from '#files'
import std from '#std'
import * as utils from '#utils'
Expand Down
2 changes: 1 addition & 1 deletion tests/http/http.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Message} from '#core/message'
import * as actions from '#core/actions'
import {Message} from '#core/message'
import * as files from '#files'
import std from '#std'
import * as utils from '#utils'
Expand Down
2 changes: 1 addition & 1 deletion tests/mqtt/mqtt.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Message} from '#core/message'
import * as actions from '#core/actions'
import {Message} from '#core/message'
import * as files from '#files'
import std from '#std'
import * as utils from '#utils'
Expand Down
2 changes: 1 addition & 1 deletion tests/socketio/socketio.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Message} from '#core/message'
import * as actions from '#core/actions'
import {Message} from '#core/message'
import * as files from '#files'
import std from '#std'
import * as utils from '#utils'
Expand Down
2 changes: 1 addition & 1 deletion tests/ws/ws.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Message} from '#core/message'
import * as actions from '#core/actions'
import {Message} from '#core/message'
import * as files from '#files'
import std from '#std'
import * as utils from '#utils'
Expand Down

0 comments on commit d2bb73e

Please sign in to comment.