diff --git a/src/actions/index.ts b/src/actions/index.ts index 89358d56..f117fa73 100644 --- a/src/actions/index.ts +++ b/src/actions/index.ts @@ -1,14 +1,14 @@ import { Dispatch as ReduxDispatch } from 'redux'; import { BLEAction, BLEConnectAction, BLEDataAction } from './ble'; +import { EditorAction } from './editor'; +import { HubAction, HubMessageAction } from './hub'; import { BootloaderAction, BootloaderConnectionAction, BootloaderDidRequestAction, BootloaderRequestAction, BootloaderResponseAction, -} from './bootloader'; -import { EditorAction } from './editor'; -import { HubAction, HubMessageAction } from './hub'; +} from './lwp3-bootloader'; import { MpyAction } from './mpy'; import { NotificationAction } from './notification'; import { ServiceWorkerAction } from './service-worker'; diff --git a/src/actions/bootloader.ts b/src/actions/lwp3-bootloader.ts similarity index 99% rename from src/actions/bootloader.ts rename to src/actions/lwp3-bootloader.ts index 96415ea6..100a5ea8 100644 --- a/src/actions/bootloader.ts +++ b/src/actions/lwp3-bootloader.ts @@ -2,7 +2,12 @@ // Copyright (c) 2020 The Pybricks Authors import { Action } from 'redux'; -import { Command, HubType, ProtectionLevel, Result } from '../protocols/bootloader'; +import { + Command, + HubType, + ProtectionLevel, + Result, +} from '../protocols/lwp3-bootloader'; import { createCountFunc } from '../utils/iter'; /** diff --git a/src/components/FlashButton.tsx b/src/components/FlashButton.tsx index a37ab4bb..382c46db 100644 --- a/src/components/FlashButton.tsx +++ b/src/components/FlashButton.tsx @@ -3,7 +3,7 @@ import { connect } from 'react-redux'; import { Dispatch } from '../actions'; -import { flashFirmware } from '../actions/bootloader'; +import { flashFirmware } from '../actions/lwp3-bootloader'; import * as notification from '../actions/notification'; import { RootState } from '../reducers'; import { BootloaderConnectionState } from '../reducers/bootloader'; diff --git a/src/protocols/bootloader.ts b/src/protocols/lwp3-bootloader.ts similarity index 100% rename from src/protocols/bootloader.ts rename to src/protocols/lwp3-bootloader.ts diff --git a/src/reducers/bootloader.ts b/src/reducers/bootloader.ts index b0ad06d9..c0adb7b2 100644 --- a/src/reducers/bootloader.ts +++ b/src/reducers/bootloader.ts @@ -7,7 +7,7 @@ import { BootloaderConnectionActionType, BootloaderRequestActionType, BootloaderResponseActionType, -} from '../actions/bootloader'; +} from '../actions/lwp3-bootloader'; /** * Describes the state of the bootloader connection. diff --git a/src/reducers/notification.ts b/src/reducers/notification.ts index 496c6761..5f91f712 100644 --- a/src/reducers/notification.ts +++ b/src/reducers/notification.ts @@ -7,7 +7,7 @@ import { Action } from '../actions'; import { BootloaderConnectionActionType, BootloaderConnectionFailureReason, -} from '../actions/bootloader'; +} from '../actions/lwp3-bootloader'; import { NotificationActionType } from '../actions/notification'; import { ServiceWorkerActionType } from '../actions/service-worker'; import { createCountFunc } from '../utils/iter'; diff --git a/src/reducers/status.ts b/src/reducers/status.ts index 63f55a5e..491e66db 100644 --- a/src/reducers/status.ts +++ b/src/reducers/status.ts @@ -3,7 +3,7 @@ import { Reducer } from 'react'; import { combineReducers } from 'redux'; -import { BootloaderAction, BootloaderActionType } from '../actions/bootloader'; +import { BootloaderAction, BootloaderActionType } from '../actions/lwp3-bootloader'; const progress: Reducer = (state = -1, action) => { switch (action.type) { diff --git a/src/sagas/index.ts b/src/sagas/index.ts index 6b188e5c..6ff2fe21 100644 --- a/src/sagas/index.ts +++ b/src/sagas/index.ts @@ -2,7 +2,7 @@ // Copyright (c) 2020 The Pybricks Authors import { all } from 'redux-saga/effects'; -import bootloader from './bootloader'; +import bootloader from './lwp3-bootloader'; import mpy from './mpy'; /* istanbul ignore next */ diff --git a/src/sagas/bootloader.test.ts b/src/sagas/lwp3-bootloader.test.ts similarity index 98% rename from src/sagas/bootloader.test.ts rename to src/sagas/lwp3-bootloader.test.ts index 7e05a1d6..ea73f5bb 100644 --- a/src/sagas/bootloader.test.ts +++ b/src/sagas/lwp3-bootloader.test.ts @@ -25,16 +25,16 @@ import { send, stateRequest, stateResponse, -} from '../actions/bootloader'; +} from '../actions/lwp3-bootloader'; import { Command, HubType, ProtectionLevel, ProtocolError, Result, -} from '../protocols/bootloader'; +} from '../protocols/lwp3-bootloader'; import { createCountFunc } from '../utils/iter'; -import bootloader from './bootloader'; +import bootloader from './lwp3-bootloader'; describe('message encoder', () => { test.each([ diff --git a/src/sagas/bootloader.ts b/src/sagas/lwp3-bootloader.ts similarity index 99% rename from src/sagas/bootloader.ts rename to src/sagas/lwp3-bootloader.ts index 93854265..c542685b 100644 --- a/src/sagas/bootloader.ts +++ b/src/sagas/lwp3-bootloader.ts @@ -57,7 +57,7 @@ import { rebootRequest, send, stateResponse, -} from '../actions/bootloader'; +} from '../actions/lwp3-bootloader'; import { MpyActionType, MpyDidCompileAction, @@ -87,7 +87,7 @@ import { parseGetInfoResponse, parseInitLoaderResponse, parseProgramFlashResponse, -} from '../protocols/bootloader'; +} from '../protocols/lwp3-bootloader'; import { hex } from '../utils'; import { fmod, sumComplement32 } from '../utils/math'; diff --git a/src/services/error-log.ts b/src/services/error-log.ts index 1c312f2a..672354ab 100644 --- a/src/services/error-log.ts +++ b/src/services/error-log.ts @@ -5,7 +5,7 @@ import { Action } from '../actions'; import { BootloaderConnectionActionType, BootloaderConnectionFailureReason, -} from '../actions/bootloader'; +} from '../actions/lwp3-bootloader'; import { combineServices } from '.'; /** diff --git a/src/services/index.ts b/src/services/index.ts index 5e88dae2..700cc0da 100644 --- a/src/services/index.ts +++ b/src/services/index.ts @@ -5,10 +5,10 @@ import { Middleware } from 'redux'; import { Action, Dispatch } from '../actions'; import { RootState } from '../reducers'; import ble from './ble'; -import bootloader from './bootloader'; import editor from './editor'; import errorLog from './error-log'; import hub from './hub'; +import bootloader from './lwp3-bootloader'; type Service = ( action: Action, diff --git a/src/services/bootloader.ts b/src/services/lwp3-bootloader.ts similarity index 97% rename from src/services/bootloader.ts rename to src/services/lwp3-bootloader.ts index fe73dba2..32ad65d7 100644 --- a/src/services/bootloader.ts +++ b/src/services/lwp3-bootloader.ts @@ -11,8 +11,8 @@ import { didFailToConnect, didReceive, didSend, -} from '../actions/bootloader'; -import { CharacteristicUUID, ServiceUUID } from '../protocols/bootloader'; +} from '../actions/lwp3-bootloader'; +import { CharacteristicUUID, ServiceUUID } from '../protocols/lwp3-bootloader'; import { PolyfillBluetoothRemoteGATTCharacteristic, polyfillBluetoothRemoteGATTCharacteristic,